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
@Metadata(label = "producer", enums = "1,2", description = "Specifies the delivery mode to be used." + " Possibles values are those defined by javax.jms.DeliveryMode." + " NON_PERSISTENT = 1 and PERSISTENT = 2.") public void setDeliveryMode(Integer deliveryMod...
@Metadata(label = STR, enums = "1,2", description = STR + STR + STR) void function(Integer deliveryMode) { getConfiguration().setDeliveryMode(deliveryMode); }
/** * Specifies the delivery mode to be used. Possible values are * Possibles values are those defined by javax.jms.DeliveryMode. * NON_PERSISTENT = 1 and PERSISTENT = 2. */
Specifies the delivery mode to be used. Possible values are Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2
setDeliveryMode
{ "repo_name": "lburgazzoli/apache-camel", "path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java", "license": "apache-2.0", "size": 74918 }
[ "org.apache.camel.spi.Metadata" ]
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
267,776
Enumeration getPrefixes () { if (prefixTable == null) { return EMPTY_ENUMERATION; } else { return Collections.enumeration(prefixTable.keySet()); } } //////////////////////////////////////////////////////////////// ...
Enumeration getPrefixes () { if (prefixTable == null) { return EMPTY_ENUMERATION; } else { return Collections.enumeration(prefixTable.keySet()); } }
/** * Return an enumeration of all prefixes currently in force. * * <p>The default prefix, if in force, is <em>not</em> * returned, and will have to be checked for separately.</p> * * @return An enumeration of prefixes (never empty). * @see org.xml.sax.help...
Return an enumeration of all prefixes currently in force. The default prefix, if in force, is not returned, and will have to be checked for separately
getPrefixes
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/org/xml/sax/helpers/NamespaceSupport.java", "license": "apache-2.0", "size": 28061 }
[ "java.util.Collections", "java.util.Enumeration" ]
import java.util.Collections; import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
45,515
public static <T> UnmodifiableIterator<T> singletonIterator(@Nullable final T value) { return new UnmodifiableIterator<T>() { boolean done;
static <T> UnmodifiableIterator<T> function(@Nullable final T value) { return new UnmodifiableIterator<T>() { boolean done;
/** * Returns an iterator containing only {@code value}. * * <p>The {@link Iterable} equivalent of this method is {@link * Collections#singleton}. */
Returns an iterator containing only value. The <code>Iterable</code> equivalent of this method is <code>Collections#singleton</code>
singletonIterator
{ "repo_name": "deerwalk/voltdb", "path": "third_party/java/src/com/google_voltpatches/common/collect/Iterators.java", "license": "agpl-3.0", "size": 45286 }
[ "javax.annotation_voltpatches.Nullable" ]
import javax.annotation_voltpatches.Nullable;
import javax.annotation_voltpatches.*;
[ "javax.annotation_voltpatches" ]
javax.annotation_voltpatches;
2,537,901
public final boolean isIdentical(final CompilationTimeStamp timestamp, final ArrayDimension other) { if (other == null) { return true; } check(timestamp); other.check(timestamp); if (getIsErroneous(timestamp) || other.getIsErroneous(timestamp)) { return true; } return getSize() == other.getSize...
final boolean function(final CompilationTimeStamp timestamp, final ArrayDimension other) { if (other == null) { return true; } check(timestamp); other.check(timestamp); if (getIsErroneous(timestamp) other.getIsErroneous(timestamp)) { return true; } return getSize() == other.getSize() && getOffset() == other.getOffset()...
/** * Returns whether this dimension is identical to the one received as * parameter. * * @param timestamp the time stamp of the actual semantic check cycle. * @param other the dimension to check against * @return true if they are identical, false otherwise * */
Returns whether this dimension is identical to the one received as parameter
isIdentical
{ "repo_name": "alovassy/titan.EclipsePlug-ins", "path": "org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/values/ArrayDimension.java", "license": "epl-1.0", "size": 6166 }
[ "org.eclipse.titan.designer.parsers.CompilationTimeStamp" ]
import org.eclipse.titan.designer.parsers.CompilationTimeStamp;
import org.eclipse.titan.designer.parsers.*;
[ "org.eclipse.titan" ]
org.eclipse.titan;
2,228,194
void registerDictionary(Locale locale, ISpellDictionary dictionary);
void registerDictionary(Locale locale, ISpellDictionary dictionary);
/** * Registers a dictionary tuned for the specified locale with this engine. * * @param locale * The locale to register the dictionary with * @param dictionary * The dictionary to register */
Registers a dictionary tuned for the specified locale with this engine
registerDictionary
{ "repo_name": "fabioz/eclipse.spellchecker", "path": "src/eclipse/spellchecker/engine/ISpellCheckEngine.java", "license": "epl-1.0", "size": 2592 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
1,769,200
public static WideCommunity of(WideCommunityAttrHeader wideCommunityHeader, int community, int localAsn, int contextAsn, WideCommunityTarget target, WideCommunityExcludeTarget excludeTarget, WideCommunityParameter parameter) { ret...
static WideCommunity function(WideCommunityAttrHeader wideCommunityHeader, int community, int localAsn, int contextAsn, WideCommunityTarget target, WideCommunityExcludeTarget excludeTarget, WideCommunityParameter parameter) { return new WideCommunity(wideCommunityHeader, community, localAsn, contextAsn, target, exclude...
/** * Returns object of this class with specified values. * * @param wideCommunityHeader community header * @param community wide community * @param localAsn local ASN number * @param contextAsn context ASN number * @param target wide community include target * @param excludeTarg...
Returns object of this class with specified values
of
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/attr/WideCommunity.java", "license": "apache-2.0", "size": 15657 }
[ "org.onosproject.bgpio.types.WideCommunityAttrHeader", "org.onosproject.bgpio.types.WideCommunityExcludeTarget", "org.onosproject.bgpio.types.WideCommunityParameter", "org.onosproject.bgpio.types.WideCommunityTarget" ]
import org.onosproject.bgpio.types.WideCommunityAttrHeader; import org.onosproject.bgpio.types.WideCommunityExcludeTarget; import org.onosproject.bgpio.types.WideCommunityParameter; import org.onosproject.bgpio.types.WideCommunityTarget;
import org.onosproject.bgpio.types.*;
[ "org.onosproject.bgpio" ]
org.onosproject.bgpio;
2,465,341
public static int getIndex(String pathPart) throws JDOMException { int rslt = 0; // Verify the syntax. The index should have only digits // between '[' and ']', and it should be at the end of // the path part. int lbracket = pathPart.indexOf('['); int rbracket = pathPart.indexOf(']'); if (rbracket =...
static int function(String pathPart) throws JDOMException { int rslt = 0; int lbracket = pathPart.indexOf('['); int rbracket = pathPart.indexOf(']'); if (rbracket == pathPart.length() - 1) { String numStr = pathPart.substring(lbracket+1, rbracket); try { rslt = Integer.parseInt(numStr); } catch (NumberFormatException e...
/** * <p>Given a part of a path like "foobar[5]" or "self::node()[5]" * return the index value.</p> * * <p>NOTE: The value will be converted from the origin-1 index * used by Xpath to an origin-0 value.</p> */
Given a part of a path like "foobar[5]" or "self::node()[5]" return the index value. used by Xpath to an origin-0 value
getIndex
{ "repo_name": "OpenWIS/openwis", "path": "openwis-metadataportal/jeeves/src/main/java/jeeves/utils/XPath.java", "license": "gpl-3.0", "size": 21641 }
[ "org.jdom.JDOMException" ]
import org.jdom.JDOMException;
import org.jdom.*;
[ "org.jdom" ]
org.jdom;
1,779,466
public void getData() { if ( input.getGaAppName() != null ) { wGaAppName.setText( input.getGaAppName() ); } wOauthAccount.setText( Const.NVL( input.getOAuthServiceAccount(), "" ) ); keyFilename.setText( Const.NVL( input.getOAuthKeyFile(), "" ) ); if ( input.getGaProfileName() != null ) { ...
void function() { if ( input.getGaAppName() != null ) { wGaAppName.setText( input.getGaAppName() ); } wOauthAccount.setText( Const.NVL( input.getOAuthServiceAccount(), STRSTR" ); setActive(); wStepname.selectAll(); wStepname.setFocus(); }
/** * Collect data from the meta and place it in the dialog */
Collect data from the meta and place it in the dialog
getData
{ "repo_name": "gretchiemoran/pentaho-kettle", "path": "plugins/googleanalytics/src/org/pentaho/di/ui/trans/steps/googleanalytics/GaInputStepDialog.java", "license": "apache-2.0", "size": 61996 }
[ "org.pentaho.di.core.Const" ]
import org.pentaho.di.core.Const;
import org.pentaho.di.core.*;
[ "org.pentaho.di" ]
org.pentaho.di;
717,235
@Override public void process() throws WorkflowException { // Get the process instance UpdatableProcessInstance instance = (UpdatableProcessInstance) event.getProcessInstance(); ProcessInstanceManager instanceManager = WorkflowHub.getProcessInstanceManager(); Database db = null; UpdatableHisto...
void function() throws WorkflowException { UpdatableProcessInstance instance = (UpdatableProcessInstance) event.getProcessInstance(); ProcessInstanceManager instanceManager = WorkflowHub.getProcessInstanceManager(); Database db = null; UpdatableHistoryStep step = null; try { db = WorkflowJDOManager.getDatabase(); db.be...
/** * Method declaration */
Method declaration
process
{ "repo_name": "ebonnet/Silverpeas-Core", "path": "core-services/workflow/src/main/java/org/silverpeas/core/workflow/engine/WorkflowEngineThread.java", "license": "agpl-3.0", "size": 39455 }
[ "java.util.Date", "org.exolab.castor.jdo.Database", "org.exolab.castor.jdo.PersistenceException", "org.silverpeas.core.workflow.api.ProcessInstanceManager", "org.silverpeas.core.workflow.api.WorkflowException", "org.silverpeas.core.workflow.api.instance.UpdatableHistoryStep", "org.silverpeas.core.workfl...
import java.util.Date; import org.exolab.castor.jdo.Database; import org.exolab.castor.jdo.PersistenceException; import org.silverpeas.core.workflow.api.ProcessInstanceManager; import org.silverpeas.core.workflow.api.WorkflowException; import org.silverpeas.core.workflow.api.instance.UpdatableHistoryStep; import org.si...
import java.util.*; import org.exolab.castor.jdo.*; import org.silverpeas.core.workflow.api.*; import org.silverpeas.core.workflow.api.instance.*; import org.silverpeas.core.workflow.engine.instance.*; import org.silverpeas.core.workflow.engine.jdo.*;
[ "java.util", "org.exolab.castor", "org.silverpeas.core" ]
java.util; org.exolab.castor; org.silverpeas.core;
1,298,481
public final TupleOutput writePackedInt(int val) { makeSpace(PackedInteger.MAX_LENGTH); int oldLen = getBufferLength(); int newLen = PackedInteger.writeInt(getBufferBytes(), oldLen, val); addSize(newLen - oldLen); return this; }
final TupleOutput function(int val) { makeSpace(PackedInteger.MAX_LENGTH); int oldLen = getBufferLength(); int newLen = PackedInteger.writeInt(getBufferBytes(), oldLen, val); addSize(newLen - oldLen); return this; }
/** * Writes an unsorted packed integer. * * @see <a href="package-summary.html#integerFormats">Integer Formats</a> */
Writes an unsorted packed integer
writePackedInt
{ "repo_name": "prat0318/dbms", "path": "mini_dbms/je-5.0.103/src/com/sleepycat/bind/tuple/TupleOutput.java", "license": "mit", "size": 24458 }
[ "com.sleepycat.util.PackedInteger" ]
import com.sleepycat.util.PackedInteger;
import com.sleepycat.util.*;
[ "com.sleepycat.util" ]
com.sleepycat.util;
2,018,980
public void setProject(ManagedApiProject project) { this.project = project; }
void function(ManagedApiProject project) { this.project = project; }
/** * Provides access to the current project (as a ManagedApiProject) */
Provides access to the current project (as a ManagedApiProject)
setProject
{ "repo_name": "google-code-export/google-plugin-for-eclipse", "path": "plugins/com.google.gdt.eclipse.managedapis/src/com/google/gdt/eclipse/managedapis/impl/ManagedApiListingSourceFactory.java", "license": "epl-1.0", "size": 4949 }
[ "com.google.gdt.eclipse.managedapis.ManagedApiProject" ]
import com.google.gdt.eclipse.managedapis.ManagedApiProject;
import com.google.gdt.eclipse.managedapis.*;
[ "com.google.gdt" ]
com.google.gdt;
2,058,847
@Override @Test public void futureFailedMigrationIgnoreAvailableMigrations() throws Exception { flyway.setValidateOnMigrate(false); flyway.setLocations(getFutureFailedLocation()); flyway.baseline(); try { flyway.migrate(); fail(); } catch (Fly...
void function() throws Exception { flyway.setValidateOnMigrate(false); flyway.setLocations(getFutureFailedLocation()); flyway.baseline(); try { flyway.migrate(); fail(); } catch (FlywayException e) { } flyway.setIgnoreFailedFutureMigration(true); try { flyway.migrate(); fail(); } catch (FlywayException e) { if (dbSuppo...
/** * Override futureFailedMigrationIgnoreAvailableMigrations. Setting schema and table space in SQL. * * @throws Exception */
Override futureFailedMigrationIgnoreAvailableMigrations. Setting schema and table space in SQL
futureFailedMigrationIgnoreAvailableMigrations
{ "repo_name": "nathanvick/flyway", "path": "flyway-core/src/test/java/org/flywaydb/core/internal/dbsupport/db2zos/DB2zOSMigrationMediumTest.java", "license": "apache-2.0", "size": 31639 }
[ "org.flywaydb.core.api.FlywayException", "org.junit.Assert" ]
import org.flywaydb.core.api.FlywayException; import org.junit.Assert;
import org.flywaydb.core.api.*; import org.junit.*;
[ "org.flywaydb.core", "org.junit" ]
org.flywaydb.core; org.junit;
2,911,271
public void sortSelectedIndexes() { Collections.sort(prototypeIndexes); }
void function() { Collections.sort(prototypeIndexes); }
/** * Sorts selected indexes. */
Sorts selected indexes
sortSelectedIndexes
{ "repo_name": "datapoet/hubminer", "path": "src/main/java/preprocessing/instance_selection/InstanceSelector.java", "license": "gpl-3.0", "size": 19585 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
2,627,300
@SuppressWarnings({ "rawtypes", "unchecked" }) private TypeFrom findManagedType(From root, ManagedType model, String fieldName) { // Remove @SupressWarnings and add the correct generic types to all operations. TypeFrom pair = new TypeFrom(); // Navigate through the entities using the dots. Joins have ...
@SuppressWarnings({ STR, STR }) TypeFrom function(From root, ManagedType model, String fieldName) { TypeFrom pair = new TypeFrom(); pair.type = model; pair.from = root; int idx = fieldName.indexOf('.'); while (idx != -1) { String firstField = fieldName.substring(0, idx); SingularAttribute attr = pair.type.getSingularAt...
/** * Finds the Criteria API's managed type for a query, given the string that would specify the field name if the * query were in JPQL. * * @param root * The root of the criteria query. * @param model * The entity model of the root of the query (the DAO's managed class). ...
Finds the Criteria API's managed type for a query, given the string that would specify the field name if the query were in JPQL
findManagedType
{ "repo_name": "manzoli2122/Vip", "path": "src/br/ufes/inf/nemo/jbutler/ejb/persistence/BaseJPADAO.java", "license": "apache-2.0", "size": 32771 }
[ "javax.persistence.criteria.From", "javax.persistence.metamodel.EntityType", "javax.persistence.metamodel.ManagedType", "javax.persistence.metamodel.SingularAttribute", "javax.persistence.metamodel.Type" ]
import javax.persistence.criteria.From; import javax.persistence.metamodel.EntityType; import javax.persistence.metamodel.ManagedType; import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.Type;
import javax.persistence.criteria.*; import javax.persistence.metamodel.*;
[ "javax.persistence" ]
javax.persistence;
908,374
public Position getPositionByUserId(final Long userId) { Assignment assignment; assignment = assignmentService.getPrimaryAssignmentForUser(userId); if (assignment != null) return assignment.getPosition(); return null; }
Position function(final Long userId) { Assignment assignment; assignment = assignmentService.getPrimaryAssignmentForUser(userId); if (assignment != null) return assignment.getPosition(); return null; }
/** * Returns employee position for user * * @param userId * @return Position object */
Returns employee position for user
getPositionByUserId
{ "repo_name": "egovernments/egov-playground", "path": "eGov/egov/egov-eis/src/main/java/org/egov/eis/service/PositionMasterService.java", "license": "gpl-3.0", "size": 12899 }
[ "org.egov.eis.entity.Assignment", "org.egov.pims.commons.Position" ]
import org.egov.eis.entity.Assignment; import org.egov.pims.commons.Position;
import org.egov.eis.entity.*; import org.egov.pims.commons.*;
[ "org.egov.eis", "org.egov.pims" ]
org.egov.eis; org.egov.pims;
527,634
@Deprecated void copyResource(String resourcePath, String destinationPath, String newName) throws XMLDBException;
void copyResource(String resourcePath, String destinationPath, String newName) throws XMLDBException;
/** * Copy a Resource. * * @param resourcePath the source resource. * @param destinationPath the destination collection. * @param newName the new name in the destination collection. * * @deprecated Use XmldbURI version instead. * * @throws XMLDBException if an error occurs w...
Copy a Resource
copyResource
{ "repo_name": "windauer/exist", "path": "exist-core/src/main/java/org/exist/xmldb/EXistCollectionManagementService.java", "license": "lgpl-2.1", "size": 7226 }
[ "org.xmldb.api.base.XMLDBException" ]
import org.xmldb.api.base.XMLDBException;
import org.xmldb.api.base.*;
[ "org.xmldb.api" ]
org.xmldb.api;
2,178,114
return new Sha1Hash(alert.getTarget()); }
return new Sha1Hash(alert.getTarget()); }
/** * The target hash of the immutable item. This must * match the sha-1 hash of the bencoded form of the item. * * @return the target of the original query */
The target hash of the immutable item. This must match the sha-1 hash of the bencoded form of the item
target
{ "repo_name": "gubatron/frostwire-jlibtorrent", "path": "src/main/java/com/frostwire/jlibtorrent/alerts/DhtImmutableItemAlert.java", "license": "mit", "size": 1057 }
[ "com.frostwire.jlibtorrent.Sha1Hash" ]
import com.frostwire.jlibtorrent.Sha1Hash;
import com.frostwire.jlibtorrent.*;
[ "com.frostwire.jlibtorrent" ]
com.frostwire.jlibtorrent;
2,248,717
public void test_formatLjava_lang_String$Ljava_lang_Object_FloatDoubleBigDecimalNullConversion() { Formatter f = null; // test (Float)null f = new Formatter(Locale.FRANCE); f.format("%#- (9.0e", (Float) null); assertEquals(" ", f.toString()); f = new Formatt...
public void test_formatLjava_lang_String$Ljava_lang_Object_FloatDoubleBigDecimalNullConversion() { Formatter f = null; f = new Formatter(Locale.FRANCE); f.format(STR, (Float) null); assertEquals(" ", f.toString()); f = new Formatter(Locale.GERMAN); f.format(STR, (Float) null); assertEquals("NULL", f.toString()); f = ne...
/** * java.util.Formatter#format(String, Object...) for null argment for * Float/Double/BigDecimal conversion */
java.util.Formatter#format(String, Object...) for null argment for Float/Double/BigDecimal conversion
test_formatLjava_lang_String$Ljava_lang_Object_FloatDoubleBigDecimalNullConversion
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "harmony-tests/src/test/java/org/apache/harmony/tests/java/util/FormatterTest.java", "license": "gpl-2.0", "size": 189226 }
[ "java.math.BigDecimal", "java.util.Formatter", "java.util.Locale" ]
import java.math.BigDecimal; import java.util.Formatter; import java.util.Locale;
import java.math.*; import java.util.*;
[ "java.math", "java.util" ]
java.math; java.util;
2,387,226
public String getCastTypeName(int code) { return getTypeName( code, Column.DEFAULT_LENGTH, Column.DEFAULT_PRECISION, Column.DEFAULT_SCALE ); }
String function(int code) { return getTypeName( code, Column.DEFAULT_LENGTH, Column.DEFAULT_PRECISION, Column.DEFAULT_SCALE ); }
/** * Get the name of the database type appropriate for casting operations * (via the CAST() SQL function) for the given {@link java.sql.Types} typecode. * * @param code The {@link java.sql.Types} typecode * @return The database type name */
Get the name of the database type appropriate for casting operations (via the CAST() SQL function) for the given <code>java.sql.Types</code> typecode
getCastTypeName
{ "repo_name": "kevin-chen-hw/LDAE", "path": "com.huawei.soa.ldae/src/main/java/org/hibernate/dialect/Dialect.java", "license": "lgpl-2.1", "size": 93279 }
[ "org.hibernate.mapping.Column" ]
import org.hibernate.mapping.Column;
import org.hibernate.mapping.*;
[ "org.hibernate.mapping" ]
org.hibernate.mapping;
1,336,922
private Scan getScanner() throws IOException { return new Scan().addFamily(Bytes.toBytes(HBaseTableConstants.COLLECTION_TABLE_COLUMN_INTR)); }
Scan function() throws IOException { return new Scan().addFamily(Bytes.toBytes(HBaseTableConstants.COLLECTION_TABLE_COLUMN_INTR)); }
/** * Return a scanner for rating column in the user table. Also filters on * @return * @throws IOException */
Return a scanner for rating column in the user table. Also filters on
getScanner
{ "repo_name": "beeldengeluid/zieook", "path": "backend/zieook-backend/zieook-inx/zieook-runner/src/main/java/nl/gridline/zieook/runners/movielens/CollectionExportTool.java", "license": "apache-2.0", "size": 3772 }
[ "java.io.IOException", "nl.gridline.zieook.mapreduce.HBaseTableConstants", "org.apache.hadoop.hbase.client.Scan", "org.apache.hadoop.hbase.util.Bytes" ]
import java.io.IOException; import nl.gridline.zieook.mapreduce.HBaseTableConstants; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.util.Bytes;
import java.io.*; import nl.gridline.zieook.mapreduce.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "nl.gridline.zieook", "org.apache.hadoop" ]
java.io; nl.gridline.zieook; org.apache.hadoop;
711,324
static String prettyFormat(String input) { // Prepare input and output stream Source xmlInput = new StreamSource(new StringReader(input)); StringWriter stringWriter = new StringWriter(); StreamResult xmlOutput = new StreamResult(stringWriter); // Create transformer T...
static String prettyFormat(String input) { Source xmlInput = new StreamSource(new StringReader(input)); StringWriter stringWriter = new StringWriter(); StreamResult xmlOutput = new StreamResult(stringWriter); TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = null; try {...
/** * Converts xml string to pretty format. * * @param input xml string to be converted to pretty format * @return pretty format xml string */
Converts xml string to pretty format
prettyFormat
{ "repo_name": "sdnwiselab/onos", "path": "apps/netconf/client/src/main/java/org/onosproject/netconf/client/impl/Utils.java", "license": "apache-2.0", "size": 4611 }
[ "java.io.StringReader", "java.io.StringWriter", "javax.xml.transform.OutputKeys", "javax.xml.transform.Source", "javax.xml.transform.Transformer", "javax.xml.transform.TransformerConfigurationException", "javax.xml.transform.TransformerException", "javax.xml.transform.TransformerFactory", "javax.xml...
import java.io.StringReader; import java.io.StringWriter; import javax.xml.transform.OutputKeys; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.Transforme...
import java.io.*; import javax.xml.transform.*; import javax.xml.transform.stream.*;
[ "java.io", "javax.xml" ]
java.io; javax.xml;
189,619
public ConstructionStage getConstructionStage() { return constructionStage; }
ConstructionStage function() { return constructionStage; }
/** * Gets the mission's construction stage. * * @return construction stage. */
Gets the mission's construction stage
getConstructionStage
{ "repo_name": "mars-sim/mars-sim", "path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/mission/BuildingSalvageMission.java", "license": "gpl-3.0", "size": 24327 }
[ "org.mars_sim.msp.core.structure.construction.ConstructionStage" ]
import org.mars_sim.msp.core.structure.construction.ConstructionStage;
import org.mars_sim.msp.core.structure.construction.*;
[ "org.mars_sim.msp" ]
org.mars_sim.msp;
245,659
public JdbcInput withOptions(Collection<Option> newValue) { this.options = Arguments.freezeToSet(newValue); return this; }
JdbcInput function(Collection<Option> newValue) { this.options = Arguments.freezeToSet(newValue); return this; }
/** * Sets a new value for {@link #getOptions()}. * @param newValue the value to set * @return this */
Sets a new value for <code>#getOptions()</code>
withOptions
{ "repo_name": "ashigeru/asakusafw-compiler", "path": "dag/compiler/extension-windgate/src/test/java/com/asakusafw/dag/compiler/extension/windgate/testing/JdbcInput.java", "license": "apache-2.0", "size": 3618 }
[ "com.asakusafw.lang.utils.common.Arguments", "java.util.Collection" ]
import com.asakusafw.lang.utils.common.Arguments; import java.util.Collection;
import com.asakusafw.lang.utils.common.*; import java.util.*;
[ "com.asakusafw.lang", "java.util" ]
com.asakusafw.lang; java.util;
2,350,289
public HandlerRegistration addSortHandler(SortHandler<T> handler) { return addHandler(handler, SortEvent.getType()); }
HandlerRegistration function(SortHandler<T> handler) { return addHandler(handler, SortEvent.getType()); }
/** * Register a GWT event handler for a sorting event. This handler gets * called whenever this Grid needs its data source to provide data sorted in * a specific order. * * @param handler * a sort event handler * @return the registration for the event */
Register a GWT event handler for a sorting event. This handler gets called whenever this Grid needs its data source to provide data sorted in a specific order
addSortHandler
{ "repo_name": "travisfw/vaadin", "path": "client/src/com/vaadin/client/widgets/Grid.java", "license": "apache-2.0", "size": 285859 }
[ "com.google.gwt.event.shared.HandlerRegistration", "com.vaadin.client.widget.grid.sort.SortEvent", "com.vaadin.client.widget.grid.sort.SortHandler" ]
import com.google.gwt.event.shared.HandlerRegistration; import com.vaadin.client.widget.grid.sort.SortEvent; import com.vaadin.client.widget.grid.sort.SortHandler;
import com.google.gwt.event.shared.*; import com.vaadin.client.widget.grid.sort.*;
[ "com.google.gwt", "com.vaadin.client" ]
com.google.gwt; com.vaadin.client;
2,033,152
public Query like(int docNum) throws IOException { if (fieldNames == null) { // gather list of valid fields from lucene Collection fields = ir.getFieldNames( IndexReader.FieldOption.INDEXED); fieldNames = (String[]) fields.toArray(new String[fields.size()]); } ...
Query function(int docNum) throws IOException { if (fieldNames == null) { Collection fields = ir.getFieldNames( IndexReader.FieldOption.INDEXED); fieldNames = (String[]) fields.toArray(new String[fields.size()]); } return createQuery(retrieveTerms(docNum)); }
/** * Return a query that will return docs like the passed lucene document ID. * * @param docNum the documentID of the lucene doc to generate the 'More Like This" query for. * @return a query that will return docs like the passed lucene document ID. */
Return a query that will return docs like the passed lucene document ID
like
{ "repo_name": "Overruler/retired-apache-sources", "path": "lucene-2.9.4/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java", "license": "apache-2.0", "size": 31934 }
[ "java.io.IOException", "java.util.Collection", "org.apache.lucene.index.IndexReader", "org.apache.lucene.search.Query" ]
import java.io.IOException; import java.util.Collection; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.Query;
import java.io.*; import java.util.*; import org.apache.lucene.index.*; import org.apache.lucene.search.*;
[ "java.io", "java.util", "org.apache.lucene" ]
java.io; java.util; org.apache.lucene;
1,777,387
EClass getUniform();
EClass getUniform();
/** * Returns the meta object for class '{@link klaper.probability.Uniform <em>Uniform</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Uniform</em>'. * @see klaper.probability.Uniform * @generated */
Returns the meta object for class '<code>klaper.probability.Uniform Uniform</code>'.
getUniform
{ "repo_name": "aciancone/klapersuite", "path": "klapersuite.metamodel.klaper/src/klaper/probability/ProbabilityPackage.java", "license": "epl-1.0", "size": 22788 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
350,967
public static Float convertFontStretch(Element e) { Value v = CSSUtilities.getComputedStyle (e, SVGCSSEngine.FONT_STRETCH_INDEX); String s = v.getStringValue(); switch (s.charAt(0)) { case 'u': if (s.charAt(6) == 'c') { return TextAttribute.WID...
static Float function(Element e) { Value v = CSSUtilities.getComputedStyle (e, SVGCSSEngine.FONT_STRETCH_INDEX); String s = v.getStringValue(); switch (s.charAt(0)) { case 'u': if (s.charAt(6) == 'c') { return TextAttribute.WIDTH_CONDENSED; } else { return TextAttribute.WIDTH_EXTENDED; } case 'e': if (s.charAt(6) == 'c...
/** * Converts the font-stretch CSS value to a float value. * @param e the element */
Converts the font-stretch CSS value to a float value
convertFontStretch
{ "repo_name": "apache/batik", "path": "batik-bridge/src/main/java/org/apache/batik/bridge/TextUtilities.java", "license": "apache-2.0", "size": 11542 }
[ "java.awt.font.TextAttribute", "org.apache.batik.css.engine.SVGCSSEngine", "org.apache.batik.css.engine.value.Value", "org.w3c.dom.Element" ]
import java.awt.font.TextAttribute; import org.apache.batik.css.engine.SVGCSSEngine; import org.apache.batik.css.engine.value.Value; import org.w3c.dom.Element;
import java.awt.font.*; import org.apache.batik.css.engine.*; import org.apache.batik.css.engine.value.*; import org.w3c.dom.*;
[ "java.awt", "org.apache.batik", "org.w3c.dom" ]
java.awt; org.apache.batik; org.w3c.dom;
2,791,872
public synchronized boolean removePin(Uri uri, String pkg) { Set<String> pins = getPins(uri); if (pins.isEmpty() || !pins.contains(pkg)) { return false; } pins.remove(pkg); setPins(uri, pins); setSpecs(uri, new ArraySet<SliceSpec>()); return pins.s...
synchronized boolean function(Uri uri, String pkg) { Set<String> pins = getPins(uri); if (pins.isEmpty() !pins.contains(pkg)) { return false; } pins.remove(pkg); setPins(uri, pins); setSpecs(uri, new ArraySet<SliceSpec>()); return pins.size() == 0; }
/** * Removes a pin for a specific uri/pkg pair and returns true if the * uri is no longer pinned (but was). */
Removes a pin for a specific uri/pkg pair and returns true if the uri is no longer pinned (but was)
removePin
{ "repo_name": "AndroidX/androidx", "path": "slice/slice-core/src/main/java/androidx/slice/compat/CompatPinnedList.java", "license": "apache-2.0", "size": 6950 }
[ "android.net.Uri", "androidx.collection.ArraySet", "androidx.slice.SliceSpec", "java.util.Set" ]
import android.net.Uri; import androidx.collection.ArraySet; import androidx.slice.SliceSpec; import java.util.Set;
import android.net.*; import androidx.collection.*; import androidx.slice.*; import java.util.*;
[ "android.net", "androidx.collection", "androidx.slice", "java.util" ]
android.net; androidx.collection; androidx.slice; java.util;
20,496
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException { try { // The object that we're modifying here is a copy of the original! // So let's change the filename from relati...
String function(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException { try { if (!fileNameInField) { if (!Const.isEmpty(fileName)) { FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(fil...
/** * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively. * So what this does is turn the name of the base path into an absolute path. */
Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively. So what this does is turn the name of the base path into an absolute path
exportResources
{ "repo_name": "yintaoxue/read-open-source-code", "path": "kettle4.3/src/org/pentaho/di/trans/steps/textfileoutput/TextFileOutputMeta.java", "license": "apache-2.0", "size": 42830 }
[ "java.util.Map", "org.apache.commons.vfs.FileObject", "org.pentaho.di.core.Const", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.core.variables.VariableSpace", "org.pentaho.di.core.vfs.KettleVFS", "org.pentaho.di.repository.Repository", "org.pentaho.di.resource.ResourceDefinition", ...
import java.util.Map; import org.apache.commons.vfs.FileObject; import org.pentaho.di.core.Const; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.variables.VariableSpace; import org.pentaho.di.core.vfs.KettleVFS; import org.pentaho.di.repository.Repository; import org.pentaho.di.resourc...
import java.util.*; import org.apache.commons.vfs.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.variables.*; import org.pentaho.di.core.vfs.*; import org.pentaho.di.repository.*; import org.pentaho.di.resource.*;
[ "java.util", "org.apache.commons", "org.pentaho.di" ]
java.util; org.apache.commons; org.pentaho.di;
872,919
@VisibleForTesting(visibility=Visibility.PRIVATE) protected List<Archive> installArchives(final List<ArchiveInfo> archives, final int flags) { if (mTaskFactory == null) { throw new IllegalArgumentException("Task Factory is null"); } // this will accumulate all the packages i...
@VisibleForTesting(visibility=Visibility.PRIVATE) List<Archive> function(final List<ArchiveInfo> archives, final int flags) { if (mTaskFactory == null) { throw new IllegalArgumentException(STR); } final List<Archive> newlyInstalledArchives = new ArrayList<Archive>(); final boolean forceHttp = getSettingsController().ge...
/** * Install the list of given {@link Archive}s. This is invoked by the user selecting some * packages in the remote page and then clicking "install selected". * * @param archives The archives to install. Incompatible ones will be skipped. * @param flags Optional flags for the installer, such ...
Install the list of given <code>Archive</code>s. This is invoked by the user selecting some packages in the remote page and then clicking "install selected"
installArchives
{ "repo_name": "rex-xxx/mt6572_x201", "path": "sdk/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/UpdaterData.java", "license": "gpl-2.0", "size": 45714 }
[ "com.android.annotations.VisibleForTesting", "com.android.sdklib.internal.repository.archives.Archive", "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import com.android.annotations.VisibleForTesting; import com.android.sdklib.internal.repository.archives.Archive; import java.util.ArrayList; import java.util.Collections; import java.util.List;
import com.android.annotations.*; import com.android.sdklib.internal.repository.archives.*; import java.util.*;
[ "com.android.annotations", "com.android.sdklib", "java.util" ]
com.android.annotations; com.android.sdklib; java.util;
880,974
public Metadata getAllMetadata() { return (Metadata) mProfiles.get(Profiles.NAMESPACES.metadata); }
Metadata function() { return (Metadata) mProfiles.get(Profiles.NAMESPACES.metadata); }
/** * Returns all metadata attributes for the file * * @return Metadata */
Returns all metadata attributes for the file
getAllMetadata
{ "repo_name": "pegasus-isi/pegasus", "path": "src/edu/isi/pegasus/planner/classes/ADag.java", "license": "apache-2.0", "size": 34906 }
[ "edu.isi.pegasus.planner.catalog.classes.Profiles", "edu.isi.pegasus.planner.namespace.Metadata" ]
import edu.isi.pegasus.planner.catalog.classes.Profiles; import edu.isi.pegasus.planner.namespace.Metadata;
import edu.isi.pegasus.planner.catalog.classes.*; import edu.isi.pegasus.planner.namespace.*;
[ "edu.isi.pegasus" ]
edu.isi.pegasus;
1,042,768
public void setFlagChilds() { msg.setHTML(Main.i18n("filebrowser.status.refresh.document")); flag_getChilds = true; refresh(); }
void function() { msg.setHTML(Main.i18n(STR)); flag_getChilds = true; refresh(); }
/** * Set childs flag */
Set childs flag
setFlagChilds
{ "repo_name": "papamas/DMS-KANGREG-XI-MANADO", "path": "src/main/java/com/openkm/frontend/client/widget/findsimilar/Status.java", "license": "gpl-3.0", "size": 3199 }
[ "com.openkm.frontend.client.Main" ]
import com.openkm.frontend.client.Main;
import com.openkm.frontend.client.*;
[ "com.openkm.frontend" ]
com.openkm.frontend;
1,487,730
public void error(String domain, String key, XMLParseException exception) throws XNIException { if (fErrorHandler != null) { SAXParseException saxException = createSAXParseException(exception); try { fErrorHandler.error(saxExcep...
void function(String domain, String key, XMLParseException exception) throws XNIException { if (fErrorHandler != null) { SAXParseException saxException = createSAXParseException(exception); try { fErrorHandler.error(saxException); } catch (SAXParseException e) { throw createXMLParseException(e); } catch (SAXException e...
/** * Reports an error. Errors are non-fatal and usually signify that the * document is invalid with respect to its grammar(s). * * @param domain The domain of the error. The domain can be any * string but is suggested to be a valid URI. The * domain ca...
Reports an error. Errors are non-fatal and usually signify that the document is invalid with respect to its grammar(s)
error
{ "repo_name": "md-5/jdk10", "path": "src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/ErrorHandlerWrapper.java", "license": "gpl-2.0", "size": 9297 }
[ "com.sun.org.apache.xerces.internal.xni.XNIException", "com.sun.org.apache.xerces.internal.xni.parser.XMLParseException", "org.xml.sax.SAXException", "org.xml.sax.SAXParseException" ]
import com.sun.org.apache.xerces.internal.xni.XNIException; import com.sun.org.apache.xerces.internal.xni.parser.XMLParseException; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException;
import com.sun.org.apache.xerces.internal.xni.*; import com.sun.org.apache.xerces.internal.xni.parser.*; import org.xml.sax.*;
[ "com.sun.org", "org.xml.sax" ]
com.sun.org; org.xml.sax;
1,471,975
public void deleteSnapshot(String snapshotId) throws EC2Exception { Map<String, String> params = new HashMap<String, String>(); params.put("SnapshotId", snapshotId); HttpGet method = new HttpGet(); DeleteSnapshotResponse response = makeRequestInt(method, "DeleteSnapshot", params, DeleteSnapshotResponse.c...
void function(String snapshotId) throws EC2Exception { Map<String, String> params = new HashMap<String, String>(); params.put(STR, snapshotId); HttpGet method = new HttpGet(); DeleteSnapshotResponse response = makeRequestInt(method, STR, params, DeleteSnapshotResponse.class); if (!response.isReturn()) { throw new EC2Ex...
/** * Deletes the snapshot. * * @param snapshotId the id of the snapshot * @throws EC2Exception wraps checked exceptions */
Deletes the snapshot
deleteSnapshot
{ "repo_name": "jonnyzzz/maragogype", "path": "tags/v1.7.1/java/com/xerox/amazonws/ec2/Jec2.java", "license": "apache-2.0", "size": 97555 }
[ "com.xerox.amazonws.typica.jaxb.DeleteSnapshotResponse", "java.util.HashMap", "java.util.Map", "org.apache.http.client.methods.HttpGet" ]
import com.xerox.amazonws.typica.jaxb.DeleteSnapshotResponse; import java.util.HashMap; import java.util.Map; import org.apache.http.client.methods.HttpGet;
import com.xerox.amazonws.typica.jaxb.*; import java.util.*; import org.apache.http.client.methods.*;
[ "com.xerox.amazonws", "java.util", "org.apache.http" ]
com.xerox.amazonws; java.util; org.apache.http;
2,364,634
public void test_024_beforeTriggers() throws Exception { Connection conn = getConnection(); // // Schema. // goodStatement ( conn, "create procedure t_tba_report_proc\n" + "( tag varchar( 40 ), a int, b int,...
void function() throws Exception { Connection conn = getConnection(); ( conn, STR + STR + STR + STR + STR + STR ); goodStatement ( conn, STR + STR + STR + STR + STR + STR ); goodStatement ( conn, STR ); goodStatement ( conn, STR + STR + STR + STR + STR ); expectCompilationError ( BAD_BEFORE_TRIGGER, STR + STR + STR + S...
/** * <p> * Test that the NEW variables of BEFORE triggers do not mention generated columns. * </p> * @see TriggerWhenClauseTest#testGeneratedColumns() */
Test that the NEW variables of BEFORE triggers do not mention generated columns.
test_024_beforeTriggers
{ "repo_name": "trejkaz/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java", "license": "apache-2.0", "size": 183632 }
[ "java.sql.Connection" ]
import java.sql.Connection;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,990,479
public ChangeFeedProcessorOptions setLeaseExpirationInterval(Duration leaseExpirationInterval) { this.leaseExpirationInterval = leaseExpirationInterval; return this; }
ChangeFeedProcessorOptions function(Duration leaseExpirationInterval) { this.leaseExpirationInterval = leaseExpirationInterval; return this; }
/** * Sets the interval for which the lease is taken on a lease representing a partition. * * <p> * If the lease is not renewed within this interval, it will cause it to expire and ownership of the partition will * move to another {@link ChangeFeedProcessor} instance. * * @param lease...
Sets the interval for which the lease is taken on a lease representing a partition. If the lease is not renewed within this interval, it will cause it to expire and ownership of the partition will move to another <code>ChangeFeedProcessor</code> instance
setLeaseExpirationInterval
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/ChangeFeedProcessorOptions.java", "license": "mit", "size": 13090 }
[ "java.time.Duration" ]
import java.time.Duration;
import java.time.*;
[ "java.time" ]
java.time;
999,943
public double getAccumulatorAverage() { return SPIJNI.spiGetAccumulatorAverage(m_port); }
double function() { return SPIJNI.spiGetAccumulatorAverage(m_port); }
/** * Read the average of the accumulated value. * * @return The accumulated average value (value / count). */
Read the average of the accumulated value
getAccumulatorAverage
{ "repo_name": "PeterMitrano/allwpilib", "path": "wpilibj/src/athena/java/edu/wpi/first/wpilibj/SPI.java", "license": "bsd-3-clause", "size": 12752 }
[ "edu.wpi.first.wpilibj.hal.SPIJNI" ]
import edu.wpi.first.wpilibj.hal.SPIJNI;
import edu.wpi.first.wpilibj.hal.*;
[ "edu.wpi.first" ]
edu.wpi.first;
1,198,813
public Vector2 getOrigin(String name, float scale) { RigidBodyModel rbModel = model.rigidBodies.get(name); if (rbModel == null) throw new RuntimeException("Name '" + name + "' was not found."); return vec.set(rbModel.origin).mul(scale); }
Vector2 function(String name, float scale) { RigidBodyModel rbModel = model.rigidBodies.get(name); if (rbModel == null) throw new RuntimeException(STR + name + STR); return vec.set(rbModel.origin).mul(scale); }
/** * Gets the origin point attached to the given name. Since the point is * normalized in [0,1] coordinates, it needs to be scaled to your body * size. Warning: this method returns the same Vector2 object each time, so * copy it if you need it for later use. */
Gets the origin point attached to the given name. Since the point is normalized in [0,1] coordinates, it needs to be scaled to your body size. Warning: this method returns the same Vector2 object each time, so copy it if you need it for later use
getOrigin
{ "repo_name": "tuxskar/pixmind", "path": "pixmind/src/com/pix/mind/BodyEditorLoader.java", "license": "gpl-3.0", "size": 8225 }
[ "com.badlogic.gdx.math.Vector2" ]
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.math.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
299,783
private int storeItemStack(ItemStack p_70432_1_) { for (int var2 = 0; var2 < this.mainInventory.length; ++var2) { if (this.mainInventory[var2] != null && this.mainInventory[var2].getItem() == p_70432_1_.getItem() && this.mainInventory[var2].isStackable() && this.mainInventory[var2].s...
int function(ItemStack p_70432_1_) { for (int var2 = 0; var2 < this.mainInventory.length; ++var2) { if (this.mainInventory[var2] != null && this.mainInventory[var2].getItem() == p_70432_1_.getItem() && this.mainInventory[var2].isStackable() && this.mainInventory[var2].stackSize < this.mainInventory[var2].getMaxStackSiz...
/** * stores an itemstack in the users inventory */
stores an itemstack in the users inventory
storeItemStack
{ "repo_name": "TheHecticByte/BananaJ1.7.10Beta", "path": "src/net/minecraft/Server1_7_10/entity/player/InventoryPlayer.java", "license": "gpl-3.0", "size": 21250 }
[ "net.minecraft.Server1_7_10" ]
import net.minecraft.Server1_7_10;
import net.minecraft.*;
[ "net.minecraft" ]
net.minecraft;
1,470,085
@Test public void testClose() throws IOException, InterruptedException { File temp = File.createTempFile("flmtst", null); temp.deleteOnExit(); BufferedWriter out = new BufferedWriter(new FileWriter(temp)); out.write("#!/bin/bash\n while true; do sleep 1; done; >&2 \n"); out.close(); String ...
void function() throws IOException, InterruptedException { File temp = File.createTempFile(STR, null); temp.deleteOnExit(); BufferedWriter out = new BufferedWriter(new FileWriter(temp)); out.write(STR); out.close(); String cmd = temp.getAbsolutePath();
/** * Test that closing the source stops the reader threads */
Test that closing the source stops the reader threads
testClose
{ "repo_name": "yongkun/flume-0.9.3-cdh3u0-rakuten", "path": "src/javatest/com/cloudera/flume/handlers/exec/TestExecNioSource.java", "license": "apache-2.0", "size": 19091 }
[ "java.io.BufferedWriter", "java.io.File", "java.io.FileWriter", "java.io.IOException" ]
import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
908,824
public void ignore(@NonNull Issue issue, @NonNull File file) { ensureInitialized(); String path = mProject != null ? mProject.getRelativePath(file) : file.getPath(); List<String> paths = mSuppressed.get(issue.getId()); if (paths == null) { paths = new ArrayList<String>(...
void function(@NonNull Issue issue, @NonNull File file) { ensureInitialized(); String path = mProject != null ? mProject.getRelativePath(file) : file.getPath(); List<String> paths = mSuppressed.get(issue.getId()); if (paths == null) { paths = new ArrayList<String>(); mSuppressed.put(issue.getId(), paths); } paths.add(p...
/** * Marks the given issue and file combination as being ignored. * * @param issue the issue to be ignored in the given file * @param file the file to ignore the issue in */
Marks the given issue and file combination as being ignored
ignore
{ "repo_name": "tranleduy2000/javaide", "path": "aosp/lint-api/src/main/java/com/android/tools/lint/client/api/DefaultConfiguration.java", "license": "gpl-3.0", "size": 22846 }
[ "com.android.annotations.NonNull", "com.android.tools.lint.detector.api.Issue", "java.io.File", "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import com.android.annotations.NonNull; import com.android.tools.lint.detector.api.Issue; import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.List;
import com.android.annotations.*; import com.android.tools.lint.detector.api.*; import java.io.*; import java.util.*;
[ "com.android.annotations", "com.android.tools", "java.io", "java.util" ]
com.android.annotations; com.android.tools; java.io; java.util;
446,294
public static ParseResult parseFile( ParserInputSource input, EventHandler eventHandler, boolean parsePython) { Lexer lexer = new Lexer(input, eventHandler, parsePython); ParsingMode parsingMode = parsePython ? PYTHON : BUILD; Parser parser = new Parser(lexer, eventHandler, parsingMode); List<St...
static ParseResult function( ParserInputSource input, EventHandler eventHandler, boolean parsePython) { Lexer lexer = new Lexer(input, eventHandler, parsePython); ParsingMode parsingMode = parsePython ? PYTHON : BUILD; Parser parser = new Parser(lexer, eventHandler, parsingMode); List<Statement> statements = parser.par...
/** * Entry-point to parser that parses a build file with comments. All errors * encountered during parsing are reported via "reporter". */
Entry-point to parser that parses a build file with comments. All errors encountered during parsing are reported via "reporter"
parseFile
{ "repo_name": "hhclam/bazel", "path": "src/main/java/com/google/devtools/build/lib/syntax/Parser.java", "license": "apache-2.0", "size": 54727 }
[ "com.google.devtools.build.lib.events.EventHandler", "java.util.List" ]
import com.google.devtools.build.lib.events.EventHandler; import java.util.List;
import com.google.devtools.build.lib.events.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
1,579,838
private void doUpdatePatientDatabase() { if (mSyncTask != null && mSyncTask.getStatus() != Status.FINISHED) return; mSyncTask = (MDSSyncTask) new MDSSyncTask(this).execute(this); } /** * {@inheritDoc}
void function() { if (mSyncTask != null && mSyncTask.getStatus() != Status.FINISHED) return; mSyncTask = (MDSSyncTask) new MDSSyncTask(this).execute(this); } /** * {@inheritDoc}
/** * Syncs the Patient database with MDS */
Syncs the Patient database with MDS
doUpdatePatientDatabase
{ "repo_name": "SanaMobile/sana.mobile", "path": "app/src/main/java/org/sana/android/activity/Sana.java", "license": "bsd-3-clause", "size": 22009 }
[ "android.os.AsyncTask", "org.sana.android.task.MDSSyncTask" ]
import android.os.AsyncTask; import org.sana.android.task.MDSSyncTask;
import android.os.*; import org.sana.android.task.*;
[ "android.os", "org.sana.android" ]
android.os; org.sana.android;
492,784
public boolean getPrefHomepageUseDefaultUri() { return mSharedPreferencesManager.readBoolean( ChromePreferenceKeys.HOMEPAGE_USE_DEFAULT_URI, true); }
boolean function() { return mSharedPreferencesManager.readBoolean( ChromePreferenceKeys.HOMEPAGE_USE_DEFAULT_URI, true); }
/** * True if the homepage URL is the default value. False means the homepage URL is using * the user customized URL. Note that this method does not take enterprise policy into account. * Use {@link HomepagePolicyManager#isHomepageManagedByPolicy} if policy information is needed. * * @return Wh...
True if the homepage URL is the default value. False means the homepage URL is using the user customized URL. Note that this method does not take enterprise policy into account. Use <code>HomepagePolicyManager#isHomepageManagedByPolicy</code> if policy information is needed
getPrefHomepageUseDefaultUri
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java", "license": "bsd-3-clause", "size": 12985 }
[ "org.chromium.chrome.browser.preferences.ChromePreferenceKeys" ]
import org.chromium.chrome.browser.preferences.ChromePreferenceKeys;
import org.chromium.chrome.browser.preferences.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
716,572
protected void afterUpdate(Connection connection, Table table) throws SQLException { }
void function(Connection connection, Table table) throws SQLException { }
/** * Allows platforms to issue statements directly after rows have been updated in * the specified table. * * @param connection The connection used for the update * @param table The table that the rows have been updateed into */
Allows platforms to issue statements directly after rows have been updated in the specified table
afterUpdate
{ "repo_name": "flex-rental-solutions/apache-ddlutils", "path": "src/java/org/apache/ddlutils/platform/PlatformImplBase.java", "license": "apache-2.0", "size": 76831 }
[ "java.sql.Connection", "java.sql.SQLException", "org.apache.ddlutils.model.Table" ]
import java.sql.Connection; import java.sql.SQLException; import org.apache.ddlutils.model.Table;
import java.sql.*; import org.apache.ddlutils.model.*;
[ "java.sql", "org.apache.ddlutils" ]
java.sql; org.apache.ddlutils;
1,666,254
public Response serveFile(String uri, Properties header, File homeDir, boolean allowDirectoryListing) { Response res = null; // Make sure we won't die of an exception later if (!homeDir.isDirectory()) res = new Response(HTTP_INTERNALERROR, MIME_PLAINTEXT, "INTERNAL ERRROR: serveFile(): given homeDi...
Response function(String uri, Properties header, File homeDir, boolean allowDirectoryListing) { Response res = null; if (!homeDir.isDirectory()) res = new Response(HTTP_INTERNALERROR, MIME_PLAINTEXT, STR); if (res == null) { uri = uri.trim().replace(File.separatorChar, '/'); if (uri.indexOf('?') >= 0) uri = uri.substri...
/** * Serves file from homeDir and its' subdirectories (only). Uses only URI, * ignores all headers and HTTP parameters. */
Serves file from homeDir and its' subdirectories (only). Uses only URI, ignores all headers and HTTP parameters
serveFile
{ "repo_name": "guiguito/Cardeto", "path": "cardeto/src/main/java/com/ggt/cardeto/externallib/NanoHTTPD.java", "license": "apache-2.0", "size": 33683 }
[ "java.io.File", "java.util.Properties" ]
import java.io.File; import java.util.Properties;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
380,351
@ServiceMethod(returns = ReturnType.SINGLE) SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule( String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParameters pa...
@ServiceMethod(returns = ReturnType.SINGLE) SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule( String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters);
/** * Creates an authorization rule for the specified topic. * * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param namespaceName The namespace name. * @param topicName The topic name. * @param authorizationRuleName The authorization rule name. ...
Creates an authorization rule for the specified topic
createOrUpdateAuthorizationRule
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/fluent/TopicsClient.java", "license": "mit", "size": 40226 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.servicebus.fluent.models.SharedAccessAuthorizationRuleResourceInner", "com.azure.resourcemanager.servicebus.models.SharedAccessAuthorizationRuleCreateOrUpdateParameters" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.servicebus.fluent.models.SharedAccessAuthorizationRuleResourceInner; import com.azure.resourcemanager.servicebus.models.SharedAccessAuthorizationRuleCreateOrUpdateParameters;
import com.azure.core.annotation.*; import com.azure.resourcemanager.servicebus.fluent.models.*; import com.azure.resourcemanager.servicebus.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,591,038
List<Attribute> getRequiredAttributes(PerunSession sess, User user);
List<Attribute> getRequiredAttributes(PerunSession sess, User user);
/** * Get user attributes which are required by services which are relater to this user. * * @param sess perun session * @param user * @return list of user's attributes which are required by services which are related to this user * * @throws InternalErrorException if an exception raise in concrete implem...
Get user attributes which are required by services which are relater to this user
getRequiredAttributes
{ "repo_name": "zlamalp/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java", "license": "bsd-2-clause", "size": 244560 }
[ "cz.metacentrum.perun.core.api.Attribute", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.User", "java.util.List" ]
import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.User; import java.util.List;
import cz.metacentrum.perun.core.api.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
1,814,040
public void init (int WindowNo, FormFrame frame) { m_WindowNo = WindowNo; m_frame = frame; Env.setContext(getCtx(), m_WindowNo, MOrder.COLUMNNAME_IsSOTrx, "N"); try { // UI statInit(); fillPicks(); jbInit(); // m_frame.getContentPane().add(mainPanel, BorderLayout.CENTER); m_frame.get...
void function (int WindowNo, FormFrame frame) { m_WindowNo = WindowNo; m_frame = frame; Env.setContext(getCtx(), m_WindowNo, MOrder.COLUMNNAME_IsSOTrx, "N"); try { statInit(); fillPicks(); jbInit(); m_frame.getContentPane().add(statusBar, BorderLayout.SOUTH); } catch(Exception e) { log.log(Level.SEVERE, STR, e); } } pr...
/** * Initialize Panel * @param WindowNo window * @param frame frame */
Initialize Panel
init
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiereLibero/extension/eevolution/libero/src/main/java/org/eevolution/form/VMRPDetailed.java", "license": "gpl-2.0", "size": 51326 }
[ "java.awt.BorderLayout", "java.util.logging.Level", "javax.swing.JMenuItem", "javax.swing.JScrollPane", "org.compiere.apps.ConfirmPanel", "org.compiere.apps.StatusBar", "org.compiere.apps.form.FormFrame", "org.compiere.grid.ed.VLookup", "org.compiere.minigrid.ColumnInfo", "org.compiere.minigrid.Mi...
import java.awt.BorderLayout; import java.util.logging.Level; import javax.swing.JMenuItem; import javax.swing.JScrollPane; import org.compiere.apps.ConfirmPanel; import org.compiere.apps.StatusBar; import org.compiere.apps.form.FormFrame; import org.compiere.grid.ed.VLookup; import org.compiere.minigrid.ColumnInfo; im...
import java.awt.*; import java.util.logging.*; import javax.swing.*; import org.compiere.apps.*; import org.compiere.apps.form.*; import org.compiere.grid.ed.*; import org.compiere.minigrid.*; import org.compiere.model.*; import org.compiere.swing.*; import org.compiere.util.*; import org.eevolution.model.*;
[ "java.awt", "java.util", "javax.swing", "org.compiere.apps", "org.compiere.grid", "org.compiere.minigrid", "org.compiere.model", "org.compiere.swing", "org.compiere.util", "org.eevolution.model" ]
java.awt; java.util; javax.swing; org.compiere.apps; org.compiere.grid; org.compiere.minigrid; org.compiere.model; org.compiere.swing; org.compiere.util; org.eevolution.model;
1,180,829
private static Double expLinearCombination(List<String> words, Map<POSClasses, Double[]> featuresWeights,POSClasses speechTag, List<String> knownNames,int index){ return Math.exp(featuresWeights.get(speechTag)[0] * Features.previousStartsWithCapital().applyAsInt( words.get(index - 1), words.get(index...
static Double function(List<String> words, Map<POSClasses, Double[]> featuresWeights,POSClasses speechTag, List<String> knownNames,int index){ return Math.exp(featuresWeights.get(speechTag)[0] * Features.previousStartsWithCapital().applyAsInt( words.get(index - 1), words.get(index)) + featuresWeights.get(speechTag)[1] ...
/** * Softmax function * * * @param words * @param featuresWeights * @param speechTag * @param knownNames * @param index * @return */
Softmax function
expLinearCombination
{ "repo_name": "lucapertile/POSExtractor", "path": "src/main/java/com/luca/exercise/POSModel.java", "license": "mit", "size": 6639 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,434,472
@Deprecated public OpenAnswerDefinitionBuilder addValidator(ComparisonOperator comparisonOperator, Data data) { element.addValidationDataSource(new ComparingDataSource(null, comparisonOperator, new FixedDataSource(data))); return this; }
OpenAnswerDefinitionBuilder function(ComparisonOperator comparisonOperator, Data data) { element.addValidationDataSource(new ComparingDataSource(null, comparisonOperator, new FixedDataSource(data))); return this; }
/** * Add a {@link IValidator} based on a {@link FixedDataSource} to the current {@link OpenAnswerDefinition}. * * @param comparisonOperator * @param data * @return */
Add a <code>IValidator</code> based on a <code>FixedDataSource</code> to the current <code>OpenAnswerDefinition</code>
addValidator
{ "repo_name": "apruden/onyx", "path": "onyx-modules/quartz/quartz-core/src/main/java/org/obiba/onyx/quartz/core/engine/questionnaire/util/builder/OpenAnswerDefinitionBuilder.java", "license": "gpl-3.0", "size": 17666 }
[ "org.obiba.onyx.core.data.ComparingDataSource", "org.obiba.onyx.core.data.FixedDataSource", "org.obiba.onyx.util.data.ComparisonOperator", "org.obiba.onyx.util.data.Data" ]
import org.obiba.onyx.core.data.ComparingDataSource; import org.obiba.onyx.core.data.FixedDataSource; import org.obiba.onyx.util.data.ComparisonOperator; import org.obiba.onyx.util.data.Data;
import org.obiba.onyx.core.data.*; import org.obiba.onyx.util.data.*;
[ "org.obiba.onyx" ]
org.obiba.onyx;
1,646,740
@Override public int compareTo(final byte[] buffer1, final int offset1, final int length1, final byte[] buffer2, final int offset2, final int length2) { // Short circuit equal case if (buffer1 == buffer2 && offset1 == offset2 && length1 == leng...
int function(final byte[] buffer1, final int offset1, final int length1, final byte[] buffer2, final int offset2, final int length2) { if (buffer1 == buffer2 && offset1 == offset2 && length1 == length2) { return 0; } final int minLength = Math.min(length1, length2); final int minWords = minLength / Longs.BYTES; final i...
/** * Lexicographically compare two arrays. * * @param buffer1 left operand * @param buffer2 right operand * @param offset1 Where to start comparing in the left buffer * @param offset2 Where to start comparing in the right buffer ...
Lexicographically compare two arrays
compareTo
{ "repo_name": "kchilton2/incubator-rya", "path": "common/rya.api.model/src/main/java/org/apache/rya/api/model/visibility/FastByteComparison.java", "license": "apache-2.0", "size": 9849 }
[ "com.google.common.primitives.Longs", "com.google.common.primitives.UnsignedBytes" ]
import com.google.common.primitives.Longs; import com.google.common.primitives.UnsignedBytes;
import com.google.common.primitives.*;
[ "com.google.common" ]
com.google.common;
2,303,096
protected Transport createTransport(Session session) { Transport transport=null; try { //get the transport transport=session.getTransport(this.transportProtocol); //connect if(this.transportPort>0) { transport.connect(this.transportHost,this.transportPort,this.userName,this.password); }...
Transport function(Session session) { Transport transport=null; try { transport=session.getTransport(this.transportProtocol); if(this.transportPort>0) { transport.connect(this.transportHost,this.transportPort,this.userName,this.password); } else { transport.connect(this.transportHost,this.userName,this.password); } } c...
/** * This function returns a transport for the provided session. * * @param session * The mail session * @return The mail transport */
This function returns a transport for the provided session
createTransport
{ "repo_name": "ZhernakovMikhail/fax4j", "path": "src/main/java/org/fax4j/spi/email/MailConnectionFactoryImpl.java", "license": "apache-2.0", "size": 2267 }
[ "javax.mail.Session", "javax.mail.Transport", "org.fax4j.FaxException" ]
import javax.mail.Session; import javax.mail.Transport; import org.fax4j.FaxException;
import javax.mail.*; import org.fax4j.*;
[ "javax.mail", "org.fax4j" ]
javax.mail; org.fax4j;
1,794,916
@Test public void start_unexpectedExceptionWhenOpeningProjectOnGitHubForThe1StTime_shouldResubscribe() { // given TestObserver<SnackbarMessageEvent> snackbarMessage$ = new TestObserver<>(); PublishSubject<Trigger> openProjectIntents = PublishSubject.create(); AtomicInteger openIntentCounter = new At...
void function() { TestObserver<SnackbarMessageEvent> snackbarMessage$ = new TestObserver<>(); PublishSubject<Trigger> openProjectIntents = PublishSubject.create(); AtomicInteger openIntentCounter = new AtomicInteger(0); doAnswer(invocation -> { int attempt = openIntentCounter.incrementAndGet(); if (attempt == 1) { thro...
/** * This test case is not really necessary here, as resubscription tests are * already covered by the {@code com.xemantic.ankh.shared.presenter.PresenterTest}. * Still it's an interesting example with use case which is actually quite likely * to fail. */
This test case is not really necessary here, as resubscription tests are already covered by the com.xemantic.ankh.shared.presenter.PresenterTest. Still it's an interesting example with use case which is actually quite likely to fail
start_unexpectedExceptionWhenOpeningProjectOnGitHubForThe1StTime_shouldResubscribe
{ "repo_name": "xemantic/github-users", "path": "src/test/java/com/xemantic/githubusers/logic/drawer/DrawerPresenterTest.java", "license": "gpl-3.0", "size": 9613 }
[ "com.xemantic.ankh.shared.event.SnackbarMessageEvent", "com.xemantic.ankh.shared.event.Trigger", "io.reactivex.observers.TestObserver", "io.reactivex.subjects.PublishSubject", "java.util.concurrent.atomic.AtomicInteger", "org.mockito.BDDMockito", "org.mockito.Mockito" ]
import com.xemantic.ankh.shared.event.SnackbarMessageEvent; import com.xemantic.ankh.shared.event.Trigger; import io.reactivex.observers.TestObserver; import io.reactivex.subjects.PublishSubject; import java.util.concurrent.atomic.AtomicInteger; import org.mockito.BDDMockito; import org.mockito.Mockito;
import com.xemantic.ankh.shared.event.*; import io.reactivex.observers.*; import io.reactivex.subjects.*; import java.util.concurrent.atomic.*; import org.mockito.*;
[ "com.xemantic.ankh", "io.reactivex.observers", "io.reactivex.subjects", "java.util", "org.mockito" ]
com.xemantic.ankh; io.reactivex.observers; io.reactivex.subjects; java.util; org.mockito;
1,132,796
@Generated @Selector("setHeightSegmentCount:") public native void setHeightSegmentCount(@NInt long value);
@Selector(STR) native void function(@NInt long value);
/** * [@property] heightSegmentCount * <p> * The number of subdivisions along the Y axis. Animatable. * <p> * If the value is less than 1, the behavior is undefined. The default value is 1. */
[@property] heightSegmentCount The number of subdivisions along the Y axis. Animatable. If the value is less than 1, the behavior is undefined. The default value is 1
setHeightSegmentCount
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/scenekit/SCNBox.java", "license": "apache-2.0", "size": 11504 }
[ "org.moe.natj.general.ann.NInt", "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.general.ann.NInt; import org.moe.natj.objc.ann.Selector;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,697,774
private void handleBadRequest(StartLine inLine, Header inHeader, MessageReader reader) throws IOException { inHeader.merge(reader.readTrailer()); registerAcks(inHeader.getField("RMI-Response-Ack")); boolean persist = supportsPersist(inLine, inHeader); MessageWriter...
void function(StartLine inLine, Header inHeader, MessageReader reader) throws IOException { inHeader.merge(reader.readTrailer()); registerAcks(inHeader.getField(STR)); boolean persist = supportsPersist(inLine, inHeader); MessageWriter writer = new MessageWriter(out, false); writer.writeStartLine(new StartLine(HTTP_MAJO...
/** * Handles unacceptable HTTP request. */
Handles unacceptable HTTP request
handleBadRequest
{ "repo_name": "pfirmstone/river-internet", "path": "JGDMS/jgdms-jeri/src/main/java/org/apache/river/jeri/internal/http/HttpServerConnection.java", "license": "apache-2.0", "size": 13268 }
[ "java.io.IOException", "java.net.HttpURLConnection" ]
import java.io.IOException; import java.net.HttpURLConnection;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
93,494
public Builder hour(String sourceName) { add(new HourFieldPartitioner(sourceName)); return this; }
Builder function(String sourceName) { add(new HourFieldPartitioner(sourceName)); return this; }
/** * Configure a partitioner for extracting the hour from a timestamp field. * The UTC timezone is assumed. The partition entity name is "hour". * * @param sourceName * The entity field name from which to get values to be * partitioned. * @return An instance of the ...
Configure a partitioner for extracting the hour from a timestamp field. The UTC timezone is assumed. The partition entity name is "hour"
hour
{ "repo_name": "joey/kite", "path": "kite-data/kite-data-core/src/main/java/org/kitesdk/data/PartitionStrategy.java", "license": "apache-2.0", "size": 22836 }
[ "org.kitesdk.data.spi.partition.HourFieldPartitioner" ]
import org.kitesdk.data.spi.partition.HourFieldPartitioner;
import org.kitesdk.data.spi.partition.*;
[ "org.kitesdk.data" ]
org.kitesdk.data;
639,076
@Test(expected=IllegalArgumentException.class) public void test_setUpToClass_invalid() { final Integer val = Integer.valueOf(5); final ReflectionToStringBuilder test = new ReflectionToStringBuilder(val); try { test.setUpToClass(String.class); } finally { t...
@Test(expected=IllegalArgumentException.class) void function() { final Integer val = Integer.valueOf(5); final ReflectionToStringBuilder test = new ReflectionToStringBuilder(val); try { test.setUpToClass(String.class); } finally { test.toString(); } } class ReflectionStaticFieldsFixture { static final String staticStri...
/** * Tests ReflectionToStringBuilder setUpToClass(). */
Tests ReflectionToStringBuilder setUpToClass()
test_setUpToClass_invalid
{ "repo_name": "886rs/commons-lang3-3.3.2-src", "path": "src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java", "license": "apache-2.0", "size": 48562 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
830,336
public Vector getPreconditionDes(String status) throws SdpException, SdpParseException { if (status == null) throw new SdpException("The status-type is null"); if (preconditionAttributes == null) return null; else { Vector vCurr = new ...
Vector function(String status) throws SdpException, SdpParseException { if (status == null) throw new SdpException(STR); if (preconditionAttributes == null) return null; else { Vector vCurr = new Vector(); for (int i=0; i < preconditionAttributes.size(); i++) { AttributeField af = (AttributeField) this.preconditionAttr...
/** * <p>Get the attribute fields with the name "des" * for desired precondition</p> * * <p>There can be more than one current precondition line * for a status-type (with different direction-tag values), * specially if strength-tag is different</p> * * @param status - (local, rem...
Get the attribute fields with the name "des" for desired precondition There can be more than one current precondition line for a status-type (with different direction-tag values), specially if strength-tag is different
getPreconditionDes
{ "repo_name": "fhg-fokus-nubomedia/signaling-plane", "path": "modules/lib-sip/src/main/java/gov/nist/javax/sdp/fields/PreconditionFields.java", "license": "apache-2.0", "size": 22608 }
[ "java.util.Vector", "javax.sdp.SdpException", "javax.sdp.SdpParseException" ]
import java.util.Vector; import javax.sdp.SdpException; import javax.sdp.SdpParseException;
import java.util.*; import javax.sdp.*;
[ "java.util", "javax.sdp" ]
java.util; javax.sdp;
1,201,150
public Map[] bannerZoneStatistics(Integer id, Date startDate, Date endDate) throws XmlRpcException { return objectToArrayMaps( execute(BANNER_ZONE_STATISTICS_METHOD, id, startDate, endDate)); }
Map[] function(Integer id, Date startDate, Date endDate) throws XmlRpcException { return objectToArrayMaps( execute(BANNER_ZONE_STATISTICS_METHOD, id, startDate, endDate)); }
/** * Banner zone statistics. * * @param id the id * @param startDate the start date * @param endDate the end date * * @return the Map[] * * @throws XmlRpcException the xml rpc exception */
Banner zone statistics
bannerZoneStatistics
{ "repo_name": "xvip87/a45435345345", "path": "lib/xmlrpc/java/openx-api-v2/ApacheLib3/org/openads/proxy/BannerService.java", "license": "gpl-2.0", "size": 9071 }
[ "java.util.Date", "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import java.util.Date; import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import java.util.*; import org.apache.xmlrpc.*;
[ "java.util", "org.apache.xmlrpc" ]
java.util; org.apache.xmlrpc;
1,510,816
public WorkflowService getWorkflowService() { if (workflowService == null) { workflowService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getWorkflowService(); } return workflowService; }
WorkflowService function() { if (workflowService == null) { workflowService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getWorkflowService(); } return workflowService; }
/** * Returns the workflow service instance * * @return WorkflowService instance */
Returns the workflow service instance
getWorkflowService
{ "repo_name": "Alfresco/community-edition", "path": "projects/web-client/source/java/org/alfresco/web/bean/workflow/CancelWorkflowDialog.java", "license": "lgpl-3.0", "size": 6392 }
[ "javax.faces.context.FacesContext", "org.alfresco.service.cmr.workflow.WorkflowService", "org.alfresco.web.bean.repository.Repository" ]
import javax.faces.context.FacesContext; import org.alfresco.service.cmr.workflow.WorkflowService; import org.alfresco.web.bean.repository.Repository;
import javax.faces.context.*; import org.alfresco.service.cmr.workflow.*; import org.alfresco.web.bean.repository.*;
[ "javax.faces", "org.alfresco.service", "org.alfresco.web" ]
javax.faces; org.alfresco.service; org.alfresco.web;
2,458,913
if( params.length > 1 ) { String text = BaseHandler.mergeParams(params); Collection<Conversation> mConversations = server.getConversations(); for( Conversation currentConversation : mConversations ) { if( currentConversation.getType() == Conversation.TYPE_CHANNEL ) { Message messag...
if( params.length > 1 ) { String text = BaseHandler.mergeParams(params); Collection<Conversation> mConversations = server.getConversations(); for( Conversation currentConversation : mConversations ) { if( currentConversation.getType() == Conversation.TYPE_CHANNEL ) { Message message = new Message("<" + service.getConne...
/** * Execute /amsg */
Execute /amsg
execute
{ "repo_name": "thelinuxgeekcommunity/simpleirc", "path": "application/src/main/java/tk/jordynsmediagroup/simpleirc/command/handler/AMsgHandler.java", "license": "gpl-3.0", "size": 2099 }
[ "android.content.Intent", "java.util.Collection", "tk.jordynsmediagroup.simpleirc.command.BaseHandler", "tk.jordynsmediagroup.simpleirc.exception.CommandException", "tk.jordynsmediagroup.simpleirc.model.Broadcast", "tk.jordynsmediagroup.simpleirc.model.Conversation", "tk.jordynsmediagroup.simpleirc.mode...
import android.content.Intent; import java.util.Collection; import tk.jordynsmediagroup.simpleirc.command.BaseHandler; import tk.jordynsmediagroup.simpleirc.exception.CommandException; import tk.jordynsmediagroup.simpleirc.model.Broadcast; import tk.jordynsmediagroup.simpleirc.model.Conversation; import tk.jordynsmedia...
import android.content.*; import java.util.*; import tk.jordynsmediagroup.simpleirc.command.*; import tk.jordynsmediagroup.simpleirc.exception.*; import tk.jordynsmediagroup.simpleirc.model.*;
[ "android.content", "java.util", "tk.jordynsmediagroup.simpleirc" ]
android.content; java.util; tk.jordynsmediagroup.simpleirc;
2,231,879
public NetworkInterfaceIpConfigurationsClient getNetworkInterfaceIpConfigurations() { return this.networkInterfaceIpConfigurations; } private final NetworkInterfaceLoadBalancersClient networkInterfaceLoadBalancers;
NetworkInterfaceIpConfigurationsClient function() { return this.networkInterfaceIpConfigurations; } private final NetworkInterfaceLoadBalancersClient networkInterfaceLoadBalancers;
/** * Gets the NetworkInterfaceIpConfigurationsClient object to access its operations. * * @return the NetworkInterfaceIpConfigurationsClient object. */
Gets the NetworkInterfaceIpConfigurationsClient object to access its operations
getNetworkInterfaceIpConfigurations
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagementClientImpl.java", "license": "mit", "size": 182764 }
[ "com.azure.resourcemanager.network.fluent.NetworkInterfaceIpConfigurationsClient", "com.azure.resourcemanager.network.fluent.NetworkInterfaceLoadBalancersClient" ]
import com.azure.resourcemanager.network.fluent.NetworkInterfaceIpConfigurationsClient; import com.azure.resourcemanager.network.fluent.NetworkInterfaceLoadBalancersClient;
import com.azure.resourcemanager.network.fluent.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,355,238
@SuppressWarnings("unchecked") public static <T extends AccessibleObject> T setAccessible(Class<T> objectType, AccessibleObject object, boolean accessible) { object.setAccessible(accessible); return (T) object; }
@SuppressWarnings(STR) static <T extends AccessibleObject> T function(Class<T> objectType, AccessibleObject object, boolean accessible) { object.setAccessible(accessible); return (T) object; }
/** * Sets accessibleobject accessible state an returns this object * @param object * @param accessible * @return */
Sets accessibleobject accessible state an returns this object
setAccessible
{ "repo_name": "stopbox/Carbon-SPEC", "path": "src/main/java/com/lastabyss/carbon/utils/Utilities.java", "license": "lgpl-3.0", "size": 11475 }
[ "java.lang.reflect.AccessibleObject" ]
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
14,282
private boolean changed(Map<String, CheckBoxNode> clone, Map<String, CheckBoxNode> source) { for (Map.Entry<String, CheckBoxNode> entry : clone.entrySet()) { CheckBoxNode sourceNode = source.get(entry.getKey()); CheckBoxNode cloneNode = entry.getValue(); if (cloneNode.isSelected() != sourceNode.isSele...
boolean function(Map<String, CheckBoxNode> clone, Map<String, CheckBoxNode> source) { for (Map.Entry<String, CheckBoxNode> entry : clone.entrySet()) { CheckBoxNode sourceNode = source.get(entry.getKey()); CheckBoxNode cloneNode = entry.getValue(); if (cloneNode.isSelected() != sourceNode.isSelected()) { return true; } ...
/** * Check if the clone tree have been changed compared to the source tree * @param clone Clone Tree * @param source Source Tree * @return true if the maps are not equal. false if the maps are equal */
Check if the clone tree have been changed compared to the source tree
changed
{ "repo_name": "GoldenGnu/jeveassets", "path": "src/main/java/net/nikr/eve/jeveasset/gui/tabs/tracker/TrackerFilterDialog.java", "license": "gpl-2.0", "size": 8956 }
[ "java.util.Map", "net.nikr.eve.jeveasset.gui.shared.components.CheckBoxNode" ]
import java.util.Map; import net.nikr.eve.jeveasset.gui.shared.components.CheckBoxNode;
import java.util.*; import net.nikr.eve.jeveasset.gui.shared.components.*;
[ "java.util", "net.nikr.eve" ]
java.util; net.nikr.eve;
1,072,141
@Test public void shouldBeEmptySupertypesForObject() { Supertypes types = Supertypes.from(Object.class); assertTrue(Iterables.isEmpty(types)); }
void function() { Supertypes types = Supertypes.from(Object.class); assertTrue(Iterables.isEmpty(types)); }
/** * For an {@link Object}, the {@link Supertypes} object should be empty. */
For an <code>Object</code>, the <code>Supertypes</code> object should be empty
shouldBeEmptySupertypesForObject
{ "repo_name": "meerware/meerware-framework", "path": "meerware-reflect/src/test/java/com/meerware/reflect/SupertypesTest.java", "license": "mit", "size": 2224 }
[ "com.google.common.collect.Iterables", "org.junit.Assert" ]
import com.google.common.collect.Iterables; import org.junit.Assert;
import com.google.common.collect.*; import org.junit.*;
[ "com.google.common", "org.junit" ]
com.google.common; org.junit;
726,462
@SuppressWarnings("unchecked") public List<ASTNode> getOriginalList() { List<ASTNode> list = (List<ASTNode>)getEvent().getOriginalValue(); return Collections.unmodifiableList(list); }
@SuppressWarnings(STR) List<ASTNode> function() { List<ASTNode> list = (List<ASTNode>)getEvent().getOriginalValue(); return Collections.unmodifiableList(list); }
/** * Returns the original nodes in the list property managed by this rewriter. The returned list is unmodifiable. * * @return a list of all original nodes in the list */
Returns the original nodes in the list property managed by this rewriter. The returned list is unmodifiable
getOriginalList
{ "repo_name": "riuvshin/che-plugins", "path": "plugin-java/che-plugin-java-ext-java/src/main/java/org/eclipse/che/ide/ext/java/jdt/core/dom/rewrite/ListRewrite.java", "license": "epl-1.0", "size": 20065 }
[ "java.util.Collections", "java.util.List", "org.eclipse.che.ide.ext.java.jdt.core.dom.ASTNode" ]
import java.util.Collections; import java.util.List; import org.eclipse.che.ide.ext.java.jdt.core.dom.ASTNode;
import java.util.*; import org.eclipse.che.ide.ext.java.jdt.core.dom.*;
[ "java.util", "org.eclipse.che" ]
java.util; org.eclipse.che;
924,830
PlaceRequest createTargetPlace(Path path) { return new PathPlaceRequest(path); }
PlaceRequest createTargetPlace(Path path) { return new PathPlaceRequest(path); }
/** * for testing purposes. */
for testing purposes
createTargetPlace
{ "repo_name": "jomarko/kie-wb-common", "path": "kie-wb-common-stunner/kie-wb-common-stunner-extensions/kie-wb-common-stunner-jbpm-designer-integration/kie-wb-common-stunner-jbpm-designer-integration-client/src/main/java/org/kie/workbench/common/stunner/bpmn/integration/client/IntegrationHandlerImpl.java", "licen...
[ "org.uberfire.backend.vfs.Path", "org.uberfire.mvp.PlaceRequest", "org.uberfire.mvp.impl.PathPlaceRequest" ]
import org.uberfire.backend.vfs.Path; import org.uberfire.mvp.PlaceRequest; import org.uberfire.mvp.impl.PathPlaceRequest;
import org.uberfire.backend.vfs.*; import org.uberfire.mvp.*; import org.uberfire.mvp.impl.*;
[ "org.uberfire.backend", "org.uberfire.mvp" ]
org.uberfire.backend; org.uberfire.mvp;
2,000,565
public void setMessageError(String messageID, Exception e) throws ClipboardException;
void function(String messageID, Exception e) throws ClipboardException;
/** * Method declaration * * @param messageID * @param e * @throws ClipboardException */
Method declaration
setMessageError
{ "repo_name": "CecileBONIN/Silverpeas-Core", "path": "ejb-core/clipboard/src/main/java/com/stratelia/webactiv/clipboard/control/ejb/Clipboard.java", "license": "agpl-3.0", "size": 3875 }
[ "com.silverpeas.util.clipboard.ClipboardException" ]
import com.silverpeas.util.clipboard.ClipboardException;
import com.silverpeas.util.clipboard.*;
[ "com.silverpeas.util" ]
com.silverpeas.util;
62,261
public static int notifcation(Context context, String notificationTitle, String messageString,int smallIconId, Intent intent,int messageID) { String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(ns); long when =...
static int function(Context context, String notificationTitle, String messageString,int smallIconId, Intent intent,int messageID) { String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(ns); long when = System.currentTimeMillis(); CharSequenc...
/** * Displays a notification in the notification area of the UI * @param context Context from which to create the notification * @param messageString The string to display to the user as a message * @param smallIconId drawable id * @param intent The intent which will start the activity when th...
Displays a notification in the notification area of the UI
notifcation
{ "repo_name": "niyueming/utilsLibrary", "path": "src/main/java/net/nym/utilslibrary/utils/Notify.java", "license": "apache-2.0", "size": 3478 }
[ "android.app.Notification", "android.app.NotificationManager", "android.app.PendingIntent", "android.content.Context", "android.content.Intent", "android.support.v4.app.NotificationCompat" ]
import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.support.v4.app.NotificationCompat;
import android.app.*; import android.content.*; import android.support.v4.app.*;
[ "android.app", "android.content", "android.support" ]
android.app; android.content; android.support;
1,247,841
public void updateTopic(String topic, DbContextRule rule) { topic = StringUtils.toLowerEnglish(topic); RuleHead head = ruleMap.get(topic); if (head == null) { head = new RuleHead("db", topic, rule); ruleMap.put(topic, head); statements.add(head); }...
void function(String topic, DbContextRule rule) { topic = StringUtils.toLowerEnglish(topic); RuleHead head = ruleMap.get(topic); if (head == null) { head = new RuleHead("db", topic, rule); ruleMap.put(topic, head); statements.add(head); } else { head.setRule(rule); } }
/** * Update a topic with a context specific rule. * This is used for autocomplete support. * * @param topic the topic * @param rule the database context rule */
Update a topic with a context specific rule. This is used for autocomplete support
updateTopic
{ "repo_name": "paulnguyen/data", "path": "sqldbs/h2java/src/main/org/h2/bnf/Bnf.java", "license": "apache-2.0", "size": 12193 }
[ "org.h2.bnf.context.DbContextRule", "org.h2.util.StringUtils" ]
import org.h2.bnf.context.DbContextRule; import org.h2.util.StringUtils;
import org.h2.bnf.context.*; import org.h2.util.*;
[ "org.h2.bnf", "org.h2.util" ]
org.h2.bnf; org.h2.util;
941,306
@Override public IndicesOptions indicesOptions() { return indicesOptions; }
IndicesOptions function() { return indicesOptions; }
/** * Specifies what type of requested indices to ignore and how to deal with wildcard expressions. * For example indices that don't exist. * * @return the current behaviour when it comes to index names and wildcard indices expressions */
Specifies what type of requested indices to ignore and how to deal with wildcard expressions. For example indices that don't exist
indicesOptions
{ "repo_name": "GlenRSmith/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/admin/indices/open/OpenIndexRequest.java", "license": "apache-2.0", "size": 5494 }
[ "org.elasticsearch.action.support.IndicesOptions" ]
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.action.support.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
2,520,606
void viewMediaItem( MediaItemModel mediaItemModel, View sharedElement, String sharedElementName );
void viewMediaItem( MediaItemModel mediaItemModel, View sharedElement, String sharedElementName );
/** * View a {@link MediaItemModel} details. * * @param mediaItemModel The mediaItem that will be shown. */
View a <code>MediaItemModel</code> details
viewMediaItem
{ "repo_name": "MythTV-Clients/MythtvPlayerForAndroid", "path": "mythtv-player/src/main/java/org/mythtv/android/presentation/view/MediaItemListView.java", "license": "gpl-3.0", "size": 1715 }
[ "android.view.View", "org.mythtv.android.presentation.model.MediaItemModel" ]
import android.view.View; import org.mythtv.android.presentation.model.MediaItemModel;
import android.view.*; import org.mythtv.android.presentation.model.*;
[ "android.view", "org.mythtv.android" ]
android.view; org.mythtv.android;
2,876,060
private List<List<Long>> getEnhancedPopulation() { List<List<Long>> list = new ArrayList<List<Long>>(); for (Long key : fittestKeys) { Chromosome cp = getChromosome(key); for (int i = 0; i < numOfCopies; i++) { long[] thegenes = cp.getGenes(); ...
List<List<Long>> function() { List<List<Long>> list = new ArrayList<List<Long>>(); for (Long key : fittestKeys) { Chromosome cp = getChromosome(key); for (int i = 0; i < numOfCopies; i++) { long[] thegenes = cp.getGenes(); List<Long> geneList = new ArrayList<Long>(); for (int k = 0; k < cp.getGenes().length; k++) geneL...
/** * Return a List of lists containing keys. * * @return List of lists containing keys. */
Return a List of lists containing keys
getEnhancedPopulation
{ "repo_name": "shroman/ignite", "path": "modules/ml/src/main/java/org/apache/ignite/ml/genetic/TruncateSelectionTask.java", "license": "apache-2.0", "size": 4963 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,231,998
// NEXT_MAJOR_VER: remove 'throws Exception' public Builder applyToAllUnaryMethods( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; }
Builder function( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; }
/** * Applies the given settings updater function to all of the unary API methods in this service. * * <p>Note: This method does not support applying settings to streaming methods. */
Applies the given settings updater function to all of the unary API methods in this service. Note: This method does not support applying settings to streaming methods
applyToAllUnaryMethods
{ "repo_name": "pongad/api-client-staging", "path": "generated/java/gapic-google-cloud-speech-v1beta1/src/main/java/com/google/cloud/speech/v1beta1/stub/SpeechStubSettings.java", "license": "bsd-3-clause", "size": 15729 }
[ "com.google.api.core.ApiFunction", "com.google.api.gax.rpc.UnaryCallSettings" ]
import com.google.api.core.ApiFunction; import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.core.*; import com.google.api.gax.rpc.*;
[ "com.google.api" ]
com.google.api;
2,706,671
private void sendEvent(String uei, String reason) { EventBuilder builder = new EventBuilder(uei, "OpenNMS.Collectd"); builder.setNodeid(m_nodeId); builder.setInterface(m_agent.getInetAddress()); builder.setService(m_spec.getServiceName()); builder.setHost(InetAddressUtils.get...
void function(String uei, String reason) { EventBuilder builder = new EventBuilder(uei, STR); builder.setNodeid(m_nodeId); builder.setInterface(m_agent.getInetAddress()); builder.setService(m_spec.getServiceName()); builder.setHost(InetAddressUtils.getLocalHostName()); if (reason != null) { builder.addParam(STR, reason...
/** * Generate event and send it to eventd via the event proxy. * * uei Universal event identifier of event to generate. */
Generate event and send it to eventd via the event proxy. uei Universal event identifier of event to generate
sendEvent
{ "repo_name": "vishwaAbhinav/OpenNMS", "path": "opennms-services/src/main/java/org/opennms/netmgt/collectd/CollectableService.java", "license": "gpl-2.0", "size": 23755 }
[ "org.opennms.core.utils.InetAddressUtils", "org.opennms.netmgt.eventd.EventIpcManagerFactory", "org.opennms.netmgt.model.events.EventBuilder" ]
import org.opennms.core.utils.InetAddressUtils; import org.opennms.netmgt.eventd.EventIpcManagerFactory; import org.opennms.netmgt.model.events.EventBuilder;
import org.opennms.core.utils.*; import org.opennms.netmgt.eventd.*; import org.opennms.netmgt.model.events.*;
[ "org.opennms.core", "org.opennms.netmgt" ]
org.opennms.core; org.opennms.netmgt;
2,262,818
public com.squareup.okhttp.Call getDogmaEffectsEffectIdAsync(Integer effectId, String datasource, String userAgent, String xUserAgent, final ApiCallback<GetDogmaEffectsEffectIdOk> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.Prog...
com.squareup.okhttp.Call function(Integer effectId, String datasource, String userAgent, String xUserAgent, final ApiCallback<GetDogmaEffectsEffectIdOk> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = nu...
/** * Get effect information (asynchronously) * Get information on a dogma effect --- Alternate route: &#x60;/v1/dogma/effects/{effect_id}/&#x60; Alternate route: &#x60;/legacy/dogma/effects/{effect_id}/&#x60; --- This route is cached for up to 3600 seconds * @param effectId A dogma effect ID (requ...
Get effect information (asynchronously) Get information on a dogma effect --- Alternate route: &#x60;/v1/dogma/effects/{effect_id}/&#x60; Alternate route: &#x60;/legacy/dogma/effects/{effect_id}/&#x60; --- This route is cached for up to 3600 seconds
getDogmaEffectsEffectIdAsync
{ "repo_name": "Tmin10/EVE-Security-Service", "path": "server-api/src/main/java/ru/tmin10/EVESecurityService/serverApi/api/DogmaApi.java", "license": "gpl-3.0", "size": 33114 }
[ "ru.tmin10.EVESecurityService" ]
import ru.tmin10.EVESecurityService;
import ru.tmin10.*;
[ "ru.tmin10" ]
ru.tmin10;
2,383,154
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> deleteAsync(String resourceGroupName, String firewallPolicyName);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> deleteAsync(String resourceGroupName, String firewallPolicyName);
/** * Deletes the specified Firewall Policy. * * @param resourceGroupName The name of the resource group. * @param firewallPolicyName The name of the Firewall Policy. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception....
Deletes the specified Firewall Policy
deleteAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/FirewallPoliciesClient.java", "license": "mit", "size": 20753 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.*;
[ "com.azure.core" ]
com.azure.core;
2,263,371
public void init(Config config, AlertStreamSchemaDAO dao){ if(!initialized){ synchronized(this){ if(!initialized){ if(LOG.isDebugEnabled()) LOG.debug("Initializing ..."); internalInit(config, dao); initialized = true; LOG.info("Successfully initialized"); ...
void function(Config config, AlertStreamSchemaDAO dao){ if(!initialized){ synchronized(this){ if(!initialized){ if(LOG.isDebugEnabled()) LOG.debug(STR); internalInit(config, dao); initialized = true; LOG.info(STR); } } }else{ LOG.info(STR); } }
/** * singleton with init would be good for unit test as well, and it ensures that * initialization happens only once before you use it. * @param config * @param dao */
singleton with init would be good for unit test as well, and it ensures that initialization happens only once before you use it
init
{ "repo_name": "sunlibin/incubator-eagle", "path": "eagle-core/eagle-alert/eagle-alert-process/src/main/java/org/apache/eagle/alert/siddhi/StreamMetadataManager.java", "license": "apache-2.0", "size": 4540 }
[ "com.typesafe.config.Config", "org.apache.eagle.alert.dao.AlertStreamSchemaDAO" ]
import com.typesafe.config.Config; import org.apache.eagle.alert.dao.AlertStreamSchemaDAO;
import com.typesafe.config.*; import org.apache.eagle.alert.dao.*;
[ "com.typesafe.config", "org.apache.eagle" ]
com.typesafe.config; org.apache.eagle;
1,695,102
String getName( int historyId ) throws TenableIoException;
String getName( int historyId ) throws TenableIoException;
/** * Get the name of the scan. * * @param historyId the scan history to get name for * @return the name * @throws TenableIoException the Tenable IO exception */
Get the name of the scan
getName
{ "repo_name": "tenable/Tenable.io-SDK-for-Java", "path": "src/main/java/com/tenable/io/api/scans/interfaces/ScanBaseOp.java", "license": "mit", "size": 4477 }
[ "com.tenable.io.core.exceptions.TenableIoException" ]
import com.tenable.io.core.exceptions.TenableIoException;
import com.tenable.io.core.exceptions.*;
[ "com.tenable.io" ]
com.tenable.io;
1,327,715
public static void compileDex2Oat(String dexFilePath, String oatFilePath) throws IOException { final File oatFile = new File(oatFilePath); if (!oatFile.exists()) { oatFile.getParentFile().mkdirs(); } final List<String> commandAndParams = new ArrayList<>(); commandAnd...
static void function(String dexFilePath, String oatFilePath) throws IOException { final File oatFile = new File(oatFilePath); if (!oatFile.exists()) { oatFile.getParentFile().mkdirs(); } final List<String> commandAndParams = new ArrayList<>(); commandAndParams.add(STR); if (Build.VERSION.SDK_INT >= 24) { commandAndPara...
/** * Optimize the dex in compile mode. * * @param dexFilePath dex file path * @param oatFilePath oat file path * @throws IOException */
Optimize the dex in compile mode
compileDex2Oat
{ "repo_name": "dstmath/VirtualApp", "path": "VirtualApp/lib/src/main/java/com/lody/virtual/helper/ArtDexOptimizer.java", "license": "gpl-3.0", "size": 3609 }
[ "android.os.Build", "java.io.File", "java.io.IOException", "java.util.ArrayList", "java.util.List", "java.util.concurrent.Executor", "java.util.concurrent.Executors" ]
import android.os.Build; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Executor; import java.util.concurrent.Executors;
import android.os.*; import java.io.*; import java.util.*; import java.util.concurrent.*;
[ "android.os", "java.io", "java.util" ]
android.os; java.io; java.util;
456,392
public Set<IProject> getProjects() { IResourceDelta delta = event.getDelta(); final Set<IProject> projects = Sets.newHashSet(); try { delta.accept(new IResourceDeltaVisitor() {
Set<IProject> function() { IResourceDelta delta = event.getDelta(); final Set<IProject> projects = Sets.newHashSet(); try { delta.accept(new IResourceDeltaVisitor() {
/** * Returns the projects affected by this event * * @return The projects affected by this event */
Returns the projects affected by this event
getProjects
{ "repo_name": "msbarry/Xtest", "path": "plugins/org.xtest.runner/src/org/xtest/runner/WorkspaceEvent.java", "license": "epl-1.0", "size": 5349 }
[ "com.google.common.collect.Sets", "java.util.Set", "org.eclipse.core.resources.IProject", "org.eclipse.core.resources.IResourceDelta", "org.eclipse.core.resources.IResourceDeltaVisitor" ]
import com.google.common.collect.Sets; import java.util.Set; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResourceDelta; import org.eclipse.core.resources.IResourceDeltaVisitor;
import com.google.common.collect.*; import java.util.*; import org.eclipse.core.resources.*;
[ "com.google.common", "java.util", "org.eclipse.core" ]
com.google.common; java.util; org.eclipse.core;
107,389
public static void copyResourceAsSibling(OpenCmsTestCase tc, CmsObject cms, String source, String target) throws Exception { // save the source in the store tc.storeResources(cms, source); // copy source to target as a sibling, the new sibling should not be locked cms.copyResou...
static void function(OpenCmsTestCase tc, CmsObject cms, String source, String target) throws Exception { tc.storeResources(cms, source); cms.copyResource(source, target, CmsResource.COPY_AS_SIBLING); tc.assertFilter(cms, source, OpenCmsTestResourceFilter.FILTER_EXISTING_SIBLING); tc.assertProject(cms, source, cms.getRe...
/** * Creates a copy of a resource as a new sibling.<p> * * @param tc the OpenCms test case * @param cms the current user's Cms object * @param source path/resource name of the existing resource * @param target path/resource name of the new sibling * @throws Exception if something g...
Creates a copy of a resource as a new sibling
copyResourceAsSibling
{ "repo_name": "it-tavis/opencms-core", "path": "test/org/opencms/file/TestSiblings.java", "license": "lgpl-2.1", "size": 42548 }
[ "org.opencms.lock.CmsLockType", "org.opencms.test.OpenCmsTestCase", "org.opencms.test.OpenCmsTestResourceFilter" ]
import org.opencms.lock.CmsLockType; import org.opencms.test.OpenCmsTestCase; import org.opencms.test.OpenCmsTestResourceFilter;
import org.opencms.lock.*; import org.opencms.test.*;
[ "org.opencms.lock", "org.opencms.test" ]
org.opencms.lock; org.opencms.test;
2,753,779
public Uni<List<generated.mutiny.jdbc.guice.vertx.tables.pojos.Something>> findManyBySometimestamp(Collection<LocalDateTime> values, int limit) { return findManyByCondition(Something.SOMETHING.SOMETIMESTAMP.in(values),limit); }
Uni<List<generated.mutiny.jdbc.guice.vertx.tables.pojos.Something>> function(Collection<LocalDateTime> values, int limit) { return findManyByCondition(Something.SOMETHING.SOMETIMESTAMP.in(values),limit); }
/** * Find records that have <code>SOMETIMESTAMP IN (values)</code> * asynchronously limited by the given limit */
Find records that have <code>SOMETIMESTAMP IN (values)</code> asynchronously limited by the given limit
findManyBySometimestamp
{ "repo_name": "jklingsporn/vertx-jooq", "path": "vertx-jooq-generate/src/test/java/generated/mutiny/jdbc/guice/vertx/tables/daos/SomethingDao.java", "license": "mit", "size": 9688 }
[ "io.smallrye.mutiny.Uni", "java.time.LocalDateTime", "java.util.Collection", "java.util.List" ]
import io.smallrye.mutiny.Uni; import java.time.LocalDateTime; import java.util.Collection; import java.util.List;
import io.smallrye.mutiny.*; import java.time.*; import java.util.*;
[ "io.smallrye.mutiny", "java.time", "java.util" ]
io.smallrye.mutiny; java.time; java.util;
30,414
public void setPlusApiOptions(PlusOptions options) { doApiOptionsPreCheck(); mPlusApiOptions = options; }
void function(PlusOptions options) { doApiOptionsPreCheck(); mPlusApiOptions = options; }
/** * Sets the options to pass when setting up the Plus API. Call before * setup(). */
Sets the options to pass when setting up the Plus API. Call before setup()
setPlusApiOptions
{ "repo_name": "dan-zx/tedroid", "path": "app/src/mx/udlap/is522/tedroid/gms/GameHelper.java", "license": "apache-2.0", "size": 40095 }
[ "com.google.android.gms.plus.Plus" ]
import com.google.android.gms.plus.Plus;
import com.google.android.gms.plus.*;
[ "com.google.android" ]
com.google.android;
1,376,969
public Map<AbstractProject,Integer> getUpstreamBuilds() { return _getUpstreamBuilds(getParent().getUpstreamProjects()); }
Map<AbstractProject,Integer> function() { return _getUpstreamBuilds(getParent().getUpstreamProjects()); }
/** * Gets the upstream builds of this build, which are the builds of the * upstream projects whose artifacts feed into this build. * * @see #getTransitiveUpstreamBuilds() */
Gets the upstream builds of this build, which are the builds of the upstream projects whose artifacts feed into this build
getUpstreamBuilds
{ "repo_name": "jtnord/jenkins", "path": "core/src/main/java/hudson/model/AbstractBuild.java", "license": "mit", "size": 48784 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
170,036
public static boolean canHaveSiblings(final Statement node) { ASTNode statementAtLevel= statementAtLevel(node); ASTNode parent= statementAtLevel.getParent(); return parent instanceof Block || parent instanceof SwitchStatement && statementAtLevel.getLocationInParent() == SwitchStatement.STATEMENTS_PRO...
static boolean function(final Statement node) { ASTNode statementAtLevel= statementAtLevel(node); ASTNode parent= statementAtLevel.getParent(); return parent instanceof Block parent instanceof SwitchStatement && statementAtLevel.getLocationInParent() == SwitchStatement.STATEMENTS_PROPERTY; }
/** * Returns true if a sibling may exist. * * @param node the start node * @return true if a sibling may exist */
Returns true if a sibling may exist
canHaveSiblings
{ "repo_name": "rpau/AutoRefactor", "path": "plugin/src/main/java/org/autorefactor/jdt/internal/corext/dom/ASTNodes.java", "license": "epl-1.0", "size": 104241 }
[ "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.jdt.core.dom.Block", "org.eclipse.jdt.core.dom.Statement", "org.eclipse.jdt.core.dom.SwitchStatement" ]
import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.Block; import org.eclipse.jdt.core.dom.Statement; import org.eclipse.jdt.core.dom.SwitchStatement;
import org.eclipse.jdt.core.dom.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
2,516,300
private Slice[] getUpdatedSliceArray(int[] oShape, int[] dsShape, Slice[] oSlice, int[] datadims) { if (AbstractDataset.squeezeShape(dsShape, false).length == 0) { List<Slice> l = new LinkedList<Slice>(Arrays.asList(oSlice)); for (int i = datadims.length-1; i >= 0; i--) { l.remove(datadims[i]); } ...
Slice[] function(int[] oShape, int[] dsShape, Slice[] oSlice, int[] datadims) { if (AbstractDataset.squeezeShape(dsShape, false).length == 0) { List<Slice> l = new LinkedList<Slice>(Arrays.asList(oSlice)); for (int i = datadims.length-1; i >= 0; i--) { l.remove(datadims[i]); } return l.toArray(new Slice[l.size()]); } A...
/** * Get a new slice array which reflects the position of the processed data in the full output dataset * @param oShape * @param dsShape * @param oSlice * @param datadims * @return newSlices */
Get a new slice array which reflects the position of the processed data in the full output dataset
getUpdatedSliceArray
{ "repo_name": "Anthchirp/dawnsci", "path": "org.eclipse.dawnsci.hdf5/src/org/eclipse/dawnsci/hdf5/operation/HierarchicalFileExecutionVisitor.java", "license": "epl-1.0", "size": 17726 }
[ "java.util.Arrays", "java.util.LinkedList", "java.util.List", "org.eclipse.dawnsci.analysis.api.dataset.Slice", "org.eclipse.dawnsci.analysis.dataset.impl.AbstractDataset" ]
import java.util.Arrays; import java.util.LinkedList; import java.util.List; import org.eclipse.dawnsci.analysis.api.dataset.Slice; import org.eclipse.dawnsci.analysis.dataset.impl.AbstractDataset;
import java.util.*; import org.eclipse.dawnsci.analysis.api.dataset.*; import org.eclipse.dawnsci.analysis.dataset.impl.*;
[ "java.util", "org.eclipse.dawnsci" ]
java.util; org.eclipse.dawnsci;
701,530
public final AlertDialog shareText(CharSequence text) { return shareText(text, "TEXT_TYPE"); }
final AlertDialog function(CharSequence text) { return shareText(text, STR); }
/** * Defaults to type "TEXT_TYPE". * @see #shareText(CharSequence, CharSequence) */
Defaults to type "TEXT_TYPE"
shareText
{ "repo_name": "kashev/nextWAVE", "path": "android/nextWAVE/src/com/google/zxing/integration/android/IntentIntegrator.java", "license": "mit", "size": 16826 }
[ "android.app.AlertDialog" ]
import android.app.AlertDialog;
import android.app.*;
[ "android.app" ]
android.app;
1,086,551
public void softDispose(RuntimeEngine runtimeEngine) { }
void function(RuntimeEngine runtimeEngine) { }
/** * Soft dispose means it will be invoked as sort of preparation step before actual dispose. * Mainly used with transaction synchronization to be invoked as part of beforeCompletion * to clean up any thread state - like thread local settings as afterCompletion can be invoked from another thread */
Soft dispose means it will be invoked as sort of preparation step before actual dispose. Mainly used with transaction synchronization to be invoked as part of beforeCompletion to clean up any thread state - like thread local settings as afterCompletion can be invoked from another thread
softDispose
{ "repo_name": "romartin/jbpm", "path": "jbpm-runtime-manager/src/main/java/org/jbpm/runtime/manager/impl/AbstractRuntimeManager.java", "license": "apache-2.0", "size": 21532 }
[ "org.kie.api.runtime.manager.RuntimeEngine" ]
import org.kie.api.runtime.manager.RuntimeEngine;
import org.kie.api.runtime.manager.*;
[ "org.kie.api" ]
org.kie.api;
2,212,810
protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) { Collection<IAction> actions = new ArrayList<IAction>(); if (descriptors != null) { for (Object descriptor : descriptors) { actions.add(new CreateChildAction(activeEditorPart, selection, descriptor))...
Collection<IAction> function(Collection<?> descriptors, ISelection selection) { Collection<IAction> actions = new ArrayList<IAction>(); if (descriptors != null) { for (Object descriptor : descriptors) { actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); } } return actions; }
/** * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>, * and returns the collection of these actions. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This generates a <code>org.eclipse.emf.edit.ui.action.CreateChildAction</code> for each object in <code>descriptors</code>, and returns the collection of these actions.
generateCreateChildActions
{ "repo_name": "occiware/Multi-Cloud-Studio", "path": "plugins/org.eclipse.cmf.occi.multicloud.monitoring.zabbix.editor/src-gen/org/eclipse/cmf/occi/multicloud/monitoring/zabbix/presentation/ZabbixActionBarContributor.java", "license": "epl-1.0", "size": 14449 }
[ "java.util.ArrayList", "java.util.Collection", "org.eclipse.emf.edit.ui.action.CreateChildAction", "org.eclipse.jface.action.IAction", "org.eclipse.jface.viewers.ISelection" ]
import java.util.ArrayList; import java.util.Collection; import org.eclipse.emf.edit.ui.action.CreateChildAction; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection;
import java.util.*; import org.eclipse.emf.edit.ui.action.*; import org.eclipse.jface.action.*; import org.eclipse.jface.viewers.*;
[ "java.util", "org.eclipse.emf", "org.eclipse.jface" ]
java.util; org.eclipse.emf; org.eclipse.jface;
2,616,815
public static long getPrefix(byte[] bytes) { if (bytes == null) { return 0L; } else { final int minLen = Math.min(bytes.length, 8); long p = 0; for (int i = 0; i < minLen; ++i) { p |= ((long) Platform.getByte(bytes, Platform.BYTE_ARRAY_OFFSET + i) & 0xff) << (56 - 8...
static long function(byte[] bytes) { if (bytes == null) { return 0L; } else { final int minLen = Math.min(bytes.length, 8); long p = 0; for (int i = 0; i < minLen; ++i) { p = ((long) Platform.getByte(bytes, Platform.BYTE_ARRAY_OFFSET + i) & 0xff) << (56 - 8 * i); } return p; } }
/** * Returns a 64-bit integer that can be used as the prefix used in sorting. */
Returns a 64-bit integer that can be used as the prefix used in sorting
getPrefix
{ "repo_name": "ddna1021/spark", "path": "common/unsafe/src/main/java/org/apache/spark/unsafe/types/ByteArray.java", "license": "apache-2.0", "size": 3178 }
[ "org.apache.spark.unsafe.Platform" ]
import org.apache.spark.unsafe.Platform;
import org.apache.spark.unsafe.*;
[ "org.apache.spark" ]
org.apache.spark;
887,343
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getColumnName()); }
KeyNamePair function() { return new KeyNamePair(get_ID(), getColumnName()); }
/** Get Record ID/ColumnName @return ID/ColumnName pair */
Get Record ID/ColumnName
getKeyNamePair
{ "repo_name": "erpcya/adempierePOS", "path": "base/src/org/compiere/model/X_AD_Element.java", "license": "gpl-2.0", "size": 9157 }
[ "org.compiere.util.KeyNamePair" ]
import org.compiere.util.KeyNamePair;
import org.compiere.util.*;
[ "org.compiere.util" ]
org.compiere.util;
2,532,868
public Observable<ServiceResponse<ClusterInner>> beginUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); ...
Observable<ServiceResponse<ClusterInner>> function(String resourceGroupName, String clusterName, ClusterUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (clusterName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw...
/** * Update a Kusto cluster. * * @param resourceGroupName The name of the resource group containing the Kusto cluster. * @param clusterName The name of the Kusto cluster. * @param parameters The Kusto cluster parameters supplied to the Update operation. * @throws IllegalArgumentException ...
Update a Kusto cluster
beginUpdateWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/kusto/mgmt-v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/ClustersInner.java", "license": "mit", "size": 83740 }
[ "com.microsoft.azure.management.kusto.v2018_09_07_preview.ClusterUpdate", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.management.kusto.v2018_09_07_preview.ClusterUpdate; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.management.kusto.v2018_09_07_preview.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,814,238
protected void onRestoreInstanceState(Parcelable state) { mBaseMethodCalled = true; if (state != BaseSavedState.EMPTY_STATE && state != null) { throw new IllegalArgumentException("Wrong state class -- expecting Preference State"); } } public static class BaseSavedSt...
void function(Parcelable state) { mBaseMethodCalled = true; if (state != BaseSavedState.EMPTY_STATE && state != null) { throw new IllegalArgumentException(STR); } } public static class BaseSavedState extends AbsSavedState { public BaseSavedState(Parcel source) { super(source); } public BaseSavedState(Parcelable superSt...
/** * Hook allowing a Preference to re-apply a representation of its internal * state that had previously been generated by {@link #onSaveInstanceState}. * This function will never be called with a null state. * * @param state The saved state that had previously been returned by * ...
Hook allowing a Preference to re-apply a representation of its internal state that had previously been generated by <code>#onSaveInstanceState</code>. This function will never be called with a null state
onRestoreInstanceState
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/android/preference/Preference.java", "license": "apache-2.0", "size": 67104 }
[ "android.os.Parcel", "android.os.Parcelable", "android.view.AbsSavedState" ]
import android.os.Parcel; import android.os.Parcelable; import android.view.AbsSavedState;
import android.os.*; import android.view.*;
[ "android.os", "android.view" ]
android.os; android.view;
2,378,920
private List<String> createVariablesFromInstructions(ItemBean item, List<String> variableNames) { List<String> errors = new ArrayList<String>(); Map<String, CalculatedQuestionFormulaBean> formulas = item.getCalculatedQuestion().getFormulas(); Map<String, CalculatedQuestionVariableBean> varia...
List<String> function(ItemBean item, List<String> variableNames) { List<String> errors = new ArrayList<String>(); Map<String, CalculatedQuestionFormulaBean> formulas = item.getCalculatedQuestion().getFormulas(); Map<String, CalculatedQuestionVariableBean> variables = item.getCalculatedQuestion().getVariables(); for (St...
/** * createVariablesFromInstructions adds any variables that exist in the list * of variableNames but do not already exist in the question * @param item * @param variableNames */
createVariablesFromInstructions adds any variables that exist in the list of variableNames but do not already exist in the question
createVariablesFromInstructions
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/author/CalculatedQuestionExtractListener.java", "license": "apache-2.0", "size": 26007 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map", "org.sakaiproject.tool.assessment.ui.bean.author.CalculatedQuestionFormulaBean", "org.sakaiproject.tool.assessment.ui.bean.author.CalculatedQuestionVariableBean", "org.sakaiproject.tool.assessment.ui.bean.author.ItemBean" ]
import java.util.ArrayList; import java.util.List; import java.util.Map; import org.sakaiproject.tool.assessment.ui.bean.author.CalculatedQuestionFormulaBean; import org.sakaiproject.tool.assessment.ui.bean.author.CalculatedQuestionVariableBean; import org.sakaiproject.tool.assessment.ui.bean.author.ItemBean;
import java.util.*; import org.sakaiproject.tool.assessment.ui.bean.author.*;
[ "java.util", "org.sakaiproject.tool" ]
java.util; org.sakaiproject.tool;
2,118,376
public static String verifyAndCompress(String in, double d) throws IOException { Compression c = compressionType(d); if (c.equals(Compression.NO_COMPRESSION)) { return in; } else if (c.equals(Compression.SUPER_FAST_COMPRESSION)) { return new Zip4JCompactor().compact(in, COMPRESSION_LEVEL_SUPER_FAST); ...
static String function(String in, double d) throws IOException { Compression c = compressionType(d); if (c.equals(Compression.NO_COMPRESSION)) { return in; } else if (c.equals(Compression.SUPER_FAST_COMPRESSION)) { return new Zip4JCompactor().compact(in, COMPRESSION_LEVEL_SUPER_FAST); } else if (c.equals(Compression.FA...
/** * Returns the file to be sent, based in the original file and the * bandwidth. Probably is gonna return a compressed file. * * @param in * {@link File} original file * @param d * Bandwidth in bytes per second (1MB/s -> 1024, for example) * @return {@link File} file to be sent....
Returns the file to be sent, based in the original file and the bandwidth. Probably is gonna return a compressed file
verifyAndCompress
{ "repo_name": "bionimbuz/Bionimbuz", "path": "src/main/java/br/unb/cic/bionimbuz/services/storage/compress/CompressPolicy.java", "license": "gpl-3.0", "size": 7154 }
[ "br.unb.cic.bionimbuz.services.storage.compress.compactors.ApacheXZCompactor", "br.unb.cic.bionimbuz.services.storage.compress.compactors.GZipCompactor", "br.unb.cic.bionimbuz.services.storage.compress.compactors.JavaZipCompactor", "br.unb.cic.bionimbuz.services.storage.compress.compactors.Zip4JCompactor", ...
import br.unb.cic.bionimbuz.services.storage.compress.compactors.ApacheXZCompactor; import br.unb.cic.bionimbuz.services.storage.compress.compactors.GZipCompactor; import br.unb.cic.bionimbuz.services.storage.compress.compactors.JavaZipCompactor; import br.unb.cic.bionimbuz.services.storage.compress.compactors.Zip4JCom...
import br.unb.cic.bionimbuz.services.storage.compress.compactors.*; import java.io.*;
[ "br.unb.cic", "java.io" ]
br.unb.cic; java.io;
1,529,306
public LockState ensureLockState() throws IOException { return lockStateAccess.ensureLockState(lockFileAccess); }
LockState function() throws IOException { return lockStateAccess.ensureLockState(lockFileAccess); }
/** * Reads the lock state from the lock file, possibly writing out a new lock file if not present or empty. */
Reads the lock state from the lock file, possibly writing out a new lock file if not present or empty
ensureLockState
{ "repo_name": "gstevey/gradle", "path": "subprojects/persistent-cache/src/main/java/org/gradle/cache/internal/filelock/LockFileAccess.java", "license": "apache-2.0", "size": 3216 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,081,085
public Settings filter(Predicate<String> predicate) { Builder builder = new Builder(); for (Map.Entry<String, String> entry : getAsMap().entrySet()) { if (predicate.test(entry.getKey())) { builder.put(entry.getKey(), entry.getValue()); } } retu...
Settings function(Predicate<String> predicate) { Builder builder = new Builder(); for (Map.Entry<String, String> entry : getAsMap().entrySet()) { if (predicate.test(entry.getKey())) { builder.put(entry.getKey(), entry.getValue()); } } return builder.build(); }
/** * Returns a new settings object that contains all setting of the current one filtered by the given settings key predicate. */
Returns a new settings object that contains all setting of the current one filtered by the given settings key predicate
filter
{ "repo_name": "strahanjen/strahanjen.github.io", "path": "elasticsearch-master/core/src/main/java/org/elasticsearch/common/settings/Settings.java", "license": "bsd-3-clause", "size": 39113 }
[ "java.util.Map", "java.util.function.Predicate" ]
import java.util.Map; import java.util.function.Predicate;
import java.util.*; import java.util.function.*;
[ "java.util" ]
java.util;
1,408,670
public RouteFilterInner withRules(List<RouteFilterRuleInner> rules) { this.rules = rules; return this; }
RouteFilterInner function(List<RouteFilterRuleInner> rules) { this.rules = rules; return this; }
/** * Set collection of RouteFilterRules contained within a route filter. * * @param rules the rules value to set * @return the RouteFilterInner object itself. */
Set collection of RouteFilterRules contained within a route filter
withRules
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/RouteFilterInner.java", "license": "mit", "size": 3547 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,548,279