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 QueryResult query(final String fields, final String measurement, final String dbName) {
final String filter = String.format("SELECT %s FROM %s", fields, measurement);
final Query query = new Query(filter, dbName);
return this.influxDb.query(query);
} | QueryResult function(final String fields, final String measurement, final String dbName) { final String filter = String.format(STR, fields, measurement); final Query query = new Query(filter, dbName); return this.influxDb.query(query); } | /**
* Query result.
*
* @param fields the fields
* @param measurement the table
* @param dbName the db name
* @return the query result
*/ | Query result | query | {
"repo_name": "dodok1/cas",
"path": "support/cas-server-support-influxdb-core/src/main/java/org/apereo/cas/influxdb/InfluxDbConnectionFactory.java",
"license": "apache-2.0",
"size": 4896
} | [
"org.influxdb.dto.Query",
"org.influxdb.dto.QueryResult"
] | import org.influxdb.dto.Query; import org.influxdb.dto.QueryResult; | import org.influxdb.dto.*; | [
"org.influxdb.dto"
] | org.influxdb.dto; | 2,215,696 |
ByteBuffer getByteBuffer(); | ByteBuffer getByteBuffer(); | /**
* Returns the entire response as a ByteBuffer.
*/ | Returns the entire response as a ByteBuffer | getByteBuffer | {
"repo_name": "SaschaMester/delicium",
"path": "components/cronet/android/java/src/org/chromium/net/HttpUrlRequest.java",
"license": "bsd-3-clause",
"size": 5386
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 929,773 |
static void deleteFile(ContentResolver resolver, long id, String path, String mimeType) {
try {
File file = new File(path);
file.delete();
} catch (Exception e) {
Log.w(Constants.TAG, "file: '" + path + "' couldn't be deleted", e);
}
resolver.dele... | static void deleteFile(ContentResolver resolver, long id, String path, String mimeType) { try { File file = new File(path); file.delete(); } catch (Exception e) { Log.w(Constants.TAG, STR + path + STR, e); } resolver.delete(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, Downloads.Impl._ID + STR, new String[]{String.valueOf(... | /**
* Delete the given file from device
* and delete its row from the downloads database.
*/ | Delete the given file from device and delete its row from the downloads database | deleteFile | {
"repo_name": "zoozooll/MyExercise",
"path": "Market/src/cn/imogoo/providers/downloads/Helpers.java",
"license": "apache-2.0",
"size": 33712
} | [
"android.content.ContentResolver",
"android.util.Log",
"java.io.File"
] | import android.content.ContentResolver; import android.util.Log; import java.io.File; | import android.content.*; import android.util.*; import java.io.*; | [
"android.content",
"android.util",
"java.io"
] | android.content; android.util; java.io; | 1,876,274 |
@Idempotent
ErasureCodingPolicy getErasureCodingPolicy(String src) throws IOException; | ErasureCodingPolicy getErasureCodingPolicy(String src) throws IOException; | /**
* Get the information about the EC policy for the path
*
* @param src path to get the info for
* @throws IOException
*/ | Get the information about the EC policy for the path | getErasureCodingPolicy | {
"repo_name": "NJUJYB/disYarn",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java",
"license": "apache-2.0",
"size": 60058
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,903,921 |
@Test
public void testCopyFromLocalRecursiveWithScheme() throws Exception {
final FileSystem targetFileSystem = hdfsRootPath.getFileSystem(hadoopConfig);
final Path targetDir = targetFileSystem.getWorkingDirectory();
testCopyFromLocalRecursive(targetFileSystem, targetDir, tempFolder, true);
} | void function() throws Exception { final FileSystem targetFileSystem = hdfsRootPath.getFileSystem(hadoopConfig); final Path targetDir = targetFileSystem.getWorkingDirectory(); testCopyFromLocalRecursive(targetFileSystem, targetDir, tempFolder, true); } | /**
* Verifies that nested directories are properly copied with a <tt>hdfs://</tt> file
* system (from a <tt>file:///absolute/path</tt> source path).
*/ | Verifies that nested directories are properly copied with a hdfs:// file system (from a file:///absolute/path source path) | testCopyFromLocalRecursiveWithScheme | {
"repo_name": "fhueske/flink",
"path": "flink-yarn/src/test/java/org/apache/flink/yarn/YarnFileStageTest.java",
"license": "apache-2.0",
"size": 8191
} | [
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,177,041 |
public void onMalformedURLException(MalformedURLException e,
Object state); | void function(MalformedURLException e, Object state); | /**
* Called if an invalid graph path is provided (which may result in a
* malformed URL).
*
* Executed by a background thread: do not update the UI in this method.
*/ | Called if an invalid graph path is provided (which may result in a malformed URL). Executed by a background thread: do not update the UI in this method | onMalformedURLException | {
"repo_name": "YGwen/facebookConnect_For_Cordova_3.0",
"path": "src/android/AsyncFacebookRunner.java",
"license": "apache-2.0",
"size": 12888
} | [
"java.net.MalformedURLException"
] | import java.net.MalformedURLException; | import java.net.*; | [
"java.net"
] | java.net; | 327,803 |
public void allOff() {
Enumeration<Integer> nodeIds = this.zwaveNodes.keys();
while (nodeIds.hasMoreElements()) {
Integer nodeId = nodeIds.nextElement();
ZWaveNode node = this.getNode(nodeId);
ZWaveSwitchAllCommandClass switchAllCommandClass = (ZWaveSwitchAllCom... | void function() { Enumeration<Integer> nodeIds = this.zwaveNodes.keys(); while (nodeIds.hasMoreElements()) { Integer nodeId = nodeIds.nextElement(); ZWaveNode node = this.getNode(nodeId); ZWaveSwitchAllCommandClass switchAllCommandClass = (ZWaveSwitchAllCommandClass)node.getCommandClass(ZWaveCommandClass.CommandClass.S... | /**
* Send All Off message to all devices that support the Switch All command class
*/ | Send All Off message to all devices that support the Switch All command class | allOff | {
"repo_name": "cschneider/openhab",
"path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveController.java",
"license": "epl-1.0",
"size": 55071
} | [
"java.util.Enumeration",
"org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveCommandClass",
"org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSwitchAllCommandClass"
] | import java.util.Enumeration; import org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveCommandClass; import org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSwitchAllCommandClass; | import java.util.*; import org.openhab.binding.zwave.internal.protocol.commandclass.*; | [
"java.util",
"org.openhab.binding"
] | java.util; org.openhab.binding; | 1,478,591 |
@ProxyMethod(parameterTypes = { "java.lang.Object" })
public void completed(Object response) {
try {
SpanStore spanStore = spanStoreAdapter.getSpanStore();
if (spanStore != null) {
spanStore.finishSpan(new HttpResponseAdapter(new ApacheHttpClientV40HttpResponse(response, CACHE)));
}
} finally {
... | @ProxyMethod(parameterTypes = { STR }) void function(Object response) { try { SpanStore spanStore = spanStoreAdapter.getSpanStore(); if (spanStore != null) { spanStore.finishSpan(new HttpResponseAdapter(new ApacheHttpClientV40HttpResponse(response, CACHE))); } } finally { if (originalCallback != null) { WFutureCallback... | /**
* Completed method for FutureCallback.
*
* @param response
* Response of the request.
*/ | Completed method for FutureCallback | completed | {
"repo_name": "inspectIT/inspectIT",
"path": "inspectit.agent.java/src/main/java/rocks/inspectit/agent/java/tracing/core/adapter/http/proxy/FutureCallbackProxy.java",
"license": "agpl-3.0",
"size": 4601
} | [
"rocks.inspectit.agent.java.proxy.ProxyMethod",
"rocks.inspectit.agent.java.tracing.core.adapter.http.HttpResponseAdapter",
"rocks.inspectit.agent.java.tracing.core.adapter.http.data.impl.ApacheHttpClientV40HttpResponse",
"rocks.inspectit.agent.java.tracing.core.async.SpanStore"
] | import rocks.inspectit.agent.java.proxy.ProxyMethod; import rocks.inspectit.agent.java.tracing.core.adapter.http.HttpResponseAdapter; import rocks.inspectit.agent.java.tracing.core.adapter.http.data.impl.ApacheHttpClientV40HttpResponse; import rocks.inspectit.agent.java.tracing.core.async.SpanStore; | import rocks.inspectit.agent.java.proxy.*; import rocks.inspectit.agent.java.tracing.core.adapter.http.*; import rocks.inspectit.agent.java.tracing.core.adapter.http.data.impl.*; import rocks.inspectit.agent.java.tracing.core.async.*; | [
"rocks.inspectit.agent"
] | rocks.inspectit.agent; | 1,279,241 |
public void _getSystemPathFromFileURL() {
String baseURL = util.utils.getOfficeTemp((XMultiServiceFactory)tParam.getMSF());
log.println("Using (Base): "+baseURL);
String sysURL = util.utils.getOfficeTempDirSys((XMultiServiceFactory)tParam.getMSF());
log.println("Using (System): "+sys... | void function() { String baseURL = util.utils.getOfficeTemp((XMultiServiceFactory)tParam.getMSF()); log.println(STR+baseURL); String sysURL = util.utils.getOfficeTempDirSys((XMultiServiceFactory)tParam.getMSF()); log.println(STR+sysURL); String get = oObj.getSystemPathFromFileURL(baseURL); log.println(STR+get); tRes.te... | /**
* Tries to convert URL of SOffice temp directory to system
* dependent path. <p>
* Has <b> OK </b> status if the method returns system dependent
* representation of the URL passed. <p>
*/ | Tries to convert URL of SOffice temp directory to system dependent path. Has OK status if the method returns system dependent representation of the URL passed. | _getSystemPathFromFileURL | {
"repo_name": "qt-haiku/LibreOffice",
"path": "qadevOOo/tests/java/ifc/ucb/_XFileIdentifierConverter.java",
"license": "gpl-3.0",
"size": 3597
} | [
"com.sun.star.lang.XMultiServiceFactory"
] | import com.sun.star.lang.XMultiServiceFactory; | import com.sun.star.lang.*; | [
"com.sun.star"
] | com.sun.star; | 687,103 |
public Properties getPropertyFile(String filename) {
Properties prop = new Properties();
InputStream inputStream = null;
String path;
try {
path = System.getProperty("user.dir")
+ System.getProperty("file.separator") + filename;
inputStream = new FileInputStream(path);
} catch (Exception e) ... | Properties function(String filename) { Properties prop = new Properties(); InputStream inputStream = null; String path; try { path = System.getProperty(STR) + System.getProperty(STR) + filename; inputStream = new FileInputStream(path); } catch (Exception e) { URL urlpath = new String().getClass().getResource(filename);... | /**
* Creates a java.util.Properties object from
* the file specified by the param filename
* @param filename the name of the properties file
* @return java.util.Properties ojbect created and populated
* with the property-values set on the file "filename"
*/ | Creates a java.util.Properties object from the file specified by the param filename | getPropertyFile | {
"repo_name": "timomwa/cmp",
"path": "src/main/java/com/pixelandtag/datatransfer/HitSender.java",
"license": "gpl-2.0",
"size": 4896
} | [
"java.io.FileInputStream",
"java.io.InputStream",
"java.util.Properties"
] | import java.io.FileInputStream; import java.io.InputStream; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,154,177 |
@Test
public void testOperatorClosingBeforeStopRunning() throws Throwable {
BlockingCloseStreamOperator.resetLatches();
Configuration taskConfiguration = new Configuration();
StreamConfig streamConfig = new StreamConfig(taskConfiguration);
streamConfig.setStreamOperator(new BlockingCloseStreamOperator());
... | void function() throws Throwable { BlockingCloseStreamOperator.resetLatches(); Configuration taskConfiguration = new Configuration(); StreamConfig streamConfig = new StreamConfig(taskConfiguration); streamConfig.setStreamOperator(new BlockingCloseStreamOperator()); streamConfig.setOperatorID(new OperatorID()); try (Moc... | /**
* Tests that the StreamTask first closes all of its operators before setting its
* state to not running (isRunning == false)
*
* <p>See FLINK-7430.
*/ | Tests that the StreamTask first closes all of its operators before setting its state to not running (isRunning == false) See FLINK-7430 | testOperatorClosingBeforeStopRunning | {
"repo_name": "tzulitai/flink",
"path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskTest.java",
"license": "apache-2.0",
"size": 72886
} | [
"org.apache.flink.configuration.Configuration",
"org.apache.flink.runtime.jobgraph.OperatorID",
"org.apache.flink.runtime.operators.testutils.MockEnvironment",
"org.apache.flink.runtime.operators.testutils.MockEnvironmentBuilder",
"org.apache.flink.runtime.operators.testutils.MockInputSplitProvider",
"org... | import org.apache.flink.configuration.Configuration; import org.apache.flink.runtime.jobgraph.OperatorID; import org.apache.flink.runtime.operators.testutils.MockEnvironment; import org.apache.flink.runtime.operators.testutils.MockEnvironmentBuilder; import org.apache.flink.runtime.operators.testutils.MockInputSplitPro... | import org.apache.flink.configuration.*; import org.apache.flink.runtime.jobgraph.*; import org.apache.flink.runtime.operators.testutils.*; import org.apache.flink.streaming.api.graph.*; import org.junit.*; | [
"org.apache.flink",
"org.junit"
] | org.apache.flink; org.junit; | 1,302,088 |
@SuppressWarnings("rawtypes")
public static String getPZweck(Prescription presc) {
Map ht = presc.getMap(Prescription.FLD_EXTINFO);
// Ordnungszahl der Verschreibung
if (ht.containsKey(PRESC_EI_ZWECK))
return (String) ht.get(PRESC_EI_ZWECK);
// Standard fuers Medikament
FavMedikament fm ... | @SuppressWarnings(STR) static String function(Prescription presc) { Map ht = presc.getMap(Prescription.FLD_EXTINFO); if (ht.containsKey(PRESC_EI_ZWECK)) return (String) ht.get(PRESC_EI_ZWECK); FavMedikament fm = FavMedikament.load(presc.getArtikel()); if (fm != null) return fm.getZweck(); return ""; } | /**
* Zweck fuer Verschreibung holen
*/ | Zweck fuer Verschreibung holen | getPZweck | {
"repo_name": "DavidGutknecht/elexis-3-base",
"path": "bundles/com.hilotec.elexis.kgview/src/com/hilotec/elexis/kgview/medikarte/MedikarteHelpers.java",
"license": "epl-1.0",
"size": 4907
} | [
"ch.elexis.data.Prescription",
"com.hilotec.elexis.kgview.data.FavMedikament",
"java.util.Map"
] | import ch.elexis.data.Prescription; import com.hilotec.elexis.kgview.data.FavMedikament; import java.util.Map; | import ch.elexis.data.*; import com.hilotec.elexis.kgview.data.*; import java.util.*; | [
"ch.elexis.data",
"com.hilotec.elexis",
"java.util"
] | ch.elexis.data; com.hilotec.elexis; java.util; | 876,345 |
private static GrailsDomainClass findInApplication(GrailsApplication application, String domainClassName) {
GrailsDomainClass domainClass = (GrailsDomainClass) application.getArtefact(
DomainClassArtefactHandler.TYPE, domainClassName);
if (domainClass == null) {
domainCla... | static GrailsDomainClass function(GrailsApplication application, String domainClassName) { GrailsDomainClass domainClass = (GrailsDomainClass) application.getArtefact( DomainClassArtefactHandler.TYPE, domainClassName); if (domainClass == null) { domainClass = (GrailsDomainClass) application.getArtefact( DomainClassArte... | /**
* Finds the specified domain class from the application.
*
* @param application The application
* @param domainClassName The domain class name
* @return A GrailsDomainClass
*/ | Finds the specified domain class from the application | findInApplication | {
"repo_name": "erdi/grails-core",
"path": "grails-crud/src/main/groovy/grails/util/GenerateUtils.java",
"license": "apache-2.0",
"size": 5007
} | [
"org.codehaus.groovy.grails.commons.DomainClassArtefactHandler",
"org.codehaus.groovy.grails.commons.GrailsApplication",
"org.codehaus.groovy.grails.commons.GrailsDomainClass"
] | import org.codehaus.groovy.grails.commons.DomainClassArtefactHandler; import org.codehaus.groovy.grails.commons.GrailsApplication; import org.codehaus.groovy.grails.commons.GrailsDomainClass; | import org.codehaus.groovy.grails.commons.*; | [
"org.codehaus.groovy"
] | org.codehaus.groovy; | 1,532,875 |
public int compareTo(XMLString xstr)
{
int len1 = this.length();
int len2 = xstr.length();
int n = Math.min(len1, len2);
int i = 0;
int j = 0;
while (n-- != 0)
{
char c1 = this.charAt(i);
char c2 = xstr.charAt(j);
if (c1 != c2)
{
return c1 - c2;
}... | int function(XMLString xstr) { int len1 = this.length(); int len2 = xstr.length(); int n = Math.min(len1, len2); int i = 0; int j = 0; while (n-- != 0) { char c1 = this.charAt(i); char c2 = xstr.charAt(j); if (c1 != c2) { return c1 - c2; } i++; j++; } return len1 - len2; } | /**
* Compares two strings lexicographically.
*
* @param xstr the <code>String</code> to be compared.
*
* @return the value <code>0</code> if the argument string is equal to
* this string; a value less than <code>0</code> if this string
* is lexicographically less than the st... | Compares two strings lexicographically | compareTo | {
"repo_name": "md-5/jdk10",
"path": "src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XString.java",
"license": "gpl-2.0",
"size": 37927
} | [
"com.sun.org.apache.xml.internal.utils.XMLString"
] | import com.sun.org.apache.xml.internal.utils.XMLString; | import com.sun.org.apache.xml.internal.utils.*; | [
"com.sun.org"
] | com.sun.org; | 1,535,479 |
public static <T> Observable<T> deferFuture(
Func0<? extends Future<? extends Observable<? extends T>>> observableFactoryAsync,
Scheduler scheduler) {
return Observable.defer(new DeferFutureFunc0Scheduled<T>(observableFactoryAsync, scheduler));
}
private static final cla... | static <T> Observable<T> function( Func0<? extends Future<? extends Observable<? extends T>>> observableFactoryAsync, Scheduler scheduler) { return Observable.defer(new DeferFutureFunc0Scheduled<T>(observableFactoryAsync, scheduler)); } private static final class DeferFutureFunc0Scheduled<T> implements Func0<Observable... | /**
* Returns an observable sequence that starts the specified asynchronous
* factory function whenever a new observer subscribes.
* @param <T> the result type
* @param observableFactoryAsync the asynchronous function to start for each observer
* @param scheduler the scheduler where the comple... | Returns an observable sequence that starts the specified asynchronous factory function whenever a new observer subscribes | deferFuture | {
"repo_name": "ReactiveX/RxJavaAsyncUtil",
"path": "src/main/java/rx/util/async/operators/OperatorDeferFuture.java",
"license": "apache-2.0",
"size": 3765
} | [
"java.util.concurrent.Future"
] | import java.util.concurrent.Future; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,695,547 |
public ManagedClusterInner withAgentPoolProfiles(List<ManagedClusterAgentPoolProfile> agentPoolProfiles) {
if (this.innerProperties() == null) {
this.innerProperties = new ManagedClusterProperties();
}
this.innerProperties().withAgentPoolProfiles(agentPoolProfiles);
retur... | ManagedClusterInner function(List<ManagedClusterAgentPoolProfile> agentPoolProfiles) { if (this.innerProperties() == null) { this.innerProperties = new ManagedClusterProperties(); } this.innerProperties().withAgentPoolProfiles(agentPoolProfiles); return this; } | /**
* Set the agentPoolProfiles property: The agent pool properties.
*
* @param agentPoolProfiles the agentPoolProfiles value to set.
* @return the ManagedClusterInner object itself.
*/ | Set the agentPoolProfiles property: The agent pool properties | withAgentPoolProfiles | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java",
"license": "mit",
"size": 31519
} | [
"com.azure.resourcemanager.containerservice.models.ManagedClusterAgentPoolProfile",
"java.util.List"
] | import com.azure.resourcemanager.containerservice.models.ManagedClusterAgentPoolProfile; import java.util.List; | import com.azure.resourcemanager.containerservice.models.*; import java.util.*; | [
"com.azure.resourcemanager",
"java.util"
] | com.azure.resourcemanager; java.util; | 513,726 |
@Override
public String getSpecificCriteria(ILabelBean labelBean) {
return "";
}
| String function(ILabelBean labelBean) { return ""; } | /**
* Gets the specific extra constraints by setting the sort order
* @param labelBean
* @return
*/ | Gets the specific extra constraints by setting the sort order | getSpecificCriteria | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/admin/customize/lists/systemOption/SystemOptionBaseBL.java",
"license": "gpl-3.0",
"size": 10521
} | [
"com.aurel.track.beans.ILabelBean"
] | import com.aurel.track.beans.ILabelBean; | import com.aurel.track.beans.*; | [
"com.aurel.track"
] | com.aurel.track; | 2,008,005 |
//-------------------------------------------------------------------------
public static CalculationJobResultItem success() {
return new CalculationJobResultItem(ImmutableSet.<ValueSpecification>of(), ImmutableSet.<ValueSpecification>of(), ExecutionLog.EMPTY);
} | static CalculationJobResultItem function() { return new CalculationJobResultItem(ImmutableSet.<ValueSpecification>of(), ImmutableSet.<ValueSpecification>of(), ExecutionLog.EMPTY); } | /**
* Returns an immutable result item representing success, containing no additional data.
*
* @return a result item representing success, not null
*/ | Returns an immutable result item representing success, containing no additional data | success | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Engine/src/main/java/com/opengamma/engine/calcnode/CalculationJobResultItem.java",
"license": "apache-2.0",
"size": 7713
} | [
"com.google.common.collect.ImmutableSet",
"com.opengamma.engine.value.ValueSpecification",
"com.opengamma.engine.view.ExecutionLog"
] | import com.google.common.collect.ImmutableSet; import com.opengamma.engine.value.ValueSpecification; import com.opengamma.engine.view.ExecutionLog; | import com.google.common.collect.*; import com.opengamma.engine.value.*; import com.opengamma.engine.view.*; | [
"com.google.common",
"com.opengamma.engine"
] | com.google.common; com.opengamma.engine; | 703,340 |
public static Document addWatermarkImageToAWordDocument(String fileName, String imagePath, double rotationAngle) throws InvalidKeyException, NoSuchAlgorithmException, IOException {
Document document = null;
if(fileName == null || fileName.length() <= 3) {
throw new IllegalArgumentException("File name ca... | static Document function(String fileName, String imagePath, double rotationAngle) throws InvalidKeyException, NoSuchAlgorithmException, IOException { Document document = null; if(fileName == null fileName.length() <= 3) { throw new IllegalArgumentException(STR); } if(imagePath == null imagePath.length() == 0) { throw n... | /**
* Add watermark image to a word document
* @param fileName Name of the word document
* @param imagePath Server side image file path
* @param rotationAngle Watermark rotation angle in degrees
* @throws java.security.InvalidKeyException If initialization fails because the provided key is null.
* @throws j... | Add watermark image to a word document | addWatermarkImageToAWordDocument | {
"repo_name": "asposeforcloud/Aspose_Cloud_SDK_For_Android",
"path": "asposecloudsdk/src/main/java/com/aspose/cloud/sdk/words/api/Watermark.java",
"license": "mit",
"size": 11102
} | [
"android.net.Uri",
"com.aspose.cloud.sdk.common.Utils",
"com.aspose.cloud.sdk.words.model.DocumentResponse",
"com.google.gson.Gson",
"java.io.IOException",
"java.io.InputStream",
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException"
] | import android.net.Uri; import com.aspose.cloud.sdk.common.Utils; import com.aspose.cloud.sdk.words.model.DocumentResponse; import com.google.gson.Gson; import java.io.IOException; import java.io.InputStream; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; | import android.net.*; import com.aspose.cloud.sdk.common.*; import com.aspose.cloud.sdk.words.model.*; import com.google.gson.*; import java.io.*; import java.security.*; | [
"android.net",
"com.aspose.cloud",
"com.google.gson",
"java.io",
"java.security"
] | android.net; com.aspose.cloud; com.google.gson; java.io; java.security; | 1,197,652 |
protected void writeFailure(ServiceRequest request, HttpServletResponse resp, PolicyFailure policyFailure) {
String rtype = request.getService().getEndpointContentType();
resp.setHeader("X-Policy-Failure-Type", String.valueOf(policyFailure.getType())); //$NON-NLS-1$
resp.setHeader("X-Policy-... | void function(ServiceRequest request, HttpServletResponse resp, PolicyFailure policyFailure) { String rtype = request.getService().getEndpointContentType(); resp.setHeader(STR, String.valueOf(policyFailure.getType())); resp.setHeader(STR, policyFailure.getMessage()); resp.setHeader(STR, String.valueOf(policyFailure.get... | /**
* Writes a policy failure to the http response.
* @param request
* @param resp
* @param policyFailure
*/ | Writes a policy failure to the http response | writeFailure | {
"repo_name": "kunallimaye/apiman",
"path": "gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/GatewayServlet.java",
"license": "apache-2.0",
"size": 19609
} | [
"io.apiman.gateway.engine.beans.PolicyFailure",
"io.apiman.gateway.engine.beans.PolicyFailureType",
"io.apiman.gateway.engine.beans.ServiceRequest",
"java.util.Map",
"javax.servlet.http.HttpServletResponse",
"javax.xml.bind.Marshaller",
"org.apache.commons.io.IOUtils"
] | import io.apiman.gateway.engine.beans.PolicyFailure; import io.apiman.gateway.engine.beans.PolicyFailureType; import io.apiman.gateway.engine.beans.ServiceRequest; import java.util.Map; import javax.servlet.http.HttpServletResponse; import javax.xml.bind.Marshaller; import org.apache.commons.io.IOUtils; | import io.apiman.gateway.engine.beans.*; import java.util.*; import javax.servlet.http.*; import javax.xml.bind.*; import org.apache.commons.io.*; | [
"io.apiman.gateway",
"java.util",
"javax.servlet",
"javax.xml",
"org.apache.commons"
] | io.apiman.gateway; java.util; javax.servlet; javax.xml; org.apache.commons; | 1,044,871 |
public static Notification createAppleNotification(String body, Map<String, String> headers) {
return new AppleNotification(body, headers);
} | static Notification function(String body, Map<String, String> headers) { return new AppleNotification(body, headers); } | /**
* Utility method to set up a native notification for APNs. Allows setting the
* APNS Headers - as per the new APNs protocol.
*
* @param body the body for the APNS message
* @param headers the APNS headers
* @return a native APNS notification
*/ | Utility method to set up a native notification for APNs. Allows setting the APNS Headers - as per the new APNs protocol | createAppleNotification | {
"repo_name": "Azure/azure-notificationhubs-java-backend",
"path": "NotificationHubs/src/com/windowsazure/messaging/Notification.java",
"license": "apache-2.0",
"size": 6916
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,101,794 |
public Axis getYAxis(String id) throws AxisNotFoundException {
if(!yAxis_.isEmpty()) {
Axis ax;
for(Enumeration it = yAxis_.elements(); it.hasMoreElements();) {
ax = (Axis)it.nextElement();
if(Objects.equals(ax.getId(), id)) return ax;
}
... | Axis function(String id) throws AxisNotFoundException { if(!yAxis_.isEmpty()) { Axis ax; for(Enumeration it = yAxis_.elements(); it.hasMoreElements();) { ax = (Axis)it.nextElement(); if(Objects.equals(ax.getId(), id)) return ax; } throw new AxisNotFoundException(); } else { throw new AxisNotFoundException(); } } | /**
* Get a reference to an Y axis.
*
* @param id axis identifier
* @return axis found
* @exception AxisNotFoundException An axis was not found with the correct identifier.
* @see Axis
* @see PlainAxis
*/ | Get a reference to an Y axis | getYAxis | {
"repo_name": "MaxwellM/ncBrowse-revamp-CAPSTONE",
"path": "src/ncBrowse/sgt/CartesianGraph.java",
"license": "gpl-3.0",
"size": 30777
} | [
"java.util.Enumeration",
"java.util.Objects"
] | import java.util.Enumeration; import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 2,683,932 |
@Override
public void setContent(Content content) {
this.contents = content.getContent().getBytes();
} | void function(Content content) { this.contents = content.getContent().getBytes(); } | /**
* sets the content of the event, meaning that the visitor will see it as result on the website
*
* @param content the content which is a wrapper to easily add text or html syntax to server users for a web page
*/ | sets the content of the event, meaning that the visitor will see it as result on the website | setContent | {
"repo_name": "xEssentials/xEssentials",
"path": "src/tv/mineinthebox/simpleserver/events/SimpleServerEvent.java",
"license": "gpl-3.0",
"size": 8166
} | [
"tv.mineinthebox.simpleserver.Content"
] | import tv.mineinthebox.simpleserver.Content; | import tv.mineinthebox.simpleserver.*; | [
"tv.mineinthebox.simpleserver"
] | tv.mineinthebox.simpleserver; | 556,763 |
public static keplerAPowerHalfType fromPerUnaligned(byte[] encodedBytes) {
keplerAPowerHalfType result = new keplerAPowerHalfType();
result.decodePerUnaligned(new BitStreamReader(encodedBytes));
return result;
} | static keplerAPowerHalfType function(byte[] encodedBytes) { keplerAPowerHalfType result = new keplerAPowerHalfType(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; } | /**
* Creates a new keplerAPowerHalfType from encoded stream.
*/ | Creates a new keplerAPowerHalfType from encoded stream | fromPerUnaligned | {
"repo_name": "google/supl-client",
"path": "src/main/java/com/google/location/suplclient/asn1/supl2/rrlp_components/NavModel_KeplerianSet.java",
"license": "apache-2.0",
"size": 64535
} | [
"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,578,814 |
public static List<ConAtr> getListActivosForWeb() throws Exception {
return (ArrayList<ConAtr>) DefDAOFactory.getConAtrDAO().getListActivosForWeb();
}
| static List<ConAtr> function() throws Exception { return (ArrayList<ConAtr>) DefDAOFactory.getConAtrDAO().getListActivosForWeb(); } | /**
* Obtiene una lista de los Atributos del Contribuyente marcados como visibles en la consulta de deuda.
*
* @author Cristian
* @return
* @throws Exception
*/ | Obtiene una lista de los Atributos del Contribuyente marcados como visibles en la consulta de deuda | getListActivosForWeb | {
"repo_name": "avdata99/SIAT",
"path": "siat-1.0-SOURCE/src/buss/src/ar/gov/rosario/siat/def/buss/bean/ConAtr.java",
"license": "gpl-3.0",
"size": 7516
} | [
"ar.gov.rosario.siat.def.buss.dao.DefDAOFactory",
"java.util.ArrayList",
"java.util.List"
] | import ar.gov.rosario.siat.def.buss.dao.DefDAOFactory; import java.util.ArrayList; import java.util.List; | import ar.gov.rosario.siat.def.buss.dao.*; import java.util.*; | [
"ar.gov.rosario",
"java.util"
] | ar.gov.rosario; java.util; | 903,017 |
public KnownHosts getKnownHosts() {
KnownHosts known = new KnownHosts();
synchronized (dbLock) {
SQLiteDatabase db = this.getReadableDatabase();
Cursor c = db.query(TABLE_HOSTS, new String[] { FIELD_HOST_HOSTNAME,
FIELD_HOST_PORT, FIELD_HOST_HOSTKEYALGO, FIELD_HOST_HOSTKEY },
null, null, null, n... | KnownHosts function() { KnownHosts known = new KnownHosts(); synchronized (dbLock) { SQLiteDatabase db = this.getReadableDatabase(); Cursor c = db.query(TABLE_HOSTS, new String[] { FIELD_HOST_HOSTNAME, FIELD_HOST_PORT, FIELD_HOST_HOSTKEYALGO, FIELD_HOST_HOSTKEY }, null, null, null, null, null); if (c != null) { int COL... | /**
* Build list of known hosts for Trilead library.
* @return
*/ | Build list of known hosts for Trilead library | getKnownHosts | {
"repo_name": "Lekensteyn/connectbot",
"path": "app/src/main/java/org/connectbot/util/HostDatabase.java",
"license": "apache-2.0",
"size": 25790
} | [
"android.database.Cursor",
"android.database.sqlite.SQLiteDatabase",
"android.util.Log",
"com.trilead.ssh2.KnownHosts"
] | import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.util.Log; import com.trilead.ssh2.KnownHosts; | import android.database.*; import android.database.sqlite.*; import android.util.*; import com.trilead.ssh2.*; | [
"android.database",
"android.util",
"com.trilead.ssh2"
] | android.database; android.util; com.trilead.ssh2; | 1,333,065 |
void writeInt(int value) throws IOException; | void writeInt(int value) throws IOException; | /**
* Writes a signed 32 bit int value. The implementation may encode the value as a variable number of bytes, not necessarily as 4 bytes.
*/ | Writes a signed 32 bit int value. The implementation may encode the value as a variable number of bytes, not necessarily as 4 bytes | writeInt | {
"repo_name": "gstevey/gradle",
"path": "subprojects/messaging/src/main/java/org/gradle/internal/serialize/Encoder.java",
"license": "apache-2.0",
"size": 3234
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,437,686 |
public static Buffer alloc( Server server, int numFrames, int numChannels, CompletionFunction completionFunc )
throws IOException
{
final int bufNum = server.getBufferAllocator().alloc( 1 );
if( bufNum == -1 ) {
Server.getPrintStream().println(
"Buffer.alloc: failed to get a buffer allocated. " +
... | static Buffer function( Server server, int numFrames, int numChannels, CompletionFunction completionFunc ) throws IOException { final int bufNum = server.getBufferAllocator().alloc( 1 ); if( bufNum == -1 ) { Server.getPrintStream().println( STR + STR + server.getName() ); return null; } else { return Buffer.alloc( serv... | /**
* Allocates and returns a new Buffer with given number of channels and frames.
*
* @param server the server to which the buffer belongs
* @param numFrames the number of frames (samples per channel) that buffer occupies
* @param numChannels the number of channels the buffer occupies
* @param completi... | Allocates and returns a new Buffer with given number of channels and frames | alloc | {
"repo_name": "acm-uiuc/Tacchi",
"path": "libs/JCollider/src/de/sciss/jcollider/Buffer.java",
"license": "gpl-2.0",
"size": 89231
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,190,303 |
@Override
public String hiddenReason(final AuthenticationSession session) {
if (session == null) {
return null;
}
final int len = method.getParameterTypes().length;
final Object[] parameters = new Object[len];
parameters[0] = AuthenticationSessionUtils.createU... | String function(final AuthenticationSession session) { if (session == null) { return null; } final int len = method.getParameterTypes().length; final Object[] parameters = new Object[len]; parameters[0] = AuthenticationSessionUtils.createUserMemento(session); final Boolean isHidden = (Boolean) MethodExtensions.invokeSt... | /**
* Will only check provided that a {@link AuthenticationSession} has been
* provided.
*/ | Will only check provided that a <code>AuthenticationSession</code> has been provided | hiddenReason | {
"repo_name": "howepeng/isis",
"path": "core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/hidden/forsession/HideForSessionFacetViaMethod.java",
"license": "apache-2.0",
"size": 2931
} | [
"org.apache.isis.core.commons.authentication.AuthenticationSession",
"org.apache.isis.core.commons.authentication.AuthenticationSessionUtils",
"org.apache.isis.core.commons.lang.MethodExtensions"
] | import org.apache.isis.core.commons.authentication.AuthenticationSession; import org.apache.isis.core.commons.authentication.AuthenticationSessionUtils; import org.apache.isis.core.commons.lang.MethodExtensions; | import org.apache.isis.core.commons.authentication.*; import org.apache.isis.core.commons.lang.*; | [
"org.apache.isis"
] | org.apache.isis; | 375,400 |
protected Extent[] parseExtents( Element layerElem )
throws XMLParsingException {
List<Node> nl = XMLTools.getNodes( layerElem, "./Extent", nsContext );
Extent[] extents = new Extent[nl.size()];
for ( int i = 0; i < extents.length; i++ ) {
Str... | Extent[] function( Element layerElem ) throws XMLParsingException { List<Node> nl = XMLTools.getNodes( layerElem, STR, nsContext ); Extent[] extents = new Extent[nl.size()]; for ( int i = 0; i < extents.length; i++ ) { String name = XMLTools.getNodeAsString( (Node) nl.get( i ), STR, nsContext, null ); String deflt = XM... | /**
* Parse Extents
*
* @param layerElem
* @return Extent[]
* @throws XMLParsingException
*/ | Parse Extents | parseExtents | {
"repo_name": "lat-lon/deegree2-base",
"path": "deegree2-core/src/main/java/org/deegree/ogcwebservices/wmps/capabilities/WMPSCapabilitiesDocument.java",
"license": "lgpl-2.1",
"size": 42151
} | [
"java.util.List",
"org.deegree.framework.xml.XMLParsingException",
"org.deegree.framework.xml.XMLTools",
"org.deegree.ogcwebservices.wms.capabilities.Extent",
"org.w3c.dom.Element",
"org.w3c.dom.Node"
] | import java.util.List; import org.deegree.framework.xml.XMLParsingException; import org.deegree.framework.xml.XMLTools; import org.deegree.ogcwebservices.wms.capabilities.Extent; import org.w3c.dom.Element; import org.w3c.dom.Node; | import java.util.*; import org.deegree.framework.xml.*; import org.deegree.ogcwebservices.wms.capabilities.*; import org.w3c.dom.*; | [
"java.util",
"org.deegree.framework",
"org.deegree.ogcwebservices",
"org.w3c.dom"
] | java.util; org.deegree.framework; org.deegree.ogcwebservices; org.w3c.dom; | 2,169,654 |
IMarketDataReference<MDMarketstat> getMarketstat(Instrument instrument);
| IMarketDataReference<MDMarketstat> getMarketstat(Instrument instrument); | /**
* Returns a reference to the market statistic data for the given
* instrument. If the data does not exist, it will be created and wired up.
* The {@link IMarketDataReference#dispose() dispose} method should be
* called when the data is no longer needed.
*
* @param instrument
... | Returns a reference to the market statistic data for the given instrument. If the data does not exist, it will be created and wired up. The <code>IMarketDataReference#dispose() dispose</code> method should be called when the data is no longer needed | getMarketstat | {
"repo_name": "nagyist/marketcetera",
"path": "photon/photon/plugins/org.marketcetera.photon.marketdata/src/main/java/org/marketcetera/photon/marketdata/IMarketData.java",
"license": "apache-2.0",
"size": 5401
} | [
"org.marketcetera.photon.model.marketdata.MDMarketstat",
"org.marketcetera.trade.Instrument"
] | import org.marketcetera.photon.model.marketdata.MDMarketstat; import org.marketcetera.trade.Instrument; | import org.marketcetera.photon.model.marketdata.*; import org.marketcetera.trade.*; | [
"org.marketcetera.photon",
"org.marketcetera.trade"
] | org.marketcetera.photon; org.marketcetera.trade; | 624,449 |
private static boolean findKeyInCertificates(PublicKey key, Certificate[] certs) {
if (key == null || certs == null)
return false;
for (Certificate cert : certs) {
if (cert.getPublicKey().equals(key))
return true;
}
return false;
} | static boolean function(PublicKey key, Certificate[] certs) { if (key == null certs == null) return false; for (Certificate cert : certs) { if (cert.getPublicKey().equals(key)) return true; } return false; } | /**
* Tests whether given certificate contains public key or not.
*
* @param key Public key which we are looking for.
* @param certs Certificate which should be tested.
* @return {@code true} if certificate contains given key and
* {@code false} if not.
*/ | Tests whether given certificate contains public key or not | findKeyInCertificates | {
"repo_name": "irudyak/ignite",
"path": "modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentJarVerifier.java",
"license": "apache-2.0",
"size": 14674
} | [
"java.security.PublicKey",
"java.security.cert.Certificate"
] | import java.security.PublicKey; import java.security.cert.Certificate; | import java.security.*; import java.security.cert.*; | [
"java.security"
] | java.security; | 1,232,744 |
public void setSelection(int index) {
Selection.setSelection(getText(), index);
} | void function(int index) { Selection.setSelection(getText(), index); } | /**
* Convenience for {@link Selection#setSelection(Spannable, int)}.
*/ | Convenience for <code>Selection#setSelection(Spannable, int)</code> | setSelection | {
"repo_name": "KishanV/Android-Music-Player",
"path": "app/src/main/java/Views/api/FMedittext.java",
"license": "mit",
"size": 2511
} | [
"android.text.Selection"
] | import android.text.Selection; | import android.text.*; | [
"android.text"
] | android.text; | 819,241 |
public Map<Integer, Item> byAccountsID(int id)
{
Map<String, String> params = new HashMap<>();
params.put("accounts_id", id +"");
return super.where(params);
} | Map<Integer, Item> function(int id) { Map<String, String> params = new HashMap<>(); params.put(STR, id +""); return super.where(params); } | /**
* Returns all items of a given account.
*
* @param id Account ID.
*
* @return All items of account.
*/ | Returns all items of a given account | byAccountsID | {
"repo_name": "RikkaBot/RikkaBot-core",
"path": "testing/BlackEye's DAO/accounts/items/ItemFactory.java",
"license": "mit",
"size": 1073
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 208,208 |
public Question getQuestion() throws NoSuchElementException; | Question function() throws NoSuchElementException; | /**
* Get the current question. This question must be answered to move to the
* next state of the flow chart.
*
* @return The current question
* @throws NoSuchElementException There are more more questions
*/ | Get the current question. This question must be answered to move to the next state of the flow chart | getQuestion | {
"repo_name": "Deutsche-Digitale-Bibliothek/ddb-pdc",
"path": "src/main/java/de/ddb/pdc/core/FlowChartState.java",
"license": "mit",
"size": 2021
} | [
"java.util.NoSuchElementException"
] | import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 2,657,169 |
public BlobsDeleteImmutabilityPolicyHeaders setDateProperty(OffsetDateTime dateProperty) {
if (dateProperty == null) {
this.dateProperty = null;
} else {
this.dateProperty = new DateTimeRfc1123(dateProperty);
}
return this;
} | BlobsDeleteImmutabilityPolicyHeaders function(OffsetDateTime dateProperty) { if (dateProperty == null) { this.dateProperty = null; } else { this.dateProperty = new DateTimeRfc1123(dateProperty); } return this; } | /**
* Set the dateProperty property: The Date property.
*
* @param dateProperty the dateProperty value to set.
* @return the BlobsDeleteImmutabilityPolicyHeaders object itself.
*/ | Set the dateProperty property: The Date property | setDateProperty | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsDeleteImmutabilityPolicyHeaders.java",
"license": "mit",
"size": 3757
} | [
"com.azure.core.util.DateTimeRfc1123",
"java.time.OffsetDateTime"
] | import com.azure.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; | import com.azure.core.util.*; import java.time.*; | [
"com.azure.core",
"java.time"
] | com.azure.core; java.time; | 1,914,324 |
public void insertItem(String item, String value) {
//create new widget
final RadioButton radioButton = new RadioButton(optionsGroupName, item);
//remove the default gwt-RadioButton style
radioButton.removeStyleName("gwt-RadioButton");
//set value
final InputElement i... | void function(String item, String value) { final RadioButton radioButton = new RadioButton(optionsGroupName, item); radioButton.removeStyleName(STR); final InputElement inputElement = (InputElement)radioButton.getElement().getElementsByTagName("input").getItem(0); inputElement.removeAttribute(STR); inputElement.setAttr... | /**
* Inserts an item into the list box.
*
* @param item
* the text of the item to be inserted.
* @param value
* the item's value.
*/ | Inserts an item into the list box | insertItem | {
"repo_name": "slemeur/che",
"path": "ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/listbox/CustomListBox.java",
"license": "epl-1.0",
"size": 16021
} | [
"com.google.gwt.dom.client.InputElement",
"com.google.gwt.user.client.ui.RadioButton"
] | import com.google.gwt.dom.client.InputElement; import com.google.gwt.user.client.ui.RadioButton; | import com.google.gwt.dom.client.*; import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,567,596 |
public void setCreatedtime(Date createdtime) {
this.createdtime = createdtime;
}
public enum Field {
id,
contactid,
caseid,
createdtime; | void function(Date createdtime) { this.createdtime = createdtime; } public enum Field { id, contactid, caseid, createdtime; | /**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column m_crm_contacts_cases.createdTime
*
* @param createdtime the value for m_crm_contacts_cases.createdTime
*
* @mbggenerated Tue Sep 08 09:15:17 ICT 2015
*/ | This method was generated by MyBatis Generator. This method sets the value of the database column m_crm_contacts_cases.createdTime | setCreatedtime | {
"repo_name": "onlylin/mycollab",
"path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/crm/domain/ContactCase.java",
"license": "agpl-3.0",
"size": 5785
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 500,443 |
public static Document createDocumentLinient(String xml){
try {
SAXReader reader = new SAXReader();
InputSource source = new InputSource(new StringReader(xml));
source.setEncoding(Defaults.UTF8.displayName());
reader.setValidation(false);
return re... | static Document function(String xml){ try { SAXReader reader = new SAXReader(); InputSource source = new InputSource(new StringReader(xml)); source.setEncoding(Defaults.UTF8.displayName()); reader.setValidation(false); return reader.read(source); } catch (DocumentException e) { throw new SynthesisException(XML_PARSING,... | /**
* Builds the document from the xml given.
*
* @param xml The xml string.
* @throws SynthesisException If the xml could not be parsed to a document.
* @return a {@link org.dom4j.Document} object.
*/ | Builds the document from the xml given | createDocumentLinient | {
"repo_name": "SynthesisProject/server",
"path": "synthesis-api/src/main/java/coza/opencollab/synthesis/service/api/util/impl/DomHelper.java",
"license": "agpl-3.0",
"size": 6863
} | [
"java.io.StringReader",
"org.dom4j.Document",
"org.dom4j.DocumentException",
"org.dom4j.io.SAXReader",
"org.xml.sax.InputSource"
] | import java.io.StringReader; import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.io.SAXReader; import org.xml.sax.InputSource; | import java.io.*; import org.dom4j.*; import org.dom4j.io.*; import org.xml.sax.*; | [
"java.io",
"org.dom4j",
"org.dom4j.io",
"org.xml.sax"
] | java.io; org.dom4j; org.dom4j.io; org.xml.sax; | 2,820,052 |
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
int masterWebPort = Configuration.getInt(PropertyKey.MASTER_WEB_PORT);
String masterHostName;
if (!Configuration.getBoolean(PropertyKey.ZOOKEEPER_ENABLED)) {
master... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { int masterWebPort = Configuration.getInt(PropertyKey.MASTER_WEB_PORT); String masterHostName; if (!Configuration.getBoolean(PropertyKey.ZOOKEEPER_ENABLED)) { masterHostName = NetworkAddressUtils.getConnectHost... | /**
* Populate the header with information about master. So we can return to
* the master from any page.
*
* @param request the {@link HttpServletRequest} object
* @param response the {@link HttpServletResponse} object
* @throws ServletException if the target resource throws this exception
* @throw... | Populate the header with information about master. So we can return to the master from any page | doGet | {
"repo_name": "bit-zyl/Alluxio-Nvdimm",
"path": "core/server/src/main/java/alluxio/web/WebInterfaceHeaderServlet.java",
"license": "apache-2.0",
"size": 2376
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 1,755,162 |
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(EntityPackage.Literals.DESIGNATION__USAGE_CONTEXT);
childrenFeatures.add(EntityPackage.Literals.DESIGNATION__DESIGNATION_T... | Collection<? extends EStructuralFeature> function(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(EntityPackage.Literals.DESIGNATION__USAGE_CONTEXT); childrenFeatures.add(EntityPackage.Literals.DESIGNATION__DESIGNATION_TYPE); childrenFeatures.add(EntityPackage.Li... | /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-... | This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>. | getChildrenFeatures | {
"repo_name": "drbgfc/mdht",
"path": "cts2/plugins/org.openhealthtools.mdht.cts2.core.edit/src/org/openhealthtools/mdht/cts2/entity/provider/DesignationItemProvider.java",
"license": "epl-1.0",
"size": 10293
} | [
"java.util.Collection",
"org.eclipse.emf.ecore.EStructuralFeature",
"org.openhealthtools.mdht.cts2.entity.EntityPackage"
] | import java.util.Collection; import org.eclipse.emf.ecore.EStructuralFeature; import org.openhealthtools.mdht.cts2.entity.EntityPackage; | import java.util.*; import org.eclipse.emf.ecore.*; import org.openhealthtools.mdht.cts2.entity.*; | [
"java.util",
"org.eclipse.emf",
"org.openhealthtools.mdht"
] | java.util; org.eclipse.emf; org.openhealthtools.mdht; | 475,061 |
@Override
public void setProperties(final Collection<UserProperty> properties)
{
this.properties = properties;
} | void function(final Collection<UserProperty> properties) { this.properties = properties; } | /**
* Set a new value for the properties property.
*
* @param properties
* the properties to set
*/ | Set a new value for the properties property | setProperties | {
"repo_name": "openfurther/further-open-core",
"path": "security/security-impl/src/main/java/edu/utah/further/security/impl/domain/UserEntity.java",
"license": "apache-2.0",
"size": 6606
} | [
"edu.utah.further.security.api.domain.UserProperty",
"java.util.Collection"
] | import edu.utah.further.security.api.domain.UserProperty; import java.util.Collection; | import edu.utah.further.security.api.domain.*; import java.util.*; | [
"edu.utah.further",
"java.util"
] | edu.utah.further; java.util; | 85,670 |
public T sortByTimeDesc() {
addComparator(new FileLastModifiedTimeComparator(false));
return (T) this;
}
// ---------------------------------------------------------------- comparators
public static class FolderFirstComparator implements Comparator<File> {
protected final int order;
public FolderFirst... | T function() { addComparator(new FileLastModifiedTimeComparator(false)); return (T) this; } public static class FolderFirstComparator implements Comparator<File> { protected final int order; public FolderFirstComparator(boolean foldersFirst) { if (foldersFirst) { order = 1; } else { order = -1; } } | /**
* Sorts files by last modified time descending.
*/ | Sorts files by last modified time descending | sortByTimeDesc | {
"repo_name": "007slm/jodd",
"path": "jodd-core/src/main/java/jodd/io/findfile/FindFile.java",
"license": "bsd-3-clause",
"size": 18122
} | [
"java.io.File",
"java.util.Comparator"
] | import java.io.File; import java.util.Comparator; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,732,478 |
private void setProxyAddress(InetSocketAddress proxyAddress) {
if (proxyAddress == null) {
throw new IllegalArgumentException("proxyAddress object cannot be null");
}
this.proxyAddress = proxyAddress;
} | void function(InetSocketAddress proxyAddress) { if (proxyAddress == null) { throw new IllegalArgumentException(STR); } this.proxyAddress = proxyAddress; } | /**
* Sets the IP address of the proxy server.
*
* @param proxyAddress the IP address of the proxy server
*/ | Sets the IP address of the proxy server | setProxyAddress | {
"repo_name": "chao-sun-kaazing/gateway",
"path": "mina.core/core/src/main/java/org/apache/mina/proxy/session/ProxyIoSession.java",
"license": "apache-2.0",
"size": 8736
} | [
"java.net.InetSocketAddress"
] | import java.net.InetSocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 2,393,156 |
@Test
public void testCloning() throws CloneNotSupportedException {
MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer();
MinMaxCategoryRenderer r2 = (MinMaxCategoryRenderer) r1.clone();
assertNotSame(r1, r2);
assertSame(r1.getClass(), r2.getClass());
assertEquals(r1,... | void function() throws CloneNotSupportedException { MinMaxCategoryRenderer r1 = new MinMaxCategoryRenderer(); MinMaxCategoryRenderer r2 = (MinMaxCategoryRenderer) r1.clone(); assertNotSame(r1, r2); assertSame(r1.getClass(), r2.getClass()); assertEquals(r1, r2); } | /**
* Confirm that cloning works.
*/ | Confirm that cloning works | testCloning | {
"repo_name": "akardapolov/ASH-Viewer",
"path": "jfreechart-fse/src/test/java/org/jfree/chart/renderer/category/MinMaxCategoryRendererTest.java",
"license": "gpl-3.0",
"size": 5923
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,824,520 |
void dontKeepAliveForSession(CustomTabsSessionToken session) {
mClientManager.dontKeepAliveForSession(session);
} | void dontKeepAliveForSession(CustomTabsSessionToken session) { mClientManager.dontKeepAliveForSession(session); } | /**
* Lets the lifetime of the process linked to a given sessionId be managed normally.
*
* Without a matching call to {@link #keepAliveForSession}, this is a no-op.
*
* @param session The Binder object identifying the session.
*/ | Lets the lifetime of the process linked to a given sessionId be managed normally. Without a matching call to <code>#keepAliveForSession</code>, this is a no-op | dontKeepAliveForSession | {
"repo_name": "scheib/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java",
"license": "bsd-3-clause",
"size": 70775
} | [
"androidx.browser.customtabs.CustomTabsSessionToken"
] | import androidx.browser.customtabs.CustomTabsSessionToken; | import androidx.browser.customtabs.*; | [
"androidx.browser"
] | androidx.browser; | 828,289 |
public static DataTypeTemplate fromAnnotation(DataTypeHint hint, @Nullable DataType dataType) {
return new DataTypeTemplate(
dataType,
defaultAsNull(hint, DataTypeHint::rawSerializer),
defaultAsNull(hint, DataTypeHint::inputGroup),
defaultAsNull(hint, DataTypeHint::version),
hintFlagToBoolean(defaul... | static DataTypeTemplate function(DataTypeHint hint, @Nullable DataType dataType) { return new DataTypeTemplate( dataType, defaultAsNull(hint, DataTypeHint::rawSerializer), defaultAsNull(hint, DataTypeHint::inputGroup), defaultAsNull(hint, DataTypeHint::version), hintFlagToBoolean(defaultAsNull(hint, DataTypeHint::allow... | /**
* Creates an instance from the given {@link DataTypeHint} with a resolved data type if available.
*/ | Creates an instance from the given <code>DataTypeHint</code> with a resolved data type if available | fromAnnotation | {
"repo_name": "gyfora/flink",
"path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/extraction/utils/DataTypeTemplate.java",
"license": "apache-2.0",
"size": 11183
} | [
"javax.annotation.Nullable",
"org.apache.flink.table.annotation.DataTypeHint",
"org.apache.flink.table.types.DataType"
] | import javax.annotation.Nullable; import org.apache.flink.table.annotation.DataTypeHint; import org.apache.flink.table.types.DataType; | import javax.annotation.*; import org.apache.flink.table.annotation.*; import org.apache.flink.table.types.*; | [
"javax.annotation",
"org.apache.flink"
] | javax.annotation; org.apache.flink; | 1,084,960 |
public static Exception checkForNewPackages(PrintStream... progress) {
if (m_offline) {
return null;
}
Exception problem = null;
Map<String, String> localPackageNameList = getPackageList(true);
if (localPackageNameList == null) {
System.err.println("Local package list is missing, ... | static Exception function(PrintStream... progress) { if (m_offline) { return null; } Exception problem = null; Map<String, String> localPackageNameList = getPackageList(true); if (localPackageNameList == null) { System.err.println(STR + STR); refreshCache(progress); localPackageNameList = getPackageList(true); if (loca... | /**
* Check for new packages on the server and refresh the local cache if needed
*
* @param progress to report progress to
* @return any Exception raised or null if all is good
*/ | Check for new packages on the server and refresh the local cache if needed | checkForNewPackages | {
"repo_name": "ModelWriter/Deliverables",
"path": "WP2/D2.5.2_Generation/Jeni/lib/weka-src/src/main/java/weka/core/WekaPackageManager.java",
"license": "epl-1.0",
"size": 87570
} | [
"java.io.PrintStream",
"java.util.Map"
] | import java.io.PrintStream; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,492,500 |
public void testReplace() throws IOException, ManifestException {
executeTarget("testReplace");
Manifest mf = getManifest("src/etc/testcases/taskdefs/mftest.mf");
assertNotNull(mf);
assertEquals(Manifest.getDefaultManifest(), mf);
} | void function() throws IOException, ManifestException { executeTarget(STR); Manifest mf = getManifest(STR); assertNotNull(mf); assertEquals(Manifest.getDefaultManifest(), mf); } | /**
* replace changes Manifest-Version from 2.0 to 1.0
*/ | replace changes Manifest-Version from 2.0 to 1.0 | testReplace | {
"repo_name": "BIORIMP/biorimp",
"path": "BIO-RIMP/test_data/code/antapache/src/tests/junit/org/apache/tools/ant/taskdefs/ManifestTest.java",
"license": "gpl-2.0",
"size": 13889
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,176,312 |
public void calculateStatistics(Collection<AssignmentGradeRecord> gradeRecords) {
int numScored = 0;
BigDecimal total = new BigDecimal("0");
BigDecimal pointsTotal = new BigDecimal("0");
for (AssignmentGradeRecord record : gradeRecords) {
// Skip grade records that don't ... | void function(Collection<AssignmentGradeRecord> gradeRecords) { int numScored = 0; BigDecimal total = new BigDecimal("0"); BigDecimal pointsTotal = new BigDecimal("0"); for (AssignmentGradeRecord record : gradeRecords) { if(!record.getGradableObject().equals(this)) { continue; } if(record.getDroppedFromGrade() == null)... | /**
* Calculate the mean score for students with entered grades.
*/ | Calculate the mean score for students with entered grades | calculateStatistics | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "edu-services/gradebook-service/hibernate/src/java/org/sakaiproject/tool/gradebook/Assignment.java",
"license": "apache-2.0",
"size": 19290
} | [
"java.math.BigDecimal",
"java.util.Collection",
"org.sakaiproject.service.gradebook.shared.GradebookService"
] | import java.math.BigDecimal; import java.util.Collection; import org.sakaiproject.service.gradebook.shared.GradebookService; | import java.math.*; import java.util.*; import org.sakaiproject.service.gradebook.shared.*; | [
"java.math",
"java.util",
"org.sakaiproject.service"
] | java.math; java.util; org.sakaiproject.service; | 2,139,737 |
public static OSMResultsStreams constructOSMStreamsFromFolder(ExecutionEnvironment env, File folder)
throws Exception {
File nodes = new File(folder, "nodes.csv");
DataSet<Tuple4<Long, Double, Double, String>> nodesDataset = env.readCsvFile(nodes.getAbsolutePath())
.types(Long.class, Double.class,... | static OSMResultsStreams function(ExecutionEnvironment env, File folder) throws Exception { File nodes = new File(folder, STR); DataSet<Tuple4<Long, Double, Double, String>> nodesDataset = env.readCsvFile(nodes.getAbsolutePath()) .types(Long.class, Double.class, Double.class, String.class); File polygons = new File(fol... | /**
* read the csv, and construct streams
*
* @param env
* @param folder
* @return
* @throws Exception
*/ | read the csv, and construct streams | constructOSMStreamsFromFolder | {
"repo_name": "frett27/osm-flink-tools",
"path": "src/main/java/org/frett27/spatialflink/inputs/process/ProcessOSM.java",
"license": "mit",
"size": 23788
} | [
"java.io.File",
"org.apache.flink.api.java.DataSet",
"org.apache.flink.api.java.ExecutionEnvironment",
"org.apache.flink.api.java.tuple.Tuple3",
"org.apache.flink.api.java.tuple.Tuple4"
] | import java.io.File; import org.apache.flink.api.java.DataSet; import org.apache.flink.api.java.ExecutionEnvironment; import org.apache.flink.api.java.tuple.Tuple3; import org.apache.flink.api.java.tuple.Tuple4; | import java.io.*; import org.apache.flink.api.java.*; import org.apache.flink.api.java.tuple.*; | [
"java.io",
"org.apache.flink"
] | java.io; org.apache.flink; | 2,782,553 |
String formatIsoSpecificFeature(Isoform isoform, int firstAAPos, int lastAAPos); | String formatIsoSpecificFeature(Isoform isoform, int firstAAPos, int lastAAPos); | /**
* Format a feature specifically to isoform
* @param isoform the specific isoform
* @param firstAAPos first position of the feature
* @param lastAAPos last position of the feature
* @return a format of the feature on the isoform
*/ | Format a feature specifically to isoform | formatIsoSpecificFeature | {
"repo_name": "calipho-sib/nextprot-api",
"path": "isoform-mapper/src/main/java/org/nextprot/api/isoform/mapper/domain/feature/SequenceFeature.java",
"license": "gpl-2.0",
"size": 1350
} | [
"org.nextprot.api.core.domain.Isoform"
] | import org.nextprot.api.core.domain.Isoform; | import org.nextprot.api.core.domain.*; | [
"org.nextprot.api"
] | org.nextprot.api; | 1,271,316 |
public String getCertsFile() {
if (this.getSpec() != null) {
if (this.getSpec().has(VerifierFields.ComponentSpec.CERTS)) {
try {
return this.getSpec().getString(VerifierFields.ComponentSpec.CERTS);
} catch (JSONException e) {
logger.error("There was a problem when getting the CERTS file from t... | String function() { if (this.getSpec() != null) { if (this.getSpec().has(VerifierFields.ComponentSpec.CERTS)) { try { return this.getSpec().getString(VerifierFields.ComponentSpec.CERTS); } catch (JSONException e) { logger.error(STR); } } } return null; } | /**
* Getter for the certs file
*
* @return spec.getString(CERTS)
*/ | Getter for the certs file | getCertsFile | {
"repo_name": "jerumble/vVoteVerifier",
"path": "src/com/vvote/verifier/Spec.java",
"license": "gpl-3.0",
"size": 5173
} | [
"com.vvote.thirdparty.json.orgjson.JSONException",
"com.vvote.verifier.fields.VerifierFields"
] | import com.vvote.thirdparty.json.orgjson.JSONException; import com.vvote.verifier.fields.VerifierFields; | import com.vvote.thirdparty.json.orgjson.*; import com.vvote.verifier.fields.*; | [
"com.vvote.thirdparty",
"com.vvote.verifier"
] | com.vvote.thirdparty; com.vvote.verifier; | 514,156 |
private void checkComplete()
{
if (!hasCovariate) {
changeState(WizardStepPanelState.SKIPPED);
} else {
// check if continue is allowed
// must have at least one test checked, at least one power method
if (unconditionalPowerCheckBox.getValue... | void function() { if (!hasCovariate) { changeState(WizardStepPanelState.SKIPPED); } else { if (unconditionalPowerCheckBox.getValue() quantilePowerCheckBox.getValue()) { if (!quantilePowerCheckBox.getValue() quantileListPanel.getValidRowCount() > 0) { changeState(WizardStepPanelState.COMPLETE); } else { changeState(Wiza... | /**
* Check if the user has selected a complete set of options, and
* if so notify that forward navigation is allowed
*/ | Check if the user has selected a complete set of options, and if so notify that forward navigation is allowed | checkComplete | {
"repo_name": "SampleSizeShop/GlimmpseWeb",
"path": "src/edu/ucdenver/bios/glimmpseweb/client/shared/OptionsPowerMethodsPanel.java",
"license": "gpl-2.0",
"size": 11586
} | [
"edu.ucdenver.bios.glimmpseweb.client.wizard.WizardStepPanelState"
] | import edu.ucdenver.bios.glimmpseweb.client.wizard.WizardStepPanelState; | import edu.ucdenver.bios.glimmpseweb.client.wizard.*; | [
"edu.ucdenver.bios"
] | edu.ucdenver.bios; | 425,824 |
@Test
void testUpdateLoopNoReverse()
{
final Animation animation = new Animation(Animation.DEFAULT_NAME, 1, 3, 1.0, false, true);
final SpriteAnimated sprite = new SpriteAnimatedImpl(Graphics.createImageBuffer(64, 32), 16, 8);
sprite.play(animation);
assertEquals(Anim... | void testUpdateLoopNoReverse() { final Animation animation = new Animation(Animation.DEFAULT_NAME, 1, 3, 1.0, false, true); final SpriteAnimated sprite = new SpriteAnimatedImpl(Graphics.createImageBuffer(64, 32), 16, 8); sprite.play(animation); assertEquals(AnimState.PLAYING, sprite.getAnimState()); assertEquals(1, spr... | /**
* Test update with loop but no reverse.
*/ | Test update with loop but no reverse | testUpdateLoopNoReverse | {
"repo_name": "b3dgs/lionengine",
"path": "lionengine-core/src/test/java/com/b3dgs/lionengine/graphic/drawable/SpriteAnimatedTest.java",
"license": "gpl-3.0",
"size": 28639
} | [
"com.b3dgs.lionengine.AnimState",
"com.b3dgs.lionengine.Animation",
"com.b3dgs.lionengine.UtilAssert",
"com.b3dgs.lionengine.graphic.Graphics"
] | import com.b3dgs.lionengine.AnimState; import com.b3dgs.lionengine.Animation; import com.b3dgs.lionengine.UtilAssert; import com.b3dgs.lionengine.graphic.Graphics; | import com.b3dgs.lionengine.*; import com.b3dgs.lionengine.graphic.*; | [
"com.b3dgs.lionengine"
] | com.b3dgs.lionengine; | 2,215,021 |
public ValueAxis getAxis(int index) {
ValueAxis result = null;
if (index < this.axes.size()) {
result = (ValueAxis) this.axes.get(index);
}
return result;
}
/**
* Sets the primary axis for the plot and sends a {@link PlotChangeEvent} | ValueAxis function(int index) { ValueAxis result = null; if (index < this.axes.size()) { result = (ValueAxis) this.axes.get(index); } return result; } /** * Sets the primary axis for the plot and sends a {@link PlotChangeEvent} | /**
* Returns an axis for the plot.
*
* @param index the axis index.
*
* @return The axis ({@code null} possible).
*
* @see #setAxis(int, ValueAxis)
*
* @since 1.0.14
*/ | Returns an axis for the plot | getAxis | {
"repo_name": "simon04/jfreechart",
"path": "src/main/java/org/jfree/chart/plot/PolarPlot.java",
"license": "lgpl-2.1",
"size": 70680
} | [
"org.jfree.chart.axis.ValueAxis",
"org.jfree.chart.event.PlotChangeEvent"
] | import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.event.PlotChangeEvent; | import org.jfree.chart.axis.*; import org.jfree.chart.event.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,745,305 |
public void logp(Level level, String sourceClass, String sourceMethod,
Supplier<String> msgSupplier) {
if (!isLoggable(level)) {
return;
}
LogRecord lr = new LogRecord(level, msgSupplier.get());
lr.setSourceClassName(sourceClass);
lr.setSource... | void function(Level level, String sourceClass, String sourceMethod, Supplier<String> msgSupplier) { if (!isLoggable(level)) { return; } LogRecord lr = new LogRecord(level, msgSupplier.get()); lr.setSourceClassName(sourceClass); lr.setSourceMethodName(sourceMethod); doLog(lr); } | /**
* Log a lazily constructed message, specifying source class and method,
* with no arguments.
* <p>
* If the logger is currently enabled for the given message
* level then the message is constructed by invoking the provided
* supplier function and forwarded to all the registered output
... | Log a lazily constructed message, specifying source class and method, with no arguments. If the logger is currently enabled for the given message level then the message is constructed by invoking the provided supplier function and forwarded to all the registered output Handler objects. | logp | {
"repo_name": "lizhekang/TCJDK",
"path": "sources/openjdk8/jdk/src/share/classes/java/util/logging/Logger.java",
"license": "gpl-2.0",
"size": 91503
} | [
"java.util.function.Supplier"
] | import java.util.function.Supplier; | import java.util.function.*; | [
"java.util"
] | java.util; | 582,353 |
protected Lexer getLexer() {
return lexer;
} | Lexer function() { return lexer; } | /**
* Gets the ANTLR {@link Lexer} used for actual tokenization of the input.
*
* @return the ANTLR {@link Lexer} instance
*/ | Gets the ANTLR <code>Lexer</code> used for actual tokenization of the input | getLexer | {
"repo_name": "consulo/consulo-antlr4",
"path": "src/main/java/org/antlr/intellij/adaptor/lexer/ANTLRLexerAdaptor.java",
"license": "bsd-3-clause",
"size": 8835
} | [
"org.antlr.v4.runtime.Lexer"
] | import org.antlr.v4.runtime.Lexer; | import org.antlr.v4.runtime.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,713,835 |
private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane(getPearConsole(), ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
jScrollPane.setBounds(10, 150, 708, 352);
jScrollPane.setHorizontalScro... | JScrollPane function() { if (jScrollPane == null) { jScrollPane = new JScrollPane(getPearConsole(), ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); jScrollPane.setBounds(10, 150, 708, 352); jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR... | /**
* This method initializes the Scroll Pane.
*
* @return The initialized Scroll Pane.
*/ | This method initializes the Scroll Pane | getJScrollPane | {
"repo_name": "apache/uima-uimaj",
"path": "uimaj-tools/src/main/java/org/apache/uima/tools/pear/install/InstallPear.java",
"license": "apache-2.0",
"size": 33525
} | [
"javax.swing.JScrollPane",
"javax.swing.ScrollPaneConstants"
] | import javax.swing.JScrollPane; import javax.swing.ScrollPaneConstants; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 341,757 |
protected int getNotationProviderType() {
return NotationProviderFactory2.TYPE_NAME;
}
| int function() { return NotationProviderFactory2.TYPE_NAME; } | /**
* Overrule this for subclasses
* that need a different NotationProvider.
*
* @return the type of the notation provider
*/ | Overrule this for subclasses that need a different NotationProvider | getNotationProviderType | {
"repo_name": "ckaestne/LEADT",
"path": "workspace/argouml_diagrams/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java",
"license": "gpl-3.0",
"size": 92897
} | [
"org.argouml.notation.NotationProviderFactory2"
] | import org.argouml.notation.NotationProviderFactory2; | import org.argouml.notation.*; | [
"org.argouml.notation"
] | org.argouml.notation; | 2,059,428 |
private PlanBuilder appendExistSubqueryApplyNode(PlanBuilder subPlan, ExistsPredicate existsPredicate, boolean correlationAllowed)
{
if (subPlan.canTranslate(existsPredicate)) {
// given subquery is already appended
return subPlan;
}
PlanBuilder subqueryPlan = cr... | PlanBuilder function(PlanBuilder subPlan, ExistsPredicate existsPredicate, boolean correlationAllowed) { if (subPlan.canTranslate(existsPredicate)) { return subPlan; } PlanBuilder subqueryPlan = createPlanBuilder(existsPredicate.getSubquery()); PlanNode subqueryPlanRoot = subqueryPlan.getRoot(); if (isAggregationWithEm... | /**
* Exists is modeled as:
* <pre>
* - Project($0 > 0)
* - Aggregation(COUNT(*))
* - Limit(1)
* -- subquery
* </pre>
*/ | Exists is modeled as: <code> - Project($0 > 0) - Aggregation(COUNT(*)) - Limit(1) -- subquery </code> | appendExistSubqueryApplyNode | {
"repo_name": "Jimexist/presto",
"path": "presto-main/src/main/java/com/facebook/presto/sql/planner/SubqueryPlanner.java",
"license": "apache-2.0",
"size": 28099
} | [
"com.facebook.presto.sql.planner.plan.Assignments",
"com.facebook.presto.sql.planner.plan.PlanNode",
"com.facebook.presto.sql.tree.BooleanLiteral",
"com.facebook.presto.sql.tree.ExistsPredicate"
] | import com.facebook.presto.sql.planner.plan.Assignments; import com.facebook.presto.sql.planner.plan.PlanNode; import com.facebook.presto.sql.tree.BooleanLiteral; import com.facebook.presto.sql.tree.ExistsPredicate; | import com.facebook.presto.sql.planner.plan.*; import com.facebook.presto.sql.tree.*; | [
"com.facebook.presto"
] | com.facebook.presto; | 2,102,814 |
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
}
Paint.FontMetricsInt fontMetricsInt; | void function(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); } Paint.FontMetricsInt fontMetricsInt; | /**
* Resize text after measuring
*/ | Resize text after measuring | onLayout | {
"repo_name": "congwiny/mysticker",
"path": "app/src/main/java/me/jp/sticker/stickerview/widget/AutoSizeTextView.java",
"license": "apache-2.0",
"size": 7276
} | [
"android.graphics.Paint"
] | import android.graphics.Paint; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,808,418 |
public double getFitness(TestSuiteChromosome suite); | double function(TestSuiteChromosome suite); | /**
* Gets the fitness for suite if the goals from this TestFitnessFactory are
* applied. Note that some parts of TestSuiteMinimizer assume, that a
* smaller Fitness (e.g. 0.1) is better than a larger fitness (e.g. 2.0)
*
* @param suite
* a {@link org.evosuite.testsuite.TestSuiteChromosome} obje... | Gets the fitness for suite if the goals from this TestFitnessFactory are applied. Note that some parts of TestSuiteMinimizer assume, that a smaller Fitness (e.g. 0.1) is better than a larger fitness (e.g. 2.0) | getFitness | {
"repo_name": "SoftwareEngineeringToolDemos/FSE-2011-EvoSuite",
"path": "client/src/main/java/org/evosuite/coverage/TestFitnessFactory.java",
"license": "lgpl-3.0",
"size": 2136
} | [
"org.evosuite.testsuite.TestSuiteChromosome"
] | import org.evosuite.testsuite.TestSuiteChromosome; | import org.evosuite.testsuite.*; | [
"org.evosuite.testsuite"
] | org.evosuite.testsuite; | 1,697,485 |
public char[] getPassword(String name) throws IOException {
char[] pass = null;
pass = getPasswordFromCredentialProviders(name);
if (pass == null) {
pass = getPasswordFromConfig(name);
}
return pass;
} | char[] function(String name) throws IOException { char[] pass = null; pass = getPasswordFromCredentialProviders(name); if (pass == null) { pass = getPasswordFromConfig(name); } return pass; } | /**
* Get the value for a known password configuration element.
* In order to enable the elimination of clear text passwords in config,
* this method attempts to resolve the property name as an alias through
* the CredentialProvider API and conditionally fallsback to config.
* @param name property name
... | Get the value for a known password configuration element. In order to enable the elimination of clear text passwords in config, this method attempts to resolve the property name as an alias through the CredentialProvider API and conditionally fallsback to config | getPassword | {
"repo_name": "JoeChien23/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java",
"license": "apache-2.0",
"size": 100519
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,480,976 |
public interface SecondOrderOdeSystemSolver extends OdeSolver {
double[] solve(
final double x0,
final double[] y0,
final double[] dy0,
final double x1,
final Function[] f,
final double eps); | interface SecondOrderOdeSystemSolver extends OdeSolver { double[] function( final double x0, final double[] y0, final double[] dy0, final double x1, final Function[] f, final double eps); | /**
* Calculate the vector y1 at point x1, given x0, vector y0 and the derivative vector dy0 with eps
* precision for the given of second order differential equations.
*
* <pre>
* y_k''=f(x,y_1, ..., y_n, dy_1,...,dy_n) k=1,...,n
* </pre>
*
* @param x0 the starting point
* @param y0 the s... | Calculate the vector y1 at point x1, given x0, vector y0 and the derivative vector dy0 with eps precision for the given of second order differential equations. <code> y_k''=f(x,y_1, ..., y_n, dy_1,...,dy_n) k=1,...,n </code> | solve | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-external/src/main/java/de/lab4inf/math/ode/SecondOrderOdeSystemSolver.java",
"license": "gpl-3.0",
"size": 1974
} | [
"de.lab4inf.math.Function"
] | import de.lab4inf.math.Function; | import de.lab4inf.math.*; | [
"de.lab4inf.math"
] | de.lab4inf.math; | 1,973,445 |
@Test
public void testGetLinkSubTypeTlvBodyAsByteArray() throws Exception {
result = maximumReservableBandwidth.getLinksubTypeTlvBodyAsByteArray();
assertThat(result, is(notNullValue()));
} | void function() throws Exception { result = maximumReservableBandwidth.getLinksubTypeTlvBodyAsByteArray(); assertThat(result, is(notNullValue())); } | /**
* Tests getLinkSubTypeTlvBodyAsByteArray() method.
*/ | Tests getLinkSubTypeTlvBodyAsByteArray() method | testGetLinkSubTypeTlvBodyAsByteArray | {
"repo_name": "kuujo/onos",
"path": "protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/linksubtype/MaximumReservableBandwidthTest.java",
"license": "apache-2.0",
"size": 3142
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import org.hamcrest.*; | [
"org.hamcrest"
] | org.hamcrest; | 1,239,666 |
public static Client httpsBasicAuth(String userName, String password) {
Client client = ClientBuilder.newBuilder().sslContext(SslUtils.trustAllCertsSslContext())
.hostnameVerifier(SslUtils.allowAllHostNames()).register(GsonMessageBodyReader.class)
.register(GsonMessageBodyWri... | static Client function(String userName, String password) { Client client = ClientBuilder.newBuilder().sslContext(SslUtils.trustAllCertsSslContext()) .hostnameVerifier(SslUtils.allowAllHostNames()).register(GsonMessageBodyReader.class) .register(GsonMessageBodyWriter.class).build(); client.register(HttpAuthenticationFea... | /**
* Creates a HTTPS Jersey REST {@link Client} configured to authenticate
* (via
* <a href="http://en.wikipedia.org/wiki/Basic_access_authentication">Basic
* authentication<a/>) with a given user name and password.
* <p/>
* The created {@link Client} is configured to trust all server cer... | Creates a HTTPS Jersey REST <code>Client</code> configured to authenticate (via Basic authentication) with a given user name and password. The created <code>Client</code> is configured to trust all server certificates and approve all host names. (This is similar to using the <code>--insecure</code> flag in <code>curl</... | httpsBasicAuth | {
"repo_name": "elastisys/scale.commons",
"path": "rest/src/main/java/com/elastisys/scale/commons/rest/client/RestClients.java",
"license": "apache-2.0",
"size": 6187
} | [
"com.elastisys.scale.commons.net.ssl.SslUtils",
"com.elastisys.scale.commons.rest.converters.GsonMessageBodyReader",
"com.elastisys.scale.commons.rest.converters.GsonMessageBodyWriter",
"javax.ws.rs.client.Client",
"javax.ws.rs.client.ClientBuilder",
"org.glassfish.jersey.client.authentication.HttpAuthent... | import com.elastisys.scale.commons.net.ssl.SslUtils; import com.elastisys.scale.commons.rest.converters.GsonMessageBodyReader; import com.elastisys.scale.commons.rest.converters.GsonMessageBodyWriter; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import org.glassfish.jersey.client.authentic... | import com.elastisys.scale.commons.net.ssl.*; import com.elastisys.scale.commons.rest.converters.*; import javax.ws.rs.client.*; import org.glassfish.jersey.client.authentication.*; | [
"com.elastisys.scale",
"javax.ws",
"org.glassfish.jersey"
] | com.elastisys.scale; javax.ws; org.glassfish.jersey; | 2,029,114 |
@Override
public void init(IEditorSite site, IEditorInput editorInput) {
setSite(site);
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
site.setSelectionProvider(this);
site.getPage().addPartListener(partListener);
ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceCha... | void function(IEditorSite site, IEditorInput editorInput) { setSite(site); setInputWithNotify(editorInput); setPartName(editorInput.getName()); site.setSelectionProvider(this); site.getPage().addPartListener(partListener); ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeE... | /**
* This is called during startup.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This is called during startup. | init | {
"repo_name": "BaSys-PC1/models",
"path": "de.dfki.iui.basys.model.domain.editor/src/de/dfki/iui/basys/model/domain/resourceinstance/presentation/ResourceinstanceEditor.java",
"license": "epl-1.0",
"size": 57600
} | [
"org.eclipse.core.resources.IResourceChangeEvent",
"org.eclipse.core.resources.ResourcesPlugin",
"org.eclipse.ui.IEditorInput",
"org.eclipse.ui.IEditorSite"
] | import org.eclipse.core.resources.IResourceChangeEvent; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorSite; | import org.eclipse.core.resources.*; import org.eclipse.ui.*; | [
"org.eclipse.core",
"org.eclipse.ui"
] | org.eclipse.core; org.eclipse.ui; | 1,677,185 |
public static void main(String[] argv) throws Exception {
try {
new NoAdapterBootstrap(argv).boot();
}
catch (Exception e) {
LoggingConfigurator.newConfigurator().requestShutdown();
throw e;
}
} | static void function(String[] argv) throws Exception { try { new NoAdapterBootstrap(argv).boot(); } catch (Exception e) { LoggingConfigurator.newConfigurator().requestShutdown(); throw e; } } | /**
* <p>
* Entry point to program.
* </p>
*
* @param argv - Command line arguments
*
* @throws Exception upon some unrecoverable error.
*/ | Entry point to program. | main | {
"repo_name": "adaptris/interlok",
"path": "interlok-core/src/main/java/com/adaptris/core/management/NoAdapterBootstrap.java",
"license": "apache-2.0",
"size": 2350
} | [
"com.adaptris.core.management.logging.LoggingConfigurator"
] | import com.adaptris.core.management.logging.LoggingConfigurator; | import com.adaptris.core.management.logging.*; | [
"com.adaptris.core"
] | com.adaptris.core; | 796,442 |
private int getNextId(String tableName, String idColumn)
throws SQLException {
int nextId = DBUtil
.getNextId(tableName, idColumn);
if (nextId == 0) {
return 1;
} else {
return nextId;
}
} | int function(String tableName, String idColumn) throws SQLException { int nextId = DBUtil .getNextId(tableName, idColumn); if (nextId == 0) { return 1; } else { return nextId; } } | /**
* Returns the next id in the named table.
*/ | Returns the next id in the named table | getNextId | {
"repo_name": "auroreallibe/Silverpeas-Core",
"path": "core-library/src/main/java/org/silverpeas/core/contribution/content/form/record/GenericRecordSetManager.java",
"license": "agpl-3.0",
"size": 41104
} | [
"java.sql.SQLException",
"org.silverpeas.core.persistence.jdbc.DBUtil"
] | import java.sql.SQLException; import org.silverpeas.core.persistence.jdbc.DBUtil; | import java.sql.*; import org.silverpeas.core.persistence.jdbc.*; | [
"java.sql",
"org.silverpeas.core"
] | java.sql; org.silverpeas.core; | 1,137,912 |
protected Object tryConvertToSerializedType(Exchange exchange, Object object, String serializerClass) {
Object answer = null;
if (KafkaConstants.KAFKA_DEFAULT_SERIALIZER.equals(serializerClass)) {
answer = exchange.getContext().getTypeConverter().tryConvertTo(String.class, exchange, obj... | Object function(Exchange exchange, Object object, String serializerClass) { Object answer = null; if (KafkaConstants.KAFKA_DEFAULT_SERIALIZER.equals(serializerClass)) { answer = exchange.getContext().getTypeConverter().tryConvertTo(String.class, exchange, object); } else if (STR.equals(serializerClass)) { answer = exch... | /**
* Attempts to convert the object to the same type as the serialized class specified
*/ | Attempts to convert the object to the same type as the serialized class specified | tryConvertToSerializedType | {
"repo_name": "gautric/camel",
"path": "components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaProducer.java",
"license": "apache-2.0",
"size": 14835
} | [
"java.nio.ByteBuffer",
"java.util.ArrayList",
"java.util.List",
"java.util.concurrent.atomic.AtomicInteger",
"org.apache.camel.AsyncCallback",
"org.apache.camel.Exchange",
"org.apache.kafka.clients.producer.Callback",
"org.apache.kafka.clients.producer.RecordMetadata",
"org.apache.kafka.common.utils... | import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import org.apache.camel.AsyncCallback; import org.apache.camel.Exchange; import org.apache.kafka.clients.producer.Callback; import org.apache.kafka.clients.producer.RecordMetadata; import org... | import java.nio.*; import java.util.*; import java.util.concurrent.atomic.*; import org.apache.camel.*; import org.apache.kafka.clients.producer.*; import org.apache.kafka.common.utils.*; | [
"java.nio",
"java.util",
"org.apache.camel",
"org.apache.kafka"
] | java.nio; java.util; org.apache.camel; org.apache.kafka; | 1,354,890 |
EAttribute getTrelloGET_Useraccount(); | EAttribute getTrelloGET_Useraccount(); | /**
* Returns the meta object for the attribute '{@link org.etl.sparrow.TrelloGET#getUseraccount <em>Useraccount</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Useraccount</em>'.
* @see org.etl.sparrow.TrelloGET#getUseraccount()
* @see #getTr... | Returns the meta object for the attribute '<code>org.etl.sparrow.TrelloGET#getUseraccount Useraccount</code>'. | getTrelloGET_Useraccount | {
"repo_name": "jpvelsamy/sparrow",
"path": "org.etl.dsl.etl.Sparrow/src-gen/org/etl/sparrow/SparrowPackage.java",
"license": "apache-2.0",
"size": 104623
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,143,335 |
void transition(SelectionKey key) {
// Ensure key is valid
if (!key.isValid()) {
key.cancel();
Exception e = new TTransportException("Selection key not valid!");
onError(e);
return;
}
// Transition function
try {
switch (state) {
case CONNECTING:
do... | void transition(SelectionKey key) { if (!key.isValid()) { key.cancel(); Exception e = new TTransportException(STR); onError(e); return; } try { switch (state) { case CONNECTING: doConnecting(key); break; case WRITING_REQUEST_SIZE: doWritingRequestSize(); break; case WRITING_REQUEST_BODY: doWritingRequestBody(key); brea... | /**
* Transition to next state, doing whatever work is required. Since this
* method is only called by the selector thread, we can make changes to our
* select interests without worrying about concurrency.
* @param key
*/ | Transition to next state, doing whatever work is required. Since this method is only called by the selector thread, we can make changes to our select interests without worrying about concurrency | transition | {
"repo_name": "jcgruenhage/dendrite",
"path": "vendor/src/github.com/apache/thrift/lib/java/src/org/apache/thrift/async/TAsyncMethodCall.java",
"license": "apache-2.0",
"size": 8559
} | [
"java.nio.channels.SelectionKey",
"org.apache.thrift.transport.TTransportException"
] | import java.nio.channels.SelectionKey; import org.apache.thrift.transport.TTransportException; | import java.nio.channels.*; import org.apache.thrift.transport.*; | [
"java.nio",
"org.apache.thrift"
] | java.nio; org.apache.thrift; | 878,491 |
@Override
public List<String> update(String newValue, DateField field, FieldTemplate template,
PagesContext pagesContext) throws FormException {
if (field.acceptValue(newValue, pagesContext.getLanguage())) {
field.setValue(newValue, pagesContext.getLanguage());
} else {
throw new FormE... | List<String> function(String newValue, DateField field, FieldTemplate template, PagesContext pagesContext) throws FormException { if (field.acceptValue(newValue, pagesContext.getLanguage())) { field.setValue(newValue, pagesContext.getLanguage()); } else { throw new FormException(STR, STR, DateField.TYPE); } return new ... | /**
* Updates the value of the field. The fieldName must be used to retrieve the HTTP parameter from
* the request.
* @throw FormException if the field type is not a managed type.
* @throw FormException if the field doesn't accept the new value.
*/ | Updates the value of the field. The fieldName must be used to retrieve the HTTP parameter from the request | update | {
"repo_name": "stephaneperry/Silverpeas-Core",
"path": "lib-core/src/main/java/com/silverpeas/form/displayers/DateFieldDisplayer.java",
"license": "agpl-3.0",
"size": 8623
} | [
"com.silverpeas.form.FieldTemplate",
"com.silverpeas.form.FormException",
"com.silverpeas.form.PagesContext",
"com.silverpeas.form.fieldType.DateField",
"java.util.ArrayList",
"java.util.List"
] | import com.silverpeas.form.FieldTemplate; import com.silverpeas.form.FormException; import com.silverpeas.form.PagesContext; import com.silverpeas.form.fieldType.DateField; import java.util.ArrayList; import java.util.List; | import com.silverpeas.form.*; import java.util.*; | [
"com.silverpeas.form",
"java.util"
] | com.silverpeas.form; java.util; | 2,548,035 |
protected void fillDeployedNames(Set<String> names)
{
} | void function(Set<String> names) { } | /**
* Returns the deployed names.
*/ | Returns the deployed names | fillDeployedNames | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/env/deploy/DeployGenerator.java",
"license": "gpl-2.0",
"size": 6545
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,585,292 |
public static Boolean readBoolean(final Properties props, final String name, final boolean required) {
final String result = props.getProperty(name);
if (required && StringUtil.isNullOrEmpty(result)) {
throw new ConfigException(read(Errors.CONFIG_OPTION_IS_MISSING, name));
}
... | static Boolean function(final Properties props, final String name, final boolean required) { final String result = props.getProperty(name); if (required && StringUtil.isNullOrEmpty(result)) { throw new ConfigException(read(Errors.CONFIG_OPTION_IS_MISSING, name)); } Boolean parsedValue = null; try { parsedValue = Boolea... | /**
* Reads the boolean value from given Properties object, and if the property isn't found,
* then depending on the <i>"required"</i> value, method will ends program
* throws ConfigException object or returns <i>null</i>.
*
* @param props Properties object to read from.
* @param name Key ... | Reads the boolean value from given Properties object, and if the property isn't found, then depending on the "required" value, method will ends program throws ConfigException object or returns null | readBoolean | {
"repo_name": "consistec/doubleganger",
"path": "common/src/main/java/de/consistec/doubleganger/common/util/PropertiesUtil.java",
"license": "gpl-3.0",
"size": 10146
} | [
"de.consistec.doubleganger.common.exception.ConfigException",
"de.consistec.doubleganger.common.i18n.Errors",
"java.util.Properties"
] | import de.consistec.doubleganger.common.exception.ConfigException; import de.consistec.doubleganger.common.i18n.Errors; import java.util.Properties; | import de.consistec.doubleganger.common.exception.*; import de.consistec.doubleganger.common.i18n.*; import java.util.*; | [
"de.consistec.doubleganger",
"java.util"
] | de.consistec.doubleganger; java.util; | 859,121 |
private Artifact getBinArtifact(String packageRelativePath, ArtifactOwner owner) {
return getPackageRelativeDerivedArtifact(packageRelativePath,
targetConfig.getBinDirectory(RepositoryName.MAIN),
owner);
} | Artifact function(String packageRelativePath, ArtifactOwner owner) { return getPackageRelativeDerivedArtifact(packageRelativePath, targetConfig.getBinDirectory(RepositoryName.MAIN), owner); } | /**
* Gets a derived Artifact for testing in the subdirectory of the {@link
* BuildConfiguration#getBinDirectory()} corresponding to the package of {@code owner}. So
* to specify a file foo/foo.o owned by target //foo:foo, {@code packageRelativePath} should just
* be "foo.o".
*/ | Gets a derived Artifact for testing in the subdirectory of the <code>BuildConfiguration#getBinDirectory()</code> corresponding to the package of owner. So to specify a file foo/foo.o owned by target //foo:foo, packageRelativePath should just be "foo.o" | getBinArtifact | {
"repo_name": "mrdomino/bazel",
"path": "src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java",
"license": "apache-2.0",
"size": 77290
} | [
"com.google.devtools.build.lib.actions.Artifact",
"com.google.devtools.build.lib.actions.ArtifactOwner",
"com.google.devtools.build.lib.cmdline.RepositoryName"
] | import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.ArtifactOwner; import com.google.devtools.build.lib.cmdline.RepositoryName; | import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.cmdline.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,373,959 |
public void crabBackDirBlockForRead(BlockId blk) {
lockTbl.release(blk, txNum, ConservativeOrderedLockTable.LockType.S_LOCK);
readIndexBlks.remove(blk);
}
| void function(BlockId blk) { lockTbl.release(blk, txNum, ConservativeOrderedLockTable.LockType.S_LOCK); readIndexBlks.remove(blk); } | /**
* Releases shared locks on the directory block for crabbing back.
*
* @param blk
* the block id
*/ | Releases shared locks on the directory block for crabbing back | crabBackDirBlockForRead | {
"repo_name": "elasql/elasql",
"path": "src/main/java/org/elasql/storage/tx/concurrency/ConservativeOrderedCcMgr.java",
"license": "apache-2.0",
"size": 7596
} | [
"org.elasql.storage.tx.concurrency.ConservativeOrderedLockTable",
"org.vanilladb.core.storage.file.BlockId"
] | import org.elasql.storage.tx.concurrency.ConservativeOrderedLockTable; import org.vanilladb.core.storage.file.BlockId; | import org.elasql.storage.tx.concurrency.*; import org.vanilladb.core.storage.file.*; | [
"org.elasql.storage",
"org.vanilladb.core"
] | org.elasql.storage; org.vanilladb.core; | 2,543,868 |
public void testGetColumnKeys() {
// check an empty dataset
DefaultIntervalCategoryDataset empty
= new DefaultIntervalCategoryDataset(new double[0][0],
new double[0][0]);
List keys = empty.getColumnKeys();
assertEquals(0, keys.size());
} | void function() { DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); List keys = empty.getColumnKeys(); assertEquals(0, keys.size()); } | /**
* Some checks for the getColumnKeys() method.
*/ | Some checks for the getColumnKeys() method | testGetColumnKeys | {
"repo_name": "JSansalone/JFreeChart",
"path": "tests/org/jfree/data/category/junit/DefaultIntervalCategoryDatasetTests.java",
"license": "lgpl-2.1",
"size": 18040
} | [
"java.util.List",
"org.jfree.data.category.DefaultIntervalCategoryDataset"
] | import java.util.List; import org.jfree.data.category.DefaultIntervalCategoryDataset; | import java.util.*; import org.jfree.data.category.*; | [
"java.util",
"org.jfree.data"
] | java.util; org.jfree.data; | 1,152,337 |
@JsonProperty("unitizacoes")
@NotNull
public List<Unitizacoes> getUnitizacoes() {
return unitizacoes;
} | @JsonProperty(STR) List<Unitizacoes> function() { return unitizacoes; } | /**
* Dados das cargas unitizadas
* @return unitizacoes
**/ | Dados das cargas unitizadas | getUnitizacoes | {
"repo_name": "samuelfac/portalunico.siscomex.gov.br",
"path": "src/main/java/br/gov/siscomex/portalunico/cct_ext/model/OperacaoUnitizacao.java",
"license": "mit",
"size": 4060
} | [
"com.fasterxml.jackson.annotation.JsonProperty",
"java.util.List"
] | import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; | import com.fasterxml.jackson.annotation.*; import java.util.*; | [
"com.fasterxml.jackson",
"java.util"
] | com.fasterxml.jackson; java.util; | 1,132,129 |
private static Vector findFirstPrimes(
int count)
{
Vector primes = new Vector(count);
for (int i = 0; i != count; i++)
{
primes.addElement(BigInteger.valueOf(smallPrimes[i]));
}
return primes;
} | static Vector function( int count) { Vector primes = new Vector(count); for (int i = 0; i != count; i++) { primes.addElement(BigInteger.valueOf(smallPrimes[i])); } return primes; } | /**
* Finds the first 'count' primes starting with 3
*
* @param count
* the number of primes to find
* @return a vector containing the found primes as Integer
*/ | Finds the first 'count' primes starting with 3 | findFirstPrimes | {
"repo_name": "mileschet/ripple-lib-java",
"path": "ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/crypto/generators/NaccacheSternKeyPairGenerator.java",
"license": "isc",
"size": 11509
} | [
"java.math.BigInteger",
"java.util.Vector"
] | import java.math.BigInteger; import java.util.Vector; | import java.math.*; import java.util.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 450,694 |
void close(Status status, Metadata trailers); | void close(Status status, Metadata trailers); | /**
* Closes the stream for both reading and writing. A status code of
* {@link io.grpc.Status.Code#OK} implies normal termination of the
* stream. Any other value implies abnormal termination.
*
* <p>Attempts to read from or write to the stream after closing
* should be ignored by implementations, an... | Closes the stream for both reading and writing. A status code of <code>io.grpc.Status.Code#OK</code> implies normal termination of the stream. Any other value implies abnormal termination. Attempts to read from or write to the stream after closing should be ignored by implementations, and should not throw exceptions | close | {
"repo_name": "pieterjanpintens/grpc-java",
"path": "core/src/main/java/io/grpc/internal/ServerStream.java",
"license": "apache-2.0",
"size": 2937
} | [
"io.grpc.Metadata",
"io.grpc.Status"
] | import io.grpc.Metadata; import io.grpc.Status; | import io.grpc.*; | [
"io.grpc"
] | io.grpc; | 748,283 |
public boolean clickAndSync(final int x, final int y, long timeout) {
String logString = String.format("clickAndSync(%d, %d)", x, y);
Log.d(LOG_TAG, logString);
return runAndWaitForEvents(clickRunnable(x, y), new WaitForAnyEventPredicate(
AccessibilityEvent.TYPE_WINDOW_CONT... | boolean function(final int x, final int y, long timeout) { String logString = String.format(STR, x, y); Log.d(LOG_TAG, logString); return runAndWaitForEvents(clickRunnable(x, y), new WaitForAnyEventPredicate( AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED AccessibilityEvent.TYPE_VIEW_SELECTED), timeout) != null; } | /**
* Click at coordinates and blocks until either accessibility event TYPE_WINDOW_CONTENT_CHANGED
* or TYPE_VIEW_SELECTED are received.
*
* @param x
* @param y
* @param timeout waiting for event
* @return true if events are received, else false if timeout.
*/ | Click at coordinates and blocks until either accessibility event TYPE_WINDOW_CONTENT_CHANGED or TYPE_VIEW_SELECTED are received | clickAndSync | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/com/android/uiautomator/core/InteractionController.java",
"license": "apache-2.0",
"size": 29797
} | [
"android.util.Log",
"android.view.accessibility.AccessibilityEvent"
] | import android.util.Log; import android.view.accessibility.AccessibilityEvent; | import android.util.*; import android.view.accessibility.*; | [
"android.util",
"android.view"
] | android.util; android.view; | 2,425,235 |
private DateTimeFormatter formatter(Locale locale, Chronology chrono) {
return DateTimeFormatStyleProvider.getInstance()
.getFormatter(dateStyle, timeStyle, chrono, locale);
} | DateTimeFormatter function(Locale locale, Chronology chrono) { return DateTimeFormatStyleProvider.getInstance() .getFormatter(dateStyle, timeStyle, chrono, locale); } | /**
* Gets the formatter to use.
*
* @param locale the locale to use, not null
* @return the formatter, not null
* @throws IllegalArgumentException if the formatter cannot be found
*/ | Gets the formatter to use | formatter | {
"repo_name": "seratch/java-time-backport",
"path": "src/main/java/java/time/format/DateTimeFormatterBuilder.java",
"license": "bsd-3-clause",
"size": 173218
} | [
"java.time.chrono.Chronology",
"java.util.Locale"
] | import java.time.chrono.Chronology; import java.util.Locale; | import java.time.chrono.*; import java.util.*; | [
"java.time",
"java.util"
] | java.time; java.util; | 1,971,777 |
protected void renameField(FieldSchemaCreator creator, DataProvider dataProvider, FieldFetcher fetcher, DataAsserter asserter)
throws InterruptedException, ExecutionException, TimeoutException {
try (Tx tx = tx()) {
if (getClass().isAnnotationPresent(MicroschemaTest.class)) {
renameMicroschemaField(creato... | void function(FieldSchemaCreator creator, DataProvider dataProvider, FieldFetcher fetcher, DataAsserter asserter) throws InterruptedException, ExecutionException, TimeoutException { try (Tx tx = tx()) { if (getClass().isAnnotationPresent(MicroschemaTest.class)) { renameMicroschemaField(creator, dataProvider, fetcher, a... | /**
* Generic method to test node migration where a field is renamed. Actually a new field is added (with the new name) and the old field is removed. Data
* Migration is done with a custom migration script
*
* @param creator
* creator implementation
* @param dataProvider
* data provi... | Generic method to test node migration where a field is renamed. Actually a new field is added (with the new name) and the old field is removed. Data Migration is done with a custom migration script | renameField | {
"repo_name": "gentics/mesh",
"path": "tests/tests-core/src/main/java/com/gentics/mesh/core/schema/field/AbstractFieldMigrationTest.java",
"license": "apache-2.0",
"size": 49586
} | [
"com.gentics.mesh.core.db.Tx",
"com.gentics.mesh.core.field.DataAsserter",
"com.gentics.mesh.core.field.DataProvider",
"com.gentics.mesh.core.field.FieldFetcher",
"com.gentics.mesh.core.field.FieldSchemaCreator",
"java.util.concurrent.ExecutionException",
"java.util.concurrent.TimeoutException"
] | import com.gentics.mesh.core.db.Tx; import com.gentics.mesh.core.field.DataAsserter; import com.gentics.mesh.core.field.DataProvider; import com.gentics.mesh.core.field.FieldFetcher; import com.gentics.mesh.core.field.FieldSchemaCreator; import java.util.concurrent.ExecutionException; import java.util.concurrent.Timeou... | import com.gentics.mesh.core.db.*; import com.gentics.mesh.core.field.*; import java.util.concurrent.*; | [
"com.gentics.mesh",
"java.util"
] | com.gentics.mesh; java.util; | 2,914,950 |
@Test
public void testVendorOptionFTSFactory() {
VendorOptionFTSFactory obj = new VendorOptionFTSFactory(FeatureTypeStyleDetails.class);
int expectedNoOfVO = 4;
assertEquals(expectedNoOfVO, obj.getVendorOptionList().size());
List<VendorOptionPresent> vendorOptionsPresentList = ... | void function() { VendorOptionFTSFactory obj = new VendorOptionFTSFactory(FeatureTypeStyleDetails.class); int expectedNoOfVO = 4; assertEquals(expectedNoOfVO, obj.getVendorOptionList().size()); List<VendorOptionPresent> vendorOptionsPresentList = new ArrayList<VendorOptionPresent>(); StyleFactoryImpl styleFactory = (St... | /**
* Test method for {@link
* com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.VendorOptionFTSFactory#VendorOptionFTSFactory(java.lang.Class)}.
*/ | Test method for <code>com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.VendorOptionFTSFactory#VendorOptionFTSFactory(java.lang.Class)</code> | testVendorOptionFTSFactory | {
"repo_name": "robward-scisys/sldeditor",
"path": "modules/application/src/test/java/com/sldeditor/test/unit/ui/detail/vendor/geoserver/featuretypestyle/VendorOptionFTSFactoryTest.java",
"license": "gpl-3.0",
"size": 3116
} | [
"com.sldeditor.common.vendoroption.minversion.VendorOptionPresent",
"com.sldeditor.ui.detail.FeatureTypeStyleDetails",
"com.sldeditor.ui.detail.GraphicPanelFieldManager",
"com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.VOGeoServerFTSComposite",
"com.sldeditor.ui.detail.vendor.geoserver.featuretyp... | import com.sldeditor.common.vendoroption.minversion.VendorOptionPresent; import com.sldeditor.ui.detail.FeatureTypeStyleDetails; import com.sldeditor.ui.detail.GraphicPanelFieldManager; import com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.VOGeoServerFTSComposite; import com.sldeditor.ui.detail.vendor.geoser... | import com.sldeditor.common.vendoroption.minversion.*; import com.sldeditor.ui.detail.*; import com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.*; import java.util.*; import org.geotools.factory.*; import org.geotools.styling.*; import org.junit.jupiter.api.*; | [
"com.sldeditor.common",
"com.sldeditor.ui",
"java.util",
"org.geotools.factory",
"org.geotools.styling",
"org.junit.jupiter"
] | com.sldeditor.common; com.sldeditor.ui; java.util; org.geotools.factory; org.geotools.styling; org.junit.jupiter; | 301,812 |
@Override
public void drawButton(Minecraft mc, int mouseX, int mouseY, float partialTicks) {
if (this.visible) {
mc.getTextureManager().bindTexture(BUTTON_TEXTURES);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY... | void function(Minecraft mc, int mouseX, int mouseY, float partialTicks) { if (this.visible) { mc.getTextureManager().bindTexture(BUTTON_TEXTURES); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height; int i = t... | /**
* Draws this button to the screen.
*/ | Draws this button to the screen | drawButton | {
"repo_name": "robertusengel/aoemod",
"path": "gui/GuiButtonTowncenter.java",
"license": "mit",
"size": 2996
} | [
"net.minecraft.client.Minecraft",
"net.minecraft.client.renderer.GlStateManager"
] | import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; | import net.minecraft.client.*; import net.minecraft.client.renderer.*; | [
"net.minecraft.client"
] | net.minecraft.client; | 2,162,484 |
public void addUrlMappings(String... urlMappings) {
Assert.notNull(urlMappings, "UrlMappings must not be null");
this.urlMappings.addAll(Arrays.asList(urlMappings));
} | void function(String... urlMappings) { Assert.notNull(urlMappings, STR); this.urlMappings.addAll(Arrays.asList(urlMappings)); } | /**
* Add URL mappings for the servlet.
* @param urlMappings the mappings to add
* @see #setUrlMappings(Collection)
*/ | Add URL mappings for the servlet | addUrlMappings | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/spring-boot-master/spring-boot/src/main/java/org/springframework/boot/context/embedded/ServletRegistrationBean.java",
"license": "mit",
"size": 6973
} | [
"java.util.Arrays",
"org.springframework.util.Assert"
] | import java.util.Arrays; import org.springframework.util.Assert; | import java.util.*; import org.springframework.util.*; | [
"java.util",
"org.springframework.util"
] | java.util; org.springframework.util; | 1,839,000 |
EReference getPowerSystemResource_PsrLists(); | EReference getPowerSystemResource_PsrLists(); | /**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.PowerSystemResource#getPsrLists <em>Psr Lists</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Psr Lists</em>'.
* @see CIM.IEC61970.Core.PowerSystemResource#getPsrLists... | Returns the meta object for the reference list '<code>CIM.IEC61970.Core.PowerSystemResource#getPsrLists Psr Lists</code>'. | getPowerSystemResource_PsrLists | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Core/CorePackage.java",
"license": "mit",
"size": 253784
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,481,189 |
public void drawSimpleShape(final ICoordinates yNegatedVertices, final int number, final boolean solid,
final boolean clockwise, final boolean computeNormal, final Color border) {
if (solid) {
if (computeNormal) {
setNormal(yNegatedVertices, clockwise);
}
final int style = number == 4 ? GL2.GL_QUAD... | void function(final ICoordinates yNegatedVertices, final int number, final boolean solid, final boolean clockwise, final boolean computeNormal, final Color border) { if (solid) { if (computeNormal) { setNormal(yNegatedVertices, clockwise); } final int style = number == 4 ? GL2.GL_QUADS : number == -1 ? GL2.GL_POLYGON :... | /**
* Draws an arbitrary shape using a set of vertices as input, computing the normal if necessary and drawing the
* contour if a border is present
*
* @param yNegatedVertices
* the set of vertices to draw
* @param number
* the number of vertices to draw. Either 3 (a triangle), 4 (a... | Draws an arbitrary shape using a set of vertices as input, computing the normal if necessary and drawing the contour if a border is present | drawSimpleShape | {
"repo_name": "hqnghi88/gamaClone",
"path": "ummisco.gama.opengl/src/ummisco/gama/opengl/scene/OpenGL.java",
"license": "gpl-3.0",
"size": 37614
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,218,657 |
private void handleTreeViewerMouseUp(final Tree tree, MouseEvent e) {
// Ensure a selection was made, the first mouse button was
// used and the event happened in the tree
if ((tree.getSelectionCount() < 1) || (e.button != 1) || !tree.equals(e.getSource())) {
return;
}
// Selection is made in the ... | void function(final Tree tree, MouseEvent e) { if ((tree.getSelectionCount() < 1) (e.button != 1) !tree.equals(e.getSource())) { return; } Object object = tree.getItem(new Point(e.x, e.y)); TreeItem selection = tree.getSelection()[0]; if (selection.equals(object)) { gotoSelectedElement(); } } | /**
* Handles mouse up action for the tree viewer
*
* @param tree
* current tree
* @param e
* mouse event
*/ | Handles mouse up action for the tree viewer | handleTreeViewerMouseUp | {
"repo_name": "Springrbua/typescript.java",
"path": "eclipse/ts.eclipse.ide.ui/src/ts/eclipse/ide/internal/ui/text/AbstractInformationControl.java",
"license": "mit",
"size": 19795
} | [
"org.eclipse.swt.events.MouseEvent",
"org.eclipse.swt.graphics.Point",
"org.eclipse.swt.widgets.Tree",
"org.eclipse.swt.widgets.TreeItem"
] | import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Tree; import org.eclipse.swt.widgets.TreeItem; | import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 779,858 |
@Override
protected boolean validatePage() {
if (super.validatePage()) {
String extension = new Path(getFileName()).getFileExtension();
if (extension == null || !FILE_EXTENSIONS.contains(extension)) {
String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExten... | boolean function() { if (super.validatePage()) { String extension = new Path(getFileName()).getFileExtension(); if (extension == null !FILE_EXTENSIONS.contains(extension)) { String key = FILE_EXTENSIONS.size() > 1 ? STR : STR; setErrorMessage(DomainEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXT... | /**
* The framework calls this to see if the file is correct.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | The framework calls this to see if the file is correct. | validatePage | {
"repo_name": "BaSys-PC1/models",
"path": "de.dfki.iui.basys.model.domain.editor/src/de/dfki/iui/basys/model/domain/workerguidance/presentation/WorkerguidanceModelWizard.java",
"license": "epl-1.0",
"size": 18693
} | [
"de.dfki.iui.basys.model.domain.order.presentation.DomainEditorPlugin",
"org.eclipse.core.runtime.Path"
] | import de.dfki.iui.basys.model.domain.order.presentation.DomainEditorPlugin; import org.eclipse.core.runtime.Path; | import de.dfki.iui.basys.model.domain.order.presentation.*; import org.eclipse.core.runtime.*; | [
"de.dfki.iui",
"org.eclipse.core"
] | de.dfki.iui; org.eclipse.core; | 682,323 |
private void setUpTexts(Composite localParent) {
// Set up the group to contain all the texts.
gTexts = new Group(localParent, SWT.None);
gTexts.setLayout(new GridLayout(3, true));
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1);
gd.minimumHeight = 10;
... | void function(Composite localParent) { gTexts = new Group(localParent, SWT.None); gTexts.setLayout(new GridLayout(3, true)); GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1); gd.minimumHeight = 10; gd.heightHint = 10; gTexts.setLayoutData(gd); gTexts.setText(Messages.RSAKeyView_Texts); gMessage = new Gr... | /**
* Sets up the plaintext and ciphertext controls at the bottom.
*
* @param localParent The parent control of the text section (the Key tab).
*/ | Sets up the plaintext and ciphertext controls at the bottom | setUpTexts | {
"repo_name": "kevinott/crypto",
"path": "org.jcryptool.visual.kleptography/src/org/jcryptool/visual/kleptography/ui/RSAKeyView.java",
"license": "epl-1.0",
"size": 103013
} | [
"org.eclipse.swt.layout.GridData",
"org.eclipse.swt.layout.GridLayout",
"org.eclipse.swt.widgets.Button",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Group",
"org.eclipse.swt.widgets.Text"
] | import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Text; | import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,863,662 |
public void setColumnOrder(Object... propertyIds) {
List<String> columnOrder = new ArrayList<String>();
for (Object propertyId : propertyIds) {
if (columns.containsKey(propertyId)) {
columnOrder.add(columnKeys.key(propertyId));
} else {
throw n... | void function(Object... propertyIds) { List<String> columnOrder = new ArrayList<String>(); for (Object propertyId : propertyIds) { if (columns.containsKey(propertyId)) { columnOrder.add(columnKeys.key(propertyId)); } else { throw new IllegalArgumentException( STR + String.valueOf(propertyId)); } } List<String> stateCol... | /**
* Sets a new column order for the grid. All columns which are not ordered
* here will remain in the order they were before as the last columns of
* grid.
*
* @param propertyIds
* properties in the order columns should be
*/ | Sets a new column order for the grid. All columns which are not ordered here will remain in the order they were before as the last columns of grid | setColumnOrder | {
"repo_name": "udayinfy/vaadin",
"path": "server/src/com/vaadin/ui/Grid.java",
"license": "apache-2.0",
"size": 241007
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,312,457 |
EAttribute getPerson_LicensePlateNumber(); | EAttribute getPerson_LicensePlateNumber(); | /**
* Returns the meta object for the attribute '{@link socialnetwork_base.Person#getLicensePlateNumber <em>License Plate Number</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>License Plate Number</em>'.
* @see socialnetwork_base.Person#getLicensePla... | Returns the meta object for the attribute '<code>socialnetwork_base.Person#getLicensePlateNumber License Plate Number</code>'. | getPerson_LicensePlateNumber | {
"repo_name": "FTSRG/iq-sirius-integration",
"path": "host/org.eclipse.incquery.viewmodel.sirius.example.socialnetwork.models/src/socialnetwork_base/Socialnetwork_basePackage.java",
"license": "epl-1.0",
"size": 16896
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,626,993 |
protected HttpURLConnection post(String url, String body)
throws IOException {
return post(url, "application/x-www-form-urlencoded;charset=UTF-8", body);
} | HttpURLConnection function(String url, String body) throws IOException { return post(url, STR, body); } | /**
* Make an HTTP post to a given URL.
*
* @return HTTP response.
*/ | Make an HTTP post to a given URL | post | {
"repo_name": "robbStarkTFG4/gcm",
"path": "client-libraries/java/rest-client/src/com/google/android/gcm/server/Sender.java",
"license": "apache-2.0",
"size": 22806
} | [
"java.io.IOException",
"java.net.HttpURLConnection"
] | import java.io.IOException; import java.net.HttpURLConnection; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 1,332,887 |
@WebMethod
@WebResult(name = "rval", targetNamespace = "https://www.google.com/apis/ads/publisher/v201405")
@RequestWrapper(localName = "performProductTemplateAction", targetNamespace = "https://www.google.com/apis/ads/publisher/v201405", className = "com.google.api.ads.dfp.jaxws.v201405.ProductTemplateServ... | @WebResult(name = "rval", targetNamespace = STRperformProductTemplateActionSTRhttps: @ResponseWrapper(localName = "performProductTemplateActionResponseSTRhttps: UpdateResult function( @WebParam(name = "actionSTRhttps: ProductTemplateAction action, @WebParam(name = "filterStatementSTRhttps: Statement filterStatement) th... | /**
*
* Performs action on {@link ProductTemplate} objects that satisfy the given
* {@link Statement#query}.
*
* @param action the action to perform
* @param filterStatement a Publisher Query Language statement used to filter
* a set o... | Performs action on <code>ProductTemplate</code> objects that satisfy the given <code>Statement#query</code> | performProductTemplateAction | {
"repo_name": "ya7lelkom/googleads-java-lib",
"path": "modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201405/ProductTemplateServiceInterface.java",
"license": "apache-2.0",
"size": 8440
} | [
"javax.jws.WebParam",
"javax.jws.WebResult",
"javax.xml.ws.ResponseWrapper"
] | import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper; | import javax.jws.*; import javax.xml.ws.*; | [
"javax.jws",
"javax.xml"
] | javax.jws; javax.xml; | 2,100,228 |
@CheckResult
@NonNull
public Maybe<Integer> removeItemAsMaybe(@NonNull Model item) {
return delegate.removeItemAsMaybe(item);
} | Maybe<Integer> function(@NonNull Model item) { return delegate.removeItemAsMaybe(item); } | /**
* Removes an item from the table and invokes {@link RecyclerView.Adapter#notifyItemRemoved(int)}.
*
* @param item A model to remove.
* @return It yields the position at which the item was. {@code onNext()} is only called if the
* item existed.
*/ | Removes an item from the table and invokes <code>RecyclerView.Adapter#notifyItemRemoved(int)</code> | removeItemAsMaybe | {
"repo_name": "gfx/Android-Orma",
"path": "library/src/main/java/com/github/gfx/android/orma/widget/OrmaRecyclerViewAdapter.java",
"license": "apache-2.0",
"size": 4521
} | [
"androidx.annotation.NonNull",
"io.reactivex.Maybe"
] | import androidx.annotation.NonNull; import io.reactivex.Maybe; | import androidx.annotation.*; import io.reactivex.*; | [
"androidx.annotation",
"io.reactivex"
] | androidx.annotation; io.reactivex; | 2,428,780 |
public WildebeestApiBuilder withSqlServerSupport()
{
return this
.withResourcePlugin(SqlServerConstants.SqlServerDatabase, new SqlServerDatabaseResourcePlugin())
.withAssertionPlugins(WildebeestApiBuilder.getAssertionPlugins_GeneralDatabase())
.withAssertionPlugins(WildebeestApiBuilder.getAssertionPlugin... | WildebeestApiBuilder function() { return this .withResourcePlugin(SqlServerConstants.SqlServerDatabase, new SqlServerDatabaseResourcePlugin()) .withAssertionPlugins(WildebeestApiBuilder.getAssertionPlugins_GeneralDatabase()) .withAssertionPlugins(WildebeestApiBuilder.getAssertionPlugins_SqlServer()) .withMigrationPlugi... | /**
* Fluently configures the API with the required plugins for working with SQL Server databases. A new builder is
* returned and the original builder is left unmutated.
*
* @return a new WildebeestApiBuilder with the state of the original plus the new state
* @since 4.0
*/ | Fluently configures the API with the required plugins for working with SQL Server databases. A new builder is returned and the original builder is left unmutated | withSqlServerSupport | {
"repo_name": "zendigitalstudios/wildebeest",
"path": "MV.Wildebeest.Core/source/core/java/co/mv/wb/WildebeestApiBuilder.java",
"license": "gpl-2.0",
"size": 14233
} | [
"co.mv.wb.plugin.sqlserver.SqlServerConstants",
"co.mv.wb.plugin.sqlserver.SqlServerDatabaseResourcePlugin"
] | import co.mv.wb.plugin.sqlserver.SqlServerConstants; import co.mv.wb.plugin.sqlserver.SqlServerDatabaseResourcePlugin; | import co.mv.wb.plugin.sqlserver.*; | [
"co.mv.wb"
] | co.mv.wb; | 1,306,108 |
private void getName(final Tag t) {
final Boolean edit = !t.toString().isEmpty();
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setMessage("Enter a new name");
if (edit)
builder.setTitle("Edit Tag");
else
builder.setTitle("Create Tag");
final EditText input = ne... | void function(final Tag t) { final Boolean edit = !t.toString().isEmpty(); AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setMessage(STR); if (edit) builder.setTitle(STR); else builder.setTitle(STR); final EditText input = new EditText(getActivity()); input.setMaxLines(1); input.setInputT... | /**
* Gets the name.
*
* @return the name
*/ | Gets the name | getName | {
"repo_name": "CMPUT301W15T05/TrackerExpress",
"path": "TrackerExpress/src/group5/trackerexpress/TagListFragment.java",
"license": "mit",
"size": 6738
} | [
"android.app.AlertDialog",
"android.content.DialogInterface",
"android.text.InputType",
"android.widget.EditText"
] | import android.app.AlertDialog; import android.content.DialogInterface; import android.text.InputType; import android.widget.EditText; | import android.app.*; import android.content.*; import android.text.*; import android.widget.*; | [
"android.app",
"android.content",
"android.text",
"android.widget"
] | android.app; android.content; android.text; android.widget; | 760,887 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.