method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void closeRegion(final String regionname, final String serverName)
throws IOException {
closeRegion(Bytes.toBytes(regionname), serverName);
} | void function(final String regionname, final String serverName) throws IOException { closeRegion(Bytes.toBytes(regionname), serverName); } | /**
* Close a region. For expert-admins. Runs close on the regionserver. The
* master will not be informed of the close.
* @param regionname region name to close
* @param serverName If supplied, we'll use this location rather than
* the one currently in <code>.META.</code>
* @throws IOException if a... | Close a region. For expert-admins. Runs close on the regionserver. The master will not be informed of the close | closeRegion | {
"repo_name": "infospace/hbase",
"path": "src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java",
"license": "apache-2.0",
"size": 93687
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.io.IOException; import org.apache.hadoop.hbase.util.Bytes; | import java.io.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 839,095 |
public BindyFixedLengthFactory getFactory(PackageScanClassResolver resolver) throws Exception {
if (modelFactory == null) {
modelFactory = new BindyFixedLengthFactory(resolver, packages);
}
return modelFactory;
} | BindyFixedLengthFactory function(PackageScanClassResolver resolver) throws Exception { if (modelFactory == null) { modelFactory = new BindyFixedLengthFactory(resolver, packages); } return modelFactory; } | /**
* Method used to create the singleton of the BindyCsvFactory
*/ | Method used to create the singleton of the BindyCsvFactory | getFactory | {
"repo_name": "everttigchelaar/camel-svn",
"path": "components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/fixed/BindyFixedLengthDataFormat.java",
"license": "apache-2.0",
"size": 6811
} | [
"org.apache.camel.dataformat.bindy.BindyFixedLengthFactory",
"org.apache.camel.spi.PackageScanClassResolver"
] | import org.apache.camel.dataformat.bindy.BindyFixedLengthFactory; import org.apache.camel.spi.PackageScanClassResolver; | import org.apache.camel.dataformat.bindy.*; import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,187,615 |
public final Color getActualColor()
{
// take the colour from the parent class, not from this one
// - this is mostly because when we do a save, we want to
// correctly reflect that this instance may take it's
// colour from the track - meaning it's storing a null value
return super.getCol... | final Color function() { return super.getColor(); } | /**
* method to provide the actual colour value stored in this fix
*
* @return fix colour, including null if applicable
*/ | method to provide the actual colour value stored in this fix | getActualColor | {
"repo_name": "pecko/debrief",
"path": "org.mwc.debrief.legacy/src/Debrief/Wrappers/FixWrapper.java",
"license": "epl-1.0",
"size": 44626
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,102,799 |
private AbstractAuthorityFactory getGeotoolsFactory(final String caller, final String code)
throws FactoryException {
final AuthorityFactory candidate = getAuthorityFactory(code);
if (candidate instanceof AbstractAuthorityFactory) {
return (AbstractAuthorityFactory) candidate... | AbstractAuthorityFactory function(final String caller, final String code) throws FactoryException { final AuthorityFactory candidate = getAuthorityFactory(code); if (candidate instanceof AbstractAuthorityFactory) { return (AbstractAuthorityFactory) candidate; } if (caller == null) { return null; } throw new FactoryExce... | /**
* Returns one of the underlying factories as an instance of the GeoTools implementation. If
* there is none of them, then returns {@code null} or throws an exception if {@code caller} is
* not null.
*/ | Returns one of the underlying factories as an instance of the GeoTools implementation. If there is none of them, then returns null or throws an exception if caller is not null | getGeotoolsFactory | {
"repo_name": "geotools/geotools",
"path": "modules/library/referencing/src/main/java/org/geotools/referencing/factory/AuthorityFactoryAdapter.java",
"license": "lgpl-2.1",
"size": 54063
} | [
"org.geotools.metadata.i18n.ErrorKeys",
"org.geotools.metadata.i18n.Errors",
"org.opengis.referencing.AuthorityFactory",
"org.opengis.referencing.FactoryException"
] | import org.geotools.metadata.i18n.ErrorKeys; import org.geotools.metadata.i18n.Errors; import org.opengis.referencing.AuthorityFactory; import org.opengis.referencing.FactoryException; | import org.geotools.metadata.i18n.*; import org.opengis.referencing.*; | [
"org.geotools.metadata",
"org.opengis.referencing"
] | org.geotools.metadata; org.opengis.referencing; | 698,240 |
public Vector<Client>
getSelectingClients (
int mask
) {
if ((mask & _eventMask) == 0)
return null;
Vector<Client> rc = new Vector<Client>();
Set<Client> sc = _clientMasks.keySet ();
for (Client c: sc)
if ((_clientMasks.get (c) & mask) != 0)
rc.add (c);
return rc;
} | Vector<Client> function ( int mask ) { if ((mask & _eventMask) == 0) return null; Vector<Client> rc = new Vector<Client>(); Set<Client> sc = _clientMasks.keySet (); for (Client c: sc) if ((_clientMasks.get (c) & mask) != 0) rc.add (c); return rc; } | /**
* Return the list of clients selecting on the events.
*
* @param mask The event mask.
* @return List of clients, or null if none selecting.
*/ | Return the list of clients selecting on the events | getSelectingClients | {
"repo_name": "SumiTomohiko/android-nexec-client",
"path": "app/src/main/java/au/com/darkside/XServer/Window.java",
"license": "mit",
"size": 78410
} | [
"java.util.Set",
"java.util.Vector"
] | import java.util.Set; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,911,659 |
public View getDownButton(){
return this.down_button;
} | View function(){ return this.down_button; } | /**
* Returns the view with down function.
* @return View object with down function associated.
*/ | Returns the view with down function | getDownButton | {
"repo_name": "GuillermoBlasco/AndViewUtil",
"path": "src/com/andviewutil/picker/Picker.java",
"license": "gpl-3.0",
"size": 9754
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,235,620 |
public void exec() throws IOException {
final String dsn = Manifests.read("Rultor-SentryDsn");
if (!dsn.startsWith("test")) {
Sentry.init(dsn);
}
final Talks talks = new CdTalks(
new DyTalks(
this.dynamo(), this.sttc().counters().get("rt-talk")... | void function() throws IOException { final String dsn = Manifests.read(STR); if (!dsn.startsWith("test")) { Sentry.init(dsn); } final Talks talks = new CdTalks( new DyTalks( this.dynamo(), this.sttc().counters().get(STR) ) ); final Routine routine = new Routine( talks, Entry.pulse(), this.github(), this.sttc() ); try {... | /**
* Run it all.
* @throws IOException If fails
*/ | Run it all | exec | {
"repo_name": "krzyk/rultor",
"path": "src/main/java/com/rultor/Entry.java",
"license": "bsd-3-clause",
"size": 7208
} | [
"com.jcabi.manifests.Manifests",
"com.rultor.cached.CdTalks",
"com.rultor.dynamo.DyTalks",
"com.rultor.spi.Talks",
"com.rultor.web.TkApp",
"io.sentry.Sentry",
"java.io.IOException",
"org.takes.http.Exit",
"org.takes.http.FtCli"
] | import com.jcabi.manifests.Manifests; import com.rultor.cached.CdTalks; import com.rultor.dynamo.DyTalks; import com.rultor.spi.Talks; import com.rultor.web.TkApp; import io.sentry.Sentry; import java.io.IOException; import org.takes.http.Exit; import org.takes.http.FtCli; | import com.jcabi.manifests.*; import com.rultor.cached.*; import com.rultor.dynamo.*; import com.rultor.spi.*; import com.rultor.web.*; import io.sentry.*; import java.io.*; import org.takes.http.*; | [
"com.jcabi.manifests",
"com.rultor.cached",
"com.rultor.dynamo",
"com.rultor.spi",
"com.rultor.web",
"io.sentry",
"java.io",
"org.takes.http"
] | com.jcabi.manifests; com.rultor.cached; com.rultor.dynamo; com.rultor.spi; com.rultor.web; io.sentry; java.io; org.takes.http; | 2,236,659 |
private void drawAxes(Graphics2D g){
this.width = this.getWidth();
this.height = this.getHeight();
// Draw axes.
// X axis.
g.drawLine(0, y0, width, y0);
// Y axis.
g.drawLine(x0, 0, x0, height);
// Diameter of Axes centre.
int diameter;
... | void function(Graphics2D g){ this.width = this.getWidth(); this.height = this.getHeight(); g.drawLine(0, y0, width, y0); g.drawLine(x0, 0, x0, height); int diameter; diameter = 5; Ellipse2D.Double circle; circle = new Ellipse2D.Double(x0-diameter/2, y0-diameter/2, diameter, diameter); g.fill(circle); } | /**
* Method draws X and Y axes on the JPanel.
* @param g Graphics2D
*/ | Method draws X and Y axes on the JPanel | drawAxes | {
"repo_name": "asmailov/IMG_Encryption",
"path": "src/GUI/DrawPanel.java",
"license": "mit",
"size": 15549
} | [
"java.awt.Graphics2D",
"java.awt.geom.Ellipse2D"
] | import java.awt.Graphics2D; import java.awt.geom.Ellipse2D; | import java.awt.*; import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 876,275 |
public static <V> int distinctList(List<V> sourceList) {
if (isEmpty(sourceList)) {
return 0;
}
int sourceCount = sourceList.size();
int sourceListSize = sourceList.size();
for (int i = 0; i < sourceListSize; i++) {
for (int j = (i + 1); j < sourceLis... | static <V> int function(List<V> sourceList) { if (isEmpty(sourceList)) { return 0; } int sourceCount = sourceList.size(); int sourceListSize = sourceList.size(); for (int i = 0; i < sourceListSize; i++) { for (int j = (i + 1); j < sourceListSize; j++) { if (sourceList.get(i).equals(sourceList.get(j))) { sourceList.remo... | /**
* remove duplicate entries in list
*
* @param <V>
* @param sourceList
* @return the count of entries be removed
*/ | remove duplicate entries in list | distinctList | {
"repo_name": "Ruaaaaaaaaaaaaaaaaaa/newZhiHu",
"path": "app/src/main/java/com/wmj/newzhihu/utils/ListUtils.java",
"license": "apache-2.0",
"size": 7351
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,170,217 |
public static ChunkCoordinates ofLocation(Location l) {
return new ChunkCoordinates(l.getBlockX() >> 4, l.getBlockZ() >> 4);
}
private final int x;
private final int z;
public ChunkCoordinates(int x, int z) {
this.x = x;
this.z = z;
}
| static ChunkCoordinates function(Location l) { return new ChunkCoordinates(l.getBlockX() >> 4, l.getBlockZ() >> 4); } private final int x; private final int z; public ChunkCoordinates(int x, int z) { this.x = x; this.z = z; } | /**
* Returns the chunk coordinates of the given location.
*
* @param l
* @return
*/ | Returns the chunk coordinates of the given location | ofLocation | {
"repo_name": "MCPhoton/Photon-MC1.8",
"path": "src/org/mcphoton/world/ChunkCoordinates.java",
"license": "agpl-3.0",
"size": 2413
} | [
"org.mcphoton.util.Location"
] | import org.mcphoton.util.Location; | import org.mcphoton.util.*; | [
"org.mcphoton.util"
] | org.mcphoton.util; | 1,290,637 |
private byte[] decryptObject(Cipher c) {
byte[] result = null;
try {
result = c.doFinal(encodedObject);
} catch (IllegalBlockSizeException e) {
// because the cipher is initialize for decryption this exception
// is not raised
throw new Assert... | byte[] function(Cipher c) { byte[] result = null; try { result = c.doFinal(encodedObject); } catch (IllegalBlockSizeException e) { throw new AssertionError(e); } catch (BadPaddingException e) { throw new AssertionError(e); } return result; } public SealedObject(Serializable object, Cipher c) throws IOException, Illegal... | /**
* Decrypts <code>encodedObject</code> calling doFinal(byte) cipher's method
* and returns the result in a new array
*
* @param c the given cipher
* @return the result of decrypting <code>encodedObject</code> with
* <code>cipher</code>
*/ | Decrypts <code>encodedObject</code> calling doFinal(byte) cipher's method and returns the result in a new array | decryptObject | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/modules/crypto2/src/javax/crypto/SealedObject.java",
"license": "apache-2.0",
"size": 8537
} | [
"java.io.IOException",
"java.io.Serializable",
"java.security.AlgorithmParameters"
] | import java.io.IOException; import java.io.Serializable; import java.security.AlgorithmParameters; | import java.io.*; import java.security.*; | [
"java.io",
"java.security"
] | java.io; java.security; | 228,781 |
try{
return parse(content);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "time"});
}
} | try{ return parse(content); } catch(Exception ex){ throw new InvalidDatatypeValueException(STR, new Object[]{content, "time"}); } } | /**
* Convert a string to a compiled form
*
* @param content The lexical representation of time
* @return a valid and normalized time object
*/ | Convert a string to a compiled form | getActualValue | {
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/com/sun/org/apache/xerces/internal/impl/dv/xs/TimeDV.java",
"license": "apache-2.0",
"size": 4008
} | [
"com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException"
] | import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException; | import com.sun.org.apache.xerces.internal.impl.dv.*; | [
"com.sun.org"
] | com.sun.org; | 120,173 |
public IBlockState getStateFromMeta(int meta)
{
IBlockState iblockstate = this.getDefaultState();
for (int i = 0; i < 3; ++i)
{
iblockstate = iblockstate.withProperty(HAS_BOTTLE[i], Boolean.valueOf((meta & 1 << i) > 0));
}
return iblockstate;
} | IBlockState function(int meta) { IBlockState iblockstate = this.getDefaultState(); for (int i = 0; i < 3; ++i) { iblockstate = iblockstate.withProperty(HAS_BOTTLE[i], Boolean.valueOf((meta & 1 << i) > 0)); } return iblockstate; } | /**
* Convert the given metadata into a BlockState for this Block
*/ | Convert the given metadata into a BlockState for this Block | getStateFromMeta | {
"repo_name": "TorchPowered/Thallium",
"path": "src/main/java/net/minecraft/block/BlockBrewingStand.java",
"license": "mit",
"size": 6031
} | [
"net.minecraft.block.state.IBlockState"
] | import net.minecraft.block.state.IBlockState; | import net.minecraft.block.state.*; | [
"net.minecraft.block"
] | net.minecraft.block; | 2,416,584 |
public Set<String> getOutputsIds() {
return out.keySet();
}
| Set<String> function() { return out.keySet(); } | /**
* Returns the ids of all the outputs (ids and sizes).
* @return Ids of all outputs.
*/ | Returns the ids of all the outputs (ids and sizes) | getOutputsIds | {
"repo_name": "brunonova/drmips",
"path": "src/simulator/src/main/java/brunonova/drmips/simulator/Control.java",
"license": "gpl-3.0",
"size": 3995
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,182,729 |
@Test
public void testBuckProjectSliceWithTestsDependenciesInDifferentBuckFile() throws IOException {
ProcessResult result = runBuckProjectAndVerify(
"project_slice_with_tests_dependencies_in_different_buck_file",
"--deprecated-ij-generation",
"//modules/dep1:dep1",
"-v", "5");
... | void function() throws IOException { ProcessResult result = runBuckProjectAndVerify( STR, STR, " "-vSTR5STR`buck project` should report the files it modified.STRMODIFIED FILES:STR.idea/compiler.xmlSTR.idea/misc.xmlSTR.idea/modules.xmlSTR.idea/runConfigurations/Debug_Buck_test.xmlSTRmodules/dep1/module_modules_dep1.imlS... | /**
* Verify that if we build a project by specifying a target, the tests dependencies are
* referenced even if they are defined in a buck file that would not have been parsed otherwise.
*/ | Verify that if we build a project by specifying a target, the tests dependencies are referenced even if they are defined in a buck file that would not have been parsed otherwise | testBuckProjectSliceWithTestsDependenciesInDifferentBuckFile | {
"repo_name": "daedric/buck",
"path": "test/com/facebook/buck/jvm/java/intellij/ProjectIntegrationTest.java",
"license": "apache-2.0",
"size": 24804
} | [
"com.facebook.buck.testutil.integration.ProjectWorkspace",
"java.io.IOException"
] | import com.facebook.buck.testutil.integration.ProjectWorkspace; import java.io.IOException; | import com.facebook.buck.testutil.integration.*; import java.io.*; | [
"com.facebook.buck",
"java.io"
] | com.facebook.buck; java.io; | 1,573,098 |
@Override public void enterExpression(@NotNull BindingExpressionParser.ExpressionContext ctx) { } | @Override public void enterExpression(@NotNull BindingExpressionParser.ExpressionContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitConstantValue | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/databinding/parser/BindingExpressionBaseListener.java",
"license": "gpl-3.0",
"size": 14237
} | [
"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; | 486,102 |
@Test
public void testImmediateRecoveryOfLease() throws Exception {
//create a file
// write bytes into the file.
byte [] actual = new byte[FILE_SIZE];
int size = AppendTestUtil.nextInt(FILE_SIZE);
Path filepath = createFile("/immediateRecoverLease-shortlease", size, true);
// set the soft l... | void function() throws Exception { byte [] actual = new byte[FILE_SIZE]; int size = AppendTestUtil.nextInt(FILE_SIZE); Path filepath = createFile(STR, size, true); cluster.setLeasePeriod(SHORT_LEASE_PERIOD, LONG_LEASE_PERIOD); recoverLeaseUsingCreate(filepath); verifyFile(dfs, filepath, actual, size); cluster.setLeaseP... | /**
* Test the NameNode's revoke lease on current lease holder function.
* @throws Exception
*/ | Test the NameNode's revoke lease on current lease holder function | testImmediateRecoveryOfLease | {
"repo_name": "ronny-macmaster/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java",
"license": "apache-2.0",
"size": 20756
} | [
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.Path"
] | import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.Path; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,542,031 |
public static IndexKey prepareDefaultStartIndexKey(SegmentProperties segmentProperties)
throws KeyGenException {
IndexKey startIndexKey;
long[] dictionarySurrogateKey = new long[segmentProperties.getNumberOfDictSortColumns()];
byte[] dictionaryStartMdkey =
segmentProperties.getSortColumnsGen... | static IndexKey function(SegmentProperties segmentProperties) throws KeyGenException { IndexKey startIndexKey; long[] dictionarySurrogateKey = new long[segmentProperties.getNumberOfDictSortColumns()]; byte[] dictionaryStartMdkey = segmentProperties.getSortColumnsGenerator().generateKey(dictionarySurrogateKey); byte[] n... | /**
* method will create a default end key in case of no end key is been
* derived using existing filter or in case of non filter queries.
*
* @param segmentProperties
* @return
* @throws KeyGenException
*/ | method will create a default end key in case of no end key is been derived using existing filter or in case of non filter queries | prepareDefaultStartIndexKey | {
"repo_name": "aniketadnaik/carbondataStreamIngest",
"path": "core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java",
"license": "apache-2.0",
"size": 69343
} | [
"org.apache.carbondata.core.datastore.IndexKey",
"org.apache.carbondata.core.datastore.block.SegmentProperties",
"org.apache.carbondata.core.keygenerator.KeyGenException"
] | import org.apache.carbondata.core.datastore.IndexKey; import org.apache.carbondata.core.datastore.block.SegmentProperties; import org.apache.carbondata.core.keygenerator.KeyGenException; | import org.apache.carbondata.core.datastore.*; import org.apache.carbondata.core.datastore.block.*; import org.apache.carbondata.core.keygenerator.*; | [
"org.apache.carbondata"
] | org.apache.carbondata; | 975,792 |
public Vector2f getCursorPosition() {
return cursorPosition;
}
| Vector2f function() { return cursorPosition; } | /**
* Location in screen coordinates.
*
* @return the cursor position
*/ | Location in screen coordinates | getCursorPosition | {
"repo_name": "synergynet/synergynet2.5",
"path": "synergynet2.5/src/main/java/synergynetframework/jme/pickingsystem/data/PickRequest.java",
"license": "bsd-3-clause",
"size": 2802
} | [
"com.jme.math.Vector2f"
] | import com.jme.math.Vector2f; | import com.jme.math.*; | [
"com.jme.math"
] | com.jme.math; | 2,278,954 |
public String format(Object value)
{
if (value instanceof Icon) return null;
if (value!=null) return value.toString();
return null;
} | String function(Object value) { if (value instanceof Icon) return null; if (value!=null) return value.toString(); return null; } | /**
* Returns the <code>String</code> representing the specified value.
* @param value The object which should be formated.
* @return <code>null</code> if <code>value</code> is null otherwise
* the value of <code>value.toString()</code>.
*/ | Returns the <code>String</code> representing the specified value | format | {
"repo_name": "xylo/idea-sql-query-plugin",
"path": "src/com/kiwisoft/utils/format/DefaultObjectFormat.java",
"license": "gpl-2.0",
"size": 3698
} | [
"javax.swing.Icon"
] | import javax.swing.Icon; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 684,751 |
public Set<Topic> getAPITopics(String apiId) throws APIManagementException {
Connection conn = null;
ResultSet resultSet = null;
PreparedStatement ps = null;
String getTopicsQuery = SQLConstants.GET_ALL_TOPICS_BY_API_ID;
Set<Topic> topicSet = new HashSet();
try {
... | Set<Topic> function(String apiId) throws APIManagementException { Connection conn = null; ResultSet resultSet = null; PreparedStatement ps = null; String getTopicsQuery = SQLConstants.GET_ALL_TOPICS_BY_API_ID; Set<Topic> topicSet = new HashSet(); try { conn = APIMgtDBUtil.getConnection(); ps = conn.prepareStatement(get... | /**
* Retrieves the Topic for a specified async API.
*
* @param apiId API UUID
* @return Set of Topic objects
* @throws APIManagementException if failed to retrieve topics of the web hook API
*/ | Retrieves the Topic for a specified async API | getAPITopics | {
"repo_name": "fazlan-nazeem/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java",
"license": "apache-2.0",
"size": 821235
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.HashSet",
"java.util.Set",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.model.webhooks.Topic",
"org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants",
... | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.HashSet; import java.util.Set; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.webhooks.Topic; import org.wso2.carbon.apimgt.impl.dao... | import java.sql.*; import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.webhooks.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"java.sql",
"java.util",
"org.wso2.carbon"
] | java.sql; java.util; org.wso2.carbon; | 1,115,760 |
protected OutputStream filenameToOutputStream(String fileName)
throws IOException {
if (fileName == null){
return null;
}
return new FileOutputStream(fileName);
} | OutputStream function(String fileName) throws IOException { if (fileName == null){ return null; } return new FileOutputStream(fileName); } | /**
* Converts a file name into a Outputstream.
* Returns null if the file name is null.
*/ | Converts a file name into a Outputstream. Returns null if the file name is null | filenameToOutputStream | {
"repo_name": "PengXing/closure-compiler",
"path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java",
"license": "apache-2.0",
"size": 66786
} | [
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 568,064 |
public void addCustomActionButton(Drawable drawable, String description,
OnClickListener listener) { } | void function(Drawable drawable, String description, OnClickListener listener) { } | /**
* Adds a custom action button to the {@link ToolbarLayout} if it is supported.
* @param description The content description for the button.
* @param listener The {@link OnClickListener} to use for clicks to the button.
* @param buttonSource The {@link Bitmap} resource to use as the source f... | Adds a custom action button to the <code>ToolbarLayout</code> if it is supported | addCustomActionButton | {
"repo_name": "Chilledheart/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarLayout.java",
"license": "bsd-3-clause",
"size": 20720
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 2,531,094 |
public Map<SeqVertex, Number> getFinishing() {
return _finishing;
} | Map<SeqVertex, Number> function() { return _finishing; } | /**
* return the finishing time for each vertex
* @return
*/ | return the finishing time for each vertex | getFinishing | {
"repo_name": "vipints/oqtans",
"path": "oqtans_tools/Trinity/r2013_08_14/Butterfly/src/src/My_DFS.java",
"license": "bsd-3-clause",
"size": 3115
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,149,602 |
void increaseFactHandleRecency(InternalFactHandle factHandle); | void increaseFactHandleRecency(InternalFactHandle factHandle); | /**
* Increases the recency of the FactHandle
*
* @param factHandle
* The fact handle to have its recency increased.
*/ | Increases the recency of the FactHandle | increaseFactHandleRecency | {
"repo_name": "manstis/drools",
"path": "drools-core/src/main/java/org/drools/core/spi/FactHandleFactory.java",
"license": "apache-2.0",
"size": 2502
} | [
"org.drools.core.common.InternalFactHandle"
] | import org.drools.core.common.InternalFactHandle; | import org.drools.core.common.*; | [
"org.drools.core"
] | org.drools.core; | 2,503,124 |
public void addPackageFromXml(final Reader reader) throws DroolsParserException,
IOException {
this.resource = new ReaderResource(reader, ResourceType.XDRL);
final XmlPackageReader xmlReader = new XmlPackageReader(this.configuration.getSemanticModules());
xmlReader.getParser().se... | void function(final Reader reader) throws DroolsParserException, IOException { this.resource = new ReaderResource(reader, ResourceType.XDRL); final XmlPackageReader xmlReader = new XmlPackageReader(this.configuration.getSemanticModules()); xmlReader.getParser().setClassLoader(this.rootClassLoader); try { xmlReader.read... | /**
* Load a rule package from XML source.
*
* @param reader
* @throws DroolsParserException
* @throws IOException
*/ | Load a rule package from XML source | addPackageFromXml | {
"repo_name": "lanceleverich/drools",
"path": "drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderImpl.java",
"license": "apache-2.0",
"size": 106040
} | [
"java.io.IOException",
"java.io.Reader",
"org.drools.compiler.compiler.DroolsParserException",
"org.drools.compiler.compiler.xml.XmlPackageReader",
"org.drools.core.io.impl.ReaderResource",
"org.kie.api.io.ResourceType",
"org.xml.sax.SAXException"
] | import java.io.IOException; import java.io.Reader; import org.drools.compiler.compiler.DroolsParserException; import org.drools.compiler.compiler.xml.XmlPackageReader; import org.drools.core.io.impl.ReaderResource; import org.kie.api.io.ResourceType; import org.xml.sax.SAXException; | import java.io.*; import org.drools.compiler.compiler.*; import org.drools.compiler.compiler.xml.*; import org.drools.core.io.impl.*; import org.kie.api.io.*; import org.xml.sax.*; | [
"java.io",
"org.drools.compiler",
"org.drools.core",
"org.kie.api",
"org.xml.sax"
] | java.io; org.drools.compiler; org.drools.core; org.kie.api; org.xml.sax; | 2,910,278 |
public void cleanRepositoryFiles(String basePath) {
Settings settings = internalCluster().getInstance(Settings.class);
Settings[] buckets = {
settings.getByPrefix("repositories.s3."),
settings.getByPrefix("repositories.s3.private-bucket."),
settings.ge... | void function(String basePath) { Settings settings = internalCluster().getInstance(Settings.class); Settings[] buckets = { settings.getByPrefix(STR), settings.getByPrefix(STR), settings.getByPrefix(STR), settings.getByPrefix(STR) }; for (Settings bucket : buckets) { String endpoint = bucket.get(STR, S3Repository.Reposi... | /**
* Deletes content of the repository files in the bucket
*/ | Deletes content of the repository files in the bucket | cleanRepositoryFiles | {
"repo_name": "cwurm/elasticsearch",
"path": "plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AbstractS3SnapshotRestoreTest.java",
"license": "apache-2.0",
"size": 28904
} | [
"com.amazonaws.Protocol",
"com.amazonaws.services.s3.AmazonS3",
"com.amazonaws.services.s3.model.DeleteObjectsRequest",
"com.amazonaws.services.s3.model.ObjectListing",
"com.amazonaws.services.s3.model.S3ObjectSummary",
"java.util.ArrayList",
"org.elasticsearch.cloud.aws.AwsS3Service",
"org.elasticsea... | import com.amazonaws.Protocol; import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.model.DeleteObjectsRequest; import com.amazonaws.services.s3.model.ObjectListing; import com.amazonaws.services.s3.model.S3ObjectSummary; import java.util.ArrayList; import org.elasticsearch.cloud.aws.AwsS3Service... | import com.amazonaws.*; import com.amazonaws.services.s3.*; import com.amazonaws.services.s3.model.*; import java.util.*; import org.elasticsearch.cloud.aws.*; import org.elasticsearch.common.settings.*; import org.hamcrest.*; | [
"com.amazonaws",
"com.amazonaws.services",
"java.util",
"org.elasticsearch.cloud",
"org.elasticsearch.common",
"org.hamcrest"
] | com.amazonaws; com.amazonaws.services; java.util; org.elasticsearch.cloud; org.elasticsearch.common; org.hamcrest; | 669,708 |
private void computeV_NoSkew( DMatrixRMaj h1, DMatrixRMaj h2, DMatrixRMaj v ) {
double h1x = h1.get(0, 0);
double h1y = h1.get(1, 0);
double h1z = h1.get(2, 0);
double h2x = h2.get(0, 0);
double h2y = h2.get(1, 0);
double h2z = h2.get(2, 0);
v.set(0, 0, h1x*h2x);
v.set(0, 1, h1y*h2y);
v.set(0, 2,... | void function( DMatrixRMaj h1, DMatrixRMaj h2, DMatrixRMaj v ) { double h1x = h1.get(0, 0); double h1y = h1.get(1, 0); double h1z = h1.get(2, 0); double h2x = h2.get(0, 0); double h2y = h2.get(1, 0); double h2z = h2.get(2, 0); v.set(0, 0, h1x*h2x); v.set(0, 1, h1y*h2y); v.set(0, 2, h1z*h2x + h1x*h2z); v.set(0, 3, h1z*h... | /**
* This computes the v_ij vector found in the paper. Leaving out components that would
* interact with B12, since that is known to be zero.
*/ | This computes the v_ij vector found in the paper. Leaving out components that would interact with B12, since that is known to be zero | computeV_NoSkew | {
"repo_name": "lessthanoptimal/BoofCV",
"path": "main/boofcv-geo/src/main/java/boofcv/alg/geo/calibration/Zhang99CalibrationMatrixFromHomographies.java",
"license": "apache-2.0",
"size": 10253
} | [
"org.ejml.data.DMatrixRMaj"
] | import org.ejml.data.DMatrixRMaj; | import org.ejml.data.*; | [
"org.ejml.data"
] | org.ejml.data; | 1,477,650 |
protected void fireIntervalRemoved(Object source, int index0, int index1) {
Object[] listeners = listenerList.getListenerList();
ListDataEvent e = null;
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ListDataListener.class) {
if (e == null) {
e = new ListDataEvent(source,... | void function(Object source, int index0, int index1) { Object[] listeners = listenerList.getListenerList(); ListDataEvent e = null; for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == ListDataListener.class) { if (e == null) { e = new ListDataEvent(source, ListDataEvent.INTERVAL_REMOVED, index0, in... | /**
* <code>AbstractListModel</code> subclasses must call this method
* <b>after</b> one or more elements are removed from the model.
* <code>index0</code> and <code>index1</code> are the end points of the
* interval that's been removed. Note that <code>index0</code> need not be
* less than or equal to <code>... | <code>AbstractListModel</code> subclasses must call this method after one or more elements are removed from the model. <code>index0</code> and <code>index1</code> are the end points of the interval that's been removed. Note that <code>index0</code> need not be less than or equal to <code>index1</code> | fireIntervalRemoved | {
"repo_name": "wangqi/gameserver",
"path": "admin/src/main/java/com/xinqihd/sns/gameserver/admin/model/MyTableModel.java",
"license": "apache-2.0",
"size": 10525
} | [
"javax.swing.event.ListDataEvent",
"javax.swing.event.ListDataListener"
] | import javax.swing.event.ListDataEvent; import javax.swing.event.ListDataListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 1,224,098 |
public void setType(int x, int z, int y, Material type) {
setType(x, z, y, type.getId());
} | void function(int x, int z, int y, Material type) { setType(x, z, y, type.getId()); } | /**
* Sets the type of a block within this chunk.
*
* @param x The X coordinate.
* @param z The Z coordinate.
* @param y The Y coordinate.
* @param type The type.
*/ | Sets the type of a block within this chunk | setType | {
"repo_name": "GlowstonePlusPlus/GlowstonePlusPlus",
"path": "src/main/java/net/glowstone/chunk/GlowChunk.java",
"license": "mit",
"size": 33016
} | [
"org.bukkit.Material"
] | import org.bukkit.Material; | import org.bukkit.*; | [
"org.bukkit"
] | org.bukkit; | 1,966,481 |
@Test
public void testGetGroupBySpecificId() throws Exception {
int domainId = 0;
String specificId = "3";
MockConnection connexion = factory.getMockConnection();
PreparedStatementResultSetHandler handler = connexion.getPreparedStatementResultSetHandler();
MockResultSet resultSet = handler.creat... | void function() throws Exception { int domainId = 0; String specificId = "3"; MockConnection connexion = factory.getMockConnection(); PreparedStatementResultSetHandler handler = connexion.getPreparedStatementResultSetHandler(); MockResultSet resultSet = handler.createResultSet(); resultSet.addColumn("id"); resultSet.ad... | /**
* Test of getGroupBySpecificId method, of class GroupTable.
*/ | Test of getGroupBySpecificId method, of class GroupTable | testGetGroupBySpecificId | {
"repo_name": "CecileBONIN/Silverpeas-Core",
"path": "lib-core/src/test/java/com/stratelia/webactiv/organization/GroupTableTest.java",
"license": "agpl-3.0",
"size": 29653
} | [
"com.mockrunner.jdbc.PreparedStatementResultSetHandler",
"com.mockrunner.mock.jdbc.MockConnection",
"com.mockrunner.mock.jdbc.MockResultSet",
"java.util.Arrays",
"java.util.List",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import com.mockrunner.jdbc.PreparedStatementResultSetHandler; import com.mockrunner.mock.jdbc.MockConnection; import com.mockrunner.mock.jdbc.MockResultSet; import java.util.Arrays; import java.util.List; import org.hamcrest.Matchers; import org.junit.Assert; | import com.mockrunner.jdbc.*; import com.mockrunner.mock.jdbc.*; import java.util.*; import org.hamcrest.*; import org.junit.*; | [
"com.mockrunner.jdbc",
"com.mockrunner.mock",
"java.util",
"org.hamcrest",
"org.junit"
] | com.mockrunner.jdbc; com.mockrunner.mock; java.util; org.hamcrest; org.junit; | 549,523 |
@Deployment(resources = { "org/activiti/engine/test/history/oneTaskProcess.bpmn20.xml" })
public void testQueryHistoricProcessInstanceIncludeBinaryVariable() throws Exception {
// Start process with a binary variable
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("one... | @Deployment(resources = { STR }) void function() throws Exception { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(STR, Collections.singletonMap(STR, (Object) STR.getBytes())); org.flowable.task.api.Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleRe... | /**
* Test confirming fix for ACT-1731
*/ | Test confirming fix for ACT-1731 | testQueryHistoricProcessInstanceIncludeBinaryVariable | {
"repo_name": "dbmalkovsky/flowable-engine",
"path": "modules/flowable5-test/src/test/java/org/activiti/standalone/history/FullHistoryTest.java",
"license": "apache-2.0",
"size": 84137
} | [
"java.util.Collections",
"org.flowable.engine.history.HistoricProcessInstance",
"org.flowable.engine.runtime.ProcessInstance",
"org.flowable.engine.test.Deployment"
] | import java.util.Collections; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.runtime.ProcessInstance; import org.flowable.engine.test.Deployment; | import java.util.*; import org.flowable.engine.history.*; import org.flowable.engine.runtime.*; import org.flowable.engine.test.*; | [
"java.util",
"org.flowable.engine"
] | java.util; org.flowable.engine; | 1,833,493 |
return new TimeSchedule(name, description, cronExpression);
}
/**
* Build a schedule based on data availability.
*
* @param name name of the schedule
* @param description description of the schedule
* @param source source of data the schedule is based on
* @param sourceName name of the source of ... | return new TimeSchedule(name, description, cronExpression); } /** * Build a schedule based on data availability. * * @param name name of the schedule * @param description description of the schedule * @param source source of data the schedule is based on * @param sourceName name of the source of data the schedule is ba... | /**
* Build a time-based schedule.
*
* @param name name of the schedule
* @param description description of the schedule
* @param cronExpression cron expression for the schedule
* @return a schedule based on the given {@code cronExpression}
* @deprecated As of version 3.3.0, replaced by {@link #bui... | Build a time-based schedule | createTimeSchedule | {
"repo_name": "chtyim/cdap",
"path": "cdap-api/src/main/java/co/cask/cdap/api/schedule/Schedules.java",
"license": "apache-2.0",
"size": 5717
} | [
"co.cask.cdap.internal.schedule.TimeSchedule"
] | import co.cask.cdap.internal.schedule.TimeSchedule; | import co.cask.cdap.internal.schedule.*; | [
"co.cask.cdap"
] | co.cask.cdap; | 2,806,901 |
public void saveAs(Deployment model, String pathToFile) throws FileNotFoundException {
failIfNotValid(model);
failIfNotValid(pathToFile);
final Codec codec = getCodec(Utils.getFileExtension(pathToFile));
codec.save(model, new FileOutputStream(pathToFile));
} | void function(Deployment model, String pathToFile) throws FileNotFoundException { failIfNotValid(model); failIfNotValid(pathToFile); final Codec codec = getCodec(Utils.getFileExtension(pathToFile)); codec.save(model, new FileOutputStream(pathToFile)); } | /**
* Save a model into a the given file, based on the extension of the file
*
* @param model the model to serialise
* @param pathToFile the path to the file
* @throws FileNotFoundException if the path is not valid on disc
*/ | Save a model into a the given file, based on the extension of the file | saveAs | {
"repo_name": "SINTEF-9012/cloudml",
"path": "codecs/library/src/main/java/org/cloudml/codecs/library/CodecsLibrary.java",
"license": "lgpl-3.0",
"size": 3782
} | [
"java.io.FileNotFoundException",
"java.io.FileOutputStream",
"org.cloudml.codecs.commons.Codec",
"org.cloudml.core.Deployment"
] | import java.io.FileNotFoundException; import java.io.FileOutputStream; import org.cloudml.codecs.commons.Codec; import org.cloudml.core.Deployment; | import java.io.*; import org.cloudml.codecs.commons.*; import org.cloudml.core.*; | [
"java.io",
"org.cloudml.codecs",
"org.cloudml.core"
] | java.io; org.cloudml.codecs; org.cloudml.core; | 2,280,493 |
public static ServerName getServerNameFromHLogDirectoryName(Path logFile) {
Path logDir = logFile.getParent();
String logDirName = logDir.getName();
if (logDirName.equals(HConstants.HREGION_LOGDIR_NAME)) {
logDir = logFile;
logDirName = logDir.getName();
}
ServerName serverName = null;... | static ServerName function(Path logFile) { Path logDir = logFile.getParent(); String logDirName = logDir.getName(); if (logDirName.equals(HConstants.HREGION_LOGDIR_NAME)) { logDir = logFile; logDirName = logDir.getName(); } ServerName serverName = null; if (logDirName.endsWith(HLog.SPLITTING_EXT)) { logDirName = logDir... | /**
* This function returns region server name from a log file name which is in either format:
* hdfs://<name node>/hbase/.logs/<server name>-splitting/... or hdfs://<name
* node>/hbase/.logs/<server name>/...
* @param logFile
* @return null if the passed in logFile isn't a valid HLog file path
*/ | This function returns region server name from a log file name which is in either format: hdfs:///hbase/.logs/-splitting/... or hdfs:///hbase/.logs//.. | getServerNameFromHLogDirectoryName | {
"repo_name": "cloud-software-foundation/c5",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLogUtil.java",
"license": "apache-2.0",
"size": 9650
} | [
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.HConstants",
"org.apache.hadoop.hbase.ServerName"
] | import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.ServerName; | import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 231,177 |
public static Registrar loadRequiredRegistrarCached(String registrarId) {
Optional<Registrar> registrar = loadByRegistrarIdCached(registrarId);
checkArgument(registrar.isPresent(), "couldn't find registrar '%s'", registrarId);
return registrar.get();
} | static Registrar function(String registrarId) { Optional<Registrar> registrar = loadByRegistrarIdCached(registrarId); checkArgument(registrar.isPresent(), STR, registrarId); return registrar.get(); } | /**
* Loads and returns a registrar entity by its id using an in-memory cache.
*
* <p>Throws if the registrar isn't found.
*/ | Loads and returns a registrar entity by its id using an in-memory cache. Throws if the registrar isn't found | loadRequiredRegistrarCached | {
"repo_name": "google/nomulus",
"path": "core/src/main/java/google/registry/model/registrar/Registrar.java",
"license": "apache-2.0",
"size": 40161
} | [
"com.google.common.base.Preconditions",
"java.util.Optional"
] | import com.google.common.base.Preconditions; import java.util.Optional; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 176,472 |
@Override
public Collection<String> getSharedGroupNames() {
HashSet<String> groupNames;
synchronized (sharedGroupMetaCache) {
groupNames = getSharedGroupsFromCache();
if (groupNames != null) {
return groupNames;
}
groupNames = new ... | Collection<String> function() { HashSet<String> groupNames; synchronized (sharedGroupMetaCache) { groupNames = getSharedGroupsFromCache(); if (groupNames != null) { return groupNames; } groupNames = new HashSet<>(); Connection con = null; PreparedStatement pstmt = null; ResultSet rs = null; try { con = DbConnectionMana... | /**
* Returns the name of the groups that are shared groups.
*
* @return the name of the groups that are shared groups.
*/ | Returns the name of the groups that are shared groups | getSharedGroupNames | {
"repo_name": "guusdk/Openfire",
"path": "xmppserver/src/main/java/org/jivesoftware/openfire/group/AbstractGroupProvider.java",
"license": "apache-2.0",
"size": 20789
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.Collection",
"java.util.HashSet",
"org.jivesoftware.database.DbConnectionManager"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; import java.util.HashSet; import org.jivesoftware.database.DbConnectionManager; | import java.sql.*; import java.util.*; import org.jivesoftware.database.*; | [
"java.sql",
"java.util",
"org.jivesoftware.database"
] | java.sql; java.util; org.jivesoftware.database; | 229,401 |
public int[] getHardwareVersion() {
int[] hardwareVersion = null;
if (null != mService) {
hardwareVersion = mService.getHardwareVersion();
}
Log.v(TAG, "getHardwareversion: " + Arrays.toString(hardwareVersion));
return hardwareVersion;
} | int[] function() { int[] hardwareVersion = null; if (null != mService) { hardwareVersion = mService.getHardwareVersion(); } Log.v(TAG, STR + Arrays.toString(hardwareVersion)); return hardwareVersion; } | /**
* get hardware version
* @return hardware version information array(0, ChipId; 1, EcoVersion; 2, PatchVersion; 3,
* DSPVersion)
*/ | get hardware version | getHardwareVersion | {
"repo_name": "darklord4822/android_device_smart_sprint4g",
"path": "mtk/FmRadio/src/com/mediatek/fmradio/FmRadioEmActivity.java",
"license": "gpl-2.0",
"size": 41167
} | [
"android.util.Log",
"java.util.Arrays"
] | import android.util.Log; import java.util.Arrays; | import android.util.*; import java.util.*; | [
"android.util",
"java.util"
] | android.util; java.util; | 2,426,777 |
public Duration getDefaultPollInterval() {
return this.defaultPollInterval;
}
private final BatchAccountsClient batchAccounts; | Duration function() { return this.defaultPollInterval; } private final BatchAccountsClient batchAccounts; | /**
* Gets The default poll interval for long-running operation.
*
* @return the defaultPollInterval value.
*/ | Gets The default poll interval for long-running operation | getDefaultPollInterval | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementImpl.java",
"license": "mit",
"size": 14369
} | [
"com.azure.resourcemanager.batch.fluent.BatchAccountsClient",
"java.time.Duration"
] | import com.azure.resourcemanager.batch.fluent.BatchAccountsClient; import java.time.Duration; | import com.azure.resourcemanager.batch.fluent.*; import java.time.*; | [
"com.azure.resourcemanager",
"java.time"
] | com.azure.resourcemanager; java.time; | 1,438,092 |
public StripingPolicy getStripingPolicy(); | StripingPolicy function(); | /**
* Returns the striping policy of the file. If the file is replicated, the striping policy of the first
* replica is returned.
*/ | Returns the striping policy of the file. If the file is replicated, the striping policy of the first replica is returned | getStripingPolicy | {
"repo_name": "stanik137/xtreemfs",
"path": "java/servers/src/org/xtreemfs/common/libxtreemfs/AdminFileHandle.java",
"license": "bsd-3-clause",
"size": 4212
} | [
"org.xtreemfs.pbrpc.generatedinterfaces.GlobalTypes"
] | import org.xtreemfs.pbrpc.generatedinterfaces.GlobalTypes; | import org.xtreemfs.pbrpc.generatedinterfaces.*; | [
"org.xtreemfs.pbrpc"
] | org.xtreemfs.pbrpc; | 2,639,164 |
@Override
public void focusGained(final FocusEvent e) {
final java.awt.Component c = e.getComponent();
if (c instanceof JTextField) {
final JTextField jt = (JTextField) c;
jt.setSelectionStart(0);
jt.setSelectionEnd(jt.getText().length());
}
}
| void function(final FocusEvent e) { final java.awt.Component c = e.getComponent(); if (c instanceof JTextField) { final JTextField jt = (JTextField) c; jt.setSelectionStart(0); jt.setSelectionEnd(jt.getText().length()); } } | /**
* Invoked when a component gains the keyboard focus.
*/ | Invoked when a component gains the keyboard focus | focusGained | {
"repo_name": "debrief/debrief",
"path": "org.mwc.cmap.legacy/src/MWC/GUI/Properties/Swing/SwingDatePropertyEditor.java",
"license": "epl-1.0",
"size": 8022
} | [
"java.awt.event.FocusEvent",
"javax.swing.JTextField"
] | import java.awt.event.FocusEvent; import javax.swing.JTextField; | import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,151,645 |
if (numComponents > sampleSize) {
throw new IllegalArgumentException("More components requested that the data's length.");
}
final int sampleCount = samples.length / sampleSize;
if (numComponents > sampleCount) {
throw new IllegalArgumentException("More data need... | if (numComponents > sampleSize) { throw new IllegalArgumentException(STR); } final int sampleCount = samples.length / sampleSize; if (numComponents > sampleCount) { throw new IllegalArgumentException(STR); } this.mean = new double[sampleSize]; this.numComponents = numComponents; DenseMatrix64F A = DenseMatrix64F.wrap(s... | /**
* Computes a basis (the principle components) from the most dominant eigenvectors.
*
* @param numComponents Number of vectors it will use to describe the data. Typically much
* smaller than the number of elements in the input vector.
*/ | Computes a basis (the principle components) from the most dominant eigenvectors | computeBasis | {
"repo_name": "bcdev/beam",
"path": "beam-cluster-analysis/src/main/java/org/esa/beam/cluster/PrincipleComponentAnalysis.java",
"license": "gpl-3.0",
"size": 7746
} | [
"org.ejml.data.DenseMatrix64F",
"org.ejml.factory.DecompositionFactory",
"org.ejml.factory.SingularValueDecomposition",
"org.ejml.ops.SingularOps"
] | import org.ejml.data.DenseMatrix64F; import org.ejml.factory.DecompositionFactory; import org.ejml.factory.SingularValueDecomposition; import org.ejml.ops.SingularOps; | import org.ejml.data.*; import org.ejml.factory.*; import org.ejml.ops.*; | [
"org.ejml.data",
"org.ejml.factory",
"org.ejml.ops"
] | org.ejml.data; org.ejml.factory; org.ejml.ops; | 158,443 |
public void print(long l) throws IOException {
if (writer != null) {
writer.write(String.valueOf(l));
} else {
write(String.valueOf(l));
}
} | void function(long l) throws IOException { if (writer != null) { writer.write(String.valueOf(l)); } else { write(String.valueOf(l)); } } | /**
* Print a long integer. The string produced by <code>{@link
* java.lang.String#valueOf(long)}</code> is translated into bytes
* according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the
* <code>{@link #write(int)}</code> method.
... | Print a long integer. The string produced by <code><code>java.lang.String#valueOf(long)</code></code> is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the <code><code>#write(int)</code></code> method | print | {
"repo_name": "TinyGroup/tiny",
"path": "web/org.tinygroup.jspengine/src/main/java/org/tinygroup/jspengine/runtime/BodyContentImpl.java",
"license": "gpl-3.0",
"size": 18143
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,242,739 |
public void setMulticastEventSocketAddress(InetSocketAddress multicastEventSocketAddress)
{
this.multicastEventSocketAddress = multicastEventSocketAddress;
} | void function(InetSocketAddress multicastEventSocketAddress) { this.multicastEventSocketAddress = multicastEventSocketAddress; } | /**
* Sets the multicastEventSocketAddress.
*
* @param multicastEventSocketAddress
* The new value for multicastEventSocketAddress
*/ | Sets the multicastEventSocketAddress | setMulticastEventSocketAddress | {
"repo_name": "fraunhoferfokus/fokus-upnp",
"path": "upnp-core/src/main/java/de/fraunhofer/fokus/upnp/core/control_point/CPService.java",
"license": "gpl-3.0",
"size": 34810
} | [
"java.net.InetSocketAddress"
] | import java.net.InetSocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 1,566,982 |
public void checkCaptcha(Player player, String message, ChatConfig cc, ChatData data, boolean isMainThread);
| void function(Player player, String message, ChatConfig cc, ChatData data, boolean isMainThread); | /**
* Check if the captcha has been entered correctly.
* Reset if correct, otherwise increase tries and execute actions if necessary.
* @param player
* @param message
* @param cc
* @param data
* @param isMainThread
*/ | Check if the captcha has been entered correctly. Reset if correct, otherwise increase tries and execute actions if necessary | checkCaptcha | {
"repo_name": "Samistine/NoCheatPlus",
"path": "NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/chat/ICaptcha.java",
"license": "gpl-3.0",
"size": 1889
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 2,265,126 |
public void registerClaim( String theClaimName, Type theType ) {
Preconditions.checkArgument( !Strings.isNullOrEmpty( theClaimName ), "need a claim name" );
Preconditions.checkNotNull( theType, "need type for claim '%s'", theClaimName );
Preconditions.checkArgument( !claimHandlers.containsKey( theClaimName ), ... | void function( String theClaimName, Type theType ) { Preconditions.checkArgument( !Strings.isNullOrEmpty( theClaimName ), STR ); Preconditions.checkNotNull( theType, STR, theClaimName ); Preconditions.checkArgument( !claimHandlers.containsKey( theClaimName ), STR, theClaimName ); _registerClaim( theClaimName, null, tra... | /**
* Registers a type for a particular claim (or header). This means that when this particular
* claim comes up it will use the translators associated with that type to convert to and from the json.
* @param theClaimName the name of the claim to associate with a type
* @param theType the type of the claim, wh... | Registers a type for a particular claim (or header). This means that when this particular claim comes up it will use the translators associated with that type to convert to and from the json | registerClaim | {
"repo_name": "Talvish/Tales",
"path": "product/security/src/com/talvish/tales/auth/jwt/TokenManager.java",
"license": "apache-2.0",
"size": 29493
} | [
"com.google.common.base.Preconditions",
"com.google.common.base.Strings",
"com.talvish.tales.parts.reflection.JavaType",
"java.lang.reflect.Type"
] | import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.talvish.tales.parts.reflection.JavaType; import java.lang.reflect.Type; | import com.google.common.base.*; import com.talvish.tales.parts.reflection.*; import java.lang.reflect.*; | [
"com.google.common",
"com.talvish.tales",
"java.lang"
] | com.google.common; com.talvish.tales; java.lang; | 1,901,738 |
public Long createForLoad(ConEstCon o, LogFile output) throws Exception {
// Obtenemos el valor del id autogenerado a insertar.
long id = 0;
if(getMigId() == -1){
id = this.getLastId(output.getPath(), output.getNameFile())+1;
// Id Preseteado (Inicialmente usado para la migracion de CdM)
// Arc... | Long function(ConEstCon o, LogFile output) throws Exception { long id = 0; if(getMigId() == -1){ id = this.getLastId(output.getPath(), output.getNameFile())+1; long idPreset = this.getLastId(output.getPath(), STR); if(id <= idPreset){ id = idPreset; } setMigId(id); }else{ id = getNextId(output.getPath(), output.getName... | /**
* Inserta una linea con los datos Historicos de Estado de Convenio para luego realizar un load desde Informix.
* (la linea se inserta en el archivo pasado como parametro a traves del LogFile)
* @param conEstCon, output - El ConEstCon a crear y el Archivo al que se le agrega la linea.
* @return long - El i... | Inserta una linea con los datos Historicos de Estado de Convenio para luego realizar un load desde Informix. (la linea se inserta en el archivo pasado como parametro a traves del LogFile) | createForLoad | {
"repo_name": "avdata99/SIAT",
"path": "siat-1.0-SOURCE/src/buss/src/ar/gov/rosario/siat/gde/buss/dao/ConEstConDAO.java",
"license": "gpl-3.0",
"size": 5029
} | [
"ar.gov.rosario.siat.gde.buss.bean.ConEstCon",
"coop.tecso.demoda.buss.helper.LogFile",
"coop.tecso.demoda.iface.helper.DateUtil",
"coop.tecso.demoda.iface.helper.DemodaUtil"
] | import ar.gov.rosario.siat.gde.buss.bean.ConEstCon; import coop.tecso.demoda.buss.helper.LogFile; import coop.tecso.demoda.iface.helper.DateUtil; import coop.tecso.demoda.iface.helper.DemodaUtil; | import ar.gov.rosario.siat.gde.buss.bean.*; import coop.tecso.demoda.buss.helper.*; import coop.tecso.demoda.iface.helper.*; | [
"ar.gov.rosario",
"coop.tecso.demoda"
] | ar.gov.rosario; coop.tecso.demoda; | 69,540 |
void closeConnection(Connection connection); | void closeConnection(Connection connection); | /**
* Dispose of a used {@link #getConnection() connection}.
*/ | Dispose of a used <code>#getConnection() connection</code> | closeConnection | {
"repo_name": "007slm/jodd",
"path": "jodd-db/src/main/java/jodd/db/connection/ConnectionProvider.java",
"license": "bsd-3-clause",
"size": 771
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,113,959 |
public static String prepareFailureReason(String columnName, DataType dataType) {
return "The value with column name " + columnName + " and column data type " + dataType
.getName() + " is not a valid " + dataType + " type.";
} | static String function(String columnName, DataType dataType) { return STR + columnName + STR + dataType .getName() + STR + dataType + STR; } | /**
* the method prepares and return the message mentioning the reason of badrecord
*
* @param columnName
* @param dataType
* @return
*/ | the method prepares and return the message mentioning the reason of badrecord | prepareFailureReason | {
"repo_name": "nehabhardwaj01/incubator-carbondata",
"path": "processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java",
"license": "apache-2.0",
"size": 24754
} | [
"org.apache.carbondata.core.metadata.datatype.DataType"
] | import org.apache.carbondata.core.metadata.datatype.DataType; | import org.apache.carbondata.core.metadata.datatype.*; | [
"org.apache.carbondata"
] | org.apache.carbondata; | 2,697,141 |
public void setRef(int parameterIndex, Ref x) throws SQLException {
throw Util.notSupported();
} | void function(int parameterIndex, Ref x) throws SQLException { throw Util.notSupported(); } | /**
* <!-- start generic documentation -->
* Sets the designated parameter to the given
* <code>REF(<structured-type>)</code> value.
* The driver converts this to an SQL <code>REF</code> value when it
* sends it to the database.
* <!-- end generic documentation -->
*
* <!-... | Sets the designated parameter to the given <code>REF(<structured-type>)</code> value. The driver converts this to an SQL <code>REF</code> value when it sends it to the database. HSQLDB-Specific Information: Including 1.9.0 HSQLDB does not support the SQL REF type. Calling this method throws an exception. | setRef | {
"repo_name": "kumarrus/voltdb",
"path": "src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCPreparedStatement.java",
"license": "agpl-3.0",
"size": 175900
} | [
"java.sql.Ref",
"java.sql.SQLException"
] | import java.sql.Ref; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,733,214 |
void unregisterForNeighboringInfo(Handler h); | void unregisterForNeighboringInfo(Handler h); | /**
* Unregisters for Neighboring cell info changed notification.
* Extraneous calls are tolerated silently
*/ | Unregisters for Neighboring cell info changed notification. Extraneous calls are tolerated silently | unregisterForNeighboringInfo | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "frameworks/opt/telephony/src/java/com/android/internal/telephony/Phone.java",
"license": "gpl-2.0",
"size": 87022
} | [
"android.os.Handler"
] | import android.os.Handler; | import android.os.*; | [
"android.os"
] | android.os; | 1,806,002 |
public BulkByScrollTask.Status getStatus() {
return getStatus(Arrays.asList(new BulkByScrollTask.StatusOrException[results.length()]));
} | BulkByScrollTask.Status function() { return getStatus(Arrays.asList(new BulkByScrollTask.StatusOrException[results.length()])); } | /**
* Get the combined statuses of sliced subtasks
*/ | Get the combined statuses of sliced subtasks | getStatus | {
"repo_name": "gfyoung/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/reindex/LeaderBulkByScrollTaskState.java",
"license": "apache-2.0",
"size": 5920
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 249,619 |
default void onPlaylistMetadataChanged(EventTime eventTime, MediaMetadata playlistMetadata) {} | default void onPlaylistMetadataChanged(EventTime eventTime, MediaMetadata playlistMetadata) {} | /**
* Called when the combined {@link MediaMetadata} changes.
*
* <p>The provided {@link MediaMetadata} is a combination of the {@link MediaItem#mediaMetadata}
* and the static and dynamic metadata from the {@link TrackSelection#getFormat(int) track
* selections' formats} and {@link MetadataOutput#onMeta... | Called when the combined <code>MediaMetadata</code> changes. The provided <code>MediaMetadata</code> is a combination of the <code>MediaItem#mediaMetadata</code> and the static and dynamic metadata from the <code>TrackSelection#getFormat(int) track selections' formats</code> and <code>MetadataOutput#onMetadata(Metadata... | onMediaMetadataChanged | {
"repo_name": "ened/ExoPlayer",
"path": "library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsListener.java",
"license": "apache-2.0",
"size": 49247
} | [
"com.google.android.exoplayer2.MediaMetadata"
] | import com.google.android.exoplayer2.MediaMetadata; | import com.google.android.exoplayer2.*; | [
"com.google.android"
] | com.google.android; | 1,625,328 |
protected void addThreadMetrics(Collection<Metric<?>> result) {
ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean();
result.add(new Metric<Long>("threads.peak", (long) threadMxBean
.getPeakThreadCount()));
result.add(new Metric<Long>("threads.daemon", (long) threadMxBean
.getDaemonThreadCou... | void function(Collection<Metric<?>> result) { ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean(); result.add(new Metric<Long>(STR, (long) threadMxBean .getPeakThreadCount())); result.add(new Metric<Long>(STR, (long) threadMxBean .getDaemonThreadCount())); result.add(new Metric<Long>(STR, (long) threadMxBea... | /**
* Add thread metrics.
*/ | Add thread metrics | addThreadMetrics | {
"repo_name": "10045125/spring-boot",
"path": "spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/SystemPublicMetrics.java",
"license": "apache-2.0",
"size": 4909
} | [
"java.lang.management.ManagementFactory",
"java.lang.management.ThreadMXBean",
"java.util.Collection",
"org.springframework.boot.actuate.metrics.Metric"
] | import java.lang.management.ManagementFactory; import java.lang.management.ThreadMXBean; import java.util.Collection; import org.springframework.boot.actuate.metrics.Metric; | import java.lang.management.*; import java.util.*; import org.springframework.boot.actuate.metrics.*; | [
"java.lang",
"java.util",
"org.springframework.boot"
] | java.lang; java.util; org.springframework.boot; | 1,628,209 |
private void setQuotaParameter() {
Quota quotaParameter = getParameters().getQuota();
quotaParameter.setId(Guid.NewGuid());
setStoragePoolId(quotaParameter.getStoragePoolId());
setQuotaName(quotaParameter.getQuotaName());
if (quotaParameter.getQuotaStorages() != null) {
... | void function() { Quota quotaParameter = getParameters().getQuota(); quotaParameter.setId(Guid.NewGuid()); setStoragePoolId(quotaParameter.getStoragePoolId()); setQuotaName(quotaParameter.getQuotaName()); if (quotaParameter.getQuotaStorages() != null) { for (QuotaStorage quotaStorage : quotaParameter.getQuotaStorages()... | /**
* Set quota from the parameter
*
* @param parameters
* @return
*/ | Set quota from the parameter | setQuotaParameter | {
"repo_name": "Dhandapani/gluster-ovirt",
"path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddQuotaCommand.java",
"license": "apache-2.0",
"size": 3047
} | [
"org.ovirt.engine.core.common.businessentities.Quota",
"org.ovirt.engine.core.common.businessentities.QuotaStorage",
"org.ovirt.engine.core.common.businessentities.QuotaVdsGroup",
"org.ovirt.engine.core.compat.Guid"
] | import org.ovirt.engine.core.common.businessentities.Quota; import org.ovirt.engine.core.common.businessentities.QuotaStorage; import org.ovirt.engine.core.common.businessentities.QuotaVdsGroup; import org.ovirt.engine.core.compat.Guid; | import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.compat.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 977,372 |
MaCourse getCourse(); | MaCourse getCourse(); | /**
* Get the MA course structure for the given course name. This defaults to "MobileAcademyCourse" name
* @return Course data object with the course name
*/ | Get the MA course structure for the given course name. This defaults to "MobileAcademyCourse" name | getCourse | {
"repo_name": "ngraczewski/mim",
"path": "mobile-academy/src/main/java/org/motechproject/nms/mobileacademy/service/MobileAcademyService.java",
"license": "bsd-3-clause",
"size": 1624
} | [
"org.motechproject.nms.mobileacademy.dto.MaCourse"
] | import org.motechproject.nms.mobileacademy.dto.MaCourse; | import org.motechproject.nms.mobileacademy.dto.*; | [
"org.motechproject.nms"
] | org.motechproject.nms; | 1,562,600 |
public static <T> LinkedHashSet<T> newLinkedHashSet() {
return new LinkedHashSet<>();
} | static <T> LinkedHashSet<T> function() { return new LinkedHashSet<>(); } | /**
* Creates a <em>mutable</em> {@code LinkedHashSet}.
*
* @param <T> the generic type of the {@code LinkedHashSet} to create.
* @return the created {@code LinkedHashSet}.
*/ | Creates a mutable LinkedHashSet | newLinkedHashSet | {
"repo_name": "ChrisA89/assertj-core",
"path": "src/main/java/org/assertj/core/util/Sets.java",
"license": "apache-2.0",
"size": 3430
} | [
"java.util.LinkedHashSet"
] | import java.util.LinkedHashSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,908,621 |
@WebMethod
@WebResult(partName = "return")
InstancePropertiesNames getInstanceRelationsNames(String id) throws OntologyErrorException;
| @WebResult(partName = STR) InstancePropertiesNames getInstanceRelationsNames(String id) throws OntologyErrorException; | /**
* Gets the relations defined for the object with the given ID.
*
* @param id not null object ID.
* @return {@link InstancePropertiesNames}.
* @throws OntologyErrorException if an error occurs in ontology back end
*/ | Gets the relations defined for the object with the given ID | getInstanceRelationsNames | {
"repo_name": "prowim/prowim",
"path": "prowim-data/src/org/prowim/services/ejb/commons/CommonRemote.java",
"license": "gpl-3.0",
"size": 14014
} | [
"javax.jws.WebResult",
"org.prowim.datamodel.editor.InstancePropertiesNames",
"org.prowim.jca.connector.algernon.OntologyErrorException"
] | import javax.jws.WebResult; import org.prowim.datamodel.editor.InstancePropertiesNames; import org.prowim.jca.connector.algernon.OntologyErrorException; | import javax.jws.*; import org.prowim.datamodel.editor.*; import org.prowim.jca.connector.algernon.*; | [
"javax.jws",
"org.prowim.datamodel",
"org.prowim.jca"
] | javax.jws; org.prowim.datamodel; org.prowim.jca; | 2,347,499 |
private static Locale loadLocale(final Preferences prefs) {
String lang = prefs.get("ui.lang", Locale.getDefault().getLanguage());
Locale locale = new Locale(lang);
Locale.setDefault(locale);
return locale;
}
/**
* Persists the current {@link Locale} to the given {@link... | static Locale function(final Preferences prefs) { String lang = prefs.get(STR, Locale.getDefault().getLanguage()); Locale locale = new Locale(lang); Locale.setDefault(locale); return locale; } /** * Persists the current {@link Locale} to the given {@link Preferences}. * * @param prefs * {@link Preferences} where saved ... | /**
* Returns the {@link Locale} according to the {@link Preferences} given in
* argument or the result of <code>Locale.getDefault()</code> if no
* configuration as been already saved.
*
* @param prefs
* {@link Preferences} node that contains the locale
* configu... | Returns the <code>Locale</code> according to the <code>Preferences</code> given in argument or the result of <code>Locale.getDefault()</code> if no configuration as been already saved | loadLocale | {
"repo_name": "Eliosoft/elios",
"path": "src/main/java/net/eliosoft/elios/main/Elios.java",
"license": "gpl-3.0",
"size": 17403
} | [
"java.util.Locale",
"java.util.prefs.Preferences",
"net.eliosoft.elios.gui.models.LocaleComboBoxModel"
] | import java.util.Locale; import java.util.prefs.Preferences; import net.eliosoft.elios.gui.models.LocaleComboBoxModel; | import java.util.*; import java.util.prefs.*; import net.eliosoft.elios.gui.models.*; | [
"java.util",
"net.eliosoft.elios"
] | java.util; net.eliosoft.elios; | 566,544 |
public ServiceFuture<NetworkSecurityGroupInner> getByResourceGroupAsync(String resourceGroupName, String networkSecurityGroupName, String expand, final ServiceCallback<NetworkSecurityGroupInner> serviceCallback) {
return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName... | ServiceFuture<NetworkSecurityGroupInner> function(String resourceGroupName, String networkSecurityGroupName, String expand, final ServiceCallback<NetworkSecurityGroupInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, expand... | /**
* Gets the specified network security group.
*
* @param resourceGroupName The name of the resource group.
* @param networkSecurityGroupName The name of the network security group.
* @param expand Expands referenced resources.
* @param serviceCallback the async ServiceCallback to handle... | Gets the specified network security group | getByResourceGroupAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/network/v2019_06_01/implementation/NetworkSecurityGroupsInner.java",
"license": "mit",
"size": 81333
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,612,234 |
protected void processResource(Row row)
{
Integer uniqueID = row.getInteger("RES_UID");
if (uniqueID != null && uniqueID.intValue() >= 0)
{
Resource resource = m_project.addResource();
resource.setAccrueAt(AccrueType.getInstance(row.getInt("RES_ACCRUE_AT")));
resource.... | void function(Row row) { Integer uniqueID = row.getInteger(STR); if (uniqueID != null && uniqueID.intValue() >= 0) { Resource resource = m_project.addResource(); resource.setAccrueAt(AccrueType.getInstance(row.getInt(STR))); resource.setActualCost(getDefaultOnNull(row.getCurrency(STR), NumberUtility.DOUBLE_ZERO)); reso... | /**
* Process a resource.
*
* @param row resource data
*/ | Process a resource | processResource | {
"repo_name": "tmyroadctfig/mpxj",
"path": "net/sf/mpxj/mpd/MPD9AbstractReader.java",
"license": "lgpl-2.1",
"size": 52048
} | [
"net.sf.mpxj.AccrueType",
"net.sf.mpxj.Duration",
"net.sf.mpxj.Rate",
"net.sf.mpxj.Resource",
"net.sf.mpxj.ResourceType",
"net.sf.mpxj.TimeUnit",
"net.sf.mpxj.WorkGroup",
"net.sf.mpxj.utility.NumberUtility"
] | import net.sf.mpxj.AccrueType; import net.sf.mpxj.Duration; import net.sf.mpxj.Rate; import net.sf.mpxj.Resource; import net.sf.mpxj.ResourceType; import net.sf.mpxj.TimeUnit; import net.sf.mpxj.WorkGroup; import net.sf.mpxj.utility.NumberUtility; | import net.sf.mpxj.*; import net.sf.mpxj.utility.*; | [
"net.sf.mpxj"
] | net.sf.mpxj; | 940,481 |
public DateTime sslCertExpiryDate() {
return this.sslCertExpiryDate;
} | DateTime function() { return this.sslCertExpiryDate; } | /**
* Get the PS SSL cert expiry date.
*
* @return the sslCertExpiryDate value
*/ | Get the PS SSL cert expiry date | sslCertExpiryDate | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/recoveryservices.siterecovery/mgmt-v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservices/siterecovery/v2018_01_10/ProcessServer.java",
"license": "mit",
"size": 18599
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,188,385 |
public ApplicationGatewayBackendHealthPool withBackendHttpSettingsCollection(
List<ApplicationGatewayBackendHealthHttpSettings> backendHttpSettingsCollection) {
this.backendHttpSettingsCollection = backendHttpSettingsCollection;
return this;
} | ApplicationGatewayBackendHealthPool function( List<ApplicationGatewayBackendHealthHttpSettings> backendHttpSettingsCollection) { this.backendHttpSettingsCollection = backendHttpSettingsCollection; return this; } | /**
* Set the backendHttpSettingsCollection property: List of ApplicationGatewayBackendHealthHttpSettings resources.
*
* @param backendHttpSettingsCollection the backendHttpSettingsCollection value to set.
* @return the ApplicationGatewayBackendHealthPool object itself.
*/ | Set the backendHttpSettingsCollection property: List of ApplicationGatewayBackendHealthHttpSettings resources | withBackendHttpSettingsCollection | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/ApplicationGatewayBackendHealthPool.java",
"license": "mit",
"size": 3212
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,484,688 |
T visitCaseHeadExpression(@NotNull CQLParser.CaseHeadExpressionContext ctx); | T visitCaseHeadExpression(@NotNull CQLParser.CaseHeadExpressionContext ctx); | /**
* Visit a parse tree produced by {@link CQLParser#caseHeadExpression}.
*/ | Visit a parse tree produced by <code>CQLParser#caseHeadExpression</code> | visitCaseHeadExpression | {
"repo_name": "HuaweiBigData/StreamCQL",
"path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserVisitor.java",
"license": "apache-2.0",
"size": 29279
} | [
"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; | 2,161,059 |
public static boolean getBoolean(String jsonData, String key, Boolean defaultValue) {
if (StringUtils.isEmpty(jsonData)) {
return defaultValue;
}
try {
JSONObject jsonObject = new JSONObject(jsonData);
return getBoolean(jsonObject, key, defaultValue);
... | static boolean function(String jsonData, String key, Boolean defaultValue) { if (StringUtils.isEmpty(jsonData)) { return defaultValue; } try { JSONObject jsonObject = new JSONObject(jsonData); return getBoolean(jsonObject, key, defaultValue); } catch (JSONException e) { if (isPrintException) { e.printStackTrace(); } re... | /**
* get Boolean from jsonData
*
* @param jsonData
* @param key
* @param defaultValue
* @return <ul>
* <li>if jsonObject is null, return defaultValue</li>
* <li>if jsonData {@link JSONObject#JSONObject(String)} exception, return defaultValue</li>
* ... | get Boolean from jsonData | getBoolean | {
"repo_name": "hucaihua/cmssp",
"path": "client/ox/src/main/java/com/ox/utils/JSONUtils.java",
"license": "mit",
"size": 26606
} | [
"org.json.JSONException",
"org.json.JSONObject"
] | import org.json.JSONException; import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 1,518,215 |
@Override
public void createIndex(ClusterName targetCluster, IndexMetadata indexMetadata)
throws ConnectorException {
throw new UnsupportedException("Operation not supported");
} | void function(ClusterName targetCluster, IndexMetadata indexMetadata) throws ConnectorException { throw new UnsupportedException(STR); } | /**
* Create an INDEX in the underlying datastore.
*
* @param targetCluster Target cluster.
* @param indexMetadata The index.
* @throws com.stratio.crossdata.common.exceptions.ConnectorException Use UnsupportedException If the required set of operations are not
* ... | Create an INDEX in the underlying datastore | createIndex | {
"repo_name": "pfcoperez/crossdata",
"path": "crossdata-connector-twitter/src/main/java/com/stratio/connector/twitter/TwitterMetadataEngine.java",
"license": "apache-2.0",
"size": 11069
} | [
"com.stratio.crossdata.common.data.ClusterName",
"com.stratio.crossdata.common.exceptions.ConnectorException",
"com.stratio.crossdata.common.exceptions.UnsupportedException",
"com.stratio.crossdata.common.metadata.IndexMetadata"
] | import com.stratio.crossdata.common.data.ClusterName; import com.stratio.crossdata.common.exceptions.ConnectorException; import com.stratio.crossdata.common.exceptions.UnsupportedException; import com.stratio.crossdata.common.metadata.IndexMetadata; | import com.stratio.crossdata.common.data.*; import com.stratio.crossdata.common.exceptions.*; import com.stratio.crossdata.common.metadata.*; | [
"com.stratio.crossdata"
] | com.stratio.crossdata; | 1,057,287 |
private void showExitConfirmationDialog() {
// Hide the keyboard to ensure better/smoother transitioning when closing
hideKeyboard() ;
// Build the dialog
AlertDialog.Builder builder = new AlertDialog.Builder(this) ;
builder.setPositiveButton(R.string.dialog_save, this)
... | void function() { hideKeyboard() ; AlertDialog.Builder builder = new AlertDialog.Builder(this) ; builder.setPositiveButton(R.string.dialog_save, this) .setNegativeButton(R.string.dialog_dont_save, this) .setNeutralButton(R.string.dialog_keep_editing, this) .setTitle(R.string.dialog_save_rules_title) .show(); } | /**
* Shows an alert dialog warning that going back will not save the rules. Offers option to save,
* quit without saving, or keep editing. Sets 'this' as the onClickListeners for the buttons.
*/ | Shows an alert dialog warning that going back will not save the rules. Offers option to save, quit without saving, or keep editing. Sets 'this' as the onClickListeners for the buttons | showExitConfirmationDialog | {
"repo_name": "Thonners/PubGolf",
"path": "app/src/main/java/com/thonners/pubgolf/RulesEditorActivity.java",
"license": "gpl-3.0",
"size": 7909
} | [
"android.support.v7.app.AlertDialog"
] | import android.support.v7.app.AlertDialog; | import android.support.v7.app.*; | [
"android.support"
] | android.support; | 596,636 |
@Adjacency(label = APPLICATION_REPORT_INDEX_TO_PROJECT_MODEL, direction = Direction.OUT)
List<ProjectModel> getProjectModels(); | @Adjacency(label = APPLICATION_REPORT_INDEX_TO_PROJECT_MODEL, direction = Direction.OUT) List<ProjectModel> getProjectModels(); | /**
* Associates a Set of ProjectModels with this index. This allows us to get from any Project Model to the associated
* index.
*
* NOTE: This should generally include the projectmodel and all child projects (flattened) to make searching easier.
*/ | Associates a Set of ProjectModels with this index. This allows us to get from any Project Model to the associated index | getProjectModels | {
"repo_name": "johnsteele/windup",
"path": "reporting/api/src/main/java/org/jboss/windup/reporting/model/ApplicationReportIndexModel.java",
"license": "epl-1.0",
"size": 3109
} | [
"java.util.List",
"org.apache.tinkerpop.gremlin.structure.Direction",
"org.jboss.windup.graph.Adjacency",
"org.jboss.windup.graph.model.ProjectModel"
] | import java.util.List; import org.apache.tinkerpop.gremlin.structure.Direction; import org.jboss.windup.graph.Adjacency; import org.jboss.windup.graph.model.ProjectModel; | import java.util.*; import org.apache.tinkerpop.gremlin.structure.*; import org.jboss.windup.graph.*; import org.jboss.windup.graph.model.*; | [
"java.util",
"org.apache.tinkerpop",
"org.jboss.windup"
] | java.util; org.apache.tinkerpop; org.jboss.windup; | 1,789,163 |
public IndexRequest source(Map source) throws ElasticsearchGenerationException {
return source(source, Requests.INDEX_CONTENT_TYPE);
} | IndexRequest function(Map source) throws ElasticsearchGenerationException { return source(source, Requests.INDEX_CONTENT_TYPE); } | /**
* Index the Map in {@link Requests#INDEX_CONTENT_TYPE} format
*
* @param source The map to index
*/ | Index the Map in <code>Requests#INDEX_CONTENT_TYPE</code> format | source | {
"repo_name": "strapdata/elassandra5-rc",
"path": "core/src/main/java/org/elasticsearch/action/index/IndexRequest.java",
"license": "apache-2.0",
"size": 25743
} | [
"java.util.Map",
"org.elasticsearch.ElasticsearchGenerationException",
"org.elasticsearch.client.Requests"
] | import java.util.Map; import org.elasticsearch.ElasticsearchGenerationException; import org.elasticsearch.client.Requests; | import java.util.*; import org.elasticsearch.*; import org.elasticsearch.client.*; | [
"java.util",
"org.elasticsearch",
"org.elasticsearch.client"
] | java.util; org.elasticsearch; org.elasticsearch.client; | 1,111,494 |
@Test
public void testIsExpressionResultUsed() {
assertThat(NodeUtil.isExpressionResultUsed(getNameNodeFrom("for (x in y) z", "x"))).isTrue();
assertThat(NodeUtil.isExpressionResultUsed(getNameNodeFrom("for (x in y) z", "y"))).isTrue();
assertThat(NodeUtil.isExpressionResultUsed(getNameNodeFrom("for (x ... | void function() { assertThat(NodeUtil.isExpressionResultUsed(getNameNodeFrom(STR, "x"))).isTrue(); assertThat(NodeUtil.isExpressionResultUsed(getNameNodeFrom(STR, "y"))).isTrue(); assertThat(NodeUtil.isExpressionResultUsed(getNameNodeFrom(STR, "z"))).isFalse(); assertThat(NodeUtil.isExpressionResultUsed(getNameNodeFrom... | /**
* When the left side is a destructuring pattern, generally it's not possible to identify the RHS
* for a specific name on the LHS.
*/ | When the left side is a destructuring pattern, generally it's not possible to identify the RHS for a specific name on the LHS | testIsExpressionResultUsed | {
"repo_name": "tiobe/closure-compiler",
"path": "test/com/google/javascript/jscomp/NodeUtilTest.java",
"license": "apache-2.0",
"size": 165286
} | [
"com.google.common.truth.Truth"
] | import com.google.common.truth.Truth; | import com.google.common.truth.*; | [
"com.google.common"
] | com.google.common; | 1,692,297 |
public Iterator<GlPendingTransaction> getUnextractedTransactions(); | Iterator<GlPendingTransaction> function(); | /**
* Get all of the GL transactions where the extract flag is null
*
* @return Iterator of all the transactions
*/ | Get all of the GL transactions where the extract flag is null | getUnextractedTransactions | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-core/src/main/java/org/kuali/kfs/pdp/dataaccess/PendingTransactionDao.java",
"license": "agpl-3.0",
"size": 1435
} | [
"java.util.Iterator",
"org.kuali.kfs.pdp.businessobject.GlPendingTransaction"
] | import java.util.Iterator; import org.kuali.kfs.pdp.businessobject.GlPendingTransaction; | import java.util.*; import org.kuali.kfs.pdp.businessobject.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 2,294,459 |
public DocumentFilterFactory getDocumentFilterFactory() {
return documentFilterFactory;
} | DocumentFilterFactory function() { return documentFilterFactory; } | /**
* Returns a connector's {@link DocumentFilterFactory}. Connectors may define
* a document filter specific to that connector instance. This filter will
* be used in conjuction with the Connector Manager's document filter, and
* will act as the source for the Connector Manager's document filter.
*
... | Returns a connector's <code>DocumentFilterFactory</code>. Connectors may define a document filter specific to that connector instance. This filter will be used in conjuction with the Connector Manager's document filter, and will act as the source for the Connector Manager's document filter | getDocumentFilterFactory | {
"repo_name": "googlegsa/manager.v3",
"path": "projects/connector-manager/source/java/com/google/enterprise/connector/instantiator/InstanceInfo.java",
"license": "apache-2.0",
"size": 19662
} | [
"com.google.enterprise.connector.util.filter.DocumentFilterFactory"
] | import com.google.enterprise.connector.util.filter.DocumentFilterFactory; | import com.google.enterprise.connector.util.filter.*; | [
"com.google.enterprise"
] | com.google.enterprise; | 1,808,682 |
public final TypeToken<? super T> getSupertype(Class<? super T> superclass) {
checkArgument(superclass.isAssignableFrom(getRawType()),
"%s is not a super class of %s", superclass, this);
if (runtimeType instanceof TypeVariable) {
return getSupertypeFromUpperBounds(superclass, ((TypeVariable<?>) ... | final TypeToken<? super T> function(Class<? super T> superclass) { checkArgument(superclass.isAssignableFrom(getRawType()), STR, superclass, this); if (runtimeType instanceof TypeVariable) { return getSupertypeFromUpperBounds(superclass, ((TypeVariable<?>) runtimeType).getBounds()); } if (runtimeType instanceof Wildcar... | /**
* Returns the generic form of {@code superclass}. For example, if this is
* {@code ArrayList<String>}, {@code Iterable<String>} is returned given the
* input {@code Iterable.class}.
*/ | Returns the generic form of superclass. For example, if this is ArrayList, Iterable is returned given the input Iterable.class | getSupertype | {
"repo_name": "diffplug/TestRepo_1.3.0",
"path": "guava_excerpt/reflect/TypeToken.java",
"license": "apache-2.0",
"size": 43153
} | [
"com.google.common.base.Preconditions",
"java.lang.reflect.TypeVariable",
"java.lang.reflect.WildcardType"
] | import com.google.common.base.Preconditions; import java.lang.reflect.TypeVariable; import java.lang.reflect.WildcardType; | import com.google.common.base.*; import java.lang.reflect.*; | [
"com.google.common",
"java.lang"
] | com.google.common; java.lang; | 137,540 |
EList<PerformsType> getPerforms(); | EList<PerformsType> getPerforms(); | /**
* Returns the value of the '<em><b>Performs</b></em>' containment reference list.
* The list contents are of type {@link org.ebxml.business.process.PerformsType}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Performs</em>' containment reference list isn't clear,
* there really should be ... | Returns the value of the 'Performs' containment reference list. The list contents are of type <code>org.ebxml.business.process.PerformsType</code>. If the meaning of the 'Performs' containment reference list isn't clear, there really should be more of a description here... | getPerforms | {
"repo_name": "GRA-UML/tool",
"path": "plugins/org.ijis.gra.ebxml.ebBPSS/src/main/java/org/ebxml/business/process/BusinessPartnerRoleType.java",
"license": "epl-1.0",
"size": 5232
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,149,476 |
@Test
public void testToECRFInVO() {
Assert.fail("Test 'ECRFDaoTransformTest.testToECRFInVO' not implemented!");
} | void function() { Assert.fail(STR); } | /**
* Test for method ECRFDao.toECRFInVO
*
* @see org.phoenixctms.ctsms.domain.ECRFDao#toECRFInVO(org.phoenixctms.ctsms.domain.ECRF source, org.phoenixctms.ctsms.vo.ECRFInVO target)
*/ | Test for method ECRFDao.toECRFInVO | testToECRFInVO | {
"repo_name": "phoenixctms/ctsms",
"path": "core/src/test/java/org/phoenixctms/ctsms/domain/test/ECRFDaoTransformTest.java",
"license": "lgpl-2.1",
"size": 1839
} | [
"org.testng.Assert"
] | import org.testng.Assert; | import org.testng.*; | [
"org.testng"
] | org.testng; | 1,585,633 |
public Stroke getDomainCrosshairStroke() {
return this.domainCrosshairStroke;
}
| Stroke function() { return this.domainCrosshairStroke; } | /**
* Returns the Stroke used to draw the crosshair (if visible).
*
* @return The crosshair stroke.
*/ | Returns the Stroke used to draw the crosshair (if visible) | getDomainCrosshairStroke | {
"repo_name": "sternze/CurrentTopics_JFreeChart",
"path": "source/org/jfree/chart/plot/ContourPlot.java",
"license": "lgpl-2.1",
"size": 61604
} | [
"java.awt.Stroke"
] | import java.awt.Stroke; | import java.awt.*; | [
"java.awt"
] | java.awt; | 276,997 |
public synchronized Async<List<String>> startNodesAsync(final Settings... settings) {
List<Async<String>> asyncs = new ArrayList<>();
for (Settings setting : settings) {
asyncs.add(startNodeAsync(setting, Version.CURRENT));
}
return () -> {
List<String> ids = ... | synchronized Async<List<String>> function(final Settings... settings) { List<Async<String>> asyncs = new ArrayList<>(); for (Settings setting : settings) { asyncs.add(startNodeAsync(setting, Version.CURRENT)); } return () -> { List<String> ids = new ArrayList<>(); for (Async<String> async : asyncs) { ids.add(async.get(... | /**
* Starts multiple nodes (based on the number of settings provided) in an async manner, with explicit settings for each node.
* The order of the node names returned matches the order of the settings provided.
*/ | Starts multiple nodes (based on the number of settings provided) in an async manner, with explicit settings for each node. The order of the node names returned matches the order of the settings provided | startNodesAsync | {
"repo_name": "xuzha/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java",
"license": "apache-2.0",
"size": 81644
} | [
"java.util.ArrayList",
"java.util.List",
"org.elasticsearch.Version",
"org.elasticsearch.common.settings.Settings"
] | import java.util.ArrayList; import java.util.List; import org.elasticsearch.Version; import org.elasticsearch.common.settings.Settings; | import java.util.*; import org.elasticsearch.*; import org.elasticsearch.common.settings.*; | [
"java.util",
"org.elasticsearch",
"org.elasticsearch.common"
] | java.util; org.elasticsearch; org.elasticsearch.common; | 2,660,211 |
@OnClick(R.id.tv_make_a_transfer)
void transfer() {
if (status.getActive()) {
((BaseActivity) getActivity()).replaceFragment(SavingsMakeTransferFragment
.newInstance(savingsId, Constants.TRANSFER_PAY_FROM), true, R.id.container);
} else {
Toaster.show(... | @OnClick(R.id.tv_make_a_transfer) void transfer() { if (status.getActive()) { ((BaseActivity) getActivity()).replaceFragment(SavingsMakeTransferFragment .newInstance(savingsId, Constants.TRANSFER_PAY_FROM), true, R.id.container); } else { Toaster.show(rootView, getString(R.string.account_not_active_to_perform_transfer)... | /**
* Opens {@link SavingsMakeTransferFragment} if status is ACTIVE else shows a
* {@link Snackbar} that Account should be Active
*/ | Opens <code>SavingsMakeTransferFragment</code> if status is ACTIVE else shows a <code>Snackbar</code> that Account should be Active | transfer | {
"repo_name": "openMF/self-service-app",
"path": "app/src/main/java/org/mifos/mobile/ui/fragments/SavingAccountsDetailFragment.java",
"license": "mpl-2.0",
"size": 15551
} | [
"org.mifos.mobile.ui.activities.base.BaseActivity",
"org.mifos.mobile.utils.Constants",
"org.mifos.mobile.utils.Toaster"
] | import org.mifos.mobile.ui.activities.base.BaseActivity; import org.mifos.mobile.utils.Constants; import org.mifos.mobile.utils.Toaster; | import org.mifos.mobile.ui.activities.base.*; import org.mifos.mobile.utils.*; | [
"org.mifos.mobile"
] | org.mifos.mobile; | 1,947,430 |
public String getString(String key, Object[] args) {
String value = getString(key);
return MessageFormat.format(value, args);
} | String function(String key, Object[] args) { String value = getString(key); return MessageFormat.format(value, args); } | /**
* Gets the String associated with <code>key</code> after having resolved
* any nested keys ({@link #resolve(String)}) and applied a formatter using
* the given <code>args</code>.
*
* @param key the key to lookup
* @param args the arguments to pass to the formatter
* @return the St... | Gets the String associated with <code>key</code> after having resolved any nested keys (<code>#resolve(String)</code>) and applied a formatter using the given <code>args</code> | getString | {
"repo_name": "ZenHarbinger/l2fprod-properties-editor",
"path": "src/main/java/com/l2fprod/common/util/ResourceManager.java",
"license": "apache-2.0",
"size": 6570
} | [
"java.text.MessageFormat"
] | import java.text.MessageFormat; | import java.text.*; | [
"java.text"
] | java.text; | 2,028,918 |
protected final static FileInfo unpackQueryAllInfo(DataBuffer buf, boolean uni) {
// Get the file create/access/write/change times, in 64bit NT format
long createTime = buf.getLong();
long accessTime = buf.getLong();
long writeTime = buf.getLong();
long changeTime = buf.getLong();
// Get the file attr... | final static FileInfo function(DataBuffer buf, boolean uni) { long createTime = buf.getLong(); long accessTime = buf.getLong(); long writeTime = buf.getLong(); long changeTime = buf.getLong(); int attr = buf.getInt(); buf.skipBytes(4); long allocSize = buf.getLong(); long fileSize = buf.getLong(); boolean delPending = ... | /**
* Unpack the full file information (FileInfoLevel.PathFileAllInfo, 0x107)
*
* @param buf DataBuffer
* @param uni boolean
* @return FileInfo
*/ | Unpack the full file information (FileInfoLevel.PathFileAllInfo, 0x107) | unpackQueryAllInfo | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/client/FileInfoPacker.java",
"license": "lgpl-3.0",
"size": 13306
} | [
"org.alfresco.jlan.client.info.ExtendedFileInfo",
"org.alfresco.jlan.client.info.FileInfo",
"org.alfresco.jlan.smb.NTTime",
"org.alfresco.jlan.smb.SMBDate",
"org.alfresco.jlan.util.DataBuffer"
] | import org.alfresco.jlan.client.info.ExtendedFileInfo; import org.alfresco.jlan.client.info.FileInfo; import org.alfresco.jlan.smb.NTTime; import org.alfresco.jlan.smb.SMBDate; import org.alfresco.jlan.util.DataBuffer; | import org.alfresco.jlan.client.info.*; import org.alfresco.jlan.smb.*; import org.alfresco.jlan.util.*; | [
"org.alfresco.jlan"
] | org.alfresco.jlan; | 1,552,226 |
@BeanProperty(bound = false)
public AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
accessibleContext = new AccessibleJSpinner();
}
return accessibleContext;
}
protected class AccessibleJSpinner extends AccessibleJComponent
im... | @BeanProperty(bound = false) AccessibleContext function() { if (accessibleContext == null) { accessibleContext = new AccessibleJSpinner(); } return accessibleContext; } protected class AccessibleJSpinner extends AccessibleJComponent implements AccessibleValue, AccessibleAction, AccessibleText, AccessibleEditableText, C... | /**
* Gets the <code>AccessibleContext</code> for the <code>JSpinner</code>
*
* @return the <code>AccessibleContext</code> for the <code>JSpinner</code>
* @since 1.5
*/ | Gets the <code>AccessibleContext</code> for the <code>JSpinner</code> | getAccessibleContext | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/JSpinner.java",
"license": "apache-2.0",
"size": 77832
} | [
"java.beans.BeanProperty",
"javax.accessibility.AccessibleAction",
"javax.accessibility.AccessibleContext",
"javax.accessibility.AccessibleEditableText",
"javax.accessibility.AccessibleText",
"javax.accessibility.AccessibleValue",
"javax.swing.event.ChangeListener"
] | import java.beans.BeanProperty; import javax.accessibility.AccessibleAction; import javax.accessibility.AccessibleContext; import javax.accessibility.AccessibleEditableText; import javax.accessibility.AccessibleText; import javax.accessibility.AccessibleValue; import javax.swing.event.ChangeListener; | import java.beans.*; import javax.accessibility.*; import javax.swing.event.*; | [
"java.beans",
"javax.accessibility",
"javax.swing"
] | java.beans; javax.accessibility; javax.swing; | 2,812,378 |
public Object call(List arguments, ExpressionContext context)
{
String name = asString(getArg(arguments, 0));
if (name == null) return null;
List pairs = new ArrayList();
Iterator i = collapseLists(arguments, 1).iterator();
String path, dataName;
while (i.hasNext... | Object function(List arguments, ExpressionContext context) { String name = asString(getArg(arguments, 0)); if (name == null) return null; List pairs = new ArrayList(); Iterator i = collapseLists(arguments, 1).iterator(); String path, dataName; while (i.hasNext()) { path = asStringVal(i.next()); if (path == null) contin... | /** Perform a procedure call.
*
* This method <b>must</b> be thread-safe.
*/ | Perform a procedure call. This method must be thread-safe | call | {
"repo_name": "superzadeh/processdash",
"path": "src/net/sourceforge/processdash/data/compiler/function/Sort.java",
"license": "gpl-3.0",
"size": 2845
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.Iterator",
"java.util.List",
"net.sourceforge.processdash.data.ListData",
"net.sourceforge.processdash.data.SimpleData",
"net.sourceforge.processdash.data.compiler.ExpressionContext",
"net.sourceforge.processdash.data.repository.DataRepository"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; import net.sourceforge.processdash.data.ListData; import net.sourceforge.processdash.data.SimpleData; import net.sourceforge.processdash.data.compiler.ExpressionContext; import net.sourceforge.processdash.data.reposit... | import java.util.*; import net.sourceforge.processdash.data.*; import net.sourceforge.processdash.data.compiler.*; import net.sourceforge.processdash.data.repository.*; | [
"java.util",
"net.sourceforge.processdash"
] | java.util; net.sourceforge.processdash; | 1,821,324 |
static Multimap<String, Method> getPropertyNamesToGetters(Iterable<Method> methods) {
Multimap<String, Method> propertyNamesToGetters = HashMultimap.create();
for (Method method : methods) {
String methodName = method.getName();
if ((!methodName.startsWith("get") && !methodName.startsWith("is"))
... | static Multimap<String, Method> getPropertyNamesToGetters(Iterable<Method> methods) { Multimap<String, Method> propertyNamesToGetters = HashMultimap.create(); for (Method method : methods) { String methodName = method.getName(); if ((!methodName.startsWith("get") && !methodName.startsWith("is")) method.getParameterType... | /**
* Extract pipeline options and their respective getter methods from a series of {@link Method
* methods}. A single pipeline option may appear in many methods.
*
* @return A mapping of option name to the input methods which declare it.
*/ | Extract pipeline options and their respective getter methods from a series of <code>Method methods</code>. A single pipeline option may appear in many methods | getPropertyNamesToGetters | {
"repo_name": "mxm/incubator-beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsReflector.java",
"license": "apache-2.0",
"size": 4252
} | [
"com.google.common.collect.HashMultimap",
"com.google.common.collect.Multimap",
"java.beans.Introspector",
"java.lang.reflect.Method"
] | import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import java.beans.Introspector; import java.lang.reflect.Method; | import com.google.common.collect.*; import java.beans.*; import java.lang.reflect.*; | [
"com.google.common",
"java.beans",
"java.lang"
] | com.google.common; java.beans; java.lang; | 1,775,617 |
@Override public void exitReturnRule(@NotNull PJParser.ReturnRuleContext ctx) { } | @Override public void exitReturnRule(@NotNull PJParser.ReturnRuleContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterReturnRule | {
"repo_name": "Diolor/PJ",
"path": "src/main/java/com/lorentzos/pj/PJBaseListener.java",
"license": "mit",
"size": 73292
} | [
"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; | 782,553 |
DenovoResult pepNovoFile = new DenovoResult(file);
BufferedReader reader = null;
DenovoEntry entry = null;
boolean flag = false;
List<DenovoEntry> entryList = new ArrayList<DenovoEntry>();
List<DenovoHit> predictionList = null;
int specNumber = 1;
... | DenovoResult pepNovoFile = new DenovoResult(file); BufferedReader reader = null; DenovoEntry entry = null; boolean flag = false; List<DenovoEntry> entryList = new ArrayList<DenovoEntry>(); List<DenovoHit> predictionList = null; int specNumber = 1; try { reader = new BufferedReader(new FileReader(file)); String nextLine... | /**
* Reads the PepNovo output file and returns a PepNovoFile object.
*
* @param file
* @return pepNovoFile PepNovoFile object
*/ | Reads the PepNovo output file and returns a PepNovoFile object | read | {
"repo_name": "tectronics/tag-db",
"path": "src/main/java/tagdb/denovo/DenovoParser.java",
"license": "apache-2.0",
"size": 4248
} | [
"java.io.BufferedReader",
"java.io.FileNotFoundException",
"java.io.FileReader",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List"
] | import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,109,081 |
public void testMustRewrite() throws IOException {
QueryShardContext context = createShardContext();
context.setAllowUnmappedFields(true);
QB queryBuilder = createTestQueryBuilder();
queryBuilder.toQuery(context);
} | void function() throws IOException { QueryShardContext context = createShardContext(); context.setAllowUnmappedFields(true); QB queryBuilder = createTestQueryBuilder(); queryBuilder.toQuery(context); } | /**
* This test ensures that queries that need to be rewritten have dedicated tests.
* These queries must override this method accordingly.
*/ | This test ensures that queries that need to be rewritten have dedicated tests. These queries must override this method accordingly | testMustRewrite | {
"repo_name": "alexshadow007/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/AbstractQueryTestCase.java",
"license": "apache-2.0",
"size": 52510
} | [
"java.io.IOException",
"org.elasticsearch.index.query.QueryShardContext"
] | import java.io.IOException; import org.elasticsearch.index.query.QueryShardContext; | import java.io.*; import org.elasticsearch.index.query.*; | [
"java.io",
"org.elasticsearch.index"
] | java.io; org.elasticsearch.index; | 2,736,494 |
@Test(groups = "ticket:3119")
public void testDeleteImageInOtherUserDatasetAddedByDatasetOwnerRWRW()
throws Exception
{
EventContext ctx = newUserAndGroup("rwrw--");
Dataset dataset = (Dataset) iUpdate.saveAndReturnObject(
mmFactory.simpleDatasetData().asIObject());
disconnect();
... | @Test(groups = STR) void function() throws Exception { EventContext ctx = newUserAndGroup(STR); Dataset dataset = (Dataset) iUpdate.saveAndReturnObject( mmFactory.simpleDatasetData().asIObject()); disconnect(); EventContext user2Ctx = newUserInGroup(ctx); loginUser(user2Ctx); Image image = (Image) iUpdate.saveAndReturn... | /**
* Test to delete an image in collaborative RWRW-- group.
* The image is linked to another user's dataset.
* The image was added by the owner of the dataset.
* None of the users are owner of the group.
* @throws Exception Thrown if an error occurred.
*/ | Test to delete an image in collaborative RWRW-- group. The image is linked to another user's dataset. The image was added by the owner of the dataset. None of the users are owner of the group | testDeleteImageInOtherUserDatasetAddedByDatasetOwnerRWRW | {
"repo_name": "joshmoore/openmicroscopy",
"path": "components/tools/OmeroJava/test/integration/DeleteServicePermissionsTest.java",
"license": "gpl-2.0",
"size": 29297
} | [
"org.testng.annotations.Test"
] | import org.testng.annotations.Test; | import org.testng.annotations.*; | [
"org.testng.annotations"
] | org.testng.annotations; | 2,800,123 |
private void initDatetimeFormat() {
String formatWithTimeZone = null;
if (IS_ANDROID) {
if (ANDROID_SDK_VERSION >= 18) {
// The time zone format "ZZZZZ" is available since Android 4.3
// (SDK version 18)
formatWithTimeZone = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ";
}
} else if... | void function() { String formatWithTimeZone = null; if (IS_ANDROID) { if (ANDROID_SDK_VERSION >= 18) { formatWithTimeZone = STR; } } else if (JAVA_VERSION >= 1.7) { formatWithTimeZone = STR; } if (formatWithTimeZone != null) { this.datetimeFormat = new SimpleDateFormat(formatWithTimeZone); } else { this.datetimeFormat ... | /**
* Initialize datetime format according to the current environment, e.g.
* Java 1.7 and Android.
*/ | Initialize datetime format according to the current environment, e.g. Java 1.7 and Android | initDatetimeFormat | {
"repo_name": "jtheulier/bouquet-java-sdk",
"path": "src/main/java/io/bouquet/v4/ApiClient.java",
"license": "apache-2.0",
"size": 45411
} | [
"java.text.SimpleDateFormat",
"java.util.TimeZone"
] | import java.text.SimpleDateFormat; import java.util.TimeZone; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 168,519 |
public INDArray logPoisson(INDArray label, INDArray predictions, INDArray weights, boolean full) {
NDValidation.validateNumerical("logPoisson", "label", label);
NDValidation.validateNumerical("logPoisson", "predictions", predictions);
NDValidation.validateNumerical("logPoisson", "weights", weights);
r... | INDArray function(INDArray label, INDArray predictions, INDArray weights, boolean full) { NDValidation.validateNumerical(STR, "label", label); NDValidation.validateNumerical(STR, STR, predictions); NDValidation.validateNumerical(STR, STR, weights); return Nd4j.exec(new org.nd4j.linalg.api.ops.impl.loss.LogPoissonLoss(l... | /**
* Log poisson loss: a loss function used for training classifiers.<br>
* Implements {@code L = exp(c) - z * c} where c is log(predictions) and z is labels.<br>
*
* @param label Label array. Each value should be 0.0 or 1.0 (NUMERIC type)
* @param predictions Predictions array (has to be log(x) of actu... | Log poisson loss: a loss function used for training classifiers. Implements L = exp(c) - z * c where c is log(predictions) and z is labels | logPoisson | {
"repo_name": "deeplearning4j/deeplearning4j",
"path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/ops/NDLoss.java",
"license": "apache-2.0",
"size": 28835
} | [
"org.nd4j.autodiff.loss.LossReduce",
"org.nd4j.linalg.api.ndarray.INDArray",
"org.nd4j.linalg.factory.NDValidation",
"org.nd4j.linalg.factory.Nd4j"
] | import org.nd4j.autodiff.loss.LossReduce; import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.factory.NDValidation; import org.nd4j.linalg.factory.Nd4j; | import org.nd4j.autodiff.loss.*; import org.nd4j.linalg.api.ndarray.*; import org.nd4j.linalg.factory.*; | [
"org.nd4j.autodiff",
"org.nd4j.linalg"
] | org.nd4j.autodiff; org.nd4j.linalg; | 1,006,903 |
public DcmElement putXXsq(int tag) {
return putXXsq(tag, VRMap.DEFAULT.lookup(tag));
} | DcmElement function(int tag) { return putXXsq(tag, VRMap.DEFAULT.lookup(tag)); } | /**
* Description of the Method
*
* @param tag Description of the Parameter
* @return Description of the Return Value
*/ | Description of the Method | putXXsq | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/tags/DCM4CHE_1_4_14/src/java/org/dcm4cheri/data/DcmObjectImpl.java",
"license": "apache-2.0",
"size": 84001
} | [
"org.dcm4che.data.DcmElement",
"org.dcm4che.dict.VRMap"
] | import org.dcm4che.data.DcmElement; import org.dcm4che.dict.VRMap; | import org.dcm4che.data.*; import org.dcm4che.dict.*; | [
"org.dcm4che.data",
"org.dcm4che.dict"
] | org.dcm4che.data; org.dcm4che.dict; | 1,078,976 |
public Handler<HttpClientResponse> wrapResponseHandlerInPolicies(
HttpServerRequest request,
Handler<HttpClientResponse> responseHandler,
ProxyMappingDetails proxyMappingDetails) {
if (reverseHeaders) {
responseHandler = new ReverseUriPolicy(this, request, responseHandler, pr... | Handler<HttpClientResponse> function( HttpServerRequest request, Handler<HttpClientResponse> responseHandler, ProxyMappingDetails proxyMappingDetails) { if (reverseHeaders) { responseHandler = new ReverseUriPolicy(this, request, responseHandler, proxyMappingDetails); } return responseHandler; } | /**
* Provides a hook so we can wrap a client response handler in a policy such
* as to reverse the URIs {@link io.fabric8.gateway.handlers.http.policy.ReverseUriPolicy} or
* add metering, limits, security or contract checks etc.
*/ | Provides a hook so we can wrap a client response handler in a policy such as to reverse the URIs <code>io.fabric8.gateway.handlers.http.policy.ReverseUriPolicy</code> or add metering, limits, security or contract checks etc | wrapResponseHandlerInPolicies | {
"repo_name": "rnc/fabric8",
"path": "components/gateway-core/src/main/java/io/fabric8/gateway/handlers/http/MappedServices.java",
"license": "apache-2.0",
"size": 3973
} | [
"io.fabric8.gateway.api.handlers.http.ProxyMappingDetails",
"io.fabric8.gateway.handlers.http.policy.ReverseUriPolicy",
"org.vertx.java.core.Handler",
"org.vertx.java.core.http.HttpClientResponse",
"org.vertx.java.core.http.HttpServerRequest"
] | import io.fabric8.gateway.api.handlers.http.ProxyMappingDetails; import io.fabric8.gateway.handlers.http.policy.ReverseUriPolicy; import org.vertx.java.core.Handler; import org.vertx.java.core.http.HttpClientResponse; import org.vertx.java.core.http.HttpServerRequest; | import io.fabric8.gateway.api.handlers.http.*; import io.fabric8.gateway.handlers.http.policy.*; import org.vertx.java.core.*; import org.vertx.java.core.http.*; | [
"io.fabric8.gateway",
"org.vertx.java"
] | io.fabric8.gateway; org.vertx.java; | 2,460,998 |
public Entity setPos(CoordI thePos)
{
pos.setTo(thePos);
return this;
} | Entity function(CoordI thePos) { pos.setTo(thePos); return this; } | /**
* Set entity position
*
* @param thePos new pos
* @return this
*/ | Set entity position | setPos | {
"repo_name": "MightyPork/tortuga",
"path": "src/net/tortuga/level/map/entities/Entity.java",
"license": "bsd-2-clause",
"size": 27043
} | [
"com.porcupine.coord.CoordI"
] | import com.porcupine.coord.CoordI; | import com.porcupine.coord.*; | [
"com.porcupine.coord"
] | com.porcupine.coord; | 1,126,993 |
@Override
public Adapter createPositionAdapter() {
if (positionItemProvider == null) {
positionItemProvider = new PositionItemProvider(this);
}
return positionItemProvider;
}
protected LegendItemProvider legendItemProvider; | Adapter function() { if (positionItemProvider == null) { positionItemProvider = new PositionItemProvider(this); } return positionItemProvider; } protected LegendItemProvider legendItemProvider; | /**
* This creates an adapter for a {@link com.odcgroup.t24.enquiry.enquiry.Position}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>com.odcgroup.t24.enquiry.enquiry.Position</code>. | createPositionAdapter | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/t24/core/com.odcgroup.t24.enquiry.model.edit/src/com/odcgroup/t24/enquiry/enquiry/provider/EnquiryItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 78683
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 311,109 |
public static Rect loadBitmapBounds(Context context, Uri uri) {
BitmapFactory.Options o = new BitmapFactory.Options();
o.inJustDecodeBounds = true;
loadBitmap(context, uri, o);
return new Rect(0, 0, o.outWidth, o.outHeight);
} | static Rect function(Context context, Uri uri) { BitmapFactory.Options o = new BitmapFactory.Options(); o.inJustDecodeBounds = true; loadBitmap(context, uri, o); return new Rect(0, 0, o.outWidth, o.outHeight); } | /**
* Returns the bounds of the bitmap stored at a given Url.
*/ | Returns the bounds of the bitmap stored at a given Url | loadBitmapBounds | {
"repo_name": "jituo666/CrazyPic",
"path": "src/com/xjt/crazypic/edit/cache/ImageLoader.java",
"license": "apache-2.0",
"size": 19134
} | [
"android.content.Context",
"android.graphics.BitmapFactory",
"android.graphics.Rect",
"android.net.Uri"
] | import android.content.Context; import android.graphics.BitmapFactory; import android.graphics.Rect; import android.net.Uri; | import android.content.*; import android.graphics.*; import android.net.*; | [
"android.content",
"android.graphics",
"android.net"
] | android.content; android.graphics; android.net; | 2,383,703 |
public FormValidation doCheckFileRelative(@QueryParameter String value) throws IOException, ServletException {
String v = fixEmpty(value);
if ((v == null) || (v.length() == 0)) {
// Null values are allowed.
return FormValidation.ok();
}
if ((v.startsWith("/"))... | FormValidation function(@QueryParameter String value) throws IOException, ServletException { String v = fixEmpty(value); if ((v == null) (v.length() == 0)) { return FormValidation.ok(); } if ((v.startsWith("/")) (v.startsWith("\\")) (v.matches(STR))) { return FormValidation.error(STR); } MavenModuleSetBuild lb = getLas... | /**
* Check that the provided file is a relative path. And check that it exists, just in case.
*/ | Check that the provided file is a relative path. And check that it exists, just in case | doCheckFileRelative | {
"repo_name": "eclipse/hudson.plugins.legacy-maven",
"path": "maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java",
"license": "apache-2.0",
"size": 31179
} | [
"hudson.util.FormValidation",
"java.io.IOException",
"javax.servlet.ServletException",
"org.kohsuke.stapler.QueryParameter"
] | import hudson.util.FormValidation; import java.io.IOException; import javax.servlet.ServletException; import org.kohsuke.stapler.QueryParameter; | import hudson.util.*; import java.io.*; import javax.servlet.*; import org.kohsuke.stapler.*; | [
"hudson.util",
"java.io",
"javax.servlet",
"org.kohsuke.stapler"
] | hudson.util; java.io; javax.servlet; org.kohsuke.stapler; | 337,189 |
public static void unzip(final File zipFile, final File destDir) throws MojoExecutionException {
try {
final ZipFile zip = new ZipFile(zipFile);
try {
final Enumeration<? extends ZipEntry> enu = zip.entries();
while (enu.hasMoreElements()) {
... | static void function(final File zipFile, final File destDir) throws MojoExecutionException { try { final ZipFile zip = new ZipFile(zipFile); try { final Enumeration<? extends ZipEntry> enu = zip.entries(); while (enu.hasMoreElements()) { final ZipEntry entry = (ZipEntry) enu.nextElement(); final File file = new File(en... | /**
* Unzips the given ZIP file into a target directory.
*
* @param zipFile
* ZIP file.
* @param destDir
* Target directory.
*
* @throws MojoExecutionException
* Error unzipping the file.
*/ | Unzips the given ZIP file into a target directory | unzip | {
"repo_name": "fuinorg/event-store-maven-plugin",
"path": "es-maven-plugin/src/main/java/org/fuin/esmp/EventStoreDownloadMojo.java",
"license": "lgpl-3.0",
"size": 13967
} | [
"java.io.BufferedInputStream",
"java.io.BufferedOutputStream",
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.InputStream",
"java.io.OutputStream",
"java.util.Enumeration",
"java.util.zip.ZipEntry",
"java.util.zip.ZipFile",
"org.apache.maven.plugin.MojoExecutionExcep... | import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Enumeration; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import org.apache... | import java.io.*; import java.util.*; import java.util.zip.*; import org.apache.maven.plugin.*; | [
"java.io",
"java.util",
"org.apache.maven"
] | java.io; java.util; org.apache.maven; | 852,300 |
public static String getResponsibilityAddress(Argument node) {
return getResponsibilityValue(node, 1);
}
| static String function(Argument node) { return getResponsibilityValue(node, 1); } | /**
* Returns the responsibility address.
*
* @param node
* the argument.
* @return the responsibility address.
*/ | Returns the responsibility address | getResponsibilityAddress | {
"repo_name": "kuriking/testdc2",
"path": "net.dependableos.dcase.diagram.editor/src/net/dependableos/dcase/diagram/editor/common/util/ModuleUtil.java",
"license": "epl-1.0",
"size": 35631
} | [
"net.dependableos.dcase.Argument"
] | import net.dependableos.dcase.Argument; | import net.dependableos.dcase.*; | [
"net.dependableos.dcase"
] | net.dependableos.dcase; | 1,433,879 |
public static
Piece<WritableComparable, Writable, Writable, NoMessage, Object>
countTotalEdgesPiece(Consumer<LongWritable> countEdges) {
return Pieces.reduce(
"CountTotalEdgesPiece",
SumReduce.LONG,
ReusableSuppliers.fromLong((vertex) -> vertex.getNumEdges()),
countEdges);
} | static Piece<WritableComparable, Writable, Writable, NoMessage, Object> function(Consumer<LongWritable> countEdges) { return Pieces.reduce( STR, SumReduce.LONG, ReusableSuppliers.fromLong((vertex) -> vertex.getNumEdges()), countEdges); } | /**
* Piece that calculates total number of edges,
* and gives result to the {@code countEdges} consumer.
*/ | Piece that calculates total number of edges, and gives result to the countEdges consumer | countTotalEdgesPiece | {
"repo_name": "KidEinstein/giraph",
"path": "giraph-block-app-8/src/main/java/org/apache/giraph/block_app/library/prepare_graph/PrepareGraphPieces.java",
"license": "apache-2.0",
"size": 17765
} | [
"org.apache.giraph.block_app.framework.piece.Piece",
"org.apache.giraph.block_app.library.Pieces",
"org.apache.giraph.block_app.library.ReusableSuppliers",
"org.apache.giraph.function.Consumer",
"org.apache.giraph.reducers.impl.SumReduce",
"org.apache.giraph.types.NoMessage",
"org.apache.hadoop.io.LongW... | import org.apache.giraph.block_app.framework.piece.Piece; import org.apache.giraph.block_app.library.Pieces; import org.apache.giraph.block_app.library.ReusableSuppliers; import org.apache.giraph.function.Consumer; import org.apache.giraph.reducers.impl.SumReduce; import org.apache.giraph.types.NoMessage; import org.ap... | import org.apache.giraph.block_app.framework.piece.*; import org.apache.giraph.block_app.library.*; import org.apache.giraph.function.*; import org.apache.giraph.reducers.impl.*; import org.apache.giraph.types.*; import org.apache.hadoop.io.*; | [
"org.apache.giraph",
"org.apache.hadoop"
] | org.apache.giraph; org.apache.hadoop; | 2,611,605 |
private int[] getCurrentSelection(UserInterfaceContext rContext,
DataElement<?> rDataElement,
List<String> rAllValues)
{
List<?> rCurrentValues;
boolean bNullAllowed = false;
int i = 0;
if (rDataElement instanceof ListDataElement)
{
rCurrentValues = ((ListDataElemen... | int[] function(UserInterfaceContext rContext, DataElement<?> rDataElement, List<String> rAllValues) { List<?> rCurrentValues; boolean bNullAllowed = false; int i = 0; if (rDataElement instanceof ListDataElement) { rCurrentValues = ((ListDataElement<?>) rDataElement).getElements(); } else { Object rValue = rDataElement.... | /***************************************
* Returns an array with the indices of the currently selected values. The
* returned array may be empty but will never be NULL. The index values will
* be sorted in ascending order.
*
* @param rContext The user interface context
* @param rDataElement The data e... | Returns an array with the indices of the currently selected values. The returned array may be empty but will never be NULL. The index values will be sorted in ascending order | getCurrentSelection | {
"repo_name": "esoco/esoco-gwt",
"path": "src/main/java/de/esoco/gwt/client/ui/ValueListDataElementUI.java",
"license": "apache-2.0",
"size": 25688
} | [
"de.esoco.data.element.DataElement",
"de.esoco.data.element.ListDataElement",
"de.esoco.ewt.UserInterfaceContext",
"java.util.Arrays",
"java.util.Collections",
"java.util.List"
] | import de.esoco.data.element.DataElement; import de.esoco.data.element.ListDataElement; import de.esoco.ewt.UserInterfaceContext; import java.util.Arrays; import java.util.Collections; import java.util.List; | import de.esoco.data.element.*; import de.esoco.ewt.*; import java.util.*; | [
"de.esoco.data",
"de.esoco.ewt",
"java.util"
] | de.esoco.data; de.esoco.ewt; java.util; | 1,671,022 |
protected final void setPhase(MissionPhase newPhase, String subjectOfPhase) {
if (newPhase == null) {
throw new IllegalArgumentException("newPhase is null");
}
// Move phase on
phase = newPhase;
setPhaseEnded(false);
phaseStartTime = (MarsClock) marsClock.clone();
String template = newP... | final void function(MissionPhase newPhase, String subjectOfPhase) { if (newPhase == null) { throw new IllegalArgumentException(STR); } phase = newPhase; setPhaseEnded(false); phaseStartTime = (MarsClock) marsClock.clone(); String template = newPhase.getDescriptionTemplate(); if (template != null) { phaseDescription = M... | /**
* Sets the mission phase and the current description
*
* @param newPhase the new mission phase.
* @param subjectOfPhase This is the subject of the phase
* @throws MissionException if newPhase is not in the mission's collection of
* phases.
*/ | Sets the mission phase and the current description | setPhase | {
"repo_name": "mars-sim/mars-sim",
"path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/mission/Mission.java",
"license": "gpl-3.0",
"size": 40815
} | [
"java.text.MessageFormat",
"org.mars_sim.msp.core.time.MarsClock",
"org.mars_sim.msp.core.time.MarsClockFormat"
] | import java.text.MessageFormat; import org.mars_sim.msp.core.time.MarsClock; import org.mars_sim.msp.core.time.MarsClockFormat; | import java.text.*; import org.mars_sim.msp.core.time.*; | [
"java.text",
"org.mars_sim.msp"
] | java.text; org.mars_sim.msp; | 1,451,650 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.