method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static WorkItemContext getWorkItemContext(TWorkItemBean workItemBean, Integer person, Locale locale){
WorkItemContext workItemContext = prepareWorkItemContext(person, locale, null, null, null);
workItemContext.setWorkItemBean(workItemBean);
if (workItemBean.getObjectID()!=null) {
workItemContext.setW... | static WorkItemContext function(TWorkItemBean workItemBean, Integer person, Locale locale){ WorkItemContext workItemContext = prepareWorkItemContext(person, locale, null, null, null); workItemContext.setWorkItemBean(workItemBean); if (workItemBean.getObjectID()!=null) { workItemContext.setWorkItemBeanOriginal(workItemB... | /**
* Creating a workItemContext for importing workItems from external sources
* TODO do we need to prepare the validation code?
* @param workItemBean
* @param person
* @param locale
*/ | Creating a workItemContext for importing workItems from external sources TODO do we need to prepare the validation code | getWorkItemContext | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/fieldType/runtime/base/FieldsManagerRT.java",
"license": "gpl-3.0",
"size": 125819
} | [
"com.aurel.track.beans.TWorkItemBean",
"java.util.Locale"
] | import com.aurel.track.beans.TWorkItemBean; import java.util.Locale; | import com.aurel.track.beans.*; import java.util.*; | [
"com.aurel.track",
"java.util"
] | com.aurel.track; java.util; | 2,518,869 |
public List<Process> getAllChildren() {
List<Process> allChildren = new ArrayList<Process>();
for (Process child : children) {
allChildren.add(child);
allChildren.addAll(child.getAllChildren());
}
return allChildren;
} | List<Process> function() { List<Process> allChildren = new ArrayList<Process>(); for (Process child : children) { allChildren.add(child); allChildren.addAll(child.getAllChildren()); } return allChildren; } | /**
* Returns all child processes and their child processes etc. recursively.
*
* @return All child processes and their child processes etc.
*/ | Returns all child processes and their child processes etc. recursively | getAllChildren | {
"repo_name": "QuarterCode/Disconnected",
"path": "src/main/java/com/quartercode/disconnected/sim/comp/program/Process.java",
"license": "gpl-3.0",
"size": 13366
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,160,178 |
public Builder addCustom(final Class clazz, final Serializer serializer) {
addOrOverrideRegistration(clazz, id -> GryoTypeReg.of(clazz, id, serializer));
return this;
} | Builder function(final Class clazz, final Serializer serializer) { addOrOverrideRegistration(clazz, id -> GryoTypeReg.of(clazz, id, serializer)); return this; } | /**
* Register custom class to serialize with a custom serialization class. Note that calling this method for
* a class that is already registered will override that registration.
*/ | Register custom class to serialize with a custom serialization class. Note that calling this method for a class that is already registered will override that registration | addCustom | {
"repo_name": "newkek/incubator-tinkerpop",
"path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java",
"license": "apache-2.0",
"size": 31608
} | [
"org.apache.tinkerpop.shaded.kryo.Serializer"
] | import org.apache.tinkerpop.shaded.kryo.Serializer; | import org.apache.tinkerpop.shaded.kryo.*; | [
"org.apache.tinkerpop"
] | org.apache.tinkerpop; | 108,495 |
public void setLoggroupCollection(final List<String> loggroupList) {
_loggroupList = loggroupList;
} | void function(final List<String> loggroupList) { _loggroupList = loggroupList; } | /**
* Sets the value of '_loggroupList' by setting it to the given Vector. No
* type checking is performed.
*
* @deprecated
*
* @param loggroupList
* the Vector to set.
*/ | Sets the value of '_loggroupList' by setting it to the given Vector. No type checking is performed | setLoggroupCollection | {
"repo_name": "bugcy013/opennms-tmp-tools",
"path": "opennms-model/src/main/java/org/opennms/netmgt/xml/event/Event.java",
"license": "gpl-2.0",
"size": 46220
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,033,669 |
public void addDomainOntology(InputStream inputStream, String lang) {
addDomainOntology(getOntologyModel(inputStream, lang));
}
| void function(InputStream inputStream, String lang) { addDomainOntology(getOntologyModel(inputStream, lang)); } | /**
* Load a domain ontology from a inputStream with specified format 'RDF/XML' or
* 'TURTLE'. Can be called multiple times to load an ontology that is divided to
* multiple files.
*
* @param inputStream
* the ontology
* @param lang
* the format of the ontology, 'RDF/XML' ... | Load a domain ontology from a inputStream with specified format 'RDF/XML' or 'TURTLE'. Can be called multiple times to load an ontology that is divided to multiple files | addDomainOntology | {
"repo_name": "NatLibFi/mutu",
"path": "src/fi/nationallibrary/mutu/Mutu.java",
"license": "apache-2.0",
"size": 36627
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 419,625 |
public static void registerImplementation(Class<? extends ActionBarSherlock> implementationClass) {
if (!implementationClass.isAnnotationPresent(Implementation.class)) {
throw new IllegalArgumentException("Class " + implementationClass.getSimpleName() + " is not annotated with @Implementation"... | static void function(Class<? extends ActionBarSherlock> implementationClass) { if (!implementationClass.isAnnotationPresent(Implementation.class)) { throw new IllegalArgumentException(STR + implementationClass.getSimpleName() + STR); } else if (IMPLEMENTATIONS.containsValue(implementationClass)) { if (DEBUG) Log.w(TAG,... | /**
* Register an ActionBarSherlock implementation.
*
* @param implementationClass Target implementation class which extends
* {@link ActionBarSherlock}. This class must also be annotated with
* {@link Implementation}.
*/ | Register an ActionBarSherlock implementation | registerImplementation | {
"repo_name": "kevinsawicki/ActionBarSherlock",
"path": "library/src/com/actionbarsherlock/ActionBarSherlock.java",
"license": "apache-2.0",
"size": 29995
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 568,341 |
public RequestOutputStream write(final String value) throws IOException {
final ByteBuffer bytes = encoder.encode(CharBuffer.wrap(value));
super.write(bytes.array(), 0, bytes.limit());
return this;
}
}
/**
* Encode the given URL as an ASCII {@link String} | RequestOutputStream function(final String value) throws IOException { final ByteBuffer bytes = encoder.encode(CharBuffer.wrap(value)); super.write(bytes.array(), 0, bytes.limit()); return this; } } /** * Encode the given URL as an ASCII {@link String} | /**
* Write string to stream
*
* @param value
* @return this stream
* @throws IOException
*/ | Write string to stream | write | {
"repo_name": "Tomucha/gae-java-proxy",
"path": "src/main/java/cz/tomucha/gae/proxy/HttpRequest.java",
"license": "apache-2.0",
"size": 81841
} | [
"java.io.IOException",
"java.nio.ByteBuffer",
"java.nio.CharBuffer"
] | import java.io.IOException; import java.nio.ByteBuffer; import java.nio.CharBuffer; | import java.io.*; import java.nio.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,815,407 |
public static void rotate(IAtom atom, Point3d p1, Point3d p2, double angle) {
double costheta, sintheta;
Point3d r = new Point3d();
r.x = p2.x - p1.x;
r.y = p2.y - p1.y;
r.z = p2.z - p1.z;
normalize(r);
angle = angle * Math.PI / 180.0;
costheta = Ma... | static void function(IAtom atom, Point3d p1, Point3d p2, double angle) { double costheta, sintheta; Point3d r = new Point3d(); r.x = p2.x - p1.x; r.y = p2.y - p1.y; r.z = p2.z - p1.z; normalize(r); angle = angle * Math.PI / 180.0; costheta = Math.cos(angle); sintheta = Math.sin(angle); Point3d p = atom.getPoint3d(); p.... | /**
* Rotates a 3D point about a specified line segment by a specified angle.
*
* The code is based on code available
* <a href="http://astronomy.swin.edu.au/~pbourke/geometry/rotate/source.c">here</a>.
* Positive angles are anticlockwise looking down the axis towards the
* origin. Assume ... | Rotates a 3D point about a specified line segment by a specified angle. The code is based on code available here. Positive angles are anticlockwise looking down the axis towards the origin. Assume right hand coordinate system | rotate | {
"repo_name": "asad/ReactionDecoder",
"path": "src/main/java/uk/ac/ebi/reactionblast/graphics/direct/GeometryTools.java",
"license": "lgpl-3.0",
"size": 74105
} | [
"javax.vecmath.Point3d",
"org.openscience.cdk.interfaces.IAtom"
] | import javax.vecmath.Point3d; import org.openscience.cdk.interfaces.IAtom; | import javax.vecmath.*; import org.openscience.cdk.interfaces.*; | [
"javax.vecmath",
"org.openscience.cdk"
] | javax.vecmath; org.openscience.cdk; | 1,744,143 |
return WorldProvider.MOON_PHASE_FACTORS[toInt()];
}
| return WorldProvider.MOON_PHASE_FACTORS[toInt()]; } | /**
* Gets the MoonPhase factor for this MoonPhase based on the factors in WorldProvider
*/ | Gets the MoonPhase factor for this MoonPhase based on the factors in WorldProvider | getFactor | {
"repo_name": "BlazeLoader/BlazeLoader",
"path": "src/main/com/blazeloader/api/world/MoonPhase.java",
"license": "bsd-2-clause",
"size": 1283
} | [
"net.minecraft.world.WorldProvider"
] | import net.minecraft.world.WorldProvider; | import net.minecraft.world.*; | [
"net.minecraft.world"
] | net.minecraft.world; | 1,443,748 |
public MappingDetail getMappingDetail(MappingElement map) {
return m_detailDirectory.forceMappingDetail(map);
}
/**
* Write a collection of schemas to a target directory.
*
* @param dir target directory
* @param schemas list of {@link SchemaHolder} | MappingDetail function(MappingElement map) { return m_detailDirectory.forceMappingDetail(map); } /** * Write a collection of schemas to a target directory. * * @param dir target directory * @param schemas list of {@link SchemaHolder} | /**
* Get details of schema handling of a mapping.
*
* @param map
* @return mapping details
*/ | Get details of schema handling of a mapping | getMappingDetail | {
"repo_name": "vkorbut/jibx",
"path": "jibx/build/src/org/jibx/schema/generator/SchemaGen.java",
"license": "bsd-3-clause",
"size": 51820
} | [
"org.jibx.binding.model.MappingElement",
"org.jibx.schema.SchemaHolder"
] | import org.jibx.binding.model.MappingElement; import org.jibx.schema.SchemaHolder; | import org.jibx.binding.model.*; import org.jibx.schema.*; | [
"org.jibx.binding",
"org.jibx.schema"
] | org.jibx.binding; org.jibx.schema; | 497,470 |
private static ArrayList<AccountType.EditType> getValidTypes(RawContactDelta state, DataKind kind,
AccountType.EditType forceInclude, boolean includeSecondary, SparseIntArray typeCount) {
final ArrayList<AccountType.EditType> validTypes = new ArrayList<AccountType.EditType>();
// Bail e... | static ArrayList<AccountType.EditType> function(RawContactDelta state, DataKind kind, AccountType.EditType forceInclude, boolean includeSecondary, SparseIntArray typeCount) { final ArrayList<AccountType.EditType> validTypes = new ArrayList<AccountType.EditType>(); if (!hasEditTypes(kind)) return validTypes; if (typeCou... | /**
* For the given {@link RawContactDelta} and {@link DataKind}, return the
* list possible {@link com.guillaumedelente.android.contacts.common.model.account.AccountType.EditType} options available based on
* {@link AccountType}.
*
* @param forceInclude Always include this {@link com.guillaume... | For the given <code>RawContactDelta</code> and <code>DataKind</code>, return the list possible <code>com.guillaumedelente.android.contacts.common.model.account.AccountType.EditType</code> options available based on <code>AccountType</code> | getValidTypes | {
"repo_name": "GuillaumeDelente/contact-picker",
"path": "library/src/main/java/com/guillaumedelente/android/contacts/common/model/RawContactModifier.java",
"license": "apache-2.0",
"size": 64638
} | [
"android.util.SparseIntArray",
"com.guillaumedelente.android.contacts.common.model.account.AccountType",
"com.guillaumedelente.android.contacts.common.model.dataitem.DataKind",
"java.util.ArrayList"
] | import android.util.SparseIntArray; import com.guillaumedelente.android.contacts.common.model.account.AccountType; import com.guillaumedelente.android.contacts.common.model.dataitem.DataKind; import java.util.ArrayList; | import android.util.*; import com.guillaumedelente.android.contacts.common.model.account.*; import com.guillaumedelente.android.contacts.common.model.dataitem.*; import java.util.*; | [
"android.util",
"com.guillaumedelente.android",
"java.util"
] | android.util; com.guillaumedelente.android; java.util; | 738,931 |
protected boolean isObjectComparison() {
int selector = this.operator.getSelector();
if (((selector != ExpressionOperator.IsNull) && (selector != ExpressionOperator.NotNull)) || (this.children.size() != 1)) {
if (((selector != ExpressionOperator.InSubQuery) && (selector != ExpressionOper... | boolean function() { int selector = this.operator.getSelector(); if (((selector != ExpressionOperator.IsNull) && (selector != ExpressionOperator.NotNull)) (this.children.size() != 1)) { if (((selector != ExpressionOperator.InSubQuery) && (selector != ExpressionOperator.NotInSubQuery)) (this.children.size() != 2)) { ret... | /**
* INTERNAL:
* Return if the represents an object comparison.
*/ | Return if the represents an object comparison | isObjectComparison | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/expressions/FunctionExpression.java",
"license": "epl-1.0",
"size": 41605
} | [
"org.eclipse.persistence.expressions.Expression",
"org.eclipse.persistence.expressions.ExpressionOperator"
] | import org.eclipse.persistence.expressions.Expression; import org.eclipse.persistence.expressions.ExpressionOperator; | import org.eclipse.persistence.expressions.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 1,364,665 |
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
return false;
} | boolean function(ActionMode mode, Menu menu) { return false; } | /**
* No chips are selectable.
*/ | No chips are selectable | onCreateActionMode | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/com/android/ex/chips/RecipientEditTextView.java",
"license": "gpl-3.0",
"size": 126594
} | [
"android.view.ActionMode",
"android.view.Menu"
] | import android.view.ActionMode; import android.view.Menu; | import android.view.*; | [
"android.view"
] | android.view; | 518,327 |
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String productId, String ifMatch, Boolean deleteSubscriptions) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and ... | Observable<ServiceResponse<Void>> function(String resourceGroupName, String serviceName, String productId, String ifMatch, Boolean deleteSubscriptions) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (serviceName == null) { throw new IllegalArgumentException(STR); } if (productId == nul... | /**
* Delete product.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param productId Product identifier. Must be unique in the current API Management service instance.
* @param ifMatch ETag of the Entity. ETag sh... | Delete product | deleteWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/apimanagement/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/apimanagement/v2018_06_01_preview/implementation/ProductsInner.java",
"license": "mit",
"size": 101279
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 540,537 |
T visitAtomExpr(@NotNull ExpressionParser.AtomExprContext ctx); | T visitAtomExpr(@NotNull ExpressionParser.AtomExprContext ctx); | /**
* Visit a parse tree produced by {@link ExpressionParser#atomExpr}.
* @param ctx the parse tree
* @return the visitor result
*/ | Visit a parse tree produced by <code>ExpressionParser#atomExpr</code> | visitAtomExpr | {
"repo_name": "isa-group/aml",
"path": "src/main/java/es/us/isa/aml/parsers/expression/ExpressionVisitor.java",
"license": "gpl-3.0",
"size": 7283
} | [
"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,303,868 |
protected HttpResponseFactory createHttpResponseFactory() {
return new DefaultHttpResponseFactory();
}
| HttpResponseFactory function() { return new DefaultHttpResponseFactory(); } | /**
* Creates an instance of {@link DefaultHttpResponseFactory} to be used
* for creating {@link HttpResponse} objects received by over this
* connection.
* <p>
* This method can be overridden in a super class in order to provide
* a different implementation of the {@link HttpResp... | Creates an instance of <code>DefaultHttpResponseFactory</code> to be used for creating <code>HttpResponse</code> objects received by over this connection. This method can be overridden in a super class in order to provide a different implementation of the <code>HttpResponseFactory</code> interface | createHttpResponseFactory | {
"repo_name": "onedanshow/Screen-Courter",
"path": "lib/src/org/apache/http/impl/AbstractHttpClientConnection.java",
"license": "gpl-3.0",
"size": 11897
} | [
"org.apache.http.HttpResponseFactory"
] | import org.apache.http.HttpResponseFactory; | import org.apache.http.*; | [
"org.apache.http"
] | org.apache.http; | 159,646 |
void importData(Set<ValueTable> sourceValueTables, String destinationDatasourceName,
String idMapping, boolean allowIdentifierGeneration, boolean ignoreUnknownIdentifier,
@Nullable DatasourceCopierProgressListener progressListener)
throws NoSuchIdentifiersMappingException, NonExistentVariableEntitie... | void importData(Set<ValueTable> sourceValueTables, String destinationDatasourceName, String idMapping, boolean allowIdentifierGeneration, boolean ignoreUnknownIdentifier, @Nullable DatasourceCopierProgressListener progressListener) throws NoSuchIdentifiersMappingException, NonExistentVariableEntitiesException, IOExcept... | /**
* Imports data from a source table into a destination Opal datasource.
*
* @param sourceValueTables
* @param destinationDatasourceName
* @param idMapping
* @param allowIdentifierGeneration
* @param ignoreUnknownIdentifier
* @param progressListener
*/ | Imports data from a source table into a destination Opal datasource | importData | {
"repo_name": "obiba/opal",
"path": "opal-core-api/src/main/java/org/obiba/opal/core/service/DataImportService.java",
"license": "gpl-3.0",
"size": 3584
} | [
"java.io.IOException",
"java.util.Set",
"javax.annotation.Nullable",
"org.obiba.magma.DatasourceCopierProgressListener",
"org.obiba.magma.ValueTable"
] | import java.io.IOException; import java.util.Set; import javax.annotation.Nullable; import org.obiba.magma.DatasourceCopierProgressListener; import org.obiba.magma.ValueTable; | import java.io.*; import java.util.*; import javax.annotation.*; import org.obiba.magma.*; | [
"java.io",
"java.util",
"javax.annotation",
"org.obiba.magma"
] | java.io; java.util; javax.annotation; org.obiba.magma; | 1,678,575 |
private String format(final String format, final Object arg1, final Object arg2)
{
return MessageFormatter.format(format, arg1, arg2).getMessage();
}
| String function(final String format, final Object arg1, final Object arg2) { return MessageFormatter.format(format, arg1, arg2).getMessage(); } | /**
* For formatted messages substitute arguments.
*
* @param format
* @param arg1
* @param arg2
*/ | For formatted messages substitute arguments | format | {
"repo_name": "umadevik/log4j-android",
"path": "src/main/java/org/slf4j/impl/AndroidLogger.java",
"license": "apache-2.0",
"size": 8369
} | [
"org.slf4j.helpers.MessageFormatter"
] | import org.slf4j.helpers.MessageFormatter; | import org.slf4j.helpers.*; | [
"org.slf4j.helpers"
] | org.slf4j.helpers; | 1,854,730 |
public Builder defaultConfig(FunctionModelConfig defaultConfig) {
JodaBeanUtils.notNull(defaultConfig, "defaultConfig");
this._defaultConfig = defaultConfig;
return this;
} | Builder function(FunctionModelConfig defaultConfig) { JodaBeanUtils.notNull(defaultConfig, STR); this._defaultConfig = defaultConfig; return this; } | /**
* Sets the {@code defaultConfig} property in the builder.
* @param defaultConfig the new value, not null
* @return this, for chaining, not null
*/ | Sets the defaultConfig property in the builder | defaultConfig | {
"repo_name": "jeorme/OG-Platform",
"path": "sesame/sesame-engine/src/main/java/com/opengamma/sesame/config/ViewConfig.java",
"license": "apache-2.0",
"size": 21931
} | [
"org.joda.beans.JodaBeanUtils"
] | import org.joda.beans.JodaBeanUtils; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 1,360,011 |
public Version getIndexVersionCreated() {
return version;
} | Version function() { return version; } | /**
* Returns the version the index was created on.
* @see Version#indexCreated(Settings)
*/ | Returns the version the index was created on | getIndexVersionCreated | {
"repo_name": "jprante/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/IndexSettings.java",
"license": "apache-2.0",
"size": 27296
} | [
"org.elasticsearch.Version"
] | import org.elasticsearch.Version; | import org.elasticsearch.*; | [
"org.elasticsearch"
] | org.elasticsearch; | 662,426 |
void moveServerData(int maxSavedReplicated) throws IOException {
moveServerData(maxSavedReplicated, false);
} | void moveServerData(int maxSavedReplicated) throws IOException { moveServerData(maxSavedReplicated, false); } | /**
* Move data away before starting data synchronization for fail-back.
* <p>
* Use case is a server, upon restarting, finding a former backup running in its place. It will
* move any older data away and log a warning about it.
*/ | Move data away before starting data synchronization for fail-back. Use case is a server, upon restarting, finding a former backup running in its place. It will move any older data away and log a warning about it | moveServerData | {
"repo_name": "TomRoss/activemq-artemis",
"path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java",
"license": "apache-2.0",
"size": 190494
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 554,209 |
public CcLibraryHelper addPublicHeaders(Artifact... headers) {
addPublicHeaders(Arrays.asList(headers));
return this;
} | CcLibraryHelper function(Artifact... headers) { addPublicHeaders(Arrays.asList(headers)); return this; } | /**
* Adds {@code headers} as public header files. These files will be made visible to dependent
* rules. They may be parsed/preprocessed or compiled into a header module depending on the
* configuration.
*/ | Adds headers as public header files. These files will be made visible to dependent rules. They may be parsed/preprocessed or compiled into a header module depending on the configuration | addPublicHeaders | {
"repo_name": "hermione521/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java",
"license": "apache-2.0",
"size": 61939
} | [
"com.google.devtools.build.lib.actions.Artifact",
"java.util.Arrays"
] | import com.google.devtools.build.lib.actions.Artifact; import java.util.Arrays; | import com.google.devtools.build.lib.actions.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 2,686,145 |
public Builder putAllExtraParam(Map<String, Object> map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}
}
public enum BillingCycleAnchor implements ApiRequestParams.... | Builder function(Map<String, Object> map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } } } public enum BillingCycleAnchor implements ApiRequestParams.EnumParam { @SerializedName(STR) AUTOMATIC(STR), @SerializedName(STR) PHASE_START(STR); @Getter(on... | /**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* SubscriptionScheduleUpdateParams.DefaultSettings.TransferData#extraParams} for the f... | Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See <code>SubscriptionScheduleUpdateParams.DefaultSettings.TransferData#extraParams</code> for the field documentation | putAllExtraParam | {
"repo_name": "stripe/stripe-java",
"path": "src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java",
"license": "mit",
"size": 111931
} | [
"com.google.gson.annotations.SerializedName",
"com.stripe.net.ApiRequestParams",
"java.math.BigDecimal",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import java.math.BigDecimal; import java.util.HashMap; import java.util.List; import java.util.Map; | import com.google.gson.annotations.*; import com.stripe.net.*; import java.math.*; import java.util.*; | [
"com.google.gson",
"com.stripe.net",
"java.math",
"java.util"
] | com.google.gson; com.stripe.net; java.math; java.util; | 2,310,565 |
public static List<NabuccoPropertyDescriptor> getPropertyDescriptorList() {
return PropertyCache.getInstance().retrieve(PriorityListMsg.class).getAllProperties();
}
| static List<NabuccoPropertyDescriptor> function() { return PropertyCache.getInstance().retrieve(PriorityListMsg.class).getAllProperties(); } | /**
* Getter for the PropertyDescriptorList.
*
* @return the List<NabuccoPropertyDescriptor>.
*/ | Getter for the PropertyDescriptorList | getPropertyDescriptorList | {
"repo_name": "NABUCCO/org.nabucco.testautomation.result",
"path": "org.nabucco.testautomation.result.facade.message/src/main/gen/org/nabucco/testautomation/result/facade/message/jira/PriorityListMsg.java",
"license": "epl-1.0",
"size": 5878
} | [
"java.util.List",
"org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor",
"org.nabucco.framework.base.facade.datatype.property.PropertyCache"
] | import java.util.List; import org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor; import org.nabucco.framework.base.facade.datatype.property.PropertyCache; | import java.util.*; import org.nabucco.framework.base.facade.datatype.property.*; | [
"java.util",
"org.nabucco.framework"
] | java.util; org.nabucco.framework; | 2,652,876 |
public OperatorBuilder returnTypeInference(final SqlReturnTypeInference returnTypeInference)
{
Preconditions.checkState(this.returnTypeInference == null, "Cannot set return type multiple times");
this.returnTypeInference = returnTypeInference;
return this;
} | OperatorBuilder function(final SqlReturnTypeInference returnTypeInference) { Preconditions.checkState(this.returnTypeInference == null, STR); this.returnTypeInference = returnTypeInference; return this; } | /**
* Provides customized return type inference logic.
*
* One of {@link #returnTypeNonNull}, {@link #returnTypeNullable}, or
* {@link #returnTypeInference(SqlReturnTypeInference)} must be used before calling {@link #build()}. These methods
* cannot be mixed; you must call exactly one.
*/ | Provides customized return type inference logic. One of <code>#returnTypeNonNull</code>, <code>#returnTypeNullable</code>, or <code>#returnTypeInference(SqlReturnTypeInference)</code> must be used before calling <code>#build()</code>. These methods cannot be mixed; you must call exactly one | returnTypeInference | {
"repo_name": "pjain1/druid",
"path": "sql/src/main/java/org/apache/druid/sql/calcite/expression/OperatorConversions.java",
"license": "apache-2.0",
"size": 22049
} | [
"com.google.common.base.Preconditions",
"org.apache.calcite.sql.type.SqlReturnTypeInference"
] | import com.google.common.base.Preconditions; import org.apache.calcite.sql.type.SqlReturnTypeInference; | import com.google.common.base.*; import org.apache.calcite.sql.type.*; | [
"com.google.common",
"org.apache.calcite"
] | com.google.common; org.apache.calcite; | 1,245,700 |
public void start() throws SmppChannelException;
/**
* Stops the SMPP server. Closes all child sockets and then closes all server
* socket connectors by unbinding them from ports. Once stopped, the server
* can be started again. If a server will no longer be used, please follow
* a call to... | void function() throws SmppChannelException; /** * Stops the SMPP server. Closes all child sockets and then closes all server * socket connectors by unbinding them from ports. Once stopped, the server * can be started again. If a server will no longer be used, please follow * a call to stop by calling {@see #shutdown()... | /**
* Starts the SMPP server. Binds all server socket connectors to configured
* ports.
*/ | Starts the SMPP server. Binds all server socket connectors to configured ports | start | {
"repo_name": "aspan/cloudhopper-smpp",
"path": "src/main/java/com/cloudhopper/smpp/SmppServer.java",
"license": "apache-2.0",
"size": 2251
} | [
"com.cloudhopper.smpp.type.SmppChannelException"
] | import com.cloudhopper.smpp.type.SmppChannelException; | import com.cloudhopper.smpp.type.*; | [
"com.cloudhopper.smpp"
] | com.cloudhopper.smpp; | 2,695,608 |
@Test
public void testExpandedMapItem() throws Throwable
{
for (boolean frozen : new boolean[]{ false, true })
{
createTable(String.format("CREATE TABLE %%s (k int PRIMARY KEY, m %s)",
frozen
? "frozen<ma... | void function() throws Throwable { for (boolean frozen : new boolean[]{ false, true }) { createTable(String.format(STR, frozen ? STR : STR)); execute(STR); check_applies_map(STR); check_applies_map(STR); check_applies_map(STR); check_applies_map(STR); check_applies_map(STR); check_applies_map(STR); check_applies_map(ST... | /**
* Test expanded functionality from CASSANDRA-6839,
* migrated from cql_tests.py:TestCQL.expanded_map_item_conditional_test()
*/ | Test expanded functionality from CASSANDRA-6839, migrated from cql_tests.py:TestCQL.expanded_map_item_conditional_test() | testExpandedMapItem | {
"repo_name": "MichaelTong/cassandra-rapid",
"path": "test/unit/org/apache/cassandra/cql3/validation/operations/InsertUpdateIfConditionTest.java",
"license": "apache-2.0",
"size": 109252
} | [
"java.lang.String",
"org.apache.cassandra.exceptions.InvalidRequestException",
"org.apache.cassandra.exceptions.SyntaxException"
] | import java.lang.String; import org.apache.cassandra.exceptions.InvalidRequestException; import org.apache.cassandra.exceptions.SyntaxException; | import java.lang.*; import org.apache.cassandra.exceptions.*; | [
"java.lang",
"org.apache.cassandra"
] | java.lang; org.apache.cassandra; | 2,048,693 |
default ScriptException convertToScriptException(Throwable t, Map<String, List<String>> extraMetadata) {
// create a script stack: this is just the script portion
List<String> scriptStack = new ArrayList<>();
for (StackTraceElement element : t.getStackTrace()) {
if (WriterConstan... | default ScriptException convertToScriptException(Throwable t, Map<String, List<String>> extraMetadata) { List<String> scriptStack = new ArrayList<>(); for (StackTraceElement element : t.getStackTrace()) { if (WriterConstants.CLASS_NAME.equals(element.getClassName())) { int offset = element.getLineNumber(); if (offset =... | /**
* Adds stack trace and other useful information to exceptions thrown
* from a Painless script.
* @param t The throwable to build an exception around.
* @return The generated ScriptException.
*/ | Adds stack trace and other useful information to exceptions thrown from a Painless script | convertToScriptException | {
"repo_name": "gfyoung/elasticsearch",
"path": "modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessScript.java",
"license": "apache-2.0",
"size": 4931
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.elasticsearch.script.ScriptException"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; import org.elasticsearch.script.ScriptException; | import java.util.*; import org.elasticsearch.script.*; | [
"java.util",
"org.elasticsearch.script"
] | java.util; org.elasticsearch.script; | 2,315,226 |
@Deployment
public void testStartTimerEventSubProcessInParallelMultiInstanceSubProcessWithNonInterruptingBoundaryTimerEvent() {
DummyServiceTask.wasExecuted = false;
// start process instance
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process");
// execute multiIns... | void function() { DummyServiceTask.wasExecuted = false; ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(STR); ExecutionQuery executionQuery = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()); assertEquals(6, executionQuery.count()); TaskQuery taskQuery = taskSe... | /**
* test scenario: - start process instance with multiInstance parallel -
* execute interrupting timer job of event subprocess - execute non
* interrupting timer boundary event of subprocess
*/ | test scenario: - start process instance with multiInstance parallel - execute interrupting timer job of event subprocess - execute non interrupting timer boundary event of subprocess | testStartTimerEventSubProcessInParallelMultiInstanceSubProcessWithNonInterruptingBoundaryTimerEvent | {
"repo_name": "falko/camunda-bpm-platform",
"path": "engine/src/test/java/org/camunda/bpm/engine/test/bpmn/event/timer/StartTimerEventTest.java",
"license": "apache-2.0",
"size": 59250
} | [
"org.camunda.bpm.engine.runtime.ExecutionQuery",
"org.camunda.bpm.engine.runtime.JobQuery",
"org.camunda.bpm.engine.runtime.ProcessInstance",
"org.camunda.bpm.engine.runtime.ProcessInstanceQuery",
"org.camunda.bpm.engine.task.TaskQuery"
] | import org.camunda.bpm.engine.runtime.ExecutionQuery; import org.camunda.bpm.engine.runtime.JobQuery; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.camunda.bpm.engine.runtime.ProcessInstanceQuery; import org.camunda.bpm.engine.task.TaskQuery; | import org.camunda.bpm.engine.runtime.*; import org.camunda.bpm.engine.task.*; | [
"org.camunda.bpm"
] | org.camunda.bpm; | 2,771,901 |
private VisorBaselineTaskResult set0(Collection<BaselineNode> baselineTop) {
ignite.cluster().setBaselineTopology(baselineTop);
return collect();
} | VisorBaselineTaskResult function(Collection<BaselineNode> baselineTop) { ignite.cluster().setBaselineTopology(baselineTop); return collect(); } | /**
* Set new baseline.
*
* @param baselineTop Collection of baseline node.
* @return Baseline descriptor.
*/ | Set new baseline | set0 | {
"repo_name": "psadusumilli/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/visor/baseline/VisorBaselineTask.java",
"license": "apache-2.0",
"size": 7599
} | [
"java.util.Collection",
"org.apache.ignite.cluster.BaselineNode"
] | import java.util.Collection; import org.apache.ignite.cluster.BaselineNode; | import java.util.*; import org.apache.ignite.cluster.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 2,632,198 |
@Test
public final void testMapPathToConfirmedElements5b()
{// questions are [[s, c, d], [s, c, c, f], [s, c, c, e]] where only s exists in the original graph
LearnerGraph hardFacts = new LearnerGraph(mainConfiguration);hardFacts.initPTA();
hardFacts.paths.augmentPTA(labelList(new String[]{"s","t"}),
... | final void function() { LearnerGraph hardFacts = new LearnerGraph(mainConfiguration);hardFacts.initPTA(); hardFacts.paths.augmentPTA(labelList(new String[]{"s","t"}), true, false, JUConstants.BLUE); List<Boolean> result = PathRoutines.mapPathToConfirmedElements(hardFacts,labelList(new String[]{ "a","b","c"}), new Learn... | /** Tests <em>mapPathToConfirmedElements</em>.
* Path matches if-then and "then" element confirms a path
*/ | Tests mapPathToConfirmedElements. Path matches if-then and "then" element confirms a path | testMapPathToConfirmedElements5b | {
"repo_name": "kirilluk/statechum",
"path": "tests/statechum/analysis/learning/rpnicore/TestAugmentUsingIFTHEN.java",
"license": "gpl-3.0",
"size": 100505
} | [
"java.util.Arrays",
"java.util.List",
"org.junit.Assert"
] | import java.util.Arrays; import java.util.List; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 1,726,884 |
@Test
public void testInterceptSuccessCustomForm() throws Exception {
isInterceptedMethod = true;
hamClass = CUSTOM_FORM_CLASS;
ltci.setMPP(mpp);
Object expect = AuthenticationStatus.SUCCESS;
Properties props = new Properties();
String storedReq = "http://localhos... | void function() throws Exception { isInterceptedMethod = true; hamClass = CUSTOM_FORM_CLASS; ltci.setMPP(mpp); Object expect = AuthenticationStatus.SUCCESS; Properties props = new Properties(); String storedReq = STRhttp: withInvocationContext(expect).withParams().withReferrer().withGetURL(storedReq, requestUrl).withAu... | /**
* valid method. valid objects.
* Make sure that AuthenticationStatus.SUCCESS is returned along with redirection to the original url.
*/ | valid method. valid objects. Make sure that AuthenticationStatus.SUCCESS is returned along with redirection to the original url | testInterceptSuccessCustomForm | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.javaeesec.cdi/test/com/ibm/ws/security/javaeesec/cdi/beans/LoginToContinueInterceptorTest.java",
"license": "epl-1.0",
"size": 33347
} | [
"java.util.Properties",
"javax.security.enterprise.AuthenticationStatus",
"org.junit.Assert"
] | import java.util.Properties; import javax.security.enterprise.AuthenticationStatus; import org.junit.Assert; | import java.util.*; import javax.security.enterprise.*; import org.junit.*; | [
"java.util",
"javax.security",
"org.junit"
] | java.util; javax.security; org.junit; | 846,208 |
public static long vlongFromBytes(ImmutableBytesWritable ptr) {
final byte [] buffer = ptr.get();
final int offset = ptr.getOffset();
byte firstByte = buffer[offset];
int len = WritableUtils.decodeVIntSize(firstByte);
if (len == 1) {
ptr.set(buffer, offset+1, ptr.... | static long function(ImmutableBytesWritable ptr) { final byte [] buffer = ptr.get(); final int offset = ptr.getOffset(); byte firstByte = buffer[offset]; int len = WritableUtils.decodeVIntSize(firstByte); if (len == 1) { ptr.set(buffer, offset+1, ptr.getLength()); return firstByte; } long i = 0; for (int idx = 0; idx <... | /**
* Decode a vint from the buffer pointed at to by ptr and
* increment the offset of the ptr by the length of the
* vint.
* @param ptr a pointer to a byte array buffer
* @return the decoded vint value as a long
*/ | Decode a vint from the buffer pointed at to by ptr and increment the offset of the ptr by the length of the vint | vlongFromBytes | {
"repo_name": "apurtell/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/util/ByteUtil.java",
"license": "apache-2.0",
"size": 20607
} | [
"org.apache.hadoop.hbase.io.ImmutableBytesWritable",
"org.apache.hadoop.io.WritableUtils"
] | import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.io.WritableUtils; | import org.apache.hadoop.hbase.io.*; import org.apache.hadoop.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,750,124 |
public Map<String, String> getAll() {
Map<String, String> parameters = new HashMap<>();
getParameterMap().forEach((key, value) -> parameters.put(key, value.get(0)));
return parameters;
} | Map<String, String> function() { Map<String, String> parameters = new HashMap<>(); getParameterMap().forEach((key, value) -> parameters.put(key, value.get(0))); return parameters; } | /**
* Returns map containing key and value of query parameters or empty map if there are no
* parameters.
*
* <p>Note that if multiple parameters have been specified with the same name, the result will
* contains only first one.
*
* @return map with query parameters
*/ | Returns map containing key and value of query parameters or empty map if there are no parameters. Note that if multiple parameters have been specified with the same name, the result will contains only first one | getAll | {
"repo_name": "sleshchenko/che",
"path": "ide/commons-gwt/src/main/java/org/eclipse/che/ide/QueryParameters.java",
"license": "epl-1.0",
"size": 1704
} | [
"com.google.gwt.user.client.Window",
"java.util.HashMap",
"java.util.Map"
] | import com.google.gwt.user.client.Window; import java.util.HashMap; import java.util.Map; | import com.google.gwt.user.client.*; import java.util.*; | [
"com.google.gwt",
"java.util"
] | com.google.gwt; java.util; | 502,233 |
public static void sendVersionUpdate(String toEmail,
String version,
String configFolder)
throws IOException {
log.info("Sending version update notification to " + toEmail);
Map<String, String> m = new Hash... | static void function(String toEmail, String version, String configFolder) throws IOException { log.info(STR + toEmail); Map<String, String> m = new HashMap<String,String>(); m.put(STR, version); populateInstallerUrls(m); sendEmail(jsonToSendEmail(STR, STR, null, null, toEmail, null, STR, m)); } | /**
* Send a notification update e-mail.
*
* @param toEmail The email to which the e-mail should be sent.
* @param version The version string to display in the e-mail.
* @param configFolder The location where the installers can be found.
*
* @see populateInstallerUrls for the format o... | Send a notification update e-mail | sendVersionUpdate | {
"repo_name": "getlantern/lantern-controller",
"path": "src/main/java/org/lantern/MandrillEmailer.java",
"license": "gpl-3.0",
"size": 16154
} | [
"java.io.IOException",
"java.util.HashMap",
"java.util.Map"
] | import java.io.IOException; import java.util.HashMap; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,502,547 |
@Override
public Enumeration listOptions() {
Vector newVector = new Vector(2);
newVector.addElement(new Option(
"\tThe name of the database field to cache over.\n"
+ "\teg: \"Fold\" (default none)",
"F", 1,
"-F <field name>"));
newVector.addElement(new Option(
"\tThe fu... | Enumeration function() { Vector newVector = new Vector(2); newVector.addElement(new Option( STR + STRFold\STR, "F", 1, STR)); newVector.addElement(new Option( STR + STR, "W", 1, STR)); if ((m_ResultProducer != null) && (m_ResultProducer instanceof OptionHandler)) { newVector.addElement(new Option( STRSTR\nOptions speci... | /**
* Returns an enumeration describing the available options..
*
* @return an enumeration of all the available options.
*/ | Returns an enumeration describing the available options. | listOptions | {
"repo_name": "goddesss/DataModeling",
"path": "src/weka/experiment/DatabaseResultProducer.java",
"license": "gpl-2.0",
"size": 23186
} | [
"java.util.Enumeration",
"java.util.Vector"
] | import java.util.Enumeration; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,870,120 |
pref2ns.put(prefix, ns);
List<String> prefixes;
if (ns2pref.containsKey(ns)) {
prefixes = ns2pref.get(ns);
} else {
prefixes = new ArrayList<>();
ns2pref.put(ns, prefixes);
}
prefixes.add(prefix);
} | pref2ns.put(prefix, ns); List<String> prefixes; if (ns2pref.containsKey(ns)) { prefixes = ns2pref.get(ns); } else { prefixes = new ArrayList<>(); ns2pref.put(ns, prefixes); } prefixes.add(prefix); } | /**
* Add a new namespace binding.
*
* @param prefix namespace prefix
* @param ns namespace address
*/ | Add a new namespace binding | add | {
"repo_name": "DASISH/md-mapper",
"path": "src/main/java/nl/mpi/mdmapper/NSContext.java",
"license": "gpl-3.0",
"size": 4033
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,574,686 |
public static boolean getWarningCookie(final RequestContext context) {
val val = ObjectUtils.defaultIfNull(context.getFlowScope().get("warnCookieValue"), Boolean.FALSE.toString()).toString();
return Boolean.parseBoolean(val);
} | static boolean function(final RequestContext context) { val val = ObjectUtils.defaultIfNull(context.getFlowScope().get(STR), Boolean.FALSE.toString()).toString(); return Boolean.parseBoolean(val); } | /**
* Gets warning cookie.
*
* @param context the context
* @return warning cookie value, if present.
*/ | Gets warning cookie | getWarningCookie | {
"repo_name": "GIP-RECIA/cas",
"path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java",
"license": "apache-2.0",
"size": 37755
} | [
"org.apache.commons.lang3.ObjectUtils",
"org.springframework.webflow.execution.RequestContext"
] | import org.apache.commons.lang3.ObjectUtils; import org.springframework.webflow.execution.RequestContext; | import org.apache.commons.lang3.*; import org.springframework.webflow.execution.*; | [
"org.apache.commons",
"org.springframework.webflow"
] | org.apache.commons; org.springframework.webflow; | 2,150,047 |
public static void forwardConnect(Layer fromLayer, Layer toLayer, double weightVal) {
for(int i=0; i<fromLayer.getNeuronsCount(); i++) {
Neuron fromNeuron = fromLayer.getNeuronAt(i);
Neuron toNeuron = toLayer.getNeuronAt(i);
createConnection(fromNeuron, toNeuron, weightVal);
}
}
| static void function(Layer fromLayer, Layer toLayer, double weightVal) { for(int i=0; i<fromLayer.getNeuronsCount(); i++) { Neuron fromNeuron = fromLayer.getNeuronAt(i); Neuron toNeuron = toLayer.getNeuronAt(i); createConnection(fromNeuron, toNeuron, weightVal); } } | /**
* Creates forward connectivity pattern between the specified layers
*
* @param fromLayer
* layer to connect
* @param toLayer
* layer to connect to
*/ | Creates forward connectivity pattern between the specified layers | forwardConnect | {
"repo_name": "mivianmf/ocr-ia",
"path": "neuroph-2.7/sources/neuroph-2.7/Core/src/main/java/org/neuroph/util/ConnectionFactory.java",
"license": "lgpl-2.1",
"size": 6744
} | [
"org.neuroph.core.Layer",
"org.neuroph.core.Neuron"
] | import org.neuroph.core.Layer; import org.neuroph.core.Neuron; | import org.neuroph.core.*; | [
"org.neuroph.core"
] | org.neuroph.core; | 2,175,999 |
Assert.fail("Test 'ECRFFieldValueDaoTransformTest.testToECRFFieldValueInVO' not implemented!");
} | Assert.fail(STR); } | /**
* Test for method ECRFFieldValueDao.toECRFFieldValueInVO
*
* @see org.phoenixctms.ctsms.domain.ECRFFieldValueDao#toECRFFieldValueInVO(org.phoenixctms.ctsms.domain.ECRFFieldValue source, org.phoenixctms.ctsms.vo.ECRFFieldValueInVO target)
*/ | Test for method ECRFFieldValueDao.toECRFFieldValueInVO | testToECRFFieldValueInVO | {
"repo_name": "phoenixctms/ctsms",
"path": "core/src/test/java/org/phoenixctms/ctsms/domain/test/ECRFFieldValueDaoTransformTest.java",
"license": "lgpl-2.1",
"size": 3087
} | [
"org.testng.Assert"
] | import org.testng.Assert; | import org.testng.*; | [
"org.testng"
] | org.testng; | 523,176 |
@SuppressWarnings("unchecked")
public Iterable<ConstraintViolation<?>> convert(final ValidationResultInterface psource,
final E pbean) {
if (psource == null) {
return null;
}
return psource.getValidationErrorSet().stream()
.map(violation -> ConstraintViolationImpl.forBeanValidation( ... | @SuppressWarnings(STR) Iterable<ConstraintViolation<?>> function(final ValidationResultInterface psource, final E pbean) { if (psource == null) { return null; } return psource.getValidationErrorSet().stream() .map(violation -> ConstraintViolationImpl.forBeanValidation( Collections.emptyMap(), violation.getMessage(), pb... | /**
* convert ValidationResultData from server to a ArrayList<ConstraintViolation<?>>
* which can be handled by gwt.
*
* @param psource ValidationResultData to convert
* @param pbean the validated bean (which is not transfered back to client)
* @return ArrayList<ConstraintViolation<?... | convert ValidationResultData from server to a ArrayList<ConstraintViolation<?>> which can be handled by gwt | convert | {
"repo_name": "ManfredTremmel/gwt-bean-validators",
"path": "gwtp-spring-integration/src/main/java/de/knightsoftnet/gwtp/spring/client/converter/ValidationResultDataConverter.java",
"license": "apache-2.0",
"size": 2827
} | [
"de.knightsoftnet.gwtp.spring.shared.data.ValidationResultInterface",
"java.util.Collections",
"java.util.stream.Collectors",
"javax.validation.ConstraintViolation",
"org.hibernate.validator.internal.engine.ConstraintViolationImpl"
] | import de.knightsoftnet.gwtp.spring.shared.data.ValidationResultInterface; import java.util.Collections; import java.util.stream.Collectors; import javax.validation.ConstraintViolation; import org.hibernate.validator.internal.engine.ConstraintViolationImpl; | import de.knightsoftnet.gwtp.spring.shared.data.*; import java.util.*; import java.util.stream.*; import javax.validation.*; import org.hibernate.validator.internal.engine.*; | [
"de.knightsoftnet.gwtp",
"java.util",
"javax.validation",
"org.hibernate.validator"
] | de.knightsoftnet.gwtp; java.util; javax.validation; org.hibernate.validator; | 248,783 |
@Override
protected void initialize() {
super.initialize();
m_Output = new ArrayList();
} | void function() { super.initialize(); m_Output = new ArrayList(); } | /**
* Initializes the members.
*/ | Initializes the members | initialize | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/flow/source/Command.java",
"license": "gpl-3.0",
"size": 19225
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,140,739 |
@JsonProperty( "report_date" )
public int getReportDate() {
return reportDate;
} | @JsonProperty( STR ) int function() { return reportDate; } | /**
* Gets the data and time in milliseconds from the epoc that represents when the scan finished.
*
* @return the data and time in milliseconds from the epoc that represents when the scan finished.
*/ | Gets the data and time in milliseconds from the epoc that represents when the scan finished | getReportDate | {
"repo_name": "tenable/Tenable.io-SDK-for-Java",
"path": "src/main/java/com/tenable/io/api/scans/models/ScanVulnerabilityCountsHistory.java",
"license": "mit",
"size": 4132
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,850,742 |
public final void writeChar(int val) throws IOException
{
write((val >>> 8) & 0xFF);
write((val >>> 0) & 0xFF);
} | final void function(int val) throws IOException { write((val >>> 8) & 0xFF); write((val >>> 0) & 0xFF); } | /**
* Writes the specified 16-bit character to the OutputStream. Only the lower
* 2 bytes are written with the higher of the 2 bytes written first. This
* represents the Unicode value of val.
*
* @param val the character to be written
* @throws IOException If an error occurs attempting to ... | Writes the specified 16-bit character to the OutputStream. Only the lower 2 bytes are written with the higher of the 2 bytes written first. This represents the Unicode value of val | writeChar | {
"repo_name": "belliottsmith/cassandra",
"path": "src/java/org/apache/cassandra/io/util/UnbufferedDataOutputStreamPlus.java",
"license": "apache-2.0",
"size": 13017
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,450,205 |
public static void writeString(COSString string, OutputStream output) throws IOException
{
writeString(string.getBytes(), string.getForceHexForm(), output);
} | static void function(COSString string, OutputStream output) throws IOException { writeString(string.getBytes(), string.getForceHexForm(), output); } | /**
* This will output the given byte getString as a PDF object.
*
* @param string COSString to be written
* @param output The stream to write to.
* @throws IOException If there is an error writing to the stream.
*/ | This will output the given byte getString as a PDF object | writeString | {
"repo_name": "joansmith/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java",
"license": "apache-2.0",
"size": 47041
} | [
"java.io.IOException",
"java.io.OutputStream",
"org.apache.pdfbox.cos.COSString"
] | import java.io.IOException; import java.io.OutputStream; import org.apache.pdfbox.cos.COSString; | import java.io.*; import org.apache.pdfbox.cos.*; | [
"java.io",
"org.apache.pdfbox"
] | java.io; org.apache.pdfbox; | 745,167 |
@Override
public void removeGroup(DeviceId deviceId,
GroupKey appCookie,
ApplicationId appId) {
checkPermission(GROUP_WRITE);
store.deleteGroupDescription(deviceId, appCookie);
} | void function(DeviceId deviceId, GroupKey appCookie, ApplicationId appId) { checkPermission(GROUP_WRITE); store.deleteGroupDescription(deviceId, appCookie); } | /**
* Delete a group associated to an application cookie.
* GROUP_DELETED or GROUP_DELETE_FAILED notifications would be
* provided along with cookie depending on the result of the
* operation on the device.
*
* @param deviceId device identifier
* @param appCookie application cookie t... | Delete a group associated to an application cookie. GROUP_DELETED or GROUP_DELETE_FAILED notifications would be provided along with cookie depending on the result of the operation on the device | removeGroup | {
"repo_name": "osinstom/onos",
"path": "core/net/src/main/java/org/onosproject/net/group/impl/GroupManager.java",
"license": "apache-2.0",
"size": 17794
} | [
"org.onosproject.core.ApplicationId",
"org.onosproject.net.DeviceId",
"org.onosproject.net.group.GroupKey",
"org.onosproject.security.AppGuard"
] | import org.onosproject.core.ApplicationId; import org.onosproject.net.DeviceId; import org.onosproject.net.group.GroupKey; import org.onosproject.security.AppGuard; | import org.onosproject.core.*; import org.onosproject.net.*; import org.onosproject.net.group.*; import org.onosproject.security.*; | [
"org.onosproject.core",
"org.onosproject.net",
"org.onosproject.security"
] | org.onosproject.core; org.onosproject.net; org.onosproject.security; | 2,727,216 |
private static void assertAnnotationsEquals(Annotations actual, SparseAnnotations... annotations) {
SparseAnnotations expected = DefaultAnnotations.builder().build();
for (SparseAnnotations a : annotations) {
expected = DefaultAnnotations.union(expected, a);
}
assertEqual... | static void function(Annotations actual, SparseAnnotations... annotations) { SparseAnnotations expected = DefaultAnnotations.builder().build(); for (SparseAnnotations a : annotations) { expected = DefaultAnnotations.union(expected, a); } assertEquals(expected.keys(), actual.keys()); for (String key : expected.keys()) {... | /**
* Verifies that Annotations created by merging {@code annotations} is
* equal to actual Annotations.
*
* @param actual Annotations to check
* @param annotations
*/ | Verifies that Annotations created by merging annotations is equal to actual Annotations | assertAnnotationsEquals | {
"repo_name": "oplinkoms/onos",
"path": "core/store/dist/src/test/java/org/onosproject/store/device/impl/GossipDeviceStoreTest.java",
"license": "apache-2.0",
"size": 41287
} | [
"org.junit.Assert",
"org.onosproject.net.Annotations",
"org.onosproject.net.DefaultAnnotations",
"org.onosproject.net.SparseAnnotations"
] | import org.junit.Assert; import org.onosproject.net.Annotations; import org.onosproject.net.DefaultAnnotations; import org.onosproject.net.SparseAnnotations; | import org.junit.*; import org.onosproject.net.*; | [
"org.junit",
"org.onosproject.net"
] | org.junit; org.onosproject.net; | 2,540,144 |
public static ConfiguredTarget buildRule(
RuleContext ruleContext,
BaseFunction ruleImplementation,
Map<String, Class<? extends TransitiveInfoProvider>> registeredProviderTypes)
throws InterruptedException {
String expectFailure = ruleContext.attributes().get("expect_failure", Type.STRING)... | static ConfiguredTarget function( RuleContext ruleContext, BaseFunction ruleImplementation, Map<String, Class<? extends TransitiveInfoProvider>> registeredProviderTypes) throws InterruptedException { String expectFailure = ruleContext.attributes().get(STR, Type.STRING); try (Mutability mutability = Mutability.create(ST... | /**
* Create a Rule Configured Target from the ruleContext and the ruleImplementation. The
* registeredProviderTypes map indicates which keys in structs returned by skylark rules
* should be interpreted as native TransitiveInfoProvider instances of type (map value).
*/ | Create a Rule Configured Target from the ruleContext and the ruleImplementation. The registeredProviderTypes map indicates which keys in structs returned by skylark rules should be interpreted as native TransitiveInfoProvider instances of type (map value) | buildRule | {
"repo_name": "Asana/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleConfiguredTargetBuilder.java",
"license": "apache-2.0",
"size": 20889
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.ImmutableMap",
"com.google.devtools.build.lib.analysis.ConfiguredTarget",
"com.google.devtools.build.lib.analysis.RuleConfiguredTargetBuilder",
"com.google.devtools.build.lib.analysis.RuleContext",
"com.google.devtools.build.lib.analysi... | import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.devtools.build.lib.analysis.ConfiguredTarget; import com.google.devtools.build.lib.analysis.RuleConfiguredTargetBuilder; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.... | import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.packages.*; import com.google.devtools.build.lib.syntax.*; import java.util.*; | [
"com.google.common",
"com.google.devtools",
"java.util"
] | com.google.common; com.google.devtools; java.util; | 1,593,341 |
InputStream inputStream = new ByteArrayInputStream(ParserTest.ebmlTagBytes);
Tag ebml1 = ParserUtils.parseTag(inputStream);
Tag ebml2 = TagFactory.createTag("EBML");
assertEquals("EBML:: IDs are not equals", ebml1.getId(), ebml2.getId());
inputStream = new ByteArrayInputStream(ParserTes... | InputStream inputStream = new ByteArrayInputStream(ParserTest.ebmlTagBytes); Tag ebml1 = ParserUtils.parseTag(inputStream); Tag ebml2 = TagFactory.createTag("EBML"); assertEquals(STR, ebml1.getId(), ebml2.getId()); inputStream = new ByteArrayInputStream(ParserTest.ebmlVersionTagBytes); Tag ebmlV1 = ParserUtils.parseTag... | /**
* tests if created and parsed {@link Tag}s have same IDs
*
* @throws IOException
* - in case of any IO errors
* @throws ConverterException
* - in case of any errors during conversion
*/ | tests if created and parsed <code>Tag</code>s have same IDs | testCreateTags | {
"repo_name": "marcus-nl/red5-io",
"path": "src/test/java/org/red5/io/matroska/EncoderTest.java",
"license": "apache-2.0",
"size": 7456
} | [
"java.io.ByteArrayInputStream",
"java.io.InputStream",
"org.junit.Assert",
"org.red5.io.matroska.dtd.Tag",
"org.red5.io.matroska.dtd.TagFactory"
] | import java.io.ByteArrayInputStream; import java.io.InputStream; import org.junit.Assert; import org.red5.io.matroska.dtd.Tag; import org.red5.io.matroska.dtd.TagFactory; | import java.io.*; import org.junit.*; import org.red5.io.matroska.dtd.*; | [
"java.io",
"org.junit",
"org.red5.io"
] | java.io; org.junit; org.red5.io; | 333,270 |
public final Property<DbConnector> dbConnector() {
return metaBean().dbConnector().createProperty(this);
} | final Property<DbConnector> function() { return metaBean().dbConnector().createProperty(this); } | /**
* Gets the the {@code dbConnector} property.
* @return the property, not null
*/ | Gets the the dbConnector property | dbConnector | {
"repo_name": "DevStreet/FinanceAnalytics",
"path": "projects/OG-EngineDB/src/main/java/com/opengamma/enginedb/spring/DbFunctionCostsMasterFactoryBean.java",
"license": "apache-2.0",
"size": 6706
} | [
"com.opengamma.util.db.DbConnector",
"org.joda.beans.Property"
] | import com.opengamma.util.db.DbConnector; import org.joda.beans.Property; | import com.opengamma.util.db.*; import org.joda.beans.*; | [
"com.opengamma.util",
"org.joda.beans"
] | com.opengamma.util; org.joda.beans; | 1,338,404 |
void exec(String eventType, ObjectNode payload) {
RequestHandler requestHandler = handlerMap.get(eventType);
if (requestHandler != null) {
requestHandler.process(payload);
} else {
log.warn("no request handler for event type {}", eventType);
}
} | void exec(String eventType, ObjectNode payload) { RequestHandler requestHandler = handlerMap.get(eventType); if (requestHandler != null) { requestHandler.process(payload); } else { log.warn(STR, eventType); } } | /**
* Finds the appropriate handler and executes the process method.
*
* @param eventType event type
* @param payload message payload
*/ | Finds the appropriate handler and executes the process method | exec | {
"repo_name": "donNewtonAlpha/onos",
"path": "core/api/src/main/java/org/onosproject/ui/UiMessageHandler.java",
"license": "apache-2.0",
"size": 7568
} | [
"com.fasterxml.jackson.databind.node.ObjectNode"
] | import com.fasterxml.jackson.databind.node.ObjectNode; | import com.fasterxml.jackson.databind.node.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 177,020 |
//
// marshal cost
//
@Override
public int toDoubleMarshalCost() {
return Marshal.COST_NUMERIC_LOSSLESS;
} | int function() { return Marshal.COST_NUMERIC_LOSSLESS; } | /**
* Cost to convert to a double
*/ | Cost to convert to a double | toDoubleMarshalCost | {
"repo_name": "CleverCloud/Quercus",
"path": "quercus/src/main/java/com/caucho/quercus/env/LongValue.java",
"license": "gpl-2.0",
"size": 11875
} | [
"com.caucho.quercus.marshal.Marshal"
] | import com.caucho.quercus.marshal.Marshal; | import com.caucho.quercus.marshal.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 1,084,465 |
ModuleComponentArtifactMetadata artifact(String type, @Nullable String extension, @Nullable String classifier); | ModuleComponentArtifactMetadata artifact(String type, @Nullable String extension, @Nullable String classifier); | /**
* Creates an artifact for this module. Does not mutate this metadata.
*/ | Creates an artifact for this module. Does not mutate this metadata | artifact | {
"repo_name": "lsmaira/gradle",
"path": "subprojects/dependency-management/src/main/java/org/gradle/internal/component/external/model/ModuleComponentResolveMetadata.java",
"license": "apache-2.0",
"size": 2394
} | [
"javax.annotation.Nullable"
] | import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,534,315 |
protected void adjustPositionY(int velocityY) {
int childCount = getChildCount();
if (childCount > 0) {
int curPosition = ViewUtils.getCenterYChildPosition(this);
int childHeight = getHeight() - getPaddingTop() - getPaddingBottom();
int flingCount = (int) (velocit... | void function(int velocityY) { int childCount = getChildCount(); if (childCount > 0) { int curPosition = ViewUtils.getCenterYChildPosition(this); int childHeight = getHeight() - getPaddingTop() - getPaddingBottom(); int flingCount = (int) (velocityY * mFlingFactor / childHeight); int targetPosition = curPosition + flin... | /***
* adjust position before Touch event complete and fling action start.
*/ | adjust position before Touch event complete and fling action start | adjustPositionY | {
"repo_name": "smred/InfiniteRecyclerViewPager",
"path": "lib/src/main/java/ru/smred/recyclerviewpager/RecyclerViewPager.java",
"license": "apache-2.0",
"size": 14767
} | [
"android.util.Log",
"android.view.View"
] | import android.util.Log; import android.view.View; | import android.util.*; import android.view.*; | [
"android.util",
"android.view"
] | android.util; android.view; | 1,255,466 |
KinesisClient getKinesisClient(); | KinesisClient getKinesisClient(); | /**
* Returns a Kinesis client after a factory method determines which one to return.
*
* @return KinesisClient client
*/ | Returns a Kinesis client after a factory method determines which one to return | getKinesisClient | {
"repo_name": "nikhilvibhav/camel",
"path": "components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/KinesisInternalClient.java",
"license": "apache-2.0",
"size": 1238
} | [
"software.amazon.awssdk.services.kinesis.KinesisClient"
] | import software.amazon.awssdk.services.kinesis.KinesisClient; | import software.amazon.awssdk.services.kinesis.*; | [
"software.amazon.awssdk"
] | software.amazon.awssdk; | 2,817,271 |
public void drawFps( Canvas canvas )
{
if( canvas == null )
return;
// Redraw the FPS indicator
if( mFpsFrame != null )
mFpsFrame.draw( canvas );
// Draw each digit of the FPS number
for( Image digit : mFpsDigits )
dig... | void function( Canvas canvas ) { if( canvas == null ) return; if( mFpsFrame != null ) mFpsFrame.draw( canvas ); for( Image digit : mFpsDigits ) digit.draw( canvas ); } | /**
* Draws the FPS indicator.
*
* @param canvas The canvas on which to draw.
*/ | Draws the FPS indicator | drawFps | {
"repo_name": "paulscode/mupen64plus-ae",
"path": "src/paulscode/android/mupen64plusae/input/map/VisibleTouchMap.java",
"license": "gpl-3.0",
"size": 19395
} | [
"android.graphics.Canvas"
] | import android.graphics.Canvas; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,504,041 |
public int countIn(CharSequence sequence, CountMethod countMethod, SpanCondition spanCondition) {
int count = 0;
int start = 0;
SpanCondition skipSpan = spanCondition == SpanCondition.NOT_CONTAINED ? SpanCondition.SIMPLE
: SpanCondition.NOT_CONTAINED;
final int length... | int function(CharSequence sequence, CountMethod countMethod, SpanCondition spanCondition) { int count = 0; int start = 0; SpanCondition skipSpan = spanCondition == SpanCondition.NOT_CONTAINED ? SpanCondition.SIMPLE : SpanCondition.NOT_CONTAINED; final int length = sequence.length(); OutputInt spanCount = null; while (s... | /**
* Returns the number of matching characters found in a character sequence.
* The code alternates spans; see the class doc for {@link UnicodeSetSpanner} for a note about boundary conditions.
* @param sequence
* the sequence to count characters in
* @param countMethod
* ... | Returns the number of matching characters found in a character sequence. The code alternates spans; see the class doc for <code>UnicodeSetSpanner</code> for a note about boundary conditions | countIn | {
"repo_name": "life-beam/j2objc",
"path": "jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSetSpanner.java",
"license": "apache-2.0",
"size": 15212
} | [
"android.icu.text.UnicodeSet",
"android.icu.util.OutputInt"
] | import android.icu.text.UnicodeSet; import android.icu.util.OutputInt; | import android.icu.text.*; import android.icu.util.*; | [
"android.icu"
] | android.icu; | 2,463,335 |
public DTMAxisIterator getAxisIterator(final int axis)
{
switch (axis)
{
case Axis.SELF:
return new SingletonIterator();
case Axis.CHILD:
return new ChildrenIterator();
case Axis.PARENT:
return new ParentIterator... | DTMAxisIterator function(final int axis) { switch (axis) { case Axis.SELF: return new SingletonIterator(); case Axis.CHILD: return new ChildrenIterator(); case Axis.PARENT: return new ParentIterator(); case Axis.ANCESTOR: return new AncestorIterator(); case Axis.ANCESTORORSELF: return (new AncestorIterator()).includeSe... | /**
* This is a shortcut to the iterators that implement the
* supported XPath axes (only namespace::) is not supported.
* Returns a bare-bones iterator that must be initialized
* with a start node (using iterator.setStartNode()).
*/ | This is a shortcut to the iterators that implement the supported XPath axes (only namespace::) is not supported. Returns a bare-bones iterator that must be initialized with a start node (using iterator.setStartNode()) | getAxisIterator | {
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/com/sun/org/apache/xalan/internal/xsltc/dom/SAXImpl.java",
"license": "apache-2.0",
"size": 61260
} | [
"com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary",
"com.sun.org.apache.xml.internal.dtm.Axis",
"com.sun.org.apache.xml.internal.dtm.DTMAxisIterator"
] | import com.sun.org.apache.xalan.internal.xsltc.runtime.BasisLibrary; import com.sun.org.apache.xml.internal.dtm.Axis; import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator; | import com.sun.org.apache.xalan.internal.xsltc.runtime.*; import com.sun.org.apache.xml.internal.dtm.*; | [
"com.sun.org"
] | com.sun.org; | 111,636 |
return sendAsync(HttpMethod.POST, body);
} | return sendAsync(HttpMethod.POST, body); } | /**
* Invokes the method and returns a future with the result
* @return a future with the result
*/ | Invokes the method and returns a future with the result | postAsync | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/WorkbookFunctionsCountIfsRequest.java",
"license": "mit",
"size": 2993
} | [
"com.microsoft.graph.http.HttpMethod"
] | import com.microsoft.graph.http.HttpMethod; | import com.microsoft.graph.http.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 1,223,039 |
private static void uaRowSumEqNe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) {
int agg0 = sumEqNe(0.0, bv, bOp);
int m = in.rlen;
for( int i=0; i<m; i++ ) {
double ai = in.quickGetValue(i, 0);
int cnt = (ai == 0) ? agg0: sumEqNe(ai, bv, bOp);
out.quickSetValue(i, 0, cnt);
}
} | static void function(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) { int agg0 = sumEqNe(0.0, bv, bOp); int m = in.rlen; for( int i=0; i<m; i++ ) { double ai = in.quickGetValue(i, 0); int cnt = (ai == 0) ? agg0: sumEqNe(ai, bv, bOp); out.quickSetValue(i, 0, cnt); } } | /**
* UAgg rowSums for Equal and NotEqual operator
*
* @param in input matrix block
* @param out output matrix block
* @param bv ?
* @param bOp binary operator
*/ | UAgg rowSums for Equal and NotEqual operator | uaRowSumEqNe | {
"repo_name": "nakul02/incubator-systemml",
"path": "src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixOuterAgg.java",
"license": "apache-2.0",
"size": 42804
} | [
"org.apache.sysml.runtime.matrix.operators.BinaryOperator"
] | import org.apache.sysml.runtime.matrix.operators.BinaryOperator; | import org.apache.sysml.runtime.matrix.operators.*; | [
"org.apache.sysml"
] | org.apache.sysml; | 2,406,179 |
public void setJobRepository(JobRepository repository);
| void function(JobRepository repository); | /**
* Sets the {@link JobRepository} that this Batchmgr will use to persist
* {@link Job} information while {@link Job}s are executing.
*
* @param repository
*/ | Sets the <code>JobRepository</code> that this Batchmgr will use to persist <code>Job</code> information while <code>Job</code>s are executing | setJobRepository | {
"repo_name": "OSBI/oodt",
"path": "resource/src/main/java/org/apache/oodt/cas/resource/batchmgr/Batchmgr.java",
"license": "apache-2.0",
"size": 2899
} | [
"org.apache.oodt.cas.resource.jobrepo.JobRepository"
] | import org.apache.oodt.cas.resource.jobrepo.JobRepository; | import org.apache.oodt.cas.resource.jobrepo.*; | [
"org.apache.oodt"
] | org.apache.oodt; | 2,169,770 |
Set<Authorizer> getAuthorizers(Class<?> targetClass, Method targetMethod)
{
if (!isMethodMetaDataAvailable(targetClass, targetMethod))
{
registerSecuredMethod(targetClass, targetMethod);
}
return getMethodAuthorizers(targetClass, targetMethod);
} | Set<Authorizer> getAuthorizers(Class<?> targetClass, Method targetMethod) { if (!isMethodMetaDataAvailable(targetClass, targetMethod)) { registerSecuredMethod(targetClass, targetMethod); } return getMethodAuthorizers(targetClass, targetMethod); } | /**
* This method is invoked by the security interceptor to obtain the
* authorizer stack for a secured method
*
* @param targetClass
* @param targetMethod
* @return
*/ | This method is invoked by the security interceptor to obtain the authorizer stack for a secured method | getAuthorizers | {
"repo_name": "sbryzak/DeltaSpike",
"path": "deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/authorization/SecurityMetaDataStorage.java",
"license": "apache-2.0",
"size": 8538
} | [
"java.lang.reflect.Method",
"java.util.Set"
] | import java.lang.reflect.Method; import java.util.Set; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 728,335 |
void start() throws IOException, TooManyListenersException {
inputStream = port.getInputStream();
outputStream = port.getOutputStream();
ReadWorker w = new ReadWorker();
w.start();
port.addEventListener(this);
((SerialConnector) getService()).getIdleStatusChecker0().a... | void start() throws IOException, TooManyListenersException { inputStream = port.getInputStream(); outputStream = port.getOutputStream(); ReadWorker w = new ReadWorker(); w.start(); port.addEventListener(this); ((SerialConnector) getService()).getIdleStatusChecker0().addSession(this); try { getService().getFilterChainBu... | /**
* start handling streams
*
* @throws IOException
* @throws TooManyListenersException
*/ | start handling streams | start | {
"repo_name": "zuoyebushiwo/apache-mina-2.0.9",
"path": "src/mina-transport-serial/src/main/java/org/apache/mina/transport/serial/SerialSessionImpl.java",
"license": "apache-2.0",
"size": 10426
} | [
"java.io.IOException",
"java.util.TooManyListenersException"
] | import java.io.IOException; import java.util.TooManyListenersException; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,188,518 |
public static Account getSyncAccount(Context context) {
// Get an instance of the Android account manager
AccountManager accountManager =
(AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);
// Create the account type and default account
Account newAcc... | static Account function(Context context) { AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE); Account newAccount = new Account( context.getString(R.string.app_name), context.getString(R.string.sync_account_type)); if ( null == accountManager.getPassword(newAccount) ) { i... | /**
* Helper method to get the fake account to be used with SyncAdapter, or make a new one
* if the fake account doesn't exist yet. If we make a new account, we call the
* onAccountCreated method so we can initialize things.
*
* @param context The context used to access the account service
... | Helper method to get the fake account to be used with SyncAdapter, or make a new one if the fake account doesn't exist yet. If we make a new account, we call the onAccountCreated method so we can initialize things | getSyncAccount | {
"repo_name": "cuongutd/Ubiquitous",
"path": "app/src/main/java/com/example/android/sunshine/app/sync/SunshineSyncAdapter.java",
"license": "apache-2.0",
"size": 34109
} | [
"android.accounts.Account",
"android.accounts.AccountManager",
"android.content.Context"
] | import android.accounts.Account; import android.accounts.AccountManager; import android.content.Context; | import android.accounts.*; import android.content.*; | [
"android.accounts",
"android.content"
] | android.accounts; android.content; | 1,657,374 |
private void checkForSinkButNoOpenClassError() {
//vector used to contain the complete set of station keys
Vector<Object> stationSet = station_def.getStationKeys();
//variable used to count the number of sink station
int nSink = 0;
//for cycle used to count the number of sink
for (int i = 0; i < stationS... | void function() { Vector<Object> stationSet = station_def.getStationKeys(); int nSink = 0; for (int i = 0; i < stationSet.size(); i++) { Object thisStation = stationSet.get(i); String stationType = station_def.getStationType(thisStation); if (stationType.equals(STATION_TYPE_SINK)) { nSink++; } } if (nSink > 0) { int nO... | /**
* Checks if there is at least a sink but no open classes have been defined
*/ | Checks if there is at least a sink but no open classes have been defined | checkForSinkButNoOpenClassError | {
"repo_name": "HOMlab/QN-ACTR-Release",
"path": "QN-ACTR Java/src/jmt/gui/common/controller/ModelChecker.java",
"license": "lgpl-3.0",
"size": 87268
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,200,127 |
public static void chkId(String id, String className) throws IllegalArgumentException {
checkArgument(!(Strings.isNullOrEmpty(id)), className + " instance id property must be specified.");
} | static void function(String id, String className) throws IllegalArgumentException { checkArgument(!(Strings.isNullOrEmpty(id)), className + STR); } | /**
* Check if identifier is null or empty.
*
* @param id
* @throws IllegalArgumentException
*/ | Check if identifier is null or empty | chkId | {
"repo_name": "IMSGlobal/caliper-java-public",
"path": "src/main/java/org/imsglobal/caliper/validators/SensorValidator.java",
"license": "lgpl-3.0",
"size": 3208
} | [
"com.google.common.base.Preconditions",
"com.google.common.base.Strings"
] | import com.google.common.base.Preconditions; import com.google.common.base.Strings; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,978,637 |
public Status checkIndex(List<String> onlySegments) throws IOException {
NumberFormat nf = NumberFormat.getInstance();
SegmentInfos sis = new SegmentInfos();
Status result = new Status();
result.dir = dir;
try {
sis.read(dir);
} catch (Throwable t) {
msg("ERROR: could not read any ... | Status function(List<String> onlySegments) throws IOException { NumberFormat nf = NumberFormat.getInstance(); SegmentInfos sis = new SegmentInfos(); Status result = new Status(); result.dir = dir; try { sis.read(dir); } catch (Throwable t) { msg(STR); result.missingSegments = true; if (infoStream != null) t.printStackT... | /** Returns a {@link Status} instance detailing
* the state of the index.
*
* @param onlySegments list of specific segment names to check
*
* <p>As this method checks every byte in the specified
* segments, on a large index it can take quite a long
* time to run.
*
* <p><b>WARNING</b>:... | Returns a <code>Status</code> instance detailing the state of the index | checkIndex | {
"repo_name": "tokee/lucene",
"path": "src/java/org/apache/lucene/index/CheckIndex.java",
"license": "apache-2.0",
"size": 32345
} | [
"java.io.IOException",
"java.text.NumberFormat",
"java.util.List",
"org.apache.lucene.store.IndexInput"
] | import java.io.IOException; import java.text.NumberFormat; import java.util.List; import org.apache.lucene.store.IndexInput; | import java.io.*; import java.text.*; import java.util.*; import org.apache.lucene.store.*; | [
"java.io",
"java.text",
"java.util",
"org.apache.lucene"
] | java.io; java.text; java.util; org.apache.lucene; | 2,607,791 |
public boolean sshFileExists(SFTPv3Client sftpClient, String filename) {
try {
SFTPv3FileAttributes attributes = sftpClient.stat(filename);
if (attributes != null) {
return (attributes.isRegularFile());
} else {
retu... | boolean function(SFTPv3Client sftpClient, String filename) { try { SFTPv3FileAttributes attributes = sftpClient.stat(filename); if (attributes != null) { return (attributes.isRegularFile()); } else { return false; } } catch (Exception e) { return false; } } | /**
* Check existence of a file
*
* @param sftpClient
* @param filename
* @return true, if file exists
* @throws Exception
*/ | Check existence of a file | sshFileExists | {
"repo_name": "dianhu/Kettle-Research",
"path": "src/org/pentaho/di/job/entries/ssh2put/JobEntrySSH2PUT.java",
"license": "lgpl-2.1",
"size": 37686
} | [
"com.trilead.ssh2.SFTPv3Client",
"com.trilead.ssh2.SFTPv3FileAttributes"
] | import com.trilead.ssh2.SFTPv3Client; import com.trilead.ssh2.SFTPv3FileAttributes; | import com.trilead.ssh2.*; | [
"com.trilead.ssh2"
] | com.trilead.ssh2; | 2,248,758 |
@SuppressWarnings("unused")
void moveLsnAfter(OLogSequenceNumber lsn) throws IOException; | @SuppressWarnings(STR) void moveLsnAfter(OLogSequenceNumber lsn) throws IOException; | /**
* Next LSN generated by WAL will be bigger than passed in value. DO NOT REMOVE IT, USED IN
* ENTERPRISE STORAGE.
*/ | Next LSN generated by WAL will be bigger than passed in value. DO NOT REMOVE IT, USED IN ENTERPRISE STORAGE | moveLsnAfter | {
"repo_name": "orientechnologies/orientdb",
"path": "core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/paginated/wal/OWriteAheadLog.java",
"license": "apache-2.0",
"size": 5926
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,010,480 |
public String getResourceType() {
String result = null;
if (attributes != null) {
Attribute attribute = attributes.get(TYPE);
if (attribute != null) {
try {
result = attribute.get().toString();
} catch (NamingException e) {
... | String function() { String result = null; if (attributes != null) { Attribute attribute = attributes.get(TYPE); if (attribute != null) { try { result = attribute.get().toString(); } catch (NamingException e) { } } } if (result == null) { if (collection) result = COLLECTION_TYPE; } return result; } | /**
* Get resource type.
*
* @return String resource type
*/ | Get resource type | getResourceType | {
"repo_name": "mayonghui2112/helloWorld",
"path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/naming/resources/ResourceAttributes.java",
"license": "apache-2.0",
"size": 29134
} | [
"javax.naming.NamingException",
"javax.naming.directory.Attribute"
] | import javax.naming.NamingException; import javax.naming.directory.Attribute; | import javax.naming.*; import javax.naming.directory.*; | [
"javax.naming"
] | javax.naming; | 1,536,888 |
public int next() throws IOException, XNIException {
return fDriver.next();
}
//
// XMLComponent methods
// | int function() throws IOException, XNIException { return fDriver.next(); } // | /** return the next state on the input
* @return int
*/ | return the next state on the input | next | {
"repo_name": "shelan/jdk9-mirror",
"path": "jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java",
"license": "gpl-2.0",
"size": 134769
} | [
"com.sun.org.apache.xerces.internal.xni.XNIException",
"java.io.IOException"
] | import com.sun.org.apache.xerces.internal.xni.XNIException; import java.io.IOException; | import com.sun.org.apache.xerces.internal.xni.*; import java.io.*; | [
"com.sun.org",
"java.io"
] | com.sun.org; java.io; | 605,155 |
public List<Schema> getFields() {
return Collections.unmodifiableList(fields);
} | List<Schema> function() { return Collections.unmodifiableList(fields); } | /**
* Returns the list of fields.
*
* @return Returns the list of fields.
*/ | Returns the list of fields | getFields | {
"repo_name": "jojenki/Concordia",
"path": "lang/java/src/name/jenkins/paul/john/concordia/schema/ObjectSchema.java",
"license": "apache-2.0",
"size": 7309
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 88,043 |
public byte[] getTypesPopped(ClassFile methodClassFile) {
byte[] types = {ClassFile.T_INT, ClassFile.T_INT};
return types;
}
| byte[] function(ClassFile methodClassFile) { byte[] types = {ClassFile.T_INT, ClassFile.T_INT}; return types; } | /**
* Get the types of elements this instruction will pop from the stack.
*
* @param methodClassFile The class file of the method this instruction belongs to.
* @return The types this instruction pops. The length of the arrays reflects the number of
* elements pushed in the order they are pushed.... | Get the types of elements this instruction will pop from the stack | getTypesPopped | {
"repo_name": "wwu-pi/muggl",
"path": "muggl-core/src/de/wwu/muggl/instructions/bytecode/IAdd.java",
"license": "gpl-3.0",
"size": 2789
} | [
"de.wwu.muggl.vm.classfile.ClassFile"
] | import de.wwu.muggl.vm.classfile.ClassFile; | import de.wwu.muggl.vm.classfile.*; | [
"de.wwu.muggl"
] | de.wwu.muggl; | 1,963,157 |
private static void flushFileOutput() {
for(Map.Entry<String,ResultCollector.FileEntry> me : files.entrySet()){
log.debug("Flushing: "+me.getKey());
FileEntry fe = me.getValue();
fe.pw.flush();
if (fe.pw.checkError()){
log.warn("Problem detecte... | static void function() { for(Map.Entry<String,ResultCollector.FileEntry> me : files.entrySet()){ log.debug(STR+me.getKey()); FileEntry fe = me.getValue(); fe.pw.flush(); if (fe.pw.checkError()){ log.warn(STR+me.getKey()); } } } | /**
* Flush PrintWriter, called by Shutdown Hook to ensure no data is lost
*/ | Flush PrintWriter, called by Shutdown Hook to ensure no data is lost | flushFileOutput | {
"repo_name": "ubikfsabbe/jmeter",
"path": "src/core/org/apache/jmeter/reporters/ResultCollector.java",
"license": "apache-2.0",
"size": 24759
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,768,123 |
public void start() throws JMSException {
log.debug("start()");
connection.start();
connectionStarted=true;
} | void function() throws JMSException { log.debug(STR); connection.start(); connectionStarted=true; } | /**
* Calls Connection.start() to begin receiving inbound messages.
* @throws JMSException when starting the context fails
*/ | Calls Connection.start() to begin receiving inbound messages | start | {
"repo_name": "ubikfsabbe/jmeter",
"path": "src/protocol/jms/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java",
"license": "apache-2.0",
"size": 15978
} | [
"javax.jms.JMSException"
] | import javax.jms.JMSException; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 368,939 |
public QueryEntityPart getEntityPart(String entityName) {
if (hasSourceEntity() && getSourceEntity().getName().equals(entityName)) {
return getSourceEntity();
}
else if (hasRelatedEntities()) {
Iterator iter = getListOfRelatedEntities().iterator();
while (iter.hasNext()) {
QueryEntityPart part = (... | QueryEntityPart function(String entityName) { if (hasSourceEntity() && getSourceEntity().getName().equals(entityName)) { return getSourceEntity(); } else if (hasRelatedEntities()) { Iterator iter = getListOfRelatedEntities().iterator(); while (iter.hasNext()) { QueryEntityPart part = (QueryEntityPart) iter.next(); if (... | /**
* Searches the entity with the given name
* @param entityName
* @return query entity part if found, else null
*/ | Searches the entity with the given name | getEntityPart | {
"repo_name": "idega/com.idega.block.dataquery",
"path": "src/java/com/idega/block/dataquery/data/xml/QueryHelper.java",
"license": "gpl-3.0",
"size": 30484
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,517,409 |
public synchronized HBaseParameters getHbaseParameters() {
if (this.hbaseParameters == null) {
this.hbaseParameters = new HBaseParameters();
}
return this.hbaseParameters;
} | synchronized HBaseParameters function() { if (this.hbaseParameters == null) { this.hbaseParameters = new HBaseParameters(); } return this.hbaseParameters; } | /**
* Gets the hbase parameters.
*
* @return the hbase parameters
*/ | Gets the hbase parameters | getHbaseParameters | {
"repo_name": "OpenSourceMasters/hbase-writer",
"path": "src/main/java/org/archive/modules/writer/HBaseWriterProcessor.java",
"license": "lgpl-2.1",
"size": 39308
} | [
"org.archive.io.hbase.HBaseParameters"
] | import org.archive.io.hbase.HBaseParameters; | import org.archive.io.hbase.*; | [
"org.archive.io"
] | org.archive.io; | 1,145,969 |
protected ValueProperties.Builder getResultProperties(final ComputationTarget target) {
return createValueProperties().with(CALCULATION_METHOD, CURVES_METHOD).withAny(CURVE_EXPOSURES).withAny(PROPERTY_CURVE_TYPE).withAny(PROPERTY_ROOT_FINDER_ABSOLUTE_TOLERANCE)
.withAny(PROPERTY_ROOT_FINDER_RELATIVE_TOLER... | ValueProperties.Builder function(final ComputationTarget target) { return createValueProperties().with(CALCULATION_METHOD, CURVES_METHOD).withAny(CURVE_EXPOSURES).withAny(PROPERTY_CURVE_TYPE).withAny(PROPERTY_ROOT_FINDER_ABSOLUTE_TOLERANCE) .withAny(PROPERTY_ROOT_FINDER_RELATIVE_TOLERANCE).withAny(PROPERTY_ROOT_FINDER_... | /**
* Gets the value properties of the result
*
* @param target The computation target
* @return The properties
*/ | Gets the value properties of the result | getResultProperties | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/bondcurves/inflationbondcurves/InflationBondFromCurvesFunction.java",
"license": "apache-2.0",
"size": 9246
} | [
"com.opengamma.engine.ComputationTarget",
"com.opengamma.engine.value.ValueProperties"
] | import com.opengamma.engine.ComputationTarget; import com.opengamma.engine.value.ValueProperties; | import com.opengamma.engine.*; import com.opengamma.engine.value.*; | [
"com.opengamma.engine"
] | com.opengamma.engine; | 758,390 |
default Set<Apo_TypedC<?>> getCliTypedOptions(){
return this.getCliParser().getTypedOptions();
}
| default Set<Apo_TypedC<?>> getCliTypedOptions(){ return this.getCliParser().getTypedOptions(); } | /**
* Returns all CLI typed options.
* @return CLI typed options, empty if none set
*/ | Returns all CLI typed options | getCliTypedOptions | {
"repo_name": "vdmeer/skb-java-interfaces",
"path": "src/main/java/de/vandermeer/skb/interfaces/application/IsApplication.java",
"license": "apache-2.0",
"size": 14161
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 621,880 |
protected boolean getParametersShouldBeWrapped(@NotNull final List<Parameter<DecoratedString, ?>> parameters)
{
final boolean result;
int weight = 0;
for (@Nullable final Parameter<DecoratedString, ?> parameter : parameters)
{
if (parameter != null)
{
... | boolean function(@NotNull final List<Parameter<DecoratedString, ?>> parameters) { final boolean result; int weight = 0; for (@Nullable final Parameter<DecoratedString, ?> parameter : parameters) { if (parameter != null) { weight += parameter.getType().getValue().length(); weight += parameter.getName().getValue().length... | /**
* Checks whether the parameter list would take too much space and should be wrapped.
* @param parameters the parameters.
* @return such information.
*/ | Checks whether the parameter list would take too much space and should be wrapped | getParametersShouldBeWrapped | {
"repo_name": "rydnr/queryj-rt",
"path": "queryj-core/src/main/java/org/acmsl/queryj/metadata/AbstractSqlDecorator.java",
"license": "gpl-2.0",
"size": 24150
} | [
"java.util.List",
"org.acmsl.queryj.customsql.Parameter",
"org.jetbrains.annotations.NotNull",
"org.jetbrains.annotations.Nullable"
] | import java.util.List; import org.acmsl.queryj.customsql.Parameter; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; | import java.util.*; import org.acmsl.queryj.customsql.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.acmsl.queryj",
"org.jetbrains.annotations"
] | java.util; org.acmsl.queryj; org.jetbrains.annotations; | 869,140 |
public CashControlDocument getCashControlDocument() {
return (CashControlDocument) getDocument();
} | CashControlDocument function() { return (CashControlDocument) getDocument(); } | /**
* This method gets the cash control document
*
* @return the CashControlDocument
*/ | This method gets the cash control document | getCashControlDocument | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/document/web/struts/CashControlDocumentForm.java",
"license": "agpl-3.0",
"size": 6554
} | [
"org.kuali.kfs.module.ar.document.CashControlDocument"
] | import org.kuali.kfs.module.ar.document.CashControlDocument; | import org.kuali.kfs.module.ar.document.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,972,801 |
@Override
public void start(int svc) throws ChannelException {
if ( getNext()!=null ) getNext().start(svc);
} | void function(int svc) throws ChannelException { if ( getNext()!=null ) getNext().start(svc); } | /**
* Starts up the channel. This can be called multiple times for individual services to start
* The svc parameter can be the logical or value of any constants
* @param svc int value of <BR>
* DEFAULT - will start all services <BR>
* MBR_RX_SEQ - starts the membership receiver <BR>
* MBR_... | Starts up the channel. This can be called multiple times for individual services to start The svc parameter can be the logical or value of any constants | start | {
"repo_name": "plumer/codana",
"path": "tomcat_files/7.0.61/ChannelInterceptorBase.java",
"license": "mit",
"size": 5535
} | [
"org.apache.catalina.tribes.ChannelException"
] | import org.apache.catalina.tribes.ChannelException; | import org.apache.catalina.tribes.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 966,131 |
@Nonnull
default IErrorList getAllErrors ()
{
return getSubList (IError::isError);
} | default IErrorList getAllErrors () { return getSubList (IError::isError); } | /**
* Get a resource error group containing only the error elements. All error
* levels ≥ {@link EErrorLevel#ERROR} are considered to be an error!
*
* @return A non-<code>null</code> error list containing only the errors.
*/ | Get a resource error group containing only the error elements. All error levels ≥ <code>EErrorLevel#ERROR</code> are considered to be an error | getAllErrors | {
"repo_name": "phax/ph-commons",
"path": "ph-commons/src/main/java/com/helger/commons/error/list/IErrorList.java",
"license": "apache-2.0",
"size": 10916
} | [
"com.helger.commons.error.IError"
] | import com.helger.commons.error.IError; | import com.helger.commons.error.*; | [
"com.helger.commons"
] | com.helger.commons; | 2,485,762 |
@SuppressWarnings("unchecked")
static Object assign(Row row, Object entity, EntityMetadata metadata, Name dataType, EntityType entityType,
String columnName, Field member, MetamodelImpl metamodel)
{
String fieldName = null;
// if metadata is null or it is relational attribute do... | @SuppressWarnings(STR) static Object assign(Row row, Object entity, EntityMetadata metadata, Name dataType, EntityType entityType, String columnName, Field member, MetamodelImpl metamodel) { String fieldName = null; if (metadata != null) { if (columnName.equals(((AbstractAttribute) metadata.getIdAttribute()).getJPAColu... | /**
* assign value to provided entity instance else return value of mapped java
* type.
*
* @param row
* DS row
* @param entity
* JPA entity
* @param metadata
* entity's metadata
* @param dataType
* data type
* @par... | assign value to provided entity instance else return value of mapped java type | assign | {
"repo_name": "ravisund/Kundera",
"path": "src/kundera-cassandra/cassandra-ds-driver/src/main/java/com/impetus/kundera/client/cassandra/dsdriver/DSClientUtilities.java",
"license": "apache-2.0",
"size": 28374
} | [
"com.datastax.driver.core.DataType",
"com.datastax.driver.core.Row",
"com.datastax.driver.core.UDTValue",
"com.impetus.client.cassandra.schemamanager.CassandraDataTranslator",
"com.impetus.client.cassandra.schemamanager.CassandraValidationClassMapper",
"com.impetus.kundera.metadata.model.EntityMetadata",
... | import com.datastax.driver.core.DataType; import com.datastax.driver.core.Row; import com.datastax.driver.core.UDTValue; import com.impetus.client.cassandra.schemamanager.CassandraDataTranslator; import com.impetus.client.cassandra.schemamanager.CassandraValidationClassMapper; import com.impetus.kundera.metadata.model.... | import com.datastax.driver.core.*; import com.impetus.client.cassandra.schemamanager.*; import com.impetus.kundera.metadata.model.*; import com.impetus.kundera.metadata.model.attributes.*; import com.impetus.kundera.property.*; import com.impetus.kundera.utils.*; import java.lang.reflect.*; import java.nio.*; import ja... | [
"com.datastax.driver",
"com.impetus.client",
"com.impetus.kundera",
"java.lang",
"java.nio",
"java.util",
"javax.persistence",
"org.apache.cassandra"
] | com.datastax.driver; com.impetus.client; com.impetus.kundera; java.lang; java.nio; java.util; javax.persistence; org.apache.cassandra; | 1,507,966 |
public void testTemporarilyCloseToAccrual3() {
basicStudy.setCoordinatingCenterStudyStatus(CoordinatingCenterStudyStatus.CLOSED_TO_ACCRUAL_AND_TREATMENT);
EasyMock.expect(c3prExceptionHelper.getRuntimeException(EasyMock.eq(344),EasyMock.aryEq(new String[] { basicStudy.getCoordinatingCenterStudyStatus().getDisp... | void function() { basicStudy.setCoordinatingCenterStudyStatus(CoordinatingCenterStudyStatus.CLOSED_TO_ACCRUAL_AND_TREATMENT); EasyMock.expect(c3prExceptionHelper.getRuntimeException(EasyMock.eq(344),EasyMock.aryEq(new String[] { basicStudy.getCoordinatingCenterStudyStatus().getDisplayName()}))) .andReturn(new C3PRCoded... | /**
* test temporarilyCloseToAccrual
*/ | test temporarilyCloseToAccrual | testTemporarilyCloseToAccrual3 | {
"repo_name": "NCIP/c3pr",
"path": "codebase/projects/core/test/src/java/edu/duke/cabig/c3pr/domain/StudyTestCase.java",
"license": "bsd-3-clause",
"size": 75546
} | [
"edu.duke.cabig.c3pr.constants.CoordinatingCenterStudyStatus",
"edu.duke.cabig.c3pr.exception.C3PRCodedRuntimeException",
"org.easymock.classextension.EasyMock"
] | import edu.duke.cabig.c3pr.constants.CoordinatingCenterStudyStatus; import edu.duke.cabig.c3pr.exception.C3PRCodedRuntimeException; import org.easymock.classextension.EasyMock; | import edu.duke.cabig.c3pr.constants.*; import edu.duke.cabig.c3pr.exception.*; import org.easymock.classextension.*; | [
"edu.duke.cabig",
"org.easymock.classextension"
] | edu.duke.cabig; org.easymock.classextension; | 36,071 |
public Timestamp getStartDate ()
{
return (Timestamp)get_Value(COLUMNNAME_StartDate);
} | Timestamp function () { return (Timestamp)get_Value(COLUMNNAME_StartDate); } | /** Get Start Date.
@return First effective day (inclusive)
*/ | Get Start Date | getStartDate | {
"repo_name": "pplatek/adempiere",
"path": "base/src/org/compiere/model/X_CM_Ad.java",
"license": "gpl-2.0",
"size": 11327
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 959,530 |
public DeploymentProcess getDeploymentProcessForProject(String projectId) throws IllegalArgumentException, IOException {
// TODO: refactor/method extract/clean up
AuthenticatedWebClient.WebResponse response = webClient.get("api/deploymentprocesses/deploymentprocess-" + projectId);
if (respon... | DeploymentProcess function(String projectId) throws IllegalArgumentException, IOException { AuthenticatedWebClient.WebResponse response = webClient.get(STR + projectId); if (response.isErrorCode()) { throw new IOException(String.format(STR, response.getCode(), response.getContent())); } JSONObject json = (JSONObject)JS... | /**
* Return a representation of a deployment process for a given project.
* @param projectId the id of the project to get the process for.
* @return DeploymentProcess a representation of the process
* @throws IllegalArgumentException when the web client receives a bad parameter
* @throws IOExc... | Return a representation of a deployment process for a given project | getDeploymentProcessForProject | {
"repo_name": "jenkinsci/octopusdeploy-plugin",
"path": "src/main/java/com/octopusdeploy/api/DeploymentsApi.java",
"license": "mit",
"size": 7766
} | [
"com.octopusdeploy.api.data.DeploymentProcess",
"com.octopusdeploy.api.data.DeploymentProcessStep",
"com.octopusdeploy.api.data.DeploymentProcessStepAction",
"java.io.IOException",
"java.util.HashMap",
"java.util.HashSet",
"net.sf.json.JSONArray",
"net.sf.json.JSONObject",
"net.sf.json.JSONSerialize... | import com.octopusdeploy.api.data.DeploymentProcess; import com.octopusdeploy.api.data.DeploymentProcessStep; import com.octopusdeploy.api.data.DeploymentProcessStepAction; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import net.sf.json.JSONArray; import net.sf.json.JSONObject; import... | import com.octopusdeploy.api.data.*; import java.io.*; import java.util.*; import net.sf.json.*; | [
"com.octopusdeploy.api",
"java.io",
"java.util",
"net.sf.json"
] | com.octopusdeploy.api; java.io; java.util; net.sf.json; | 2,282,274 |
public CloseableIterator<BlazeGraphAtom> project(final String queryStr,
String externalQueryId) throws Exception {
final Stream<BlazeGraphAtom> stream =
_project(queryStr, externalQueryId)
.map(transforms.graphAtom)
.filter... | CloseableIterator<BlazeGraphAtom> function(final String queryStr, String externalQueryId) throws Exception { final Stream<BlazeGraphAtom> stream = _project(queryStr, externalQueryId) .map(transforms.graphAtom) .filter(Optional::isPresent) .map(Optional::get); return CloseableIterator.of(stream); } | /**
* Project a subgraph using a SPARQL query.
*
* This version allows passing an external system ID to allow association
* between queries in the query engine when using an Embedded Client.
*
* <p>
* Warning: You MUST close this iterator when finished.
*/ | Project a subgraph using a SPARQL query. This version allows passing an external system ID to allow association between queries in the query engine when using an Embedded Client. Warning: You MUST close this iterator when finished | project | {
"repo_name": "blazegraph/tinkerpop3",
"path": "src/main/java/com/blazegraph/gremlin/structure/BlazeGraph.java",
"license": "gpl-2.0",
"size": 56488
} | [
"com.blazegraph.gremlin.listener.BlazeGraphAtom",
"com.blazegraph.gremlin.util.CloseableIterator",
"java.util.Optional",
"java.util.stream.Stream"
] | import com.blazegraph.gremlin.listener.BlazeGraphAtom; import com.blazegraph.gremlin.util.CloseableIterator; import java.util.Optional; import java.util.stream.Stream; | import com.blazegraph.gremlin.listener.*; import com.blazegraph.gremlin.util.*; import java.util.*; import java.util.stream.*; | [
"com.blazegraph.gremlin",
"java.util"
] | com.blazegraph.gremlin; java.util; | 395,737 |
@Override
public void close() {
try {
for (int i = 0; i < nSteppers; i++) {
stepPhidget.setEngaged(i, false);
}
stepPhidget.close(); //close the phidget
stepPhidget = null;
} catch (PhidgetException ex) {
showError("StepperBoard.close", ex);
}
} | void function() { try { for (int i = 0; i < nSteppers; i++) { stepPhidget.setEngaged(i, false); } stepPhidget.close(); stepPhidget = null; } catch (PhidgetException ex) { showError(STR, ex); } } | /**
* Disengage all steppers and close the Phidget.
*/ | Disengage all steppers and close the Phidget | close | {
"repo_name": "billooms/Indexer",
"path": "Phidget StepperBoard/src/com/billooms/stepperboard/StepperBoardImpl.java",
"license": "gpl-3.0",
"size": 23372
} | [
"com.phidgets.PhidgetException"
] | import com.phidgets.PhidgetException; | import com.phidgets.*; | [
"com.phidgets"
] | com.phidgets; | 1,561,537 |
void saveTaskManager(ReadOnlyTaskManager TaskManager) throws IOException; | void saveTaskManager(ReadOnlyTaskManager TaskManager) throws IOException; | /**
* Saves the given {@link ReadOnlyTaskManager} to the storage.
* @param TaskManager cannot be null.
* @throws IOException if there was any problem writing to the file.
*/ | Saves the given <code>ReadOnlyTaskManager</code> to the storage | saveTaskManager | {
"repo_name": "CS2103AUG2016-T14-C4/main",
"path": "src/main/java/seedu/task/storage/TaskManagerStorage.java",
"license": "mit",
"size": 1587
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,392,342 |
void dumpAISee(FileWriter f) throws IOException {
f.write("edge: { sourcename: \"" + fromNode.getId()
+ "\" targetname: \"" + toNode.getId()
+ "\" label: \"" + acousticScore + ',' + lmScore + "\" }\n");
} | void dumpAISee(FileWriter f) throws IOException { f.write(STRSTR\STRSTR\STRSTR\STR); } | /**
* Internal routine used when dumping a Lattice as an AiSee file
*
* @param f
* @throws IOException
*/ | Internal routine used when dumping a Lattice as an AiSee file | dumpAISee | {
"repo_name": "juanma2268/jumbertoTeia2600",
"path": "jumbertoNetbeans7.2/src/sphinx4/edu/cmu/sphinx/result/Edge.java",
"license": "gpl-2.0",
"size": 5428
} | [
"java.io.FileWriter",
"java.io.IOException"
] | import java.io.FileWriter; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,583,652 |
private static boolean containedIn(final Rectangle2D r, final Collection<Polygon> shapes) {
for (final Shape item : shapes) {
if (item.contains(r)) {
return true;
}
}
return false;
} | static boolean function(final Rectangle2D r, final Collection<Polygon> shapes) { for (final Shape item : shapes) { if (item.contains(r)) { return true; } } return false; } | /**
* Function to test if the given 2D rectangle is contained in any of the given shapes in the
* collection.
*/ | Function to test if the given 2D rectangle is contained in any of the given shapes in the collection | containedIn | {
"repo_name": "DanVanAtta/triplea",
"path": "game-core/src/main/java/tools/image/AutoPlacementFinder.java",
"license": "gpl-3.0",
"size": 18503
} | [
"java.awt.Polygon",
"java.awt.Shape",
"java.awt.geom.Rectangle2D",
"java.util.Collection"
] | import java.awt.Polygon; import java.awt.Shape; import java.awt.geom.Rectangle2D; import java.util.Collection; | import java.awt.*; import java.awt.geom.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 1,564,016 |
protected void handleMouseClick(Slot slotIn, int slotId, int mouseButton, ClickType type)
{
super.handleMouseClick(slotIn, slotId, mouseButton, type);
this.recipeBookGui.slotClicked(slotIn);
} | void function(Slot slotIn, int slotId, int mouseButton, ClickType type) { super.handleMouseClick(slotIn, slotId, mouseButton, type); this.recipeBookGui.slotClicked(slotIn); } | /**
* Called when the mouse is clicked over a slot or outside the gui.
*/ | Called when the mouse is clicked over a slot or outside the gui | handleMouseClick | {
"repo_name": "Severed-Infinity/technium",
"path": "build/tmp/recompileMc/sources/net/minecraft/client/gui/inventory/GuiCrafting.java",
"license": "gpl-3.0",
"size": 7216
} | [
"net.minecraft.inventory.ClickType",
"net.minecraft.inventory.Slot"
] | import net.minecraft.inventory.ClickType; import net.minecraft.inventory.Slot; | import net.minecraft.inventory.*; | [
"net.minecraft.inventory"
] | net.minecraft.inventory; | 1,366,425 |
public void listenSensor() {
isListening = mSensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_NORMAL);
//isListening = true;
handler.postDelayed(runnable, 5000);
listenTime = 5000;
} | void function() { isListening = mSensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_NORMAL); handler.postDelayed(runnable, 5000); listenTime = 5000; } | /**
* Registers listener to the sensor that's been set in the instance of SensorUnit
*/ | Registers listener to the sensor that's been set in the instance of SensorUnit | listenSensor | {
"repo_name": "OhtuWearable/WearableDataServer",
"path": "app/src/main/java/com/ohtu/wearable/wearabledataservice/sensors/SensorUnit.java",
"license": "apache-2.0",
"size": 6136
} | [
"android.hardware.SensorManager"
] | import android.hardware.SensorManager; | import android.hardware.*; | [
"android.hardware"
] | android.hardware; | 2,625,445 |
public static UpdateFromFileMetadataBuilder updateFromFile(int id, FileHolder xmlFile) {
return new UpdateFromFileMetadataBuilder(id, xmlFile);
}
public static class UpdateFromXSLMetadataBuilder extends RequestBuilder<Metadata, Metadata.Tokenizer, UpdateFromXSLMetadataBuilder> {
public UpdateFromXSLMe... | static UpdateFromFileMetadataBuilder function(int id, FileHolder xmlFile) { return new UpdateFromFileMetadataBuilder(id, xmlFile); } public static class UpdateFromXSLMetadataBuilder extends RequestBuilder<Metadata, Metadata.Tokenizer, UpdateFromXSLMetadataBuilder> { public UpdateFromXSLMetadataBuilder(int id, FileHolde... | /**
* Update an existing metadata object with new XML file
*
* @param id
* @param xmlFile XML metadata
*/ | Update an existing metadata object with new XML file | updateFromFile | {
"repo_name": "kaltura/KalturaGeneratedAPIClientsJava",
"path": "src/main/java/com/kaltura/client/services/MetadataService.java",
"license": "agpl-3.0",
"size": 17185
} | [
"com.kaltura.client.FileHolder",
"com.kaltura.client.Files",
"com.kaltura.client.types.Metadata",
"com.kaltura.client.utils.request.RequestBuilder"
] | import com.kaltura.client.FileHolder; import com.kaltura.client.Files; import com.kaltura.client.types.Metadata; import com.kaltura.client.utils.request.RequestBuilder; | import com.kaltura.client.*; import com.kaltura.client.types.*; import com.kaltura.client.utils.request.*; | [
"com.kaltura.client"
] | com.kaltura.client; | 15,062 |
private Parameter getParameters(ExampleSet exampleSet) throws OperatorException {
SolverType solverType = null;
int solverTypeParameter = getParameterAsInt(PARAMETER_SOLVER);
switch (solverTypeParameter) {
case SOLVER_L2_SVM_DUAL:
solverType = SolverType.L2R_L2LOSS_SVC_DUAL;
break;
case ... | Parameter function(ExampleSet exampleSet) throws OperatorException { SolverType solverType = null; int solverTypeParameter = getParameterAsInt(PARAMETER_SOLVER); switch (solverTypeParameter) { case SOLVER_L2_SVM_DUAL: solverType = SolverType.L2R_L2LOSS_SVC_DUAL; break; case SOLVER_L2_SVM_PRIMAL: solverType = SolverType... | /**
* Creates a LibSVM parameter object based on the user defined parameters. If gamma is set to
* zero, it will be overwritten by 1 divided by the number of attributes.
*/ | Creates a LibSVM parameter object based on the user defined parameters. If gamma is set to zero, it will be overwritten by 1 divided by the number of attributes | getParameters | {
"repo_name": "boob-sbcm/3838438",
"path": "src/main/java/com/rapidminer/operator/learner/functions/FastLargeMargin.java",
"license": "agpl-3.0",
"size": 10600
} | [
"com.rapidminer.example.Attribute",
"com.rapidminer.example.ExampleSet",
"com.rapidminer.operator.OperatorException",
"de.bwaldvogel.liblinear.Parameter",
"de.bwaldvogel.liblinear.SolverType",
"java.util.Iterator",
"java.util.LinkedList",
"java.util.List"
] | import com.rapidminer.example.Attribute; import com.rapidminer.example.ExampleSet; import com.rapidminer.operator.OperatorException; import de.bwaldvogel.liblinear.Parameter; import de.bwaldvogel.liblinear.SolverType; import java.util.Iterator; import java.util.LinkedList; import java.util.List; | import com.rapidminer.example.*; import com.rapidminer.operator.*; import de.bwaldvogel.liblinear.*; import java.util.*; | [
"com.rapidminer.example",
"com.rapidminer.operator",
"de.bwaldvogel.liblinear",
"java.util"
] | com.rapidminer.example; com.rapidminer.operator; de.bwaldvogel.liblinear; java.util; | 532,607 |
private void updateTimestamps() {
List<PlotSample> samples = new ArrayList<>();
Instant plot_start = model.getStartTime();
Instant plot_end = model.getEndTime();
if (model_items != null) {
for (ModelItem item : model_items) {
for (int i = 0; i < item.getSa... | void function() { List<PlotSample> samples = new ArrayList<>(); Instant plot_start = model.getStartTime(); Instant plot_end = model.getEndTime(); if (model_items != null) { for (ModelItem item : model_items) { for (int i = 0; i < item.getSamples().size(); i++) { PlotSample sample = item.getSamples().get(i); if (sample.... | /**
* Take all the samples from all model items that are within the plot range,
* and sort them. The timestamps provide the index for the slider.
*/ | Take all the samples from all model items that are within the plot range, and sort them. The timestamps provide the index for the slider | updateTimestamps | {
"repo_name": "ControlSystemStudio/cs-studio",
"path": "applications/databrowser/databrowser-plugins/org.csstudio.trends.databrowser2/src/org/csstudio/trends/databrowser2/waveformview/WaveformView.java",
"license": "epl-1.0",
"size": 24876
} | [
"java.time.Instant",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"org.csstudio.trends.databrowser2.model.ModelItem",
"org.csstudio.trends.databrowser2.model.PlotSample"
] | import java.time.Instant; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.csstudio.trends.databrowser2.model.ModelItem; import org.csstudio.trends.databrowser2.model.PlotSample; | import java.time.*; import java.util.*; import org.csstudio.trends.databrowser2.model.*; | [
"java.time",
"java.util",
"org.csstudio.trends"
] | java.time; java.util; org.csstudio.trends; | 1,702,783 |
public Read<T> fromSubscription(String subscription) {
return fromSubscription(StaticValueProvider.of(subscription));
} | Read<T> function(String subscription) { return fromSubscription(StaticValueProvider.of(subscription)); } | /**
* Reads from the given subscription.
*
* <p>See {@link PubsubIO.PubsubSubscription#fromPath(String)} for more details on the format of
* the {@code subscription} string.
*
* <p>Multiple readers reading from the same subscription will each receive some arbitrary
* portion of the da... | Reads from the given subscription. See <code>PubsubIO.PubsubSubscription#fromPath(String)</code> for more details on the format of the subscription string. Multiple readers reading from the same subscription will each receive some arbitrary portion of the data. Most likely, separate readers should use their own subscri... | fromSubscription | {
"repo_name": "RyanSkraba/beam",
"path": "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.java",
"license": "apache-2.0",
"size": 54727
} | [
"org.apache.beam.sdk.options.ValueProvider"
] | import org.apache.beam.sdk.options.ValueProvider; | import org.apache.beam.sdk.options.*; | [
"org.apache.beam"
] | org.apache.beam; | 1,643,281 |
@ApiModelProperty(value = "")
public WhitelabelStyling getWhitelabelStyling() {
return whitelabelStyling;
} | @ApiModelProperty(value = "") WhitelabelStyling function() { return whitelabelStyling; } | /**
* Get whitelabelStyling
* @return whitelabelStyling
**/ | Get whitelabelStyling | getWhitelabelStyling | {
"repo_name": "LogSentinel/logsentinel-java-client",
"path": "src/main/java/com/logsentinel/model/UserDetails.java",
"license": "mit",
"size": 23771
} | [
"com.logsentinel.model.WhitelabelStyling",
"io.swagger.annotations.ApiModelProperty"
] | import com.logsentinel.model.WhitelabelStyling; import io.swagger.annotations.ApiModelProperty; | import com.logsentinel.model.*; import io.swagger.annotations.*; | [
"com.logsentinel.model",
"io.swagger.annotations"
] | com.logsentinel.model; io.swagger.annotations; | 2,731,251 |
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<Boolean> checkExistenceByIdAsync(String resourceId, String apiVersion); | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Boolean> checkExistenceByIdAsync(String resourceId, String apiVersion); | /**
* Checks by ID whether a resource exists.
*
* @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the
* format,
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resour... | Checks by ID whether a resource exists | checkExistenceByIdAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourcesClient.java",
"license": "mit",
"size": 94978
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; | import com.azure.core.annotation.*; | [
"com.azure.core"
] | com.azure.core; | 1,917,054 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.