method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void setCms(CmsObject cms) {
m_cms = cms;
}
| void function(CmsObject cms) { m_cms = cms; } | /**
* Sets the CMS object.<p>
*
* @param cms the CMS object
*/ | Sets the CMS object | setCms | {
"repo_name": "it-tavis/opencms-core",
"path": "src/org/opencms/gwt/CmsAliasHelper.java",
"license": "lgpl-2.1",
"size": 10337
} | [
"org.opencms.file.CmsObject"
] | import org.opencms.file.CmsObject; | import org.opencms.file.*; | [
"org.opencms.file"
] | org.opencms.file; | 1,312,436 |
public void setQualifiers(Map<String, List<JacksonSnak>> qualifiers) {
this.qualifiers = qualifiers;
} | void function(Map<String, List<JacksonSnak>> qualifiers) { this.qualifiers = qualifiers; } | /**
* Sets the qualifiers to the given value. Only for use by Jackson during
* deserialization.
*
* @param qualifiers
* new value
*/ | Sets the qualifiers to the given value. Only for use by Jackson during deserialization | setQualifiers | {
"repo_name": "monkey2000/Wikidata-Toolkit",
"path": "wdtk-datamodel/src/main/java/org/wikidata/wdtk/datamodel/json/jackson/JacksonStatement.java",
"license": "apache-2.0",
"size": 8379
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 967,887 |
protected void emit_ClauseExpression_BoostTerminalRuleCall_1_1_0_2_1_1_2_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
| void function(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); } | /**
* Syntax:
* Boost?
*/ | Syntax: Boost | emit_ClauseExpression_BoostTerminalRuleCall_1_1_0_2_1_1_2_q | {
"repo_name": "tobiasb/CodeFinder",
"path": "plugins/org.eclipselabs.recommenders.codesearch.rcp.dsl/src-gen/org/eclipselabs/recommenders/codesearch/rcp/dsl/serializer/AbstractLuceneQuerySyntacticSequencer.java",
"license": "epl-1.0",
"size": 25261
} | [
"java.util.List",
"org.eclipse.emf.ecore.EObject",
"org.eclipse.xtext.nodemodel.INode",
"org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider"
] | import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider; | import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.nodemodel.*; import org.eclipse.xtext.serializer.analysis.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.xtext"
] | java.util; org.eclipse.emf; org.eclipse.xtext; | 876,416 |
AmazonS3 client = null;
AmazonS3ClientBuilder clientBuilder = null;
AmazonS3EncryptionClientBuilder encClientBuilder = null;
ClientConfiguration clientConfiguration = new ClientConfiguration();
clientConfiguration.setMaxConnections(maxConnections);
if (configuration.hasProxyCon... | AmazonS3 client = null; AmazonS3ClientBuilder clientBuilder = null; AmazonS3EncryptionClientBuilder encClientBuilder = null; ClientConfiguration clientConfiguration = new ClientConfiguration(); clientConfiguration.setMaxConnections(maxConnections); if (configuration.hasProxyConfiguration()) { clientConfiguration.setPro... | /**
* Getting the s3 aws client that is used.
*
* @return Amazon S3 Client.
*/ | Getting the s3 aws client that is used | getS3Client | {
"repo_name": "objectiser/camel",
"path": "components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/client/impl/S3ClientIAMOptimizedImpl.java",
"license": "apache-2.0",
"size": 4849
} | [
"com.amazonaws.ClientConfiguration",
"com.amazonaws.auth.InstanceProfileCredentialsProvider",
"com.amazonaws.regions.Regions",
"com.amazonaws.services.s3.AmazonS3",
"com.amazonaws.services.s3.AmazonS3ClientBuilder",
"com.amazonaws.services.s3.AmazonS3EncryptionClientBuilder",
"com.amazonaws.services.s3.... | import com.amazonaws.ClientConfiguration; import com.amazonaws.auth.InstanceProfileCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.AmazonS3ClientBuilder; import com.amazonaws.services.s3.AmazonS3EncryptionClientBuilder; import com.am... | import com.amazonaws.*; import com.amazonaws.auth.*; import com.amazonaws.regions.*; import com.amazonaws.services.s3.*; import com.amazonaws.services.s3.model.*; import org.apache.camel.util.*; | [
"com.amazonaws",
"com.amazonaws.auth",
"com.amazonaws.regions",
"com.amazonaws.services",
"org.apache.camel"
] | com.amazonaws; com.amazonaws.auth; com.amazonaws.regions; com.amazonaws.services; org.apache.camel; | 2,085,001 |
@Nullable
public long[] getLongArray(@Nullable String key) {
unparcel();
Object o = mMap.get(key);
if (o == null) {
return null;
}
try {
return (long[]) o;
} catch (ClassCastException e) {
typeWarning(key, o, "long[]", e);
... | long[] function(@Nullable String key) { unparcel(); Object o = mMap.get(key); if (o == null) { return null; } try { return (long[]) o; } catch (ClassCastException e) { typeWarning(key, o, STR, e); return null; } } | /**
* Returns the value associated with the given key, or null if
* no mapping of the desired type exists for the given key or a null
* value is explicitly associated with the key.
*
* @param key a String, or null
* @return a long[] value, or null
*/ | Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key | getLongArray | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/os/BaseBundle.java",
"license": "gpl-3.0",
"size": 41590
} | [
"android.annotation.Nullable"
] | import android.annotation.Nullable; | import android.annotation.*; | [
"android.annotation"
] | android.annotation; | 2,000,310 |
String workspaceRoot = System.getProperty(ISystemPropertyEnum.WORKSPACE_PATH);
String path = workspaceRoot + File.separator + role.getProjectName() + File.separator + "_metadata" + File.separator + ScrumEnum.SCRUMROLE_FILE;
String defaultpath = workspaceRoot + File.separator + "_metadata" + File.separator + "Scru... | String workspaceRoot = System.getProperty(ISystemPropertyEnum.WORKSPACE_PATH); String path = workspaceRoot + File.separator + role.getProjectName() + File.separator + STR + File.separator + ScrumEnum.SCRUMROLE_FILE; String defaultpath = workspaceRoot + File.separator + STR + File.separator + STR; Document doc = XmlFile... | /**
* update permission by ScrumRole
*/ | update permission by ScrumRole | update | {
"repo_name": "ezScrum/ezScrum_1.7.2_export",
"path": "java/ntut/csie/ezScrum/web/mapper/ScrumRoleMapper.java",
"license": "gpl-2.0",
"size": 7935
} | [
"java.io.File",
"org.jdom.Document",
"org.jdom.Element"
] | import java.io.File; import org.jdom.Document; import org.jdom.Element; | import java.io.*; import org.jdom.*; | [
"java.io",
"org.jdom"
] | java.io; org.jdom; | 964,500 |
public static Image toGrayscale(Image source) {
if (source == null)
return null;
BufferedImage src = new BufferedImage(source.getWidth(null), source
.getHeight(null), BufferedImage.TYPE_INT_ARGB);
src.getGraphics().drawImage(source, 0, 0, null);
BufferedImageOp op = new ColorConvertOp(ColorSpace
.... | static Image function(Image source) { if (source == null) return null; BufferedImage src = new BufferedImage(source.getWidth(null), source .getHeight(null), BufferedImage.TYPE_INT_ARGB); src.getGraphics().drawImage(source, 0, 0, null); BufferedImageOp op = new ColorConvertOp(ColorSpace .getInstance(ColorSpace.CS_GRAY),... | /**
* Converts an image to grayscale
*/ | Converts an image to grayscale | toGrayscale | {
"repo_name": "mathieulegoc/SmartTokens",
"path": "material/tokenNotifier/src/fr/aviz/tokennotifier/util/GUIUtils.java",
"license": "mit",
"size": 21870
} | [
"java.awt.Image",
"java.awt.color.ColorSpace",
"java.awt.image.BufferedImage",
"java.awt.image.BufferedImageOp",
"java.awt.image.ColorConvertOp"
] | import java.awt.Image; import java.awt.color.ColorSpace; import java.awt.image.BufferedImage; import java.awt.image.BufferedImageOp; import java.awt.image.ColorConvertOp; | import java.awt.*; import java.awt.color.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 1,836,247 |
public void testLocalTime()
{
try
{
// Create some data we can use for access
PersistenceManager pm = pmf.getPersistenceManager();
Transaction tx = pm.currentTransaction();
LocalTime localTime1 = LocalTime.of(15, 9, 26);
LocalTime loca... | void function() { try { PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx = pm.currentTransaction(); LocalTime localTime1 = LocalTime.of(15, 9, 26); LocalTime localTime2 = LocalTime.of(7, 9, 26); Object id = null; try { tx.begin(); JavaxtimeSample3 s = new JavaxtimeSample3(1, localTime1, localTime2); ... | /**
* Test for LocalTime persistence and retrieval.
*/ | Test for LocalTime persistence and retrieval | testLocalTime | {
"repo_name": "hopecee/texsts",
"path": "jdo/general/src/test/org/datanucleus/tests/types/JavaxTimeTest.java",
"license": "apache-2.0",
"size": 12884
} | [
"javax.jdo.PersistenceManager",
"javax.jdo.Transaction",
"javax.time.calendar.LocalTime",
"org.datanucleus.samples.types.javaxtime.JavaxtimeSample3"
] | import javax.jdo.PersistenceManager; import javax.jdo.Transaction; import javax.time.calendar.LocalTime; import org.datanucleus.samples.types.javaxtime.JavaxtimeSample3; | import javax.jdo.*; import javax.time.calendar.*; import org.datanucleus.samples.types.javaxtime.*; | [
"javax.jdo",
"javax.time",
"org.datanucleus.samples"
] | javax.jdo; javax.time; org.datanucleus.samples; | 1,098,655 |
public void setTickLabelFont(Comparable category, Font font) {
if (category == null) {
throw new IllegalArgumentException("Null 'category' argument.");
}
if (font == null) {
this.tickLabelFontMap.remove(category);
} else {
this.tickLabelFontMap.put... | void function(Comparable category, Font font) { if (category == null) { throw new IllegalArgumentException(STR); } if (font == null) { this.tickLabelFontMap.remove(category); } else { this.tickLabelFontMap.put(category, font); } notifyListeners(new AxisChangeEvent(this)); } | /**
* Sets the font for the tick label for the specified category and sends an
* {@link AxisChangeEvent} to all registered listeners.
*
* @param category
* the category (<code>null</code> not permitted).
* @param font
* the font (<code>null</code> permitted).
... | Sets the font for the tick label for the specified category and sends an <code>AxisChangeEvent</code> to all registered listeners | setTickLabelFont | {
"repo_name": "djun100/afreechart",
"path": "src/org/afree/chart/axis/CategoryAxis.java",
"license": "lgpl-3.0",
"size": 50274
} | [
"org.afree.chart.event.AxisChangeEvent",
"org.afree.graphics.geom.Font"
] | import org.afree.chart.event.AxisChangeEvent; import org.afree.graphics.geom.Font; | import org.afree.chart.event.*; import org.afree.graphics.geom.*; | [
"org.afree.chart",
"org.afree.graphics"
] | org.afree.chart; org.afree.graphics; | 180,334 |
@Override
protected PreparedStatement setPreparedStatement(PreparedStatement pstmt, Object object) throws AuditException {
try {
ATNAAuditSource as = (ATNAAuditSource) object;
logger.trace("AS Prepared Statement For: " + as.getUniqueID());
if (action == DAO_ACTION_INS... | PreparedStatement function(PreparedStatement pstmt, Object object) throws AuditException { try { ATNAAuditSource as = (ATNAAuditSource) object; logger.trace(STR + as.getUniqueID()); if (action == DAO_ACTION_INSERT) { pstmt.setString(1, as.getUniqueID()); pstmt.setString(2, getParentId()); pstmt.setString(3, as.getId())... | /**
* Returns the prepared statement with bind variables populated
*
*/ | Returns the prepared statement with bind variables populated | setPreparedStatement | {
"repo_name": "kef/hieos",
"path": "src/arrmdb/src/java/com/vangent/hieos/services/atna/arr/storage/AuditSourceDAO.java",
"license": "apache-2.0",
"size": 3911
} | [
"com.vangent.hieos.services.atna.arr.support.ATNAAuditSource",
"com.vangent.hieos.services.atna.arr.support.AuditException",
"java.sql.PreparedStatement",
"java.sql.SQLException"
] | import com.vangent.hieos.services.atna.arr.support.ATNAAuditSource; import com.vangent.hieos.services.atna.arr.support.AuditException; import java.sql.PreparedStatement; import java.sql.SQLException; | import com.vangent.hieos.services.atna.arr.support.*; import java.sql.*; | [
"com.vangent.hieos",
"java.sql"
] | com.vangent.hieos; java.sql; | 42,167 |
boolean checkPermission(PrivilegeEntity privilegeEntity, boolean readOnly); | boolean checkPermission(PrivilegeEntity privilegeEntity, boolean readOnly); | /**
* Determine whether or not access to this cluster resource should be allowed based
* on the given privilege.
*
* @param privilegeEntity the privilege
* @param readOnly indicate whether or not this check is for a read only operation
*
* @return true if the access to this cluster is allo... | Determine whether or not access to this cluster resource should be allowed based on the given privilege | checkPermission | {
"repo_name": "sekikn/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java",
"license": "apache-2.0",
"size": 24252
} | [
"org.apache.ambari.server.orm.entities.PrivilegeEntity"
] | import org.apache.ambari.server.orm.entities.PrivilegeEntity; | import org.apache.ambari.server.orm.entities.*; | [
"org.apache.ambari"
] | org.apache.ambari; | 860,453 |
private static void addNamedOutput(JobConf conf, String namedOutput,
boolean multi,
Class<? extends OutputFormat> outputFormatClass,
Schema schema) {
checkNamedOutputName(namedOutput);
checkNamedOutput(conf, namedOutp... | static void function(JobConf conf, String namedOutput, boolean multi, Class<? extends OutputFormat> outputFormatClass, Schema schema) { checkNamedOutputName(namedOutput); checkNamedOutput(conf, namedOutput, true); boolean isMapOnly = conf.getNumReduceTasks() == 0; if(schema!=null) conf.set(MO_PREFIX+namedOutput+STR, sc... | /**
* Adds a named output for the job.
* <p/>
*
* @param conf job conf to add the named output
* @param namedOutput named output name, it has to be a word, letters
* and numbers only, cannot be the word 'part' as
* that is reserve... | Adds a named output for the job. | addNamedOutput | {
"repo_name": "RallySoftware/avro",
"path": "lang/java/mapred/src/main/java/org/apache/avro/mapred/AvroMultipleOutputs.java",
"license": "apache-2.0",
"size": 22156
} | [
"org.apache.avro.Schema",
"org.apache.hadoop.mapred.JobConf",
"org.apache.hadoop.mapred.OutputFormat"
] | import org.apache.avro.Schema; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapred.OutputFormat; | import org.apache.avro.*; import org.apache.hadoop.mapred.*; | [
"org.apache.avro",
"org.apache.hadoop"
] | org.apache.avro; org.apache.hadoop; | 2,816,765 |
private void writeErrorToClient(String message) {
try {
OutputStream sockOut = clientSocket.getOutputStream();
DataOutputStream out = new DataOutputStream(sockOut);
out.writeBytes(message);
out.flush();
} catch (Exception e) {
log.warn(port... | void function(String message) { try { OutputStream sockOut = clientSocket.getOutputStream(); DataOutputStream out = new DataOutputStream(sockOut); out.writeBytes(message); out.flush(); } catch (Exception e) { log.warn(port + STR, e); } } | /**
* Write an error message to the client. The message should be the full HTTP
* response.
*
* @param message
* the message to write
*/ | Write an error message to the client. The message should be the full HTTP response | writeErrorToClient | {
"repo_name": "ubikfsabbe/jmeter",
"path": "src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java",
"license": "apache-2.0",
"size": 27324
} | [
"java.io.DataOutputStream",
"java.io.OutputStream"
] | import java.io.DataOutputStream; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,049,945 |
Iterable<DOMElementHandler> getHandlers(EPackage epackage); | Iterable<DOMElementHandler> getHandlers(EPackage epackage); | /**
* Gets the DOM element handlers registered for the specified {@code epackage}.
*
* @param epackage
* an Ecore package
*
* @return the handlers, in the order in which they should be applied to DOM elements
*/ | Gets the DOM element handlers registered for the specified epackage | getHandlers | {
"repo_name": "drbgfc/mdht",
"path": "core/plugins/org.openhealthtools.mdht.emf.runtime/src/org/openhealthtools/mdht/emf/runtime/resource/DOMElementHandler.java",
"license": "epl-1.0",
"size": 2296
} | [
"org.eclipse.emf.ecore.EPackage"
] | import org.eclipse.emf.ecore.EPackage; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,413,181 |
private String getMetaXFOEvidence(Source source) {
List<Element> metaElements = source.getAllElements(HTMLElementName.META);
String httpEquiv;
if (metaElements != null) {
for (Element metaElement : metaElements) {
httpEquiv = metaElement.getAttributeValue("http-e... | String function(Source source) { List<Element> metaElements = source.getAllElements(HTMLElementName.META); String httpEquiv; if (metaElements != null) { for (Element metaElement : metaElements) { httpEquiv = metaElement.getAttributeValue(STR); if (HttpHeader.X_FRAME_OPTION.equalsIgnoreCase(httpEquiv)) { return metaElem... | /**
* Checks the source of the response for XFO being set via a META tag which is explicitly not
* supported per the spec (rfc7034).
*
* @param source the source of the response to be analyzed.
* @return returns a string if XFO was set via META (for use as alert evidence) otherwise return
... | Checks the source of the response for XFO being set via a META tag which is explicitly not supported per the spec (rfc7034) | getMetaXFOEvidence | {
"repo_name": "zapbot/zap-extensions",
"path": "addOns/pscanrules/src/main/java/org/zaproxy/zap/extension/pscanrules/XFrameOptionScanRule.java",
"license": "apache-2.0",
"size": 7485
} | [
"java.util.List",
"net.htmlparser.jericho.Element",
"net.htmlparser.jericho.HTMLElementName",
"net.htmlparser.jericho.Source",
"org.parosproxy.paros.network.HttpHeader"
] | import java.util.List; import net.htmlparser.jericho.Element; import net.htmlparser.jericho.HTMLElementName; import net.htmlparser.jericho.Source; import org.parosproxy.paros.network.HttpHeader; | import java.util.*; import net.htmlparser.jericho.*; import org.parosproxy.paros.network.*; | [
"java.util",
"net.htmlparser.jericho",
"org.parosproxy.paros"
] | java.util; net.htmlparser.jericho; org.parosproxy.paros; | 1,253 |
public SpreadSheet extract(File file) throws Exception {
SpreadSheet result;
check(file);
result = doExtract(file);
return result;
} | SpreadSheet function(File file) throws Exception { SpreadSheet result; check(file); result = doExtract(file); return result; } | /**
* Extracts the meta-data from the image.
*
* @param file the file to process
* @return the meta-data
* @throws Exception if extraction fails
*/ | Extracts the meta-data from the image | extract | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-imaging/src/main/java/adams/flow/transformer/metadata/AbstractMetaDataExtractor.java",
"license": "gpl-3.0",
"size": 2748
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,670,730 |
private void onDatabaseChanged(ListChangeListener.Change<? extends BibEntry> change) {
calculateNumberOfMatches();
} | void function(ListChangeListener.Change<? extends BibEntry> change) { calculateNumberOfMatches(); } | /**
* Gets invoked if an entry in the current database changes.
*/ | Gets invoked if an entry in the current database changes | onDatabaseChanged | {
"repo_name": "zellerdev/jabref",
"path": "src/main/java/org/jabref/gui/groups/GroupNodeViewModel.java",
"license": "mit",
"size": 13178
} | [
"org.jabref.model.entry.BibEntry"
] | import org.jabref.model.entry.BibEntry; | import org.jabref.model.entry.*; | [
"org.jabref.model"
] | org.jabref.model; | 1,926,532 |
public java.util.ArrayList<Utils.Calendar.Calendar> loadClassroomCalendar(long id) throws DBException {
if (id == Defs.nullId) {
throw new DBException("loadClassroomCalendar", DBException.errorCode.INVALID_ID);
}
return loadCalendar(DBNAME + ".subject INNER JOIN " + DBNAME + ".classroom ON classroo... | java.util.ArrayList<Utils.Calendar.Calendar> function(long id) throws DBException { if (id == Defs.nullId) { throw new DBException(STR, DBException.errorCode.INVALID_ID); } return loadCalendar(DBNAME + STR + DBNAME + STR + id + STR); } | /**
* Retorna el calendari de l'aula
*
* @param id Long
* @return Objecte calendari o <b>null</b> si s'ha produit un error
* @throws DBException Si l'id és <b>Defs.nullId</b>
*/ | Retorna el calendari de l'aula | loadClassroomCalendar | {
"repo_name": "PereBal/Uib",
"path": "Lleng_Progr_EntregaFinal/src/Utils/DB/DBI.java",
"license": "gpl-2.0",
"size": 62268
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 580,523 |
public boolean setCancellerHandle(ScheduledFuture<?> cancellerHandle) {
synchronized (lock) {
if (this.cancellerHandle == null) {
if (!discarded) {
this.cancellerHandle = cancellerHandle;
return true;
} else {
return false;
}
}
else {
throw new IllegalStateException("A cance... | boolean function(ScheduledFuture<?> cancellerHandle) { synchronized (lock) { if (this.cancellerHandle == null) { if (!discarded) { this.cancellerHandle = cancellerHandle; return true; } else { return false; } } else { throw new IllegalStateException(STR); } } } | /**
* Sets the handle for the canceller to this pending checkpoint. This method fails
* with an exception if a handle has already been set.
*
* @return true, if the handle was set, false, if the checkpoint is already disposed;
*/ | Sets the handle for the canceller to this pending checkpoint. This method fails with an exception if a handle has already been set | setCancellerHandle | {
"repo_name": "fanzhidongyzby/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PendingCheckpoint.java",
"license": "apache-2.0",
"size": 18637
} | [
"java.util.concurrent.ScheduledFuture"
] | import java.util.concurrent.ScheduledFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,706,928 |
public GetOverallBucketsResponse getOverallBuckets(GetOverallBucketsRequest request, RequestOptions options) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(request,
MLRequestConverters::getOverallBuckets,
options,
GetOverallBucket... | GetOverallBucketsResponse function(GetOverallBucketsRequest request, RequestOptions options) throws IOException { return restHighLevelClient.performRequestAndParseEntity(request, MLRequestConverters::getOverallBuckets, options, GetOverallBucketsResponse::fromXContent, Collections.emptySet()); } | /**
* Gets overall buckets for a set of Machine Learning Jobs.
* <p>
* For additional info
* see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html">
* ML GET overall buckets documentation</a>
*
* @param request The request
* @par... | Gets overall buckets for a set of Machine Learning Jobs. For additional info see ML GET overall buckets documentation | getOverallBuckets | {
"repo_name": "uschindler/elasticsearch",
"path": "client/rest-high-level/src/main/java/org/elasticsearch/client/MachineLearningClient.java",
"license": "apache-2.0",
"size": 130429
} | [
"java.io.IOException",
"java.util.Collections",
"org.elasticsearch.client.ml.GetOverallBucketsRequest",
"org.elasticsearch.client.ml.GetOverallBucketsResponse"
] | import java.io.IOException; import java.util.Collections; import org.elasticsearch.client.ml.GetOverallBucketsRequest; import org.elasticsearch.client.ml.GetOverallBucketsResponse; | import java.io.*; import java.util.*; import org.elasticsearch.client.ml.*; | [
"java.io",
"java.util",
"org.elasticsearch.client"
] | java.io; java.util; org.elasticsearch.client; | 293,389 |
public void close() throws IOException {
if (nsWriter != null) {
nsWriter.write("\n");
out.close();
nsWriter.write(((StringWriter) out).getBuffer().toString());
out = nsWriter;
nsWriter = null;
}
out.flush();
out = null;
... | void function() throws IOException { if (nsWriter != null) { nsWriter.write("\n"); out.close(); nsWriter.write(((StringWriter) out).getBuffer().toString()); out = nsWriter; nsWriter = null; } out.flush(); out = null; } | /**
* Flushes all pending write operations and Closes this writer. please note,
* that the underlying writer remains open.
*
* @throws IOException if an I/O error occurs
*/ | Flushes all pending write operations and Closes this writer. please note, that the underlying writer remains open | close | {
"repo_name": "apache/jackrabbit",
"path": "jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/cnd/CompactNodeTypeDefWriter.java",
"license": "apache-2.0",
"size": 18530
} | [
"java.io.IOException",
"java.io.StringWriter"
] | import java.io.IOException; import java.io.StringWriter; | import java.io.*; | [
"java.io"
] | java.io; | 2,034,186 |
public void setSchedule(Schedule schedule) {
this.schedule = schedule;
} | void function(Schedule schedule) { this.schedule = schedule; } | /**
* Sets the schedule.
*
* @param schedule the new schedule
*/ | Sets the schedule | setSchedule | {
"repo_name": "uaijug/chronos",
"path": "src/main/java/br/com/uaijug/chronos/schedule/controller/ScheduleController.java",
"license": "gpl-3.0",
"size": 5547
} | [
"br.com.uaijug.chronos.schedule.model.Schedule"
] | import br.com.uaijug.chronos.schedule.model.Schedule; | import br.com.uaijug.chronos.schedule.model.*; | [
"br.com.uaijug"
] | br.com.uaijug; | 1,691,505 |
public synchronized void sendIgnorePacket(byte[] data) throws IOException
{
if (data == null)
throw new IllegalArgumentException("data argument must not be null.");
if (tm == null)
throw new IllegalStateException(
"Cannot send SSH_MSG_IGNORE packet, you need to establish a connection first.");
Pa... | synchronized void function(byte[] data) throws IOException { if (data == null) throw new IllegalArgumentException(STR); if (tm == null) throw new IllegalStateException( STR); PacketIgnore pi = new PacketIgnore(); pi.setData(data); tm.sendMessage(pi.getPayload()); } | /**
* Send an SSH_MSG_IGNORE packet with the given data attribute.
* <p>
* This method must only be called once the connection is established.
*
* @throws IOException
*/ | Send an SSH_MSG_IGNORE packet with the given data attribute. This method must only be called once the connection is established | sendIgnorePacket | {
"repo_name": "mattb243/AmazonEC2Matlab",
"path": "third-party/ganymed-ssh2-build250/src/ch/ethz/ssh2/Connection.java",
"license": "bsd-3-clause",
"size": 47514
} | [
"ch.ethz.ssh2.packets.PacketIgnore",
"java.io.IOException"
] | import ch.ethz.ssh2.packets.PacketIgnore; import java.io.IOException; | import ch.ethz.ssh2.packets.*; import java.io.*; | [
"ch.ethz.ssh2",
"java.io"
] | ch.ethz.ssh2; java.io; | 2,637,405 |
public void excluir() {
ServidorBD.executaUpdate("delete from " + ligacao.getTabela());
} | void function() { ServidorBD.executaUpdate(STR + ligacao.getTabela()); } | /**
* Exclui todos os registros
*/ | Exclui todos os registros | excluir | {
"repo_name": "lisangelo/codigocerto",
"path": "ControlesFaturamento/src/br/com/codigocerto/controles/faturamento/RegistroMargemST.java",
"license": "bsd-2-clause",
"size": 5851
} | [
"br.com.codigocerto.bancodados.ServidorBD"
] | import br.com.codigocerto.bancodados.ServidorBD; | import br.com.codigocerto.bancodados.*; | [
"br.com.codigocerto"
] | br.com.codigocerto; | 1,368,499 |
SummaryStatistics u = new SummaryStatistics();
loadStats("data/PiDigits.txt", u);
Assert.assertEquals("PiDigits: std", std, u.getStandardDeviation(), 1E-13);
Assert.assertEquals("PiDigits: mean", mean, u.getMean(), 1E-13);
loadStats("data/Mavro.txt", u);
Assert.assertEquals("Mav... | SummaryStatistics u = new SummaryStatistics(); loadStats(STR, u); Assert.assertEquals(STR, std, u.getStandardDeviation(), 1E-13); Assert.assertEquals(STR, mean, u.getMean(), 1E-13); loadStats(STR, u); Assert.assertEquals(STR, std, u.getStandardDeviation(), 1E-14); Assert.assertEquals(STR, mean, u.getMean(), 1E-14); loa... | /**
* Test SummaryStatistics - implementations that do not store the data
* and use single pass algorithms to compute statistics
*/ | Test SummaryStatistics - implementations that do not store the data and use single pass algorithms to compute statistics | testSummaryStatistics | {
"repo_name": "tknandu/CommonsMath_Modifed",
"path": "math (trunk)/src/test/java/org/apache/commons/math3/stat/CertifiedDataTest.java",
"license": "apache-2.0",
"size": 5605
} | [
"org.apache.commons.math3.stat.descriptive.SummaryStatistics",
"org.junit.Assert"
] | import org.apache.commons.math3.stat.descriptive.SummaryStatistics; import org.junit.Assert; | import org.apache.commons.math3.stat.descriptive.*; import org.junit.*; | [
"org.apache.commons",
"org.junit"
] | org.apache.commons; org.junit; | 237,158 |
private void validateUser(@NotNull String id) throws SyncException {
SyncContext context = null;
try {
Root root = getRoot();
if (root == null) {
throw new SyncException("Cannot synchronize user. root == null");
}
UserManager userManage... | void function(@NotNull String id) throws SyncException { SyncContext context = null; try { Root root = getRoot(); if (root == null) { throw new SyncException(STR); } UserManager userManager = getUserManager(); if (userManager == null) { throw new SyncException(STR); } DebugTimer timer = new DebugTimer(); context = sync... | /**
* Initiates synchronization of a possible remove user
* @param id the user id
*/ | Initiates synchronization of a possible remove user | validateUser | {
"repo_name": "stillalex/jackrabbit-oak",
"path": "oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/ExternalLoginModule.java",
"license": "apache-2.0",
"size": 18650
} | [
"org.apache.jackrabbit.api.security.user.UserManager",
"org.apache.jackrabbit.oak.api.CommitFailedException",
"org.apache.jackrabbit.oak.api.Root",
"org.apache.jackrabbit.oak.commons.DebugTimer",
"org.apache.jackrabbit.oak.namepath.NamePathMapper",
"org.apache.jackrabbit.oak.plugins.value.jcr.ValueFactory... | import org.apache.jackrabbit.api.security.user.UserManager; import org.apache.jackrabbit.oak.api.CommitFailedException; import org.apache.jackrabbit.oak.api.Root; import org.apache.jackrabbit.oak.commons.DebugTimer; import org.apache.jackrabbit.oak.namepath.NamePathMapper; import org.apache.jackrabbit.oak.plugins.value... | import org.apache.jackrabbit.api.security.user.*; import org.apache.jackrabbit.oak.api.*; import org.apache.jackrabbit.oak.commons.*; import org.apache.jackrabbit.oak.namepath.*; import org.apache.jackrabbit.oak.plugins.value.jcr.*; import org.apache.jackrabbit.oak.spi.security.authentication.external.*; import org.jet... | [
"org.apache.jackrabbit",
"org.jetbrains.annotations"
] | org.apache.jackrabbit; org.jetbrains.annotations; | 1,430,642 |
@Nullable ResourceSet estimateResourceConsumption(Executor executor); | @Nullable ResourceSet estimateResourceConsumption(Executor executor); | /**
* Return a best-guess estimate of the operation's resource consumption on the
* local host itself for use in scheduling.
*
* @param executor the application-specific value passed to the
* executor parameter of the top-level call to
* Builder.buildArtifacts().
*/ | Return a best-guess estimate of the operation's resource consumption on the local host itself for use in scheduling | estimateResourceConsumption | {
"repo_name": "mikelikespie/bazel",
"path": "src/main/java/com/google/devtools/build/lib/actions/Action.java",
"license": "apache-2.0",
"size": 12915
} | [
"javax.annotation.Nullable"
] | import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,816,953 |
double calculateAdjustment(Genome genome); | double calculateAdjustment(Genome genome); | /**
* Calculate the score adjustment.
* @param genome The genome.
* @return The adjusted score.
*/ | Calculate the score adjustment | calculateAdjustment | {
"repo_name": "Crespo911/encog-java-core",
"path": "src/main/java/org/encog/ml/ea/score/AdjustScore.java",
"license": "apache-2.0",
"size": 1263
} | [
"org.encog.ml.ea.genome.Genome"
] | import org.encog.ml.ea.genome.Genome; | import org.encog.ml.ea.genome.*; | [
"org.encog.ml"
] | org.encog.ml; | 517,831 |
public void setReloadChanges(String v)
{
if (!ObjectUtils.equals(this.reloadChanges, v))
{
this.reloadChanges = v;
setModified(true);
}
}
protected List<TLoggedInUsers> collTLoggedInUserss; | void function(String v) { if (!ObjectUtils.equals(this.reloadChanges, v)) { this.reloadChanges = v; setModified(true); } } protected List<TLoggedInUsers> collTLoggedInUserss; | /**
* Set the value of ReloadChanges
*
* @param v new value
*/ | Set the value of ReloadChanges | setReloadChanges | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/BaseTClusterNode.java",
"license": "gpl-3.0",
"size": 50284
} | [
"java.util.List",
"org.apache.commons.lang.ObjectUtils"
] | import java.util.List; import org.apache.commons.lang.ObjectUtils; | import java.util.*; import org.apache.commons.lang.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 2,797,749 |
private void parseAtOrNewline(byte b) throws IOException {
if (b == NEWLINE) {
state = State.EXPECT_PAYLOAD_OR_NEWLINE;
} else if (b == AT) {
addNewlineToPayload = false;
} else {
throw new IOException("Expected @ or \\n. (" + b + ")");
}
} | void function(byte b) throws IOException { if (b == NEWLINE) { state = State.EXPECT_PAYLOAD_OR_NEWLINE; } else if (b == AT) { addNewlineToPayload = false; } else { throw new IOException(STR + b + ")"); } } | /**
* Handles {@link State#EXPECT_AT_OR_NEWLINE}, which is either the
* suppress newline indicator (at) at the end of a control line, or the end
* of a control line.
*/ | Handles <code>State#EXPECT_AT_OR_NEWLINE</code>, which is either the suppress newline indicator (at) at the end of a control line, or the end of a control line | parseAtOrNewline | {
"repo_name": "hhclam/bazel",
"path": "src/main/java/com/google/devtools/build/lib/util/io/StreamDemultiplexer.java",
"license": "apache-2.0",
"size": 6048
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,237,390 |
public void sendMailToUser(DccdUser user, String subject, String message)
throws UserServiceException
{
try
{
CommonMailer mailer = (CommonMailer) DccdMailer
.getDefaultInstance();
mailer.sendSimpleMail(subject, message, user.getEmail());
}
catch (DccdMailerConfigurationException e)
{
thr... | void function(DccdUser user, String subject, String message) throws UserServiceException { try { CommonMailer mailer = (CommonMailer) DccdMailer .getDefaultInstance(); mailer.sendSimpleMail(subject, message, user.getEmail()); } catch (DccdMailerConfigurationException e) { throw new UserServiceException(STR + user.getId... | /**
* When we want to send a mail to the user, and we compose the message
* ourselves
*
* @param user
* @param subject
* @param message
*/ | When we want to send a mail to the user, and we compose the message ourselves | sendMailToUser | {
"repo_name": "PaulBoon/dccd-lib",
"path": "src/main/java/nl/knaw/dans/dccd/application/services/DccdUserService.java",
"license": "apache-2.0",
"size": 22570
} | [
"nl.knaw.dans.common.lang.mail.CommonMailer",
"nl.knaw.dans.common.lang.mail.Mailer",
"nl.knaw.dans.dccd.mail.DccdMailer",
"nl.knaw.dans.dccd.mail.DccdMailerConfigurationException",
"nl.knaw.dans.dccd.model.DccdUser"
] | import nl.knaw.dans.common.lang.mail.CommonMailer; import nl.knaw.dans.common.lang.mail.Mailer; import nl.knaw.dans.dccd.mail.DccdMailer; import nl.knaw.dans.dccd.mail.DccdMailerConfigurationException; import nl.knaw.dans.dccd.model.DccdUser; | import nl.knaw.dans.common.lang.mail.*; import nl.knaw.dans.dccd.mail.*; import nl.knaw.dans.dccd.model.*; | [
"nl.knaw.dans"
] | nl.knaw.dans; | 634,606 |
public Observable<ServiceResponse<Page<IntegrationAccountInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
} | Observable<ServiceResponse<Page<IntegrationAccountInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); } | /**
* Gets a list of integration accounts by resource group.
*
ServiceResponse<PageImpl<IntegrationAccountInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the Page... | Gets a list of integration accounts by resource group | listByResourceGroupNextSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/logic/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java",
"license": "mit",
"size": 95447
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 2,422,365 |
public String createTableWithColumnsAndAcls(List<ColumnModel> columnList, Set<Long> readOnlyPrincipalIdSet,
Set<Long> adminPrincipalIdSet, String projectId, String tableName) throws BridgeSynapseException,
SynapseException {
// Create columns
List<ColumnModel> createdColumnLi... | String function(List<ColumnModel> columnList, Set<Long> readOnlyPrincipalIdSet, Set<Long> adminPrincipalIdSet, String projectId, String tableName) throws BridgeSynapseException, SynapseException { List<ColumnModel> createdColumnList = createColumnModelsWithRetry(columnList); if (columnList.size() != createdColumnList.s... | /**
* Helper method to create a table with the specified columns and set up ACLs. The read-only principal IDs are set
* with read and download permissions, while the admin principal IDs are set with admin permissions.
*
* @param columnList
* list of column models to create on the table
... | Helper method to create a table with the specified columns and set up ACLs. The read-only principal IDs are set with read and download permissions, while the admin principal IDs are set with admin permissions | createTableWithColumnsAndAcls | {
"repo_name": "Sage-Bionetworks/bridge-base",
"path": "src/main/java/org/sagebionetworks/bridge/synapse/SynapseHelper.java",
"license": "apache-2.0",
"size": 45617
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Set",
"org.sagebionetworks.bridge.exceptions.BridgeSynapseException",
"org.sagebionetworks.client.exceptions.SynapseException",
"org.sagebionetworks.repo.model.table.ColumnModel",
"org.sagebionetworks.repo.model.table.TableEntity"
] | import java.util.ArrayList; import java.util.List; import java.util.Set; import org.sagebionetworks.bridge.exceptions.BridgeSynapseException; import org.sagebionetworks.client.exceptions.SynapseException; import org.sagebionetworks.repo.model.table.ColumnModel; import org.sagebionetworks.repo.model.table.TableEntity; | import java.util.*; import org.sagebionetworks.bridge.exceptions.*; import org.sagebionetworks.client.exceptions.*; import org.sagebionetworks.repo.model.table.*; | [
"java.util",
"org.sagebionetworks.bridge",
"org.sagebionetworks.client",
"org.sagebionetworks.repo"
] | java.util; org.sagebionetworks.bridge; org.sagebionetworks.client; org.sagebionetworks.repo; | 223,561 |
private void makeNodeOptionsPanel(final JPanel answer, final AlloyNodeElement elt) {
final boolean enabled = !(elt instanceof AlloyType) || (vizState.getCurrentModel().hasType((AlloyType) elt));
answer.add(makelabel((elt instanceof AlloyType) ? (" " + typename((AlloyType) elt)) : (" " + elt)));
... | void function(final JPanel answer, final AlloyNodeElement elt) { final boolean enabled = !(elt instanceof AlloyType) (vizState.getCurrentModel().hasType((AlloyType) elt)); answer.add(makelabel((elt instanceof AlloyType) ? (" " + typename((AlloyType) elt)) : (" " + elt))); final JTextField labelText = OurUtil.textfield(... | /**
* Generates the node settings widgets for the given type or set, and add them
* to "parent".
*/ | Generates the node settings widgets for the given type or set, and add them to "parent" | makeNodeOptionsPanel | {
"repo_name": "AlloyTools/org.alloytools.alloy",
"path": "org.alloytools.alloy.application/src/main/java/edu/mit/csail/sdg/alloy4viz/VizCustomizationPanel.java",
"license": "apache-2.0",
"size": 35095
} | [
"edu.mit.csail.sdg.alloy4.OurUtil",
"java.awt.Dimension",
"java.awt.event.KeyAdapter",
"javax.swing.JPanel",
"javax.swing.JTextField"
] | import edu.mit.csail.sdg.alloy4.OurUtil; import java.awt.Dimension; import java.awt.event.KeyAdapter; import javax.swing.JPanel; import javax.swing.JTextField; | import edu.mit.csail.sdg.alloy4.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; | [
"edu.mit.csail",
"java.awt",
"javax.swing"
] | edu.mit.csail; java.awt; javax.swing; | 1,661,792 |
public void test(TestHarness harness)
{
IllegalAccessError error1 = new IllegalAccessError();
harness.check(error1 != null);
harness.check(error1.toString(), "java.lang.IllegalAccessError");
IllegalAccessError error2 = new IllegalAccessError("nothing happens");
harness.c... | void function(TestHarness harness) { IllegalAccessError error1 = new IllegalAccessError(); harness.check(error1 != null); harness.check(error1.toString(), STR); IllegalAccessError error2 = new IllegalAccessError(STR); harness.check(error2 != null); harness.check(error2.toString(), STR); } | /**
* Runs the test using the specified harness.
*
* @param harness the test harness (<code>null</code> not permitted).
*/ | Runs the test using the specified harness | test | {
"repo_name": "niloc132/mauve-gwt",
"path": "src/main/java/gnu/testlet/java/lang/IllegalAccessError/constructor.java",
"license": "gpl-2.0",
"size": 1763
} | [
"gnu.testlet.TestHarness",
"java.lang.IllegalAccessError"
] | import gnu.testlet.TestHarness; import java.lang.IllegalAccessError; | import gnu.testlet.*; import java.lang.*; | [
"gnu.testlet",
"java.lang"
] | gnu.testlet; java.lang; | 1,862,191 |
private static int getColumnForString(AreaEval db,String name) {
int resultColumn = -1;
final int width = db.getWidth();
for(int column = 0; column < width; ++column) {
ValueEval columnNameValueEval = resolveReference(db, 0, column);
if(columnNameValueEval instanceof ... | static int function(AreaEval db,String name) { int resultColumn = -1; final int width = db.getWidth(); for(int column = 0; column < width; ++column) { ValueEval columnNameValueEval = resolveReference(db, 0, column); if(columnNameValueEval instanceof BlankEval) { continue; } if(columnNameValueEval instanceof ErrorEval) ... | /**
* For a given database returns the column number for a column heading.
* Comparison is case-insensitive.
*
* @param db Database.
* @param name Column heading.
* @return Corresponding column number.
*/ | For a given database returns the column number for a column heading. Comparison is case-insensitive | getColumnForString | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/poi/org/apache/poi/ss/formula/functions/DStarRunner.java",
"license": "gpl-2.0",
"size": 16609
} | [
"org.apache.poi.ss.formula.eval.AreaEval",
"org.apache.poi.ss.formula.eval.BlankEval",
"org.apache.poi.ss.formula.eval.ErrorEval",
"org.apache.poi.ss.formula.eval.OperandResolver",
"org.apache.poi.ss.formula.eval.ValueEval"
] | import org.apache.poi.ss.formula.eval.AreaEval; import org.apache.poi.ss.formula.eval.BlankEval; import org.apache.poi.ss.formula.eval.ErrorEval; import org.apache.poi.ss.formula.eval.OperandResolver; import org.apache.poi.ss.formula.eval.ValueEval; | import org.apache.poi.ss.formula.eval.*; | [
"org.apache.poi"
] | org.apache.poi; | 1,177,498 |
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
{
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
} | void function(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune) { super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune); } | /**
* Spawns this Block's drops into the World as EntityItems.
*
* @param chance The chance that each Item is actually spawned (1.0 = always, 0.0 = never)
* @param fortune The player's fortune level
*/ | Spawns this Block's drops into the World as EntityItems | dropBlockAsItemWithChance | {
"repo_name": "trixmot/mod1",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockPotato.java",
"license": "lgpl-2.1",
"size": 1455
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.util.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockPos; import net.minecraft.world.World; | import net.minecraft.block.state.*; import net.minecraft.util.*; import net.minecraft.world.*; | [
"net.minecraft.block",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.block; net.minecraft.util; net.minecraft.world; | 565,132 |
public static <T> T createException(Class<T> clazz, int errorCode, Throwable cause, Logger logger, Level level,
Object... args) {
return createException(clazz, errorCode, null, cause, logger, level, args);
} | static <T> T function(Class<T> clazz, int errorCode, Throwable cause, Logger logger, Level level, Object... args) { return createException(clazz, errorCode, null, cause, logger, level, args); } | /**
* Constructs a new Exception with the given error code or error message,
* cause of the exception, logger and list of error arguments in case error
* code is provided.
*
* @param clazz
* - type of the exception to be returned
* @param errorCode
* - error code
* @param cause
... | Constructs a new Exception with the given error code or error message, cause of the exception, logger and list of error arguments in case error code is provided | createException | {
"repo_name": "gkolokotronis/dbquality",
"path": "src/main/java/com/dbquality/exceptions/ExceptionFactory.java",
"license": "gpl-3.0",
"size": 3392
} | [
"org.apache.logging.log4j.Level",
"org.apache.logging.log4j.Logger"
] | import org.apache.logging.log4j.Level; import org.apache.logging.log4j.Logger; | import org.apache.logging.log4j.*; | [
"org.apache.logging"
] | org.apache.logging; | 2,836,205 |
private static void post(String endpoint, Map<String, String> params)
throws IOException {
URL url;
try {
url = new URL(endpoint);
}
catch (MalformedURLException e) {
throw new IllegalArgumentException("invalid url: " + endpoint);
}
StringBuilder bodyBuilder = new StringBuilder();
Iterator<Ent... | static void function(String endpoint, Map<String, String> params) throws IOException { URL url; try { url = new URL(endpoint); } catch (MalformedURLException e) { throw new IllegalArgumentException(STR + endpoint); } StringBuilder bodyBuilder = new StringBuilder(); Iterator<Entry<String, String>> iterator = params.entr... | /**
* Issue a POST request to the server.
*
* @param endpoint
* POST address.
* @param params
* request parameters.
*
* @throws IOException
* propagated from POST.
*/ | Issue a POST request to the server | post | {
"repo_name": "EliasFarhan/gsn",
"path": "gsn-tiny/src/tinygsn/gui/android/gcm/ServerUtilities.java",
"license": "gpl-3.0",
"size": 9223
} | [
"android.util.Log",
"java.io.IOException",
"java.io.OutputStream",
"java.net.HttpURLConnection",
"java.net.MalformedURLException",
"java.util.Iterator",
"java.util.Map"
] | import android.util.Log; import java.io.IOException; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.util.Iterator; import java.util.Map; | import android.util.*; import java.io.*; import java.net.*; import java.util.*; | [
"android.util",
"java.io",
"java.net",
"java.util"
] | android.util; java.io; java.net; java.util; | 2,184,204 |
@Override
public Iterator<E> iterator() {
LazySequence<E> thisLazySequence = this;
return new Iterator<E>() {
private volatile LazySequence<E> lazySequence = thisLazySequence; | Iterator<E> function() { LazySequence<E> thisLazySequence = this; return new Iterator<E>() { private volatile LazySequence<E> lazySequence = thisLazySequence; | /**
* An iterator over a lazy sequence. NOT THREAD-SAFE!
*/ | An iterator over a lazy sequence. NOT THREAD-SAFE | iterator | {
"repo_name": "achuprynov/workspace",
"path": "LazyEvaluation/src/main/java/achuprynov/lazyevaluation/LazySequence.java",
"license": "gpl-3.0",
"size": 6620
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 128,552 |
protected void init(final String owner, final MethodNode method) throws AnalyzerException {
// Nothing to do.
} | void function(final String owner, final MethodNode method) throws AnalyzerException { } | /**
* Initializes this analyzer. This method is called just before the execution of control flow
* analysis loop in #analyze. The default implementation of this method does nothing.
*
* @param owner the internal name of the class to which the method belongs.
* @param method the method to be analyzed.
... | Initializes this analyzer. This method is called just before the execution of control flow analysis loop in #analyze. The default implementation of this method does nothing | init | {
"repo_name": "apache/tapestry-5",
"path": "plastic/src/external/java/org/apache/tapestry5/internal/plastic/asm/tree/analysis/Analyzer.java",
"license": "apache-2.0",
"size": 29666
} | [
"org.apache.tapestry5.internal.plastic.asm.tree.MethodNode"
] | import org.apache.tapestry5.internal.plastic.asm.tree.MethodNode; | import org.apache.tapestry5.internal.plastic.asm.tree.*; | [
"org.apache.tapestry5"
] | org.apache.tapestry5; | 515,351 |
public File getDataFile(final String fileName) {
return new File(this.directory, fileName);
}
private static long serialNumberCounter = System.currentTimeMillis(); | File function(final String fileName) { return new File(this.directory, fileName); } private static long serialNumberCounter = System.currentTimeMillis(); | /**
* Return a file with the given name in the installer directory.
* @param fileName The file name
*/ | Return a file with the given name in the installer directory | getDataFile | {
"repo_name": "Nimco/sling",
"path": "installer/core/src/main/java/org/apache/sling/installer/core/impl/FileDataStore.java",
"license": "apache-2.0",
"size": 9846
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,010,763 |
public static void main(String[] args) {
// Create a NextBusAvlModue for testing
Module.start("org.transitime.avl.NextBusAvlModule");
}
| static void function(String[] args) { Module.start(STR); } | /**
* Just for debugging
*/ | Just for debugging | main | {
"repo_name": "scrudden/core",
"path": "transitime/src/main/java/org/transitime/avl/NextBusAvlModule.java",
"license": "gpl-3.0",
"size": 10373
} | [
"org.transitime.modules.Module"
] | import org.transitime.modules.Module; | import org.transitime.modules.*; | [
"org.transitime.modules"
] | org.transitime.modules; | 2,481,833 |
public List<Patch> patch_fromText(String textline)
throws IllegalArgumentException {
List<Patch> patches = new LinkedList<Patch>();
if (textline.length() == 0) {
return patches;
}
List<String> textList = Arrays.asList(textline.split("\n"));
LinkedList<String> text = new LinkedList<Stri... | List<Patch> function(String textline) throws IllegalArgumentException { List<Patch> patches = new LinkedList<Patch>(); if (textline.length() == 0) { return patches; } List<String> textList = Arrays.asList(textline.split("\n")); LinkedList<String> text = new LinkedList<String>(textList); Patch patch; Pattern patchHeader... | /**
* Parse a textual representation of patches and return a List of Patch
* objects.
* @param textline Text representation of patches.
* @return List of Patch objects.
* @throws IllegalArgumentException If invalid input.
*/ | Parse a textual representation of patches and return a List of Patch objects | patch_fromText | {
"repo_name": "Prin4/HTML5ParserComparator",
"path": "WebApp/src/com/HTML5/ParserComparer/model/diff_match_patch.java",
"license": "mit",
"size": 89751
} | [
"java.io.UnsupportedEncodingException",
"java.net.URLDecoder",
"java.util.Arrays",
"java.util.LinkedList",
"java.util.List",
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.io.*; import java.net.*; import java.util.*; import java.util.regex.*; | [
"java.io",
"java.net",
"java.util"
] | java.io; java.net; java.util; | 2,574,596 |
@Override
public Request<DescribeScheduledInstancesRequest> getDryRunRequest() {
Request<DescribeScheduledInstancesRequest> request = new DescribeScheduledInstancesRequestMarshaller()
.marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;... | Request<DescribeScheduledInstancesRequest> function() { Request<DescribeScheduledInstancesRequest> request = new DescribeScheduledInstancesRequestMarshaller() .marshall(this); request.addParameter(STR, Boolean.toString(true)); return request; } | /**
* This method is intended for internal use only. Returns the marshaled
* request configured with additional parameters to enable operation
* dry-run.
*/ | This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run | getDryRunRequest | {
"repo_name": "mhurne/aws-sdk-java",
"path": "aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/DescribeScheduledInstancesRequest.java",
"license": "apache-2.0",
"size": 21408
} | [
"com.amazonaws.Request",
"com.amazonaws.services.ec2.model.transform.DescribeScheduledInstancesRequestMarshaller"
] | import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.DescribeScheduledInstancesRequestMarshaller; | import com.amazonaws.*; import com.amazonaws.services.ec2.model.transform.*; | [
"com.amazonaws",
"com.amazonaws.services"
] | com.amazonaws; com.amazonaws.services; | 2,491,001 |
public static MenuDrawer attach(Activity activity, Position position) {
return attach(activity, Type.BEHIND, position);
} | static MenuDrawer function(Activity activity, Position position) { return attach(activity, Type.BEHIND, position); } | /**
* Attaches the MenuDrawer to the Activity.
*
* @param activity The activity the menu drawer will be attached to.
* @param position Where to position the menu.
* @return The created MenuDrawer instance.
*/ | Attaches the MenuDrawer to the Activity | attach | {
"repo_name": "0359xiaodong/serenity-android",
"path": "android-menudrawer/menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java",
"license": "mit",
"size": 47631
} | [
"android.app.Activity"
] | import android.app.Activity; | import android.app.*; | [
"android.app"
] | android.app; | 2,047,539 |
@Override
public PolyCurve2D<? extends ContinuousCurve2D> transform(
AffineTransform2D trans) {
PolyCurve2D<ContinuousCurve2D> result = new PolyCurve2D<ContinuousCurve2D>();
for (ContinuousCurve2D curve : curves)
result.add(curve.transform(trans));
result.se... | PolyCurve2D<? extends ContinuousCurve2D> function( AffineTransform2D trans) { PolyCurve2D<ContinuousCurve2D> result = new PolyCurve2D<ContinuousCurve2D>(); for (ContinuousCurve2D curve : curves) result.add(curve.transform(trans)); result.setClosed(this.isClosed()); return result; } | /**
* Transforms each smooth piece in this PolyCurve2D and returns a new
* instance of PolyCurve2D.
*/ | Transforms each smooth piece in this PolyCurve2D and returns a new instance of PolyCurve2D | transform | {
"repo_name": "chardnett/eureka",
"path": "src/math/geom2d/curve/PolyCurve2D.java",
"license": "gpl-2.0",
"size": 14433
} | [
"math.geom2d.AffineTransform2D"
] | import math.geom2d.AffineTransform2D; | import math.geom2d.*; | [
"math.geom2d"
] | math.geom2d; | 917,060 |
public void test(TestHarness harness)
{
// create instance of a class Double
Object o = new Float(42.0f);
// get a runtime class of an object "o"
Class c = o.getClass();
List interfaces = Arrays.asList(c.getInterfaces());
harness.check(interfaces.contains(Compar... | void function(TestHarness harness) { Object o = new Float(42.0f); Class c = o.getClass(); List interfaces = Arrays.asList(c.getInterfaces()); harness.check(interfaces.contains(Comparable.class)); } | /**
* Runs the test using the specified harness.
*
* @param harness the test harness (<code>null</code> not permitted).
*/ | Runs the test using the specified harness | test | {
"repo_name": "niloc132/mauve-gwt",
"path": "src/main/java/gnu/testlet/java/lang/Float/classInfo/getInterfaces.java",
"license": "gpl-2.0",
"size": 1654
} | [
"gnu.testlet.TestHarness",
"java.lang.Float",
"java.util.Arrays",
"java.util.List"
] | import gnu.testlet.TestHarness; import java.lang.Float; import java.util.Arrays; import java.util.List; | import gnu.testlet.*; import java.lang.*; import java.util.*; | [
"gnu.testlet",
"java.lang",
"java.util"
] | gnu.testlet; java.lang; java.util; | 409,668 |
synchronized void logEdit(final int length, final byte[] data) {
long start = beginTransaction();
try {
editLogStream.writeRaw(data, 0, length);
} catch (IOException ex) {
// All journals have failed, it will be handled in logSync.
}
endTransaction(start);
} | synchronized void logEdit(final int length, final byte[] data) { long start = beginTransaction(); try { editLogStream.writeRaw(data, 0, length); } catch (IOException ex) { } endTransaction(start); } | /**
* Write an operation to the edit log. Do not sync to persistent
* store yet.
*/ | Write an operation to the edit log. Do not sync to persistent store yet | logEdit | {
"repo_name": "ZhangXFeng/hadoop",
"path": "src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java",
"license": "apache-2.0",
"size": 52179
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,603,334 |
Object url = parameters.get(ShapefileDataStoreFactory.URLP.key);
Logger log = LoggerFactory.getLogger(DataStoreFactory.class);
if (url instanceof String) {
parameters.put(ShapefileDataStoreFactory.URLP.key, ResourceUtils.getURL((String) url).toExternalForm());
}
if (DATASTORE_CACHE.containsKey(parameters))... | Object url = parameters.get(ShapefileDataStoreFactory.URLP.key); Logger log = LoggerFactory.getLogger(DataStoreFactory.class); if (url instanceof String) { parameters.put(ShapefileDataStoreFactory.URLP.key, ResourceUtils.getURL((String) url).toExternalForm()); } if (DATASTORE_CACHE.containsKey(parameters)) { return DAT... | /**
* Creates a suitable {@link DataStore} for the specified parameters.
*
* @param parameters list of GeoTools parameters.
* @return data store, never null
* @throws IOException could not create data store
*/ | Creates a suitable <code>DataStore</code> for the specified parameters | create | {
"repo_name": "geomajas/geomajas-project-server",
"path": "plugin/layer-geotools/geotools/src/main/java/org/geomajas/layer/geotools/DataStoreFactory.java",
"license": "agpl-3.0",
"size": 4040
} | [
"java.io.IOException",
"java.util.Iterator",
"org.geotools.data.DataStore",
"org.geotools.data.DataStoreFactorySpi",
"org.geotools.data.DataStoreFinder",
"org.geotools.data.shapefile.ShapefileDataStoreFactory",
"org.slf4j.Logger",
"org.slf4j.LoggerFactory",
"org.springframework.util.ResourceUtils"
] | import java.io.IOException; import java.util.Iterator; import org.geotools.data.DataStore; import org.geotools.data.DataStoreFactorySpi; import org.geotools.data.DataStoreFinder; import org.geotools.data.shapefile.ShapefileDataStoreFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframe... | import java.io.*; import java.util.*; import org.geotools.data.*; import org.geotools.data.shapefile.*; import org.slf4j.*; import org.springframework.util.*; | [
"java.io",
"java.util",
"org.geotools.data",
"org.slf4j",
"org.springframework.util"
] | java.io; java.util; org.geotools.data; org.slf4j; org.springframework.util; | 451,886 |
public boolean containsTaskWithRequestId(String requestIdKey, String requestId)
throws KeeperException, InterruptedException {
List<String> childNames = zookeeper.getChildren(dir, null, true);
stats.setQueueLength(childNames.size());
for (String childName : childNames) {
if (childName != null... | boolean function(String requestIdKey, String requestId) throws KeeperException, InterruptedException { List<String> childNames = zookeeper.getChildren(dir, null, true); stats.setQueueLength(childNames.size()); for (String childName : childNames) { if (childName != null) { try { byte[] data = zookeeper.getData(dir + "/"... | /**
* Returns true if the queue contains a task with the specified async id.
*/ | Returns true if the queue contains a task with the specified async id | containsTaskWithRequestId | {
"repo_name": "yida-lxw/solr-5.3.1",
"path": "solr/core/src/java/org/apache/solr/cloud/DistributedQueue.java",
"license": "apache-2.0",
"size": 19489
} | [
"java.util.List",
"org.apache.solr.common.cloud.ZkNodeProps",
"org.apache.zookeeper.KeeperException"
] | import java.util.List; import org.apache.solr.common.cloud.ZkNodeProps; import org.apache.zookeeper.KeeperException; | import java.util.*; import org.apache.solr.common.cloud.*; import org.apache.zookeeper.*; | [
"java.util",
"org.apache.solr",
"org.apache.zookeeper"
] | java.util; org.apache.solr; org.apache.zookeeper; | 1,949,745 |
@SuppressWarnings("deprecation")
protected Section loadSection(Element sectionEl, Subpart subpart, Map<Long, Section> sectionTable, Map<Long, Placement> timetable) {
Section parentSection = null;
if (sectionEl.attributeValue("parent") != null)
parentSection = sectionTable.get(Long.va... | @SuppressWarnings(STR) Section function(Element sectionEl, Subpart subpart, Map<Long, Section> sectionTable, Map<Long, Placement> timetable) { Section parentSection = null; if (sectionEl.attributeValue(STR) != null) parentSection = sectionTable.get(Long.valueOf(sectionEl.attributeValue(STR))); Placement placement = nul... | /**
* Load section
* @param sectionEl section element
* @param subpart parent subpart
* @param sectionTable section table (of the offering)
* @param timetable provided timetable
* @return loaded section
*/ | Load section | loadSection | {
"repo_name": "UniTime/cpsolver",
"path": "src/org/cpsolver/studentsct/StudentSectioningXMLLoader.java",
"license": "lgpl-3.0",
"size": 63607
} | [
"java.util.Map",
"org.cpsolver.coursett.model.Placement",
"org.cpsolver.coursett.model.TimeLocation",
"org.cpsolver.studentsct.model.Section",
"org.cpsolver.studentsct.model.Subpart",
"org.dom4j.Element"
] | import java.util.Map; import org.cpsolver.coursett.model.Placement; import org.cpsolver.coursett.model.TimeLocation; import org.cpsolver.studentsct.model.Section; import org.cpsolver.studentsct.model.Subpart; import org.dom4j.Element; | import java.util.*; import org.cpsolver.coursett.model.*; import org.cpsolver.studentsct.model.*; import org.dom4j.*; | [
"java.util",
"org.cpsolver.coursett",
"org.cpsolver.studentsct",
"org.dom4j"
] | java.util; org.cpsolver.coursett; org.cpsolver.studentsct; org.dom4j; | 293,239 |
protected Stream<AppRegistration> toValidAppRegistration(Map.Entry<String, URI> kv, URI metadataURI) {
String key = kv.getKey();
String[] tokens = key.split("\\.");
if (tokens.length == 2) {
String name = tokens[1];
ApplicationType type = ApplicationType.valueOf(tokens[0]);
URI appURI = warnOnMalforme... | Stream<AppRegistration> function(Map.Entry<String, URI> kv, URI metadataURI) { String key = kv.getKey(); String[] tokens = key.split("\\."); if (tokens.length == 2) { String name = tokens[1]; ApplicationType type = ApplicationType.valueOf(tokens[0]); URI appURI = warnOnMalformedURI(key, kv.getValue()); String version =... | /**
* Builds a {@link Stream} from key/value mapping.
* @return
* <ul>
* <li>valid AppRegistration as single element Stream</li>
* <li>silently ignores well malformed metadata entries (0 element Stream) or</li>
* <li>fails otherwise.</li>
* </ul>
*
* @param kv key/value representing app key (key) and ... | Builds a <code>Stream</code> from key/value mapping | toValidAppRegistration | {
"repo_name": "dturanski/spring-cloud-data",
"path": "spring-cloud-dataflow-registry/src/main/java/org/springframework/cloud/dataflow/registry/service/DefaultAppRegistryService.java",
"license": "apache-2.0",
"size": 13025
} | [
"java.util.Map",
"java.util.stream.Stream",
"org.springframework.cloud.dataflow.core.AppRegistration",
"org.springframework.cloud.dataflow.core.ApplicationType",
"org.springframework.util.Assert"
] | import java.util.Map; import java.util.stream.Stream; import org.springframework.cloud.dataflow.core.AppRegistration; import org.springframework.cloud.dataflow.core.ApplicationType; import org.springframework.util.Assert; | import java.util.*; import java.util.stream.*; import org.springframework.cloud.dataflow.core.*; import org.springframework.util.*; | [
"java.util",
"org.springframework.cloud",
"org.springframework.util"
] | java.util; org.springframework.cloud; org.springframework.util; | 193,759 |
public static void main(Iterable<Class<? extends BlazeModule>> moduleClasses, String[] args) {
setupUncaughtHandler(args);
List<BlazeModule> modules = createModules(moduleClasses);
// blaze.cc will put --batch first if the user set it.
if (args.length >= 1 && args[0].equals("--batch")) {
// Run ... | static void function(Iterable<Class<? extends BlazeModule>> moduleClasses, String[] args) { setupUncaughtHandler(args); List<BlazeModule> modules = createModules(moduleClasses); if (args.length >= 1 && args[0].equals(STR)) { System.exit(batchMain(modules, args)); } LOG.info(STR + Arrays.toString(args)); try { System.ex... | /**
* Main method for the Blaze server startup. Note: This method logs
* exceptions to remote servers. Do not add this to a unittest.
*/ | Main method for the Blaze server startup. Note: This method logs exceptions to remote servers. Do not add this to a unittest | main | {
"repo_name": "charlieaustin/bazel",
"path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java",
"license": "apache-2.0",
"size": 69352
} | [
"com.google.devtools.build.lib.util.ExitCode",
"com.google.devtools.build.lib.util.io.OutErr",
"java.util.Arrays",
"java.util.List"
] | import com.google.devtools.build.lib.util.ExitCode; import com.google.devtools.build.lib.util.io.OutErr; import java.util.Arrays; import java.util.List; | import com.google.devtools.build.lib.util.*; import com.google.devtools.build.lib.util.io.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 2,160,783 |
public static void arrayToNetwork(final double[] array,
final MLMethod network) {
if (network instanceof MLEncodable) {
((MLEncodable) network).decodeFromArray(array);
return;
}
throw new NeuralNetworkError(NetworkCODEC.ERROR
+ network.getClass().getName());
} | static void function(final double[] array, final MLMethod network) { if (network instanceof MLEncodable) { ((MLEncodable) network).decodeFromArray(array); return; } throw new NeuralNetworkError(NetworkCODEC.ERROR + network.getClass().getName()); } | /**
* Use an array to populate the memory of the neural network.
*
* @param array
* An array of doubles.
* @param network
* The network to encode.
*/ | Use an array to populate the memory of the neural network | arrayToNetwork | {
"repo_name": "larhoy/SentimentProjectV2",
"path": "SentimentAnalysisV2/encog-core-3.1.0/src/main/java/org/encog/neural/networks/structure/NetworkCODEC.java",
"license": "mit",
"size": 4823
} | [
"org.encog.ml.MLEncodable",
"org.encog.ml.MLMethod",
"org.encog.neural.NeuralNetworkError"
] | import org.encog.ml.MLEncodable; import org.encog.ml.MLMethod; import org.encog.neural.NeuralNetworkError; | import org.encog.ml.*; import org.encog.neural.*; | [
"org.encog.ml",
"org.encog.neural"
] | org.encog.ml; org.encog.neural; | 980,471 |
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else
log.log(Level.SEVERE, "prepare - Unknown Parameter: " + name);
}
} // prepare | void function() { ProcessInfoParameter[] para = getParameter(); for (int i = 0; i < para.length; i++) { String name = para[i].getParameterName(); if (para[i].getParameter() == null) ; else log.log(Level.SEVERE, STR + name); } } | /**
* Prepare - e.g., get Parameters.
*/ | Prepare - e.g., get Parameters | prepare | {
"repo_name": "mgrigioni/oseb",
"path": "base/src/org/adempierelbr/process/ProcSystemInfo.java",
"license": "gpl-2.0",
"size": 2259
} | [
"java.util.logging.Level",
"org.compiere.process.ProcessInfoParameter"
] | import java.util.logging.Level; import org.compiere.process.ProcessInfoParameter; | import java.util.logging.*; import org.compiere.process.*; | [
"java.util",
"org.compiere.process"
] | java.util; org.compiere.process; | 1,615,879 |
public void inviteMember(PeerSemanticTag peer, boolean fullmember)
throws SharkKBException, SharkSubSpaceException;
| void function(PeerSemanticTag peer, boolean fullmember) throws SharkKBException, SharkSubSpaceException; | /**
* A dedicated peer is invited by sub space owner. Peer data are merged
* into the subspace and becomes a member. The peer gets an invitation.
* This method can only be
* performed by subspace owner.
*
* @param peer
* @throws SharkSubSpaceException
* @throws Shar... | A dedicated peer is invited by sub space owner. Peer data are merged into the subspace and becomes a member. The peer gets an invitation. This method can only be performed by subspace owner | inviteMember | {
"repo_name": "blackicetee/SharkProfile",
"path": "src/java/coreApps/net/sharkfw/subspace/SubSpace.java",
"license": "gpl-3.0",
"size": 15868
} | [
"net.sharkfw.knowledgeBase.PeerSemanticTag",
"net.sharkfw.knowledgeBase.SharkKBException"
] | import net.sharkfw.knowledgeBase.PeerSemanticTag; import net.sharkfw.knowledgeBase.SharkKBException; | import net.sharkfw.*; | [
"net.sharkfw"
] | net.sharkfw; | 2,586,559 |
public Group createGroup(Group group)
throws GroupAlreadyExistsException, AccessControlException,
UserNotFoundException, WriterException, IOException
{
URL createGroupURL = lookupServiceURL(Standards.GMS_GROUPS_01);
log.debug("createGroupURL request to " + createGroupURL.t... | Group function(Group group) throws GroupAlreadyExistsException, AccessControlException, UserNotFoundException, WriterException, IOException { URL createGroupURL = lookupServiceURL(Standards.GMS_GROUPS_01); log.debug(STR + createGroupURL.toString()); clearCache(); StringBuilder groupXML = new StringBuilder(); GroupWrite... | /**
* Create a new group.
*
* @param group The group to create
* @return The newly created group will all the information.
* @throws GroupAlreadyExistsException If a group with the same name already
* exists.
* @throws AccessControlException If unau... | Create a new group | createGroup | {
"repo_name": "opencadc/ac",
"path": "cadc-access-control/src/main/java/ca/nrc/cadc/ac/client/GMSClient.java",
"license": "agpl-3.0",
"size": 41638
} | [
"ca.nrc.cadc.ac.Group",
"ca.nrc.cadc.ac.GroupAlreadyExistsException",
"ca.nrc.cadc.ac.UserNotFoundException",
"ca.nrc.cadc.ac.WriterException",
"ca.nrc.cadc.ac.xml.GroupReader",
"ca.nrc.cadc.ac.xml.GroupWriter",
"ca.nrc.cadc.net.HttpUpload",
"ca.nrc.cadc.reg.Standards",
"java.io.ByteArrayInputStream... | import ca.nrc.cadc.ac.Group; import ca.nrc.cadc.ac.GroupAlreadyExistsException; import ca.nrc.cadc.ac.UserNotFoundException; import ca.nrc.cadc.ac.WriterException; import ca.nrc.cadc.ac.xml.GroupReader; import ca.nrc.cadc.ac.xml.GroupWriter; import ca.nrc.cadc.net.HttpUpload; import ca.nrc.cadc.reg.Standards; import ja... | import ca.nrc.cadc.ac.*; import ca.nrc.cadc.ac.xml.*; import ca.nrc.cadc.net.*; import ca.nrc.cadc.reg.*; import java.io.*; import java.security.*; | [
"ca.nrc.cadc",
"java.io",
"java.security"
] | ca.nrc.cadc; java.io; java.security; | 2,156,754 |
public void setDocument(Document doc)
{
m_doc = doc;
} | void function(Document doc) { m_doc = doc; } | /**
* Specify which document this helper is currently operating on.
*
* @param doc The DOM Document node for this document.
* @see #getDocument
*/ | Specify which document this helper is currently operating on | setDocument | {
"repo_name": "itgeeker/jdk",
"path": "src/com/sun/org/apache/xml/internal/utils/DOM2Helper.java",
"license": "apache-2.0",
"size": 10644
} | [
"org.w3c.dom.Document"
] | import org.w3c.dom.Document; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,532,056 |
public boolean canDeleteIndexContents(Index index, IndexSettings indexSettings) {
// index contents can be deleted if its an already closed index (so all its resources have
// already been relinquished)
final IndexService indexService = indexService(index);
if (indexService == null &... | boolean function(Index index, IndexSettings indexSettings) { final IndexService indexService = indexService(index); if (indexService == null && nodeEnv.hasNodeFile()) { return true; } return false; } | /**
* This method returns true if the current node is allowed to delete the given index.
* This is the case if the index is deleted in the metadata or there is no allocation
* on the local node and the index isn't on a shared file system.
* @param index {@code Index} to check whether deletion is all... | This method returns true if the current node is allowed to delete the given index. This is the case if the index is deleted in the metadata or there is no allocation on the local node and the index isn't on a shared file system | canDeleteIndexContents | {
"repo_name": "EvilMcJerkface/crate",
"path": "server/src/main/java/org/elasticsearch/indices/IndicesService.java",
"license": "apache-2.0",
"size": 48414
} | [
"org.elasticsearch.index.Index",
"org.elasticsearch.index.IndexService",
"org.elasticsearch.index.IndexSettings"
] | import org.elasticsearch.index.Index; import org.elasticsearch.index.IndexService; import org.elasticsearch.index.IndexSettings; | import org.elasticsearch.index.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 377,620 |
private void getUsernameAndPasswd() {
// get the username and password from preferences if saved else from the
// edit boxes
if (settings.contains(Constants.LOGIN_PASSWORD)) {
// password is present in the preferences
username = settings.getString(Constants.LOGIN_USERNAME, "none");
password = setting... | void function() { if (settings.contains(Constants.LOGIN_PASSWORD)) { username = settings.getString(Constants.LOGIN_USERNAME, "none"); password = settings.getString(Constants.LOGIN_PASSWORD, "****"); } else { username = usernameBox.getText().toString(); password = passwordBox.getText().toString(); } } private class getM... | /**
* sets the username and passeord to the variables if present in shared
* preferences. If not present sets username to "none" and password "****"
*
*/ | sets the username and passeord to the variables if present in shared preferences. If not present sets username to "none" and password "****" | getUsernameAndPasswd | {
"repo_name": "SaarangaInfotech/Wikitrack",
"path": "src/com/saaranga/wikikannada/ActivityMyWatchList.java",
"license": "gpl-3.0",
"size": 10969
} | [
"android.app.ProgressDialog",
"android.os.AsyncTask",
"com.saaranga.wikitrack.utilities.Constants",
"java.util.List"
] | import android.app.ProgressDialog; import android.os.AsyncTask; import com.saaranga.wikitrack.utilities.Constants; import java.util.List; | import android.app.*; import android.os.*; import com.saaranga.wikitrack.utilities.*; import java.util.*; | [
"android.app",
"android.os",
"com.saaranga.wikitrack",
"java.util"
] | android.app; android.os; com.saaranga.wikitrack; java.util; | 2,125,232 |
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<Void>, Void> beginCompleteRestore(
String resourceGroupName, String managedInstanceName, String databaseName, String lastBackupName); | @ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<Void>, Void> beginCompleteRestore( String resourceGroupName, String managedInstanceName, String databaseName, String lastBackupName); | /**
* Completes the restore operation on a managed database.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param managedInstanceName The name of the managed instance.
... | Completes the restore operation on a managed database | beginCompleteRestore | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java",
"license": "mit",
"size": 37573
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.SyncPoller"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 808,302 |
public void setURLText(String text) {
this.urlText = text;
notifyListeners(new TitleChangeEvent(this));
}
| void function(String text) { this.urlText = text; notifyListeners(new TitleChangeEvent(this)); } | /**
* Sets the URL text to the specified text and sends a
* {@link TitleChangeEvent} to all registered listeners.
*
* @param text the text (<code>null</code> permitted).
*/ | Sets the URL text to the specified text and sends a <code>TitleChangeEvent</code> to all registered listeners | setURLText | {
"repo_name": "apetresc/JFreeChart",
"path": "src/main/java/org/jfree/chart/title/TextTitle.java",
"license": "lgpl-2.1",
"size": 33516
} | [
"org.jfree.chart.event.TitleChangeEvent"
] | import org.jfree.chart.event.TitleChangeEvent; | import org.jfree.chart.event.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,210,356 |
protected PrintStream findStream() {
PrintStream ps = streams.get();
if (ps == null) {
ps = wrapped;
}
return ps;
}
// ---------------------------------------------------- PrintStream Methods | PrintStream function() { PrintStream ps = streams.get(); if (ps == null) { ps = wrapped; } return ps; } | /**
* Find PrintStream to which the output must be written to.
*/ | Find PrintStream to which the output must be written to | findStream | {
"repo_name": "WhiteBearSolutions/WBSAirback",
"path": "packages/wbsairback-tomcat/wbsairback-tomcat-7.0.22/java/org/apache/jasper/compiler/AntCompiler.java",
"license": "apache-2.0",
"size": 15882
} | [
"java.io.PrintStream"
] | import java.io.PrintStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,788,252 |
public ODocumentFieldHandlingStrategy create(int strategy) {
Optional<ODocumentFieldHandlingStrategy> registered =
ODocumentFieldHandlingStrategyRegistry.getInstance().getStrategy(strategy);
if (registered.isPresent()) {
return registered.get();
}
Map<OType, ODocumentFieldOTypeHandling... | ODocumentFieldHandlingStrategy function(int strategy) { Optional<ODocumentFieldHandlingStrategy> registered = ODocumentFieldHandlingStrategyRegistry.getInstance().getStrategy(strategy); if (registered.isPresent()) { return registered.get(); } Map<OType, ODocumentFieldOTypeHandlingStrategy> typeHandlingStrategies = new ... | /**
* Creates a new instance of the requested strategy. Since strategies are stateless, if an
* existing instance already exists then it's returned.
*
* @param strategy
* @return strategy instance
*/ | Creates a new instance of the requested strategy. Since strategies are stateless, if an existing instance already exists then it's returned | create | {
"repo_name": "orientechnologies/orientdb",
"path": "object/src/main/java/com/orientechnologies/orient/object/enhancement/field/ODocumentFieldHandlingStrategyFactory.java",
"license": "apache-2.0",
"size": 2886
} | [
"com.orientechnologies.orient.core.metadata.schema.OType",
"java.util.HashMap",
"java.util.Map",
"java.util.Optional"
] | import com.orientechnologies.orient.core.metadata.schema.OType; import java.util.HashMap; import java.util.Map; import java.util.Optional; | import com.orientechnologies.orient.core.metadata.schema.*; import java.util.*; | [
"com.orientechnologies.orient",
"java.util"
] | com.orientechnologies.orient; java.util; | 223,910 |
IntervalType scanIntervalType() {
int precision = -1;
int scale = -1;
int startToken;
int endToken;
final int errorCode = ErrorCode.X_22006;
startToken = endToken = token.tokenType;
scanNext(errorCode);
if (token.tokenTy... | IntervalType scanIntervalType() { int precision = -1; int scale = -1; int startToken; int endToken; final int errorCode = ErrorCode.X_22006; startToken = endToken = token.tokenType; scanNext(errorCode); if (token.tokenType == Tokens.OPENBRACKET) { scanNext(errorCode); if (token.dataType == null token.dataType.typeCode ... | /**
* Reads the type part of the INTERVAL
*/ | Reads the type part of the INTERVAL | scanIntervalType | {
"repo_name": "ThangBK2009/android-source-browsing.platform--external--hsqldb",
"path": "src/org/hsqldb/Scanner.java",
"license": "bsd-3-clause",
"size": 68403
} | [
"org.hsqldb.error.Error",
"org.hsqldb.error.ErrorCode",
"org.hsqldb.lib.ArrayUtil",
"org.hsqldb.types.IntervalType",
"org.hsqldb.types.Type",
"org.hsqldb.types.Types"
] | import org.hsqldb.error.Error; import org.hsqldb.error.ErrorCode; import org.hsqldb.lib.ArrayUtil; import org.hsqldb.types.IntervalType; import org.hsqldb.types.Type; import org.hsqldb.types.Types; | import org.hsqldb.error.*; import org.hsqldb.lib.*; import org.hsqldb.types.*; | [
"org.hsqldb.error",
"org.hsqldb.lib",
"org.hsqldb.types"
] | org.hsqldb.error; org.hsqldb.lib; org.hsqldb.types; | 2,237,505 |
private static void globalSubstitute() throws Exception {
// Global substitution with a literal
Pattern p = Pattern.compile("(ab)(c*)");
Matcher m = p.matcher("abccczzzabcczzzabccc");
if (!m.replaceAll("test").equals("testzzztestzzztest"))
failCount++;
m.reset("z... | static void function() throws Exception { Pattern p = Pattern.compile(STR); Matcher m = p.matcher(STR); if (!m.replaceAll("test").equals(STR)) failCount++; m.reset(STR); if (!m.replaceAll("test").equals(STR)) failCount++; m.reset(STR); String result = m.replaceAll("$1"); if (!result.equals(STR)) failCount++; p = Patter... | /**
* A basic sanity test of Matcher.replaceAll().
*/ | A basic sanity test of Matcher.replaceAll() | globalSubstitute | {
"repo_name": "md-5/jdk10",
"path": "test/jdk/java/util/regex/RegExTest.java",
"license": "gpl-2.0",
"size": 187639
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 189,261 |
public ServiceCall beginDelete202RetryInvalidHeaderAsync(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException {
if (serviceCallback == null) {
throw new IllegalArgumentException("ServiceCallback is required for async calls.");
} | ServiceCall function(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); } | /**
* Long running delete request, service returns a 202 to the initial request receing a reponse with an invalid 'Location' and 'Retry-After' headers.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callbac... | Long running delete request, service returns a 202 to the initial request receing a reponse with an invalid 'Location' and 'Retry-After' headers | beginDelete202RetryInvalidHeaderAsync | {
"repo_name": "stankovski/AutoRest",
"path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/lro/LROSADsOperationsImpl.java",
"license": "mit",
"size": 226665
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,703,292 |
private void checkConflictWithPrimary(IgfsPath path) throws IgniteCheckedException {
if (secondaryFs != null) {
if (secondaryFs.info(path) != null) {
throw new IgfsInvalidPathException("Path mapped to a PRIMARY mode found in secondary file " +
"system. Remove... | void function(IgfsPath path) throws IgniteCheckedException { if (secondaryFs != null) { if (secondaryFs.info(path) != null) { throw new IgfsInvalidPathException(STR + STR + path); } } } | /**
* Checks if given path exists in secondary file system and throws exception if so.
*
* @param path Path to check.
* @throws IgniteCheckedException If path exists.
*/ | Checks if given path exists in secondary file system and throws exception if so | checkConflictWithPrimary | {
"repo_name": "ryanzz/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java",
"license": "apache-2.0",
"size": 70806
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.igfs.IgfsInvalidPathException",
"org.apache.ignite.igfs.IgfsPath"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.igfs.IgfsInvalidPathException; import org.apache.ignite.igfs.IgfsPath; | import org.apache.ignite.*; import org.apache.ignite.igfs.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 219,414 |
ArtifactRepository getLocalRepository(); | ArtifactRepository getLocalRepository(); | /**
* Returns the {@link ArtifactRepository} provided by Maven.
*
* @return The {@link ArtifactRepository} provided by Maven.
* @since 1.0
*/ | Returns the <code>ArtifactRepository</code> provided by Maven | getLocalRepository | {
"repo_name": "mojohaus/mrm",
"path": "mrm-api/src/main/java/org/codehaus/mojo/mrm/plugin/FactoryHelper.java",
"license": "apache-2.0",
"size": 2848
} | [
"org.apache.maven.artifact.repository.ArtifactRepository"
] | import org.apache.maven.artifact.repository.ArtifactRepository; | import org.apache.maven.artifact.repository.*; | [
"org.apache.maven"
] | org.apache.maven; | 1,583,875 |
public static Term reduceComponents(CompoundTerm t1, Term t2) {
boolean success;
ArrayList<Term> list = t1.cloneComponents();
if (t1.getClass() == t2.getClass()) {
success = list.removeAll(((CompoundTerm) t2).getComponents());
} else {
success = list.remove(t2... | static Term function(CompoundTerm t1, Term t2) { boolean success; ArrayList<Term> list = t1.cloneComponents(); if (t1.getClass() == t2.getClass()) { success = list.removeAll(((CompoundTerm) t2).getComponents()); } else { success = list.remove(t2); } return (success ? make(t1, list) : null); } | /**
* Try to remove a component from a compound
* @param t1 The compound
* @param t2 The component
* @return The new compound
*/ | Try to remove a component from a compound | reduceComponents | {
"repo_name": "automenta/jcog",
"path": "nars/jcog/nars/reason/language/CompoundTerm.java",
"license": "gpl-3.0",
"size": 26257
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 345,420 |
@Override
public List<Exchange> getExchanges() {
return new ArrayList<>(getQueue());
} | List<Exchange> function() { return new ArrayList<>(getQueue()); } | /**
* Returns the current pending exchanges
*/ | Returns the current pending exchanges | getExchanges | {
"repo_name": "tadayosi/camel",
"path": "components/camel-seda/src/main/java/org/apache/camel/component/seda/SedaEndpoint.java",
"license": "apache-2.0",
"size": 21667
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.camel.Exchange"
] | import java.util.ArrayList; import java.util.List; import org.apache.camel.Exchange; | import java.util.*; import org.apache.camel.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 812,738 |
public static Path addExtension(Path path, String... extensions) {
StringBuilder pathStringBuilder = new StringBuilder(path.toString());
for (String extension : extensions) {
if (!Strings.isNullOrEmpty(extension)) {
pathStringBuilder.append(extension);
}
}
return new Path(pathStrin... | static Path function(Path path, String... extensions) { StringBuilder pathStringBuilder = new StringBuilder(path.toString()); for (String extension : extensions) { if (!Strings.isNullOrEmpty(extension)) { pathStringBuilder.append(extension); } } return new Path(pathStringBuilder.toString()); } | /**
* Suffix all <code>extensions</code> to <code>path</code>.
*
* <pre>
* PathUtils.addExtension("/tmp/data/file", ".txt") = file.txt
* PathUtils.addExtension("/tmp/data/file.txt.gpg", ".zip") = file.txt.gpg.zip
* PathUtils.addExtension("/tmp/data/file.txt", ... | Suffix all <code>extensions</code> to <code>path</code>. <code> PathUtils.addExtension("/tmp/data/file", ".txt") = file.txt PathUtils.addExtension("/tmp/data/file.txt.gpg", ".zip") = file.txt.gpg.zip PathUtils.addExtension("/tmp/data/file.txt", ".tar", ".gz") = file.txt.tar.gz PathUtils.addExtension("/tmp/data/file.txt... | addExtension | {
"repo_name": "jinhyukchang/gobblin",
"path": "gobblin-utility/src/main/java/org/apache/gobblin/util/PathUtils.java",
"license": "apache-2.0",
"size": 7344
} | [
"com.google.common.base.Strings",
"org.apache.hadoop.fs.Path"
] | import com.google.common.base.Strings; import org.apache.hadoop.fs.Path; | import com.google.common.base.*; import org.apache.hadoop.fs.*; | [
"com.google.common",
"org.apache.hadoop"
] | com.google.common; org.apache.hadoop; | 1,758,906 |
void sanitizeOverrideConfiguration(Configuration globalConfig) {
// If it's fullscreen, the override config should be empty and we should leave it alone.
if (mFullscreen) {
return;
}
// screenLayout field is set in #calculateOverrideConfig but only part of it is really
... | void sanitizeOverrideConfiguration(Configuration globalConfig) { if (mFullscreen) { return; } int overrideScreenLayout = mOverrideConfig.screenLayout; int newScreenLayout = globalConfig.screenLayout; newScreenLayout = (newScreenLayout & ~SCREENLAYOUT_LONG_MASK) (overrideScreenLayout & SCREENLAYOUT_LONG_MASK); newScreen... | /**
* Update fields that are not overridden for task from global configuration.
*
* @param globalConfig global configuration to update from.
*/ | Update fields that are not overridden for task from global configuration | sanitizeOverrideConfiguration | {
"repo_name": "daiqiquan/framework-base",
"path": "services/core/java/com/android/server/am/TaskRecord.java",
"license": "apache-2.0",
"size": 82289
} | [
"android.content.res.Configuration"
] | import android.content.res.Configuration; | import android.content.res.*; | [
"android.content"
] | android.content; | 1,870,560 |
private int dateGap(Date day1, Date day2){
Calendar date1=Calendar.getInstance();
date1.setTime(day1);
date1.set(Calendar.HOUR, 0);
date1.set(Calendar.MINUTE,0);
date1.set(Calendar.SECOND,0);
Calendar date2=Calendar.getInstance();
date2.setTime(day2);
... | int function(Date day1, Date day2){ Calendar date1=Calendar.getInstance(); date1.setTime(day1); date1.set(Calendar.HOUR, 0); date1.set(Calendar.MINUTE,0); date1.set(Calendar.SECOND,0); Calendar date2=Calendar.getInstance(); date2.setTime(day2); date2.set(Calendar.HOUR, 0); date2.set(Calendar.MINUTE,0); date2.set(Calend... | /**
* calculate the date gap between day1 and day 2
* @param day1
* @param day2
* @return day2-day1
*/ | calculate the date gap between day1 and day 2 | dateGap | {
"repo_name": "BUPTSEgroup13/Car-Park-Control-System-group13",
"path": "src/Entity/Staff.java",
"license": "mit",
"size": 3229
} | [
"java.util.Calendar",
"java.util.Date"
] | import java.util.Calendar; import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,807,880 |
JpaTemplate template = exchange.getIn().getHeader("CamelJpaTemplate", JpaTemplate.class);
String user = doc.getUser();
CustomerEntity customer = findCustomerByName(template, user);
// let's convert information from the document into the entity bean
customer.setUserName(user);
... | JpaTemplate template = exchange.getIn().getHeader(STR, JpaTemplate.class); String user = doc.getUser(); CustomerEntity customer = findCustomerByName(template, user); customer.setUserName(user); customer.setFirstName(doc.getFirstName()); customer.setSurname(doc.getLastName()); customer.setCity(doc.getCity()); LOG.debug(... | /**
* A transformation method to convert a person document into a customer
* entity
* @throws Exception
*/ | A transformation method to convert a person document into a customer entity | toCustomer | {
"repo_name": "aaronwalker/camel",
"path": "examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java",
"license": "apache-2.0",
"size": 2756
} | [
"org.springframework.orm.jpa.JpaTemplate"
] | import org.springframework.orm.jpa.JpaTemplate; | import org.springframework.orm.jpa.*; | [
"org.springframework.orm"
] | org.springframework.orm; | 2,164,132 |
public IpAddress ipAddress() {
return this.ipAddress;
} | IpAddress function() { return this.ipAddress; } | /**
* Get the IP address type of the container group.
*
* @return the ipAddress value
*/ | Get the IP address type of the container group | ipAddress | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/containerinstance/mgmt-v2019_12_01/src/main/java/com/microsoft/azure/management/containerinstance/v2019_12_01/implementation/ContainerGroupInner.java",
"license": "mit",
"size": 13356
} | [
"com.microsoft.azure.management.containerinstance.v2019_12_01.IpAddress"
] | import com.microsoft.azure.management.containerinstance.v2019_12_01.IpAddress; | import com.microsoft.azure.management.containerinstance.v2019_12_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 402,495 |
public static String getValueAsString(Value pvalue) {
if (pvalue == null)
return null;
if (pvalue.getContent() == null)
return null;
String result = "";
String encoding = pvalue.getEncoding();
if (encoding.equals(EventConstants.XML_ENCODING_TEXT)) {
result = pvalue.getContent();
} else if (e... | static String function(Value pvalue) { if (pvalue == null) return null; if (pvalue.getContent() == null) return null; String result = STR0xSTRUnknown encoding for parm value: " + encoding); } return result.trim(); } | /**
* Converts the value of a parm ('Value') of the instance to a string
*
* @param pvalue a {@link org.opennms.netmgt.xml.event.Value} object.
* @return a {@link java.lang.String} object.
*/ | Converts the value of a parm ('Value') of the instance to a string | getValueAsString | {
"repo_name": "opennms-forge/poc-nms-core",
"path": "opennms-model/src/main/java/org/opennms/netmgt/EventConstants.java",
"license": "gpl-2.0",
"size": 54813
} | [
"org.opennms.netmgt.xml.event.Value"
] | import org.opennms.netmgt.xml.event.Value; | import org.opennms.netmgt.xml.event.*; | [
"org.opennms.netmgt"
] | org.opennms.netmgt; | 261,727 |
@Override
public void generateResources() {
addResource("Silicate Ore", 30 + Die.d20(2));
if (Die.d6() == 1) {
addResource("Silicate Crystals", 5 + Die.d6(2));
}
addResource("Ferric Ore", 35 + Die.d20(3));
addResource("Heavy Metals", 25 + Die.d20(2));
addResource("Radioactives", 15 + Die.d12(3));
a... | void function() { addResource(STR, 30 + Die.d20(2)); if (Die.d6() == 1) { addResource(STR, 5 + Die.d6(2)); } addResource(STR, 35 + Die.d20(3)); addResource(STR, 25 + Die.d20(2)); addResource(STR, 15 + Die.d12(3)); addResource(STR, 5 + Die.d6(3)); } | /**
* Resources consist mostly of Silicate and Ferric ores, with other metals
* and radioactives.
*/ | Resources consist mostly of Silicate and Ferric ores, with other metals and radioactives | generateResources | {
"repo_name": "samuelpenn/mapcraft",
"path": "worldgen/src/main/java/uk/org/glendale/worldgen/astro/planet/builders/barren/Ferrinian.java",
"license": "gpl-2.0",
"size": 2504
} | [
"uk.org.glendale.rpg.utils.Die"
] | import uk.org.glendale.rpg.utils.Die; | import uk.org.glendale.rpg.utils.*; | [
"uk.org.glendale"
] | uk.org.glendale; | 87,611 |
@Override
public void setCreateDate(java.util.Date createDate) {
_appRole2Employee.setCreateDate(createDate);
} | void function(java.util.Date createDate) { _appRole2Employee.setCreateDate(createDate); } | /**
* Sets the create date of this app role2 employee.
*
* @param createDate the create date of this app role2 employee
*/ | Sets the create date of this app role2 employee | setCreateDate | {
"repo_name": "openegovplatform/OEPv2",
"path": "oep-ssomgt-portlet/docroot/WEB-INF/service/org/oep/ssomgt/model/AppRole2EmployeeWrapper.java",
"license": "apache-2.0",
"size": 10443
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,503,348 |
// Get the Client
IClient client = ClientHolder.getClient();
// Create the dialog and get the files
FileDialog fileDialog = new FileDialog(workbenchWindow.getShell(),
SWT.MULTI);
fileDialog.setText("Select a file to import into ICE");
fileDialog.open();
// Import the files
String filterPath = file... | IClient client = ClientHolder.getClient(); FileDialog fileDialog = new FileDialog(workbenchWindow.getShell(), SWT.MULTI); fileDialog.setText(STR); fileDialog.open(); String filterPath = fileDialog.getFilterPath(); for (String name : fileDialog.getFileNames()) { File importedFile = new File(filterPath, name); client.imp... | /**
* This operation runs the action.
*/ | This operation runs the action | run | {
"repo_name": "gorindn/ice",
"path": "src/org.eclipse.ice.client/src/org/eclipse/ice/client/common/ImportFileAction.java",
"license": "epl-1.0",
"size": 3354
} | [
"java.io.File",
"org.eclipse.ice.client.common.internal.ClientHolder",
"org.eclipse.ice.iclient.IClient",
"org.eclipse.swt.widgets.FileDialog"
] | import java.io.File; import org.eclipse.ice.client.common.internal.ClientHolder; import org.eclipse.ice.iclient.IClient; import org.eclipse.swt.widgets.FileDialog; | import java.io.*; import org.eclipse.ice.client.common.internal.*; import org.eclipse.ice.iclient.*; import org.eclipse.swt.widgets.*; | [
"java.io",
"org.eclipse.ice",
"org.eclipse.swt"
] | java.io; org.eclipse.ice; org.eclipse.swt; | 2,155,946 |
public void onCrateItemsModified( ItemStack stack ); | void function( ItemStack stack ); | /**
* Called when any items in the crate storage get
* changed. The stack will represent which items were
* added or removed. Stack size is negative if items
* were removed.
*/ | Called when any items in the crate storage get changed. The stack will represent which items were added or removed. Stack size is negative if items were removed | onCrateItemsModified | {
"repo_name": "TehStoneMan/BetterStorageToo",
"path": "old_src/main/java/net/mcft/copy/betterstorage/api/crate/ICrateWatcher.java",
"license": "mit",
"size": 363
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 2,758,348 |
@Test
public void testNonHyloggerFilter() throws Exception {
final String serviceUrl = "http://fake.com/wfs";
final String nameFilter = "filterBob";
final String custodianFilter = "filterCustodian";
final String filterDateStart = "1986-10-09";
final String filterDat... | void function() throws Exception { final String serviceUrl = STRfilterBobSTRfilterCustodianSTR1986-10-09STR1986-10-10STREPSG:4326STRwfsResponseSTRtext/csvSTRhttp: context.checking(new Expectations() { { oneOf(mockBoreholeService).getAllBoreholes(serviceUrl, nameFilter, custodianFilter, filterDateStart, filterDateEnd, m... | /**
* Tests to ensure that a non hylogger request calls the correct functions.
*
* @throws Exception
* the exception
*/ | Tests to ensure that a non hylogger request calls the correct functions | testNonHyloggerFilter | {
"repo_name": "victortey/AuScope-Portal",
"path": "src/test/java/org/auscope/portal/server/web/controllers/TestNVCLController.java",
"license": "lgpl-3.0",
"size": 35181
} | [
"org.jmock.Expectations"
] | import org.jmock.Expectations; | import org.jmock.*; | [
"org.jmock"
] | org.jmock; | 1,767,336 |
protected ObjectMap create (Kryo kryo, Input input, Class<ObjectMap> type) {
return kryo.newInstance(type);
} | ObjectMap function (Kryo kryo, Input input, Class<ObjectMap> type) { return kryo.newInstance(type); } | /**
* Used by {@link #read(Kryo, Input, Class)} to create the new object. This can be overridden to customize object creation, eg
* to call a constructor with arguments. The default implementation uses {@link Kryo#newInstance(Class)}.
*/ | Used by <code>#read(Kryo, Input, Class)</code> to create the new object. This can be overridden to customize object creation, eg to call a constructor with arguments. The default implementation uses <code>Kryo#newInstance(Class)</code> | create | {
"repo_name": "billy1380/VisEditor",
"path": "Editor/src/com/kotcrab/vis/editor/serializer/ObjectMapSerializer.java",
"license": "apache-2.0",
"size": 6387
} | [
"com.badlogic.gdx.utils.ObjectMap",
"com.esotericsoftware.kryo.Kryo",
"com.esotericsoftware.kryo.io.Input"
] | import com.badlogic.gdx.utils.ObjectMap; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.io.Input; | import com.badlogic.gdx.utils.*; import com.esotericsoftware.kryo.*; import com.esotericsoftware.kryo.io.*; | [
"com.badlogic.gdx",
"com.esotericsoftware.kryo"
] | com.badlogic.gdx; com.esotericsoftware.kryo; | 2,104,673 |
public void refreshBanner() {
// Panel.
final ContentPanel panel = view.getPanelProjectBanner();
// Set the heading of panel
String projectTitle = currentProjectDTO.getFullName();
String titleToDisplay = "";
if (projectTitle != null && !projectTitle.isEmpty())
titleToDisplay = projectTitle.... | void function() { final ContentPanel panel = view.getPanelProjectBanner(); String projectTitle = currentProjectDTO.getFullName(); String titleToDisplay = STR...STR (STR)STRbannerSTR100%STR100%STRbanner-logoSTRbanner-flexSTR100%STR100%STR325px"); } for (final LayoutGroupDTO groupLayout : layout.getLayoutGroupsDTO()) { i... | /**
* Refreshes the project banner for the current project.
*/ | Refreshes the project banner for the current project | refreshBanner | {
"repo_name": "Polfo/sigma-h",
"path": "sigmah/src/main/java/org/sigmah/client/page/project/ProjectPresenter.java",
"license": "gpl-3.0",
"size": 32924
} | [
"com.extjs.gxt.ui.client.widget.ContentPanel",
"com.extjs.gxt.ui.client.widget.layout.FormLayout",
"com.google.gwt.user.client.rpc.AsyncCallback",
"org.sigmah.shared.command.GetValue",
"org.sigmah.shared.command.result.ValueResult",
"org.sigmah.shared.dto.element.DefaultFlexibleElementDTO",
"org.sigmah.... | import com.extjs.gxt.ui.client.widget.ContentPanel; import com.extjs.gxt.ui.client.widget.layout.FormLayout; import com.google.gwt.user.client.rpc.AsyncCallback; import org.sigmah.shared.command.GetValue; import org.sigmah.shared.command.result.ValueResult; import org.sigmah.shared.dto.element.DefaultFlexibleElementDTO... | import com.extjs.gxt.ui.client.widget.*; import com.extjs.gxt.ui.client.widget.layout.*; import com.google.gwt.user.client.rpc.*; import org.sigmah.shared.command.*; import org.sigmah.shared.command.result.*; import org.sigmah.shared.dto.element.*; import org.sigmah.shared.dto.layout.*; | [
"com.extjs.gxt",
"com.google.gwt",
"org.sigmah.shared"
] | com.extjs.gxt; com.google.gwt; org.sigmah.shared; | 2,813,515 |
public CButton getRefreshButton()
{
return bRefresh;
} // getRefreshButton | CButton function() { return bRefresh; } | /**
* Get Refresh Button
*
* @return Button
*/ | Get Refresh Button | getRefreshButton | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/client/src/main/java-legacy/org/compiere/apps/ConfirmPanel.java",
"license": "gpl-2.0",
"size": 24441
} | [
"org.compiere.swing.CButton"
] | import org.compiere.swing.CButton; | import org.compiere.swing.*; | [
"org.compiere.swing"
] | org.compiere.swing; | 1,727,990 |
boolean isComplexView(@NonNull View view); | boolean isComplexView(@NonNull View view); | /**
* Check if view is a complex view.
*
* @param view some view
* @return true if view is complex, false otherwise
*/ | Check if view is a complex view | isComplexView | {
"repo_name": "Cleveroad/Bitutorial",
"path": "library/src/main/java/com/cleveroad/splittransformation/ComplexViewDetector.java",
"license": "mit",
"size": 427
} | [
"android.support.annotation.NonNull",
"android.view.View"
] | import android.support.annotation.NonNull; import android.view.View; | import android.support.annotation.*; import android.view.*; | [
"android.support",
"android.view"
] | android.support; android.view; | 1,013,371 |
public void groupEventsByDatabase(DatabaseEventConsumer consumer) {
if ( isEmpty() ) return;
if ( databaseNames.size() <= 1 ) {
consumer.consume(databaseNames.iterator().next(), events);
return;
}
List<Event> dbEvents = new ArrayList<>();
String curren... | void function(DatabaseEventConsumer consumer) { if ( isEmpty() ) return; if ( databaseNames.size() <= 1 ) { consumer.consume(databaseNames.iterator().next(), events); return; } List<Event> dbEvents = new ArrayList<>(); String currentDatabase = null; for (Event event : events) { String dbName = getDatabase(event); if (c... | /**
* Consume the events in the same order they were {@link #handle(io.debezium.relational.ddl.DdlParserListener.Event) recorded},
* but grouped by database name. Multiple sequential statements that were applied to the same database are grouped together.
* @param consumer the consumer
*/ | Consume the events in the same order they were <code>#handle(io.debezium.relational.ddl.DdlParserListener.Event) recorded</code>, but grouped by database name. Multiple sequential statements that were applied to the same database are grouped together | groupEventsByDatabase | {
"repo_name": "adsr/debezium",
"path": "debezium-core/src/main/java/io/debezium/relational/ddl/DdlChanges.java",
"license": "apache-2.0",
"size": 5622
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 13,226 |
private boolean contains(HashMap<String, Object> map, Object o) {
for (Object obj : map.values()) {
if (obj == o) {
return true;
}
}
return false;
} | boolean function(HashMap<String, Object> map, Object o) { for (Object obj : map.values()) { if (obj == o) { return true; } } return false; } | /**
* Checks if hash map contains object
*
* @param map
* map to check
* @param o
* object to check
* @return returns true if map contains object o
*/ | Checks if hash map contains object | contains | {
"repo_name": "Syncano/syncano-android-demo",
"path": "Eclipse/SyncanoLib/src/com/syncano/android/lib/syncserver/DataChanges.java",
"license": "mit",
"size": 5991
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,829,232 |
public List<FeedItem> insertFeedItems(List<FeedItem> feedItems) throws RemoteException {
return delegateLocator.getFeedItemDelegate().insert(feedItems);
} | List<FeedItem> function(List<FeedItem> feedItems) throws RemoteException { return delegateLocator.getFeedItemDelegate().insert(feedItems); } | /**
* Inserts the FeedItem into the ExtendedManagedCustomer's ManagedCustomer.
*
* @param feedItems the FeedItems to insert
* @return the updated FeedItem
* @throws RemoteException for communication-related exceptions
*/ | Inserts the FeedItem into the ExtendedManagedCustomer's ManagedCustomer | insertFeedItems | {
"repo_name": "andyj24/googleads-java-lib",
"path": "modules/adwords_axis_utility_extension/src/main/java/com/google/api/ads/adwords/axis/utility/extension/ExtendedManagedCustomer.java",
"license": "apache-2.0",
"size": 39892
} | [
"com.google.api.ads.adwords.axis.v201506.cm.FeedItem",
"java.rmi.RemoteException",
"java.util.List"
] | import com.google.api.ads.adwords.axis.v201506.cm.FeedItem; import java.rmi.RemoteException; import java.util.List; | import com.google.api.ads.adwords.axis.v201506.cm.*; import java.rmi.*; import java.util.*; | [
"com.google.api",
"java.rmi",
"java.util"
] | com.google.api; java.rmi; java.util; | 2,758,799 |
void serialize(final FedoraResource obj, final OutputStream out, final boolean skipBinary, final boolean recurse)
throws RepositoryException, IOException, InvalidSerializationFormatException; | void serialize(final FedoraResource obj, final OutputStream out, final boolean skipBinary, final boolean recurse) throws RepositoryException, IOException, InvalidSerializationFormatException; | /**
* Serialize a FedoraObject into some format with options for recurse
* and skipBinary, and write it to the given OutputStream
*
* @param obj the obj
* @param out the out
* @param skipBinary skip binary
* @param recurse the recurse
* @throws RepositoryException if repository e... | Serialize a FedoraObject into some format with options for recurse and skipBinary, and write it to the given OutputStream | serialize | {
"repo_name": "nianma/fcrepo4",
"path": "fcrepo-serialization/src/main/java/org/fcrepo/serialization/FedoraObjectSerializer.java",
"license": "apache-2.0",
"size": 3640
} | [
"java.io.IOException",
"java.io.OutputStream",
"javax.jcr.RepositoryException",
"org.fcrepo.kernel.api.models.FedoraResource"
] | import java.io.IOException; import java.io.OutputStream; import javax.jcr.RepositoryException; import org.fcrepo.kernel.api.models.FedoraResource; | import java.io.*; import javax.jcr.*; import org.fcrepo.kernel.api.models.*; | [
"java.io",
"javax.jcr",
"org.fcrepo.kernel"
] | java.io; javax.jcr; org.fcrepo.kernel; | 2,128,655 |
public Object getContent(Class[] classes)
throws IOException
{
if (! connected)
connect();
String type = getContentType();
ContentHandler ch = getContentHandler(type);
if (ch != null)
return ch.getContent(this, classes);
throw new UnknownServiceException("protocol does not suppor... | Object function(Class[] classes) throws IOException { if (! connected) connect(); String type = getContentType(); ContentHandler ch = getContentHandler(type); if (ch != null) return ch.getContent(this, classes); throw new UnknownServiceException(STR); } | /**
* Retrieves the content of this URLConnection
*
* @param classes The allowed classes for the content
*
* @return the content
*
* @exception IOException If an error occurs
* @exception UnknownServiceException If the protocol does not support the
* content type
*/ | Retrieves the content of this URLConnection | getContent | {
"repo_name": "ivmai/JCGO",
"path": "goclsp/clsp_fix/java/net/URLConnection.java",
"license": "gpl-2.0",
"size": 36002
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 161,540 |
protected void addErrorReaction__erSecurityLinePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CtrlUnit86_ErrorReaction__erSecurityLine_feat... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), WTSpecPackage.eINSTANCE.getCtrlUnit86_ErrorReaction__erSecurityLine(), true, false, true, null, n... | /**
* This adds a property descriptor for the Error Reaction er Security Line feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Error Reaction er Security Line feature. | addErrorReaction__erSecurityLinePropertyDescriptor | {
"repo_name": "FTSRG/mondo-collab-framework",
"path": "archive/workspaceTracker/VA/ikerlanEMF.edit/src/eu/mondo/collaboration/operationtracemodel/example/WTSpec/provider/CtrlUnit86ItemProvider.java",
"license": "epl-1.0",
"size": 11618
} | [
"eu.mondo.collaboration.operationtracemodel.example.WTSpec",
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory"
] | import eu.mondo.collaboration.operationtracemodel.example.WTSpec; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; | import eu.mondo.collaboration.operationtracemodel.example.*; import org.eclipse.emf.edit.provider.*; | [
"eu.mondo.collaboration",
"org.eclipse.emf"
] | eu.mondo.collaboration; org.eclipse.emf; | 2,452,750 |
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addPlatformPropertyDescriptor(object);
}
return itemPropertyDescriptors;
} | List<IItemPropertyDescriptor> function(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addPlatformPropertyDescriptor(object); } return itemPropertyDescriptors; } | /**
* This returns the property descriptors for the adapted class.
* @generated
*/ | This returns the property descriptors for the adapted class | getPropertyDescriptors | {
"repo_name": "parraman/micobs",
"path": "mclev/es.uah.aut.srg.micobs.mclev/src/es/uah/aut/srg/micobs/mclev/mclevslib/provider/MParameterSLSPSwitchCaseItemProvider.java",
"license": "epl-1.0",
"size": 5681
} | [
"java.util.List",
"org.eclipse.emf.edit.provider.IItemPropertyDescriptor"
] | import java.util.List; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; | import java.util.*; import org.eclipse.emf.edit.provider.*; | [
"java.util",
"org.eclipse.emf"
] | java.util; org.eclipse.emf; | 261,398 |
@Test
public void testGetModel() {
SpeechModel model = service.getModel(EN_BROADBAND16K).execute();
assertNotNull(model);
assertNotNull(model.getName());
assertNotNull(model.getRate());
} | void function() { SpeechModel model = service.getModel(EN_BROADBAND16K).execute(); assertNotNull(model); assertNotNull(model.getName()); assertNotNull(model.getRate()); } | /**
* Test get model.
*/ | Test get model | testGetModel | {
"repo_name": "m2fd/java-sdk",
"path": "src/test/java/com/ibm/watson/developer_cloud/speech_to_text/v1/SpeechToTextIT.java",
"license": "apache-2.0",
"size": 8724
} | [
"com.ibm.watson.developer_cloud.speech_to_text.v1.model.SpeechModel",
"org.junit.Assert"
] | import com.ibm.watson.developer_cloud.speech_to_text.v1.model.SpeechModel; import org.junit.Assert; | import com.ibm.watson.developer_cloud.speech_to_text.v1.model.*; import org.junit.*; | [
"com.ibm.watson",
"org.junit"
] | com.ibm.watson; org.junit; | 439,871 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<PrivateLinkResourceInner> listByServer(String resourceGroupName, String serverName) {
return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<PrivateLinkResourceInner> function(String resourceGroupName, String serverName) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName)); } | /**
* Gets the private link resources for MySQL server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementEx... | Gets the private link resources for MySQL server | listByServer | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/PrivateLinkResourcesClientImpl.java",
"license": "mit",
"size": 25446
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.mysql.fluent.models.PrivateLinkResourceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.mysql.fluent.models.PrivateLinkResourceInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.mysql.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,259,256 |
@Test
public void testGetOrCreatePortalCookieCreate() {
IPortletCookieDao portletCookieDao = EasyMock.createMock(IPortletCookieDao.class);
MockPortalCookie portalCookie = new MockPortalCookie();
portalCookie.setValue("ABCDEF");
EasyMock.expect(portletCookieDao.createPortalCookie(PortletCookieServiceImpl.... | void function() { IPortletCookieDao portletCookieDao = EasyMock.createMock(IPortletCookieDao.class); MockPortalCookie portalCookie = new MockPortalCookie(); portalCookie.setValue(STR); EasyMock.expect(portletCookieDao.createPortalCookie(PortletCookieServiceImpl.DEFAULT_MAX_AGE)).andReturn(portalCookie); EasyMock.replay... | /**
* Test {@link PortletCookieServiceImpl#getOrCreatePortalCookie(javax.servlet.http.HttpServletRequest)}.
* that results in creating a new PortalCookie.
*/ | Test <code>PortletCookieServiceImpl#getOrCreatePortalCookie(javax.servlet.http.HttpServletRequest)</code>. that results in creating a new PortalCookie | testGetOrCreatePortalCookieCreate | {
"repo_name": "GTCC/nc-ssp-platform-nc-ssp-platform",
"path": "uportal-war/src/test/java/org/jasig/portal/portlet/container/services/PortletCookieServiceImplTest.java",
"license": "apache-2.0",
"size": 10814
} | [
"org.easymock.EasyMock",
"org.jasig.portal.portlet.dao.IPortletCookieDao",
"org.springframework.mock.web.MockHttpServletRequest"
] | import org.easymock.EasyMock; import org.jasig.portal.portlet.dao.IPortletCookieDao; import org.springframework.mock.web.MockHttpServletRequest; | import org.easymock.*; import org.jasig.portal.portlet.dao.*; import org.springframework.mock.web.*; | [
"org.easymock",
"org.jasig.portal",
"org.springframework.mock"
] | org.easymock; org.jasig.portal; org.springframework.mock; | 2,141,923 |
public JSONArray names() {
JSONArray ja = new JSONArray();
Iterator keys = this.keys();
while (keys.hasNext()) {
ja.put(keys.next());
}
return ja.length() == 0 ? null : ja;
} | JSONArray function() { JSONArray ja = new JSONArray(); Iterator keys = this.keys(); while (keys.hasNext()) { ja.put(keys.next()); } return ja.length() == 0 ? null : ja; } | /**
* Produce a JSONArray containing the names of the elements of this
* JSONObject.
*
* @return A JSONArray containing the key strings, or null if the JSONObject
* is empty.
*/ | Produce a JSONArray containing the names of the elements of this JSONObject | names | {
"repo_name": "joewitt99/okta-auth-report",
"path": "src/main/java/oktareport/JSONObject.java",
"license": "apache-2.0",
"size": 56718
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,549,401 |
protected void pushPacket(IOFSwitch sw, OFMatch match, OFPacketIn pi,
short outport, FloodlightContext cntx) {
if (pi == null) {
return;
} else if (pi.getInPort() == outport){
log.warn("Packet out not sent as the outport matches inport. {}",
... | void function(IOFSwitch sw, OFMatch match, OFPacketIn pi, short outport, FloodlightContext cntx) { if (pi == null) { return; } else if (pi.getInPort() == outport){ log.warn(STR, pi); return; } if (pi.getInPort() == outport) { if (log.isDebugEnabled()) { log.debug(STR + STR + STR, new Object[]{sw, match, pi}); return; }... | /**
* Pushes a packet-out to a switch. The assumption here is that
* the packet-in was also generated from the same switch. Thus, if the input
* port of the packet-in and the outport are the same, the function will not
* push the packet-out.
* @param sw switch that generated the packe... | Pushes a packet-out to a switch. The assumption here is that the packet-in was also generated from the same switch. Thus, if the input port of the packet-in and the outport are the same, the function will not push the packet-out | pushPacket | {
"repo_name": "hgupta2/floodlight2",
"path": "src/main/java/net/floodlightcontroller/routing/ForwardingBase.java",
"license": "apache-2.0",
"size": 27881
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"net.floodlightcontroller.core.FloodlightContext",
"net.floodlightcontroller.core.IOFSwitch",
"org.openflow.protocol.OFMatch",
"org.openflow.protocol.OFPacketIn",
"org.openflow.protocol.OFPacketOut",
"org.openflow.protocol.OFType",
"o... | import java.io.IOException; import java.util.ArrayList; import java.util.List; import net.floodlightcontroller.core.FloodlightContext; import net.floodlightcontroller.core.IOFSwitch; import org.openflow.protocol.OFMatch; import org.openflow.protocol.OFPacketIn; import org.openflow.protocol.OFPacketOut; import org.openf... | import java.io.*; import java.util.*; import net.floodlightcontroller.core.*; import org.openflow.protocol.*; import org.openflow.protocol.action.*; | [
"java.io",
"java.util",
"net.floodlightcontroller.core",
"org.openflow.protocol"
] | java.io; java.util; net.floodlightcontroller.core; org.openflow.protocol; | 659,659 |
public void setGraphicSupported(@NonNull Boolean graphicSupported) {
setValue(KEY_GRAPHIC_SUPPORTED, graphicSupported);
}
| void function(@NonNull Boolean graphicSupported) { setValue(KEY_GRAPHIC_SUPPORTED, graphicSupported); } | /**
* set the display's persistent screen supports.
* @param graphicSupported true if the display supports graphics, false if it does not
* @since SmartDeviceLink 2.0
*/ | set the display's persistent screen supports | setGraphicSupported | {
"repo_name": "anildahiya/sdl_android",
"path": "base/src/main/java/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java",
"license": "bsd-3-clause",
"size": 11484
} | [
"android.support.annotation.NonNull"
] | import android.support.annotation.NonNull; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 305,717 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.