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 boolean hasDocumentSearchResults()
{
boolean hasDocumentSearchResults = false;
List<LiveSearchDocumentResult> liveSearchDocumentResults = getSearchDocumentResults();
if (liveSearchDocumentResults.size() > 0)
{
hasDocumentSearchResults = true;
}
... | boolean function() { boolean hasDocumentSearchResults = false; List<LiveSearchDocumentResult> liveSearchDocumentResults = getSearchDocumentResults(); if (liveSearchDocumentResults.size() > 0) { hasDocumentSearchResults = true; } return hasDocumentSearchResults; } | /**
* Checks if live search returns document search results
*
* @return
*/ | Checks if live search returns document search results | hasDocumentSearchResults | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/share-po/src/main/java/org/alfresco/po/share/search/LiveSearchDropdown.java",
"license": "lgpl-3.0",
"size": 12281
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,900,587 |
public final Date getCreationDate(String alias) throws KeyStoreException {
if (!isInit) {
throwNotInitialized();
}
return implSpi.engineGetCreationDate(alias);
} | final Date function(String alias) throws KeyStoreException { if (!isInit) { throwNotInitialized(); } return implSpi.engineGetCreationDate(alias); } | /**
* Returns the creation date of the entry with the given alias.
*
* @param alias
* the alias for the entry.
* @return the creation date, or {@code null} if the specified alias is not
* bound to an entry.
* @throws KeyStoreException
* if this {@co... | Returns the creation date of the entry with the given alias | getCreationDate | {
"repo_name": "xdajog/samsung_sources_i927",
"path": "libcore/luni/src/main/java/java/security/KeyStore.java",
"license": "gpl-2.0",
"size": 51725
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,504,197 |
protected void connectAndStart() {
try {
this.solrClient = this.solrConnectionSource.getSolrClient();
} catch (SolrServerException e) {
new AppenderLoggingException(
"Cannot write logging event or flush buffer; SOLR manager cannot connect to the solr database.", e
);
}
} | void function() { try { this.solrClient = this.solrConnectionSource.getSolrClient(); } catch (SolrServerException e) { new AppenderLoggingException( STR, e ); } } | /**
* Connects to the database and starts a transaction (if applicable). With buffering enabled, this is called when
* flushing the buffer begins, before the first call to {@link #writeInternal}. With buffering disabled, this is
* called immediately before every invocation of {@link #writeInternal}.
... | Connects to the database and starts a transaction (if applicable). With buffering enabled, this is called when flushing the buffer begins, before the first call to <code>#writeInternal</code>. With buffering disabled, this is called immediately before every invocation of <code>#writeInternal</code> | connectAndStart | {
"repo_name": "nthstage/log4j2-ext",
"path": "log4j2extn-appenders/src/main/java/com/nthstage/log4j2extn/appender/solr/SolrClientManager.java",
"license": "apache-2.0",
"size": 8300
} | [
"org.apache.logging.log4j.core.appender.AppenderLoggingException",
"org.apache.solr.client.solrj.SolrServerException"
] | import org.apache.logging.log4j.core.appender.AppenderLoggingException; import org.apache.solr.client.solrj.SolrServerException; | import org.apache.logging.log4j.core.appender.*; import org.apache.solr.client.solrj.*; | [
"org.apache.logging",
"org.apache.solr"
] | org.apache.logging; org.apache.solr; | 818,194 |
private synchronized void pause(int ms) {
try {
this.wait(ms);
} catch (InterruptedException ex) {
log.warn("Interrupted Exception ", ex);
}
}
private static class SServerCommandBuffer implements CommandFilter {
private String changePlayerTypeCom... | synchronized void function(int ms) { try { this.wait(ms); } catch (InterruptedException ex) { log.warn(STR, ex); } } private static class SServerCommandBuffer implements CommandFilter { private String changePlayerTypeCommand = null; private String errorCommand = null; private String hearCommand = null; private String i... | /**
* Pause the thread.
* @param ms How long to pause the thread for (in ms).
*/ | Pause the thread | pause | {
"repo_name": "robocup-atan/atan",
"path": "src/main/java/com/github/robocup_atan/atan/model/SServerPlayer.java",
"license": "mit",
"size": 12969
} | [
"com.github.robocup_atan.atan.parser.CommandFilter"
] | import com.github.robocup_atan.atan.parser.CommandFilter; | import com.github.robocup_atan.atan.parser.*; | [
"com.github.robocup_atan"
] | com.github.robocup_atan; | 754,906 |
private void addBridgesToMapping() {
if (LOG.isTraceEnabled()) {
LOG.trace("InboundBridgeRecoveryModule.addBridgesToMapping");
}
final InboundBridgeManager inboundBridgeManager = InboundBridgeManager.getInstance();
for (final InboundBridge bridge : recoveredBridges) {
... | void function() { if (LOG.isTraceEnabled()) { LOG.trace(STR); } final InboundBridgeManager inboundBridgeManager = InboundBridgeManager.getInstance(); for (final InboundBridge bridge : recoveredBridges) { if (!inboundBridgeManager.addInboundBridge(bridge)) { final XATerminator xaTerminator = SubordinationManager.getXATe... | /**
* Adds bridges with active REST-AT to inbound bridge manager's mapping.
* Rollback subordinate transaction, if bridge cannot be added.
*/ | Adds bridges with active REST-AT to inbound bridge manager's mapping. Rollback subordinate transaction, if bridge cannot be added | addBridgesToMapping | {
"repo_name": "gytis/narayana",
"path": "rts/at/bridge/src/main/java/org/jboss/narayana/rest/bridge/inbound/InboundBridgeRecoveryModule.java",
"license": "lgpl-2.1",
"size": 6299
} | [
"com.arjuna.ats.internal.jta.transaction.arjunacore.jca.SubordinationManager",
"javax.resource.spi.XATerminator",
"javax.transaction.xa.XAException"
] | import com.arjuna.ats.internal.jta.transaction.arjunacore.jca.SubordinationManager; import javax.resource.spi.XATerminator; import javax.transaction.xa.XAException; | import com.arjuna.ats.internal.jta.transaction.arjunacore.jca.*; import javax.resource.spi.*; import javax.transaction.xa.*; | [
"com.arjuna.ats",
"javax.resource",
"javax.transaction"
] | com.arjuna.ats; javax.resource; javax.transaction; | 249,212 |
public static <T> void dispatch(
@Nonnull Observer<? super T> observer,
@Nonnull Option<T> value) {
if (value == Option.none()) {
observer.finish();
} else
if (Option.isError(value)) {
observer.error(Option.getError(value));
} else {
... | static <T> void function( @Nonnull Observer<? super T> observer, @Nonnull Option<T> value) { if (value == Option.none()) { observer.finish(); } else if (Option.isError(value)) { observer.error(Option.getError(value)); } else { observer.next(value.value()); } } | /**
* Dispatches the option to the various Observer methods.
* @param <T> the value type
* @param observer the observer
* @param value the value to dispatch
*/ | Dispatches the option to the various Observer methods | dispatch | {
"repo_name": "akarnokd/reactive4java",
"path": "src/main/java/hu/akarnokd/reactive4java/reactive/Reactive.java",
"license": "apache-2.0",
"size": 367224
} | [
"hu.akarnokd.reactive4java.base.Observer",
"hu.akarnokd.reactive4java.base.Option",
"javax.annotation.Nonnull"
] | import hu.akarnokd.reactive4java.base.Observer; import hu.akarnokd.reactive4java.base.Option; import javax.annotation.Nonnull; | import hu.akarnokd.reactive4java.base.*; import javax.annotation.*; | [
"hu.akarnokd.reactive4java",
"javax.annotation"
] | hu.akarnokd.reactive4java; javax.annotation; | 1,803,369 |
EReference getDelphiFunctionCallExpression_ApplyTo(); | EReference getDelphiFunctionCallExpression_ApplyTo(); | /**
* Returns the meta object for the reference '{@link org.xtext.example.delphi.astm.DelphiFunctionCallExpression#getApplyTo <em>Apply To</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Apply To</em>'.
* @see org.xtext.example.delphi.astm.DelphiFunct... | Returns the meta object for the reference '<code>org.xtext.example.delphi.astm.DelphiFunctionCallExpression#getApplyTo Apply To</code>'. | getDelphiFunctionCallExpression_ApplyTo | {
"repo_name": "adolfosbh/cs2as",
"path": "org.xtext.example.delphi/emf-gen/org/xtext/example/delphi/astm/AstmPackage.java",
"license": "epl-1.0",
"size": 670467
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,037,186 |
@Test
public void testUdfBlackList() throws Exception {
HiveConf testConf = new HiveConf();
assertTrue(testConf.getVar(ConfVars.HIVE_SERVER2_BUILTIN_UDF_BLACKLIST).isEmpty());
Statement stmt = conDefault.createStatement();
// verify that udf in default whitelist can be executed
stmt.executeQuery... | void function() throws Exception { HiveConf testConf = new HiveConf(); assertTrue(testConf.getVar(ConfVars.HIVE_SERVER2_BUILTIN_UDF_BLACKLIST).isEmpty()); Statement stmt = conDefault.createStatement(); stmt.executeQuery(STR); stopMiniHS2(); testConf.setVar(ConfVars.HIVE_SERVER2_BUILTIN_UDF_BLACKLIST, STR); startMiniHS2... | /** Test UDF blacklist
* - verify default value
* - verify udfs allowed with default blacklist
* - verify udf disallowed when in blacklist
* @throws Exception
*/ | Test UDF blacklist - verify default value - verify udfs allowed with default blacklist - verify udf disallowed when in blacklist | testUdfBlackList | {
"repo_name": "sankarh/hive",
"path": "itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniHS2.java",
"license": "apache-2.0",
"size": 66256
} | [
"java.sql.Connection",
"java.sql.SQLException",
"java.sql.Statement",
"org.apache.hadoop.hive.conf.HiveConf",
"org.junit.Assert"
] | import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import org.apache.hadoop.hive.conf.HiveConf; import org.junit.Assert; | import java.sql.*; import org.apache.hadoop.hive.conf.*; import org.junit.*; | [
"java.sql",
"org.apache.hadoop",
"org.junit"
] | java.sql; org.apache.hadoop; org.junit; | 2,128,596 |
private File getFilePathOf(String filename) {
String path = this.getClass().getResource("SimplePicture.class").getFile();
while (path.indexOf("/classes/") != -1) {
path = path.substring(0, path.indexOf("/classes/"));
}
File file = new File(path + "/images/" + filename);
return file;
} | File function(String filename) { String path = this.getClass().getResource(STR).getFile(); while (path.indexOf(STR) != -1) { path = path.substring(0, path.indexOf(STR)); } File file = new File(path + STR + filename); return file; } | /**
* Private method to return a file object representing the given filename, assuming
* that the file is in the ../images/ folder
*
* @param filename The file to look for (should be /images/\<filename\>)
* @return a file object object of the image or file
*/ | Private method to return a file object representing the given filename, assuming that the file is in the ../images/ folder | getFilePathOf | {
"repo_name": "ZachOhara/APCS",
"path": "src/oharaPixLab/classes/SimplePicture.java",
"license": "gpl-3.0",
"size": 24247
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,071,650 |
public final void prepareToRun(boolean dumpDetails) {
this.dumpDetail = dumpDetails;
if (dumpDetails)
subscriberStatistics = new SubscriberStatistics(200000);
else
subscriberStatistics = new SubscriberStatistics();
} | final void function(boolean dumpDetails) { this.dumpDetail = dumpDetails; if (dumpDetails) subscriberStatistics = new SubscriberStatistics(200000); else subscriberStatistics = new SubscriberStatistics(); } | /**
* Final method, cannot be overridden in the Subscriber program.
* @param dumpDetails
*/ | Final method, cannot be overridden in the Subscriber program | prepareToRun | {
"repo_name": "tmtsoftware/es-perftest",
"path": "mbsuite-subscriber-base/src/com/persistent/bcsuite/base/SubscriberBase.java",
"license": "mit",
"size": 4544
} | [
"com.persistent.bcsuite.support.SubscriberStatistics"
] | import com.persistent.bcsuite.support.SubscriberStatistics; | import com.persistent.bcsuite.support.*; | [
"com.persistent.bcsuite"
] | com.persistent.bcsuite; | 458,328 |
public List<Tuple3<FieldsSource, FieldsProvided, FieldsSubsystem>> getRelationshipProvided(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException {
List<Object> args = new ArrayList<Object>();
args.add(ids);
args.add(... | List<Tuple3<FieldsSource, FieldsProvided, FieldsSubsystem>> function(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(ids); args.add(fromFields); args.add(relFields); args.add(toField... | /**
* <p>Original spec-file function name: get_relationship_Provided</p>
* <pre>
* This relationship connects a source (core) database
* to the subsystems it submitted to the knowledge base.
* It has the following fields:
* =over 4
* =back
* </pre>
* @param ids instance ... | Original spec-file function name: get_relationship_Provided <code> This relationship connects a source (core) database to the subsystems it submitted to the knowledge base. It has the following fields: =over 4 =back </code> | getRelationshipProvided | {
"repo_name": "kbase/trees",
"path": "src/us/kbase/cdmientityapi/CDMIEntityAPIClient.java",
"license": "mit",
"size": 869221
} | [
"com.fasterxml.jackson.core.type.TypeReference",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"us.kbase.common.service.JsonClientException",
"us.kbase.common.service.Tuple3"
] | import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.Tuple3; | import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*; | [
"com.fasterxml.jackson",
"java.io",
"java.util",
"us.kbase.common"
] | com.fasterxml.jackson; java.io; java.util; us.kbase.common; | 1,967,740 |
protected void sendServerError(Exception ex,
HttpServletRequest request, HttpServletResponse response) throws IOException {
request.setAttribute("javax.servlet.error.exception", ex);
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
} | void function(Exception ex, HttpServletRequest request, HttpServletResponse response) throws IOException { request.setAttribute(STR, ex); response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } | /**
* Invoked to send a server error. Sets the status to 500 and also sets the
* request attribute "javax.servlet.error.exception" to the Exception.
*/ | Invoked to send a server error. Sets the status to 500 and also sets the request attribute "javax.servlet.error.exception" to the Exception | sendServerError | {
"repo_name": "leogoing/spring_jeesite",
"path": "spring-webmvc-4.0/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java",
"license": "apache-2.0",
"size": 21217
} | [
"java.io.IOException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 2,869,933 |
public PDPropertyList getOptionalContent()
{
COSBase base = getCOSObject().getDictionaryObject(COSName.OC);
if (base instanceof COSDictionary)
{
return PDPropertyList.create((COSDictionary) base);
}
return null;
} | PDPropertyList function() { COSBase base = getCOSObject().getDictionaryObject(COSName.OC); if (base instanceof COSDictionary) { return PDPropertyList.create((COSDictionary) base); } return null; } | /**
* This will get the optional content group or optional content membership dictionary for the
* annotation.
*
* @return The optional content group or optional content membership dictionary or null if there
* is none.
*/ | This will get the optional content group or optional content membership dictionary for the annotation | getOptionalContent | {
"repo_name": "TomRoush/PdfBox-Android",
"path": "library/src/main/java/com/tom_roush/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java",
"license": "apache-2.0",
"size": 22980
} | [
"com.tom_roush.pdfbox.cos.COSBase",
"com.tom_roush.pdfbox.cos.COSDictionary",
"com.tom_roush.pdfbox.cos.COSName",
"com.tom_roush.pdfbox.pdmodel.documentinterchange.markedcontent.PDPropertyList"
] | import com.tom_roush.pdfbox.cos.COSBase; import com.tom_roush.pdfbox.cos.COSDictionary; import com.tom_roush.pdfbox.cos.COSName; import com.tom_roush.pdfbox.pdmodel.documentinterchange.markedcontent.PDPropertyList; | import com.tom_roush.pdfbox.cos.*; import com.tom_roush.pdfbox.pdmodel.documentinterchange.markedcontent.*; | [
"com.tom_roush.pdfbox"
] | com.tom_roush.pdfbox; | 1,583,720 |
private boolean isImageRGB(List channels)
{
if (channels == null) return false;
int n = channels.size();
if (n == 0 || n > 3) return false;
List<Boolean> rgb = new ArrayList<Boolean>();
int index;
Iterator i;
i = channels.iterator();
while (i.hasNext()) {
index = (Integer... | boolean function(List channels) { if (channels == null) return false; int n = channels.size(); if (n == 0 n > 3) return false; List<Boolean> rgb = new ArrayList<Boolean>(); int index; Iterator i; i = channels.iterator(); while (i.hasNext()) { index = (Integer) i.next(); if (colourIndex(index).intValue() != NON_PRIMARY_... | /**
* Returns <code>true</code> if the active channels are mapped
* to <code>Red</code>, <code>Green</code> or <code>Blue</code>,
* <code>false</code> otherwise or if the number of active channels is 0
* or greater than 3.
*
* @param channels The collection of channels to handle.
* @... | Returns <code>true</code> if the active channels are mapped to <code>Red</code>, <code>Green</code> or <code>Blue</code>, <code>false</code> otherwise or if the number of active channels is 0 or greater than 3 | isImageRGB | {
"repo_name": "rleigh-dundee/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java",
"license": "gpl-2.0",
"size": 64159
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 779,891 |
private static int findEndOfUrl(String entireToken) {
int space = entireToken.indexOf(' ');
int line = entireToken.indexOf("<br/>");
int tag = entireToken.indexOf("<");
int end = -1;
// end characters
Set<Character> endChars = new HashSet<Character>();
end... | static int function(String entireToken) { int space = entireToken.indexOf(' '); int line = entireToken.indexOf("<br/>"); int tag = entireToken.indexOf("<"); int end = -1; Set<Character> endChars = new HashSet<Character>(); endChars.add(new Character('.')); endChars.add(new Character(',')); if (space == -1 (space > l... | /**
* Finds end of URL.
* @param entireToken input String (URL)
* @return position of last char of URL, returns -1 when entire String is URL
*/ | Finds end of URL | findEndOfUrl | {
"repo_name": "dmacvicar/spacewalk",
"path": "java/code/src/com/redhat/rhn/common/util/StringUtil.java",
"license": "gpl-2.0",
"size": 33418
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 528,725 |
public void doTestShortCircuitReadWithRemoteBlockReader(boolean ignoreChecksum, int size, String shortCircuitUser,
int readOffset, boolean shortCircuitFails) throws IOException, InterruptedException {
Configuration conf = new Configuration();
conf.setB... | void function(boolean ignoreChecksum, int size, String shortCircuitUser, int readOffset, boolean shortCircuitFails) throws IOException, InterruptedException { Configuration conf = new Configuration(); conf.setBoolean(DFSConfigKeys.DFS_CLIENT_USE_LEGACY_BLOCKREADER, true); conf.setBoolean(DFSConfigKeys.DFS_CLIENT_READ_S... | /**
* Test that file data can be read by reading the block
* through RemoteBlockReader
* @throws IOException
*/ | Test that file data can be read by reading the block through RemoteBlockReader | doTestShortCircuitReadWithRemoteBlockReader | {
"repo_name": "ZhangXFeng/hadoop",
"path": "src/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java",
"license": "apache-2.0",
"size": 24417
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.AppendTestUtil",
"org.apache.hadoop.hdfs.DFSConfigKeys",
"org.apache.hadoop.hdfs.MiniDFSCluster",
"org.jun... | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.AppendTestUtil; import org.apache.hadoop.hdfs.DFSConfigKeys; import org.apache.hadoop.hdfs.Mini... | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.junit"
] | java.io; org.apache.hadoop; org.junit; | 259,024 |
public long sizeOfRelocatingShards(RoutingNode node, RoutingAllocation allocation, Map<String, Long> shardSizes) {
List<ShardRouting> relocatingShards = allocation.routingTable().shardsWithState(ShardRoutingState.RELOCATING);
long totalSize = 0;
for (ShardRouting routing : relocatingShards) ... | long function(RoutingNode node, RoutingAllocation allocation, Map<String, Long> shardSizes) { List<ShardRouting> relocatingShards = allocation.routingTable().shardsWithState(ShardRoutingState.RELOCATING); long totalSize = 0; for (ShardRouting routing : relocatingShards) { if (routing.relocatingNodeId().equals(node.node... | /**
* Returns the size of all shards that are currently being relocated to
* the node, but may not be finished transfering yet.
*/ | Returns the size of all shards that are currently being relocated to the node, but may not be finished transfering yet | sizeOfRelocatingShards | {
"repo_name": "opendatasoft/elasticsearch",
"path": "src/main/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDecider.java",
"license": "apache-2.0",
"size": 29753
} | [
"java.util.List",
"java.util.Map",
"org.elasticsearch.cluster.routing.RoutingNode",
"org.elasticsearch.cluster.routing.ShardRouting",
"org.elasticsearch.cluster.routing.ShardRoutingState",
"org.elasticsearch.cluster.routing.allocation.RoutingAllocation"
] | import java.util.List; import java.util.Map; import org.elasticsearch.cluster.routing.RoutingNode; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.cluster.routing.ShardRoutingState; import org.elasticsearch.cluster.routing.allocation.RoutingAllocation; | import java.util.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.cluster.routing.allocation.*; | [
"java.util",
"org.elasticsearch.cluster"
] | java.util; org.elasticsearch.cluster; | 2,845,334 |
public IBlockState withRotation(IBlockState state, Rotation rot)
{
switch (rot)
{
case COUNTERCLOCKWISE_90:
case CLOCKWISE_90:
switch ((BlockQuartz.EnumType)state.getValue(VARIANT))
{
case LINES_X:
... | IBlockState function(IBlockState state, Rotation rot) { switch (rot) { case COUNTERCLOCKWISE_90: case CLOCKWISE_90: switch ((BlockQuartz.EnumType)state.getValue(VARIANT)) { case LINES_X: return state.withProperty(VARIANT, BlockQuartz.EnumType.LINES_Z); case LINES_Z: return state.withProperty(VARIANT, BlockQuartz.EnumTy... | /**
* Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed
* blockstate.
*/ | Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed blockstate | withRotation | {
"repo_name": "aebert1/BigTransport",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockQuartz.java",
"license": "gpl-3.0",
"size": 7795
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.util.Rotation"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.util.Rotation; | import net.minecraft.block.state.*; import net.minecraft.util.*; | [
"net.minecraft.block",
"net.minecraft.util"
] | net.minecraft.block; net.minecraft.util; | 2,833,015 |
Article selectByPrimaryKey(Long id);
| Article selectByPrimaryKey(Long id); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table articles
*
* @mbggenerated
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table articles | selectByPrimaryKey | {
"repo_name": "liu1084/jim-blog",
"path": "src/main/java/com/jim/mapper/ArticleMapper.java",
"license": "mit",
"size": 2753
} | [
"com.jim.model.Article"
] | import com.jim.model.Article; | import com.jim.model.*; | [
"com.jim.model"
] | com.jim.model; | 752,787 |
public Set<Transition> getAllValuesOftr() {
return rawAccumulateAllValuesOftr(emptyArray());
}
| Set<Transition> function() { return rawAccumulateAllValuesOftr(emptyArray()); } | /**
* Retrieve the set of values that occur in matches for tr.
* @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
*
*/ | Retrieve the set of values that occur in matches for tr | getAllValuesOftr | {
"repo_name": "ELTE-Soft/xUML-RT-Executor",
"path": "plugins/hu.eltesoft.modelexecution.validation/src-gen/hu/eltesoft/modelexecution/validation/TransitionRedefinesAnotherMatcher.java",
"license": "epl-1.0",
"size": 10501
} | [
"java.util.Set",
"org.eclipse.uml2.uml.Transition"
] | import java.util.Set; import org.eclipse.uml2.uml.Transition; | import java.util.*; import org.eclipse.uml2.uml.*; | [
"java.util",
"org.eclipse.uml2"
] | java.util; org.eclipse.uml2; | 2,014,521 |
CharArray getPrefix(); | CharArray getPrefix(); | /**
* Returns the prefix of the current event or null if the event does not
* have a prefix.
*
* @return the prefix or <code>null</code>
* @throws IllegalStateException if not a START_ELEMENT or END_ELEMENT.
*/ | Returns the prefix of the current event or null if the event does not have a prefix | getPrefix | {
"repo_name": "mariusj/org.openntf.domino",
"path": "domino/externals/javolution/src/main/java/javolution/xml/stream/XMLStreamReader.java",
"license": "apache-2.0",
"size": 23320
} | [
"javolution.text.CharArray"
] | import javolution.text.CharArray; | import javolution.text.*; | [
"javolution.text"
] | javolution.text; | 1,843,123 |
@Override
@SuppressWarnings("unchecked")
protected void createFieldEditors() {
Composite p = getFieldEditorParent();
addField(new IntegerFieldEditor(PydevEditorPrefs.CONNECT_TIMEOUT, "Connect timeout for debugger (ms)", p, 10));
BooleanFieldEditor editor = new BooleanFieldEditor(Pyd... | @SuppressWarnings(STR) void function() { Composite p = getFieldEditorParent(); addField(new IntegerFieldEditor(PydevEditorPrefs.CONNECT_TIMEOUT, STR, p, 10)); BooleanFieldEditor editor = new BooleanFieldEditor(PydevEditorPrefs.RELOAD_MODULE_ON_CHANGE, STR, BooleanFieldEditor.SEPARATE_LABEL, p); Control c = editor.getDe... | /**
* Creates the editors
*/ | Creates the editors | createFieldEditors | {
"repo_name": "rgom/Pydev",
"path": "plugins/org.python.pydev.debug/src/org/python/pydev/debug/ui/DebugPrefsPage.java",
"license": "epl-1.0",
"size": 5482
} | [
"java.util.List",
"org.eclipse.jface.preference.BooleanFieldEditor",
"org.eclipse.jface.preference.IntegerFieldEditor",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Control",
"org.python.pydev.core.ExtensionHelper",
"org.python.pydev.editor.preferences.PydevEditorPrefs"
] | import java.util.List; import org.eclipse.jface.preference.BooleanFieldEditor; import org.eclipse.jface.preference.IntegerFieldEditor; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.python.pydev.core.ExtensionHelper; import org.python.pydev.editor.preferences.PydevEditorPre... | import java.util.*; import org.eclipse.jface.preference.*; import org.eclipse.swt.widgets.*; import org.python.pydev.core.*; import org.python.pydev.editor.preferences.*; | [
"java.util",
"org.eclipse.jface",
"org.eclipse.swt",
"org.python.pydev"
] | java.util; org.eclipse.jface; org.eclipse.swt; org.python.pydev; | 187,109 |
@Override
public MeasurementResult[] call() throws MeasurementError {
MeasurementResult[] results = null;
PhoneUtils phoneUtils = PhoneUtils.getPhoneUtils();
try {
phoneUtils.acquireWakeLock();
broadcastMeasurementStart();
contextCollector.setInterval(realTask.getDescription().contextI... | MeasurementResult[] function() throws MeasurementError { MeasurementResult[] results = null; PhoneUtils phoneUtils = PhoneUtils.getPhoneUtils(); try { phoneUtils.acquireWakeLock(); broadcastMeasurementStart(); contextCollector.setInterval(realTask.getDescription().contextIntervalSec); contextCollector.startCollector();... | /**
* The call() method that broadcast intents before the measurement starts
* and after the measurement finishes.
*/ | The call() method that broadcast intents before the measurement starts and after the measurement finishes | call | {
"repo_name": "laoyaosniper/Mobilyzer",
"path": "Mobilyzer/src/com/mobilyzer/UserMeasurementTask.java",
"license": "apache-2.0",
"size": 4689
} | [
"com.mobilyzer.exceptions.MeasurementError",
"com.mobilyzer.util.Logger",
"com.mobilyzer.util.PhoneUtils",
"java.util.ArrayList",
"java.util.HashMap"
] | import com.mobilyzer.exceptions.MeasurementError; import com.mobilyzer.util.Logger; import com.mobilyzer.util.PhoneUtils; import java.util.ArrayList; import java.util.HashMap; | import com.mobilyzer.exceptions.*; import com.mobilyzer.util.*; import java.util.*; | [
"com.mobilyzer.exceptions",
"com.mobilyzer.util",
"java.util"
] | com.mobilyzer.exceptions; com.mobilyzer.util; java.util; | 1,623,956 |
public Set keySet() {
return map.keySet();
} | Set function() { return map.keySet(); } | /**
* Returns the keys.
* @return a view of the keys, backed by this CollectionMap
*/ | Returns the keys | keySet | {
"repo_name": "iCarto/siga",
"path": "appgvSIG/src/com/vividsolutions/jump/util/CollectionMap.java",
"license": "gpl-3.0",
"size": 5781
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,369,613 |
@GET
@Path("/servicebundles/name/{serviceName}")
@Timed
@Produces(MediaType.APPLICATION_JSON)
public Response getServiceBundleByName(@PathParam ("serviceName") String serviceName) {
ServiceBundle result = environmentService.getServiceBundleByName(serviceName);
if (result != null) {
... | @Path(STR) @Produces(MediaType.APPLICATION_JSON) Response function(@PathParam (STR) String serviceName) { ServiceBundle result = environmentService.getServiceBundleByName(serviceName); if (result != null) { return WSUtils.respondEntity(result, OK); } throw EntityNotFoundException.byName(serviceName); } | /**
* Get service bundle matching the name
*/ | Get service bundle matching the name | getServiceBundleByName | {
"repo_name": "hortonworks/streamline",
"path": "streams/cluster/src/main/java/com/hortonworks/streamline/streams/cluster/resource/ServiceBundleResource.java",
"license": "apache-2.0",
"size": 5849
} | [
"com.hortonworks.streamline.common.exception.service.exception.request.EntityNotFoundException",
"com.hortonworks.streamline.common.util.WSUtils",
"com.hortonworks.streamline.streams.cluster.catalog.ServiceBundle",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.Me... | import com.hortonworks.streamline.common.exception.service.exception.request.EntityNotFoundException; import com.hortonworks.streamline.common.util.WSUtils; import com.hortonworks.streamline.streams.cluster.catalog.ServiceBundle; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import... | import com.hortonworks.streamline.common.exception.service.exception.request.*; import com.hortonworks.streamline.common.util.*; import com.hortonworks.streamline.streams.cluster.catalog.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"com.hortonworks.streamline",
"javax.ws"
] | com.hortonworks.streamline; javax.ws; | 505,096 |
public void openPopupMenu(MenuLockLayer menuLockLayer) {
int x = element.getAbsoluteLeft();
int y = 0;
popupMenu =
new PopupMenu(
group,
actionManager,
managerProvider,
presentationFactory,
menuLockLayer,
this,
key... | void function(MenuLockLayer menuLockLayer) { int x = element.getAbsoluteLeft(); int y = 0; popupMenu = new PopupMenu( group, actionManager, managerProvider, presentationFactory, menuLockLayer, this, keyBindingAgent, STR + title); menuLockLayer.add(popupMenu, x, y); } | /**
* Open sub Popup Menu
*
* @param menuLockLayer - lock layer which will receive PopupMenu visual component and
*/ | Open sub Popup Menu | openPopupMenu | {
"repo_name": "akervern/che",
"path": "ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/MenuBarItem.java",
"license": "epl-1.0",
"size": 5299
} | [
"org.eclipse.che.ide.ui.toolbar.MenuLockLayer",
"org.eclipse.che.ide.ui.toolbar.PopupMenu"
] | import org.eclipse.che.ide.ui.toolbar.MenuLockLayer; import org.eclipse.che.ide.ui.toolbar.PopupMenu; | import org.eclipse.che.ide.ui.toolbar.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 1,384,958 |
private boolean load() {
EdgeType e;
if (isDirected) {
g = new DirectedSparseGraph();
e = EdgeType.DIRECTED;
} else {
g = new UndirectedSparseGraph();
e = EdgeType.UNDIRECTED;
}
BufferedReader br;
try {
... | boolean function() { EdgeType e; if (isDirected) { g = new DirectedSparseGraph(); e = EdgeType.DIRECTED; } else { g = new UndirectedSparseGraph(); e = EdgeType.UNDIRECTED; } BufferedReader br; try { br = new BufferedReader(new FileReader(filePath)); String line; while ((line = br.readLine()) != null) { String[] split =... | /**
* loads a graph from a csv file.
*
* @param filePath path to file to load graph from.
* @param directed if the graph is directed.
*/ | loads a graph from a csv file | load | {
"repo_name": "guillermoruizalv/DataMining",
"path": "bmi-p4-03/src/es/uam/eps/bmi/social/graph/SocialGraph.java",
"license": "gpl-3.0",
"size": 18085
} | [
"edu.uci.ics.jung.graph.DirectedSparseGraph",
"edu.uci.ics.jung.graph.UndirectedSparseGraph",
"edu.uci.ics.jung.graph.util.EdgeType",
"java.io.BufferedReader",
"java.io.FileReader",
"java.io.IOException"
] | import edu.uci.ics.jung.graph.DirectedSparseGraph; import edu.uci.ics.jung.graph.UndirectedSparseGraph; import edu.uci.ics.jung.graph.util.EdgeType; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; | import edu.uci.ics.jung.graph.*; import edu.uci.ics.jung.graph.util.*; import java.io.*; | [
"edu.uci.ics",
"java.io"
] | edu.uci.ics; java.io; | 893,259 |
// Set the HiveDecimalWritable from bytes without converting to String first for
// better performance.
data.setFromBytes(bytes.getData(), start, length);
if (!data.isSet()) {
isNull = true;
} else {
isNull = !data.mutateEnforcePrecisionScale(precision, scale);
}
if (isNull) {
... | data.setFromBytes(bytes.getData(), start, length); if (!data.isSet()) { isNull = true; } else { isNull = !data.mutateEnforcePrecisionScale(precision, scale); } if (isNull) { LOG.debug(STR + new String(bytes.getData(), start, length, StandardCharsets.UTF_8)); } } | /**
* Initilizes LazyHiveDecimal object by interpreting the input bytes
* as a numeric string
*
* @param bytes
* @param start
* @param length
*/ | Initilizes LazyHiveDecimal object by interpreting the input bytes as a numeric string | init | {
"repo_name": "vergilchiu/hive",
"path": "serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyHiveDecimal.java",
"license": "apache-2.0",
"size": 4838
} | [
"java.nio.charset.StandardCharsets"
] | import java.nio.charset.StandardCharsets; | import java.nio.charset.*; | [
"java.nio"
] | java.nio; | 967,336 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<SubvolumeInfoInner> listByVolume(
String resourceGroupName, String accountName, String poolName, String volumeName, Context context) {
return new PagedIterable<>(listByVolumeAsync(resourceGroupName, accountName, poolName, volum... | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<SubvolumeInfoInner> function( String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { return new PagedIterable<>(listByVolumeAsync(resourceGroupName, accountName, poolName, volumeName, context)); } | /**
* Returns a list of the subvolumes in the volume.
*
* @param resourceGroupName The name of the resource group.
* @param accountName The name of the NetApp account.
* @param poolName The name of the capacity pool.
* @param volumeName The name of the volume.
* @param context The con... | Returns a list of the subvolumes in the volume | listByVolume | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java",
"license": "mit",
"size": 99318
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.netapp.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,342,048 |
private synchronized static boolean exec(File workingDir, String[] command, StringBuffer out,
StringBuffer err, boolean waitForOutput) {
try {
if (DEBUG) {
System.out.println("CodeBlocksProcessHelper exec private method on command");
}
Process process = Runtime.g... | synchronized static boolean function(File workingDir, String[] command, StringBuffer out, StringBuffer err, boolean waitForOutput) { try { if (DEBUG) { System.out.println(STR); } Process process = Runtime.getRuntime().exec(command, null, workingDir); Thread outHandler = new RedirectStreamHandler(process.getInputStream(... | /**
* Executes a command as a separate process.
*
* @param workingDir working directory for the command, can be null
* @param command command to execute and its arguments
* @param out where to redirect standard output, can be null
* @param err where to redirect standard error, can be null
... | Executes a command as a separate process | exec | {
"repo_name": "yflou520/appinventor-sources",
"path": "appinventor/blocklyeditor/tests/com/google/appinventor/blocklyeditor/CodeBlocksProcessHelper.java",
"license": "apache-2.0",
"size": 4867
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,034,186 |
public void setBaseGraph(BaseGraph base, Object rootVertex) {
if (this.base != null) {
this.base.removeStructureChangeListener(this);
}
this.base = base;
HierarchyChangeEvent evt = null;
if (root != null) {
evt = new HierarchyChangeEvent(this, "Base graph changed");
evt.setRootChange(root);
}
... | void function(BaseGraph base, Object rootVertex) { if (this.base != null) { this.base.removeStructureChangeListener(this); } this.base = base; HierarchyChangeEvent evt = null; if (root != null) { evt = new HierarchyChangeEvent(this, STR); evt.setRootChange(root); } root = engine.createHierarchy(base, rootVertex); if (e... | /**
* Replace the underlying graph. If a hierarchy was already built on the old
* one, signals everybody of the root change.
*/ | Replace the underlying graph. If a hierarchy was already built on the old one, signals everybody of the root change | setBaseGraph | {
"repo_name": "manuel-freire/ac2",
"path": "clover/src/main/java/es/ucm/fdi/clover/model/ClusterHierarchy.java",
"license": "gpl-3.0",
"size": 21005
} | [
"es.ucm.fdi.clover.event.HierarchyChangeEvent"
] | import es.ucm.fdi.clover.event.HierarchyChangeEvent; | import es.ucm.fdi.clover.event.*; | [
"es.ucm.fdi"
] | es.ucm.fdi; | 1,167,604 |
private List<String> getLocalGPSFiles(List<String> list){
List<String> ivecList = new ArrayList<String>();
for(String fileName : list){
if (fileName.contains(".ivec.org")){
ivecList.add(convertFilePathToIvec(fileName));
//The file can not be in two list
list.remove(fileName);
}
}
retu... | List<String> function(List<String> list){ List<String> ivecList = new ArrayList<String>(); for(String fileName : list){ if (fileName.contains(STR)){ ivecList.add(convertFilePathToIvec(fileName)); list.remove(fileName); } } return ivecList; } | /**
* function that moves local GPS files at ivec to a separate list.
* @param list of selected GPS files
* @return list of local GPS files.
*/ | function that moves local GPS files at ivec to a separate list | getLocalGPSFiles | {
"repo_name": "AuScope/GeodesyWorkflow",
"path": "src/main/java/org/auscope/portal/server/web/controllers/GridSubmitController.java",
"license": "gpl-3.0",
"size": 84237
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 183,726 |
@ServiceMethod(returns = ReturnType.SINGLE)
NetworkInterfaceInner createOrUpdate(
String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters, Context context); | @ServiceMethod(returns = ReturnType.SINGLE) NetworkInterfaceInner createOrUpdate( String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters, Context context); | /**
* Creates or updates a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param parameters Parameters supplied to the create or update network interface operation.
* @param context The cont... | Creates or updates a network interface | createOrUpdate | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfacesClient.java",
"license": "mit",
"size": 71039
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.network.fluent.models.NetworkInterfaceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.NetworkInterfaceInner; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,861,964 |
RESULT_TYPE visitInterestRateFutureTransactionDefinition(InterestRateFutureTransactionDefinition future, DATA_TYPE data); | RESULT_TYPE visitInterestRateFutureTransactionDefinition(InterestRateFutureTransactionDefinition future, DATA_TYPE data); | /**
* Interest rate future transaction method that takes data.
* @param future An interest rate future transaction
* @param data The data
* @return The result
*/ | Interest rate future transaction method that takes data | visitInterestRateFutureTransactionDefinition | {
"repo_name": "jerome79/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/instrument/InstrumentDefinitionVisitor.java",
"license": "apache-2.0",
"size": 78879
} | [
"com.opengamma.analytics.financial.instrument.future.InterestRateFutureTransactionDefinition"
] | import com.opengamma.analytics.financial.instrument.future.InterestRateFutureTransactionDefinition; | import com.opengamma.analytics.financial.instrument.future.*; | [
"com.opengamma.analytics"
] | com.opengamma.analytics; | 2,216,781 |
private void cacheAccounts(Set<Long> accountIdsSet) {
String nowFormat = TIMESTAMPFORMAT.print(DateTime.now());
File tempFile = null;
try {
tempFile = File.createTempFile(nowFormat + "-accounts-ids", ".txt");
logger.info("Cache file created for accounts: " + tempFile.getAbsolutePath());
... | void function(Set<Long> accountIdsSet) { String nowFormat = TIMESTAMPFORMAT.print(DateTime.now()); File tempFile = null; try { tempFile = File.createTempFile(nowFormat + STR, ".txt"); logger.info(STR + tempFile.getAbsolutePath()); } catch (IOException e) { logger.error( STR, e); } try (OutputStreamWriter writer = new O... | /**
* Caches the accounts into a temporary file.
*
* @param accountIdsSet the set with all the customer accounts ids.
*/ | Caches the accounts into a temporary file | cacheAccounts | {
"repo_name": "googleads/aw-reporting",
"path": "aw-reporting/src/main/java/com/google/api/ads/adwords/awreporting/processors/ReportProcessor.java",
"license": "apache-2.0",
"size": 16713
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStreamWriter",
"java.nio.charset.StandardCharsets",
"java.util.Set",
"org.joda.time.DateTime"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.nio.charset.StandardCharsets; import java.util.Set; import org.joda.time.DateTime; | import java.io.*; import java.nio.charset.*; import java.util.*; import org.joda.time.*; | [
"java.io",
"java.nio",
"java.util",
"org.joda.time"
] | java.io; java.nio; java.util; org.joda.time; | 866,862 |
@Test
public void testRpcFileSystemHelper() {
ISystemFileCommandsHelper origSFCH = ServerFactory.getRpcFileSystemHelper();
try {
// Test for default value:
Class<? extends SymbolicLinkHelper> implementation =
OSUtils.isWindows()
? WindowsRpcSystemFileCo... | void function() { ISystemFileCommandsHelper origSFCH = ServerFactory.getRpcFileSystemHelper(); try { Class<? extends SymbolicLinkHelper> implementation = OSUtils.isWindows() ? WindowsRpcSystemFileCommandsHelper.class : RpcSystemFileCommandsHelper.class; assertNotNull(ServerFactory.getRpcFileSystemHelper()); assertEqual... | /**
* Sanity checks only here...
*/ | Sanity checks only here.. | testRpcFileSystemHelper | {
"repo_name": "groboclown/p4ic4idea",
"path": "p4java/src/test/java/com/perforce/p4java/tests/dev/unit/feature/server/ServerFactoryTest.java",
"license": "apache-2.0",
"size": 7939
} | [
"com.perforce.p4java.common.base.OSUtils",
"com.perforce.p4java.impl.generic.sys.ISystemFileCommandsHelper",
"com.perforce.p4java.impl.mapbased.rpc.sys.helper.RpcSystemFileCommandsHelper",
"com.perforce.p4java.impl.mapbased.rpc.sys.helper.SymbolicLinkHelper",
"com.perforce.p4java.impl.mapbased.rpc.sys.helpe... | import com.perforce.p4java.common.base.OSUtils; import com.perforce.p4java.impl.generic.sys.ISystemFileCommandsHelper; import com.perforce.p4java.impl.mapbased.rpc.sys.helper.RpcSystemFileCommandsHelper; import com.perforce.p4java.impl.mapbased.rpc.sys.helper.SymbolicLinkHelper; import com.perforce.p4java.impl.mapbased... | import com.perforce.p4java.common.base.*; import com.perforce.p4java.impl.generic.sys.*; import com.perforce.p4java.impl.mapbased.rpc.sys.helper.*; import com.perforce.p4java.server.*; import org.junit.*; | [
"com.perforce.p4java",
"org.junit"
] | com.perforce.p4java; org.junit; | 228,577 |
public String getChildElementXML() {
StringBuilder str = new StringBuilder();
str.append("<" + ELEMENT_NAME + " xmlns='" + NAMESPACE + "'/>");
return str.toString();
}
public static class Provider implements IQProvider {
public Provider() {
super()... | String function() { StringBuilder str = new StringBuilder(); str.append("<" + ELEMENT_NAME + STR + NAMESPACE + "'/>"); return str.toString(); } public static class Provider implements IQProvider { public Provider() { super(); } | /**
* Get the Child Element XML of the Packet
*
* @return
*/ | Get the Child Element XML of the Packet | getChildElementXML | {
"repo_name": "UzxMx/java-bells",
"path": "lib-src/smack_src_3_3_0/jingle/extension/source/org/jivesoftware/smackx/jingle/nat/STUN.java",
"license": "bsd-3-clause",
"size": 8840
} | [
"org.jivesoftware.smack.provider.IQProvider"
] | import org.jivesoftware.smack.provider.IQProvider; | import org.jivesoftware.smack.provider.*; | [
"org.jivesoftware.smack"
] | org.jivesoftware.smack; | 939,372 |
private void setTranslation()
{
Vector3f transRef = new Vector3f();
float translation;
//iterate over the range, go over by one step to accommodate mathematical error
for(float timeElp=0;timeElp<(this.time+(this.time/this.timeDivision));timeElp+=(this.time/this.... | void function() { Vector3f transRef = new Vector3f(); float translation; for(float timeElp=0;timeElp<(this.time+(this.time/this.timeDivision));timeElp+=(this.time/this.timeDivision)) { translation = (float)((timeElp/this.time)*(Math.PI*2)); if(translation>(Math.PI*2)) translation=(float)Math.PI*2; transRef.x = (float)M... | /**
* Sets the test translation, an orbit in X,Y,Z around the reference Box object.
*/ | Sets the test translation, an orbit in X,Y,Z around the reference Box object | setTranslation | {
"repo_name": "tectronics/xenogeddon",
"path": "src/jmetest/renderer/TestSpatialTransform.java",
"license": "gpl-2.0",
"size": 8831
} | [
"com.jme.math.Vector3f"
] | import com.jme.math.Vector3f; | import com.jme.math.*; | [
"com.jme.math"
] | com.jme.math; | 2,627,075 |
public Future<WorkflowStep> deleteStep(WorkflowStep step, User user) throws DotDataException; | Future<WorkflowStep> function(WorkflowStep step, User user) throws DotDataException; | /**
* Delete a step with all dependencies: actions, actionlets and tasks.
* @param step WorkflowStep from the step to delete the action
* @param user The current User
* @return Future {@link WorkflowStep} the process runs async, returns a future with the steps deleted.
* @throws DotDataExcept... | Delete a step with all dependencies: actions, actionlets and tasks | deleteStep | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotmarketing/portlets/workflows/business/WorkflowAPI.java",
"license": "gpl-3.0",
"size": 45694
} | [
"com.dotmarketing.exception.DotDataException",
"com.dotmarketing.portlets.workflows.model.WorkflowStep",
"com.liferay.portal.model.User",
"java.util.concurrent.Future"
] | import com.dotmarketing.exception.DotDataException; import com.dotmarketing.portlets.workflows.model.WorkflowStep; import com.liferay.portal.model.User; import java.util.concurrent.Future; | import com.dotmarketing.exception.*; import com.dotmarketing.portlets.workflows.model.*; import com.liferay.portal.model.*; import java.util.concurrent.*; | [
"com.dotmarketing.exception",
"com.dotmarketing.portlets",
"com.liferay.portal",
"java.util"
] | com.dotmarketing.exception; com.dotmarketing.portlets; com.liferay.portal; java.util; | 964,742 |
public int compareSourceLines(BugCollection lhsCollection, BugCollection rhsCollection, SourceLineAnnotation lhs,
SourceLineAnnotation rhs) {
if (lhs == null || rhs == null) {
return compareNullElements(lhs, rhs);
}
// Classes must match fuzzily.
int cmp = co... | int function(BugCollection lhsCollection, BugCollection rhsCollection, SourceLineAnnotation lhs, SourceLineAnnotation rhs) { if (lhs == null rhs == null) { return compareNullElements(lhs, rhs); } int cmp = compareClassesByName(lhsCollection, rhsCollection, lhs.getClassName(), rhs.getClassName()); if (cmp != 0) return c... | /**
* Compare source line annotations.
*
* @param rhsCollection
* lhs BugCollection
* @param lhsCollection
* rhs BugCollection
* @param lhs
* a SourceLineAnnotation
* @param rhs
* another SourceLineAnnotation
* @return co... | Compare source line annotations | compareSourceLines | {
"repo_name": "OpenNTF/FindBug-for-Domino-Designer",
"path": "findBugsEclipsePlugin/src/edu/umd/cs/findbugs/FuzzyBugComparator.java",
"license": "lgpl-3.0",
"size": 13632
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 311,448 |
public static <T extends Number> Number scale(T value, int fraction) {
return scale(value, fraction, RoundingMode.DOWN);
} | static <T extends Number> Number function(T value, int fraction) { return scale(value, fraction, RoundingMode.DOWN); } | /**
* Get scaled number
*
* @param <T> number
* @param value number valued before scaled
* @param fraction fraction
*
* @return scaled number
*/ | Get scaled number | scale | {
"repo_name": "Jamling/AFDemo",
"path": "library/src/cn/ieclipse/af/util/StringUtils.java",
"license": "apache-2.0",
"size": 8167
} | [
"java.math.RoundingMode"
] | import java.math.RoundingMode; | import java.math.*; | [
"java.math"
] | java.math; | 341,470 |
protected void setSpan_internal(Object span, int start, int end, int flags) {
((Editable) mText).setSpan(span, start, end, flags);
} | void function(Object span, int start, int end, int flags) { ((Editable) mText).setSpan(span, start, end, flags); } | /**
* Sets a span on the specified range of text
* @hide
*/ | Sets a span on the specified range of text | setSpan_internal | {
"repo_name": "szpaddy/android-4.1.2_r2-core",
"path": "java/android/widget/TextView.java",
"license": "apache-2.0",
"size": 343588
} | [
"android.text.Editable"
] | import android.text.Editable; | import android.text.*; | [
"android.text"
] | android.text; | 706,735 |
private String getID() {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
String actual_id = Secure.getString(getApplicationContext()
.getContentResolver(), Secure.ANDROID_ID);
byte[] bytes = actual_id.getBytes();
byte[] digest = md.digest(bytes);
StringBuffer hexString = new StringB... | String function() { try { MessageDigest md = MessageDigest.getInstance("MD5"); String actual_id = Secure.getString(getApplicationContext() .getContentResolver(), Secure.ANDROID_ID); byte[] bytes = actual_id.getBytes(); byte[] digest = md.digest(bytes); StringBuffer hexString = new StringBuffer(); for (int i = 0; i < di... | /**
* Get a unique ID by fetching the phone ID and hashing it
*
* @return
*/ | Get a unique ID by fetching the phone ID and hashing it | getID | {
"repo_name": "eric-stanley/pressureNET",
"path": "src/ca/cumulonimbus/barometernetwork/BarometerNetworkActivity.java",
"license": "gpl-3.0",
"size": 117914
} | [
"android.provider.Settings",
"java.security.MessageDigest"
] | import android.provider.Settings; import java.security.MessageDigest; | import android.provider.*; import java.security.*; | [
"android.provider",
"java.security"
] | android.provider; java.security; | 220,505 |
@DoesServiceRequest
public final int downloadToByteArray(final byte[] buffer, final int bufferOffset,
final AccessCondition accessCondition, FileRequestOptions options, OperationContext opContext)
throws StorageException {
Utility.assertNotNull("buffer", buffer);
if (buf... | final int function(final byte[] buffer, final int bufferOffset, final AccessCondition accessCondition, FileRequestOptions options, OperationContext opContext) throws StorageException { Utility.assertNotNull(STR, buffer); if (bufferOffset < 0) { throw new IndexOutOfBoundsException(); } if (bufferOffset >= buffer.length)... | /**
* Downloads a range of bytes from the file to the given byte buffer, using the specified request options and
* operation context.
*
* @param buffer
* A <code>byte</code> array which represents the buffer to which the file bytes are downloaded.
* @param bufferOffet
* ... | Downloads a range of bytes from the file to the given byte buffer, using the specified request options and operation context | downloadToByteArray | {
"repo_name": "peterhoeltschi/AzureStorage",
"path": "microsoft-azure-storage/src/com/microsoft/azure/storage/file/CloudFile.java",
"license": "apache-2.0",
"size": 119971
} | [
"com.microsoft.azure.storage.AccessCondition",
"com.microsoft.azure.storage.OperationContext",
"com.microsoft.azure.storage.StorageException",
"com.microsoft.azure.storage.core.ExecutionEngine",
"com.microsoft.azure.storage.core.Utility"
] | import com.microsoft.azure.storage.AccessCondition; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageException; import com.microsoft.azure.storage.core.ExecutionEngine; import com.microsoft.azure.storage.core.Utility; | import com.microsoft.azure.storage.*; import com.microsoft.azure.storage.core.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,774,525 |
@ApiModelProperty(value = "")
public List<GDPRRecipient> getRecipients() {
return recipients;
} | @ApiModelProperty(value = "") List<GDPRRecipient> function() { return recipients; } | /**
* Get recipients
* @return recipients
**/ | Get recipients | getRecipients | {
"repo_name": "LogSentinel/logsentinel-java-client",
"path": "src/main/java/com/logsentinel/model/GDPRRegisterRecordDto.java",
"license": "mit",
"size": 37550
} | [
"com.logsentinel.model.GDPRRecipient",
"io.swagger.annotations.ApiModelProperty",
"java.util.List"
] | import com.logsentinel.model.GDPRRecipient; import io.swagger.annotations.ApiModelProperty; import java.util.List; | import com.logsentinel.model.*; import io.swagger.annotations.*; import java.util.*; | [
"com.logsentinel.model",
"io.swagger.annotations",
"java.util"
] | com.logsentinel.model; io.swagger.annotations; java.util; | 32,853 |
public ApplicationDetail getAppDetail(Id.Application appId) throws ApplicationNotFoundException {
ApplicationSpecification appSpec = store.getApplication(appId);
if (appSpec == null) {
throw new ApplicationNotFoundException(appId);
}
return ApplicationDetail.fromSpec(appSpec);
} | ApplicationDetail function(Id.Application appId) throws ApplicationNotFoundException { ApplicationSpecification appSpec = store.getApplication(appId); if (appSpec == null) { throw new ApplicationNotFoundException(appId); } return ApplicationDetail.fromSpec(appSpec); } | /**
* Get detail about the specified application
*
* @param appId the id of the application to get
* @return detail about the specified application
* @throws ApplicationNotFoundException if the specified application does not exist
*/ | Get detail about the specified application | getAppDetail | {
"repo_name": "anthcp/cdap",
"path": "cdap-app-fabric/src/main/java/co/cask/cdap/internal/app/services/ApplicationLifecycleService.java",
"license": "apache-2.0",
"size": 36720
} | [
"co.cask.cdap.api.app.ApplicationSpecification",
"co.cask.cdap.common.ApplicationNotFoundException",
"co.cask.cdap.proto.ApplicationDetail",
"co.cask.cdap.proto.Id"
] | import co.cask.cdap.api.app.ApplicationSpecification; import co.cask.cdap.common.ApplicationNotFoundException; import co.cask.cdap.proto.ApplicationDetail; import co.cask.cdap.proto.Id; | import co.cask.cdap.api.app.*; import co.cask.cdap.common.*; import co.cask.cdap.proto.*; | [
"co.cask.cdap"
] | co.cask.cdap; | 704,863 |
private FlowToken finishBeginUserDefinedEnvironment(final UserDefinedEnvironment environment)
throws SnuggleParseException {
UserDefinedCommandOrEnvironmentArgumentSearchResult argumentSearchResult =
new UserDefinedCommandOrEnvironmentArgumentSearchResult();
ErrorToken errorToken =
... | FlowToken function(final UserDefinedEnvironment environment) throws SnuggleParseException { UserDefinedCommandOrEnvironmentArgumentSearchResult argumentSearchResult = new UserDefinedCommandOrEnvironmentArgumentSearchResult(); ErrorToken errorToken = advanceOverUserDefinedCommandOrEnvironmentArguments(environment, argum... | /**
* Finishes the handling of the start of a user-defined environment. This replaces the
* <tt>\\begin{envName}</tt> with the appropriate substitution and reparses.
*
* <p>PRE-CONDITION: position will point to the character immediately after
* <tt>\\begin{envName}</tt>.
*/ | Finishes the handling of the start of a user-defined environment. This replaces the \\begin{envName} with the appropriate substitution and reparses. \\begin{envName} | finishBeginUserDefinedEnvironment | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-external/src/main/java/uk/ac/ed/ph/snuggletex/internal/LaTeXTokeniser.java",
"license": "gpl-3.0",
"size": 99213
} | [
"uk.ac.ed.ph.snuggletex.definitions.UserDefinedEnvironment",
"uk.ac.ed.ph.snuggletex.tokens.ErrorToken",
"uk.ac.ed.ph.snuggletex.tokens.FlowToken"
] | import uk.ac.ed.ph.snuggletex.definitions.UserDefinedEnvironment; import uk.ac.ed.ph.snuggletex.tokens.ErrorToken; import uk.ac.ed.ph.snuggletex.tokens.FlowToken; | import uk.ac.ed.ph.snuggletex.definitions.*; import uk.ac.ed.ph.snuggletex.tokens.*; | [
"uk.ac.ed"
] | uk.ac.ed; | 1,551,982 |
public Vector2D vector1() {
return new Vector2D(cos(theta), sin(theta));
}
| Vector2D function() { return new Vector2D(cos(theta), sin(theta)); } | /**
* Returns the first direction vector of the ellipse, in the direction of
* the major axis.
*/ | Returns the first direction vector of the ellipse, in the direction of the major axis | vector1 | {
"repo_name": "pokowaka/android-geom",
"path": "geom/src/main/java/math/geom2d/conic/Ellipse2D.java",
"license": "lgpl-2.1",
"size": 40767
} | [
"java.lang.Math",
"math.geom2d.Vector2D"
] | import java.lang.Math; import math.geom2d.Vector2D; | import java.lang.*; import math.geom2d.*; | [
"java.lang",
"math.geom2d"
] | java.lang; math.geom2d; | 1,315,673 |
public List getTrianglesAdjacentToVertex(int vertexIndex) {
// Assert: isVertex
List adjTris = new ArrayList();
QuadEdge start = getEdge(vertexIndex);
QuadEdge qe = start;
do {
QuadEdgeTriangle adjTri = (QuadEdgeTriangle) qe.getData();
if (adjTri != null) {
adjTris.add(adjTri);
}
... | List function(int vertexIndex) { List adjTris = new ArrayList(); QuadEdge start = getEdge(vertexIndex); QuadEdge qe = start; do { QuadEdgeTriangle adjTri = (QuadEdgeTriangle) qe.getData(); if (adjTri != null) { adjTris.add(adjTri); } qe = qe.oNext(); } while (qe != start); return adjTris; } | /**
* Gets the triangles which are adjacent (include) to a
* given vertex of this triangle.
*
* @param vertexIndex the vertex to query
* @return a list of the vertex-adjacent triangles
*/ | Gets the triangles which are adjacent (include) to a given vertex of this triangle | getTrianglesAdjacentToVertex | {
"repo_name": "Jules-/terraingis",
"path": "src/TerrainGIS/src/com/vividsolutions/jts/triangulate/quadedge/QuadEdgeTriangle.java",
"license": "gpl-3.0",
"size": 10312
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,815,597 |
public Bindings add(String property, JTextComponent c, String defaultValue) {
registerPropertyChangeListener(c);
return add(new JTextComponentBinding(property, c, defaultValue));
} | Bindings function(String property, JTextComponent c, String defaultValue) { registerPropertyChangeListener(c); return add(new JTextComponentBinding(property, c, defaultValue)); } | /**
* Handles JEditorPane, JTextArea, JTextField
*/ | Handles JEditorPane, JTextArea, JTextField | add | {
"repo_name": "IceOnFire/VisualZoom",
"path": "script/launch4j/src/net/sf/launch4j/binding/Bindings.java",
"license": "gpl-2.0",
"size": 8272
} | [
"javax.swing.text.JTextComponent"
] | import javax.swing.text.JTextComponent; | import javax.swing.text.*; | [
"javax.swing"
] | javax.swing; | 2,672,926 |
public void setLockboxItems(List<DailyCashflowLockboxItem> lockboxItems) {
this.lockboxItems = lockboxItems;
} | void function(List<DailyCashflowLockboxItem> lockboxItems) { this.lockboxItems = lockboxItems; } | /**
* Sets the list of daily cash flow lockbox items.
*
* @param lockboxItems
* the list of daily cash flow lockbox items.
*/ | Sets the list of daily cash flow lockbox items | setLockboxItems | {
"repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application",
"path": "Code/SCRD_BRE/src/java/ejb/gov/opm/scrd/services/impl/reporting/DailyCashflowReportResponse.java",
"license": "apache-2.0",
"size": 2177
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,485,642 |
public interface StringMetricSimplifierStep extends
StringMetricInitialSimplifierStep {
@Override
StringMetricSimplifierStep simplify(Simplifier simplifier); | interface StringMetricSimplifierStep extends StringMetricInitialSimplifierStep { StringMetricSimplifierStep function(Simplifier simplifier); | /**
* Adds a simplifier to the metric.
*
* @param simplifier
* a simplifier to add
* @return this for fluent chaining
*/ | Adds a simplifier to the metric | simplify | {
"repo_name": "mpkorstanje/simmetrics",
"path": "simmetrics-core/src/main/java/com/github/mpkorstanje/simmetrics/builders/StringMetricBuilder.java",
"license": "apache-2.0",
"size": 18033
} | [
"com.github.mpkorstanje.simmetrics.simplifiers.Simplifier"
] | import com.github.mpkorstanje.simmetrics.simplifiers.Simplifier; | import com.github.mpkorstanje.simmetrics.simplifiers.*; | [
"com.github.mpkorstanje"
] | com.github.mpkorstanje; | 3,924 |
public BitSet prob1(STPG stpg, BitSet remain, BitSet target, boolean min1, boolean min2)
{
int n, iters;
BitSet u, v, soln, unknown;
boolean u_done, v_done;
long timer;
// Start precomputation
timer = System.currentTimeMillis();
if (verbosity >= 1)
mainLog.println("Starting Prob1 (" + (min1 ? "min... | BitSet function(STPG stpg, BitSet remain, BitSet target, boolean min1, boolean min2) { int n, iters; BitSet u, v, soln, unknown; boolean u_done, v_done; long timer; timer = System.currentTimeMillis(); if (verbosity >= 1) mainLog.println(STR + (min1 ? "min" : "max") + (min2 ? "min" : "max") + ")..."); if (target.cardina... | /**
* Prob1 precomputation algorithm.
* i.e. determine the states of an STPG which, with min/max probability 1,
* reach a state in {@code target}, while remaining in those in @{code remain}.
* @param stpg The STPG
* @param remain Remain in these states (optional: null means "all")
* @param target Target sta... | Prob1 precomputation algorithm. i.e. determine the states of an STPG which, with min/max probability 1, reach a state in target, while remaining in those in @{code remain} | prob1 | {
"repo_name": "liuyuan216/prism",
"path": "src/explicit/STPGModelChecker.java",
"license": "gpl-2.0",
"size": 32121
} | [
"java.util.BitSet"
] | import java.util.BitSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,483,371 |
private static boolean codecNeedsFlushWorkaround(String name) {
return Util.SDK_INT < 18
|| (Util.SDK_INT == 18
&& ("OMX.SEC.avc.dec".equals(name) || "OMX.SEC.avc.dec.secure".equals(name)))
|| (Util.SDK_INT == 19 && Util.MODEL.startsWith("SM-G800")
&& ("OMX.Exynos.avc.dec".... | static boolean function(String name) { return Util.SDK_INT < 18 (Util.SDK_INT == 18 && (STR.equals(name) STR.equals(name))) (Util.SDK_INT == 19 && Util.MODEL.startsWith(STR) && (STR.equals(name) STR.equals(name))); } | /**
* Returns whether the decoder is known to fail when flushed.
* <p>
* If true is returned, the renderer will work around the issue by releasing the decoder and
* instantiating a new one rather than flushing the current instance.
*
* @param name The name of the decoder.
* @return True if the deco... | Returns whether the decoder is known to fail when flushed. If true is returned, the renderer will work around the issue by releasing the decoder and instantiating a new one rather than flushing the current instance | codecNeedsFlushWorkaround | {
"repo_name": "malizadehq/MyTelegram",
"path": "TMessagesProj/src/main/java/org/telegram/messenger/exoplayer/MediaCodecTrackRenderer.java",
"license": "gpl-2.0",
"size": 43764
} | [
"org.telegram.messenger.exoplayer.util.Util"
] | import org.telegram.messenger.exoplayer.util.Util; | import org.telegram.messenger.exoplayer.util.*; | [
"org.telegram.messenger"
] | org.telegram.messenger; | 2,447,509 |
public ImageView getHeaderBackgroundView() {
return mAccountHeaderBuilder.mAccountHeaderBackground;
} | ImageView function() { return mAccountHeaderBuilder.mAccountHeaderBackground; } | /**
* Returns the header background view so the dev can set everything on it
*
* @return
*/ | Returns the header background view so the dev can set everything on it | getHeaderBackgroundView | {
"repo_name": "McUsaVsUrss/MaterialDrawer",
"path": "library/src/main/java/com/mikepenz/materialdrawer/AccountHeader.java",
"license": "apache-2.0",
"size": 12758
} | [
"android.widget.ImageView"
] | import android.widget.ImageView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 2,583,034 |
public int safeExecuteAddedHooks() {
//the shutdown hook threads should still be checked against the sandbox
boolean safe = Sandbox.isSafeToExecuteSUTCode();
int n = -1;
assert !Sandbox.isSecurityManagerInitialized() || Sandbox.isOnAndExecutingSUTCode() :
"Executing hooks outside of a test case, but ... | int function() { boolean safe = Sandbox.isSafeToExecuteSUTCode(); int n = -1; assert !Sandbox.isSecurityManagerInitialized() Sandbox.isOnAndExecutingSUTCode() : STR; try{ if(!safe) { Sandbox.goingToExecuteUnsafeCodeOnSameThread(); } n = executeAddedHooks(); } catch(Throwable t) { logger.debug(STR+t); } finally { if(!sa... | /**
* Run {@link ShutdownHookHandler#executeAddedHooks()} in a try/catch
*
* @return a negative value if there was any exception
*/ | Run <code>ShutdownHookHandler#executeAddedHooks()</code> in a try/catch | safeExecuteAddedHooks | {
"repo_name": "sefaakca/EvoSuite-Sefa",
"path": "runtime/src/main/java/org/evosuite/runtime/jvm/ShutdownHookHandler.java",
"license": "lgpl-3.0",
"size": 5448
} | [
"org.evosuite.runtime.sandbox.Sandbox"
] | import org.evosuite.runtime.sandbox.Sandbox; | import org.evosuite.runtime.sandbox.*; | [
"org.evosuite.runtime"
] | org.evosuite.runtime; | 1,157,696 |
public void zero(){
Arrays.fill(this.state, (byte)0);
} | void function(){ Arrays.fill(this.state, (byte)0); } | /**
* Sets whole vector to zero.
*/ | Sets whole vector to zero | zero | {
"repo_name": "ph4r05/Whitebox-crypto-AES-java",
"path": "src/main/java/cz/muni/fi/xklinec/whiteboxAES/State.java",
"license": "bsd-3-clause",
"size": 11045
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,382,645 |
@Override
public final Map<String, JSType> getPropertyTypeMap() {
Map<String, JSType> propTypeMap = new LinkedHashMap<>();
updatePropertyTypeMap(this, propTypeMap, new HashSet<FunctionType>());
return propTypeMap;
} | final Map<String, JSType> function() { Map<String, JSType> propTypeMap = new LinkedHashMap<>(); updatePropertyTypeMap(this, propTypeMap, new HashSet<FunctionType>()); return propTypeMap; } | /**
* get the map of properties to types covered in a function type
*
* @return a Map that maps the property's name to the property's type
*/ | get the map of properties to types covered in a function type | getPropertyTypeMap | {
"repo_name": "tiobe/closure-compiler",
"path": "src/com/google/javascript/rhino/jstype/FunctionType.java",
"license": "apache-2.0",
"size": 52311
} | [
"java.util.HashSet",
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.util.HashSet; import java.util.LinkedHashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 611,180 |
protected void beforeConnect()
throws IOException {
// Bootstrap once for clients
if (!isConnected()) {
mContext.loadConfIfNotLoaded(mConfAddress);
}
} | void function() throws IOException { if (!isConnected()) { mContext.loadConfIfNotLoaded(mConfAddress); } } | /**
* This method is called before the connection is connected. Implementations should add any
* additional operations before the connection is connected.
* loading the cluster defaults
*/ | This method is called before the connection is connected. Implementations should add any additional operations before the connection is connected. loading the cluster defaults | beforeConnect | {
"repo_name": "EvilMcJerkface/alluxio",
"path": "core/common/src/main/java/alluxio/AbstractClient.java",
"license": "apache-2.0",
"size": 16232
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 146,688 |
public void testIteratorRemove() {
final ConcurrentSkipListSet q = new ConcurrentSkipListSet();
q.add(new Integer(2));
q.add(new Integer(1));
q.add(new Integer(3));
Iterator it = q.iterator();
it.next();
it.remove();
it = q.iterator();
assert... | void function() { final ConcurrentSkipListSet q = new ConcurrentSkipListSet(); q.add(new Integer(2)); q.add(new Integer(1)); q.add(new Integer(3)); Iterator it = q.iterator(); it.next(); it.remove(); it = q.iterator(); assertEquals(it.next(), new Integer(2)); assertEquals(it.next(), new Integer(3)); assertFalse(it.hasN... | /**
* iterator.remove removes current element
*/ | iterator.remove removes current element | testIteratorRemove | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jdk/test/java/util/concurrent/tck/ConcurrentSkipListSetTest.java",
"license": "gpl-2.0",
"size": 31925
} | [
"java.util.Iterator",
"java.util.concurrent.ConcurrentSkipListSet"
] | import java.util.Iterator; import java.util.concurrent.ConcurrentSkipListSet; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,348,907 |
public CacheConfiguration<K, V> setCopyOnRead(boolean cpOnRead) {
this.cpOnRead = cpOnRead;
return this;
}
/**
* Sets classes with methods annotated by {@link QuerySqlFunction} | CacheConfiguration<K, V> function(boolean cpOnRead) { this.cpOnRead = cpOnRead; return this; } /** * Sets classes with methods annotated by {@link QuerySqlFunction} | /**
* Sets copy on read flag.
*
* @param cpOnRead Copy on get flag.
* @see #isCopyOnRead
* @return {@code this} for chaining.
*/ | Sets copy on read flag | setCopyOnRead | {
"repo_name": "afinka77/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java",
"license": "apache-2.0",
"size": 98164
} | [
"org.apache.ignite.cache.query.annotations.QuerySqlFunction"
] | import org.apache.ignite.cache.query.annotations.QuerySqlFunction; | import org.apache.ignite.cache.query.annotations.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 498,934 |
public void writeDataSourceToFile() throws IOException {
ArrayList<DataSource> dataSources = new ArrayList<>();
if (phoneSensorDataSources == null) throw new NullPointerException();
if (phoneSensorDataSources.size() == 0) throw new EmptyStackException();
for (int i = 0; i < phoneSens... | void function() throws IOException { ArrayList<DataSource> dataSources = new ArrayList<>(); if (phoneSensorDataSources == null) throw new NullPointerException(); if (phoneSensorDataSources.size() == 0) throw new EmptyStackException(); for (int i = 0; i < phoneSensorDataSources.size(); i++) { if (!phoneSensorDataSources... | /**
* Iterates through the ArrayList of data sources, creates a <code>dataSourceBuilder</code> object,
* builds it, adds it to a new ArrayList that is then passed to <code>Configuration.write</code>.
*
* @throws IOException
*/ | Iterates through the ArrayList of data sources, creates a <code>dataSourceBuilder</code> object, builds it, adds it to a new ArrayList that is then passed to <code>Configuration.write</code> | writeDataSourceToFile | {
"repo_name": "MD2Korg/mCerebrum-PhoneSensor",
"path": "phonesensor/src/main/java/org/md2k/phonesensor/phone/sensors/PhoneSensorDataSources.java",
"license": "bsd-2-clause",
"size": 9613
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.EmptyStackException",
"org.md2k.datakitapi.source.datasource.DataSource",
"org.md2k.phonesensor.Configuration"
] | import java.io.IOException; import java.util.ArrayList; import java.util.EmptyStackException; import org.md2k.datakitapi.source.datasource.DataSource; import org.md2k.phonesensor.Configuration; | import java.io.*; import java.util.*; import org.md2k.datakitapi.source.datasource.*; import org.md2k.phonesensor.*; | [
"java.io",
"java.util",
"org.md2k.datakitapi",
"org.md2k.phonesensor"
] | java.io; java.util; org.md2k.datakitapi; org.md2k.phonesensor; | 269,131 |
private static void skipStream(InputStream in, long count) throws IOException {
long size = count;
long skipped = 0;
while (size > 0 && skipped >= 0) {
skipped = in.skip(size);
if (skipped != -1) {
size -= skipped;
}
}
} | static void function(InputStream in, long count) throws IOException { long size = count; long skipped = 0; while (size > 0 && skipped >= 0) { skipped = in.skip(size); if (skipped != -1) { size -= skipped; } } } | /**
* Skips the given number of bytes from the specified input stream.
*
* @param in
* the input stream
* @param count
* the number of bytes to skip
* @throws IOException
* if an IO error occurs
*/ | Skips the given number of bytes from the specified input stream | skipStream | {
"repo_name": "Red5/red5-io",
"path": "src/main/java/org/red5/io/mp3/impl/MP3Stream.java",
"license": "apache-2.0",
"size": 14580
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 223,802 |
public ArrayList<Mueble> getInventario(); | ArrayList<Mueble> function(); | /**
* Devuelve el inventario de muebles que se encuentran en el carrito
* @return inventario Lista con los muebles que se encuentran en el carrito
*/ | Devuelve el inventario de muebles que se encuentran en el carrito | getInventario | {
"repo_name": "diego41dc/laboratorio3",
"path": "Lab3-MueblesDeLosAlpes-ejb/src/java/com/losalpes/servicios/IServicioCarritoMockRemote.java",
"license": "gpl-2.0",
"size": 2226
} | [
"com.losalpes.entities.Mueble",
"java.util.ArrayList"
] | import com.losalpes.entities.Mueble; import java.util.ArrayList; | import com.losalpes.entities.*; import java.util.*; | [
"com.losalpes.entities",
"java.util"
] | com.losalpes.entities; java.util; | 1,460,326 |
public static String [] splitDelimitedString (
String list, String delimiter) {
if (list == null) {
return (null);
}
ArrayList<String> fields = new ArrayList<String>();
list = list.trim();
if (delimiter == null) {
delimiter = ";";
}
int delimeter_len = delimiter.length();
... | static String [] function ( String list, String delimiter) { if (list == null) { return (null); } ArrayList<String> fields = new ArrayList<String>(); list = list.trim(); if (delimiter == null) { delimiter = ";"; } int delimeter_len = delimiter.length(); int first_delim = 0; int next_delim = list.indexOf(delimiter, 1); ... | /**
* Splits up a delimited string into an array of strings. This
* differentiates itself from StringTokenizer in that the
* entire delimiter string is considered as the delimiter
* where StringTokenizer will tokenize on any character in
* the delimiter.
*
* @param list The delimited string to s... | Splits up a delimited string into an array of strings. This differentiates itself from StringTokenizer in that the entire delimiter string is considered as the delimiter where StringTokenizer will tokenize on any character in the delimiter | splitDelimitedString | {
"repo_name": "gmessner/ajf",
"path": "src/main/java/com/messners/ajf/util/StringUtils.java",
"license": "mit",
"size": 12288
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 700,210 |
@Test
public void testGetPassword() {
ClientRequestServerAddUserData instance = new ClientRequestServerAddUserData();
String password = "password";
instance.setPassword(password.getBytes());
byte[] result = instance.getPassword();
String password2 = new String(result);
... | void function() { ClientRequestServerAddUserData instance = new ClientRequestServerAddUserData(); String password = STR; instance.setPassword(password.getBytes()); byte[] result = instance.getPassword(); String password2 = new String(result); assertEquals(password, password2); } | /**
* Test of getPassword method, of class ClientRequestServerAddUserData.
*/ | Test of getPassword method, of class ClientRequestServerAddUserData | testGetPassword | {
"repo_name": "jimv39/qvcsos",
"path": "qvcse-qvcslib/src/test/java/com/qumasoft/qvcslib/requestdata/ClientRequestServerAddUserDataTest.java",
"license": "apache-2.0",
"size": 4124
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,099,050 |
public boolean searchFriendRequest(String senderusername, String receiverusername) throws IOException {
//want: to search both sender and receiver and the status being false
int found =0;
//Accounts result = new Accounts();
//Log.e("made it", "made it!");
HttpPost searchReque... | boolean function(String senderusername, String receiverusername) throws IOException { int found =0; HttpPost searchRequest = new HttpPost(SEARCHURL); String query = "{\"query\STRbool\STRmust\STRmatch\STRsender\STRSTR\STRmatch\STRreceiver\STRSTR\STRmatch\STRisAnswered\STRfalse\STR; StringEntity stringentity = new String... | /**
* returns true if there are any unanswered friend requests between user 1 and user 2
* @param senderusername
* @param receiverusername
* @return boolean
* @throws IOException
*/ | returns true if there are any unanswered friend requests between user 1 and user 2 | searchFriendRequest | {
"repo_name": "CMPUT301F15T06/GraceHoppers",
"path": "app/src/main/java/com/gracehoppers/jlovas/bookwrm/FriendRequestManager.java",
"license": "gpl-3.0",
"size": 14552
} | [
"android.util.Log",
"com.google.gson.JsonIOException",
"com.google.gson.JsonSyntaxException",
"com.google.gson.reflect.TypeToken",
"java.io.IOException",
"java.io.InputStreamReader",
"java.lang.reflect.Type",
"java.util.ArrayList",
"org.apache.http.HttpResponse",
"org.apache.http.client.ClientProt... | import android.util.Log; import com.google.gson.JsonIOException; import com.google.gson.JsonSyntaxException; import com.google.gson.reflect.TypeToken; import java.io.IOException; import java.io.InputStreamReader; import java.lang.reflect.Type; import java.util.ArrayList; import org.apache.http.HttpResponse; import org.... | import android.util.*; import com.google.gson.*; import com.google.gson.reflect.*; import java.io.*; import java.lang.reflect.*; import java.util.*; import org.apache.http.*; import org.apache.http.client.*; import org.apache.http.client.methods.*; import org.apache.http.entity.*; | [
"android.util",
"com.google.gson",
"java.io",
"java.lang",
"java.util",
"org.apache.http"
] | android.util; com.google.gson; java.io; java.lang; java.util; org.apache.http; | 502,341 |
@Override
public Application approveApplication(PerunSession session, Application app) throws PrivilegeException, GroupNotExistsException, MemberNotExistsException, ExternallyManagedException, WrongReferenceAttributeValueException, WrongAttributeValueException, RegistrarException, ExtSourceNotExistsException, Attri... | Application function(PerunSession session, Application app) throws PrivilegeException, GroupNotExistsException, MemberNotExistsException, ExternallyManagedException, WrongReferenceAttributeValueException, WrongAttributeValueException, RegistrarException, ExtSourceNotExistsException, AttributeNotExistsException, WrongAt... | /**
* Create proper UserExtSource
*/ | Create proper UserExtSource | approveApplication | {
"repo_name": "zlamalp/perun",
"path": "perun-registrar-lib/src/main/java/cz/metacentrum/perun/registrar/modules/LifeScienceHostelRI.java",
"license": "bsd-2-clause",
"size": 4455
} | [
"cz.metacentrum.perun.core.api.Attribute",
"cz.metacentrum.perun.core.api.AttributesManager",
"cz.metacentrum.perun.core.api.ExtSource",
"cz.metacentrum.perun.core.api.Member",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.User",
"cz.metacentrum.perun.core.api.UserExtSourc... | import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.AttributesManager; import cz.metacentrum.perun.core.api.ExtSource; import cz.metacentrum.perun.core.api.Member; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.User; import cz.metacentrum.perun.c... | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import cz.metacentrum.perun.core.bl.*; import cz.metacentrum.perun.registrar.exceptions.*; import cz.metacentrum.perun.registrar.model.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 1,215,383 |
public Properties parse(Reader reader) throws IOException; | Properties function(Reader reader) throws IOException; | /**
* Parses the data from the supplied {@link Reader}.
*
* @param reader
* The Reader from which to read the data.
* @throws IOException
* If an I/O error occurred while data was read from the
* InputStream.
*/ | Parses the data from the supplied <code>Reader</code> | parse | {
"repo_name": "blazegraph/database",
"path": "rdf-properties/src/main/java/com/bigdata/rdf/properties/PropertiesParser.java",
"license": "gpl-2.0",
"size": 3659
} | [
"java.io.IOException",
"java.io.Reader",
"java.util.Properties"
] | import java.io.IOException; import java.io.Reader; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 730,015 |
private String generateLicense() {
StringBuilder sb = new StringBuilder();
try {
FileReader fr = new FileReader(LICENSE_COMMENT_FILE_PATH);
BufferedReader br = new BufferedReader(fr);
String line;
while ((line = br.readLine()) != null) {
niprintln(sb, line);
}
fr.close();
br.close();
}... | String function() { StringBuilder sb = new StringBuilder(); try { FileReader fr = new FileReader(LICENSE_COMMENT_FILE_PATH); BufferedReader br = new BufferedReader(fr); String line; while ((line = br.readLine()) != null) { niprintln(sb, line); } fr.close(); br.close(); } catch (FileNotFoundException e) { throw new Runt... | /**
* Generates and returns the GPL license header in a comment, as Eclipse
* does whenever a new source file is created. The license is taken from
* src/license_in_comment.txt.
*/ | Generates and returns the GPL license header in a comment, as Eclipse does whenever a new source file is created. The license is taken from src/license_in_comment.txt | generateLicense | {
"repo_name": "malikoski/sqlpower-library",
"path": "src/apt/java/ca/sqlpower/object/annotation/SPAnnotationProcessor.java",
"license": "gpl-3.0",
"size": 72677
} | [
"java.io.BufferedReader",
"java.io.FileNotFoundException",
"java.io.FileReader",
"java.io.IOException"
] | import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,211,278 |
public void setGridBandPaint(Paint paint) {
if (paint == null) {
throw new IllegalArgumentException("Null 'paint' argument.");
}
this.gridBandPaint = paint;
notifyListeners(new AxisChangeEvent(this));
}
| void function(Paint paint) { if (paint == null) { throw new IllegalArgumentException(STR); } this.gridBandPaint = paint; notifyListeners(new AxisChangeEvent(this)); } | /**
* Sets the grid band paint and sends an {@link AxisChangeEvent} to
* all registered listeners.
*
* @param paint the paint (<code>null</code> not permitted).
*
* @see #getGridBandPaint()
*/ | Sets the grid band paint and sends an <code>AxisChangeEvent</code> to all registered listeners | setGridBandPaint | {
"repo_name": "linuxuser586/jfreechart",
"path": "source/org/jfree/chart/axis/SymbolAxis.java",
"license": "lgpl-2.1",
"size": 31029
} | [
"java.awt.Paint",
"org.jfree.chart.event.AxisChangeEvent"
] | import java.awt.Paint; import org.jfree.chart.event.AxisChangeEvent; | import java.awt.*; import org.jfree.chart.event.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 1,336,132 |
public static RemoteBlockReader newBlockReader(Socket sock, String file,
ExtendedBlock block, Token<BlockTokenIdentifier> blockToken,
long startOffset, long len, int bufferSize, boolean verifyChecksum,
String clientName) throws IOException {
// in and out will be closed when sock is closed (by t... | static RemoteBlockReader function(Socket sock, String file, ExtendedBlock block, Token<BlockTokenIdentifier> blockToken, long startOffset, long len, int bufferSize, boolean verifyChecksum, String clientName) throws IOException { final DataOutputStream out = new DataOutputStream(new BufferedOutputStream( NetUtils.getOut... | /**
* Create a new BlockReader specifically to satisfy a read.
* This method also sends the OP_READ_BLOCK request.
*
* @param sock
* An established Socket to the DN. The BlockReader will not close it
* normally
* @param file
* File location
* @param block
* The block object... | Create a new BlockReader specifically to satisfy a read. This method also sends the OP_READ_BLOCK request | newBlockReader | {
"repo_name": "srijeyanthan/hops",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/RemoteBlockReader.java",
"license": "apache-2.0",
"size": 17440
} | [
"java.io.BufferedInputStream",
"java.io.BufferedOutputStream",
"java.io.DataInputStream",
"java.io.DataOutputStream",
"java.io.IOException",
"java.net.Socket",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock",
"org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil",
"org.apache.hadoop.hd... | import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.net.Socket; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil; i... | import java.io.*; import java.net.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.protocol.datatransfer.*; import org.apache.hadoop.hdfs.protocol.proto.*; import org.apache.hadoop.hdfs.security.token.block.*; import org.apache.hadoop.hdfs.server.common.*; impo... | [
"java.io",
"java.net",
"org.apache.hadoop"
] | java.io; java.net; org.apache.hadoop; | 2,000,341 |
private static void append(String item, List<String> list) {
int i = list.size() - 1;
if (i < 0) {
list.add(item);
} else {
list.set(i, list.get(i) + item);
}
} | static void function(String item, List<String> list) { int i = list.size() - 1; if (i < 0) { list.add(item); } else { list.set(i, list.get(i) + item); } } | /**
* Appends the given item to the given list.
*
* @param item The item to be appended.
* @param list The list to append the item to.
*/ | Appends the given item to the given list | append | {
"repo_name": "Permafrost/Tundra.java",
"path": "src/main/java/permafrost/tundra/net/uri/URIPathHelper.java",
"license": "mit",
"size": 4014
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 413,550 |
private void testSmallScan(
Table table, boolean reversed, int rows, int columns) throws Exception {
Scan baseScan = new Scan();
baseScan.setReversed(reversed);
baseScan.setReadType(ReadType.PREAD);
Scan scan = new Scan(baseScan);
verifyExpectedCounts(table, scan, rows, columns);
scan ... | void function( Table table, boolean reversed, int rows, int columns) throws Exception { Scan baseScan = new Scan(); baseScan.setReversed(reversed); baseScan.setReadType(ReadType.PREAD); Scan scan = new Scan(baseScan); verifyExpectedCounts(table, scan, rows, columns); scan = new Scan(baseScan); scan.setMaxResultSize(1);... | /**
* Run through a variety of test configurations with a small scan
*/ | Run through a variety of test configurations with a small scan | testSmallScan | {
"repo_name": "mahak/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java",
"license": "apache-2.0",
"size": 33997
} | [
"org.apache.hadoop.hbase.client.Scan"
] | import org.apache.hadoop.hbase.client.Scan; | import org.apache.hadoop.hbase.client.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,560,888 |
public DataSet reverse() {
if (sort == null) {
throw new GroovyRuntimeException("reverse() only allowed immediately after a sort()");
}
return new DataSet(this);
} | DataSet function() { if (sort == null) { throw new GroovyRuntimeException(STR); } return new DataSet(this); } | /**
* Return a lazy-implemented reverse-ordered view of this DataSet.
*
* @return the view DataSet
*/ | Return a lazy-implemented reverse-ordered view of this DataSet | reverse | {
"repo_name": "dpolivaev/groovy",
"path": "subprojects/groovy-sql/src/main/java/groovy/sql/DataSet.java",
"license": "apache-2.0",
"size": 17977
} | [
"groovy.lang.GroovyRuntimeException"
] | import groovy.lang.GroovyRuntimeException; | import groovy.lang.*; | [
"groovy.lang"
] | groovy.lang; | 1,264,783 |
public void setColor(X3DColorNode val) {
if ( color == null ) {
color = (SFNode)getField( "color" );
}
color.setValue( val );
} | void function(X3DColorNode val) { if ( color == null ) { color = (SFNode)getField( "color" ); } color.setValue( val ); } | /** Set the color field.
* @param val The X3DColorNode to set. */ | Set the color field | setColor | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/xj3d/sai/internal/node/geospatial/SAIGeoElevationGrid.java",
"license": "gpl-2.0",
"size": 12438
} | [
"org.web3d.x3d.sai.SFNode",
"org.web3d.x3d.sai.X3DColorNode"
] | import org.web3d.x3d.sai.SFNode; import org.web3d.x3d.sai.X3DColorNode; | import org.web3d.x3d.sai.*; | [
"org.web3d.x3d"
] | org.web3d.x3d; | 2,034,881 |
public static int instancesInResultWithStatus(InstancesResult instancesResult,
InstancesResult.WorkflowStatus workflowStatus) {
InstancesResult.Instance[] instances = instancesResult.getInstances();
LOGGER.info("instances: " + Arrays.toString(instances));
List<InstancesResult.Wor... | static int function(InstancesResult instancesResult, InstancesResult.WorkflowStatus workflowStatus) { InstancesResult.Instance[] instances = instancesResult.getInstances(); LOGGER.info(STR + Arrays.toString(instances)); List<InstancesResult.WorkflowStatus> statuses = new ArrayList<InstancesResult.WorkflowStatus>(); for... | /**
* Check the number of instances in response which have the same status as expected.
*
* @param instancesResult kind of response from API which should contain information about
* instances
* @param workflowStatus expected status of instances
* @return number o... | Check the number of instances in response which have the same status as expected | instancesInResultWithStatus | {
"repo_name": "ajayyadav/Apache-Falcon",
"path": "falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java",
"license": "apache-2.0",
"size": 45772
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.Collections",
"java.util.List",
"org.apache.falcon.resource.InstancesResult"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.apache.falcon.resource.InstancesResult; | import java.util.*; import org.apache.falcon.resource.*; | [
"java.util",
"org.apache.falcon"
] | java.util; org.apache.falcon; | 663,932 |
private static boolean isInTheSameLoop(DetailAST ast1, DetailAST ast2) {
DetailAST loop1 = ast1.getParent();
while (loop1 != null && !isLoopAst(loop1.getType())) {
loop1 = loop1.getParent();
}
DetailAST loop2 = ast2.getParent();
while (loop2 != null && !isLoopAst(... | static boolean function(DetailAST ast1, DetailAST ast2) { DetailAST loop1 = ast1.getParent(); while (loop1 != null && !isLoopAst(loop1.getType())) { loop1 = loop1.getParent(); } DetailAST loop2 = ast2.getParent(); while (loop2 != null && !isLoopAst(loop2.getType())) { loop2 = loop2.getParent(); } return loop1 != null &... | /**
* Check if both the variables are in the same loop.
* @param ast1 variable to compare.
* @param ast2 variable to compare.
* @return true if both the variables are in the same loop.
*/ | Check if both the variables are in the same loop | isInTheSameLoop | {
"repo_name": "jonmbake/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/FinalLocalVariableCheck.java",
"license": "lgpl-2.1",
"size": 29087
} | [
"com.puppycrawl.tools.checkstyle.api.DetailAST"
] | import com.puppycrawl.tools.checkstyle.api.DetailAST; | import com.puppycrawl.tools.checkstyle.api.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 280,748 |
@Override
public Object convert(final Class type, final Object value) {
// Deal with a null value
if (value == null) {
if (useDefault) {
return (defaultValue);
} else {
throw new ConversionException("No value specified");
}
... | Object function(final Class type, final Object value) { if (value == null) { if (useDefault) { return (defaultValue); } else { throw new ConversionException(STR); } } if (MODEL.getClass() == value.getClass()) { return (value); } if (strings.getClass() == value.getClass()) { try { final String[] values = (String[]) valu... | /**
* Convert the specified input object into an output object of the
* specified type.
*
* @param type Data type to which this value should be converted
* @param value The input value to be converted
* @return the converted value
*
* @throws ConversionException if conversion can... | Convert the specified input object into an output object of the specified type | convert | {
"repo_name": "yippeesoft/NotifyTools",
"path": "beanutils/src/main/java/org/apache/commons/beanutils/converters/ShortArrayConverter.java",
"license": "apache-2.0",
"size": 4682
} | [
"java.util.List",
"org.apache.commons.beanutils.ConversionException"
] | import java.util.List; import org.apache.commons.beanutils.ConversionException; | import java.util.*; import org.apache.commons.beanutils.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 954,160 |
Map<String, ? extends EObject> getFacetsMapOf(EObject s); | Map<String, ? extends EObject> getFacetsMapOf(EObject s); | /**
* Gets the facets map of a statement
*
* @param s
* the s
* @return the facets map of
*/ | Gets the facets map of a statement | getFacetsMapOf | {
"repo_name": "gama-platform/gama",
"path": "msi.gama.core/src/msi/gaml/compilation/IGamlEcoreUtils.java",
"license": "gpl-3.0",
"size": 2748
} | [
"java.util.Map",
"org.eclipse.emf.ecore.EObject"
] | import java.util.Map; import org.eclipse.emf.ecore.EObject; | import java.util.*; import org.eclipse.emf.ecore.*; | [
"java.util",
"org.eclipse.emf"
] | java.util; org.eclipse.emf; | 962,438 |
public void mouseEntered(MouseEvent e) {
} | void function(MouseEvent e) { } | /** Unused event handler.
* @param e The mouse event.
*/ | Unused event handler | mouseEntered | {
"repo_name": "Salmela/particles",
"path": "Particles_maven/src/org/tiralab/particles/gui/Window.java",
"license": "gpl-2.0",
"size": 10090
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,731,445 |
public Builder addAllExpand(List<String> elements) {
if (this.expand == null) {
this.expand = new ArrayList<>();
}
this.expand.addAll(elements);
return this;
} | Builder function(List<String> elements) { if (this.expand == null) { this.expand = new ArrayList<>(); } this.expand.addAll(elements); return this; } | /**
* Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
* subsequent calls adds additional elements to the original list. See {@link
* ReportTypeRetrieveParams#expand} for the field documentation.
*/ | Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See <code>ReportTypeRetrieveParams#expand</code> for the field documentation | addAllExpand | {
"repo_name": "stripe/stripe-java",
"path": "src/main/java/com/stripe/param/reporting/ReportTypeRetrieveParams.java",
"license": "mit",
"size": 3425
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 797,822 |
@Generated(hash = 713229351)
public void update() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.update(this);
} | @Generated(hash = 713229351) void function() { if (myDao == null) { throw new DaoException(STR); } myDao.update(this); } | /**
* Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
* Entity must attached to an entity context.
*/ | Convenient call for <code>org.greenrobot.greendao.AbstractDao#update(Object)</code>. Entity must attached to an entity context | update | {
"repo_name": "chat-sdk/chat-sdk-android",
"path": "chat-sdk-core/src/main/java/sdk/chat/core/dao/UserMetaValue.java",
"license": "apache-2.0",
"size": 4128
} | [
"org.greenrobot.greendao.DaoException",
"org.greenrobot.greendao.annotation.Generated"
] | import org.greenrobot.greendao.DaoException; import org.greenrobot.greendao.annotation.Generated; | import org.greenrobot.greendao.*; import org.greenrobot.greendao.annotation.*; | [
"org.greenrobot.greendao"
] | org.greenrobot.greendao; | 1,648,256 |
String addCompositeApiFromDefinition(InputStream apiDefinition) throws APIManagementException; | String addCompositeApiFromDefinition(InputStream apiDefinition) throws APIManagementException; | /**
* Create Composite API from Swagger Definition
*
* @param apiDefinition Swagger content of the Composite API.
* @return Details of the added Composite API.
* @throws APIManagementException If failed to add Composite API.
*/ | Create Composite API from Swagger Definition | addCompositeApiFromDefinition | {
"repo_name": "rswijesena/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/api/APIStore.java",
"license": "apache-2.0",
"size": 20425
} | [
"java.io.InputStream",
"org.wso2.carbon.apimgt.core.exception.APIManagementException"
] | import java.io.InputStream; import org.wso2.carbon.apimgt.core.exception.APIManagementException; | import java.io.*; import org.wso2.carbon.apimgt.core.exception.*; | [
"java.io",
"org.wso2.carbon"
] | java.io; org.wso2.carbon; | 2,564,777 |
public static JCGLBlendFunction blendFunctionFromGL(
final int type)
{
switch (type) {
case GL2ES2.GL_CONSTANT_ALPHA:
return JCGLBlendFunction.BLEND_CONSTANT_ALPHA;
case GL2ES2.GL_CONSTANT_COLOR:
return JCGLBlendFunction.BLEND_CONSTANT_COLOR;
case GL.GL_DST_ALPHA:
r... | static JCGLBlendFunction function( final int type) { switch (type) { case GL2ES2.GL_CONSTANT_ALPHA: return JCGLBlendFunction.BLEND_CONSTANT_ALPHA; case GL2ES2.GL_CONSTANT_COLOR: return JCGLBlendFunction.BLEND_CONSTANT_COLOR; case GL.GL_DST_ALPHA: return JCGLBlendFunction.BLEND_DESTINATION_ALPHA; case GL.GL_DST_COLOR: r... | /**
* Convert blend functions from GL constants.
*
* @param type The GL constant.
*
* @return The value.
*/ | Convert blend functions from GL constants | blendFunctionFromGL | {
"repo_name": "io7m/jcanephora",
"path": "com.io7m.jcanephora.jogl/src/main/java/com/io7m/jcanephora/jogl/JOGLTypeConversions.java",
"license": "isc",
"size": 42369
} | [
"com.io7m.jcanephora.core.JCGLBlendFunction",
"com.io7m.junreachable.UnreachableCodeException"
] | import com.io7m.jcanephora.core.JCGLBlendFunction; import com.io7m.junreachable.UnreachableCodeException; | import com.io7m.jcanephora.core.*; import com.io7m.junreachable.*; | [
"com.io7m.jcanephora",
"com.io7m.junreachable"
] | com.io7m.jcanephora; com.io7m.junreachable; | 1,399,557 |
JRootPane rootPane = new JRootPane();
javax.swing.Action escapeAction = new AbstractAction("ESCAPE") {
private static final long serialVersionUID = -4036804004190858925L; | JRootPane rootPane = new JRootPane(); javax.swing.Action escapeAction = new AbstractAction(STR) { private static final long serialVersionUID = -4036804004190858925L; | /**
* Allow Dialog to be closed by ESC key
*/ | Allow Dialog to be closed by ESC key | createRootPane | {
"repo_name": "ra0077/jmeter",
"path": "src/core/org/apache/jmeter/functions/gui/FunctionHelper.java",
"license": "apache-2.0",
"size": 8932
} | [
"javax.swing.AbstractAction",
"javax.swing.Action",
"javax.swing.JRootPane"
] | import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.JRootPane; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 248,205 |
final List<JSONObject> ret = new ArrayList<>();
try {
List<JSONObject> cachedTags = tagCache.getTags();
Collections.sort(cachedTags, (o1, o2) -> o2.optInt(Tag.TAG_LINK_CNT) - o1.optInt(Tag.TAG_LINK_CNT));
for (final JSONObject cachedTag : cachedTags) {
cache... | final List<JSONObject> ret = new ArrayList<>(); try { List<JSONObject> cachedTags = tagCache.getTags(); Collections.sort(cachedTags, (o1, o2) -> o2.optInt(Tag.TAG_LINK_CNT) - o1.optInt(Tag.TAG_LINK_CNT)); for (final JSONObject cachedTag : cachedTags) { cachedTags = cachedTags.size() > TAG_MAX_COUNT ? cachedTags.subList... | /**
* Gets user's nice links.
*
* @param userId the specified user id
* @return a list of tags with links, each of tag like this, <pre>
* {
* "tagTitle": "",
* "tagIconPath": "",
* "tagLinks: [{
* "linkAddr": "",
* "linkTitle": "",
... | Gets user's nice links | getUserForgedLinks | {
"repo_name": "BrickCat/symphony",
"path": "src/main/java/org/b3log/symphony/service/LinkForgeQueryService.java",
"license": "gpl-3.0",
"size": 7042
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"org.b3log.latke.Keys",
"org.b3log.latke.logging.Level",
"org.b3log.symphony.model.Tag",
"org.json.JSONObject"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.b3log.latke.Keys; import org.b3log.latke.logging.Level; import org.b3log.symphony.model.Tag; import org.json.JSONObject; | import java.util.*; import org.b3log.latke.*; import org.b3log.latke.logging.*; import org.b3log.symphony.model.*; import org.json.*; | [
"java.util",
"org.b3log.latke",
"org.b3log.symphony",
"org.json"
] | java.util; org.b3log.latke; org.b3log.symphony; org.json; | 726,927 |
EOperation getRole__AddAssignLoc__Location(); | EOperation getRole__AddAssignLoc__Location(); | /**
* Returns the meta object for the '{@link LRBAC.Role#AddAssignLoc(LRBAC.Location) <em>Add Assign Loc</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the '<em>Add Assign Loc</em>' operation.
* @see LRBAC.Role#AddAssignLoc(LRBAC.Location)
* @generated
*/ | Returns the meta object for the '<code>LRBAC.Role#AddAssignLoc(LRBAC.Location) Add Assign Loc</code>' operation. | getRole__AddAssignLoc__Location | {
"repo_name": "arnobl/kompren",
"path": "kompren-examples/LRBAC.model/src/LRBAC/LRBACPackage.java",
"license": "epl-1.0",
"size": 47810
} | [
"org.eclipse.emf.ecore.EOperation"
] | import org.eclipse.emf.ecore.EOperation; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,761,856 |
protected String buildDeleteAnnouncementContext(VelocityPortlet portlet, Context context, RunData rundata,
AnnouncementActionState state)
{
Vector v = state.getDelete_messages();
if (v == null) v = new Vector();
context.put("delete_messages", v.iterator());
try
{
Site site = SiteService.getSite(Too... | String function(VelocityPortlet portlet, Context context, RunData rundata, AnnouncementActionState state) { Vector v = state.getDelete_messages(); if (v == null) v = new Vector(); context.put(STR, v.iterator()); try { Site site = SiteService.getSite(ToolManager.getCurrentPlacement().getContext()); context.put("site", s... | /**
* Build the context for asking for the delete confirmation
*/ | Build the context for asking for the delete confirmation | buildDeleteAnnouncementContext | {
"repo_name": "ouit0408/sakai",
"path": "announcement/announcement-tool/tool/src/java/org/sakaiproject/announcement/tool/AnnouncementAction.java",
"license": "apache-2.0",
"size": 173337
} | [
"java.util.Vector",
"org.sakaiproject.cheftool.Context",
"org.sakaiproject.cheftool.RunData",
"org.sakaiproject.cheftool.VelocityPortlet",
"org.sakaiproject.exception.IdUnusedException",
"org.sakaiproject.message.api.MessageHeader",
"org.sakaiproject.site.api.Site",
"org.sakaiproject.site.cover.SiteSe... | import java.util.Vector; import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.cheftool.VelocityPortlet; import org.sakaiproject.exception.IdUnusedException; import org.sakaiproject.message.api.MessageHeader; import org.sakaiproject.site.api.Site; import org.sakaipr... | import java.util.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.exception.*; import org.sakaiproject.message.api.*; import org.sakaiproject.site.api.*; import org.sakaiproject.site.cover.*; import org.sakaiproject.tool.cover.*; | [
"java.util",
"org.sakaiproject.cheftool",
"org.sakaiproject.exception",
"org.sakaiproject.message",
"org.sakaiproject.site",
"org.sakaiproject.tool"
] | java.util; org.sakaiproject.cheftool; org.sakaiproject.exception; org.sakaiproject.message; org.sakaiproject.site; org.sakaiproject.tool; | 1,241,872 |
public static TypedBytesOutput get(DataOutput out) {
TypedBytesOutput bout = (TypedBytesOutput) tbOut.get();
bout.setDataOutput(out);
return bout;
}
public TypedBytesOutput(DataOutput out) {
this.out = out;
} | static TypedBytesOutput function(DataOutput out) { TypedBytesOutput bout = (TypedBytesOutput) tbOut.get(); bout.setDataOutput(out); return bout; } public TypedBytesOutput(DataOutput out) { this.out = out; } | /**
* Get a thread-local typed bytes output for the supplied {@link DataOutput}.
*
* @param out data output object
* @return typed bytes output corresponding to the supplied
* {@link DataOutput}.
*/ | Get a thread-local typed bytes output for the supplied <code>DataOutput</code> | get | {
"repo_name": "tseen/Federated-HDFS",
"path": "tseenliu/FedHDFS-hadoop-src/hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/typedbytes/TypedBytesOutput.java",
"license": "apache-2.0",
"size": 8485
} | [
"java.io.DataOutput"
] | import java.io.DataOutput; | import java.io.*; | [
"java.io"
] | java.io; | 1,195,192 |
public String getToolTip(Point point)
{
GraphicalContainer drawInstruct;
StringBuilder tipText = new StringBuilder();
drawInstruct = contains(point);
if(drawInstruct != null)
{
tipText.append("<html>");
tipText.append(drawInstruct.getToolTip());
... | String function(Point point) { GraphicalContainer drawInstruct; StringBuilder tipText = new StringBuilder(); drawInstruct = contains(point); if(drawInstruct != null) { tipText.append(STR); tipText.append(drawInstruct.getToolTip()); tipText.append(STR); return(tipText.toString()); } return(null); } | /**
* Returns tool tip data.
*
* @param point
* @return
*/ | Returns tool tip data | getToolTip | {
"repo_name": "David-dp-/intentionperception-wayang-visualizer",
"path": "src/Wayang/GUI/Glazier/Draw/DrawList.java",
"license": "mit",
"size": 15895
} | [
"java.awt.Point"
] | import java.awt.Point; | import java.awt.*; | [
"java.awt"
] | java.awt; | 150,018 |
private void testCostSegments(ResourceAssignment assignment, Date startDate, TimescaleUnits units, double[] expected)
{
testCostSegments(assignment, assignment.getTimephasedCost(), startDate, units, expected);
} | void function(ResourceAssignment assignment, Date startDate, TimescaleUnits units, double[] expected) { testCostSegments(assignment, assignment.getTimephasedCost(), startDate, units, expected); } | /**
* Common method used to test timephased assignment segments against expected data.
*
* @param assignment parent resource assignment
* @param startDate start date for segments
* @param units units of duration for each segment
* @param expected array of expected durations for each segment
... | Common method used to test timephased assignment segments against expected data | testCostSegments | {
"repo_name": "tmyroadctfig/mpxj",
"path": "net/sf/mpxj/junit/TimephasedSegmentTest2.java",
"license": "lgpl-2.1",
"size": 21926
} | [
"java.util.Date",
"net.sf.mpxj.ResourceAssignment",
"net.sf.mpxj.mpp.TimescaleUnits"
] | import java.util.Date; import net.sf.mpxj.ResourceAssignment; import net.sf.mpxj.mpp.TimescaleUnits; | import java.util.*; import net.sf.mpxj.*; import net.sf.mpxj.mpp.*; | [
"java.util",
"net.sf.mpxj"
] | java.util; net.sf.mpxj; | 1,829,692 |
public boolean supports(ConfigAttribute attribute) {
return true;
} | boolean function(ConfigAttribute attribute) { return true; } | /**
* Always returns true, as this manager does not support any
* config attributes.
*/ | Always returns true, as this manager does not support any config attributes | supports | {
"repo_name": "Eisler/cosmo",
"path": "cosmo-core/src/main/java/org/unitedinternet/cosmo/dav/acegisecurity/DavAccessDecisionManager.java",
"license": "apache-2.0",
"size": 9918
} | [
"org.springframework.security.access.ConfigAttribute"
] | import org.springframework.security.access.ConfigAttribute; | import org.springframework.security.access.*; | [
"org.springframework.security"
] | org.springframework.security; | 1,614,794 |
protected void assignIndices() {
List<PLSQLargument> inArguments = getArguments(arguments, IN);
List<PLSQLargument> inOutArguments = getArguments(arguments, INOUT);
inArguments.addAll(inOutArguments);
int newIndex = 1;
List<PLSQLargument> expandedArguments = new ArrayLis... | void function() { List<PLSQLargument> inArguments = getArguments(arguments, IN); List<PLSQLargument> inOutArguments = getArguments(arguments, INOUT); inArguments.addAll(inOutArguments); int newIndex = 1; List<PLSQLargument> expandedArguments = new ArrayList<PLSQLargument>(); for (ListIterator<PLSQLargument> inArgsIter ... | /**
* INTERNAL compute the re-ordered indices - Do the IN args first, then the
* 'IN-half' of the INOUT args next, the OUT args, then the 'OUT-half' of
* the INOUT args
*/ | INTERNAL compute the re-ordered indices - Do the IN args first, then the 'IN-half' of the INOUT args next, the OUT args, then the 'OUT-half' of the INOUT args | assignIndices | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/platform/database/oracle/plsql/PLSQLStoredProcedureCall.java",
"license": "epl-1.0",
"size": 58729
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.ListIterator",
"org.eclipse.persistence.internal.helper.ComplexDatabaseType",
"org.eclipse.persistence.internal.helper.DatabaseType",
"org.eclipse.persistence.mappings.structures.ObjectRelationalDatabaseField",
"org.eclipse.persistence.platform.databas... | import java.util.ArrayList; import java.util.List; import java.util.ListIterator; import org.eclipse.persistence.internal.helper.ComplexDatabaseType; import org.eclipse.persistence.internal.helper.DatabaseType; import org.eclipse.persistence.mappings.structures.ObjectRelationalDatabaseField; import org.eclipse.persiste... | import java.util.*; import org.eclipse.persistence.internal.helper.*; import org.eclipse.persistence.mappings.structures.*; import org.eclipse.persistence.platform.database.oracle.jdbc.*; import org.eclipse.persistence.platform.database.oracle.plsql.*; | [
"java.util",
"org.eclipse.persistence"
] | java.util; org.eclipse.persistence; | 953,375 |
public Assertion newAssertion(final List<Statement> authnStatement, final String issuer,
final ZonedDateTime issuedAt, final String id) {
val assertion = newSamlObject(Assertion.class);
assertion.setID(id);
assertion.setIssueInstant(DateTimeUtils.dateTimeOf(... | Assertion function(final List<Statement> authnStatement, final String issuer, final ZonedDateTime issuedAt, final String id) { val assertion = newSamlObject(Assertion.class); assertion.setID(id); assertion.setIssueInstant(DateTimeUtils.dateTimeOf(issuedAt)); assertion.setIssuer(newIssuer(issuer)); assertion.getStatemen... | /**
* Create a new SAML1 response object.
*
* @param authnStatement the authn statement
* @param issuer the issuer
* @param issuedAt the issued at
* @param id the id
* @return the assertion
*/ | Create a new SAML1 response object | newAssertion | {
"repo_name": "robertoschwald/cas",
"path": "support/cas-server-support-saml/src/main/java/org/apereo/cas/support/saml/util/AbstractSaml20ObjectBuilder.java",
"license": "apache-2.0",
"size": 16819
} | [
"java.time.ZonedDateTime",
"java.util.List",
"org.apereo.cas.util.DateTimeUtils",
"org.opensaml.saml.saml2.core.Assertion",
"org.opensaml.saml.saml2.core.Statement"
] | import java.time.ZonedDateTime; import java.util.List; import org.apereo.cas.util.DateTimeUtils; import org.opensaml.saml.saml2.core.Assertion; import org.opensaml.saml.saml2.core.Statement; | import java.time.*; import java.util.*; import org.apereo.cas.util.*; import org.opensaml.saml.saml2.core.*; | [
"java.time",
"java.util",
"org.apereo.cas",
"org.opensaml.saml"
] | java.time; java.util; org.apereo.cas; org.opensaml.saml; | 1,000,437 |
static public void dumpInfo(String file, PrintStream out, Configuration conf)
throws IOException {
final int maxKeySampleLen = 16;
Path path = new Path(file);
FileSystem fs = path.getFileSystem(conf);
long length = fs.getFileStatus(path).getLen();
FSDataInputStream fsdis = fs.open(path);
TFile.Reader ... | static void function(String file, PrintStream out, Configuration conf) throws IOException { final int maxKeySampleLen = 16; Path path = new Path(file); FileSystem fs = path.getFileSystem(conf); long length = fs.getFileStatus(path).getLen(); FSDataInputStream fsdis = fs.open(path); TFile.Reader reader = new TFile.Reader... | /**
* Dump information about TFile.
*
* @param file
* Path string of the TFile
* @param out
* PrintStream to output the information.
* @param conf
* The configuration object.
* @throws IOException
*/ | Dump information about TFile | dumpInfo | {
"repo_name": "shot/hadoop-source-reading",
"path": "src/core/org/apache/hadoop/io/file/tfile/TFileDumper.java",
"license": "apache-2.0",
"size": 11413
} | [
"java.io.IOException",
"java.io.PrintStream",
"java.util.Collection",
"java.util.Iterator",
"java.util.LinkedHashMap",
"java.util.Map",
"java.util.Set",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FSDataInputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path... | import java.io.IOException; import java.io.PrintStream; import java.util.Collection; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; ... | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.*; import org.apache.hadoop.io.file.tfile.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 786,696 |
public void done() throws IOException {
// Nothing for this guy
} | void function() throws IOException { } | /**
* Signifies that we are done with this <code>ClassFileLoader</code>
*/ | Signifies that we are done with this <code>ClassFileLoader</code> | done | {
"repo_name": "AlterRS/Deobfuscator",
"path": "deps/EDU/purdue/cs/bloat/file/ClassFileLoader.java",
"license": "mit",
"size": 12869
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,919,181 |
public int distribute(OTP oOtp, IUser oUser)
throws OAException, OTPDistributorException
{
// Are we operational?
if (!_bStarted) {
throw new OAException(SystemErrors.ERROR_NOT_INITIALIZED);
}
String sMsg;
String sRecipient;
IAttributes oUserAttributes;
int returncode = 15;
// Establish the ... | int function(OTP oOtp, IUser oUser) throws OAException, OTPDistributorException { if (!_bStarted) { throw new OAException(SystemErrors.ERROR_NOT_INITIALIZED); } String sMsg; String sRecipient; IAttributes oUserAttributes; int returncode = 15; oUserAttributes = oUser.getAttributes(); if (! oUserAttributes.contains(_sPho... | /**
* Distribute the OTP to the user<br/>
* Requires a configured attribute to be present in the User's Attributes()-collection to
* establish the phonenr to send the OneTimePassword to!<br/>
* Updates Otp-instance to reflect the result of distributing the password (timessent, timesent)
*
... | Distribute the OTP to the user Requires a configured attribute to be present in the User's Attributes()-collection to establish the phonenr to send the OneTimePassword to! Updates Otp-instance to reflect the result of distributing the password (timessent, timesent) Sources inspired by A-Select SMS AuthSP | distribute | {
"repo_name": "GluuFederation/Asimba",
"path": "asimba-am-smsotp/src/main/java/org/asimba/auth/smsotp/distributor/mollie/MollieOTPDistributor.java",
"license": "agpl-3.0",
"size": 9586
} | [
"com.alfaariss.oa.OAException",
"com.alfaariss.oa.SystemErrors",
"com.alfaariss.oa.api.attribute.IAttributes",
"com.alfaariss.oa.api.user.IUser",
"java.io.BufferedReader",
"java.io.InputStreamReader",
"java.io.OutputStreamWriter",
"java.net.URLConnection",
"java.net.URLEncoder",
"java.util.ArrayLi... | import com.alfaariss.oa.OAException; import com.alfaariss.oa.SystemErrors; import com.alfaariss.oa.api.attribute.IAttributes; import com.alfaariss.oa.api.user.IUser; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.URLConnection; import java.net.URLEnco... | import com.alfaariss.oa.*; import com.alfaariss.oa.api.attribute.*; import com.alfaariss.oa.api.user.*; import java.io.*; import java.net.*; import java.util.*; import org.apache.commons.lang3.*; import org.asimba.auth.smsotp.distributor.*; | [
"com.alfaariss.oa",
"java.io",
"java.net",
"java.util",
"org.apache.commons",
"org.asimba.auth"
] | com.alfaariss.oa; java.io; java.net; java.util; org.apache.commons; org.asimba.auth; | 95,793 |
public AbstractActor getActor() {
AbstractArgumentOption argOption;
Flow flow = new Flow();
try {
List<Actor> actors = new ArrayList<Actor>();
// Flow.NewRemoteCommand
NewRemoteCommand newremotecommand = new NewRemoteCommand();
SystemInfo systeminfo = new SystemInfo()... | AbstractActor function() { AbstractArgumentOption argOption; Flow flow = new Flow(); try { List<Actor> actors = new ArrayList<Actor>(); NewRemoteCommand newremotecommand = new NewRemoteCommand(); SystemInfo systeminfo = new SystemInfo(); DefaultConnection defaultconnection = new DefaultConnection(); systeminfo.setRespo... | /**
* Used to create an instance of a specific actor.
*
* @return a suitably configured <code>AbstractActor</code> value
*/ | Used to create an instance of a specific actor | getActor | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/test/java/adams/flow/sink/RemoteCommandWriterTest.java",
"license": "gpl-3.0",
"size": 4366
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,286,408 |
private File findFileName(FTPClient ftp) {
FTPFile [] theFiles = null;
final int maxIterations = 1000;
for (int counter = 1; counter < maxIterations; counter++) {
File localFile = FILE_UTILS.createTempFile(
"ant" + Integer.to... | File function(FTPClient ftp) { FTPFile [] theFiles = null; final int maxIterations = 1000; for (int counter = 1; counter < maxIterations; counter++) { File localFile = FILE_UTILS.createTempFile( "ant" + Integer.toString(counter), ".tmp", null, false, false); String fileName = localFile.getName(); boolean found = false;... | /**
* find a suitable name for local and remote temporary file
*/ | find a suitable name for local and remote temporary file | findFileName | {
"repo_name": "BIORIMP/biorimp",
"path": "BIO-RIMP/test_data/code/antapache/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTaskMirrorImpl.java",
"license": "gpl-2.0",
"size": 78515
} | [
"java.io.File",
"java.io.IOException",
"org.apache.commons.net.ftp.FTPClient",
"org.apache.commons.net.ftp.FTPFile",
"org.apache.tools.ant.BuildException"
] | import java.io.File; import java.io.IOException; import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.net.ftp.FTPFile; import org.apache.tools.ant.BuildException; | import java.io.*; import org.apache.commons.net.ftp.*; import org.apache.tools.ant.*; | [
"java.io",
"org.apache.commons",
"org.apache.tools"
] | java.io; org.apache.commons; org.apache.tools; | 2,009,852 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.