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 IDataset getDistance();
| IDataset function(); | /**
* Effective distance to the origin
* <p>
* <b>Type:</b> NX_FLOAT
* <b>Units:</b> NX_LENGTH
* </p>
*
* @return the value.
*/ | Effective distance to the origin Type: NX_FLOAT Units: NX_LENGTH | getDistance | {
"repo_name": "colinpalmer/dawnsci",
"path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXdisk_chopper.java",
"license": "epl-1.0",
"size": 11747
} | [
"org.eclipse.dawnsci.analysis.api.dataset.IDataset"
] | import org.eclipse.dawnsci.analysis.api.dataset.IDataset; | import org.eclipse.dawnsci.analysis.api.dataset.*; | [
"org.eclipse.dawnsci"
] | org.eclipse.dawnsci; | 2,880,914 |
static List<ProjectDefinition> getTopDownParentProjects(ProjectDefinition project) {
List<ProjectDefinition> result = new ArrayList<>();
ProjectDefinition p = project;
while (p != null) {
result.add(0, p);
p = p.getParent();
}
return result;
} | static List<ProjectDefinition> getTopDownParentProjects(ProjectDefinition project) { List<ProjectDefinition> result = new ArrayList<>(); ProjectDefinition p = project; while (p != null) { result.add(0, p); p = p.getParent(); } return result; } | /**
* From root to given project
*/ | From root to given project | getTopDownParentProjects | {
"repo_name": "lbndev/sonarqube",
"path": "sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/ModuleSettings.java",
"license": "lgpl-3.0",
"size": 3950
} | [
"java.util.ArrayList",
"java.util.List",
"org.sonar.api.batch.bootstrap.ProjectDefinition"
] | import java.util.ArrayList; import java.util.List; import org.sonar.api.batch.bootstrap.ProjectDefinition; | import java.util.*; import org.sonar.api.batch.bootstrap.*; | [
"java.util",
"org.sonar.api"
] | java.util; org.sonar.api; | 2,464,240 |
public void testCRUD_using_RowId_on_CurrentWeatherTable() throws Throwable {
DBHelper dbHelper = DBHelper.getInstance(getContext());
SQLiteDatabase db = dbHelper.getWritableDatabase();
ContentValues insertValues = DataUtilities.CurrentWeather.insertValues_Seattle();
long ro... | void function() throws Throwable { DBHelper dbHelper = DBHelper.getInstance(getContext()); SQLiteDatabase db = dbHelper.getWritableDatabase(); ContentValues insertValues = DataUtilities.CurrentWeather.insertValues_Seattle(); long rowId = -1; rowId = db.insertWithOnConflict( CurrentWeatherContract.TABLE, null, insertVal... | /**
* Current Weather table
* Test all CRUD operations on the db using row id returned by insert
* @throws Throwable
*/ | Current Weather table Test all CRUD operations on the db using row id returned by insert | testCRUD_using_RowId_on_CurrentWeatherTable | {
"repo_name": "yeelin/weatherberry",
"path": "app/src/androidTest/java/com/example/yeelin/homework/weatherberry/provider/DBHelperTest.java",
"license": "mit",
"size": 22067
} | [
"android.content.ContentValues",
"android.database.Cursor",
"android.database.sqlite.SQLiteDatabase"
] | import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; | import android.content.*; import android.database.*; import android.database.sqlite.*; | [
"android.content",
"android.database"
] | android.content; android.database; | 927,716 |
@Schema(example = "SrcFolder", description = "Return results that are file moves originating from this path.")
public String getQuerySrc() {
return querySrc;
} | @Schema(example = STR, description = STR) String function() { return querySrc; } | /**
* Return results that are file moves originating from this path.
* @return querySrc
**/ | Return results that are file moves originating from this path | getQuerySrc | {
"repo_name": "iterate-ch/cyberduck",
"path": "brick/src/main/java/ch/cyberduck/core/brick/io/swagger/client/model/HistoryExportEntity.java",
"license": "gpl-3.0",
"size": 23952
} | [
"io.swagger.v3.oas.annotations.media.Schema"
] | import io.swagger.v3.oas.annotations.media.Schema; | import io.swagger.v3.oas.annotations.media.*; | [
"io.swagger.v3"
] | io.swagger.v3; | 1,665,556 |
public ChannelControlBlock openChannel() throws NetException {
synchronized (this) {
if (connectionFailure) {
throw new NetException(error);
}
}
ChannelControlBlock channel = cSet.allocateChannel();
int channelId = channel.getChannelId();
... | ChannelControlBlock function() throws NetException { synchronized (this) { if (connectionFailure) { throw new NetException(error); } } ChannelControlBlock channel = cSet.allocateChannel(); int channelId = channel.getChannelId(); cSet.initiateChannelSyn(channelId); return channel; } class WriterState { private final Byt... | /**
* Open a channel to the other side.
*
* @return
* @throws NetException
* - A network failure occurred.
*/ | Open a channel to the other side | openChannel | {
"repo_name": "tectronics/hyracks",
"path": "hyracks/hyracks-net/src/main/java/org/apache/hyracks/net/protocols/muxdemux/MultiplexedConnection.java",
"license": "apache-2.0",
"size": 15634
} | [
"java.nio.ByteBuffer",
"org.apache.hyracks.net.exceptions.NetException"
] | import java.nio.ByteBuffer; import org.apache.hyracks.net.exceptions.NetException; | import java.nio.*; import org.apache.hyracks.net.exceptions.*; | [
"java.nio",
"org.apache.hyracks"
] | java.nio; org.apache.hyracks; | 1,463,569 |
CompletableFuture<Subscription> subscribeFromInstant(String channelName, Instant startInstant, EventHandler eventHandler); | CompletableFuture<Subscription> subscribeFromInstant(String channelName, Instant startInstant, EventHandler eventHandler); | /**
* Subscribe to a named channel with the given event handler
* Replay the events froma given time (Instant) and then any new events that may arrive.
* @param channelName
* @param startInstant
* @param eventHandler
* @return CompletableFuture<Subscription>
*/ | Subscribe to a named channel with the given event handler Replay the events froma given time (Instant) and then any new events that may arrive | subscribeFromInstant | {
"repo_name": "Tesco/mewbase",
"path": "mewbase-core/src/main/java/io/mewbase/eventsource/EventSource.java",
"license": "mit",
"size": 3642
} | [
"java.time.Instant",
"java.util.concurrent.CompletableFuture"
] | import java.time.Instant; import java.util.concurrent.CompletableFuture; | import java.time.*; import java.util.concurrent.*; | [
"java.time",
"java.util"
] | java.time; java.util; | 1,431,309 |
@Override
public void iconifyFrame(JInternalFrame frame) {
frame.setVisible(false);
} | void function(JInternalFrame frame) { frame.setVisible(false); } | /**
* Iconifies frame (overridden)
*
* @param frame
* the internal frame
*/ | Iconifies frame (overridden) | iconifyFrame | {
"repo_name": "mars-sim/mars-sim",
"path": "mars-sim-javafx/src/main/java/org/mars_sim/javafx/MainDesktopManager.java",
"license": "gpl-3.0",
"size": 2359
} | [
"javax.swing.JInternalFrame"
] | import javax.swing.JInternalFrame; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,851,922 |
public static com.knowarth.portlets.themepersonalizer.model.UserPersonalizedTheme findByUserId_First(
long userId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.knowarth.portlets.themepersonalizer.NoSuchUserPersonalizedThemeException,
com.liferay.... | static com.knowarth.portlets.themepersonalizer.model.UserPersonalizedTheme function( long userId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.knowarth.portlets.themepersonalizer.NoSuchUserPersonalizedThemeException, com.liferay.portal.kernel.exception.SystemException { return getPersi... | /**
* Returns the first user personalized theme in the ordered set where userId = ?.
*
* @param userId the user ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching user personalized theme
* @throws com.knowarth.portlets... | Returns the first user personalized theme in the ordered set where userId = ? | findByUserId_First | {
"repo_name": "knowarth-technologies/theme-personalizer",
"path": "liferay-6-1-2/theme-personalizer/theme-personalizer-portlet-service/src/main/java/com/knowarth/portlets/themepersonalizer/service/persistence/UserPersonalizedThemeUtil.java",
"license": "lgpl-2.1",
"size": 49816
} | [
"com.knowarth.portlets.themepersonalizer.model.UserPersonalizedTheme",
"com.liferay.portal.kernel.exception.SystemException",
"com.liferay.portal.kernel.util.OrderByComparator"
] | import com.knowarth.portlets.themepersonalizer.model.UserPersonalizedTheme; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.OrderByComparator; | import com.knowarth.portlets.themepersonalizer.model.*; import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.util.*; | [
"com.knowarth.portlets",
"com.liferay.portal"
] | com.knowarth.portlets; com.liferay.portal; | 2,245,077 |
public synchronized static String getProperty(String prop) throws IOException
{
String sFullProp = "";
String sProp = HootProperties.getInstance().getProperty(prop, "");
String[] parts = sProp.split("\\$");
if(parts.length > 1)
{
for(int i=0; i<parts.length; i++)
{
String part = parts[... | synchronized static String function(String prop) throws IOException { String sFullProp = STRSTR\\$STR(STR)STRSTR$") > -1) { sToken = HootProperties.getProperty(token); } if(sToken == null sToken.length() == 0) { Map<String, String> env = System.getenv(); sToken = env.get(token); } if(sToken != null && sToken.length() >... | /**
* Helper function to add property reference.
* It looks for property from the local properties and if it does not find it then uses environmental variable.
*
* @param prop
* @return
* @throws Exception
*/ | Helper function to add property reference. It looks for property from the local properties and if it does not find it then uses environmental variable | getProperty | {
"repo_name": "nstarke/hootenanny",
"path": "hoot-services/src/main/java/hoot/services/HootProperties.java",
"license": "gpl-3.0",
"size": 7627
} | [
"java.io.IOException",
"java.util.Map",
"java.util.Properties"
] | import java.io.IOException; import java.util.Map; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,370,031 |
public void setGraphicsFlags(Graphics gfx, Font font) {
Font _font = getStyledFont(font);
gfx.setFont(_font);
gfx.setColor(color);
}
| void function(Graphics gfx, Font font) { Font _font = getStyledFont(font); gfx.setFont(_font); gfx.setColor(color); } | /**
* Sets the foreground color and font of the specified graphics context to that specified in
* this style.
*
* @param gfx
* The graphics context
* @param font
* The font to add the styles to
*/ | Sets the foreground color and font of the specified graphics context to that specified in this style | setGraphicsFlags | {
"repo_name": "aborg0/rapidminer-studio",
"path": "src/main/java/com/rapidminer/gui/tools/syntax/SyntaxStyle.java",
"license": "agpl-3.0",
"size": 4287
} | [
"java.awt.Font",
"java.awt.Graphics"
] | import java.awt.Font; import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,473,001 |
public Kafka startFromEarliest() {
this.startupMode = StartupMode.EARLIEST;
this.specificOffsets = null;
return this;
} | Kafka function() { this.startupMode = StartupMode.EARLIEST; this.specificOffsets = null; return this; } | /**
* Configures to start reading from the earliest offset for all partitions.
*
* @see FlinkKafkaConsumerBase#setStartFromEarliest()
*/ | Configures to start reading from the earliest offset for all partitions | startFromEarliest | {
"repo_name": "ueshin/apache-flink",
"path": "flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/table/descriptors/Kafka.java",
"license": "apache-2.0",
"size": 10393
} | [
"org.apache.flink.streaming.connectors.kafka.config.StartupMode"
] | import org.apache.flink.streaming.connectors.kafka.config.StartupMode; | import org.apache.flink.streaming.connectors.kafka.config.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,567,464 |
public static cgi_InfoType fromPerUnaligned(byte[] encodedBytes) {
cgi_InfoType result = new cgi_InfoType();
result.decodePerUnaligned(new BitStreamReader(encodedBytes));
return result;
} | static cgi_InfoType function(byte[] encodedBytes) { cgi_InfoType result = new cgi_InfoType(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; } | /**
* Creates a new cgi_InfoType from encoded stream.
*/ | Creates a new cgi_InfoType from encoded stream | fromPerUnaligned | {
"repo_name": "google/supl-client",
"path": "src/main/java/com/google/location/suplclient/asn1/supl2/ver2_ulp_components/MeasResultEUTRA.java",
"license": "apache-2.0",
"size": 22721
} | [
"com.google.location.suplclient.asn1.base.BitStreamReader"
] | import com.google.location.suplclient.asn1.base.BitStreamReader; | import com.google.location.suplclient.asn1.base.*; | [
"com.google.location"
] | com.google.location; | 1,404,837 |
public void setTransformerInputStream(InputStream in) throws TransformerConfigurationException, IOException {
notNull(in, "InputStream");
setTransformerSource(new StreamSource(in));
} | void function(InputStream in) throws TransformerConfigurationException, IOException { notNull(in, STR); setTransformerSource(new StreamSource(in)); } | /**
* Sets the XSLT transformer from the given input stream
*/ | Sets the XSLT transformer from the given input stream | setTransformerInputStream | {
"repo_name": "punkhorn/camel-upstream",
"path": "components/camel-xslt/src/main/java/org/apache/camel/component/xslt/XsltBuilder.java",
"license": "apache-2.0",
"size": 20689
} | [
"java.io.IOException",
"java.io.InputStream",
"javax.xml.transform.TransformerConfigurationException",
"javax.xml.transform.stream.StreamSource",
"org.apache.camel.util.ObjectHelper"
] | import java.io.IOException; import java.io.InputStream; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.stream.StreamSource; import org.apache.camel.util.ObjectHelper; | import java.io.*; import javax.xml.transform.*; import javax.xml.transform.stream.*; import org.apache.camel.util.*; | [
"java.io",
"javax.xml",
"org.apache.camel"
] | java.io; javax.xml; org.apache.camel; | 1,196,487 |
public boolean isClientCertRequired() {
return requireClientCert;
}
/**
* If the given {@link HttpURLConnection} is an {@link HttpsURLConnection} | boolean function() { return requireClientCert; } /** * If the given {@link HttpURLConnection} is an {@link HttpsURLConnection} | /**
* Returns if client certificates are required or not.
*
* @return if client certificates are required or not.
*/ | Returns if client certificates are required or not | isClientCertRequired | {
"repo_name": "saman-aghazadeh/hadoop-2.5.2-netcdf",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/SSLFactory.java",
"license": "apache-2.0",
"size": 9671
} | [
"java.net.HttpURLConnection",
"javax.net.ssl.HttpsURLConnection"
] | import java.net.HttpURLConnection; import javax.net.ssl.HttpsURLConnection; | import java.net.*; import javax.net.ssl.*; | [
"java.net",
"javax.net"
] | java.net; javax.net; | 1,252,771 |
public static int[] RGBtoHSV(Color c) {
return RGBtoHSV(c.r, c.g, c.b);
} | static int[] function(Color c) { return RGBtoHSV(c.r, c.g, c.b); } | /**
* Converts {@link Color} to HSV color system
*
* @return 3 element int array with hue (0-360), saturation (0-100) and value (0-100)
*/ | Converts <code>Color</code> to HSV color system | RGBtoHSV | {
"repo_name": "rafaskb/typing-label",
"path": "src/main/java/com/rafaskoberg/gdx/typinglabel/utils/ColorUtils.java",
"license": "mit",
"size": 4620
} | [
"com.badlogic.gdx.graphics.Color"
] | import com.badlogic.gdx.graphics.Color; | import com.badlogic.gdx.graphics.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 900,113 |
@Generated
@Selector("setRequestParameters:")
public native void setRequestParameters(NSData value); | @Selector(STR) native void function(NSData value); | /**
* Custom request data.
*/ | Custom request data | setRequestParameters | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/corenfc/NFCISO15693CustomCommandConfiguration.java",
"license": "apache-2.0",
"size": 7215
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 177,335 |
HoplogWriter createWriter(int keys) throws IOException; | HoplogWriter createWriter(int keys) throws IOException; | /**
* Creates a new sorted writer.
*
* @param keys
* an estimate of the number of keys to be written
* @return the writer
* @throws IOException
* error creating writer
*/ | Creates a new sorted writer | createWriter | {
"repo_name": "SnappyDataInc/snappy-store",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/hoplog/Hoplog.java",
"license": "apache-2.0",
"size": 6873
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,114,363 |
private String indexObject(Object object, String index, String type) {
IndexResponse response = elasticsearch
.prepareIndex(index, type)
.setSource(object.toString())
.get();
return response.toString();
} | String function(Object object, String index, String type) { IndexResponse response = elasticsearch .prepareIndex(index, type) .setSource(object.toString()) .get(); return response.toString(); } | /**
* Adds (indexes) a given object to the given index with the given type
* @param object to index which should have a toString() method returning valid JSON
* @param index to add the object to
* @param type to give the object
* @return
*/ | Adds (indexes) a given object to the given index with the given type | indexObject | {
"repo_name": "the-james-burton/the-turbine",
"path": "turbine-engine-hall/turbine-inlet/src/main/java/org/jimsey/projects/turbine/inlet/service/ElasticsearchNativeServiceImpl.java",
"license": "mit",
"size": 5571
} | [
"org.elasticsearch.action.index.IndexResponse"
] | import org.elasticsearch.action.index.IndexResponse; | import org.elasticsearch.action.index.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 1,630,976 |
public void setMentions(int i, IdentifiedAnnotation v) {
if (Element_Type.featOkTst && ((Element_Type)jcasType).casFeat_mentions == null)
jcasType.jcas.throwFeatMissing("mentions", "org.apache.ctakes.typesystem.type.refsem.Element");
jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, (... | void function(int i, IdentifiedAnnotation v) { if (Element_Type.featOkTst && ((Element_Type)jcasType).casFeat_mentions == null) jcasType.jcas.throwFeatMissing(STR, STR); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Element_Type)jcasType).casFeatCode_mentions), i); jcasType.ll_cas.ll_setRefArray... | /** indexed setter for mentions - sets an indexed value -
* @generated */ | indexed setter for mentions - sets an indexed value - | setMentions | {
"repo_name": "schorndorfer/uima-components",
"path": "annotator-parent/type-system/src/main/java/org/apache/ctakes/typesystem/type/refsem/Element.java",
"license": "apache-2.0",
"size": 12295
} | [
"org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation"
] | import org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation; | import org.apache.ctakes.typesystem.type.textsem.*; | [
"org.apache.ctakes"
] | org.apache.ctakes; | 1,330,476 |
public void setDownButtonIndex(int downButtonIndex) {
Assert.isTrue(downButtonIndex < fButtonLabels.length);
fDownButtonIndex= downButtonIndex;
} | void function(int downButtonIndex) { Assert.isTrue(downButtonIndex < fButtonLabels.length); fDownButtonIndex= downButtonIndex; } | /**
* Sets the index of the 'down' button in the button label array passed in the constructor.
* The behavior of the button marked as the 'down' button will then be handled internally.
* (enable state, button invocation behavior)
*/ | Sets the index of the 'down' button in the button label array passed in the constructor. The behavior of the button marked as the 'down' button will then be handled internally. (enable state, button invocation behavior) | setDownButtonIndex | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java",
"license": "epl-1.0",
"size": 25112
} | [
"org.eclipse.core.runtime.Assert"
] | import org.eclipse.core.runtime.Assert; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 2,538,483 |
public void truncate(final long len) throws SQLException {
final String ldata = data;
final long dlen = ldata.length();
final long chars = len >> 1;
if (chars == dlen) {
// nothing has changed, so there's nothing to be done
} else if (len < 0 || chars > dl... | void function(final long len) throws SQLException { final String ldata = data; final long dlen = ldata.length(); final long chars = len >> 1; if (chars == dlen) { } else if (len < 0 chars > dlen) { throw Util.sqlException(Trace.INVALID_JDBC_ARGUMENT, Long.toString(len)); } else { data = new String(ldata.substring(0, (i... | /**
* Truncates the <code>CLOB</code> value that this <code>Clob</code>
* designates to have a length of <code>len</code>
* characters. <p>
*
* <!-- start release-specific documentation -->
* <div class="ReleaseSpecificDocumentation">
* <h3>HSQLDB-Specific Information:</h3> <p>
*... | Truncates the <code>CLOB</code> value that this <code>Clob</code> designates to have a length of <code>len</code> characters. HSQLDB-Specific Information: This operation affects only the client-side value; it has no effect upon the value as it is stored in the database. | truncate | {
"repo_name": "proudh0n/emergencymasta",
"path": "hsqldb/src/org/hsqldb/jdbc/jdbcClob.java",
"license": "gpl-2.0",
"size": 17810
} | [
"java.sql.SQLException",
"org.hsqldb.Trace"
] | import java.sql.SQLException; import org.hsqldb.Trace; | import java.sql.*; import org.hsqldb.*; | [
"java.sql",
"org.hsqldb"
] | java.sql; org.hsqldb; | 2,050,088 |
public static void register() throws JMException {
ManagementFactory.getPlatformMBeanServer().
createMBean(JMXTracing.class.getName(),null);
}
| static void function() throws JMException { ManagementFactory.getPlatformMBeanServer(). createMBean(JMXTracing.class.getName(),null); } | /**
* Registers a JMXTracing MBean in the platform MBeanServer
* @throws JMException
*/ | Registers a JMXTracing MBean in the platform MBeanServer | register | {
"repo_name": "nickman/heliosutils",
"path": "src/main/java/com/heliosapm/utils/jmx/JMXTracing.java",
"license": "apache-2.0",
"size": 11270
} | [
"java.lang.management.ManagementFactory",
"javax.management.JMException"
] | import java.lang.management.ManagementFactory; import javax.management.JMException; | import java.lang.management.*; import javax.management.*; | [
"java.lang",
"javax.management"
] | java.lang; javax.management; | 2,268,909 |
@Test
public void getGrantedRoleTypes() {
Organization givenOrg = createOrganizationWithRole(OrganizationRoleType.SUPPLIER);
assertTrue(givenOrg.getGrantedRoleTypes().contains(
OrganizationRoleType.SUPPLIER));
} | void function() { Organization givenOrg = createOrganizationWithRole(OrganizationRoleType.SUPPLIER); assertTrue(givenOrg.getGrantedRoleTypes().contains( OrganizationRoleType.SUPPLIER)); } | /**
* Given an organization with role supplier, then getGrantedRoleTypes() must
* return the role type supplier
*/ | Given an organization with role supplier, then getGrantedRoleTypes() must return the role type supplier | getGrantedRoleTypes | {
"repo_name": "opetrovski/development",
"path": "oscm-dataservice-unittests/javasrc-it/org/oscm/domobjects/OrganizationIT.java",
"license": "apache-2.0",
"size": 59704
} | [
"org.junit.Assert",
"org.oscm.internal.types.enumtypes.OrganizationRoleType"
] | import org.junit.Assert; import org.oscm.internal.types.enumtypes.OrganizationRoleType; | import org.junit.*; import org.oscm.internal.types.enumtypes.*; | [
"org.junit",
"org.oscm.internal"
] | org.junit; org.oscm.internal; | 131,358 |
private void applyDesignTweaks() {
final int[] tweakableIds = new int[]{
R.id.menuButton,
// Barely visible on the clearbutton, since it disappears instant. Can be seen on long click though
R.id.clearButton,
R.id.launcherButton,
... | void function() { final int[] tweakableIds = new int[]{ R.id.menuButton, R.id.clearButton, R.id.launcherButton, R.id.favorite0, R.id.favorite1, R.id.favorite2, R.id.favorite3, }; if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { TypedValue outValue = new TypedValue(); getTheme().resolveAttribute(a... | /**
* Apply some tweaks to the design, depending on the current SDK version
*/ | Apply some tweaks to the design, depending on the current SDK version | applyDesignTweaks | {
"repo_name": "wilderjds/KISS",
"path": "app/src/main/java/fr/neamar/kiss/MainActivity.java",
"license": "mit",
"size": 23576
} | [
"android.os.Build",
"android.util.TypedValue"
] | import android.os.Build; import android.util.TypedValue; | import android.os.*; import android.util.*; | [
"android.os",
"android.util"
] | android.os; android.util; | 937,506 |
private void updateBatteryInfo(Intent batteryIntent) {
sendUpdate(this.getBatteryInfo(batteryIntent), true);
} | void function(Intent batteryIntent) { sendUpdate(this.getBatteryInfo(batteryIntent), true); } | /**
* Updates the JavaScript side whenever the battery changes
*
* @param batteryIntent the current battery information
* @return
*/ | Updates the JavaScript side whenever the battery changes | updateBatteryInfo | {
"repo_name": "grdpeter/RACHETEE",
"path": "src/org/apache/cordova/batterystatus/BatteryListener.java",
"license": "apache-2.0",
"size": 5712
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 1,471,970 |
@Test
public void test_setUseStatusBar() {
boolean value = true;
instance.setUseStatusBar(value);
assertTrue("'setUseStatusBar' should be correct.",
(Boolean) TestsHelper.getField(instance, "useStatusBar"));
} | void function() { boolean value = true; instance.setUseStatusBar(value); assertTrue(STR, (Boolean) TestsHelper.getField(instance, STR)); } | /**
* <p>
* Accuracy test for the method <code>setUseStatusBar(boolean useStatusBar)</code>.<br>
* The value should be properly set.
* </p>
*/ | Accuracy test for the method <code>setUseStatusBar(boolean useStatusBar)</code>. The value should be properly set. | test_setUseStatusBar | {
"repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application",
"path": "Code/SCRD_BRE/src/java/tests/gov/opm/scrd/entities/application/ServiceCreditPreferenceUnitTests.java",
"license": "apache-2.0",
"size": 5718
} | [
"gov.opm.scrd.TestsHelper",
"org.junit.Assert"
] | import gov.opm.scrd.TestsHelper; import org.junit.Assert; | import gov.opm.scrd.*; import org.junit.*; | [
"gov.opm.scrd",
"org.junit"
] | gov.opm.scrd; org.junit; | 1,721,361 |
static boolean getClientBackoffEnable(
String prefix, Configuration conf) {
String name = prefix + "." +
CommonConfigurationKeys.IPC_BACKOFF_ENABLE;
return conf.getBoolean(name,
CommonConfigurationKeys.IPC_BACKOFF_ENABLE_DEFAULT);
}
public static class Call implements Schedulable... | static boolean getClientBackoffEnable( String prefix, Configuration conf) { String name = prefix + "." + CommonConfigurationKeys.IPC_BACKOFF_ENABLE; return conf.getBoolean(name, CommonConfigurationKeys.IPC_BACKOFF_ENABLE_DEFAULT); } public static class Call implements Schedulable, PrivilegedExceptionAction<Void> { fina... | /**
* Get from config if client backoff is enabled on that port.
*/ | Get from config if client backoff is enabled on that port | getClientBackoffEnable | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java",
"license": "apache-2.0",
"size": 129104
} | [
"com.google.common.annotations.VisibleForTesting",
"java.security.PrivilegedExceptionAction",
"java.util.concurrent.atomic.AtomicInteger",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.CommonConfigurationKeys",
"org.apache.hadoop.util.Time",
"org.apache.htrace.core.TraceScope"
] | import com.google.common.annotations.VisibleForTesting; import java.security.PrivilegedExceptionAction; import java.util.concurrent.atomic.AtomicInteger; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.CommonConfigurationKeys; import org.apache.hadoop.util.Time; import org.apache.htrace.core.Tr... | import com.google.common.annotations.*; import java.security.*; import java.util.concurrent.atomic.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.util.*; import org.apache.htrace.core.*; | [
"com.google.common",
"java.security",
"java.util",
"org.apache.hadoop",
"org.apache.htrace"
] | com.google.common; java.security; java.util; org.apache.hadoop; org.apache.htrace; | 91,563 |
public long getBytesWritten(boolean flush) {
if (flush) {
try {
outputBuffer.flush();
} catch (IOException ioe) {
// Ignore - the client has probably closed the connection
}
}
return coyoteResponse.getBytesWritten(flush);
... | long function(boolean flush) { if (flush) { try { outputBuffer.flush(); } catch (IOException ioe) { } } return coyoteResponse.getBytesWritten(flush); } | /**
* Return the number of bytes the actually written to the socket. This
* includes chunking, compression, etc. but excludes headers.
*/ | Return the number of bytes the actually written to the socket. This includes chunking, compression, etc. but excludes headers | getBytesWritten | {
"repo_name": "plumer/codana",
"path": "tomcat_files/7.0.61/Response.java",
"license": "mit",
"size": 53408
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 603,302 |
public static double calculateMedian(final List values) {
return calculateMedian(values, 0, values.size() - 1);
} | static double function(final List values) { return calculateMedian(values, 0, values.size() - 1); } | /**
* Calculates the median for a list of values (<code>Number</code> objects) that are in
* ascending order.
*
* @param values the values in ascending order.
*
* @return The median.
*
* @deprecated Moved to the {@link Statistics} class.
*/ | Calculates the median for a list of values (<code>Number</code> objects) that are in ascending order | calculateMedian | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/jfreechart0921/source/org/jfree/data/statistics/BoxAndWhiskerCalculator.java",
"license": "lgpl-3.0",
"size": 9751
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,236,839 |
@Override
public Void call() throws Exception {
if (Thread.currentThread().isInterrupted()) {
return null;
}
sysLogger.log(Level.INFO, "Starting input scan of {0}", rootInputDirectory);
InputDirScanner scanner = new InputDirScanner();
... | Void function() throws Exception { if (Thread.currentThread().isInterrupted()) { return null; } sysLogger.log(Level.INFO, STR, rootInputDirectory); InputDirScanner scanner = new InputDirScanner(); scanner.scan(); sysLogger.log(Level.INFO, STR, rootInputDirectory); setChanged(); notifyObservers(Event.INPUT_SCAN_COMPLETE... | /**
* Scans the input directory tree and refreshes the pending jobs queue
* and the completed jobs list. Crashed job recovery is performed as
* needed.
*/ | Scans the input directory tree and refreshes the pending jobs queue and the completed jobs list. Crashed job recovery is performed as needed | call | {
"repo_name": "rcordovano/autopsy",
"path": "Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java",
"license": "apache-2.0",
"size": 166040
} | [
"java.nio.file.FileVisitor",
"java.nio.file.Path",
"java.util.ArrayList",
"java.util.List",
"java.util.logging.Level"
] | import java.nio.file.FileVisitor; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; | import java.nio.file.*; import java.util.*; import java.util.logging.*; | [
"java.nio",
"java.util"
] | java.nio; java.util; | 1,863,053 |
public Template getTemplate(String textName)
{
return templateMap.get(QualifiedName.parseTemplateName(textName));
} | Template function(String textName) { return templateMap.get(QualifiedName.parseTemplateName(textName)); } | /**
* Returns template with specified name
* @param textName
* @return Template object or null if template not found
*/ | Returns template with specified name | getTemplate | {
"repo_name": "andrew-bowley/xpl",
"path": "parser/src/main/java/au/com/cybersearch2/classy_logic/compile/ParserAssembler.java",
"license": "gpl-3.0",
"size": 37201
} | [
"au.com.cybersearch2.classy_logic.helper.QualifiedName",
"au.com.cybersearch2.classy_logic.pattern.Template"
] | import au.com.cybersearch2.classy_logic.helper.QualifiedName; import au.com.cybersearch2.classy_logic.pattern.Template; | import au.com.cybersearch2.classy_logic.helper.*; import au.com.cybersearch2.classy_logic.pattern.*; | [
"au.com.cybersearch2"
] | au.com.cybersearch2; | 881,115 |
public long createAppointmentAsInvitor(long aid, String desc, String pserver, String user) {
ContentValues initialValues = new ContentValues();
initialValues.put(COL_APTID, aid);
initialValues.put(COL_DESC, desc);
initialValues.put(COL_ROLE, R_INVITOR);
initialValues... | long function(long aid, String desc, String pserver, String user) { ContentValues initialValues = new ContentValues(); initialValues.put(COL_APTID, aid); initialValues.put(COL_DESC, desc); initialValues.put(COL_ROLE, R_INVITOR); initialValues.put(COL_STATUS, S_CREATED); initialValues.put(COL_PSERVER, pserver); initialV... | /**
* Create a new Appointment using the desc and body provided. If the row is
* successfully created return the new rowId for that Appointment, otherwise return
* a -1 to indicate failure.
*
* @param
* @param
* @param
* @param
* @return rowId or -1 if failed
*/ | Create a new Appointment using the desc and body provided. If the row is successfully created return the new rowId for that Appointment, otherwise return a -1 to indicate failure | createAppointmentAsInvitor | {
"repo_name": "placidrage/pleftdroid",
"path": "src/eu/thecoder4/gpl/pleftdroid/PleftDroidDbAdapter.java",
"license": "gpl-3.0",
"size": 14458
} | [
"android.content.ContentValues"
] | import android.content.ContentValues; | import android.content.*; | [
"android.content"
] | android.content; | 1,933,232 |
public Object proxyFor(EntityPersister persister, EntityKey key, Object impl)
throws HibernateException {
if ( !persister.hasProxy() ) return impl;
Object proxy = proxiesByKey.get(key);
if ( proxy != null ) {
return narrowProxy(proxy, persister, key, impl);
}
else {
return impl;
}
} | Object function(EntityPersister persister, EntityKey key, Object impl) throws HibernateException { if ( !persister.hasProxy() ) return impl; Object proxy = proxiesByKey.get(key); if ( proxy != null ) { return narrowProxy(proxy, persister, key, impl); } else { return impl; } } | /**
* Return the existing proxy associated with the given <tt>EntityKey</tt>, or the
* third argument (the entity associated with the key) if no proxy exists. Init
* the proxy to the target implementation, if necessary.
*/ | Return the existing proxy associated with the given EntityKey, or the third argument (the entity associated with the key) if no proxy exists. Init the proxy to the target implementation, if necessary | proxyFor | {
"repo_name": "raedle/univis",
"path": "lib/hibernate-3.1.3/src/org/hibernate/engine/StatefulPersistenceContext.java",
"license": "lgpl-2.1",
"size": 41008
} | [
"org.hibernate.HibernateException",
"org.hibernate.persister.entity.EntityPersister"
] | import org.hibernate.HibernateException; import org.hibernate.persister.entity.EntityPersister; | import org.hibernate.*; import org.hibernate.persister.entity.*; | [
"org.hibernate",
"org.hibernate.persister"
] | org.hibernate; org.hibernate.persister; | 1,783,211 |
@ServiceMethod(returns = ReturnType.SINGLE)
void redeploy(String resourceGroupName, String vmScaleSetName); | @ServiceMethod(returns = ReturnType.SINGLE) void redeploy(String resourceGroupName, String vmScaleSetName); | /**
* Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them
* back on.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @throws IllegalArgumentException thrown if p... | Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on | redeploy | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java",
"license": "mit",
"size": 129320
} | [
"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; | 445,825 |
private void writeHistoryIntegralData(OutputStream stream)
throws IOException {
// Local declarations
DataComponent historyIntegralData = (DataComponent) componentMap
.get("History and Integral Data");
int numEntries = historyIntegralData.retrieveAllEntries().size();
Entry currEntry;
String... | void function(OutputStream stream) throws IOException { DataComponent historyIntegralData = (DataComponent) componentMap .get(STR); int numEntries = historyIntegralData.retrieveAllEntries().size(); Entry currEntry; String currValue; String historyIntegralDataHeader = String.format( STR + STR, numEntries); byte[] byteAr... | /**
* Grabs the HISTORY & INTEGRAL DATA DataComponent from the componentMap and
* writes the contents to the specified OutputStream.
*
* @param stream
* The OutputStream to write to
* @throws IOException
* Thrown when writing to OutputStream fails
*/ | Grabs the HISTORY & INTEGRAL DATA DataComponent from the componentMap and writes the contents to the specified OutputStream | writeHistoryIntegralData | {
"repo_name": "SmithRWORNL/ice",
"path": "src/org.eclipse.ice.nek5000/src/org/eclipse/ice/nek5000/NekWriter.java",
"license": "epl-1.0",
"size": 36817
} | [
"java.io.IOException",
"java.io.OutputStream",
"org.eclipse.ice.datastructures.form.DataComponent",
"org.eclipse.ice.datastructures.form.Entry"
] | import java.io.IOException; import java.io.OutputStream; import org.eclipse.ice.datastructures.form.DataComponent; import org.eclipse.ice.datastructures.form.Entry; | import java.io.*; import org.eclipse.ice.datastructures.form.*; | [
"java.io",
"org.eclipse.ice"
] | java.io; org.eclipse.ice; | 1,502,351 |
public CSQueue removeChildQueue(String childQueueName)
throws SchedulerDynamicEditException {
CSQueue childQueue;
writeLock.lock();
try {
childQueue = this.csContext.getCapacitySchedulerQueueManager().getQueue(
childQueueName);
if (childQueue != null) {
removeChildQueue... | CSQueue function(String childQueueName) throws SchedulerDynamicEditException { CSQueue childQueue; writeLock.lock(); try { childQueue = this.csContext.getCapacitySchedulerQueueManager().getQueue( childQueueName); if (childQueue != null) { removeChildQueue(childQueue); } else { throw new SchedulerDynamicEditException(ST... | /**
* Remove the specified child queue.
* @param childQueueName name of the child queue to be removed
* @throws SchedulerDynamicEditException
*/ | Remove the specified child queue | removeChildQueue | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractManagedParentQueue.java",
"license": "apache-2.0",
"size": 7797
} | [
"org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerDynamicEditException"
] | import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerDynamicEditException; | import org.apache.hadoop.yarn.server.resourcemanager.scheduler.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 444,933 |
protected void testProject( String projectName, Properties properties, String cleanGoal, String genGoal )
throws Exception
{
testProject( projectName, properties, cleanGoal, genGoal, false );
} | void function( String projectName, Properties properties, String cleanGoal, String genGoal ) throws Exception { testProject( projectName, properties, cleanGoal, genGoal, false ); } | /**
* Execute the eclipse:eclipse goal on a test project and verify generated files.
*
* @param projectName project directory
* @param properties additional properties
* @param cleanGoal TODO
* @param genGoal TODO
* @throws Exception any exception generated during test
*/ | Execute the eclipse:eclipse goal on a test project and verify generated files | testProject | {
"repo_name": "wcm-io-devops/maven-eclipse-plugin",
"path": "src/test/java/org/apache/maven/plugin/eclipse/it/AbstractEclipsePluginIT.java",
"license": "apache-2.0",
"size": 36330
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 1,461,228 |
public static Generator<Long> longGen() {
return longGen(Ranges.closed(Long.MIN_VALUE, Long.MAX_VALUE));
} | static Generator<Long> function() { return longGen(Ranges.closed(Long.MIN_VALUE, Long.MAX_VALUE)); } | /**
* Returns a new uniform long generator bounded between
* {@link Long#MIN_VALUE} and {@link Long#MAX_VALUE} included.
*
* @return uniform long generator
*/ | Returns a new uniform long generator bounded between <code>Long#MIN_VALUE</code> and <code>Long#MAX_VALUE</code> included | longGen | {
"repo_name": "TurpIF/QuickCheck",
"path": "quickcheck/src/main/java/fr/pturpin/quickcheck/generator/NumberGens.java",
"license": "mit",
"size": 6178
} | [
"fr.pturpin.quickcheck.base.Ranges"
] | import fr.pturpin.quickcheck.base.Ranges; | import fr.pturpin.quickcheck.base.*; | [
"fr.pturpin.quickcheck"
] | fr.pturpin.quickcheck; | 1,787,260 |
public static ISqlGenerator getInstance()
{
return new SqlGenerator();
}
| static ISqlGenerator function() { return new SqlGenerator(); } | /**
* Method to create instance of class SqlGenerator.
* @return The reference of SqlGenerator.
*/ | Method to create instance of class SqlGenerator | getInstance | {
"repo_name": "NCIP/wustl-common-package",
"path": "src/edu/wustl/common/querysuite/factory/SqlGeneratorFactory.java",
"license": "bsd-3-clause",
"size": 766
} | [
"edu.wustl.common.querysuite.queryengine.ISqlGenerator",
"edu.wustl.common.querysuite.queryengine.impl.SqlGenerator"
] | import edu.wustl.common.querysuite.queryengine.ISqlGenerator; import edu.wustl.common.querysuite.queryengine.impl.SqlGenerator; | import edu.wustl.common.querysuite.queryengine.*; import edu.wustl.common.querysuite.queryengine.impl.*; | [
"edu.wustl.common"
] | edu.wustl.common; | 2,618,157 |
public void serve(ServletBody body, AccountLookup lookup, NeedNewOAuthTokenHandler handler)
throws IOException, ServletException {
@Nullable AccountStore.Record record = null;
try {
try {
record = lookup.getAccount();
} catch (PermanentFailure e) {
throw new IOException("Perm... | void function(ServletBody body, AccountLookup lookup, NeedNewOAuthTokenHandler handler) throws IOException, ServletException { @Nullable AccountStore.Record record = null; try { try { record = lookup.getAccount(); } catch (PermanentFailure e) { throw new IOException(STR, e); } if (record == null) { userContext.setUserI... | /**
* Invokes {@code body} with {@link UserContext} populated from
* {@code lookup.getAccount()}.
*
* Writes a new {@link AccountStore.Record} from {@code UserContext} and/or
* calls {@link NeedNewOAuthTokenHandler#sendNeedTokenResponse} as needed.
*/ | Invokes body with <code>UserContext</code> populated from lookup.getAccount(). Writes a new <code>AccountStore.Record</code> from UserContext and/or calls <code>NeedNewOAuthTokenHandler#sendNeedTokenResponse</code> as needed | serve | {
"repo_name": "larrytin/walkaround",
"path": "src/com/google/walkaround/wave/server/auth/ServletAuthHelper.java",
"license": "apache-2.0",
"size": 8037
} | [
"com.google.walkaround.util.server.RetryHelper",
"java.io.IOException",
"javax.annotation.Nullable",
"javax.servlet.ServletException",
"org.waveprotocol.wave.model.wave.ParticipantId"
] | import com.google.walkaround.util.server.RetryHelper; import java.io.IOException; import javax.annotation.Nullable; import javax.servlet.ServletException; import org.waveprotocol.wave.model.wave.ParticipantId; | import com.google.walkaround.util.server.*; import java.io.*; import javax.annotation.*; import javax.servlet.*; import org.waveprotocol.wave.model.wave.*; | [
"com.google.walkaround",
"java.io",
"javax.annotation",
"javax.servlet",
"org.waveprotocol.wave"
] | com.google.walkaround; java.io; javax.annotation; javax.servlet; org.waveprotocol.wave; | 498,754 |
private void save(final AbcNamedQuantity prior) {
if (posteriors.isEmpty()) {
for (final Map.Entry<String, Double> entry : prior.getParameters().entrySet()) {
final LinkedList<Double> vals = new LinkedList<>();
vals.add(entry.getValue());
posterio... | void function(final AbcNamedQuantity prior) { if (posteriors.isEmpty()) { for (final Map.Entry<String, Double> entry : prior.getParameters().entrySet()) { final LinkedList<Double> vals = new LinkedList<>(); vals.add(entry.getValue()); posteriors.put(entry.getKey(), vals); } } else { for (final Map.Entry<String, Double>... | /**
* Save the sample taken from the prior as it meets the criteria set for being a posterior sample.
* @param prior the sampled values from the prior.
*/ | Save the sample taken from the prior as it meets the criteria set for being a posterior sample | save | {
"repo_name": "EPICScotland/Broadwick",
"path": "src/main/java/broadwick/abc/ApproxBayesianComp.java",
"license": "apache-2.0",
"size": 3485
} | [
"java.util.LinkedList",
"java.util.Map"
] | import java.util.LinkedList; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,254,765 |
private static List<TestConfiguration> getAdditionalConfigurations(Activity activity) {
List<TestConfiguration> additionalConfigurations = new ArrayList<>();
if (Constants.USE_GMS_CONFIGURATION) {
additionalConfigurations.add(new GmsPermissionConfiguration(activity));
}
... | static List<TestConfiguration> function(Activity activity) { List<TestConfiguration> additionalConfigurations = new ArrayList<>(); if (Constants.USE_GMS_CONFIGURATION) { additionalConfigurations.add(new GmsPermissionConfiguration(activity)); } return additionalConfigurations; } | /**
* Returns a {@link List} of additional {@link TestConfiguration} instances that should be run
* along with the default {@code TestConfiguration} instances.
*
* <p>This typically includes a configuration to test Google Play Services (if available) and
* any other device specific configuratio... | Returns a <code>List</code> of additional <code>TestConfiguration</code> instances that should be run along with the default TestConfiguration instances. This typically includes a configuration to test Google Play Services (if available) and any other device specific configurations | getAdditionalConfigurations | {
"repo_name": "android/security-certification-resources",
"path": "niap-cc/Permissions/Tester/app/src/main/java/com/android/certifications/niap/permissions/config/ConfigurationFactory.java",
"license": "apache-2.0",
"size": 7414
} | [
"android.app.Activity",
"com.android.certifications.niap.permissions.Constants",
"java.util.ArrayList",
"java.util.List"
] | import android.app.Activity; import com.android.certifications.niap.permissions.Constants; import java.util.ArrayList; import java.util.List; | import android.app.*; import com.android.certifications.niap.permissions.*; import java.util.*; | [
"android.app",
"com.android.certifications",
"java.util"
] | android.app; com.android.certifications; java.util; | 1,602,212 |
public Package getPackage() {
return pkg;
} | Package function() { return pkg; } | /**
* Gets the Package this NameExpression names, if any
* @return the Package this NameExpression names, if it does, otherwise null
*/ | Gets the Package this NameExpression names, if any | getPackage | {
"repo_name": "mhems/jhelp",
"path": "src/com/binghamton/jhelp/ast/NameExpression.java",
"license": "bsd-3-clause",
"size": 10542
} | [
"com.binghamton.jhelp.Package"
] | import com.binghamton.jhelp.Package; | import com.binghamton.jhelp.*; | [
"com.binghamton.jhelp"
] | com.binghamton.jhelp; | 911,223 |
ServiceFuture<Void> get202None204NoneDefaultError204NoneAsync(final ServiceCallback<Void> serviceCallback); | ServiceFuture<Void> get202None204NoneDefaultError204NoneAsync(final ServiceCallback<Void> serviceCallback); | /**
* Send a 204 response with no payload.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/ | Send a 204 response with no payload | get202None204NoneDefaultError204NoneAsync | {
"repo_name": "lmazuel/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/MultipleResponses.java",
"license": "mit",
"size": 50475
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,003,964 |
static Class<?> loadClass(String className, ClassLoader loader)
throws ReflectionException {
Class<?> theClass;
if (className == null) {
throw new RuntimeOperationsException(new
IllegalArgumentException("The class name cannot be null"),
... | static Class<?> loadClass(String className, ClassLoader loader) throws ReflectionException { Class<?> theClass; if (className == null) { throw new RuntimeOperationsException(new IllegalArgumentException(STR), STR); } ReflectUtil.checkPackageAccess(className); try { if (loader == null) loader = MBeanInstantiator.class.g... | /**
* Load a class with the specified loader, or with this object
* class loader if the specified loader is null.
**/ | Load a class with the specified loader, or with this object class loader if the specified loader is null | loadClass | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/com/sun/jmx/mbeanserver/MBeanInstantiator.java",
"license": "apache-2.0",
"size": 27711
} | [
"javax.management.ReflectionException",
"javax.management.RuntimeOperationsException"
] | import javax.management.ReflectionException; import javax.management.RuntimeOperationsException; | import javax.management.*; | [
"javax.management"
] | javax.management; | 1,051,321 |
private AbstractChainedResourceBundlePostProcessor buildUglifyJSProcessor() {
return new UglifyPostProcessor();
} | AbstractChainedResourceBundlePostProcessor function() { return new UglifyPostProcessor(); } | /**
* Creates the Uglify postprocessor
*
* @return the Uglify postprocessor
*/ | Creates the Uglify postprocessor | buildUglifyJSProcessor | {
"repo_name": "davidwebster48/jawr-main-repo",
"path": "jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/postprocessor/JSPostProcessorChainFactory.java",
"license": "apache-2.0",
"size": 4303
} | [
"net.jawr.web.resource.bundle.postprocess.AbstractChainedResourceBundlePostProcessor",
"net.jawr.web.resource.bundle.postprocess.impl.js.uglify.UglifyPostProcessor"
] | import net.jawr.web.resource.bundle.postprocess.AbstractChainedResourceBundlePostProcessor; import net.jawr.web.resource.bundle.postprocess.impl.js.uglify.UglifyPostProcessor; | import net.jawr.web.resource.bundle.postprocess.*; import net.jawr.web.resource.bundle.postprocess.impl.js.uglify.*; | [
"net.jawr.web"
] | net.jawr.web; | 2,723,698 |
private void shutdownDone(boolean restart) {
int t;
if (bootClassPathHasChanged) {
t = FrameworkEvent.STOPPED_BOOTCLASSPATH_MODIFIED;
} else {
t = restart ? FrameworkEvent.STOPPED_UPDATE : FrameworkEvent.STOPPED;
}
systemShuttingdownDone(new FrameworkEvent(t, this, null));
} | void function(boolean restart) { int t; if (bootClassPathHasChanged) { t = FrameworkEvent.STOPPED_BOOTCLASSPATH_MODIFIED; } else { t = restart ? FrameworkEvent.STOPPED_UPDATE : FrameworkEvent.STOPPED; } systemShuttingdownDone(new FrameworkEvent(t, this, null)); } | /**
* Tell system bundle shutdown finished.
*/ | Tell system bundle shutdown finished | shutdownDone | {
"repo_name": "cnoelle/knopflerfish_framework",
"path": "src/main/java/org/knopflerfish/framework/SystemBundle.java",
"license": "bsd-3-clause",
"size": 37966
} | [
"org.osgi.framework.FrameworkEvent"
] | import org.osgi.framework.FrameworkEvent; | import org.osgi.framework.*; | [
"org.osgi.framework"
] | org.osgi.framework; | 2,585,164 |
public void setTimeInterval(int hourInterval, int minuteInterval, int secondInterval) {
List<Timepoint> timepoints = new ArrayList<>();
int hour = 0;
while (hour < 24) {
int minute = 0;
while (minute < 60) {
int second = 0;
while (seco... | void function(int hourInterval, int minuteInterval, int secondInterval) { List<Timepoint> timepoints = new ArrayList<>(); int hour = 0; while (hour < 24) { int minute = 0; while (minute < 60) { int second = 0; while (second < 60) { timepoints.add(new Timepoint(hour, minute, second)); second += secondInterval; } minute ... | /**
* Set the interval for selectable times in the TimePickerDialog
* This is a convenience wrapper around setSelectableTimes
* The interval for all three time components can be set independently
* @param hourInterval The interval between 2 selectable hours ([1,24])
* @param minuteInterval The ... | Set the interval for selectable times in the TimePickerDialog This is a convenience wrapper around setSelectableTimes The interval for all three time components can be set independently | setTimeInterval | {
"repo_name": "fython/Blackbulb",
"path": "libraries/timepicker/src/main/java/com/wdullaer/materialdatetimepicker/time/TimePickerDialog.java",
"license": "gpl-3.0",
"size": 76067
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,191,541 |
@Value.Default
default boolean isCookieHandlingEnabled() {
return false;
} | @Value.Default default boolean isCookieHandlingEnabled() { return false; } | /**
* Whether cookies should be handled.
*
* Supported: resteasy, resteasy-apache
* Unsupported: jersey
*/ | Whether cookies should be handled. Supported: resteasy, resteasy-apache Unsupported: jersey | isCookieHandlingEnabled | {
"repo_name": "opentable/otj-jaxrs",
"path": "client/src/main/java/com/opentable/jaxrs/JaxRsClientConfig.java",
"license": "apache-2.0",
"size": 7783
} | [
"org.immutables.value.Value"
] | import org.immutables.value.Value; | import org.immutables.value.*; | [
"org.immutables.value"
] | org.immutables.value; | 2,573,299 |
ProcessInstanceBuilder transientVariables(Map<String, Object> transientVariables); | ProcessInstanceBuilder transientVariables(Map<String, Object> transientVariables); | /**
* Sets the transient variables
*/ | Sets the transient variables | transientVariables | {
"repo_name": "dbmalkovsky/flowable-engine",
"path": "modules/flowable-engine/src/main/java/org/flowable/engine/runtime/ProcessInstanceBuilder.java",
"license": "apache-2.0",
"size": 6563
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,291,717 |
public static int resolveOrThrow(
@NonNull Context context,
@AttrRes int attributeResId,
@NonNull String errorMessageComponent) {
TypedValue typedValue = resolve(context, attributeResId);
if (typedValue == null) {
String errorMessage =
"%1$s requires a value for the %2$s attr... | static int function( @NonNull Context context, @AttrRes int attributeResId, @NonNull String errorMessageComponent) { TypedValue typedValue = resolve(context, attributeResId); if (typedValue == null) { String errorMessage = STR + STR + STR; throw new IllegalArgumentException( String.format( errorMessage, errorMessageCom... | /**
* Returns the {@link TypedValue} for the provided {@code attributeResId}.
*
* @throws IllegalArgumentException if the attribute is not present in the current theme.
*/ | Returns the <code>TypedValue</code> for the provided attributeResId | resolveOrThrow | {
"repo_name": "material-components/material-components-android",
"path": "lib/java/com/google/android/material/resources/MaterialAttributes.java",
"license": "apache-2.0",
"size": 5515
} | [
"android.content.Context",
"android.util.TypedValue",
"androidx.annotation.AttrRes",
"androidx.annotation.NonNull"
] | import android.content.Context; import android.util.TypedValue; import androidx.annotation.AttrRes; import androidx.annotation.NonNull; | import android.content.*; import android.util.*; import androidx.annotation.*; | [
"android.content",
"android.util",
"androidx.annotation"
] | android.content; android.util; androidx.annotation; | 1,168,344 |
public int getCmasMessageClass() {
if (mSmsCbMessage.isCmasMessage()) {
return mSmsCbMessage.getCmasWarningInfo().getMessageClass();
} else {
return SmsCbCmasInfo.CMAS_CLASS_UNKNOWN;
}
} | int function() { if (mSmsCbMessage.isCmasMessage()) { return mSmsCbMessage.getCmasWarningInfo().getMessageClass(); } else { return SmsCbCmasInfo.CMAS_CLASS_UNKNOWN; } } | /**
* Return the CMAS message class.
* @return the CMAS message class, e.g. {@link SmsCbCmasInfo#CMAS_CLASS_SEVERE_THREAT}, or
* {@link SmsCbCmasInfo#CMAS_CLASS_UNKNOWN} if this is not a CMAS alert
*/ | Return the CMAS message class | getCmasMessageClass | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "frameworks/opt/telephony/src/java/android/telephony/CellBroadcastMessage.java",
"license": "gpl-2.0",
"size": 17039
} | [
"android.telephony.SmsCbCmasInfo"
] | import android.telephony.SmsCbCmasInfo; | import android.telephony.*; | [
"android.telephony"
] | android.telephony; | 729,155 |
public Enumeration enumerateRequests() {
Vector newVector = new Vector(0);
newVector.addElement("Show results");
newVector.addElement("?Clear results");
return newVector.elements();
} | Enumeration function() { Vector newVector = new Vector(0); newVector.addElement(STR); newVector.addElement(STR); return newVector.elements(); } | /**
* Get a list of user requests
*
* @return an <code>Enumeration</code> value
*/ | Get a list of user requests | enumerateRequests | {
"repo_name": "dsibournemouth/autoweka",
"path": "weka-3.7.7/src/main/java/weka/gui/beans/TextViewer.java",
"license": "gpl-3.0",
"size": 19372
} | [
"java.util.Enumeration",
"java.util.Vector"
] | import java.util.Enumeration; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,322,062 |
public void testFillUp() {
StopWatch sw = new StopWatch();
int smallrows = 0xfff;
double value = 0;
String ddl1 = "DROP TABLE test IF EXISTS;"
+ "DROP TABLE zip IF EXISTS;";
String ddl2 = "CREATE TABLE zip( zip INT IDENTITY );";
... | void function() { StopWatch sw = new StopWatch(); int smallrows = 0xfff; double value = 0; String ddl1 = STR + STR; String ddl2 = STR; String ddl3 = STR + (cachedTable ? STR : STRTABLE test( id INT IDENTITY,STR firstname VARCHAR(128), STR lastname VARCHAR(128), STR zip INTEGER, STR longfield BIGINT, STR doublefield DOU... | /**
* Fill up the cache
*
*
*/ | Fill up the cache | testFillUp | {
"repo_name": "RabadanLab/Pegasus",
"path": "resources/hsqldb-2.2.7/hsqldb/src/org/hsqldb/test/TestAllTypes.java",
"license": "mit",
"size": 16077
} | [
"java.sql.SQLException",
"org.hsqldb.lib.StopWatch"
] | import java.sql.SQLException; import org.hsqldb.lib.StopWatch; | import java.sql.*; import org.hsqldb.lib.*; | [
"java.sql",
"org.hsqldb.lib"
] | java.sql; org.hsqldb.lib; | 1,068,791 |
public Locale getLocale() {
return locale;
} | Locale function() { return locale; } | /**
* Returns current input locale.
*/ | Returns current input locale | getLocale | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk/jdk/src/solaris/classes/sun/awt/X11InputMethod.java",
"license": "mit",
"size": 40313
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,884,810 |
private CallSiteType classifyCallSite(Node callNode) {
Node parent = callNode.getParent();
Node grandParent = parent.getParent();
// Verify the call site:
if (NodeUtil.isExprCall(parent)) {
// This is a simple call? Example: "foo();".
return CallSiteType.SIMPLE_CALL;
} else if (NodeU... | CallSiteType function(Node callNode) { Node parent = callNode.getParent(); Node grandParent = parent.getParent(); if (NodeUtil.isExprCall(parent)) { return CallSiteType.SIMPLE_CALL; } else if (NodeUtil.isExprAssign(grandParent) && !NodeUtil.isVarOrSimpleAssignLhs(callNode, parent) && parent.getFirstChild().isName() && ... | /**
* Determine which, if any, of the supported types the call site is.
*/ | Determine which, if any, of the supported types the call site is | classifyCallSite | {
"repo_name": "bramstein/closure-compiler-inline",
"path": "src/com/google/javascript/jscomp/FunctionInjector.java",
"license": "apache-2.0",
"size": 32725
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.jscomp.ExpressionDecomposer",
"com.google.javascript.rhino.Node"
] | import com.google.common.base.Preconditions; import com.google.javascript.jscomp.ExpressionDecomposer; import com.google.javascript.rhino.Node; | import com.google.common.base.*; import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 2,850,883 |
public DoubleSlider getSlider() {
if (slider == null) {
slider = new DoubleSlider();
slider.setMinimum(min);
slider.setMaximum(max);
slider.setValue(defaultPos);
slider.addValueChangedListener(this);
}
return slider;
} | DoubleSlider function() { if (slider == null) { slider = new DoubleSlider(); slider.setMinimum(min); slider.setMaximum(max); slider.setValue(defaultPos); slider.addValueChangedListener(this); } return slider; } | /**
* This method initializes jSlider
*
* @return javax.swing.JSlider
*/ | This method initializes jSlider | getSlider | {
"repo_name": "iCarto/siga",
"path": "libUIComponent/src/org/gvsig/gui/beans/slidertext/ColorSliderTextContainer.java",
"license": "gpl-3.0",
"size": 8597
} | [
"org.gvsig.gui.beans.doubleslider.DoubleSlider"
] | import org.gvsig.gui.beans.doubleslider.DoubleSlider; | import org.gvsig.gui.beans.doubleslider.*; | [
"org.gvsig.gui"
] | org.gvsig.gui; | 59,808 |
public FunctionResult execute(Evaluator evaluator, String arguments)
throws FunctionException {
Double result = null;
Double number = null;
try {
number = new Double(arguments);
} catch (Exception e) {
throw new FunctionException("Invalid argument.", e);
}
result = new Double(Math.toDegrees(nu... | FunctionResult function(Evaluator evaluator, String arguments) throws FunctionException { Double result = null; Double number = null; try { number = new Double(arguments); } catch (Exception e) { throw new FunctionException(STR, e); } result = new Double(Math.toDegrees(number.doubleValue())); return new FunctionResult(... | /**
* Executes the function for the specified argument. This method is called
* internally by Evaluator.
*
* @param evaluator
* An instance of Evaluator.
* @param arguments
* A string argument that will be converted to a double value and
* evaluated.
*
* @return A ... | Executes the function for the specified argument. This method is called internally by Evaluator | execute | {
"repo_name": "sylvainhalle/sase",
"path": "Source/Core/src/net/sourceforge/jeval/function/math/ToDegrees.java",
"license": "bsd-3-clause",
"size": 2330
} | [
"net.sourceforge.jeval.Evaluator",
"net.sourceforge.jeval.function.FunctionConstants",
"net.sourceforge.jeval.function.FunctionException",
"net.sourceforge.jeval.function.FunctionResult"
] | import net.sourceforge.jeval.Evaluator; import net.sourceforge.jeval.function.FunctionConstants; import net.sourceforge.jeval.function.FunctionException; import net.sourceforge.jeval.function.FunctionResult; | import net.sourceforge.jeval.*; import net.sourceforge.jeval.function.*; | [
"net.sourceforge.jeval"
] | net.sourceforge.jeval; | 785,145 |
boolean isVanished(Player player); | boolean isVanished(Player player); | /**
* Returns wether the player is vanished or not
*
* @param player the player to be checked
* @return wether the player is vanished
*/ | Returns wether the player is vanished or not | isVanished | {
"repo_name": "xXKeyleXx/MyPet",
"path": "modules/API/src/main/java/de/Keyle/MyPet/api/util/hooks/types/VanishedHook.java",
"license": "lgpl-3.0",
"size": 1228
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 2,640,891 |
public void test_create_solutions_silent() throws MalformedQueryException,
TokenMgrError, ParseException {
//CREATE ( SILENT )? SOLUTIONS SolutionSetName
final String sparql = "create silent solutions %solutionSet";
final UpdateRoot expected = new UpdateRoot();
{... | void function() throws MalformedQueryException, TokenMgrError, ParseException { final String sparql = STR; final UpdateRoot expected = new UpdateRoot(); { final CreateGraph op = new CreateGraph(); expected.addChild(op); op.setTargetSolutionSet(STR); op.setSilent(true); } final UpdateRoot actual = parseUpdate(sparql, ba... | /**
* <pre>
* create silent solutions %solutionSet
* </pre>
*/ | <code> create silent solutions %solutionSet </code> | test_create_solutions_silent | {
"repo_name": "blazegraph/database",
"path": "bigdata-sails-test/src/test/java/com/bigdata/rdf/sail/sparql/TestUpdateExprBuilder2.java",
"license": "gpl-2.0",
"size": 21429
} | [
"com.bigdata.rdf.sail.sparql.ast.ParseException",
"com.bigdata.rdf.sail.sparql.ast.TokenMgrError",
"com.bigdata.rdf.sparql.ast.CreateGraph",
"com.bigdata.rdf.sparql.ast.UpdateRoot",
"org.openrdf.query.MalformedQueryException"
] | import com.bigdata.rdf.sail.sparql.ast.ParseException; import com.bigdata.rdf.sail.sparql.ast.TokenMgrError; import com.bigdata.rdf.sparql.ast.CreateGraph; import com.bigdata.rdf.sparql.ast.UpdateRoot; import org.openrdf.query.MalformedQueryException; | import com.bigdata.rdf.sail.sparql.ast.*; import com.bigdata.rdf.sparql.ast.*; import org.openrdf.query.*; | [
"com.bigdata.rdf",
"org.openrdf.query"
] | com.bigdata.rdf; org.openrdf.query; | 1,133,699 |
public List<FeedMapping> getByFeedMappingId(Long feedMappingId) throws RemoteException {
return getByField(SelectorFields.FeedMapping.FEED_MAPPING_ID, feedMappingId);
} | List<FeedMapping> function(Long feedMappingId) throws RemoteException { return getByField(SelectorFields.FeedMapping.FEED_MAPPING_ID, feedMappingId); } | /**
* Retrieves FeedMappings by feedMappingId.
*
* @param feedMappingId
* @return a list of FeedMappings matching the feedMappingId
* @throws RemoteException for communication-related exceptions
*/ | Retrieves FeedMappings by feedMappingId | getByFeedMappingId | {
"repo_name": "ya7lelkom/googleads-java-lib",
"path": "modules/adwords_axis_utility_extension/src/main/java/com/google/api/ads/adwords/axis/utility/extension/delegates/FeedMappingDelegate.java",
"license": "apache-2.0",
"size": 3840
} | [
"com.google.api.ads.adwords.axis.utility.extension.util.SelectorFields",
"com.google.api.ads.adwords.axis.v201506.cm.FeedMapping",
"java.rmi.RemoteException",
"java.util.List"
] | import com.google.api.ads.adwords.axis.utility.extension.util.SelectorFields; import com.google.api.ads.adwords.axis.v201506.cm.FeedMapping; import java.rmi.RemoteException; import java.util.List; | import com.google.api.ads.adwords.axis.utility.extension.util.*; import com.google.api.ads.adwords.axis.v201506.cm.*; import java.rmi.*; import java.util.*; | [
"com.google.api",
"java.rmi",
"java.util"
] | com.google.api; java.rmi; java.util; | 1,959,660 |
@SuppressWarnings({"unchecked", "rawtypes"})
static DataType createRawType(
DataTypeFactory typeFactory,
@Nullable Class<? extends TypeSerializer<?>> rawSerializer,
@Nullable Class<?> conversionClass) {
if (rawSerializer != null) {
return DataTypes.RAW((Class) createConversionClass(conversionClass), i... | @SuppressWarnings({STR, STR}) static DataType createRawType( DataTypeFactory typeFactory, @Nullable Class<? extends TypeSerializer<?>> rawSerializer, @Nullable Class<?> conversionClass) { if (rawSerializer != null) { return DataTypes.RAW((Class) createConversionClass(conversionClass), instantiateRawSerializer(rawSerial... | /**
* Creates a raw data type.
*/ | Creates a raw data type | createRawType | {
"repo_name": "jinglining/flink",
"path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/extraction/ExtractionUtils.java",
"license": "apache-2.0",
"size": 32145
} | [
"javax.annotation.Nullable",
"org.apache.flink.api.common.typeutils.TypeSerializer",
"org.apache.flink.table.api.DataTypes",
"org.apache.flink.table.catalog.DataTypeFactory",
"org.apache.flink.table.types.DataType"
] | import javax.annotation.Nullable; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.table.api.DataTypes; import org.apache.flink.table.catalog.DataTypeFactory; import org.apache.flink.table.types.DataType; | import javax.annotation.*; import org.apache.flink.api.common.typeutils.*; import org.apache.flink.table.api.*; import org.apache.flink.table.catalog.*; import org.apache.flink.table.types.*; | [
"javax.annotation",
"org.apache.flink"
] | javax.annotation; org.apache.flink; | 2,492,345 |
Set<String> getHashSetsForFile(long fileID) throws TskCoreException {
Set<String> hashNames = new HashSet<>();
ArrayList<BlackboardArtifact> artifacts = tskCase.getBlackboardArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT, fileID);
for (BlackboardArtifact a : artifacts) {
... | Set<String> getHashSetsForFile(long fileID) throws TskCoreException { Set<String> hashNames = new HashSet<>(); ArrayList<BlackboardArtifact> artifacts = tskCase.getBlackboardArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT, fileID); for (BlackboardArtifact a : artifacts) { BlackboardAttribute attribute = a.ge... | /**
* get the names of the hashsets that the given fileID belongs to
*
* @param fileID the fileID to get all the Hashset names for
*
* @return a set of hash set names, each of which the given file belongs to
*
* @throws TskCoreException
*
*
* //TODO: this is mostly a cu... | get the names of the hashsets that the given fileID belongs to | getHashSetsForFile | {
"repo_name": "APriestman/autopsy",
"path": "ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/DrawableDB.java",
"license": "apache-2.0",
"size": 53480
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.HashSet",
"java.util.Set",
"org.sleuthkit.datamodel.BlackboardArtifact",
"org.sleuthkit.datamodel.BlackboardAttribute",
"org.sleuthkit.datamodel.TskCoreException"
] | import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Set; import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardAttribute; import org.sleuthkit.datamodel.TskCoreException; | import java.util.*; import org.sleuthkit.datamodel.*; | [
"java.util",
"org.sleuthkit.datamodel"
] | java.util; org.sleuthkit.datamodel; | 545,353 |
protected void grow() {
RajLog.d("[" + this.getClass().getName() + "] Growing tree: " + this);
Vector3 min = new Vector3(Float.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE);
Vector3 max = new Vector3(-Float.MAX_VALUE, -Float.MAX_VALUE, -Float.MAX_VALUE);
//Get a full list of all the members, including members... | void function() { RajLog.d("[" + this.getClass().getName() + STR + this); Vector3 min = new Vector3(Float.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE); Vector3 max = new Vector3(-Float.MAX_VALUE, -Float.MAX_VALUE, -Float.MAX_VALUE); ArrayList<IGraphNodeMember> members = getAllMembersRecursively(true); int members_count... | /**
* Grows the tree.
*/ | Grows the tree | grow | {
"repo_name": "sujitkjha/360-Video-Player-for-Android",
"path": "rajawali/src/main/java/org/rajawali3d/scenegraph/A_nAABBTree.java",
"license": "gpl-3.0",
"size": 29174
} | [
"java.util.ArrayList",
"org.rajawali3d.ATransformable3D",
"org.rajawali3d.bounds.BoundingBox",
"org.rajawali3d.bounds.BoundingSphere",
"org.rajawali3d.bounds.IBoundingVolume",
"org.rajawali3d.math.vector.Vector3",
"org.rajawali3d.util.RajLog"
] | import java.util.ArrayList; import org.rajawali3d.ATransformable3D; import org.rajawali3d.bounds.BoundingBox; import org.rajawali3d.bounds.BoundingSphere; import org.rajawali3d.bounds.IBoundingVolume; import org.rajawali3d.math.vector.Vector3; import org.rajawali3d.util.RajLog; | import java.util.*; import org.rajawali3d.*; import org.rajawali3d.bounds.*; import org.rajawali3d.math.vector.*; import org.rajawali3d.util.*; | [
"java.util",
"org.rajawali3d",
"org.rajawali3d.bounds",
"org.rajawali3d.math",
"org.rajawali3d.util"
] | java.util; org.rajawali3d; org.rajawali3d.bounds; org.rajawali3d.math; org.rajawali3d.util; | 2,611,294 |
@Test
public void falseWhenAddressesDashboard() {
when(this.syntaxProvider.getPortalRequestInfo(mockRequest)).thenReturn(this.portalRequestInfo);
when(this.portalRequestInfo.getUrlState()).thenReturn(UrlState.NORMAL);
predicate.setUrlSyntaxProvider(this.syntaxProvider);
assert... | void function() { when(this.syntaxProvider.getPortalRequestInfo(mockRequest)).thenReturn(this.portalRequestInfo); when(this.portalRequestInfo.getUrlState()).thenReturn(UrlState.NORMAL); predicate.setUrlSyntaxProvider(this.syntaxProvider); assertFalse(predicate.apply(this.mockRequest)); } | /**
* Test that when the URL is a NORMAL url state URL, and thus one addressing a mosaic of normal-mode portlets,
* returns false.
*/ | Test that when the URL is a NORMAL url state URL, and thus one addressing a mosaic of normal-mode portlets, returns false | falseWhenAddressesDashboard | {
"repo_name": "MichaelVose2/uPortal",
"path": "uportal-war/src/test/java/org/apereo/portal/rendering/predicates/FocusedOnOnePortletPredicateTest.java",
"license": "apache-2.0",
"size": 4284
} | [
"org.apereo.portal.url.UrlState",
"org.junit.Assert",
"org.mockito.Mockito"
] | import org.apereo.portal.url.UrlState; import org.junit.Assert; import org.mockito.Mockito; | import org.apereo.portal.url.*; import org.junit.*; import org.mockito.*; | [
"org.apereo.portal",
"org.junit",
"org.mockito"
] | org.apereo.portal; org.junit; org.mockito; | 2,663,141 |
@POST
@Produces({MediaType.APPLICATION_JSON})
@Consumes({MediaType.APPLICATION_JSON})
@ApiOperation(value = "Creates a new user", notes = "Adds a user", position = 2)
@ApiResponses(value = {
@ApiResponse(code = 200, message = ResponseConstants.STATUS_MESSAGE_OK),
@ApiResponse... | @Produces({MediaType.APPLICATION_JSON}) @Consumes({MediaType.APPLICATION_JSON}) @ApiOperation(value = STR, notes = STR, position = 2) @ApiResponses(value = { @ApiResponse(code = 200, message = ResponseConstants.STATUS_MESSAGE_OK), @ApiResponse(code = 201, message = ResponseConstants.STATUS_MESSAGE_CREATED), @ApiRespons... | /**
* Adds a new user and populates it with the supplied properties.
*/ | Adds a new user and populates it with the supplied properties | createUser | {
"repo_name": "jreijn/hippo-addon-restful-webservices",
"path": "src/main/java/org/onehippo/forge/webservices/jaxrs/management/UsersResource.java",
"license": "apache-2.0",
"size": 26668
} | [
"com.wordnik.swagger.annotations.ApiOperation",
"com.wordnik.swagger.annotations.ApiParam",
"com.wordnik.swagger.annotations.ApiResponse",
"com.wordnik.swagger.annotations.ApiResponses",
"javax.jcr.Node",
"javax.jcr.RepositoryException",
"javax.jcr.Session",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path... | import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiParam; import com.wordnik.swagger.annotations.ApiResponse; import com.wordnik.swagger.annotations.ApiResponses; import javax.jcr.Node; import javax.jcr.RepositoryException; import javax.jcr.Session; import javax.ws.rs.Consume... | import com.wordnik.swagger.annotations.*; import javax.jcr.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onehippo.forge.webservices.jaxrs.exception.*; import org.onehippo.forge.webservices.jaxrs.jcr.util.*; import org.onehippo.forge.webservices.jaxrs.management.model.*; | [
"com.wordnik.swagger",
"javax.jcr",
"javax.ws",
"org.onehippo.forge"
] | com.wordnik.swagger; javax.jcr; javax.ws; org.onehippo.forge; | 668,913 |
@Test
public void testSerializeWithContextPath() throws Exception {
DefDescriptor<ApplicationDef> app = definitionService.getDefDescriptor("test:fakeTokensApp", ApplicationDef.class);
AuraContext ctx = contextService
.startContext(Mode.UTEST, Format.JSON, Authentication.UNAUTHEN... | void function() throws Exception { DefDescriptor<ApplicationDef> app = definitionService.getDefDescriptor(STR, ApplicationDef.class); AuraContext ctx = contextService .startContext(Mode.UTEST, Format.JSON, Authentication.UNAUTHENTICATED, app); ctx.setContextPath("/cool"); String res = ctx.serialize(AuraContext.Encoding... | /**
* Verify contextPath property in JSON is set when contextPath present.
*/ | Verify contextPath property in JSON is set when contextPath present | testSerializeWithContextPath | {
"repo_name": "madmax983/aura",
"path": "aura-integration-test/src/test/java/org/auraframework/integration/test/context/AuraContextIntegrationTest.java",
"license": "apache-2.0",
"size": 27820
} | [
"org.auraframework.def.ApplicationDef",
"org.auraframework.def.DefDescriptor",
"org.auraframework.system.AuraContext"
] | import org.auraframework.def.ApplicationDef; import org.auraframework.def.DefDescriptor; import org.auraframework.system.AuraContext; | import org.auraframework.def.*; import org.auraframework.system.*; | [
"org.auraframework.def",
"org.auraframework.system"
] | org.auraframework.def; org.auraframework.system; | 2,774,080 |
void removeUserFromBlacklist(PerunSession perunSession, SecurityTeam securityTeam, User user) throws InternalErrorException, PrivilegeException, SecurityTeamNotExistsException, UserNotExistsException, MemberNotExistsException, UserAlreadyRemovedException; | void removeUserFromBlacklist(PerunSession perunSession, SecurityTeam securityTeam, User user) throws InternalErrorException, PrivilegeException, SecurityTeamNotExistsException, UserNotExistsException, MemberNotExistsException, UserAlreadyRemovedException; | /**
* remove user from blacklist of given security team
*
* @param perunSession
* @param securityTeam
* @param user user who will became a security administrator
* @throws InternalErrorException
* @throws PrivilegeException Can do only PerunAdmin or SecurityAdmin of the SecurityTeam
*/ | remove user from blacklist of given security team | removeUserFromBlacklist | {
"repo_name": "licehammer/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/SecurityTeamsManager.java",
"license": "bsd-2-clause",
"size": 12360
} | [
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"cz.metacentrum.perun.core.api.exceptions.MemberNotExistsException",
"cz.metacentrum.perun.core.api.exceptions.PrivilegeException",
"cz.metacentrum.perun.core.api.exceptions.SecurityTeamNotExistsException",
"cz.metacentrum.perun.core.api.exc... | import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.MemberNotExistsException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.SecurityTeamNotExistsException; import cz.metacentrum.peru... | import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 230,856 |
void fireIngestJobCancelled(long ingestJobId) {
AutopsyEvent event = new AutopsyEvent(IngestJobEvent.CANCELLED.toString(), ingestJobId, null);
eventPublishingExecutor.submit(new PublishEventTask(event, jobEventPublisher));
} | void fireIngestJobCancelled(long ingestJobId) { AutopsyEvent event = new AutopsyEvent(IngestJobEvent.CANCELLED.toString(), ingestJobId, null); eventPublishingExecutor.submit(new PublishEventTask(event, jobEventPublisher)); } | /**
* Publishes an ingest event signifying an ingest job was canceled.
*
* @param ingestJobId The ingest job id.
*/ | Publishes an ingest event signifying an ingest job was canceled | fireIngestJobCancelled | {
"repo_name": "sleuthkit/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java",
"license": "apache-2.0",
"size": 63582
} | [
"org.sleuthkit.autopsy.events.AutopsyEvent"
] | import org.sleuthkit.autopsy.events.AutopsyEvent; | import org.sleuthkit.autopsy.events.*; | [
"org.sleuthkit.autopsy"
] | org.sleuthkit.autopsy; | 609,814 |
@Test
public void commit_successfulLoginUsingUniqueIdAndSecurityName() throws Exception {
Subject subject = new Subject();
Map<String, Object> sharedState = new HashMap<String, Object>();
Hashtable<String, Object> hashtable = new Hashtable<String, Object>();
hashtable.put(Attrib... | void function() throws Exception { Subject subject = new Subject(); Map<String, Object> sharedState = new HashMap<String, Object>(); Hashtable<String, Object> hashtable = new Hashtable<String, Object>(); hashtable.put(AttributeNameConstants.WSCREDENTIAL_UNIQUEID, UNIQUE_ID); hashtable.put(AttributeNameConstants.WSCREDE... | /**
* Test method for {@link com.ibm.ws.security.authentication.jaas.modules.HashtableLoginModule#commit()}.
*/ | Test method for <code>com.ibm.ws.security.authentication.jaas.modules.HashtableLoginModule#commit()</code> | commit_successfulLoginUsingUniqueIdAndSecurityName | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.authentication.builtin/test/com/ibm/ws/security/authentication/jaas/modules/HashtableLoginModuleTest.java",
"license": "epl-1.0",
"size": 25484
} | [
"com.ibm.wsspi.security.token.AttributeNameConstants",
"java.util.HashMap",
"java.util.Hashtable",
"java.util.Map",
"javax.security.auth.Subject",
"org.junit.Assert"
] | import com.ibm.wsspi.security.token.AttributeNameConstants; import java.util.HashMap; import java.util.Hashtable; import java.util.Map; import javax.security.auth.Subject; import org.junit.Assert; | import com.ibm.wsspi.security.token.*; import java.util.*; import javax.security.auth.*; import org.junit.*; | [
"com.ibm.wsspi",
"java.util",
"javax.security",
"org.junit"
] | com.ibm.wsspi; java.util; javax.security; org.junit; | 2,306,157 |
@Test
public void filterEqual() throws Exception {
Predicate pred;
this.scan = new TestUtil.MockScan(-5, 5, testWidth);
pred = new Predicate(0, Predicate.Op.EQUALS, TestUtil.getField(-5));
Filter op = new Filter(pred, scan);
op.open();
assertTrue(TestUtil.compareTuples(Utility.getHeapTuple(-5, testWidth... | void function() throws Exception { Predicate pred; this.scan = new TestUtil.MockScan(-5, 5, testWidth); pred = new Predicate(0, Predicate.Op.EQUALS, TestUtil.getField(-5)); Filter op = new Filter(pred, scan); op.open(); assertTrue(TestUtil.compareTuples(Utility.getHeapTuple(-5, testWidth), op.next())); op.close(); this... | /**
* Unit test for Filter.getNext() using an = predicate
*/ | Unit test for Filter.getNext() using an = predicate | filterEqual | {
"repo_name": "shailendert/DBMS",
"path": "test/simpledb/FilterTest.java",
"license": "gpl-3.0",
"size": 3718
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,083,542 |
public Output<TInt64> outputShape() {
return outputShape;
}
public static class Options {
private Boolean keepDims;
private Options() {
} | Output<TInt64> function() { return outputShape; } public static class Options { private Boolean keepDims; private Options() { } | /**
* Gets outputShape.
*
* @return outputShape.
*/ | Gets outputShape | outputShape | {
"repo_name": "tensorflow/java",
"path": "tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/sparse/SparseReduceMaxSparse.java",
"license": "apache-2.0",
"size": 7051
} | [
"org.tensorflow.Output",
"org.tensorflow.types.TInt64"
] | import org.tensorflow.Output; import org.tensorflow.types.TInt64; | import org.tensorflow.*; import org.tensorflow.types.*; | [
"org.tensorflow",
"org.tensorflow.types"
] | org.tensorflow; org.tensorflow.types; | 1,463,800 |
public static void writeStatFiles(File procfsRootDir, String[] pids,
ProcessStatInfo[] procs, ProcessTreeSmapMemInfo[] smaps)
throws IOException {
for (int i = 0; i < pids.length; i++) {
File statFile = new File(new File(procfsRootDir, pids[i]),
ProcfsBasedProcessTree.PROCFS_STAT_FILE)... | static void function(File procfsRootDir, String[] pids, ProcessStatInfo[] procs, ProcessTreeSmapMemInfo[] smaps) throws IOException { for (int i = 0; i < pids.length; i++) { File statFile = new File(new File(procfsRootDir, pids[i]), ProcfsBasedProcessTree.PROCFS_STAT_FILE); BufferedWriter bw = null; try { FileWriter fw... | /**
* Write stat files under the specified pid directories with data setup in
* the
* corresponding ProcessStatInfo objects
*
* @param procfsRootDir
* root directory of procfs file system
* @param pids
* the PID directories under which to create the stat file
* @param procs
* c... | Write stat files under the specified pid directories with data setup in the corresponding ProcessStatInfo objects | writeStatFiles | {
"repo_name": "srijeyanthan/hops",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java",
"license": "apache-2.0",
"size": 34875
} | [
"java.io.BufferedWriter",
"java.io.File",
"java.io.FileWriter",
"java.io.IOException",
"org.apache.hadoop.yarn.util.ProcfsBasedProcessTree"
] | import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import org.apache.hadoop.yarn.util.ProcfsBasedProcessTree; | import java.io.*; import org.apache.hadoop.yarn.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,314,193 |
@Deprecated
protected FileItem createItem(final Map<String, String> headers,
final boolean isFormField)
throws FileUploadException {
return getFileItemFactory().createItem(getFieldName(headers),
getHeader(headers, CONTENT_TYPE),
i... | FileItem function(final Map<String, String> headers, final boolean isFormField) throws FileUploadException { return getFileItemFactory().createItem(getFieldName(headers), getHeader(headers, CONTENT_TYPE), isFormField, getFileName(headers)); } | /**
* Creates a new {@link FileItem} instance.
*
* @param headers A {@code Map} containing the HTTP request
* headers.
* @param isFormField Whether or not this item is a form field, as
* opposed to a file.
*
* @return A newly crea... | Creates a new <code>FileItem</code> instance | createItem | {
"repo_name": "apache/commons-fileupload",
"path": "src/main/java/org/apache/commons/fileupload2/FileUploadBase.java",
"license": "apache-2.0",
"size": 24256
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,352,227 |
@REST(name = "filemetadatas", method = RequestMethod.GET)
public static RestFileMetadata getById(final int id) {
final RestFileMetadata restFileMetadata = new RestFileMetadata(FileMetadataManager.getById(id));
if (restFileMetadata.isNull()) {
return null;
}
return res... | @REST(name = STR, method = RequestMethod.GET) static RestFileMetadata function(final int id) { final RestFileMetadata restFileMetadata = new RestFileMetadata(FileMetadataManager.getById(id)); if (restFileMetadata.isNull()) { return null; } return restFileMetadata; } | /**
* <p>
* Finds the RestFileMetadata matching the <code>id</code>
* </p>
*
* @param id the id of the RestFileMetadata
*/ | Finds the RestFileMetadata matching the <code>id</code> | getById | {
"repo_name": "niavok/elveos",
"path": "main/src/main/java/com/bloatit/rest/resources/RestFileMetadata.java",
"license": "agpl-3.0",
"size": 7808
} | [
"com.bloatit.framework.restprocessor.RestServer",
"com.bloatit.model.managers.FileMetadataManager"
] | import com.bloatit.framework.restprocessor.RestServer; import com.bloatit.model.managers.FileMetadataManager; | import com.bloatit.framework.restprocessor.*; import com.bloatit.model.managers.*; | [
"com.bloatit.framework",
"com.bloatit.model"
] | com.bloatit.framework; com.bloatit.model; | 1,619,138 |
protected void loadStore() {
LOG.trace("Loading to 1st level cache from idempotent filestore: {}", fileStore);
if (!fileStore.exists()) {
return;
}
cache.clear();
Scanner scanner = null;
try {
scanner = new Scanner(fileStore);
sca... | void function() { LOG.trace(STR, fileStore); if (!fileStore.exists()) { return; } cache.clear(); Scanner scanner = null; try { scanner = new Scanner(fileStore); scanner.useDelimiter(STORE_DELIMITER); while (scanner.hasNextLine()) { String line = scanner.nextLine(); cache.put(line, line); } } catch (IOException e) { thr... | /**
* Loads the given file store into the 1st level cache
*/ | Loads the given file store into the 1st level cache | loadStore | {
"repo_name": "chicagozer/rheosoft",
"path": "camel-core/src/main/java/org/apache/camel/processor/idempotent/FileIdempotentRepository.java",
"license": "apache-2.0",
"size": 10328
} | [
"java.io.IOException",
"java.util.Scanner",
"org.apache.camel.util.ObjectHelper"
] | import java.io.IOException; import java.util.Scanner; import org.apache.camel.util.ObjectHelper; | import java.io.*; import java.util.*; import org.apache.camel.util.*; | [
"java.io",
"java.util",
"org.apache.camel"
] | java.io; java.util; org.apache.camel; | 1,037,834 |
return ClassLocator.hasInterface(OptionHandler.class, cls);
} | return ClassLocator.hasInterface(OptionHandler.class, cls); } | /**
* Checks whether this extractor actually handles this type of class.
*
* @param cls the class to check
* @return true if the extractor handles the object/class
*/ | Checks whether this extractor actually handles this type of class | handles | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/gui/visualization/debug/propertyextractor/OptionHandlerPropertyExtractor.java",
"license": "gpl-3.0",
"size": 2999
} | [
"nz.ac.waikato.cms.locator.ClassLocator"
] | import nz.ac.waikato.cms.locator.ClassLocator; | import nz.ac.waikato.cms.locator.*; | [
"nz.ac.waikato"
] | nz.ac.waikato; | 121,247 |
public static ShardingSpherePipelineDataSourceConfiguration getHostConfiguration(final Map<String, YamlTableRuleConfiguration> tableRules) {
return getConfiguration(String.format(SOURCE_JDBC_URL, ENGINE_ENV_PROPS.getProperty("db.host.host")), tableRules);
} | static ShardingSpherePipelineDataSourceConfiguration function(final Map<String, YamlTableRuleConfiguration> tableRules) { return getConfiguration(String.format(SOURCE_JDBC_URL, ENGINE_ENV_PROPS.getProperty(STR)), tableRules); } | /**
* Get host sharding jdbc configuration.
*
* @param tableRules table rules
* @return sharding jdbc configuration
*/ | Get host sharding jdbc configuration | getHostConfiguration | {
"repo_name": "apache/incubator-shardingsphere",
"path": "shardingsphere-test/shardingsphere-integration-scaling-test/shardingsphere-integration-scaling-test-mysql/src/test/java/org/apache/shardingsphere/integration/scaling/test/mysql/env/config/SourceConfiguration.java",
"license": "apache-2.0",
"size": 5104
... | [
"java.util.Map",
"org.apache.shardingsphere.data.pipeline.api.datasource.config.impl.ShardingSpherePipelineDataSourceConfiguration",
"org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration"
] | import java.util.Map; import org.apache.shardingsphere.data.pipeline.api.datasource.config.impl.ShardingSpherePipelineDataSourceConfiguration; import org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration; | import java.util.*; import org.apache.shardingsphere.data.pipeline.api.datasource.config.impl.*; import org.apache.shardingsphere.sharding.yaml.config.rule.*; | [
"java.util",
"org.apache.shardingsphere"
] | java.util; org.apache.shardingsphere; | 1,166,408 |
public int maxParents() {
int result = Integer.MIN_VALUE;
for (final ObjectHolder<EvolutionaryOperator> holder : getList()) {
result = Math.max(result, holder.getObj().parentsNeeded());
}
return result;
} | int function() { int result = Integer.MIN_VALUE; for (final ObjectHolder<EvolutionaryOperator> holder : getList()) { result = Math.max(result, holder.getObj().parentsNeeded()); } return result; } | /**
* Determine the maximum number of parents required by any of the operators
* in the list.
* <p/>
* @return The maximum number of parents.
*/ | Determine the maximum number of parents required by any of the operators in the list. | maxParents | {
"repo_name": "ladygagapowerbot/bachelor-thesis-implementation",
"path": "lib/Encog/src/main/java/org/encog/ml/ea/opp/OperationList.java",
"license": "mit",
"size": 3510
} | [
"org.encog.util.obj.ObjectHolder"
] | import org.encog.util.obj.ObjectHolder; | import org.encog.util.obj.*; | [
"org.encog.util"
] | org.encog.util; | 1,101,903 |
private void performHTTPCall(Event[] inEvents, String bulbEP, String logText) {
if (inEvents != null && inEvents.length > 0) {
EventPrinter.print(inEvents);
String url = constants.prop.getProperty(bulbEP);
CloseableHttpAsyncClient httpclient = null; | void function(Event[] inEvents, String bulbEP, String logText) { if (inEvents != null && inEvents.length > 0) { EventPrinter.print(inEvents); String url = constants.prop.getProperty(bulbEP); CloseableHttpAsyncClient httpclient = null; | /**
* Make http call to specified endpoint with events
* @param inEvents
* @param bulbEP
* @param logText
*/ | Make http call to specified endpoint with events | performHTTPCall | {
"repo_name": "charithag/iot-server-appliances",
"path": "RaspberryCEPAgent/FireAlarm/src/main/java/org/wso2/devicemgt/raspberry/agent/SidhdhiQuery.java",
"license": "apache-2.0",
"size": 10428
} | [
"org.apache.http.impl.nio.client.CloseableHttpAsyncClient",
"org.wso2.siddhi.core.event.Event",
"org.wso2.siddhi.core.util.EventPrinter"
] | import org.apache.http.impl.nio.client.CloseableHttpAsyncClient; import org.wso2.siddhi.core.event.Event; import org.wso2.siddhi.core.util.EventPrinter; | import org.apache.http.impl.nio.client.*; import org.wso2.siddhi.core.event.*; import org.wso2.siddhi.core.util.*; | [
"org.apache.http",
"org.wso2.siddhi"
] | org.apache.http; org.wso2.siddhi; | 2,197,549 |
native private static final boolean set_state(Pointer pipeline, int state); | native static final boolean function(Pointer pipeline, int state); | /**
* Set the playing state of this pipeline.
*/ | Set the playing state of this pipeline | set_state | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/javax/sound/sampled/gstreamer/lines/GstPipeline.java",
"license": "gpl-2.0",
"size": 11210
} | [
"gnu.classpath.Pointer"
] | import gnu.classpath.Pointer; | import gnu.classpath.*; | [
"gnu.classpath"
] | gnu.classpath; | 1,190,615 |
public List<String> vlans() {
return this.vlans;
} | List<String> function() { return this.vlans; } | /**
* Get the vlans property: List of device vlans.
*
* @return the vlans value.
*/ | Get the vlans property: List of device vlans | vlans | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/NetworkInterface.java",
"license": "mit",
"size": 2522
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 566,166 |
public Account getAccount(String email, String password) {
Query query = em.createQuery("select entity from Account entity where entity.email=:email and entity.password=:password", Account.class);
query.setParameter("email", email);
query.setParameter("password", password);
return (Account) query.getRe... | Account function(String email, String password) { Query query = em.createQuery(STR, Account.class); query.setParameter("email", email); query.setParameter(STR, password); return (Account) query.getResultList().get(0); } | /**
* Gets an account by its email address and password.
*
* @param email
* The valid email address that is unique.
* @param password
* The password which is associated to the given email address.
* @return The Account that is associated with the email address
* or null if not found.
*/ | Gets an account by its email address and password | getAccount | {
"repo_name": "InteractiveSystemsGroup/GamificationEngine-Kinben",
"path": "src/main/java/info/interactivesystems/gamificationengine/dao/AccountDAO.java",
"license": "lgpl-3.0",
"size": 2173
} | [
"info.interactivesystems.gamificationengine.entities.Account",
"javax.persistence.Query"
] | import info.interactivesystems.gamificationengine.entities.Account; import javax.persistence.Query; | import info.interactivesystems.gamificationengine.entities.*; import javax.persistence.*; | [
"info.interactivesystems.gamificationengine",
"javax.persistence"
] | info.interactivesystems.gamificationengine; javax.persistence; | 62,334 |
void expectArgumentMatchesParameter(NodeTraversal t, Node n, JSType argType,
JSType paramType, Node callNode, int ordinal) {
if (!argType.canAssignTo(paramType)) {
mismatch(t, n,
String.format("actual parameter %d of %s does not match " +
"formal parameter", ordinal,
... | void expectArgumentMatchesParameter(NodeTraversal t, Node n, JSType argType, JSType paramType, Node callNode, int ordinal) { if (!argType.canAssignTo(paramType)) { mismatch(t, n, String.format(STR + STR, ordinal, getReadableJSTypeName(callNode.getFirstChild(), false)), argType, paramType); } } | /**
* Expect that the type of an argument matches the type of the parameter
* that it's fulfilling.
*
* @param t The node traversal.
* @param n The node to issue warnings on.
* @param argType The type of the argument.
* @param paramType The type of the parameter.
* @param callNode The call node,... | Expect that the type of an argument matches the type of the parameter that it's fulfilling | expectArgumentMatchesParameter | {
"repo_name": "nuxleus/closure-compiler",
"path": "src/com/google/javascript/jscomp/TypeValidator.java",
"license": "apache-2.0",
"size": 29320
} | [
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.jstype.JSType"
] | import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.JSType; | import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*; | [
"com.google.javascript"
] | com.google.javascript; | 2,829,680 |
protected void addImpl(Component comp, Object constraints, int index)
{
super.addImpl(comp, constraints, index);
} | void function(Component comp, Object constraints, int index) { super.addImpl(comp, constraints, index); } | /**
* DOCUMENT ME!
*
* @param comp DOCUMENT ME!
* @param constraints DOCUMENT ME!
* @param index DOCUMENT ME!
*/ | DOCUMENT ME | addImpl | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/javax/swing/JRootPane.java",
"license": "gpl-2.0",
"size": 17752
} | [
"java.awt.Component"
] | import java.awt.Component; | import java.awt.*; | [
"java.awt"
] | java.awt; | 851,538 |
private String getNamespacePrefix(String objectNamespace) {
String prefix = null;
Pattern logEntry = Pattern.compile("\\{(.*?)\\}");
Matcher matchPattern = logEntry.matcher(objectNamespace);
while (matchPattern.find()) {
String namespaceValue = matchPattern.group(1);
String[] namespaceStringArrs = name... | String function(String objectNamespace) { String prefix = null; Pattern logEntry = Pattern.compile(STR); Matcher matchPattern = logEntry.matcher(objectNamespace); while (matchPattern.find()) { String namespaceValue = matchPattern.group(1); String[] namespaceStringArrs = namespaceValue.split(","); for (String namespaceS... | /**
* Gets the namespace prefix
* @param objectNamespace
* @return
*/ | Gets the namespace prefix | getNamespacePrefix | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.visualdatamapper.diagram/src/org/wso2/developerstudio/datamapper/diagram/custom/action/AddNewObjectAction.java",
"license": "apache-2.0",
"size": 19216
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 2,041,702 |
public static IndexRequest indexRequest(String index) {
return new IndexRequest(index);
} | static IndexRequest function(String index) { return new IndexRequest(index); } | /**
* Create an index request against a specific index. Note the {@link IndexRequest#type(String)} must be
* set as well and optionally the {@link IndexRequest#id(String)}.
*
* @param index The index name to index the request against
* @return The index request
* @see org.elasticsearch.cli... | Create an index request against a specific index. Note the <code>IndexRequest#type(String)</code> must be set as well and optionally the <code>IndexRequest#id(String)</code> | indexRequest | {
"repo_name": "jbertouch/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/client/Requests.java",
"license": "apache-2.0",
"size": 20843
} | [
"org.elasticsearch.action.index.IndexRequest"
] | import org.elasticsearch.action.index.IndexRequest; | import org.elasticsearch.action.index.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 2,283,895 |
public static URL createURL(String fileName, String entryName) {
try {
return new URL("zip", "", -1, fileName + "!" + entryName, new ZipURLHandler(fileName, entryName));
} catch (MalformedURLException e) {
throw new IllegalArgumentException("Unable to create URL instance from passed in file and entry. File... | static URL function(String fileName, String entryName) { try { return new URL("zip", STR!STRUnable to create URL instance from passed in file and entry. File: STR Entry: " + entryName, e); } } | /**
* Static method to get URL from a zip file and entry path
*
* @param fileName zip file path. This should be absolute.
* @param entryName entry name path. From the root of the zip file
*
* @return {@link URL} The URL to the specified entry inside of the zip archive
*/ | Static method to get URL from a zip file and entry path | createURL | {
"repo_name": "b2ihealthcare/snow-owl",
"path": "commons/com.b2international.commons/src/com/b2international/commons/ZipURLHandler.java",
"license": "apache-2.0",
"size": 3729
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,808,690 |
@Override
public synchronized List<IResource> listResourcesByType(String type) {
if (type == null) {
// return all resources
return this.listResources();
} else {
// return resources of a given type
IResourceRepository repo = resourceRepositories.get(type);
if (repo != null) {
return new Arra... | synchronized List<IResource> function(String type) { if (type == null) { return this.listResources(); } else { IResourceRepository repo = resourceRepositories.get(type); if (repo != null) { return new ArrayList<IResource>(repo.listResources()); } else { return null; } } } | /**
* List all the existing resources of a given type. If type is null, list all the resources of all types
*
* @return The list of the resources contained on the given type repository. Is the type is not a valid type of repository it will return null
* value.
*/ | List all the existing resources of a given type. If type is null, list all the resources of all types | listResourcesByType | {
"repo_name": "dana-i2cat/opennaas-routing-nfv",
"path": "core/resources/src/main/java/org/opennaas/core/resources/ResourceManager.java",
"license": "lgpl-3.0",
"size": 13143
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,226,073 |
public static DtsConceptId newDtsConceptId(final String namespace,
final String propertyName, final String propertyValue)
{
return new DtsConceptId(((namespace == null) ? " " : namespace), propertyName,
propertyValue);
} | static DtsConceptId function(final String namespace, final String propertyName, final String propertyValue) { return new DtsConceptId(((namespace == null) ? " " : namespace), propertyName, propertyValue); } | /**
* A factory method for {@link DtsConcept}s
*
* @param namespace
* @param propertyName
* @param propertyValue
*/ | A factory method for <code>DtsConcept</code>s | newDtsConceptId | {
"repo_name": "openfurther/further-open-core",
"path": "dts/dts-impl/src/main/java/edu/utah/further/dts/impl/util/DtsUtil.java",
"license": "apache-2.0",
"size": 15943
} | [
"edu.utah.further.dts.api.to.DtsConceptId"
] | import edu.utah.further.dts.api.to.DtsConceptId; | import edu.utah.further.dts.api.to.*; | [
"edu.utah.further"
] | edu.utah.further; | 903,765 |
public static SpaceSummary createSpaceSummary(Document spaceWebHome)
{
String spaceKey = spaceWebHome.getSpace();
String title = spaceWebHome.getTitle();
if (title == null || title.equals("")) {
title = spaceKey;
}
SpaceSummary result = new SpaceSummary();
... | static SpaceSummary function(Document spaceWebHome) { String spaceKey = spaceWebHome.getSpace(); String title = spaceWebHome.getTitle(); if (title == null title.equals(STRview")); return result; } | /**
* Create a space summary starting from the space Web home.
*
* @return The SpaceSummary representing the space.
*/ | Create a space summary starting from the space Web home | createSpaceSummary | {
"repo_name": "xwiki-contrib/sankoreorg",
"path": "xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/xmlrpc/DomainObjectFactory.java",
"license": "lgpl-2.1",
"size": 17950
} | [
"com.xpn.xwiki.api.Document",
"org.codehaus.swizzle.confluence.SpaceSummary"
] | import com.xpn.xwiki.api.Document; import org.codehaus.swizzle.confluence.SpaceSummary; | import com.xpn.xwiki.api.*; import org.codehaus.swizzle.confluence.*; | [
"com.xpn.xwiki",
"org.codehaus.swizzle"
] | com.xpn.xwiki; org.codehaus.swizzle; | 1,253,265 |
History.addValueChangeHandler(new ValueChangeHandler<String>() {
| History.addValueChangeHandler(new ValueChangeHandler<String>() { | /**
* This is the entry point method.
*/ | This is the entry point method | onModuleLoad | {
"repo_name": "akjava/gwt-three.js-test",
"path": "src/com/akjava/gwt/threetest/client/ThreeTest.java",
"license": "apache-2.0",
"size": 1493
} | [
"com.google.gwt.event.logical.shared.ValueChangeHandler",
"com.google.gwt.user.client.History"
] | import com.google.gwt.event.logical.shared.ValueChangeHandler; import com.google.gwt.user.client.History; | import com.google.gwt.event.logical.shared.*; import com.google.gwt.user.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 220,926 |
void setStartTime(DateTime startTime); | void setStartTime(DateTime startTime); | /**
* set the start time for the job
*
* @param startTime the start time for the job
*/ | set the start time for the job | setStartTime | {
"repo_name": "rashidaligee/kylo",
"path": "core/job-repository/job-repository-api/src/main/java/com/thinkbiganalytics/jobrepo/query/model/ExecutedJob.java",
"license": "apache-2.0",
"size": 6391
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,243,160 |
@Override
public void setVisible(boolean visible) {
super.setVisible(visible);
if (visible) {
IWizardPage previousPage = getPreviousPage();
if(previousPage instanceof ClonePage){
ClonePage page = (ClonePage) previousPage;
File directory = page.getDestinationDirectory();
setInitialSelection(dir... | void function(boolean visible) { super.setVisible(visible); if (visible) { IWizardPage previousPage = getPreviousPage(); if(previousPage instanceof ClonePage){ ClonePage page = (ClonePage) previousPage; File directory = page.getDestinationDirectory(); setInitialSelection(directory); } | /**
* Set the focus on path fields when page becomes visible.
*/ | Set the focus on path fields when page becomes visible | setVisible | {
"repo_name": "tectronics/mercurialeclipse",
"path": "plugin/src/com/vectrace/MercurialEclipse/wizards/ProjectsImportPage.java",
"license": "epl-1.0",
"size": 37924
} | [
"java.io.File",
"org.eclipse.jface.wizard.IWizardPage"
] | import java.io.File; import org.eclipse.jface.wizard.IWizardPage; | import java.io.*; import org.eclipse.jface.wizard.*; | [
"java.io",
"org.eclipse.jface"
] | java.io; org.eclipse.jface; | 591,375 |
public Builder putAllExtraParam(Map<String, Object> map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
} | Builder function(Map<String, Object> map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } | /**
* 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 PaymentIntentUpdateParams.PaymentMethodOptions#extraParams} for the field
* documentation.
... | 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>PaymentIntentUpdateParams.PaymentMethodOptions#extraParams</code> for the field documentation | putAllExtraParam | {
"repo_name": "stripe/stripe-java",
"path": "src/main/java/com/stripe/param/PaymentIntentUpdateParams.java",
"license": "mit",
"size": 323121
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 495,751 |
public static FileStatus [] listStatus(final FileSystem fs,
final Path dir, final PathFilter filter) throws IOException {
FileStatus [] status = null;
try {
status = filter == null ? fs.listStatus(dir) : fs.listStatus(dir, filter);
} catch (FileNotFoundException fnfe) {
// if directory d... | static FileStatus [] function(final FileSystem fs, final Path dir, final PathFilter filter) throws IOException { FileStatus [] status = null; try { status = filter == null ? fs.listStatus(dir) : fs.listStatus(dir, filter); } catch (FileNotFoundException fnfe) { LOG.info(dir + STR); } if (status == null status.length < ... | /**
* Calls fs.listStatus() and treats FileNotFoundException as non-fatal
* This would accommodate difference in various hadoop versions
*
* @param fs file system
* @param dir directory
* @param filter path filter
* @return null if tabledir doesn't exist, otherwise FileStatus array
*/ | Calls fs.listStatus() and treats FileNotFoundException as non-fatal This would accommodate difference in various hadoop versions | listStatus | {
"repo_name": "lifeng5042/RStore",
"path": "src/org/apache/hadoop/hbase/util/FSUtils.java",
"license": "gpl-2.0",
"size": 32784
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.PathFilter"
] | import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.PathFilter; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,024,025 |
public static void main(final String[] args) throws IOException,
DocumentException {
// Set log level
logger.setLevel(Globals.LOG_LEVEL);
logger.getParent().getHandlers()[0].setFormatter(Globals.LOG_FORMATTER);
// Parse the command line
final int argsOptions = parseCommandLine(args);
... | static void function(final String[] args) throws IOException, DocumentException { logger.setLevel(Globals.LOG_LEVEL); logger.getParent().getHandlers()[0].setFormatter(Globals.LOG_FORMATTER); final int argsOptions = parseCommandLine(args); final File designFile = new File(args[argsOptions + 0]); final File genomeFile = ... | /**
* Main method.
* @param args command line arguments
*/ | Main method | main | {
"repo_name": "GenomicParisCentre/teolenn",
"path": "src/main/java/fr/ens/transcriptome/teolenn/Main.java",
"license": "gpl-2.0",
"size": 7968
} | [
"java.io.File",
"java.io.IOException",
"org.dom4j.DocumentException"
] | import java.io.File; import java.io.IOException; import org.dom4j.DocumentException; | import java.io.*; import org.dom4j.*; | [
"java.io",
"org.dom4j"
] | java.io; org.dom4j; | 1,462,629 |
public CswRecords parseResponse(String cswResponse)
throws SearchException {
CswResult results = new CswResult();
try {
getCswProfile().readGetRecordsResponse(cswResponse,
results);
LOG.log(Level.FINE, "Number of records returned {0}", results.getRecords().getSize());
} catch (Exception e) {
... | CswRecords function(String cswResponse) throws SearchException { CswResult results = new CswResult(); try { getCswProfile().readGetRecordsResponse(cswResponse, results); LOG.log(Level.FINE, STR, results.getRecords().getSize()); } catch (Exception e) { throw new SearchException(e); } return results.getRecords(); } | /**
* Parses the CSW response.
* @param cswResponse the input source associated with the CSW response XML
* @return the resultant records
* @throws SearchException if an exception occurs
*/ | Parses the CSW response | parseResponse | {
"repo_name": "psanyal/geoportal-server",
"path": "geoportal/src/com/esri/gpt/catalog/search/SearchEngineCSW.java",
"license": "apache-2.0",
"size": 29491
} | [
"com.esri.gpt.server.csw.client.CswRecords",
"com.esri.gpt.server.csw.client.CswResult",
"java.util.logging.Level"
] | import com.esri.gpt.server.csw.client.CswRecords; import com.esri.gpt.server.csw.client.CswResult; import java.util.logging.Level; | import com.esri.gpt.server.csw.client.*; import java.util.logging.*; | [
"com.esri.gpt",
"java.util"
] | com.esri.gpt; java.util; | 2,194,206 |
@Override
protected void doTextOperation(IDocument doc, String actionID,
TextReplaceResultSet resultSet) throws BadLocationException {
int maxNbr = resultSet.getStartLine() + resultSet.getNumberOfLines();
boolean removeTrailing;
boolean convertEnabled;
boolean tabsToS... | void function(IDocument doc, String actionID, TextReplaceResultSet resultSet) throws BadLocationException { int maxNbr = resultSet.getStartLine() + resultSet.getNumberOfLines(); boolean removeTrailing; boolean convertEnabled; boolean tabsToSpaces; boolean addLineEnabled; boolean fixLineDelimiters; CombinedPreferences p... | /**
* Should be invoked always after estimateActionRange() to ensure that
* operaton is possible
* @param doc cannot be null
* @param actionID
* @param resultSet cannot be null
*/ | Should be invoked always after estimateActionRange() to ensure that operaton is possible | doTextOperation | {
"repo_name": "iloveeclipse/anyedittools",
"path": "AnyEditTools/src/de/loskutov/anyedit/actions/Spaces.java",
"license": "epl-1.0",
"size": 9788
} | [
"de.loskutov.anyedit.IAnyEditConstants",
"de.loskutov.anyedit.ui.preferences.CombinedPreferences",
"de.loskutov.anyedit.util.LineReplaceResult",
"de.loskutov.anyedit.util.TextReplaceResultSet",
"de.loskutov.anyedit.util.TextUtil",
"org.eclipse.jface.text.BadLocationException",
"org.eclipse.jface.text.ID... | import de.loskutov.anyedit.IAnyEditConstants; import de.loskutov.anyedit.ui.preferences.CombinedPreferences; import de.loskutov.anyedit.util.LineReplaceResult; import de.loskutov.anyedit.util.TextReplaceResultSet; import de.loskutov.anyedit.util.TextUtil; import org.eclipse.jface.text.BadLocationException; import org.e... | import de.loskutov.anyedit.*; import de.loskutov.anyedit.ui.preferences.*; import de.loskutov.anyedit.util.*; import org.eclipse.jface.text.*; | [
"de.loskutov.anyedit",
"org.eclipse.jface"
] | de.loskutov.anyedit; org.eclipse.jface; | 308,964 |
protected void handleAccessCollection(HttpServletRequest req, HttpServletResponse res, Reference ref,
Collection copyrightAcceptedRefs) throws EntityPermissionException, EntityNotDefinedException,
EntityAccessOverloadException, EntityCopyrightException
{
// we only access resources, not collections
if (... | void function(HttpServletRequest req, HttpServletResponse res, Reference ref, Collection copyrightAcceptedRefs) throws EntityPermissionException, EntityNotDefinedException, EntityAccessOverloadException, EntityCopyrightException { if (!ref.getId().endsWith(Entity.SEPARATOR)) throw new EntityNotDefinedException(ref.getR... | /**
* Process the access request for a collection, producing the "apache" style HTML file directory listing (complete with index.html redirect if found).
*
* @param req
* @param res
* @param ref
* @param copyrightAcceptedRefs
* @throws PermissionException
* @throws IdUnusedException
* @throws ServerO... | Process the access request for a collection, producing the "apache" style HTML file directory listing (complete with index.html redirect if found) | handleAccessCollection | {
"repo_name": "marktriggs/nyu-sakai-10.4",
"path": "kernel/kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java",
"license": "apache-2.0",
"size": 426240
} | [
"java.io.IOException",
"java.util.Collection",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.sakaiproject.entity.api.Entity",
"org.sakaiproject.entity.api.EntityAccessOverloadException",
"org.sakaiproject.entity.api.EntityCopyrightException",
"org.sakaiproject... | import java.io.IOException; import java.util.Collection; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.sakaiproject.entity.api.Entity; import org.sakaiproject.entity.api.EntityAccessOverloadException; import org.sakaiproject.entity.api.EntityCopyrightException; ... | import java.io.*; import java.util.*; import javax.servlet.http.*; import org.sakaiproject.entity.api.*; import org.sakaiproject.exception.*; import org.sakaiproject.util.*; | [
"java.io",
"java.util",
"javax.servlet",
"org.sakaiproject.entity",
"org.sakaiproject.exception",
"org.sakaiproject.util"
] | java.io; java.util; javax.servlet; org.sakaiproject.entity; org.sakaiproject.exception; org.sakaiproject.util; | 2,109,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.