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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Deprecated
public static Delete2 delete(String targetClass, List<Long> targetIds, List<ChildOption> childOptions) {
return delete().target(targetClass).id(targetIds).option(childOptions).build();
} | static Delete2 function(String targetClass, List<Long> targetIds, List<ChildOption> childOptions) { return delete().target(targetClass).id(targetIds).option(childOptions).build(); } | /**
* Create a new {@link Delete2} request.
* @param targetClass the target object class
* @param targetIds the target object IDs
* @param childOptions how to process child objects
* @return the new request
* @deprecated use {@link Requests.Delete2Builder} from {@link #delete()}, see this ... | Create a new <code>Delete2</code> request | delete | {
"repo_name": "dpwrussell/openmicroscopy",
"path": "components/blitz/src/omero/gateway/util/Requests.java",
"license": "gpl-2.0",
"size": 113616
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 532,226 |
public static Iterator<Annotation> getAnnotationsEncompassingSpan(Span span, JCas jcas, int annotType) {
// System.out.println("Looking for annotations overlapping " +
// span.getSpanStart() + " -- "
// +
// span.getSpanEnd());
CAS cas = jcas.getCas();
ConstraintFactory cf = cas.getConstraintFactory... | static Iterator<Annotation> function(Span span, JCas jcas, int annotType) { CAS cas = jcas.getCas(); ConstraintFactory cf = cas.getConstraintFactory(); FSIntConstraint ltEqToSpanStart = cf.createIntConstraint(); ltEqToSpanStart.leq(span.getSpanStart()); FSIntConstraint gtSpanStart = cf.createIntConstraint(); gtSpanStar... | /**
* return all annotations that contain the input span
*
* @param span
* @param jcas
* @return
*/ | return all annotations that contain the input span | getAnnotationsEncompassingSpan | {
"repo_name": "UCDenver-ccp/ccp-nlp",
"path": "ccp-nlp-uima/src/main/java/edu/ucdenver/ccp/nlp/uima/util/UIMA_Util.java",
"license": "bsd-3-clause",
"size": 91302
} | [
"edu.ucdenver.ccp.nlp.core.annotation.Span",
"java.util.Iterator",
"org.apache.uima.cas.ConstraintFactory",
"org.apache.uima.cas.FSIntConstraint",
"org.apache.uima.cas.FSMatchConstraint",
"org.apache.uima.cas.Feature",
"org.apache.uima.cas.FeaturePath",
"org.apache.uima.cas.TypeSystem",
"org.apache.... | import edu.ucdenver.ccp.nlp.core.annotation.Span; import java.util.Iterator; import org.apache.uima.cas.ConstraintFactory; import org.apache.uima.cas.FSIntConstraint; import org.apache.uima.cas.FSMatchConstraint; import org.apache.uima.cas.Feature; import org.apache.uima.cas.FeaturePath; import org.apache.uima.cas.Type... | import edu.ucdenver.ccp.nlp.core.annotation.*; import java.util.*; import org.apache.uima.cas.*; import org.apache.uima.jcas.*; import org.apache.uima.jcas.tcas.*; | [
"edu.ucdenver.ccp",
"java.util",
"org.apache.uima"
] | edu.ucdenver.ccp; java.util; org.apache.uima; | 1,783,922 |
private void assertTripleCount(URI predicate, Value value, int occurrences) throws RepositoryException {
RepositoryResult<Statement> statements = conn.getStatements(
null, predicate, value, false
);
int count = 0;
while (statements.hasNext()) {
statements.... | void function(URI predicate, Value value, int occurrences) throws RepositoryException { RepositoryResult<Statement> statements = conn.getStatements( null, predicate, value, false ); int count = 0; while (statements.hasNext()) { statements.next(); count++; } Assert.assertEquals( String.format(STR, predicate, value, occu... | /**
* Asserts that the triple pattern is present within the storage exactly n times.
*
* @param predicate
* @param value
* @param occurrences
* @throws RepositoryException
*/ | Asserts that the triple pattern is present within the storage exactly n times | assertTripleCount | {
"repo_name": "venukb/any23",
"path": "any23-core/src/test/java/org/deri/any23/extractor/SingleDocumentExtractionTest.java",
"license": "apache-2.0",
"size": 12526
} | [
"org.junit.Assert",
"org.openrdf.model.Statement",
"org.openrdf.model.Value",
"org.openrdf.repository.RepositoryException",
"org.openrdf.repository.RepositoryResult"
] | import org.junit.Assert; import org.openrdf.model.Statement; import org.openrdf.model.Value; import org.openrdf.repository.RepositoryException; import org.openrdf.repository.RepositoryResult; | import org.junit.*; import org.openrdf.model.*; import org.openrdf.repository.*; | [
"org.junit",
"org.openrdf.model",
"org.openrdf.repository"
] | org.junit; org.openrdf.model; org.openrdf.repository; | 1,591,661 |
protected int AdditiveExpr(int addPos) throws javax.xml.transform.TransformerException
{
int opPos = m_ops.getOp(OpMap.MAPINDEX_LENGTH);
if (-1 == addPos)
addPos = opPos;
MultiplicativeExpr(-1);
if (null != m_token)
{
if (tokenIs('+'))
{
nextToken();
... | int function(int addPos) throws javax.xml.transform.TransformerException { int opPos = m_ops.getOp(OpMap.MAPINDEX_LENGTH); if (-1 == addPos) addPos = opPos; MultiplicativeExpr(-1); if (null != m_token) { if (tokenIs('+')) { nextToken(); insertOp(addPos, 2, OpCodes.OP_PLUS); int opPlusLeftHandLen = m_ops.getOp(OpMap.MAP... | /**
* This has to handle construction of the operations so that they are evaluated
* in pre-fix order. So, for 9+7-6, instead of |+|9|-|7|6|, this needs to be
* evaluated as |-|+|9|7|6|.
*
* AdditiveExpr ::= MultiplicativeExpr
* | AdditiveExpr '+' MultiplicativeExpr
* | AdditiveExpr '-' M... | This has to handle construction of the operations so that they are evaluated in pre-fix order. So, for 9+7-6, instead of |+|9|-|7|6|, this needs to be evaluated as |-|+|9|7|6|. AdditiveExpr ::= MultiplicativeExpr | AdditiveExpr '+' MultiplicativeExpr | AdditiveExpr '-' MultiplicativeExpr | AdditiveExpr | {
"repo_name": "kcsl/immutability-benchmark",
"path": "benchmark-applications/reiminfer-oopsla-2012/source/Xalan/src/org/apache/xpath/compiler/XPathParser.java",
"license": "mit",
"size": 65864
} | [
"javax.xml.transform.TransformerException"
] | import javax.xml.transform.TransformerException; | import javax.xml.transform.*; | [
"javax.xml"
] | javax.xml; | 1,759,230 |
EClass getnUref(); | EClass getnUref(); | /**
* Returns the meta object for class '{@link sc.ndt.editor.turbsimtbs.nUref <em>nUref</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>nUref</em>'.
* @see sc.ndt.editor.turbsimtbs.nUref
* @generated
*/ | Returns the meta object for class '<code>sc.ndt.editor.turbsimtbs.nUref nUref</code>'. | getnUref | {
"repo_name": "cooked/NDT",
"path": "sc.ndt.editor.turbsim.tbs/src-gen/sc/ndt/editor/turbsimtbs/TurbsimtbsPackage.java",
"license": "gpl-3.0",
"size": 204585
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 786,198 |
Element elementTarget = DOMUtil.getElement(nodeTarget);
boolean bLenient = DOMProperties.isLenient();
DOMTarget domTarget = new DOMTarget();
try {
NodeList children = elementTarget.getChildNodes();
int numChildren;
if (children != null && (numChildren = child... | Element elementTarget = DOMUtil.getElement(nodeTarget); boolean bLenient = DOMProperties.isLenient(); DOMTarget domTarget = new DOMTarget(); try { NodeList children = elementTarget.getChildNodes(); int numChildren; if (children != null && (numChildren = children.getLength()) > 0) { for (int i = 0; i < numChildren; i++)... | /**
* Creates a new <code>DOMTarget</code> by parsing the given <code>Node</code> representing a XACML Target
* element.
*
* @param nodeTarget the <code>Node</code> representing the XACML Target element
* @return a new <code>DOMTarget</code> parsed from the given <code>Node</code>
* @throw... | Creates a new <code>DOMTarget</code> by parsing the given <code>Node</code> representing a XACML Target element | newInstance | {
"repo_name": "dash-/apache-openaz",
"path": "openaz-xacml-pdp/src/main/java/org/apache/openaz/xacml/pdp/policy/dom/DOMTarget.java",
"license": "apache-2.0",
"size": 4437
} | [
"org.apache.openaz.xacml.std.StdStatusCode",
"org.apache.openaz.xacml.std.dom.DOMProperties",
"org.apache.openaz.xacml.std.dom.DOMStructureException",
"org.apache.openaz.xacml.std.dom.DOMUtil",
"org.w3c.dom.Element",
"org.w3c.dom.Node",
"org.w3c.dom.NodeList"
] | import org.apache.openaz.xacml.std.StdStatusCode; import org.apache.openaz.xacml.std.dom.DOMProperties; import org.apache.openaz.xacml.std.dom.DOMStructureException; import org.apache.openaz.xacml.std.dom.DOMUtil; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; | import org.apache.openaz.xacml.std.*; import org.apache.openaz.xacml.std.dom.*; import org.w3c.dom.*; | [
"org.apache.openaz",
"org.w3c.dom"
] | org.apache.openaz; org.w3c.dom; | 2,397,843 |
@Override
public void addView(View child, ViewGroup.LayoutParams params) {
addView(child, -1, params);
} | void function(View child, ViewGroup.LayoutParams params) { addView(child, -1, params); } | /**
* Adds a view to the layout with the specified layout params.
* Note that for radio buttons the width and the height are ignored.
* <p>
* Consider using addButtons() instead
*
* @param child the view to add
* @param params the layout params of the view
*/ | Adds a view to the layout with the specified layout params. Note that for radio buttons the width and the height are ignored. Consider using addButtons() instead | addView | {
"repo_name": "Gavras/MultiLineRadioGroup",
"path": "multilineradiogroup/src/main/java/com/whygraphics/multilineradiogroup/MultiLineRadioGroup.java",
"license": "mit",
"size": 32776
} | [
"android.view.View",
"android.view.ViewGroup"
] | import android.view.View; import android.view.ViewGroup; | import android.view.*; | [
"android.view"
] | android.view; | 296,843 |
@SuppressWarnings("unused")
@UiThread
private void updateCustomAccessibilityActions(
@NonNull ByteBuffer buffer, @NonNull String[] strings) {
ensureRunningOnMainThread();
if (accessibilityDelegate != null) {
accessibilityDelegate.updateCustomAccessibilityActions(buffer, strings);
}
// ... | @SuppressWarnings(STR) void function( @NonNull ByteBuffer buffer, @NonNull String[] strings) { ensureRunningOnMainThread(); if (accessibilityDelegate != null) { accessibilityDelegate.updateCustomAccessibilityActions(buffer, strings); } } | /**
* Invoked by native to send new custom accessibility events from Flutter to Android.
*
* <p>The {@code buffer} and {@code strings} form a communication protocol that is implemented
* here:
* https://github.com/flutter/engine/blob/main/shell/platform/android/platform_view_android.cc#L207
*
* <p>... | Invoked by native to send new custom accessibility events from Flutter to Android. The buffer and strings form a communication protocol that is implemented here: HREF // TODO(cbracken): expand these docs to include more actionable information | updateCustomAccessibilityActions | {
"repo_name": "aam/engine",
"path": "shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java",
"license": "bsd-3-clause",
"size": 54029
} | [
"androidx.annotation.NonNull",
"java.nio.ByteBuffer"
] | import androidx.annotation.NonNull; import java.nio.ByteBuffer; | import androidx.annotation.*; import java.nio.*; | [
"androidx.annotation",
"java.nio"
] | androidx.annotation; java.nio; | 469,734 |
public Chronology getChronology(Object object, DateTimeZone zone) {
if (object.getClass().getName().endsWith(".BuddhistCalendar")) {
return BuddhistChronology.getInstance(zone);
} else if (object instanceof GregorianCalendar) {
GregorianCalendar gc = (GregorianCalendar) objec... | Chronology function(Object object, DateTimeZone zone) { if (object.getClass().getName().endsWith(STR)) { return BuddhistChronology.getInstance(zone); } else if (object instanceof GregorianCalendar) { GregorianCalendar gc = (GregorianCalendar) object; long cutover = gc.getGregorianChange().getTime(); if (cutover == Long... | /**
* Gets the chronology, which is the GJChronology if a GregorianCalendar is used,
* BuddhistChronology if a BuddhistCalendar is used or ISOChronology otherwise.
* The time zone specified is used in preference to that on the calendar.
*
* @param object the Calendar to convert, must not be n... | Gets the chronology, which is the GJChronology if a GregorianCalendar is used, BuddhistChronology if a BuddhistCalendar is used or ISOChronology otherwise. The time zone specified is used in preference to that on the calendar | getChronology | {
"repo_name": "aparo/scalajs-joda",
"path": "src/main/scala/org/joda/time/convert/CalendarConverter.java",
"license": "apache-2.0",
"size": 4930
} | [
"java.util.GregorianCalendar",
"org.joda.time.Chronology",
"org.joda.time.DateTimeZone",
"org.joda.time.chrono.BuddhistChronology",
"org.joda.time.chrono.GJChronology",
"org.joda.time.chrono.GregorianChronology",
"org.joda.time.chrono.ISOChronology",
"org.joda.time.chrono.JulianChronology"
] | import java.util.GregorianCalendar; import org.joda.time.Chronology; import org.joda.time.DateTimeZone; import org.joda.time.chrono.BuddhistChronology; import org.joda.time.chrono.GJChronology; import org.joda.time.chrono.GregorianChronology; import org.joda.time.chrono.ISOChronology; import org.joda.time.chrono.Julian... | import java.util.*; import org.joda.time.*; import org.joda.time.chrono.*; | [
"java.util",
"org.joda.time"
] | java.util; org.joda.time; | 2,451,081 |
private void closeConsumers(Throwable error) throws JMSException
{
// we need to clone the list of consumers since the close() method updates the _consumers collection
// which would result in a concurrent modification exception
final ArrayList<C> clonedConsumers = new ArrayList<C>(_cons... | void function(Throwable error) throws JMSException { final ArrayList<C> clonedConsumers = new ArrayList<C>(_consumers.values()); final Iterator<C> it = clonedConsumers.iterator(); while (it.hasNext()) { final C con = it.next(); if (error != null) { con.notifyError(error); } else { con.close(false); } } if (_dispatcher ... | /**
* Called to close message consumers cleanly. This may or may <b>not</b> be as a result of an error.
*
* @param error not null if this is a result of an error occurring at the connection level
*/ | Called to close message consumers cleanly. This may or may not be as a result of an error | closeConsumers | {
"repo_name": "sdkottegoda/andes",
"path": "modules/andes-core/client/src/main/java/org/wso2/andes/client/AMQSession.java",
"license": "apache-2.0",
"size": 137777
} | [
"java.util.ArrayList",
"java.util.Iterator",
"javax.jms.JMSException"
] | import java.util.ArrayList; import java.util.Iterator; import javax.jms.JMSException; | import java.util.*; import javax.jms.*; | [
"java.util",
"javax.jms"
] | java.util; javax.jms; | 297,719 |
Date getFirstPlayed(); | Date getFirstPlayed(); | /**
* Gets the first time a player joined the server.
*
* <p>This time is based off epoch timestamps.</p>
*
* @return The players first join time.
*/ | Gets the first time a player joined the server. This time is based off epoch timestamps | getFirstPlayed | {
"repo_name": "caseif/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/data/manipulator/entity/JoinData.java",
"license": "mit",
"size": 2104
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,398,776 |
public List<T> execute(String p1) throws DataAccessException {
return execute(p1, null);
}
/**
* Central execution method. All named parameter execution goes through this method.
* @param paramMap parameters associated with the name specified while declaring
* the SqlParameters. Primitive parameters must ... | List<T> function(String p1) throws DataAccessException { return execute(p1, null); } /** * Central execution method. All named parameter execution goes through this method. * @param paramMap parameters associated with the name specified while declaring * the SqlParameters. Primitive parameters must be represented by th... | /**
* Convenient method to execute with a single String parameter.
* @param p1 single String parameter
*/ | Convenient method to execute with a single String parameter | execute | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlQuery.java",
"license": "apache-2.0",
"size": 13613
} | [
"java.util.List",
"java.util.Map",
"org.springframework.dao.DataAccessException"
] | import java.util.List; import java.util.Map; import org.springframework.dao.DataAccessException; | import java.util.*; import org.springframework.dao.*; | [
"java.util",
"org.springframework.dao"
] | java.util; org.springframework.dao; | 822,558 |
return new CleanDatabaseTestSetup(test) {
protected void decorateSQL(Statement s) throws SQLException {
s
.execute("create table t (i int, s smallint, r real, "
+ "d double precision, dt date, t time, ts timestamp, "
... | return new CleanDatabaseTestSetup(test) { void function(Statement s) throws SQLException { s .execute(STR + STR + STR + STR + STR + STR); s .execute(STR + STR + STR + Utilities.stringToHexLiteral("twelv") + "," + Utilities.stringToHexLiteral("3teen") + "," + Utilities.stringToHexLiteral("4teen") + STR); } }; } | /**
* Creates the table used in the test cases.
*
*/ | Creates the table used in the test cases | decorateSQL | {
"repo_name": "lpxz/grail-derby104",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetMiscTest.java",
"license": "apache-2.0",
"size": 33380
} | [
"java.sql.SQLException",
"java.sql.Statement",
"org.apache.derbyTesting.junit.CleanDatabaseTestSetup",
"org.apache.derbyTesting.junit.Utilities"
] | import java.sql.SQLException; import java.sql.Statement; import org.apache.derbyTesting.junit.CleanDatabaseTestSetup; import org.apache.derbyTesting.junit.Utilities; | import java.sql.*; import org.apache.*; | [
"java.sql",
"org.apache"
] | java.sql; org.apache; | 1,493,948 |
public void connect() throws IOException
{
// Call is ignored if already connected.
if (connected)
return;
// If not connected, then file needs to be openned.
file = new File (unquote(getURL().getFile()));
if (! file.isDirectory())
{
if (doInput)
inputStream = new BufferedI... | void function() throws IOException { if (connected) return; file = new File (unquote(getURL().getFile())); if (! file.isDirectory()) { if (doInput) inputStream = new BufferedInputStream(new FileInputStream(file)); if (doOutput) outputStream = new BufferedOutputStream(new FileOutputStream(file)); } else { if (doInput) {... | /**
* "Connects" to the file by opening it.
*/ | "Connects" to the file by opening it | connect | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/gnu/java/net/protocol/file/Connection.java",
"license": "bsd-3-clause",
"size": 9785
} | [
"java.io.BufferedInputStream",
"java.io.BufferedOutputStream",
"java.io.ByteArrayInputStream",
"java.io.File",
"java.io.FileInputStream",
"java.io.FileOutputStream",
"java.io.IOException",
"java.net.ProtocolException"
] | import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.net.ProtocolException; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 1,001,696 |
protected void sequence_TupleDescriptor(ISerializationContext context, TupleDescriptorCS semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(ISerializationContext context, TupleDescriptorCS semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Contexts:
* TupleDescriptor returns TupleDescriptorCS
*
* Constraint:
* (sequencePart=ID | (typedPairs+=TypedPair typedPairs+=TypedPair*))
*/ | Contexts: TupleDescriptor returns TupleDescriptorCS Constraint: (sequencePart=ID | (typedPairs+=TypedPair typedPairs+=TypedPair*)) | sequence_TupleDescriptor | {
"repo_name": "upohl/eloquent",
"path": "plugins/org.muml.psm.allocation.language.xtext/src-gen/org/muml/psm/allocation/language/xtext/serializer/AbstractAllocationSpecificationLanguageSemanticSequencer.java",
"license": "epl-1.0",
"size": 39665
} | [
"org.eclipse.xtext.serializer.ISerializationContext",
"org.muml.psm.allocation.language.cs.TupleDescriptorCS"
] | import org.eclipse.xtext.serializer.ISerializationContext; import org.muml.psm.allocation.language.cs.TupleDescriptorCS; | import org.eclipse.xtext.serializer.*; import org.muml.psm.allocation.language.cs.*; | [
"org.eclipse.xtext",
"org.muml.psm"
] | org.eclipse.xtext; org.muml.psm; | 2,579,620 |
@GET
public Response masterRealmAdminConsoleRedirect() {
RealmModel master = new RealmManager(session).getKeycloakAdminstrationRealm();
return Response.status(302).location(
uriInfo.getBaseUriBuilder().path(AdminRoot.class).path(AdminRoot.class, "getAdminConsole").path("/").build... | Response function() { RealmModel master = new RealmManager(session).getKeycloakAdminstrationRealm(); return Response.status(302).location( uriInfo.getBaseUriBuilder().path(AdminRoot.class).path(AdminRoot.class, STR).path("/").build(master.getName()) ).build(); } | /**
* Convenience path to master realm admin console
*
* @exclude
* @return
*/ | Convenience path to master realm admin console | masterRealmAdminConsoleRedirect | {
"repo_name": "iperdomo/keycloak",
"path": "services/src/main/java/org/keycloak/services/resources/admin/AdminRoot.java",
"license": "apache-2.0",
"size": 11005
} | [
"javax.ws.rs.core.Response",
"org.keycloak.models.RealmModel",
"org.keycloak.services.managers.RealmManager"
] | import javax.ws.rs.core.Response; import org.keycloak.models.RealmModel; import org.keycloak.services.managers.RealmManager; | import javax.ws.rs.core.*; import org.keycloak.models.*; import org.keycloak.services.managers.*; | [
"javax.ws",
"org.keycloak.models",
"org.keycloak.services"
] | javax.ws; org.keycloak.models; org.keycloak.services; | 337,580 |
public Builder shardFailures(ImmutableList<SnapshotShardFailure> shardFailures) {
this.shardFailures = shardFailures;
return this;
} | Builder function(ImmutableList<SnapshotShardFailure> shardFailures) { this.shardFailures = shardFailures; return this; } | /**
* Sets the list of individual shard failures
*
* @param shardFailures list of shard failures
* @return this builder
*/ | Sets the list of individual shard failures | shardFailures | {
"repo_name": "alexksikes/elasticsearch",
"path": "src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreSnapshot.java",
"license": "apache-2.0",
"size": 17085
} | [
"com.google.common.collect.ImmutableList",
"org.elasticsearch.snapshots.SnapshotShardFailure"
] | import com.google.common.collect.ImmutableList; import org.elasticsearch.snapshots.SnapshotShardFailure; | import com.google.common.collect.*; import org.elasticsearch.snapshots.*; | [
"com.google.common",
"org.elasticsearch.snapshots"
] | com.google.common; org.elasticsearch.snapshots; | 1,506,352 |
public static void verifyNoIssue(String filename, JavaFileScanner check) {
JavaCheckVerifier javaCheckVerifier = new JavaCheckVerifier(new Expectations(true, null, null));
javaCheckVerifier.scanFile(filename, new JavaFileScanner[] {check});
} | static void function(String filename, JavaFileScanner check) { JavaCheckVerifier javaCheckVerifier = new JavaCheckVerifier(new Expectations(true, null, null)); javaCheckVerifier.scanFile(filename, new JavaFileScanner[] {check}); } | /**
* Verifies that the provided file will not raise any issue when analyzed with the given check.
*
* @param filename The file to be analyzed
* @param check The check to be used for the analysis
*/ | Verifies that the provided file will not raise any issue when analyzed with the given check | verifyNoIssue | {
"repo_name": "mbring/sonar-java",
"path": "java-frontend/src/test/java/org/sonar/java/se/JavaCheckVerifier.java",
"license": "lgpl-3.0",
"size": 18430
} | [
"org.sonar.plugins.java.api.JavaFileScanner"
] | import org.sonar.plugins.java.api.JavaFileScanner; | import org.sonar.plugins.java.api.*; | [
"org.sonar.plugins"
] | org.sonar.plugins; | 1,627,156 |
void alterTempTableSchmea(IdAndVersion tableId, List<ColumnChangeDetails> changes);
| void alterTempTableSchmea(IdAndVersion tableId, List<ColumnChangeDetails> changes); | /**
* Attempt to alter the schema of a temporary copy of a table.
* This is used to validate table schema changes.
*
* @param progressCallback
* @param tableId
* @param changes
* @return
*/ | Attempt to alter the schema of a temporary copy of a table. This is used to validate table schema changes | alterTempTableSchmea | {
"repo_name": "xschildw/Synapse-Repository-Services",
"path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/table/TableIndexManager.java",
"license": "apache-2.0",
"size": 9590
} | [
"java.util.List",
"org.sagebionetworks.repo.model.entity.IdAndVersion",
"org.sagebionetworks.table.cluster.ColumnChangeDetails"
] | import java.util.List; import org.sagebionetworks.repo.model.entity.IdAndVersion; import org.sagebionetworks.table.cluster.ColumnChangeDetails; | import java.util.*; import org.sagebionetworks.repo.model.entity.*; import org.sagebionetworks.table.cluster.*; | [
"java.util",
"org.sagebionetworks.repo",
"org.sagebionetworks.table"
] | java.util; org.sagebionetworks.repo; org.sagebionetworks.table; | 639,136 |
@Override
public void prePrepareBulkLoad(ObserverContext<RegionCoprocessorEnvironment> ctx,
PrepareBulkLoadRequest request) throws IOException {
RegionCoprocessorEnvironment e = ctx.getEnvironment();
AuthResult authResult = hasSomeAccess(e, "prePrepareBulkLoad", Action.CREA... | void function(ObserverContext<RegionCoprocessorEnvironment> ctx, PrepareBulkLoadRequest request) throws IOException { RegionCoprocessorEnvironment e = ctx.getEnvironment(); AuthResult authResult = hasSomeAccess(e, STR, Action.CREATE); logResult(authResult); if (!authResult.isAllowed()) { throw new AccessDeniedException... | /**
* Authorization check for
* SecureBulkLoadProtocol.prepareBulkLoad()
* @param ctx the context
* @param request the request
* @throws IOException
*/ | Authorization check for SecureBulkLoadProtocol.prepareBulkLoad() | prePrepareBulkLoad | {
"repo_name": "drewpope/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java",
"license": "apache-2.0",
"size": 101649
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.coprocessor.ObserverContext",
"org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment",
"org.apache.hadoop.hbase.protobuf.generated.SecureBulkLoadProtos",
"org.apache.hadoop.hbase.security.AccessDeniedException",
"org.apache.hadoop.hbase.security.a... | import java.io.IOException; import org.apache.hadoop.hbase.coprocessor.ObserverContext; import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment; import org.apache.hadoop.hbase.protobuf.generated.SecureBulkLoadProtos; import org.apache.hadoop.hbase.security.AccessDeniedException; import org.apache.hadoop... | import java.io.*; import org.apache.hadoop.hbase.coprocessor.*; import org.apache.hadoop.hbase.protobuf.generated.*; import org.apache.hadoop.hbase.security.*; import org.apache.hadoop.hbase.security.access.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,255,034 |
Tab currentTab = mActivity.getActivityTab();
reportUsageOfCurrentContextIfPossible(currentTab, false, null);
TabModelSelector selector = mActivity.getTabModelSelector();
assert selector != null; | Tab currentTab = mActivity.getActivityTab(); reportUsageOfCurrentContextIfPossible(currentTab, false, null); TabModelSelector selector = mActivity.getTabModelSelector(); assert selector != null; | /**
* Starts reporting context.
*/ | Starts reporting context | enable | {
"repo_name": "Pluto-tv/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/gsa/ContextReporter.java",
"license": "bsd-3-clause",
"size": 9529
} | [
"org.chromium.chrome.browser.tab.Tab",
"org.chromium.chrome.browser.tabmodel.TabModelSelector"
] | import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.TabModelSelector; | import org.chromium.chrome.browser.tab.*; import org.chromium.chrome.browser.tabmodel.*; | [
"org.chromium.chrome"
] | org.chromium.chrome; | 113,434 |
private boolean tryWhitespace() throws SAXException, IOException {
char c;
c = readCh();
if (isWhitespace(c)) {
skipWhitespace();
return true;
} else {
unread(c);
return false;
}
} | boolean function() throws SAXException, IOException { char c; c = readCh(); if (isWhitespace(c)) { skipWhitespace(); return true; } else { unread(c); return false; } } | /**
* Return true if we can read some whitespace.
* <p>
* This is simply a convenience method.
* <p>
* This method will push back a character rather than an array whenever
* possible (probably the majority of cases).
*
* @return true if whitespace was found.
*/ | Return true if we can read some whitespace. This is simply a convenience method. This method will push back a character rather than an array whenever possible (probably the majority of cases) | tryWhitespace | {
"repo_name": "takenspc/validator",
"path": "src/nu/validator/gnu/xml/aelfred2/XmlParser.java",
"license": "mit",
"size": 156412
} | [
"java.io.IOException",
"org.xml.sax.SAXException"
] | import java.io.IOException; import org.xml.sax.SAXException; | import java.io.*; import org.xml.sax.*; | [
"java.io",
"org.xml.sax"
] | java.io; org.xml.sax; | 1,175,291 |
protected JSONObject getJsonConfig(
CmsObject cms,
A_CmsXmlContentValue schemaType,
CmsMessages messages,
CmsResource resource,
Locale contentLocale) {
JSONObject config = new JSONObject();
try {
config.put(I_CmsGalleryProviderConstants.CONFIG_STA... | JSONObject function( CmsObject cms, A_CmsXmlContentValue schemaType, CmsMessages messages, CmsResource resource, Locale contentLocale) { JSONObject config = new JSONObject(); try { config.put(I_CmsGalleryProviderConstants.CONFIG_START_SITE, m_startSite); config.put(I_CmsGalleryProviderConstants.CONFIG_SHOW_SITE_SELECTO... | /**
* Gets the JSON configuration.<p>
*
* @param cms the current CMS context
* @param schemaType the schema type
* @param messages the messages
* @param resource the content resource
* @param contentLocale the content locale
*
* @return the JSON configuration object
*/ | Gets the JSON configuration | getJsonConfig | {
"repo_name": "ggiudetti/opencms-core",
"path": "src/org/opencms/widgets/CmsVfsFileWidget.java",
"license": "lgpl-2.1",
"size": 26589
} | [
"java.util.Arrays",
"java.util.Locale",
"org.opencms.ade.galleries.shared.CmsGalleryTabConfiguration",
"org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants",
"org.opencms.file.CmsObject",
"org.opencms.file.CmsResource",
"org.opencms.file.types.CmsResourceTypeXmlContainerPage",
"org.opencms.... | import java.util.Arrays; import java.util.Locale; import org.opencms.ade.galleries.shared.CmsGalleryTabConfiguration; import org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants; import org.opencms.file.CmsObject; import org.opencms.file.CmsResource; import org.opencms.file.types.CmsResourceTypeXmlContainerPa... | import java.util.*; import org.opencms.ade.galleries.shared.*; import org.opencms.file.*; import org.opencms.file.types.*; import org.opencms.i18n.*; import org.opencms.json.*; import org.opencms.util.*; | [
"java.util",
"org.opencms.ade",
"org.opencms.file",
"org.opencms.i18n",
"org.opencms.json",
"org.opencms.util"
] | java.util; org.opencms.ade; org.opencms.file; org.opencms.i18n; org.opencms.json; org.opencms.util; | 2,611,311 |
public VpnProfileResponseInner beginGenerateVpnProfile(String resourceGroupName, String gatewayName, AuthenticationMethod authenticationMethod) {
return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName, authenticationMethod).toBlocking().single().body();
} | VpnProfileResponseInner function(String resourceGroupName, String gatewayName, AuthenticationMethod authenticationMethod) { return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName, authenticationMethod).toBlocking().single().body(); } | /**
* Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param gatewayName The name of the P2SVpnGateway.
* @param authenticationMethod VPN client authentication method. Possible values inclu... | Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group | beginGenerateVpnProfile | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/P2sVpnGatewaysInner.java",
"license": "mit",
"size": 105321
} | [
"com.microsoft.azure.management.network.v2019_07_01.AuthenticationMethod"
] | import com.microsoft.azure.management.network.v2019_07_01.AuthenticationMethod; | import com.microsoft.azure.management.network.v2019_07_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 723,271 |
@Override
public synchronized RoleRecvStatus deliverError(OFErrorMsg error)
throws SwitchStateException {
RoleState errorRole = pendingReplies.getIfPresent(error.getXid());
if (errorRole == null) {
if (error.getErrType() == OFErrorType.ROLE_REQUEST_FAILED) {
... | synchronized RoleRecvStatus function(OFErrorMsg error) throws SwitchStateException { RoleState errorRole = pendingReplies.getIfPresent(error.getXid()); if (errorRole == null) { if (error.getErrType() == OFErrorType.ROLE_REQUEST_FAILED) { log.debug(STR + STR + STR, sw.getStringId(), error); } else { log.debug(STR + STR,... | /**
* Called if we receive an error message. If the xid matches the
* pending request we handle it otherwise we ignore it.
*
* Note: since we only keep the last pending request we might get
* error messages for earlier role requests that we won't be able
* to handle
*/ | Called if we receive an error message. If the xid matches the pending request we handle it otherwise we ignore it. Note: since we only keep the last pending request we might get error messages for earlier role requests that we won't be able to handle | deliverError | {
"repo_name": "packet-tracker/onos",
"path": "openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/RoleManager.java",
"license": "apache-2.0",
"size": 16345
} | [
"org.onosproject.openflow.controller.RoleState",
"org.onosproject.openflow.controller.driver.RoleRecvStatus",
"org.onosproject.openflow.controller.driver.SwitchStateException",
"org.projectfloodlight.openflow.protocol.OFErrorMsg",
"org.projectfloodlight.openflow.protocol.OFErrorType",
"org.projectfloodlig... | import org.onosproject.openflow.controller.RoleState; import org.onosproject.openflow.controller.driver.RoleRecvStatus; import org.onosproject.openflow.controller.driver.SwitchStateException; import org.projectfloodlight.openflow.protocol.OFErrorMsg; import org.projectfloodlight.openflow.protocol.OFErrorType; import or... | import org.onosproject.openflow.controller.*; import org.onosproject.openflow.controller.driver.*; import org.projectfloodlight.openflow.protocol.*; import org.projectfloodlight.openflow.protocol.errormsg.*; | [
"org.onosproject.openflow",
"org.projectfloodlight.openflow"
] | org.onosproject.openflow; org.projectfloodlight.openflow; | 980,416 |
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
try {
UIManager.setLookAndFeel(info.getClassName());
break;
} catch (ClassNotFoundException e) {
System.err.p... | for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if (STR.equals(info.getName())) { try { UIManager.setLookAndFeel(info.getClassName()); break; } catch (ClassNotFoundException e) { System.err.println(STR); } catch (InstantiationException e) { System.err.println(STR); } catch (IllegalAccessException e)... | /**
* So far accepts one parameter containing logfile.
*
* @param args
* first parameter may contain path to logfile.
*/ | So far accepts one parameter containing logfile | main | {
"repo_name": "RomanKreisel/LogViewer",
"path": "src/main/java/de/romankreisel/LogViewer/LogViewer.java",
"license": "lgpl-2.1",
"size": 2236
} | [
"java.io.File",
"javax.swing.UIManager",
"javax.swing.UnsupportedLookAndFeelException"
] | import java.io.File; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; | import java.io.*; import javax.swing.*; | [
"java.io",
"javax.swing"
] | java.io; javax.swing; | 2,818,042 |
@Post
public Representation receiveRepresentation(Representation entity){
Form queryForm = new Form(entity);
String user = queryForm.getFirstValue("user");
String pass = queryForm.getFirstValue("pass");
String asGuest = queryForm.getFirstValue("guest");
if(asGues... | Representation function(Representation entity){ Form queryForm = new Form(entity); String user = queryForm.getFirstValue("user"); String pass = queryForm.getFirstValue("pass"); String asGuest = queryForm.getFirstValue("guest"); if(asGuest!=null){ log.debug(STR); user="guest"; pass="guest"; } String loginName = null; Se... | /**
* Try to validate a login and forward a GET to /web
* @param entity
* @return
*/ | Try to validate a login and forward a GET to /web | receiveRepresentation | {
"repo_name": "NCIP/annotation-and-image-markup",
"path": "ATS_1.1_src/src/edu/stanford/isis/ats/ui/LoginResource.java",
"license": "bsd-3-clause",
"size": 4920
} | [
"edu.stanford.isis.ats.security.SecurityStatus",
"edu.stanford.isis.ats.utils.ATSLoginUtil",
"edu.stanford.isis.ats.utils.FreemarkerUtil",
"java.util.HashMap",
"java.util.Map",
"java.util.Set",
"org.restlet.data.CookieSetting",
"org.restlet.data.Form",
"org.restlet.data.MediaType",
"org.restlet.re... | import edu.stanford.isis.ats.security.SecurityStatus; import edu.stanford.isis.ats.utils.ATSLoginUtil; import edu.stanford.isis.ats.utils.FreemarkerUtil; import java.util.HashMap; import java.util.Map; import java.util.Set; import org.restlet.data.CookieSetting; import org.restlet.data.Form; import org.restlet.data.Med... | import edu.stanford.isis.ats.security.*; import edu.stanford.isis.ats.utils.*; import java.util.*; import org.restlet.data.*; import org.restlet.representation.*; import org.restlet.util.*; | [
"edu.stanford.isis",
"java.util",
"org.restlet.data",
"org.restlet.representation",
"org.restlet.util"
] | edu.stanford.isis; java.util; org.restlet.data; org.restlet.representation; org.restlet.util; | 2,680,400 |
Manifest getManifest() throws IOException; | Manifest getManifest() throws IOException; | /**
* Return the plugin meta-data manifest
*
* @return Manifest of the plugin or null if plugin has no meta-data
* @throws IOException if an I/O problem occurred whilst accessing the Manifest
*/ | Return the plugin meta-data manifest | getManifest | {
"repo_name": "Team-OctOS/host_gerrit",
"path": "gerrit-server/src/main/java/com/google/gerrit/server/plugins/PluginContentScanner.java",
"license": "apache-2.0",
"size": 4183
} | [
"java.io.IOException",
"java.util.jar.Manifest"
] | import java.io.IOException; import java.util.jar.Manifest; | import java.io.*; import java.util.jar.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,050,039 |
if (!started) {
baseElapsedMs = SystemClock.elapsedRealtime();
started = true;
}
} | if (!started) { baseElapsedMs = SystemClock.elapsedRealtime(); started = true; } } | /**
* Starts the clock. Does nothing if the clock is already started.
*/ | Starts the clock. Does nothing if the clock is already started | start | {
"repo_name": "JasonFengHot/ExoPlayerSource",
"path": "library/core/src/main/java/com/google/android/exoplayer2/util/StandaloneMediaClock.java",
"license": "apache-2.0",
"size": 3078
} | [
"android.os.SystemClock"
] | import android.os.SystemClock; | import android.os.*; | [
"android.os"
] | android.os; | 1,775,751 |
@Transactional(readOnly = true)
public AllocationDTO findOne(Long id) {
log.debug("Request to get Allocation : {}", id);
Allocation allocation = allocationRepository.findOne(id);
AllocationDTO allocationDTO = allocationMapper.allocationToAllocationDTO(allocation);
return allocat... | @Transactional(readOnly = true) AllocationDTO function(Long id) { log.debug(STR, id); Allocation allocation = allocationRepository.findOne(id); AllocationDTO allocationDTO = allocationMapper.allocationToAllocationDTO(allocation); return allocationDTO; } | /**
* get one allocation by id.
* @return the entity
*/ | get one allocation by id | findOne | {
"repo_name": "sandor-balazs/nosql-java",
"path": "oracle/src/main/java/com/github/sandor_balazs/nosql_java/service/impl/AllocationServiceImpl.java",
"license": "bsd-2-clause",
"size": 2641
} | [
"com.github.sandor_balazs.nosql_java.domain.Allocation",
"com.github.sandor_balazs.nosql_java.web.rest.dto.AllocationDTO",
"org.springframework.transaction.annotation.Transactional"
] | import com.github.sandor_balazs.nosql_java.domain.Allocation; import com.github.sandor_balazs.nosql_java.web.rest.dto.AllocationDTO; import org.springframework.transaction.annotation.Transactional; | import com.github.sandor_balazs.nosql_java.domain.*; import com.github.sandor_balazs.nosql_java.web.rest.dto.*; import org.springframework.transaction.annotation.*; | [
"com.github.sandor_balazs",
"org.springframework.transaction"
] | com.github.sandor_balazs; org.springframework.transaction; | 2,137,430 |
private void instantiateChildStores()
{
relTypeStore = new RelationshipTypeStore( getStorageFileName()
+ ".relationshiptypestore.db", getConfig(), IdType.RELATIONSHIP_TYPE );
propStore = new PropertyStore( getStorageFileName()
+ ".propertystore.db", getConfig() );
relStor... | void function() { relTypeStore = new RelationshipTypeStore( getStorageFileName() + STR, getConfig(), IdType.RELATIONSHIP_TYPE ); propStore = new PropertyStore( getStorageFileName() + STR, getConfig() ); relStore = new RelationshipStore( getStorageFileName() + STR, getConfig() ); nodeStore = new NodeStore( getStorageFil... | /**
* Initializes the node,relationship,property and relationship type stores.
*/ | Initializes the node,relationship,property and relationship type stores | instantiateChildStores | {
"repo_name": "neo4j-contrib/neo4j-mobile-android",
"path": "neo4j-android/kernel-src/org/neo4j/kernel/impl/nioneo/store/NeoStore.java",
"license": "gpl-3.0",
"size": 14457
} | [
"org.neo4j.kernel.IdType"
] | import org.neo4j.kernel.IdType; | import org.neo4j.kernel.*; | [
"org.neo4j.kernel"
] | org.neo4j.kernel; | 565,071 |
@Override
public boolean equals( Object arg0 )
{
if ( arg0 instanceof PwsTimeField )
{
return equals( (PwsTimeField) arg0 );
}
else if ( arg0 instanceof Date )
{
return equals( (Date) arg0 );
}
throw new ClassCastException();
} | boolean function( Object arg0 ) { if ( arg0 instanceof PwsTimeField ) { return equals( (PwsTimeField) arg0 ); } else if ( arg0 instanceof Date ) { return equals( (Date) arg0 ); } throw new ClassCastException(); } | /**
* Compares this object to another <code>PwsTimeField</code> or <code>java.util.Date</code> returning
* <code>true</code> if they're equal or <code>false</code> otherwise.
*
* @param arg0 the other object to compare to.
*
* @return <code>true</code> if they're equal or <code>false</code> otherwise.
*... | Compares this object to another <code>PwsTimeField</code> or <code>java.util.Date</code> returning <code>true</code> if they're equal or <code>false</code> otherwise | equals | {
"repo_name": "tml/passwdsafe-code",
"path": "src/org/pwsafe/lib/file/PwsTimeField.java",
"license": "artistic-2.0",
"size": 3943
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,015,809 |
public Set<Student> getAllValuesOfS2() {
return rawAccumulateAllValuesOfS2(emptyArray());
} | Set<Student> function() { return rawAccumulateAllValuesOfS2(emptyArray()); } | /**
* Retrieve the set of values that occur in matches for S2.
* @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
*
*/ | Retrieve the set of values that occur in matches for S2 | getAllValuesOfS2 | {
"repo_name": "FTSRG/mondo-collab-framework",
"path": "archive/mondo-property-based-locking/org.mondo.collaboration.client/src-gen/org/mondo/collaboration/client/incquery/FriendlyToMatcher.java",
"license": "epl-1.0",
"size": 12825
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 582,742 |
public List<SelectItem> getAllCategoriesForFilter(){
List<SelectItem> categories = getAllCategories();
return categories;
}
| List<SelectItem> function(){ List<SelectItem> categories = getAllCategories(); return categories; } | /**
* UI method to get list of categories for the filter
* First item has null value to signal that it is all categories
*
* @return list of categories
*/ | UI method to get list of categories for the filter First item has null value to signal that it is all categories | getAllCategoriesForFilter | {
"repo_name": "noondaysun/sakai",
"path": "signup/tool/src/java/org/sakaiproject/signup/tool/jsf/SignupMeetingsBean.java",
"license": "apache-2.0",
"size": 34804
} | [
"java.util.List",
"javax.faces.model.SelectItem"
] | import java.util.List; import javax.faces.model.SelectItem; | import java.util.*; import javax.faces.model.*; | [
"java.util",
"javax.faces"
] | java.util; javax.faces; | 827,384 |
protected void releaseExecute(final MavenSession session,
final RTRComponents components) throws MavenExecutionException {
this.releaseEnvironment.setSettings(session.getSettings());
final List<MavenProject> reactor = session.getProjects();
// Execute the release steps.
try {
this.runPhase... | void function(final MavenSession session, final RTRComponents components) throws MavenExecutionException { this.releaseEnvironment.setSettings(session.getSettings()); final List<MavenProject> reactor = session.getProjects(); try { this.runPhases(reactor, this.getReleasePhases()); } catch (final MavenExecutionException ... | /**
* Step logic that is executed if a release was requested.
*
* @param session
* the session to which this step applies. Not null.
* @param components
* that this step may need. May be null.
* @throws MavenExecutionException
* if any unrecoverable error occurs.
*... | Step logic that is executed if a release was requested | releaseExecute | {
"repo_name": "rjenkinsjr/smart-reactor-maven-extension",
"path": "src/main/java/info/ronjenkins/maven/rtr/steps/release/AbstractSmartReactorReleaseStep.java",
"license": "apache-2.0",
"size": 6096
} | [
"info.ronjenkins.maven.rtr.RTRComponents",
"java.util.List",
"org.apache.maven.MavenExecutionException",
"org.apache.maven.execution.MavenSession",
"org.apache.maven.project.MavenProject"
] | import info.ronjenkins.maven.rtr.RTRComponents; import java.util.List; import org.apache.maven.MavenExecutionException; import org.apache.maven.execution.MavenSession; import org.apache.maven.project.MavenProject; | import info.ronjenkins.maven.rtr.*; import java.util.*; import org.apache.maven.*; import org.apache.maven.execution.*; import org.apache.maven.project.*; | [
"info.ronjenkins.maven",
"java.util",
"org.apache.maven"
] | info.ronjenkins.maven; java.util; org.apache.maven; | 707,048 |
public AccountSasParameters withSharedAccessStartTime(DateTime sharedAccessStartTime) {
this.sharedAccessStartTime = sharedAccessStartTime;
return this;
} | AccountSasParameters function(DateTime sharedAccessStartTime) { this.sharedAccessStartTime = sharedAccessStartTime; return this; } | /**
* Set the sharedAccessStartTime value.
*
* @param sharedAccessStartTime the sharedAccessStartTime value to set
* @return the AccountSasParameters object itself.
*/ | Set the sharedAccessStartTime value | withSharedAccessStartTime | {
"repo_name": "hovsepm/azure-sdk-for-java",
"path": "storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/AccountSasParameters.java",
"license": "mit",
"size": 6567
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 1,145,337 |
@Override
public Adapter createDefaultEndPointOutputConnectorAdapter() {
if (defaultEndPointOutputConnectorItemProvider == null) {
defaultEndPointOutputConnectorItemProvider = new DefaultEndPointOutputConnectorItemProvider(this);
}
return defaultEndPointOutputConnectorItemProvider;
}
protected DropMedi... | Adapter function() { if (defaultEndPointOutputConnectorItemProvider == null) { defaultEndPointOutputConnectorItemProvider = new DefaultEndPointOutputConnectorItemProvider(this); } return defaultEndPointOutputConnectorItemProvider; } protected DropMediatorItemProvider dropMediatorItemProvider; | /**
* This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.DefaultEndPointOutputConnector}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.DefaultEndPointOutputConnector</code>. | createDefaultEndPointOutputConnectorAdapter | {
"repo_name": "rajeevanv89/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 286852
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,344,618 |
private void startProcessing(final Type eventType, final TopologyCapabilities newCaps) {
logger.debug("Starting job processing...");
// create new capabilities and update view
this.topologyCapabilities = newCaps;
// before we propagate the new topology we do some maintenance
... | void function(final Type eventType, final TopologyCapabilities newCaps) { logger.debug(STR); this.topologyCapabilities = newCaps; if ( eventType == Type.TOPOLOGY_INIT ) { final UpgradeTask task = new UpgradeTask(this); task.run(); final FindUnfinishedJobsTask rt = new FindUnfinishedJobsTask(this); rt.run(); final Check... | /**
* Start processing
* @param eventType The event type
* @param newCaps The new capabilities
*/ | Start processing | startProcessing | {
"repo_name": "tmaret/sling",
"path": "bundles/extensions/event/resource/src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java",
"license": "apache-2.0",
"size": 23504
} | [
"java.util.Timer",
"java.util.TimerTask",
"org.apache.sling.discovery.TopologyEvent",
"org.apache.sling.event.impl.jobs.tasks.CheckTopologyTask",
"org.apache.sling.event.impl.jobs.tasks.FindUnfinishedJobsTask",
"org.apache.sling.event.impl.jobs.tasks.UpgradeTask"
] | import java.util.Timer; import java.util.TimerTask; import org.apache.sling.discovery.TopologyEvent; import org.apache.sling.event.impl.jobs.tasks.CheckTopologyTask; import org.apache.sling.event.impl.jobs.tasks.FindUnfinishedJobsTask; import org.apache.sling.event.impl.jobs.tasks.UpgradeTask; | import java.util.*; import org.apache.sling.discovery.*; import org.apache.sling.event.impl.jobs.tasks.*; | [
"java.util",
"org.apache.sling"
] | java.util; org.apache.sling; | 1,674,048 |
public H2FeatureService getSchaOffen() {
return schaOffen;
} | H2FeatureService function() { return schaOffen; } | /**
* DOCUMENT ME!
*
* @return the schaOffen
*/ | DOCUMENT ME | getSchaOffen | {
"repo_name": "cismet/watergis-client",
"path": "src/main/java/de/cismet/watergis/gui/actions/checks/BauwerkeCheckAction.java",
"license": "lgpl-3.0",
"size": 182528
} | [
"de.cismet.cismap.commons.featureservice.H2FeatureService"
] | import de.cismet.cismap.commons.featureservice.H2FeatureService; | import de.cismet.cismap.commons.featureservice.*; | [
"de.cismet.cismap"
] | de.cismet.cismap; | 1,374,694 |
@NonNull
@RestrictTo(Scope.LIBRARY_GROUP)
@Override
public Builder setDefaultResolution(@NonNull Size resolution) {
getMutableConfig().insertOption(ImageOutputConfig.OPTION_DEFAULT_RESOLUTION,
resolution);
return this;
} | @RestrictTo(Scope.LIBRARY_GROUP) Builder function(@NonNull Size resolution) { getMutableConfig().insertOption(ImageOutputConfig.OPTION_DEFAULT_RESOLUTION, resolution); return this; } | /**
* Sets the default resolution of the intended target from this configuration.
*
* @param resolution The default resolution to choose from supported output sizes list.
* @return The current Builder.
* @hide
*/ | Sets the default resolution of the intended target from this configuration | setDefaultResolution | {
"repo_name": "AndroidX/androidx",
"path": "camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java",
"license": "apache-2.0",
"size": 118170
} | [
"android.util.Size",
"androidx.annotation.NonNull",
"androidx.annotation.RestrictTo",
"androidx.camera.core.impl.ImageOutputConfig"
] | import android.util.Size; import androidx.annotation.NonNull; import androidx.annotation.RestrictTo; import androidx.camera.core.impl.ImageOutputConfig; | import android.util.*; import androidx.annotation.*; import androidx.camera.core.impl.*; | [
"android.util",
"androidx.annotation",
"androidx.camera"
] | android.util; androidx.annotation; androidx.camera; | 999,381 |
@Test
public final void testCreateTXSMSPacketValidDataNotNull() {
// Set up the resources for the test.
int expectedLength = 1 + 1 + 1 + 20 + data.length();
// Call the method under test.
TXSMSPacket packet = new TXSMSPacket(frameID, phoneNumber, data);
// Verify the result.
assertThat("Returned l... | final void function() { int expectedLength = 1 + 1 + 1 + 20 + data.length(); TXSMSPacket packet = new TXSMSPacket(frameID, phoneNumber, data); assertThat(STR, packet.getPacketLength(), is(equalTo(expectedLength))); assertThat(STR, packet.getFrameID(), is(equalTo(frameID))); assertThat(STR, packet.getPhoneNumberByteArra... | /**
* Test method for {@link com.digi.xbee.api.packet.cellular.TXSMSPacket#TXSMSPacket(int, int, String, byte[])}.
*
* <p>Construct a new TX SMS packet with data.</p>
*/ | Test method for <code>com.digi.xbee.api.packet.cellular.TXSMSPacket#TXSMSPacket(int, int, String, byte[])</code>. Construct a new TX SMS packet with data | testCreateTXSMSPacketValidDataNotNull | {
"repo_name": "digidotcom/XBeeJavaLibrary",
"path": "library/src/test/java/com/digi/xbee/api/packet/cellular/TXSMSPacketTest.java",
"license": "mpl-2.0",
"size": 24211
} | [
"com.digi.xbee.api.packet.cellular.TXSMSPacket",
"java.util.Arrays",
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import com.digi.xbee.api.packet.cellular.TXSMSPacket; import java.util.Arrays; import org.hamcrest.core.Is; import org.junit.Assert; | import com.digi.xbee.api.packet.cellular.*; import java.util.*; import org.hamcrest.core.*; import org.junit.*; | [
"com.digi.xbee",
"java.util",
"org.hamcrest.core",
"org.junit"
] | com.digi.xbee; java.util; org.hamcrest.core; org.junit; | 2,228,505 |
private Long runUnixMXBeanMethod (String mBeanMethodName) {
Object unixos;
Class<?> classRef;
Method mBeanMethod;
try {
classRef = Class.forName("com.sun.management.UnixOperatingSystemMXBean");
if (classRef.isInstance(osMbean)) {
mBeanMethod = classRef.getMethod(mBeanMethodName,... | Long function (String mBeanMethodName) { Object unixos; Class<?> classRef; Method mBeanMethod; try { classRef = Class.forName(STR); if (classRef.isInstance(osMbean)) { mBeanMethod = classRef.getMethod(mBeanMethodName, new Class[0]); unixos = classRef.cast(osMbean); return (Long)mBeanMethod.invoke(unixos); } } catch(Exc... | /**
* Load the implementation of UnixOperatingSystemMXBean for Oracle jvm
* and runs the desired method.
* @param mBeanMethodName : method to run from the interface UnixOperatingSystemMXBean
* @return the method result
*/ | Load the implementation of UnixOperatingSystemMXBean for Oracle jvm and runs the desired method | runUnixMXBeanMethod | {
"repo_name": "mapleez/ezy",
"path": "commonutils/src/main/java/com/dt/ez/common/utils/JVM.java",
"license": "apache-2.0",
"size": 7025
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,530,177 |
public static ExpectedCondition<List<WebElement>> numberOfElementsToBeMoreThan(final By locator,
final Integer number) {
return new ExpectedCondition<List<WebElement>>() {
private Integer currentNumber = 0; | static ExpectedCondition<List<WebElement>> function(final By locator, final Integer number) { return new ExpectedCondition<List<WebElement>>() { private Integer currentNumber = 0; | /**
* An expectation for checking number of WebElements with given locator being more than defined number
*
* @param locator used to find the element
* @param number used to define minimum number of elements
* @return Boolean true when size of elements list is more than defined
*/ | An expectation for checking number of WebElements with given locator being more than defined number | numberOfElementsToBeMoreThan | {
"repo_name": "asolntsev/selenium",
"path": "java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java",
"license": "apache-2.0",
"size": 49871
} | [
"java.util.List",
"org.openqa.selenium.By",
"org.openqa.selenium.WebElement"
] | import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; | import java.util.*; import org.openqa.selenium.*; | [
"java.util",
"org.openqa.selenium"
] | java.util; org.openqa.selenium; | 2,311,608 |
public Reader getCharacterStream() throws SQLException {
return getCharacterStream(1, Long.MAX_VALUE);
} | Reader function() throws SQLException { return getCharacterStream(1, Long.MAX_VALUE); } | /**
* Retrieves the <code>CLOB</code> value designated by this <code>Clob</code>
* object as a <code>java.io.Reader</code> object (or as a stream of
* characters).
*
* @return a <code>java.io.Reader</code> object containing the
* <code>CLOB</code> data
* @exception SQLExceptio... | Retrieves the <code>CLOB</code> value designated by this <code>Clob</code> object as a <code>java.io.Reader</code> object (or as a stream of characters) | getCharacterStream | {
"repo_name": "Julien35/dev-courses",
"path": "tutoriel-spring-mvc/lib/hsqldb/src/org/hsqldb/jdbc/JDBCClobFile.java",
"license": "mit",
"size": 41406
} | [
"java.io.Reader",
"java.sql.SQLException"
] | import java.io.Reader; import java.sql.SQLException; | import java.io.*; import java.sql.*; | [
"java.io",
"java.sql"
] | java.io; java.sql; | 524,341 |
public ExpressionValue getVariable(final int i) {
return this.variables.get(i);
} | ExpressionValue function(final int i) { return this.variables.get(i); } | /**
* Get a variable value by index.
* <p/>
* @param i
* The index of the variable we are using.
* <p/>
* @return The variable at the specified index.
*/ | Get a variable value by index. | getVariable | {
"repo_name": "ladygagapowerbot/bachelor-thesis-implementation",
"path": "lib/Encog/src/main/java/org/encog/ml/prg/EncogProgramVariables.java",
"license": "mit",
"size": 5927
} | [
"org.encog.ml.prg.expvalue.ExpressionValue"
] | import org.encog.ml.prg.expvalue.ExpressionValue; | import org.encog.ml.prg.expvalue.*; | [
"org.encog.ml"
] | org.encog.ml; | 2,442,530 |
public static void saveToPreferences(UploadStrategy strategy) {
Main.pref.put("osm-server.upload-strategy", strategy.getPreferenceValue());
} | static void function(UploadStrategy strategy) { Main.pref.put(STR, strategy.getPreferenceValue()); } | /**
* Saves the upload strategy <code>strategy</code> to the preferences.
*
* @param strategy the strategy to save
*/ | Saves the upload strategy <code>strategy</code> to the preferences | saveToPreferences | {
"repo_name": "CURocketry/Ground_Station_GUI",
"path": "src/org/openstreetmap/josm/gui/io/UploadStrategy.java",
"license": "gpl-3.0",
"size": 3597
} | [
"org.openstreetmap.josm.Main"
] | import org.openstreetmap.josm.Main; | import org.openstreetmap.josm.*; | [
"org.openstreetmap.josm"
] | org.openstreetmap.josm; | 344,664 |
public PointValuePair optimize(int maxEval,
FUNC f,
GoalType goalType,
OptimizationData... optData) {
return optimizeInternal(maxEval, f, goalType, optData);
}
/**
* Optimize an objective f... | PointValuePair function(int maxEval, FUNC f, GoalType goalType, OptimizationData... optData) { return optimizeInternal(maxEval, f, goalType, optData); } /** * Optimize an objective function. * * @param f Objective function. * @param goalType Type of optimization goal: either * {@link GoalType#MAXIMIZE} or {@link GoalTy... | /**
* Optimize an objective function.
*
* @param maxEval Allowed number of evaluations of the objective function.
* @param f Objective function.
* @param goalType Optimization type.
* @param optData Optimization data. The following data will be looked for:
* <ul>
* <li>{@link In... | Optimize an objective function | optimize | {
"repo_name": "tbepler/seq-svm",
"path": "src/org/apache/commons/math3/optimization/direct/BaseAbstractMultivariateOptimizer.java",
"license": "mit",
"size": 11611
} | [
"org.apache.commons.math3.analysis.MultivariateFunction",
"org.apache.commons.math3.exception.DimensionMismatchException",
"org.apache.commons.math3.exception.TooManyEvaluationsException",
"org.apache.commons.math3.optimization.GoalType",
"org.apache.commons.math3.optimization.OptimizationData",
"org.apac... | import org.apache.commons.math3.analysis.MultivariateFunction; import org.apache.commons.math3.exception.DimensionMismatchException; import org.apache.commons.math3.exception.TooManyEvaluationsException; import org.apache.commons.math3.optimization.GoalType; import org.apache.commons.math3.optimization.OptimizationData... | import org.apache.commons.math3.analysis.*; import org.apache.commons.math3.exception.*; import org.apache.commons.math3.optimization.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,777,653 |
protected void put(InternalContextAdapter context, String key, Object value)
{
context.put(key, value);
} | void function(InternalContextAdapter context, String key, Object value) { context.put(key, value); } | /**
* Extension hook to allow subclasses to control whether loop vars
* are set locally or not. So, those in favor of VELOCITY-285, can
* make that happen easily by overriding this and having it use
* context.localPut(k,v). See VELOCITY-630 for more on this.
*/ | Extension hook to allow subclasses to control whether loop vars are set locally or not. So, those in favor of VELOCITY-285, can make that happen easily by overriding this and having it use context.localPut(k,v). See VELOCITY-630 for more on this | put | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/org/apache/velocity/runtime/directive/Foreach.java",
"license": "gpl-3.0",
"size": 16258
} | [
"org.apache.velocity.context.InternalContextAdapter"
] | import org.apache.velocity.context.InternalContextAdapter; | import org.apache.velocity.context.*; | [
"org.apache.velocity"
] | org.apache.velocity; | 2,042,505 |
public void onApplicationEvent(ApplicationEvent event) {
dispatchEvent(event);
} | void function(ApplicationEvent event) { dispatchEvent(event); } | /**
* Spring executes this method with the event object. This method iterates
* though the list of registered Listeners and checks whether any listener
* can handle the event. Calls handle method of the Listener if it can
* handle the event.
*
* @param event
* the event
*/ | Spring executes this method with the event object. This method iterates though the list of registered Listeners and checks whether any listener can handle the event. Calls handle method of the Listener if it can handle the event | onApplicationEvent | {
"repo_name": "OBHITA/Consent2Share",
"path": "DS4P/consent2share/infrastructure/src/main/java/gov/samhsa/consent2share/infrastructure/eventlistener/EventService.java",
"license": "bsd-3-clause",
"size": 1474
} | [
"org.springframework.context.ApplicationEvent"
] | import org.springframework.context.ApplicationEvent; | import org.springframework.context.*; | [
"org.springframework.context"
] | org.springframework.context; | 193,932 |
public void onViewLinkedClicked(@NonNull View itemView, @Nullable Model model, @NonNull LinkProperty link)
{
} | void function(@NonNull View itemView, @Nullable Model model, @NonNull LinkProperty link) { } | /**
* Called when a view is clicked with a link
*
* @param itemView The view that was clicked
* @param model The model attached to the view
* @param link The link that was actioned
*/ | Called when a view is clicked with a link | onViewLinkedClicked | {
"repo_name": "3sidedcube/Android-LightningUi",
"path": "library/src/main/java/com/cube/storm/ui/lib/EventHook.java",
"license": "apache-2.0",
"size": 1607
} | [
"android.view.View",
"androidx.annotation.NonNull",
"androidx.annotation.Nullable",
"com.cube.storm.ui.model.Model",
"com.cube.storm.ui.model.property.LinkProperty"
] | import android.view.View; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.cube.storm.ui.model.Model; import com.cube.storm.ui.model.property.LinkProperty; | import android.view.*; import androidx.annotation.*; import com.cube.storm.ui.model.*; import com.cube.storm.ui.model.property.*; | [
"android.view",
"androidx.annotation",
"com.cube.storm"
] | android.view; androidx.annotation; com.cube.storm; | 2,818,129 |
protected void addValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
... | void function(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), DsPackage.Literals.HAS_HEADER__VALUE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMA... | /**
* This adds a property descriptor for the Value feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/ | This adds a property descriptor for the Value feature. | addValuePropertyDescriptor | {
"repo_name": "chanakaudaya/developer-studio",
"path": "data-services/org.wso2.developerstudio.eclipse.ds.edit/src/org/wso2/developerstudio/eclipse/ds/provider/HasHeaderItemProvider.java",
"license": "apache-2.0",
"size": 5639
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.wso2.developerstudio.eclipse.ds.DsPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.wso2.developerstudio.eclipse.ds.DsPackage; | import org.eclipse.emf.edit.provider.*; import org.wso2.developerstudio.eclipse.ds.*; | [
"org.eclipse.emf",
"org.wso2.developerstudio"
] | org.eclipse.emf; org.wso2.developerstudio; | 165,157 |
@Bound
public static Vector2 toRel(Vector2 pos, float baseAngle, Vector2 basePos) {
Vector2 v = getVec();
toRel(pos, v, baseAngle, basePos);
return v;
} | static Vector2 function(Vector2 pos, float baseAngle, Vector2 basePos) { Vector2 v = getVec(); toRel(pos, v, baseAngle, basePos); return v; } | /**
* converts pos (a position in an absolute coordinate system) to the position in the relative system of coordinates (defined by baseAngle and basePos)
*/ | converts pos (a position in an absolute coordinate system) to the position in the relative system of coordinates (defined by baseAngle and basePos) | toRel | {
"repo_name": "askneller/DestinationSol",
"path": "main/src/org/destinationsol/common/SolMath.java",
"license": "apache-2.0",
"size": 13331
} | [
"com.badlogic.gdx.math.Vector2"
] | import com.badlogic.gdx.math.Vector2; | import com.badlogic.gdx.math.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 1,052,055 |
public void unlockScreen(){
if(config.commandLogging){
Log.d(config.commandLoggingTag, "unlockScreen()");
}
| void function(){ if(config.commandLogging){ Log.d(config.commandLoggingTag, STR); } | /**
* Unlocks the lock screen.
*/ | Unlocks the lock screen | unlockScreen | {
"repo_name": "IfengAutomation/test_agent_android",
"path": "app/src/androidTest/java/com/robotium/solo/Solo.java",
"license": "apache-2.0",
"size": 134036
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,675,970 |
public static boolean promotePlayer(String playername) throws NotSerializableException, SQLException, IOException {
return GroupActions.promote(playername);
} | static boolean function(String playername) throws NotSerializableException, SQLException, IOException { return GroupActions.promote(playername); } | /**
* Promote a player
*
* @param playername
* name of the player to promote
* @return if successful
*/ | Promote a player | promotePlayer | {
"repo_name": "hypereddie/GGS-Plugin-Pack",
"path": "src/com/ep/ggs/groupmanager/API/GroupManagerAPI.java",
"license": "gpl-3.0",
"size": 4527
} | [
"com.ep.ggs.groupmanager.main.GroupActions",
"java.io.IOException",
"java.io.NotSerializableException",
"java.sql.SQLException"
] | import com.ep.ggs.groupmanager.main.GroupActions; import java.io.IOException; import java.io.NotSerializableException; import java.sql.SQLException; | import com.ep.ggs.groupmanager.main.*; import java.io.*; import java.sql.*; | [
"com.ep.ggs",
"java.io",
"java.sql"
] | com.ep.ggs; java.io; java.sql; | 215,355 |
default HasAndroidSettings configuratorSetActionAcknowledgmentTimeout(Duration timeout) {
return (HasAndroidSettings) setSetting(Setting.WAIT_ACTION_ACKNOWLEDGMENT_TIMEOUT, timeout.toMillis());
} | default HasAndroidSettings configuratorSetActionAcknowledgmentTimeout(Duration timeout) { return (HasAndroidSettings) setSetting(Setting.WAIT_ACTION_ACKNOWLEDGMENT_TIMEOUT, timeout.toMillis()); } | /**
* invoke {@code setActionAcknowledgmentTimeout} in {@code com.android.uiautomator.core.Configurator}.
*
* @param timeout A negative value would reset to its default value. Minimum time unit
* resolution is one millisecond
* @return self instance for chaining
*/ | invoke setActionAcknowledgmentTimeout in com.android.uiautomator.core.Configurator | configuratorSetActionAcknowledgmentTimeout | {
"repo_name": "appium/java-client",
"path": "src/main/java/io/appium/java_client/android/HasAndroidSettings.java",
"license": "apache-2.0",
"size": 8038
} | [
"io.appium.java_client.Setting",
"java.time.Duration"
] | import io.appium.java_client.Setting; import java.time.Duration; | import io.appium.java_client.*; import java.time.*; | [
"io.appium.java_client",
"java.time"
] | io.appium.java_client; java.time; | 2,619,978 |
@Override
public TestSession getNewSession(Map<String, Object> requestedCapability) {
if (down) {
return null;
}
return super.getNewSession(requestedCapability);
} | TestSession function(Map<String, Object> requestedCapability) { if (down) { return null; } return super.getNewSession(requestedCapability); } | /**
* overwrites the session allocation to discard the proxy that are down.
*/ | overwrites the session allocation to discard the proxy that are down | getNewSession | {
"repo_name": "jknguyen/josephknguyen-selenium",
"path": "java/server/src/org/openqa/grid/selenium/proxy/DefaultRemoteProxy.java",
"license": "apache-2.0",
"size": 9951
} | [
"java.util.Map",
"org.openqa.grid.internal.TestSession"
] | import java.util.Map; import org.openqa.grid.internal.TestSession; | import java.util.*; import org.openqa.grid.internal.*; | [
"java.util",
"org.openqa.grid"
] | java.util; org.openqa.grid; | 2,711,913 |
public void register() {
// Variables
final int loggingLevel = RpgCore.getInstance().getPluginSettings().getLoggingLevel();
// Loop all plugins present.
for (final Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
// If this is an RpgPlugin
if (plugin instanceof RpgPlugin) {
// Tri... | void function() { final int loggingLevel = RpgCore.getInstance().getPluginSettings().getLoggingLevel(); for (final Plugin plugin : Bukkit.getPluginManager().getPlugins()) { if (plugin instanceof RpgPlugin) { try { ((RpgPlugin) plugin).registerRaces(); } catch (final Exception e) { if (loggingLevel >= 1) { log.warning(S... | /**
* Used to register types for this manager.
*
* @author HomieDion
* @since 1.0.0
*/ | Used to register types for this manager | register | {
"repo_name": "homiedion/RpgCore",
"path": "src/main/java/com/homiedion/rpgcore/container/race/RpgRaceManager.java",
"license": "mit",
"size": 2536
} | [
"com.homiedion.rpgcore.RpgCore",
"com.homiedion.rpgcore.RpgPlugin",
"org.bukkit.Bukkit",
"org.bukkit.plugin.Plugin"
] | import com.homiedion.rpgcore.RpgCore; import com.homiedion.rpgcore.RpgPlugin; import org.bukkit.Bukkit; import org.bukkit.plugin.Plugin; | import com.homiedion.rpgcore.*; import org.bukkit.*; import org.bukkit.plugin.*; | [
"com.homiedion.rpgcore",
"org.bukkit",
"org.bukkit.plugin"
] | com.homiedion.rpgcore; org.bukkit; org.bukkit.plugin; | 1,585,175 |
public String getEndDate() {
return AlmDateFormatter.getStandardDate(endDate);
} | String function() { return AlmDateFormatter.getStandardDate(endDate); } | /**
* Gets the scheduled end date for the release cycle
*
* @return The scheduled end date in the form "yyyy-MM-dd"
* @since 1.0.0
*/ | Gets the scheduled end date for the release cycle | getEndDate | {
"repo_name": "stevensimmons/restalm",
"path": "src/main/java/com/fissionworks/restalm/model/entity/management/ReleaseCycle.java",
"license": "apache-2.0",
"size": 9529
} | [
"com.fissionworks.restalm.commons.AlmDateFormatter"
] | import com.fissionworks.restalm.commons.AlmDateFormatter; | import com.fissionworks.restalm.commons.*; | [
"com.fissionworks.restalm"
] | com.fissionworks.restalm; | 527,930 |
@Override
protected void drawXLabels(List<Double> xLabels, Double[] xTextLabelLocations, Canvas canvas,
Paint paint, int left, int top, int bottom, double xPixelsPerUnit, double minX, double maxX) {
int length = xLabels.size();
if (length > 0) {
boolean showLabels = mRenderer.isShowLabels()... | void function(List<Double> xLabels, Double[] xTextLabelLocations, Canvas canvas, Paint paint, int left, int top, int bottom, double xPixelsPerUnit, double minX, double maxX) { int length = xLabels.size(); if (length > 0) { boolean showLabels = mRenderer.isShowLabels(); boolean showGridY = mRenderer.isShowGridY(); DateF... | /**
* The graphical representation of the labels on the X axis.
*
* @param xLabels the X labels values
* @param xTextLabelLocations the X text label locations
* @param canvas the canvas to paint to
* @param paint the paint to be used for drawing
* @param left the left value of the labels ar... | The graphical representation of the labels on the X axis | drawXLabels | {
"repo_name": "nasif/android-trade-chart",
"path": "src/org/achartengine/chart/TimeChart.java",
"license": "apache-2.0",
"size": 7529
} | [
"android.graphics.Canvas",
"android.graphics.Paint",
"java.text.DateFormat",
"java.util.Date",
"java.util.List"
] | import android.graphics.Canvas; import android.graphics.Paint; import java.text.DateFormat; import java.util.Date; import java.util.List; | import android.graphics.*; import java.text.*; import java.util.*; | [
"android.graphics",
"java.text",
"java.util"
] | android.graphics; java.text; java.util; | 2,037,998 |
public static Schema switchName(Schema schema, String newName) {
if(schema.getName().equals(newName)) {
return schema;
}
Schema newSchema = Schema.createRecord(newName, schema.getDoc(), schema.getNamespace(), schema.isError()); | static Schema function(Schema schema, String newName) { if(schema.getName().equals(newName)) { return schema; } Schema newSchema = Schema.createRecord(newName, schema.getDoc(), schema.getNamespace(), schema.isError()); | /**
* Copies the input {@link org.apache.avro.Schema} but changes the schema name.
* @param schema {@link org.apache.avro.Schema} to copy.
* @param newName name for the copied {@link org.apache.avro.Schema}.
* @return A {@link org.apache.avro.Schema} that is a copy of schema, but has the name newName.
*/ | Copies the input <code>org.apache.avro.Schema</code> but changes the schema name | switchName | {
"repo_name": "zyq001/GobblinParquet",
"path": "gobblin-utility/src/main/java/gobblin/util/AvroUtils.java",
"license": "apache-2.0",
"size": 16357
} | [
"org.apache.avro.Schema"
] | import org.apache.avro.Schema; | import org.apache.avro.*; | [
"org.apache.avro"
] | org.apache.avro; | 1,087,246 |
@Test
public void test4() {
List<Integer> nums = new ArrayList<>(asList(4, 8, 15, 16, 23, 42));
// * Object List.remove(int index): remove the item at the index specified and return it
nums.remove(4);
System.out.println(nums);
} | void function() { List<Integer> nums = new ArrayList<>(asList(4, 8, 15, 16, 23, 42)); nums.remove(4); System.out.println(nums); } | /**
* However, the second snippet invokes a different method.
*/ | However, the second snippet invokes a different method | test4 | {
"repo_name": "yuweijun/learning-programming",
"path": "language-java/src/test/java/com/example/lang/PrimitiveBoxedObject.java",
"license": "mit",
"size": 2892
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,834,275 |
@Metadata(description = "Allows to configure a custom value of the response buffer size on the Jetty connectors.")
public void setResponseBufferSize(Integer responseBufferSize) {
this.responseBufferSize = responseBufferSize;
} | @Metadata(description = STR) void function(Integer responseBufferSize) { this.responseBufferSize = responseBufferSize; } | /**
* Allows to configure a custom value of the response buffer size on the Jetty connectors.
*/ | Allows to configure a custom value of the response buffer size on the Jetty connectors | setResponseBufferSize | {
"repo_name": "NetNow/camel",
"path": "components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java",
"license": "apache-2.0",
"size": 56873
} | [
"org.apache.camel.spi.Metadata"
] | import org.apache.camel.spi.Metadata; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 335,529 |
private void showGlobalContextActionBar() {
ActionBar actionBar = getActionBar();
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
actionBar.setTitle(R.string.app_name);
} | void function() { ActionBar actionBar = getActionBar(); actionBar.setDisplayShowTitleEnabled(true); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setTitle(R.string.app_name); } | /**
* Per the navigation drawer design guidelines, updates the action bar to show the global app
* 'context', rather than just what's in the current screen.
*/ | Per the navigation drawer design guidelines, updates the action bar to show the global app 'context', rather than just what's in the current screen | showGlobalContextActionBar | {
"repo_name": "ArtemMy/CallRec",
"path": "app/src/main/java/com/artem/callrec/NavigationDrawerFragment.java",
"license": "gpl-3.0",
"size": 11967
} | [
"android.support.v7.app.ActionBar"
] | import android.support.v7.app.ActionBar; | import android.support.v7.app.*; | [
"android.support"
] | android.support; | 348,028 |
public SystemDiagnosticsDTO createSystemDiagnosticsDto(final SystemDiagnostics sysDiagnostics) {
final SystemDiagnosticsDTO dto = new SystemDiagnosticsDTO();
final SystemDiagnosticsSnapshotDTO snapshot = new SystemDiagnosticsSnapshotDTO();
dto.setAggregateSnapshot(snapshot);
snapsh... | SystemDiagnosticsDTO function(final SystemDiagnostics sysDiagnostics) { final SystemDiagnosticsDTO dto = new SystemDiagnosticsDTO(); final SystemDiagnosticsSnapshotDTO snapshot = new SystemDiagnosticsSnapshotDTO(); dto.setAggregateSnapshot(snapshot); snapshot.setStatsLastRefreshed(new Date(sysDiagnostics.getCreationTim... | /**
* Creates a SystemDiagnosticsDTO for the specified SystemDiagnostics.
*
* @param sysDiagnostics diags
* @return dto
*/ | Creates a SystemDiagnosticsDTO for the specified SystemDiagnostics | createSystemDiagnosticsDto | {
"repo_name": "jskora/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java",
"license": "apache-2.0",
"size": 226428
} | [
"java.util.Date",
"java.util.LinkedHashSet",
"java.util.Map",
"java.util.Set",
"java.util.concurrent.TimeUnit",
"org.apache.nifi.diagnostics.GarbageCollection",
"org.apache.nifi.diagnostics.StorageUsage",
"org.apache.nifi.diagnostics.SystemDiagnostics",
"org.apache.nifi.util.FormatUtils"
] | import java.util.Date; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; import org.apache.nifi.diagnostics.GarbageCollection; import org.apache.nifi.diagnostics.StorageUsage; import org.apache.nifi.diagnostics.SystemDiagnostics; import org.apache.nifi.uti... | import java.util.*; import java.util.concurrent.*; import org.apache.nifi.diagnostics.*; import org.apache.nifi.util.*; | [
"java.util",
"org.apache.nifi"
] | java.util; org.apache.nifi; | 56 |
LayeredBarRenderer r1 = new LayeredBarRenderer();
LayeredBarRenderer r2 = new LayeredBarRenderer();
assertEquals(r1, r2);
} | LayeredBarRenderer r1 = new LayeredBarRenderer(); LayeredBarRenderer r2 = new LayeredBarRenderer(); assertEquals(r1, r2); } | /**
* Check that the equals() method distinguishes all fields.
*/ | Check that the equals() method distinguishes all fields | testEquals | {
"repo_name": "akardapolov/ASH-Viewer",
"path": "jfreechart-fse/src/test/java/org/jfree/chart/renderer/category/LayeredBarRendererTest.java",
"license": "gpl-3.0",
"size": 5079
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,549,017 |
@Element( name = "COMMISSION", order = 60)
public Double getCommission() {
return commission;
} | @Element( name = STR, order = 60) Double function() { return commission; } | /**
* Gets the transaction commission for the sale. This is an optional field according to the
* OFX spec.
* @see "Section 13.9.2.4.3, OFX Spec"
*
* @return the transaction commision
*/ | Gets the transaction commission for the sale. This is an optional field according to the OFX spec | getCommission | {
"repo_name": "stoicflame/ofx4j",
"path": "src/main/java/com/webcohesion/ofx4j/domain/data/investment/transactions/SellInvestmentTransaction.java",
"license": "apache-2.0",
"size": 16738
} | [
"com.webcohesion.ofx4j.meta.Element"
] | import com.webcohesion.ofx4j.meta.Element; | import com.webcohesion.ofx4j.meta.*; | [
"com.webcohesion.ofx4j"
] | com.webcohesion.ofx4j; | 1,627,662 |
public static List<RoutingHop> getHopListForPredicateAndBox(
final DistributionRegion rootRegion, final Hyperrectangle boundingBox,
final List<BBoxDBInstance> knownInstances,
final Predicate<DistributionRegionState> statePredicate) {
final List<DistributionRegion> regions = getRegionsForPredicate(rootReg... | static List<RoutingHop> function( final DistributionRegion rootRegion, final Hyperrectangle boundingBox, final List<BBoxDBInstance> knownInstances, final Predicate<DistributionRegionState> statePredicate) { final List<DistributionRegion> regions = getRegionsForPredicate(rootRegion, boundingBox, statePredicate); final M... | /**
* Get a routing list for the given predicate
*
* @param rootRegion
* @param boundingBox
* @param systems
* @return
*/ | Get a routing list for the given predicate | getHopListForPredicateAndBox | {
"repo_name": "jnidzwetzki/scalephant",
"path": "bboxdb-server/src/main/java/org/bboxdb/network/routing/RoutingHopHelper.java",
"license": "apache-2.0",
"size": 5582
} | [
"java.net.InetSocketAddress",
"java.util.List",
"java.util.Map",
"java.util.function.Predicate",
"org.bboxdb.commons.math.Hyperrectangle",
"org.bboxdb.distribution.membership.BBoxDBInstance",
"org.bboxdb.distribution.partitioner.DistributionRegionState",
"org.bboxdb.distribution.region.DistributionReg... | import java.net.InetSocketAddress; import java.util.List; import java.util.Map; import java.util.function.Predicate; import org.bboxdb.commons.math.Hyperrectangle; import org.bboxdb.distribution.membership.BBoxDBInstance; import org.bboxdb.distribution.partitioner.DistributionRegionState; import org.bboxdb.distribution... | import java.net.*; import java.util.*; import java.util.function.*; import org.bboxdb.commons.math.*; import org.bboxdb.distribution.membership.*; import org.bboxdb.distribution.partitioner.*; import org.bboxdb.distribution.region.*; | [
"java.net",
"java.util",
"org.bboxdb.commons",
"org.bboxdb.distribution"
] | java.net; java.util; org.bboxdb.commons; org.bboxdb.distribution; | 734,072 |
@NotNull
@Override
public AbstractAISkeleton<JobFisherman> generateAI()
{
return new EntityAIWorkFisherman(this);
} | AbstractAISkeleton<JobFisherman> function() { return new EntityAIWorkFisherman(this); } | /**
* Generate your AI class to register.
*
* @return your personal AI instance.
*/ | Generate your AI class to register | generateAI | {
"repo_name": "xavierh/minecolonies",
"path": "src/main/java/com/minecolonies/coremod/colony/jobs/JobFisherman.java",
"license": "gpl-3.0",
"size": 5806
} | [
"com.minecolonies.coremod.entity.ai.basic.AbstractAISkeleton",
"com.minecolonies.coremod.entity.ai.citizen.fisherman.EntityAIWorkFisherman"
] | import com.minecolonies.coremod.entity.ai.basic.AbstractAISkeleton; import com.minecolonies.coremod.entity.ai.citizen.fisherman.EntityAIWorkFisherman; | import com.minecolonies.coremod.entity.ai.basic.*; import com.minecolonies.coremod.entity.ai.citizen.fisherman.*; | [
"com.minecolonies.coremod"
] | com.minecolonies.coremod; | 666,085 |
public Set<byte[]> getFamiliesKeys() {
return Collections.unmodifiableSet(this.families.keySet());
} | Set<byte[]> function() { return Collections.unmodifiableSet(this.families.keySet()); } | /**
* Returns all the column family names of the current table. The map of
* HTableDescriptor contains mapping of family name to HColumnDescriptors.
* This returns all the keys of the family map which represents the column
* family names of the table.
*
* @return Immutable sorted set of the keys of th... | Returns all the column family names of the current table. The map of HTableDescriptor contains mapping of family name to HColumnDescriptors. This returns all the keys of the family map which represents the column family names of the table | getFamiliesKeys | {
"repo_name": "cloud-software-foundation/c5",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java",
"license": "apache-2.0",
"size": 51834
} | [
"java.util.Collections",
"java.util.Set"
] | import java.util.Collections; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,983,865 |
public ItemStack[] getContainedItems(); | ItemStack[] function(); | /**
* Gets the inventory array. ForgeDirection.UNKOWN must return all sides
*/ | Gets the inventory array. ForgeDirection.UNKOWN must return all sides | getContainedItems | {
"repo_name": "FibonacciRedstone/Advanced_Unknowns_1.7.10",
"path": "src/main/java/resonant/api/tile/node/IExternalInventory.java",
"license": "lgpl-2.1",
"size": 469
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 1,799,043 |
@Override
public Object unmarshal(HierarchicalStreamReader reader,
UnmarshallingContext context) {
ExpressionTreeInterface constantNode = new ConstantNode();
reader.moveDown();
((ConstantNode) constantNode).setName(reader.getValue());
reader.moveUp()... | Object function(HierarchicalStreamReader reader, UnmarshallingContext context) { ExpressionTreeInterface constantNode = new ConstantNode(); reader.moveDown(); ((ConstantNode) constantNode).setName(reader.getValue()); reader.moveUp(); reader.moveDown(); String constant = reader.getValue(); if (constant.contains("e")) { ... | /**
* reads a <code>ConstantNode</code> from the XML file specified through
* <code>reader</code>
*
* @param reader stream to read through
* @param context <code>UnmarshallingContext</code> used to store generic
* data
* @return <code>ConstantNode</code> - <code>Consta... | reads a <code>ConstantNode</code> from the XML file specified through <code>reader</code> | unmarshal | {
"repo_name": "CIRDLES/Squid",
"path": "squidCore/src/main/java/org/cirdles/squid/tasks/expressions/constants/ConstantNodeXMLConverter.java",
"license": "apache-2.0",
"size": 6377
} | [
"com.thoughtworks.xstream.converters.UnmarshallingContext",
"com.thoughtworks.xstream.io.HierarchicalStreamReader",
"org.cirdles.squid.tasks.expressions.expressionTrees.ExpressionTreeInterface"
] | import com.thoughtworks.xstream.converters.UnmarshallingContext; import com.thoughtworks.xstream.io.HierarchicalStreamReader; import org.cirdles.squid.tasks.expressions.expressionTrees.ExpressionTreeInterface; | import com.thoughtworks.xstream.converters.*; import com.thoughtworks.xstream.io.*; import org.cirdles.squid.tasks.expressions.*; | [
"com.thoughtworks.xstream",
"org.cirdles.squid"
] | com.thoughtworks.xstream; org.cirdles.squid; | 1,242,963 |
void enterRuleAnnotationField(@NotNull XtendParser.RuleAnnotationFieldContext ctx);
void exitRuleAnnotationField(@NotNull XtendParser.RuleAnnotationFieldContext ctx); | void enterRuleAnnotationField(@NotNull XtendParser.RuleAnnotationFieldContext ctx); void exitRuleAnnotationField(@NotNull XtendParser.RuleAnnotationFieldContext ctx); | /**
* Exit a parse tree produced by {@link XtendParser#ruleAnnotationField}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>XtendParser#ruleAnnotationField</code> | exitRuleAnnotationField | {
"repo_name": "szarnekow/XtendParserGeneratorComparison",
"path": "antrl3_vs_antlr4/src/xtend/antlr4_2/XtendListener.java",
"license": "epl-1.0",
"size": 44107
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,197,783 |
public static QualityFeature<AbstractSequence<NucleotideCompound>, NucleotideCompound> createQualityScores(final Fastq fastq)
{
if (fastq == null)
{
throw new IllegalArgumentException("fastq must not be null");
}
QualityFeature<AbstractSequence<NucleotideCompound>, Nu... | static QualityFeature<AbstractSequence<NucleotideCompound>, NucleotideCompound> function(final Fastq fastq) { if (fastq == null) { throw new IllegalArgumentException(STR); } QualityFeature<AbstractSequence<NucleotideCompound>, NucleotideCompound> qualityScores = new QualityFeature<AbstractSequence<NucleotideCompound>, ... | /**
* Create and return a new {@link QualityFeature} from the quality scores of the specified
* FASTQ formatted sequence. The quality scores feature has a type <code>"qualityScores"</code>
* and will be the same length as the sequence.
*
* @param fastq FASTQ formatted sequence, must not be nul... | Create and return a new <code>QualityFeature</code> from the quality scores of the specified FASTQ formatted sequence. The quality scores feature has a type <code>"qualityScores"</code> and will be the same length as the sequence | createQualityScores | {
"repo_name": "JolantaWojcik/biojavaOwn",
"path": "biojava3-sequencing/src/main/java/org/biojava3/sequencing/io/fastq/FastqTools.java",
"license": "lgpl-2.1",
"size": 11793
} | [
"org.biojava3.core.sequence.compound.NucleotideCompound",
"org.biojava3.core.sequence.features.QualityFeature",
"org.biojava3.core.sequence.template.AbstractSequence"
] | import org.biojava3.core.sequence.compound.NucleotideCompound; import org.biojava3.core.sequence.features.QualityFeature; import org.biojava3.core.sequence.template.AbstractSequence; | import org.biojava3.core.sequence.compound.*; import org.biojava3.core.sequence.features.*; import org.biojava3.core.sequence.template.*; | [
"org.biojava3.core"
] | org.biojava3.core; | 1,708,678 |
public OverviewStats valuate(CucumberFeatureResult result) {
this.reset();
result.valuate();
this.addOverallDuration(result.getDuration());
if (result.getStatus().equals("passed")) {
this.addFeaturesPassed(1);
} else if (result.getStatus().equals("failed")) {
... | OverviewStats function(CucumberFeatureResult result) { this.reset(); result.valuate(); this.addOverallDuration(result.getDuration()); if (result.getStatus().equals(STR)) { this.addFeaturesPassed(1); } else if (result.getStatus().equals(STR)) { this.addFeaturesFailed(1); } else if (result.getStatus().equals("known")) { ... | /**
* Calculates run statistics for the single feature result.
* @param result the feature result data to calculate statistics for.
* @return the calculated statistics for the specific feature.
*/ | Calculates run statistics for the single feature result | valuate | {
"repo_name": "mkolisnyk/cucumber-reports",
"path": "cucumber-report-generator/src/main/java/com/github/mkolisnyk/cucumber/reporting/types/OverviewStats.java",
"license": "apache-2.0",
"size": 11155
} | [
"com.github.mkolisnyk.cucumber.reporting.types.result.CucumberFeatureResult",
"com.github.mkolisnyk.cucumber.reporting.types.result.CucumberScenarioResult"
] | import com.github.mkolisnyk.cucumber.reporting.types.result.CucumberFeatureResult; import com.github.mkolisnyk.cucumber.reporting.types.result.CucumberScenarioResult; | import com.github.mkolisnyk.cucumber.reporting.types.result.*; | [
"com.github.mkolisnyk"
] | com.github.mkolisnyk; | 498,471 |
File fXmlFile = new File(path.replaceAll("%20", " "));
if (!fXmlFile.exists()) {
throw new JRD3Exception("XML File not found at: " + path);
}
//InputStream inputStream= new FileInputStream(path);
//Reader reader = new InputStreamReader(inputStream,"UTF-8");
/... | File fXmlFile = new File(path.replaceAll("%20", " ")); if (!fXmlFile.exists()) { throw new JRD3Exception(STR + path); } DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); Document doc = null; try { DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); doc = dBuilder.parse(fXmlFile); } catch (... | /**
* Gets XML doc element.
*
* @param path The XML path.
* @return The doc element.
* @throws JRD3Exception
*/ | Gets XML doc element | getDocElement | {
"repo_name": "Ray1184/JRD3_Project",
"path": "JRD3_Engine/src/main/java/org/jrd3/engine/core/utils/XMLUtils.java",
"license": "apache-2.0",
"size": 1686
} | [
"java.io.File",
"java.io.IOException",
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.DocumentBuilderFactory",
"javax.xml.parsers.ParserConfigurationException",
"org.jrd3.engine.core.exceptions.JRD3Exception",
"org.w3c.dom.Document",
"org.xml.sax.SAXException"
] | import java.io.File; import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.jrd3.engine.core.exceptions.JRD3Exception; import org.w3c.dom.Document; import org.xml.sax.SAXException; | import java.io.*; import javax.xml.parsers.*; import org.jrd3.engine.core.exceptions.*; import org.w3c.dom.*; import org.xml.sax.*; | [
"java.io",
"javax.xml",
"org.jrd3.engine",
"org.w3c.dom",
"org.xml.sax"
] | java.io; javax.xml; org.jrd3.engine; org.w3c.dom; org.xml.sax; | 518,797 |
@Nonnull
public Matrix arrayLeftDivideEquals (@Nonnull final Matrix aMatrix)
{
_checkMatrixDimensions (aMatrix);
for (int nRow = 0; nRow < m_nRows; nRow++)
{
final double [] aSrcRow1 = aMatrix.m_aData[nRow];
final double [] aSrcRow2 = m_aData[nRow];
final double [] aDstRow = aSrcRow2... | Matrix function (@Nonnull final Matrix aMatrix) { _checkMatrixDimensions (aMatrix); for (int nRow = 0; nRow < m_nRows; nRow++) { final double [] aSrcRow1 = aMatrix.m_aData[nRow]; final double [] aSrcRow2 = m_aData[nRow]; final double [] aDstRow = aSrcRow2; for (int nCol = 0; nCol < m_nCols; nCol++) aDstRow[nCol] = aSrc... | /**
* Element-by-element left division in place, A = B.\A
*
* @param aMatrix
* another matrix
* @return this
*/ | Element-by-element left division in place, A = B.\A | arrayLeftDivideEquals | {
"repo_name": "phax/ph-commons",
"path": "ph-matrix/src/main/java/com/helger/matrix/Matrix.java",
"license": "apache-2.0",
"size": 40182
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,118,736 |
Tuple<String, Iterable<StorageObject>> list(String bucket, Map<Option, ?> options); | Tuple<String, Iterable<StorageObject>> list(String bucket, Map<Option, ?> options); | /**
* Lists the bucket's blobs.
*
* @throws StorageException upon failure
*/ | Lists the bucket's blobs | list | {
"repo_name": "shinfan/gcloud-java",
"path": "google-cloud-storage/src/main/java/com/google/cloud/storage/spi/v1/StorageRpc.java",
"license": "apache-2.0",
"size": 13064
} | [
"com.google.api.services.storage.model.StorageObject",
"com.google.cloud.Tuple",
"java.util.Map"
] | import com.google.api.services.storage.model.StorageObject; import com.google.cloud.Tuple; import java.util.Map; | import com.google.api.services.storage.model.*; import com.google.cloud.*; import java.util.*; | [
"com.google.api",
"com.google.cloud",
"java.util"
] | com.google.api; com.google.cloud; java.util; | 1,224,431 |
private void updateLastUpdateTime(SharedPreferences sharedPreferences) {
TextView textView = (TextView) mRootView.findViewById(R.id.last_update_textview);
if (textView != null) {
String updateTime = sharedPreferences.getString(getString(R.string.pref_last_update),
get... | void function(SharedPreferences sharedPreferences) { TextView textView = (TextView) mRootView.findViewById(R.id.last_update_textview); if (textView != null) { String updateTime = sharedPreferences.getString(getString(R.string.pref_last_update), getString(R.string.last_updated_never_key)); if (updateTime.equals(getStrin... | /**
* Updates text view that shows last update time.
*/ | Updates text view that shows last update time | updateLastUpdateTime | {
"repo_name": "mattwiduch/StockHawk",
"path": "app/src/main/java/com/sam_chordas/android/stockhawk/ui/MyStocksFragment.java",
"license": "apache-2.0",
"size": 23007
} | [
"android.content.SharedPreferences",
"android.widget.TextView",
"com.sam_chordas.android.stockhawk.rest.Utils"
] | import android.content.SharedPreferences; import android.widget.TextView; import com.sam_chordas.android.stockhawk.rest.Utils; | import android.content.*; import android.widget.*; import com.sam_chordas.android.stockhawk.rest.*; | [
"android.content",
"android.widget",
"com.sam_chordas.android"
] | android.content; android.widget; com.sam_chordas.android; | 1,128,862 |
Entry<K, V> remove(K key) {
CompletableFuture<Entry<K, V>> future;
Entry<K, V> entry = null;
try (ReleasableLock ignored = writeLock.acquire()) {
future = map.remove(key);
}
if (future != null) {
try {
... | Entry<K, V> remove(K key) { CompletableFuture<Entry<K, V>> future; Entry<K, V> entry = null; try (ReleasableLock ignored = writeLock.acquire()) { future = map.remove(key); } if (future != null) { try { entry = future.handle((ok, ex) -> { if (ok != null) { segmentStats.eviction(); return ok; } else { return null; } }).g... | /**
* remove an entry from the segment
*
* @param key the key of the entry to remove from the cache
* @return the removed entry if there was one, otherwise null
*/ | remove an entry from the segment | remove | {
"repo_name": "yanjunh/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/common/cache/Cache.java",
"license": "apache-2.0",
"size": 27260
} | [
"java.util.concurrent.CompletableFuture",
"java.util.concurrent.ExecutionException",
"java.util.concurrent.atomic.LongAdder",
"org.elasticsearch.common.util.concurrent.ReleasableLock"
] | import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.LongAdder; import org.elasticsearch.common.util.concurrent.ReleasableLock; | import java.util.concurrent.*; import java.util.concurrent.atomic.*; import org.elasticsearch.common.util.concurrent.*; | [
"java.util",
"org.elasticsearch.common"
] | java.util; org.elasticsearch.common; | 2,319,811 |
@ApiModelProperty(required = true, value = "Xero identifier for Liability Account")
public UUID getLiabilityAccountId() {
return liabilityAccountId;
} | @ApiModelProperty(required = true, value = STR) UUID function() { return liabilityAccountId; } | /**
* Xero identifier for Liability Account
*
* @return liabilityAccountId
*/ | Xero identifier for Liability Account | getLiabilityAccountId | {
"repo_name": "XeroAPI/Xero-Java",
"path": "src/main/java/com/xero/models/payrollnz/Deduction.java",
"license": "mit",
"size": 8675
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 522,554 |
public static String getHostName() {
String host = "localhost";
try {
host = InetAddress.getLocalHost().getHostName();
} catch (UnknownHostException e) {
// Ignore the error
}
return host;
} | static String function() { String host = STR; try { host = InetAddress.getLocalHost().getHostName(); } catch (UnknownHostException e) { } return host; } | /**
* Return host name if possible.
*
* @return Host Name or localhost
*/ | Return host name if possible | getHostName | {
"repo_name": "xiao-chen/hadoop",
"path": "hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/web/utils/OzoneUtils.java",
"license": "apache-2.0",
"size": 6893
} | [
"java.net.InetAddress",
"java.net.UnknownHostException"
] | import java.net.InetAddress; import java.net.UnknownHostException; | import java.net.*; | [
"java.net"
] | java.net; | 80,601 |
public HashMap<String, CloudProviderType> getCloudProviders_hashMap() {
HashMap<String, CloudProviderType> res = new HashMap<>();
List<Object> objList = this.resources.getSharedDiskOrDataNodeOrComputeNode();
if (objList != null) {
for (Object obj : objList) {
if (... | HashMap<String, CloudProviderType> function() { HashMap<String, CloudProviderType> res = new HashMap<>(); List<Object> objList = this.resources.getSharedDiskOrDataNodeOrComputeNode(); if (objList != null) { for (Object obj : objList) { if (obj instanceof CloudProviderType) { String cloudProviderName = ((CloudProviderTy... | /**
* Returns a HashMap of declared CloudProviders (Key: Name, Value: CP).
*
* @return
*/ | Returns a HashMap of declared CloudProviders (Key: Name, Value: CP) | getCloudProviders_hashMap | {
"repo_name": "mF2C/COMPSs",
"path": "compss/runtime/config/xml/resources/src/main/java/es/bsc/compss/types/resources/ResourcesFile.java",
"license": "apache-2.0",
"size": 130588
} | [
"es.bsc.compss.types.resources.jaxb.CloudProviderType",
"java.util.HashMap",
"java.util.List"
] | import es.bsc.compss.types.resources.jaxb.CloudProviderType; import java.util.HashMap; import java.util.List; | import es.bsc.compss.types.resources.jaxb.*; import java.util.*; | [
"es.bsc.compss",
"java.util"
] | es.bsc.compss; java.util; | 56,379 |
public NodeList getAt(String name) {
NodeList answer = new NodeList();
for (Object child : this) {
if (child instanceof Node) {
Node childNode = (Node) child;
Object temp = childNode.get(name);
if (temp instanceof Collection) {
... | NodeList function(String name) { NodeList answer = new NodeList(); for (Object child : this) { if (child instanceof Node) { Node childNode = (Node) child; Object temp = childNode.get(name); if (temp instanceof Collection) { answer.addAll((Collection) temp); } else { answer.add(temp); } } } return answer; } | /**
* Provides lookup of elements by non-namespaced name.
*
* @param name the name or shortcut key for nodes of interest
* @return the nodes of interest which match name
*/ | Provides lookup of elements by non-namespaced name | getAt | {
"repo_name": "Selventa/model-builder",
"path": "tools/groovy/src/src/main/groovy/util/NodeList.java",
"license": "apache-2.0",
"size": 6251
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,136,515 |
public static class Parametric implements ParametricUnivariateFunction {
public double value(double x, double ... param)
throws NullArgumentException,
DimensionMismatchException {
validateParameters(param);
return Sigmoid.value(x, param[0], par... | static class Parametric implements ParametricUnivariateFunction { public double function(double x, double ... param) throws NullArgumentException, DimensionMismatchException { validateParameters(param); return Sigmoid.value(x, param[0], param[1]); } | /**
* Computes the value of the sigmoid at {@code x}.
*
* @param x Value for which the function must be computed.
* @param param Values of lower asymptote and higher asymptote.
* @return the value of the function.
* @throws NullArgumentException if {@code param} is ... | Computes the value of the sigmoid at x | value | {
"repo_name": "SpoonLabs/astor",
"path": "examples/math_20/src/main/java/org/apache/commons/math3/analysis/function/Sigmoid.java",
"license": "gpl-2.0",
"size": 7606
} | [
"org.apache.commons.math3.analysis.ParametricUnivariateFunction",
"org.apache.commons.math3.exception.DimensionMismatchException",
"org.apache.commons.math3.exception.NullArgumentException"
] | import org.apache.commons.math3.analysis.ParametricUnivariateFunction; import org.apache.commons.math3.exception.DimensionMismatchException; import org.apache.commons.math3.exception.NullArgumentException; | import org.apache.commons.math3.analysis.*; import org.apache.commons.math3.exception.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,632,139 |
@FIXVersion(introduced = "4.4")
public UnderlyingInstrument deleteUnderlyingInstrument(int index) {
throw new UnsupportedOperationException(getUnsupportedTagMessage());
} | @FIXVersion(introduced = "4.4") UnderlyingInstrument function(int index) { throw new UnsupportedOperationException(getUnsupportedTagMessage()); } | /**
* This method deletes a {@link UnderlyingInstrument} object from the existing array of <code>underlyingInstruments</code>
* and shrink the static array with 1 place.<br/>
* If the array does not have the index position then a null object will be returned.)<br/>
* This method will also update <co... | This method deletes a <code>UnderlyingInstrument</code> object from the existing array of <code>underlyingInstruments</code> and shrink the static array with 1 place. If the array does not have the index position then a null object will be returned.) This method will also update <code>noUnderlyings</code> field to the ... | deleteUnderlyingInstrument | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/group/QuoteRequestRejectGroup.java",
"license": "gpl-3.0",
"size": 50378
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.comp.UnderlyingInstrument"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.comp.UnderlyingInstrument; | import net.hades.fix.message.anno.*; import net.hades.fix.message.comp.*; | [
"net.hades.fix"
] | net.hades.fix; | 1,896,646 |
public Operator getContainerOperator(){
return item.getContainerOperator();
}
| Operator function(){ return item.getContainerOperator(); } | /**
* Return the encapsulate Low Level API object.
*/ | Return the encapsulate Low Level API object | getContainerOperator | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/integers/hlapi/DivisionHLAPI.java",
"license": "epl-1.0",
"size": 108424
} | [
"fr.lip6.move.pnml.hlpn.terms.Operator"
] | import fr.lip6.move.pnml.hlpn.terms.Operator; | import fr.lip6.move.pnml.hlpn.terms.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 1,132,450 |
@Test
void commit_withDebug() throws LoginException {
this.options.put("debug", "true");
this.loginModule.initialize(this.subject, this.callbackHandler, null, this.options);
final Set<Principal> principals = new LinkedHashSet<>();
principals.add(new UserPrincipal("FQN"));
... | void commit_withDebug() throws LoginException { this.options.put("debug", "true"); this.loginModule.initialize(this.subject, this.callbackHandler, null, this.options); final Set<Principal> principals = new LinkedHashSet<>(); principals.add(new UserPrincipal("FQN")); Whitebox.setInternalState(this.loginModule, principal... | /**
* Commit_with debug.
*
* @throws LoginException
* the login exception
*/ | Commit_with debug | commit_withDebug | {
"repo_name": "hazendaz/waffle",
"path": "Source/JNA/waffle-jna-jakarta/src/test/java/waffle/jaas/WindowsLoginModuleTest.java",
"license": "mit",
"size": 11427
} | [
"java.security.Principal",
"java.util.LinkedHashSet",
"java.util.Set",
"javax.security.auth.login.LoginException",
"org.junit.jupiter.api.Assertions",
"org.powermock.reflect.Whitebox"
] | import java.security.Principal; import java.util.LinkedHashSet; import java.util.Set; import javax.security.auth.login.LoginException; import org.junit.jupiter.api.Assertions; import org.powermock.reflect.Whitebox; | import java.security.*; import java.util.*; import javax.security.auth.login.*; import org.junit.jupiter.api.*; import org.powermock.reflect.*; | [
"java.security",
"java.util",
"javax.security",
"org.junit.jupiter",
"org.powermock.reflect"
] | java.security; java.util; javax.security; org.junit.jupiter; org.powermock.reflect; | 2,346,183 |
public static HRegion mergeAdjacent(final HRegion srcA, final HRegion srcB)
throws IOException {
HRegion a = srcA;
HRegion b = srcB;
// Make sure that srcA comes first; important for key-ordering during
// write of the merged file.
if (srcA.getStartKey() == null) {
if (srcB.getStartKey() ... | static HRegion function(final HRegion srcA, final HRegion srcB) throws IOException { HRegion a = srcA; HRegion b = srcB; if (srcA.getStartKey() == null) { if (srcB.getStartKey() == null) { throw new IOException(STR); } } else if ((srcB.getStartKey() == null) (Bytes.compareTo(srcA.getStartKey(), srcB.getStartKey()) > 0)... | /**
* Merge two HRegions. The regions must be adjacent and must not overlap.
*
* @param srcA
* @param srcB
* @return new merged HRegion
* @throws IOException
*/ | Merge two HRegions. The regions must be adjacent and must not overlap | mergeAdjacent | {
"repo_name": "zqxjjj/NobidaBase",
"path": "src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java",
"license": "apache-2.0",
"size": 219517
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.io.IOException; import org.apache.hadoop.hbase.util.Bytes; | import java.io.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,514,654 |
void updateFwdObj(DeviceId deviceId, PortNumber portNumber, IpPrefix prefix, MacAddress hostMac,
VlanId vlanId, boolean popVlan, boolean install) {
ForwardingObjective.Builder fob;
TrafficSelector.Builder sbuilder = buildIpSelectorFromIpPrefix(prefix);
MacAddress device... | void updateFwdObj(DeviceId deviceId, PortNumber portNumber, IpPrefix prefix, MacAddress hostMac, VlanId vlanId, boolean popVlan, boolean install) { ForwardingObjective.Builder fob; TrafficSelector.Builder sbuilder = buildIpSelectorFromIpPrefix(prefix); MacAddress deviceMac; try { deviceMac = config.getDeviceMac(deviceI... | /**
* Update Forwarding objective for each host and IP address connected to given port.
* And create corresponding Simple Next objective if it does not exist.
* Applied only when populating Forwarding objective
* @param deviceId switch ID to set the rule
* @param portNumber port number
* @... | Update Forwarding objective for each host and IP address connected to given port. And create corresponding Simple Next objective if it does not exist. Applied only when populating Forwarding objective | updateFwdObj | {
"repo_name": "oplinkoms/onos",
"path": "apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java",
"license": "apache-2.0",
"size": 90615
} | [
"org.onlab.packet.IpPrefix",
"org.onlab.packet.MacAddress",
"org.onlab.packet.VlanId",
"org.onosproject.net.DeviceId",
"org.onosproject.net.PortNumber",
"org.onosproject.net.flow.DefaultTrafficSelector",
"org.onosproject.net.flow.DefaultTrafficTreatment",
"org.onosproject.net.flow.TrafficSelector",
... | import org.onlab.packet.IpPrefix; import org.onlab.packet.MacAddress; import org.onlab.packet.VlanId; import org.onosproject.net.DeviceId; import org.onosproject.net.PortNumber; import org.onosproject.net.flow.DefaultTrafficSelector; import org.onosproject.net.flow.DefaultTrafficTreatment; import org.onosproject.net.fl... | import org.onlab.packet.*; import org.onosproject.net.*; import org.onosproject.net.flow.*; import org.onosproject.net.flowobjective.*; import org.onosproject.segmentrouting.config.*; import org.onosproject.segmentrouting.grouphandler.*; | [
"org.onlab.packet",
"org.onosproject.net",
"org.onosproject.segmentrouting"
] | org.onlab.packet; org.onosproject.net; org.onosproject.segmentrouting; | 2,001,915 |
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> listNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
} | Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); } | /**
* Get all ip configurations in a network interface.
*
ServiceResponse<PageImpl<NetworkInterfaceIPConfigurationInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return ... | Get all ip configurations in a network interface | listNextSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkInterfaceIPConfigurationsInner.java",
"license": "mit",
"size": 23822
} | [
"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; | 1,177,462 |
public OpTestCase expectedOutputRelError(int outputNum, @NonNull INDArray expected, double maxRelError, double minAbsError) {
testFns.put(outputNum, new RelErrorFn(expected, maxRelError, minAbsError));
expShapes.put(outputNum, expected.shapeDescriptor());
return this;
} | OpTestCase function(int outputNum, @NonNull INDArray expected, double maxRelError, double minAbsError) { testFns.put(outputNum, new RelErrorFn(expected, maxRelError, minAbsError)); expShapes.put(outputNum, expected.shapeDescriptor()); return this; } | /**
* Validate the output for a single variable using element-wise relative error:
* relError = abs(x-y)/(abs(x)+abs(y)), with x=y=0 case defined to be 0.0.
* Also has a minimum absolute error condition, which must be satisfied for the relative error failure to be considered
* legitimate
*
... | Validate the output for a single variable using element-wise relative error: relError = abs(x-y)/(abs(x)+abs(y)), with x=y=0 case defined to be 0.0. Also has a minimum absolute error condition, which must be satisfied for the relative error failure to be considered legitimate | expectedOutputRelError | {
"repo_name": "deeplearning4j/deeplearning4j",
"path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/validation/OpTestCase.java",
"license": "apache-2.0",
"size": 3604
} | [
"org.nd4j.autodiff.validation.functions.RelErrorFn",
"org.nd4j.linalg.api.ndarray.INDArray"
] | import org.nd4j.autodiff.validation.functions.RelErrorFn; import org.nd4j.linalg.api.ndarray.INDArray; | import org.nd4j.autodiff.validation.functions.*; import org.nd4j.linalg.api.ndarray.*; | [
"org.nd4j.autodiff",
"org.nd4j.linalg"
] | org.nd4j.autodiff; org.nd4j.linalg; | 2,276,064 |
public Color getBackgroundColor() {
return backgroundColor;
}
| Color function() { return backgroundColor; } | /**
* Get the the background color we're previewing over
*
* @return The background color we're previewing over
*/ | Get the the background color we're previewing over | getBackgroundColor | {
"repo_name": "SenshiSentou/SourceFight",
"path": "slick_dev/tags/Slick0.19/tools/org/newdawn/slick/tools/hiero/FontPanel.java",
"license": "bsd-2-clause",
"size": 7288
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,233,895 |
private FSDataOutputStream createTestStream(
FileSystem fs,
Path dir,
String fileName) throws IOException {
switch (stateOutputStreamType) {
case FileBasedState:
return new FileBasedStateOutputStream(fs, new Path(dir, fileName));
case FsCheckpointMetaData:
Path fullPath = new Path(dir, fileName... | FSDataOutputStream function( FileSystem fs, Path dir, String fileName) throws IOException { switch (stateOutputStreamType) { case FileBasedState: return new FileBasedStateOutputStream(fs, new Path(dir, fileName)); case FsCheckpointMetaData: Path fullPath = new Path(dir, fileName); return new FsCheckpointMetadataOutputS... | /**
* Creates a new test stream instance.
*/ | Creates a new test stream instance | createTestStream | {
"repo_name": "hequn8128/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/CheckpointStateOutputStreamTest.java",
"license": "apache-2.0",
"size": 10685
} | [
"java.io.IOException",
"org.apache.flink.core.fs.FSDataOutputStream",
"org.apache.flink.core.fs.FileSystem",
"org.apache.flink.core.fs.Path"
] | import java.io.IOException; import org.apache.flink.core.fs.FSDataOutputStream; import org.apache.flink.core.fs.FileSystem; import org.apache.flink.core.fs.Path; | import java.io.*; import org.apache.flink.core.fs.*; | [
"java.io",
"org.apache.flink"
] | java.io; org.apache.flink; | 1,301,326 |
@Deprecated
@Name("quercus_get_response")
public static Object get_response(Env env)
{
return get_servlet_response(env);
} | @Name(STR) static Object function(Env env) { return get_servlet_response(env); } | /**
* Returns the HttpServletResponse associated with this Env.
*/ | Returns the HttpServletResponse associated with this Env | get_response | {
"repo_name": "smba/oak",
"path": "quercus/src/main/java/com/caucho/quercus/lib/QuercusModule.java",
"license": "lgpl-3.0",
"size": 4680
} | [
"com.caucho.quercus.annotation.Name",
"com.caucho.quercus.env.Env"
] | import com.caucho.quercus.annotation.Name; import com.caucho.quercus.env.Env; | import com.caucho.quercus.annotation.*; import com.caucho.quercus.env.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 2,082,775 |
public List<VmTemplate> getVmTemplatesByIds(List<Guid> templatesIds); | List<VmTemplate> function(List<Guid> templatesIds); | /**
* Get all vm templates with the given ids
*/ | Get all vm templates with the given ids | getVmTemplatesByIds | {
"repo_name": "OpenUniversity/ovirt-engine",
"path": "backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDao.java",
"license": "apache-2.0",
"size": 8008
} | [
"java.util.List",
"org.ovirt.engine.core.common.businessentities.VmTemplate",
"org.ovirt.engine.core.compat.Guid"
] | import java.util.List; import org.ovirt.engine.core.common.businessentities.VmTemplate; import org.ovirt.engine.core.compat.Guid; | import java.util.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.compat.*; | [
"java.util",
"org.ovirt.engine"
] | java.util; org.ovirt.engine; | 2,613,109 |
void add_server_request_interceptor(ServerRequestInterceptor interceptor)
throws DuplicateName;
/**
* Allocate a slot on a {@link Current} of this interceptor. While slots can
* be allocated by this method, they cannot be initialized.
* {@link CurrentOperations#get_slot} and {@link CurrentOperations#s... | void add_server_request_interceptor(ServerRequestInterceptor interceptor) throws DuplicateName; /** * Allocate a slot on a {@link Current} of this interceptor. While slots can * be allocated by this method, they cannot be initialized. * {@link CurrentOperations#get_slot} and {@link CurrentOperations#set_slot} | /**
* Register the server request interceptor.
*
* @param interceptor the interceptor to register.
*
* @throws DuplicateName if the interceptor name is not an empty string and an
* interceptor with this name is already registered with the ORB being
* created.
*/ | Register the server request interceptor | add_server_request_interceptor | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/org/omg/PortableInterceptor/ORBInitInfoOperations.java",
"license": "gpl-2.0",
"size": 6448
} | [
"org.omg.PortableInterceptor"
] | import org.omg.PortableInterceptor; | import org.omg.*; | [
"org.omg"
] | org.omg; | 546,368 |
void showErrorMessage(String title, String message) {
new AlertDialog.Builder(this)
.setTitle(title)
.setMessage(message)
.setOnCancelListener(new FinishListener(this))
.setPositiveButton( "Done", new FinishListener(this))
.show();
} | void showErrorMessage(String title, String message) { new AlertDialog.Builder(this) .setTitle(title) .setMessage(message) .setOnCancelListener(new FinishListener(this)) .setPositiveButton( "Done", new FinishListener(this)) .show(); } | /**
* Displays an error message dialog box to the user on the UI thread.
*
* @param title The title for the dialog box
* @param message The error message to be displayed
*/ | Displays an error message dialog box to the user on the UI thread | showErrorMessage | {
"repo_name": "forkch/scrabble_ar",
"path": "examples/android-ocr/oCRTest/src/main/java/edu/sfsu/cs/orange/ocr/CaptureActivity.java",
"license": "bsd-2-clause",
"size": 51662
} | [
"android.app.AlertDialog"
] | import android.app.AlertDialog; | import android.app.*; | [
"android.app"
] | android.app; | 625,801 |
public static void assertFileContentsSame(File... files) throws Exception {
if (files.length < 2) return;
Map<File, String> md5s = getFileMD5s(files);
if (Sets.newHashSet(md5s.values()).size() > 1) {
fail("File contents differed:\n " +
Joiner.on("\n ")
.withKeyValueSepar... | static void function(File... files) throws Exception { if (files.length < 2) return; Map<File, String> md5s = getFileMD5s(files); if (Sets.newHashSet(md5s.values()).size() > 1) { fail(STR + Joiner.on(STR) .withKeyValueSeparator("=") .join(md5s)); } } | /**
* Assert that all of the given paths have the exact same
* contents
*/ | Assert that all of the given paths have the exact same contents | assertFileContentsSame | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/FSImageTestUtil.java",
"license": "apache-2.0",
"size": 21423
} | [
"com.google.common.base.Joiner",
"com.google.common.collect.Sets",
"java.io.File",
"java.util.Map",
"org.junit.Assert"
] | import com.google.common.base.Joiner; import com.google.common.collect.Sets; import java.io.File; import java.util.Map; import org.junit.Assert; | import com.google.common.base.*; import com.google.common.collect.*; import java.io.*; import java.util.*; import org.junit.*; | [
"com.google.common",
"java.io",
"java.util",
"org.junit"
] | com.google.common; java.io; java.util; org.junit; | 2,250,699 |
public void send(Object message) {
if (message == null)
throw new IllegalArgumentException("Null cannot be sent as a message.");
if (! (message instanceof Serializable))
throw new IllegalArgumentException("Messages must implement the Serializable interface.");
if (connection.close... | void function(Object message) { if (message == null) throw new IllegalArgumentException(STR); if (! (message instanceof Serializable)) throw new IllegalArgumentException(STR); if (connection.closed) throw new IllegalStateException(STR); connection.send(message); } | /**
* This method is called to send a message to the hub. This method simply
* drops the message into a queue of outgoing messages, and it
* never blocks. This method throws an IllegalStateException if the
* connection to the Hub has already been closed.
* @param message A non-null object represen... | This method is called to send a message to the hub. This method simply drops the message into a queue of outgoing messages, and it never blocks. This method throws an IllegalStateException if the connection to the Hub has already been closed | send | {
"repo_name": "Sw1cH/Android-Ebook",
"path": "assets/source/netgame/common/Client.java",
"license": "mit",
"size": 16743
} | [
"java.io.Serializable"
] | import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 700,053 |
public void testAdd() {
XIntervalSeries series = new XIntervalSeries("Series", false, true);
series.add(5.0, 5.50, 5.50, 5.50);
series.add(5.1, 5.51, 5.51, 5.51);
series.add(6.0, 6.6, 6.6, 6.6);
series.add(3.0, 3.3, 3.3, 3.3);
series.add(4.0, 4.4, 4.4, 4.4);
s... | void function() { XIntervalSeries series = new XIntervalSeries(STR, false, true); series.add(5.0, 5.50, 5.50, 5.50); series.add(5.1, 5.51, 5.51, 5.51); series.add(6.0, 6.6, 6.6, 6.6); series.add(3.0, 3.3, 3.3, 3.3); series.add(4.0, 4.4, 4.4, 4.4); series.add(2.0, 2.2, 2.2, 2.2); series.add(1.0, 1.1, 1.1, 1.1); assertEq... | /**
* Some checks for the add() method for an UNSORTED series.
*/ | Some checks for the add() method for an UNSORTED series | testAdd | {
"repo_name": "integrated/jfreechart",
"path": "tests/org/jfree/data/xy/junit/XIntervalSeriesTests.java",
"license": "lgpl-2.1",
"size": 10608
} | [
"org.jfree.data.xy.XIntervalSeries"
] | import org.jfree.data.xy.XIntervalSeries; | import org.jfree.data.xy.*; | [
"org.jfree.data"
] | org.jfree.data; | 1,795,204 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.