method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static java.util.Set extractPatientICPSet(ims.domain.ILightweightDomainFactory domainFactory, ims.icp.vo.PatientICP_PresentationVoCollection voCollection) { return extractPatientICPSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.icp.vo.PatientICP_PresentationVoCollection voCollection) { return extractPatientICPSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.icps.instantiation.domain.objects.PatientICP set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.icps.instantiation.domain.objects.PatientICP set from the value object collection
extractPatientICPSet
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/icp/vo/domain/PatientICP_PresentationVoAssembler.java", "license": "agpl-3.0", "size": 26824 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,625,855
URL xmlAttachment = new URL("file:./test-resources/soapmessage.xml"); DataHandler dh = new DataHandler(xmlAttachment); assertTrue(dh.getContentType().equals("application/xml")); WrappedDataHandler wrappedDH = new WrappedDataHandler(dh, "text/xml"); assertTrue(wrappedDH.getContentType() !...
URL xmlAttachment = new URL(STR); DataHandler dh = new DataHandler(xmlAttachment); assertTrue(dh.getContentType().equals(STR)); WrappedDataHandler wrappedDH = new WrappedDataHandler(dh, STR); assertTrue(wrappedDH.getContentType() != null); assertTrue(wrappedDH.getContentType().equals(STR)); }
/** * Verify that the Wrapped DataHandler maintains the correct content-type value * for an XML document attachment. */
Verify that the Wrapped DataHandler maintains the correct content-type value for an XML document attachment
testWrappedDataHandler
{ "repo_name": "arunasujith/wso2-axis2", "path": "modules/kernel/test/org/apache/axis2/util/WrappedDataHandlerTest.java", "license": "apache-2.0", "size": 1670 }
[ "javax.activation.DataHandler" ]
import javax.activation.DataHandler;
import javax.activation.*;
[ "javax.activation" ]
javax.activation;
277,134
@Nonnull static Boolean greaterThan(@Nonnull BigDecimal number1, @Nonnull BigDecimal number2) { requireNonNull(number1); requireNonNull(number2); return number1.compareTo(number2) > 0; } /** * Does the given number fall within the range defined by its minimum and maximum (inclusive)? * <p> ...
static Boolean greaterThan(@Nonnull BigDecimal number1, @Nonnull BigDecimal number2) { requireNonNull(number1); requireNonNull(number2); return number1.compareTo(number2) > 0; } /** * Does the given number fall within the range defined by its minimum and maximum (inclusive)? * <p> * <strong>Note:</strong> the scale of ...
/** * Is the first number greater than the second number? * * @param number1 the first number to compare, not null * @param number2 the second number to compare, not null * @return true if the first number is greater than the second number, not null */
Is the first number greater than the second number
greaterThan
{ "repo_name": "lokalized/lokalized-java", "path": "src/main/java/com/lokalized/NumberUtils.java", "license": "apache-2.0", "size": 14239 }
[ "java.math.BigDecimal", "java.util.Objects", "javax.annotation.Nonnull" ]
import java.math.BigDecimal; import java.util.Objects; import javax.annotation.Nonnull;
import java.math.*; import java.util.*; import javax.annotation.*;
[ "java.math", "java.util", "javax.annotation" ]
java.math; java.util; javax.annotation;
1,044,828
protected void setup() throws IOException { _type.assertFull(); if (!_ops.doRequiredTopoFilesExist(_conf, _topologyId)) { LOG.info("Missing topology storm code, so can't launch worker with assignment {} for this supervisor {} on port {} with id {}", _assignment, _sup...
void function() throws IOException { _type.assertFull(); if (!_ops.doRequiredTopoFilesExist(_conf, _topologyId)) { LOG.info(STR, _assignment, _supervisorId, _port, _workerId); throw new IllegalStateException(STR); } LOG.info(STR, _supervisorId, _workerId); _ops.forceMkdir(new File(ConfigUtils.workerPidsRoot(_conf, _wor...
/** * Setup the container to run. By default this creates the needed directories/links in the * local file system * PREREQUISITE: All needed blobs and topology, jars/configs have been downloaded and * placed in the appropriate locations * @throws IOException on any error */
Setup the container to run. By default this creates the needed directories/links in the local file system placed in the appropriate locations
setup
{ "repo_name": "sakanaou/storm", "path": "storm-server/src/main/java/org/apache/storm/daemon/supervisor/Container.java", "license": "apache-2.0", "size": 26942 }
[ "java.io.File", "java.io.IOException", "org.apache.storm.utils.ConfigUtils" ]
import java.io.File; import java.io.IOException; import org.apache.storm.utils.ConfigUtils;
import java.io.*; import org.apache.storm.utils.*;
[ "java.io", "org.apache.storm" ]
java.io; org.apache.storm;
1,399,480
public void setSumLogImpl(StorelessUnivariateStatistic[] sumLogImpl) throws DimensionMismatchException { setImpl(sumLogImpl, this.sumLogImpl); }
void function(StorelessUnivariateStatistic[] sumLogImpl) throws DimensionMismatchException { setImpl(sumLogImpl, this.sumLogImpl); }
/** * <p>Sets the implementation for the sum of logs.</p> * <p>This method must be activated before any data has been added - i.e., * before {@link #addValue(double[]) addValue} has been used to add data; * otherwise an IllegalStateException will be thrown.</p> * * @param sumLogImpl the ...
Sets the implementation for the sum of logs. This method must be activated before any data has been added - i.e., before <code>#addValue(double[]) addValue</code> has been used to add data; otherwise an IllegalStateException will be thrown
setSumLogImpl
{ "repo_name": "cacheonix/cacheonix-core", "path": "3rdparty/commons-math-1.2-src/src/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java", "license": "lgpl-2.1", "size": 23688 }
[ "org.apache.commons.math.DimensionMismatchException" ]
import org.apache.commons.math.DimensionMismatchException;
import org.apache.commons.math.*;
[ "org.apache.commons" ]
org.apache.commons;
2,270,819
public Position getPosition();
Position function();
/** * Gets the player's current position. * @return The player's position. */
Gets the player's current position
getPosition
{ "repo_name": "OpenClassic/OpenClassicAPI", "path": "src/main/java/org/spacehq/openclassic/api/player/Player.java", "license": "mit", "size": 4616 }
[ "org.spacehq.openclassic.api.Position" ]
import org.spacehq.openclassic.api.Position;
import org.spacehq.openclassic.api.*;
[ "org.spacehq.openclassic" ]
org.spacehq.openclassic;
2,149,293
public final MetaProperty<CurrencyBean> currency() { return _currency; }
final MetaProperty<CurrencyBean> function() { return _currency; }
/** * The meta-property for the {@code currency} property. * @return the meta-property, not null */
The meta-property for the currency property
currency
{ "repo_name": "McLeodMoores/starling", "path": "projects/master-db/src/main/java/com/opengamma/masterdb/security/hibernate/option/EquityIndexDividendFutureOptionSecurityBean.java", "license": "apache-2.0", "size": 19290 }
[ "com.opengamma.masterdb.security.hibernate.CurrencyBean", "org.joda.beans.MetaProperty" ]
import com.opengamma.masterdb.security.hibernate.CurrencyBean; import org.joda.beans.MetaProperty;
import com.opengamma.masterdb.security.hibernate.*; import org.joda.beans.*;
[ "com.opengamma.masterdb", "org.joda.beans" ]
com.opengamma.masterdb; org.joda.beans;
1,516,273
@SuppressWarnings("unchecked") public T setPointHoverBorderColor(List<Color> pointHoverBorderColor) { this.pointHoverBorderColor.clear(); if (pointHoverBorderColor != null) { this.pointHoverBorderColor.addAll(pointHoverBorderColor); } return (T) this; }
@SuppressWarnings(STR) T function(List<Color> pointHoverBorderColor) { this.pointHoverBorderColor.clear(); if (pointHoverBorderColor != null) { this.pointHoverBorderColor.addAll(pointHoverBorderColor); } return (T) this; }
/** * Point border color when hovered */
Point border color when hovered
setPointHoverBorderColor
{ "repo_name": "mdewilde/chart", "path": "src/main/java/be/ceau/chart/dataset/PointDataset.java", "license": "apache-2.0", "size": 14212 }
[ "be.ceau.chart.color.Color", "java.util.List" ]
import be.ceau.chart.color.Color; import java.util.List;
import be.ceau.chart.color.*; import java.util.*;
[ "be.ceau.chart", "java.util" ]
be.ceau.chart; java.util;
540,248
public static TestDataflowPipelineRunner fromOptions( PipelineOptions options) { TestDataflowPipelineOptions dataflowOptions = options.as(TestDataflowPipelineOptions.class); return new TestDataflowPipelineRunner(dataflowOptions); }
static TestDataflowPipelineRunner function( PipelineOptions options) { TestDataflowPipelineOptions dataflowOptions = options.as(TestDataflowPipelineOptions.class); return new TestDataflowPipelineRunner(dataflowOptions); }
/** * Constructs a runner from the provided options. */
Constructs a runner from the provided options
fromOptions
{ "repo_name": "shakamunyi/beam", "path": "sdks/java/core/src/main/java/com/google/cloud/dataflow/sdk/testing/TestDataflowPipelineRunner.java", "license": "apache-2.0", "size": 9816 }
[ "com.google.cloud.dataflow.sdk.options.PipelineOptions" ]
import com.google.cloud.dataflow.sdk.options.PipelineOptions;
import com.google.cloud.dataflow.sdk.options.*;
[ "com.google.cloud" ]
com.google.cloud;
2,497,938
public boolean preprocessData(Properties templateData, InterviewParameters interview) { return false; }
boolean function(Properties templateData, InterviewParameters interview) { return false; }
/** * Invoked before propagation process. * Provides possibility for custom preprocessing * of interview data based on template data * If the interview data or state was changed the method must return true * @param templateData - template data in key-value form * @param interview * @r...
Invoked before propagation process. Provides possibility for custom preprocessing of interview data based on template data If the interview data or state was changed the method must return true
preprocessData
{ "repo_name": "otmarjr/jtreg-fork", "path": "dist-with-aspectj/jtreg/lib/javatest/com/sun/javatest/tool/CustomPropagationController.java", "license": "gpl-2.0", "size": 4165 }
[ "com.sun.javatest.InterviewParameters", "java.util.Properties" ]
import com.sun.javatest.InterviewParameters; import java.util.Properties;
import com.sun.javatest.*; import java.util.*;
[ "com.sun.javatest", "java.util" ]
com.sun.javatest; java.util;
1,376,667
public static String createBingUrl(String keyword, int pageIndex) throws Exception { int first = pageIndex * 10 - 9; keyword = URLEncoder.encode(keyword, "utf-8"); return String.format("http://cn.bing.com/search?q=%s&first=%s", keyword, first); }
static String function(String keyword, int pageIndex) throws Exception { int first = pageIndex * 10 - 9; keyword = URLEncoder.encode(keyword, "utf-8"); return String.format("http: }
/** * construct the Bing Search url by the search keyword and the pageIndex * @param keyword * @param pageIndex * @return the constructed url * @throws Exception */
construct the Bing Search url by the search keyword and the pageIndex
createBingUrl
{ "repo_name": "CrawlScript/WebCollector", "path": "src/main/java/cn/edu/hfut/dmic/webcollector/example/DemoAnnotatedBingCrawler.java", "license": "gpl-3.0", "size": 7234 }
[ "java.net.URLEncoder" ]
import java.net.URLEncoder;
import java.net.*;
[ "java.net" ]
java.net;
268,351
public Properties getCalciteExtrasProperties() { Properties properties = new Properties(); Map<String, String> map = getPropertiesByPrefix("kylin.query.calcite.extras-props."); properties.putAll(map); return properties; }
Properties function() { Properties properties = new Properties(); Map<String, String> map = getPropertiesByPrefix(STR); properties.putAll(map); return properties; }
/** * Extras calcite properties to config Calcite connection */
Extras calcite properties to config Calcite connection
getCalciteExtrasProperties
{ "repo_name": "apache/incubator-kylin", "path": "core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java", "license": "apache-2.0", "size": 74077 }
[ "java.util.Map", "java.util.Properties" ]
import java.util.Map; import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
2,345,827
EList<Field> getFields();
EList<Field> getFields();
/** * Returns the value of the '<em><b>Fields</b></em>' containment reference list. * The list contents are of type {@link net.langleystudios.dsl.avroSchema.Field}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Fields</em>' containment reference list isn't clear, * there really should b...
Returns the value of the 'Fields' containment reference list. The list contents are of type <code>net.langleystudios.dsl.avroSchema.Field</code>. If the meaning of the 'Fields' containment reference list isn't clear, there really should be more of a description here...
getFields
{ "repo_name": "LangleyStudios/eclipse-avro", "path": "plugins/net.langleystudios.avro.dsl/src-gen/net/langleystudios/dsl/avroSchema/FieldList.java", "license": "epl-1.0", "size": 1227 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
580,403
public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException { return !this.conn.lowerCaseTableNames(); }
boolean function() throws SQLException { return !this.conn.lowerCaseTableNames(); }
/** * Does the database support mixed case quoted SQL identifiers? A JDBC * compliant driver will always return true. * * @return true if so * @throws SQLException * DOCUMENT ME! */
Does the database support mixed case quoted SQL identifiers? A JDBC compliant driver will always return true
supportsMixedCaseQuotedIdentifiers
{ "repo_name": "lukearndt/CommunityRosterSystem", "path": "lib/mysql-connector-java-5.1.21/src/com/mysql/jdbc/DatabaseMetaData.java", "license": "mit", "size": 264384 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
222,797
static public int busyStatusFromAttendeeStatus(int selfAttendeeStatus) { int busyStatus; switch (selfAttendeeStatus) { case Attendees.ATTENDEE_STATUS_DECLINED: case Attendees.ATTENDEE_STATUS_NONE: case Attendees.ATTENDEE_STATUS_INVITED: busyStatus ...
static int function(int selfAttendeeStatus) { int busyStatus; switch (selfAttendeeStatus) { case Attendees.ATTENDEE_STATUS_DECLINED: case Attendees.ATTENDEE_STATUS_NONE: case Attendees.ATTENDEE_STATUS_INVITED: busyStatus = BUSY_STATUS_FREE; break; case Attendees.ATTENDEE_STATUS_TENTATIVE: busyStatus = BUSY_STATUS_TENTA...
/** Get a busy status from a selfAttendeeStatus * The default here is BUSY * @param selfAttendeeStatus from CalendarProvider2 * @return the corresponding value of busy status */
Get a busy status from a selfAttendeeStatus The default here is BUSY
busyStatusFromAttendeeStatus
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/apps/Exchange/src/com/android/exchange/utility/CalendarUtilities.java", "license": "gpl-3.0", "size": 93299 }
[ "android.provider.CalendarContract" ]
import android.provider.CalendarContract;
import android.provider.*;
[ "android.provider" ]
android.provider;
2,676,218
public byte[] toBinary3Sves() { return ArrayEncoder.encodeMod3Sves(coeffs); }
byte[] function() { return ArrayEncoder.encodeMod3Sves(coeffs); }
/** * Encodes a polynomial with ternary coefficients to binary. * <code>coeffs[2*i]</code> and <code>coeffs[2*i+1]</code> must not both equal -1 for any integer <code>i</code>, * so this method is only safe to use with polynomials produced by <code>fromBinary3Sves()</code>. * * @return the enco...
Encodes a polynomial with ternary coefficients to binary. <code>coeffs[2*i]</code> and <code>coeffs[2*i+1]</code> must not both equal -1 for any integer <code>i</code>, so this method is only safe to use with polynomials produced by <code>fromBinary3Sves()</code>
toBinary3Sves
{ "repo_name": "alphallc/connectbot", "path": "src/org/bouncycastle/pqc/math/ntru/polynomial/IntegerPolynomial.java", "license": "apache-2.0", "size": 41289 }
[ "org.bouncycastle.pqc.math.ntru.util.ArrayEncoder" ]
import org.bouncycastle.pqc.math.ntru.util.ArrayEncoder;
import org.bouncycastle.pqc.math.ntru.util.*;
[ "org.bouncycastle.pqc" ]
org.bouncycastle.pqc;
369,232
public AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, IOException { if (TDebug.TraceAudioFileReader) TDebug.out("getAudioInputStream(File file)"); InputStream inputStream = new FileInputStream(file); try { return getAudioInputStream(inputStream); } catch (...
AudioInputStream function(File file) throws UnsupportedAudioFileException, IOException { if (TDebug.TraceAudioFileReader) TDebug.out(STR); InputStream inputStream = new FileInputStream(file); try { return getAudioInputStream(inputStream); } catch (UnsupportedAudioFileException e) { if (inputStream != null) inputStream....
/** * Returns AudioInputStream from file. */
Returns AudioInputStream from file
getAudioInputStream
{ "repo_name": "xpy/Minim", "path": "src/ddf/minim/javasound/MpegAudioFileReader.java", "license": "lgpl-3.0", "size": 29535 }
[ "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream", "javax.sound.sampled.AudioInputStream", "javax.sound.sampled.UnsupportedAudioFileException", "org.tritonus.share.TDebug" ]
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.UnsupportedAudioFileException; import org.tritonus.share.TDebug;
import java.io.*; import javax.sound.sampled.*; import org.tritonus.share.*;
[ "java.io", "javax.sound", "org.tritonus.share" ]
java.io; javax.sound; org.tritonus.share;
2,082,736
void printError(@NotNull String text);
void printError(@NotNull String text);
/** * Print error in console. * * @param text text that need to be shown as error */
Print error in console
printError
{ "repo_name": "TypeFox/che", "path": "plugins/plugin-svn/che-plugin-svn-ext-ide/src/main/java/org/eclipse/che/plugin/svn/ide/common/SubversionOutputConsole.java", "license": "epl-1.0", "size": 1332 }
[ "javax.validation.constraints.NotNull" ]
import javax.validation.constraints.NotNull;
import javax.validation.constraints.*;
[ "javax.validation" ]
javax.validation;
765,301
public StoreFileMetadata metadata() { return metadata; }
StoreFileMetadata function() { return metadata; }
/** * Returns the StoreFileMetadata for this file info. */
Returns the StoreFileMetadata for this file info
metadata
{ "repo_name": "crate/crate", "path": "server/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java", "license": "apache-2.0", "size": 20416 }
[ "org.elasticsearch.index.store.StoreFileMetadata" ]
import org.elasticsearch.index.store.StoreFileMetadata;
import org.elasticsearch.index.store.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
266,955
public void initIntro() { try { t.run(); } catch (Exception e) { new ErrorPopup(ErrorPopup.Level.WARNING, "could not play sound", false); } }
void function() { try { t.run(); } catch (Exception e) { new ErrorPopup(ErrorPopup.Level.WARNING, STR, false); } }
/** * This function initializes the timer and schedules it to play the intro imidiately. */
This function initializes the timer and schedules it to play the intro imidiately
initIntro
{ "repo_name": "EaW1805/www", "path": "src/main/java/com/eaw1805/www/shared/stores/SoundStore.java", "license": "mit", "size": 11286 }
[ "com.eaw1805.www.client.widgets.ErrorPopup" ]
import com.eaw1805.www.client.widgets.ErrorPopup;
import com.eaw1805.www.client.widgets.*;
[ "com.eaw1805.www" ]
com.eaw1805.www;
441,091
public PresentationOperationDescriptor<E> getPresentationDescriptor() { return this.presentationDescriptor; }
PresentationOperationDescriptor<E> function() { return this.presentationDescriptor; }
/** * Gets the value for the presentationDescriptor field. * * @return The value for the presentationDescriptor field. */
Gets the value for the presentationDescriptor field
getPresentationDescriptor
{ "repo_name": "lunarray-org/model-gen-swing", "path": "src/main/java/org/lunarray/model/generation/swing/render/factories/form/swing/components/OperationOutputStrategy.java", "license": "lgpl-3.0", "size": 7358 }
[ "org.lunarray.model.descriptor.presentation.PresentationOperationDescriptor" ]
import org.lunarray.model.descriptor.presentation.PresentationOperationDescriptor;
import org.lunarray.model.descriptor.presentation.*;
[ "org.lunarray.model" ]
org.lunarray.model;
1,242,936
public void testPOLROnFullDatasetRun() throws Exception { POLRWorkerNode worker_model_builder = new POLRWorkerNode(); // generate the debug conf ---- normally setup by YARN stuff worker_model_builder.setup(this.generateDebugConfigurationObject()); // ---- this all needs to be done in ...
void function() throws Exception { POLRWorkerNode worker_model_builder = new POLRWorkerNode(); worker_model_builder.setup(this.generateDebugConfigurationObject()); JobConf job = new JobConf(defaultConf); InputSplit[] splits = generateDebugSplits(workDir, job); TextRecordParser txt_reader = new TextRecordParser(); long ...
/** * [ ******* Rebuilding this currently ******* ] * @throws Exception */
[ ******* Rebuilding this currently ******* ]
testPOLROnFullDatasetRun
{ "repo_name": "jpatanooga/KnittingBoar", "path": "src/test/java/com/cloudera/knittingboar/sgd/TestPOLRWorkerNode.java", "license": "apache-2.0", "size": 10066 }
[ "com.cloudera.iterativereduce.io.TextRecordParser", "com.cloudera.knittingboar.sgd.iterativereduce.POLRWorkerNode", "org.apache.hadoop.mapred.InputSplit", "org.apache.hadoop.mapred.JobConf" ]
import com.cloudera.iterativereduce.io.TextRecordParser; import com.cloudera.knittingboar.sgd.iterativereduce.POLRWorkerNode; import org.apache.hadoop.mapred.InputSplit; import org.apache.hadoop.mapred.JobConf;
import com.cloudera.iterativereduce.io.*; import com.cloudera.knittingboar.sgd.iterativereduce.*; import org.apache.hadoop.mapred.*;
[ "com.cloudera.iterativereduce", "com.cloudera.knittingboar", "org.apache.hadoop" ]
com.cloudera.iterativereduce; com.cloudera.knittingboar; org.apache.hadoop;
2,400,154
static Map<Path, InputFormat> getInputFormatMap(JobConf conf) { Map<Path, InputFormat> m = new HashMap<Path, InputFormat>(); String[] pathMappings = conf.get(MRConfigurationNames.MR_INPUT_MULTIPLEINPUTS_DIR_FORMATS).split(","); for (String pathMapping : pathMappings) { String[] split = pathMapping.s...
static Map<Path, InputFormat> getInputFormatMap(JobConf conf) { Map<Path, InputFormat> m = new HashMap<Path, InputFormat>(); String[] pathMappings = conf.get(MRConfigurationNames.MR_INPUT_MULTIPLEINPUTS_DIR_FORMATS).split(","); for (String pathMapping : pathMappings) { String[] split = pathMapping.split(";"); InputForm...
/** * Retrieves a map of {@link Path}s to the {@link InputFormat} class * that should be used for them. * * @param conf The confuration of the job * @see #addInputPath(JobConf, Path, Class) * @return A map of paths to inputformats for the job */
Retrieves a map of <code>Path</code>s to the <code>InputFormat</code> class that should be used for them
getInputFormatMap
{ "repo_name": "asurve/arvind-sysml", "path": "src/main/java/org/apache/sysml/runtime/matrix/data/hadoopfix/MultipleInputs.java", "license": "apache-2.0", "size": 4291 }
[ "java.util.HashMap", "java.util.Map", "org.apache.hadoop.fs.Path", "org.apache.hadoop.mapred.InputFormat", "org.apache.hadoop.mapred.JobConf", "org.apache.hadoop.util.ReflectionUtils", "org.apache.sysml.runtime.matrix.mapred.MRConfigurationNames" ]
import java.util.HashMap; import java.util.Map; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapred.InputFormat; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.util.ReflectionUtils; import org.apache.sysml.runtime.matrix.mapred.MRConfigurationNames;
import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.mapred.*; import org.apache.hadoop.util.*; import org.apache.sysml.runtime.matrix.mapred.*;
[ "java.util", "org.apache.hadoop", "org.apache.sysml" ]
java.util; org.apache.hadoop; org.apache.sysml;
1,584,764
frame = new JFrame(); frame.setBounds(700, 100, 212, 300); frame.getContentPane().setLayout(null);
frame = new JFrame(); frame.setBounds(700, 100, 212, 300); frame.getContentPane().setLayout(null);
/** * Initialize the contents of the frame. */
Initialize the contents of the frame
initialize
{ "repo_name": "pasali/UlakServer", "path": "src/com/pasali/ulakserver/ServerGUI.java", "license": "gpl-2.0", "size": 2018 }
[ "javax.swing.JFrame" ]
import javax.swing.JFrame;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,406,378
public String getProxyHost(FileSystemOptions opts) { return getString(opts, "proxyHost"); }
String function(FileSystemOptions opts) { return getString(opts, STR); }
/** * Get the proxy to use for http connection. * You have to set the ProxyPort too if you would like to have the proxy really used. * * @param opts The FileSystem options. * @return proxyHost * @see #setProxyPort */
Get the proxy to use for http connection. You have to set the ProxyPort too if you would like to have the proxy really used
getProxyHost
{ "repo_name": "raviu/wso2-commons-vfs", "path": "core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java", "license": "apache-2.0", "size": 8275 }
[ "org.apache.commons.vfs2.FileSystemOptions" ]
import org.apache.commons.vfs2.FileSystemOptions;
import org.apache.commons.vfs2.*;
[ "org.apache.commons" ]
org.apache.commons;
676,979
@SuppressWarnings("unchecked") public void setObservations(double[][] data) { totalObservations = data.length; bins = new int[dimensions]; mins = new double[dimensions]; multipliers = new int[dimensions]; int multiDimBins = 1; // If we are forcing n^2 comparisons, don't even consider using intege...
@SuppressWarnings(STR) void function(double[][] data) { totalObservations = data.length; bins = new int[dimensions]; mins = new double[dimensions]; multipliers = new int[dimensions]; int multiDimBins = 1; usingIntegerIndexBins = !forceCompareToAll; useBins = true; kernelVolumeInUse = 0; for (int d = 0; d < dimensions; ...
/** * Each row of the data is an observation; each column of * the row is a new variable in the multivariate observation. * * @param data */
Each row of the data is an observation; each column of the row is a new variable in the multivariate observation
setObservations
{ "repo_name": "jlizier/information-dynamics-toolkit", "path": "java/source/infodynamics/measures/continuous/kernel/KernelEstimatorMultiVariate.java", "license": "gpl-3.0", "size": 38679 }
[ "java.util.Hashtable", "java.util.Vector" ]
import java.util.Hashtable; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
708,108
@Operation(desc = "Reset all message counters history", impact = MBeanOperationInfo.ACTION) void resetAllMessageCounterHistories() throws Exception;
@Operation(desc = STR, impact = MBeanOperationInfo.ACTION) void resetAllMessageCounterHistories() throws Exception;
/** * Reset histories for all message counters. */
Reset histories for all message counters
resetAllMessageCounterHistories
{ "repo_name": "gaohoward/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java", "license": "apache-2.0", "size": 83324 }
[ "javax.management.MBeanOperationInfo" ]
import javax.management.MBeanOperationInfo;
import javax.management.*;
[ "javax.management" ]
javax.management;
1,925,364
ArtifactResolutionQuery withArtifacts(Class<? extends Component> componentType, Class<? extends Artifact>... artifactTypes);
ArtifactResolutionQuery withArtifacts(Class<? extends Component> componentType, Class<? extends Artifact>... artifactTypes);
/** * Defines the type of component that is expected in the result, and the artifacts to retrieve for components of this type. * * Presently, only a single component type and set of artifacts is permitted. * * @param componentType The expected type of the component. * @param artifactTypes ...
Defines the type of component that is expected in the result, and the artifacts to retrieve for components of this type. Presently, only a single component type and set of artifacts is permitted
withArtifacts
{ "repo_name": "gstevey/gradle", "path": "subprojects/core-api/src/main/java/org/gradle/api/artifacts/query/ArtifactResolutionQuery.java", "license": "apache-2.0", "size": 3049 }
[ "org.gradle.api.component.Artifact", "org.gradle.api.component.Component" ]
import org.gradle.api.component.Artifact; import org.gradle.api.component.Component;
import org.gradle.api.component.*;
[ "org.gradle.api" ]
org.gradle.api;
2,580,903
public Column getColumn( String sColName ) throws InvalidDatabufferDesc { List< String > colList = Arrays.asList( _asColName ); int iIndex = colList.indexOf( sColName ); if( iIndex == -1 ) { throw new InvalidDatabufferDesc( "column doesn't exist: " + sColName ); } return( _cols[ iIndex ] ); }
Column function( String sColName ) throws InvalidDatabufferDesc { List< String > colList = Arrays.asList( _asColName ); int iIndex = colList.indexOf( sColName ); if( iIndex == -1 ) { throw new InvalidDatabufferDesc( STR + sColName ); } return( _cols[ iIndex ] ); }
/** * Returns column by it's name * * @param sColName * the column name * * @return the column * * @throws InvalidDatabufferDesc */
Returns column by it's name
getColumn
{ "repo_name": "khomisha/databuffer", "path": "src/main/java/org/homedns/mkh/databuffer/DataBufferDesc.java", "license": "apache-2.0", "size": 10334 }
[ "java.util.Arrays", "java.util.List" ]
import java.util.Arrays; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,608,040
public ArrayList<String> cdn_dedicated_serviceName_quota_GET(String serviceName, OvhOrderQuotaEnum quota) throws IOException { String qPath = "/order/cdn/dedicated/{serviceName}/quota"; StringBuilder sb = path(qPath, serviceName); query(sb, "quota", quota); String resp = exec(qPath, "GET", sb.toString(), nul...
ArrayList<String> function(String serviceName, OvhOrderQuotaEnum quota) throws IOException { String qPath = STR; StringBuilder sb = path(qPath, serviceName); query(sb, "quota", quota); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t1); }
/** * Get allowed durations for 'quota' option * * REST: GET /order/cdn/dedicated/{serviceName}/quota * @param quota [required] quota number in TB that will be added to the CDN service * @param serviceName [required] The internal name of your CDN offer */
Get allowed durations for 'quota' option
cdn_dedicated_serviceName_quota_GET
{ "repo_name": "UrielCh/ovh-java-sdk", "path": "ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java", "license": "bsd-3-clause", "size": 511080 }
[ "java.io.IOException", "java.util.ArrayList", "net.minidev.ovh.api.cdnanycast.OvhOrderQuotaEnum" ]
import java.io.IOException; import java.util.ArrayList; import net.minidev.ovh.api.cdnanycast.OvhOrderQuotaEnum;
import java.io.*; import java.util.*; import net.minidev.ovh.api.cdnanycast.*;
[ "java.io", "java.util", "net.minidev.ovh" ]
java.io; java.util; net.minidev.ovh;
1,423,159
private boolean isSymlink(File base, String path) { return isSymlink(base, SelectorUtils.tokenizePath(path)); }
boolean function(File base, String path) { return isSymlink(base, SelectorUtils.tokenizePath(path)); }
/** * Do we have to traverse a symlink when trying to reach path from * basedir? * * @param base base File (dir). * @param path file path. */
Do we have to traverse a symlink when trying to reach path from basedir
isSymlink
{ "repo_name": "mtjandra/izpack", "path": "izpack-util/src/main/java/com/izforge/izpack/util/file/DirectoryScanner.java", "license": "apache-2.0", "size": 60319 }
[ "com.izforge.izpack.util.file.types.selectors.SelectorUtils", "java.io.File" ]
import com.izforge.izpack.util.file.types.selectors.SelectorUtils; import java.io.File;
import com.izforge.izpack.util.file.types.selectors.*; import java.io.*;
[ "com.izforge.izpack", "java.io" ]
com.izforge.izpack; java.io;
2,915,855
public void init() { try { resetSettings(); } catch (Exception e) { GunsmithLogger.getLogger().error(e, "Error setting up default player settings."); } }
void function() { try { resetSettings(); } catch (Exception e) { GunsmithLogger.getLogger().error(e, STR); } }
/** * Initializes the player. */
Initializes the player
init
{ "repo_name": "Featherblade/VoxelGunsmith", "path": "src/main/java/com/voxelplugineering/voxelsniper/entity/AbstractPlayer.java", "license": "mit", "size": 8707 }
[ "com.voxelplugineering.voxelsniper.GunsmithLogger" ]
import com.voxelplugineering.voxelsniper.GunsmithLogger;
import com.voxelplugineering.voxelsniper.*;
[ "com.voxelplugineering.voxelsniper" ]
com.voxelplugineering.voxelsniper;
1,029,415
public ArrayList<Element> getElementsByPosition(String type) { ArrayList<Element> resultList = new ArrayList<Element>(); for(Element elem : _elements) { if (!(elem instanceof Component)) continue; if (((Component)elem).getType().matches(type)) resultList.add(elem); } if (resultList.isEmp...
ArrayList<Element> function(String type) { ArrayList<Element> resultList = new ArrayList<Element>(); for(Element elem : _elements) { if (!(elem instanceof Component)) continue; if (((Component)elem).getType().matches(type)) resultList.add(elem); } if (resultList.isEmpty()) return null; return resultList; }
/** * Returns all {@link Element Elements} with the designated typename * * @param type typename * @return List of all Elements with typename */
Returns all <code>Element Elements</code> with the designated typename
getElementsByPosition
{ "repo_name": "Akkarin1212/BlitzEdit", "path": "src/blitzEdit/core/Circuit.java", "license": "mit", "size": 8593 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
381,367
protected void assembleArguments() throws MojoExecutionException { if (XhasMember) { ajcOptions.add("-XhasMember"); } // Add classpath ajcOptions.add("-classpath"); ajcOptions.add(AjcHelper.createClassPath(project, null, getClasspathDirectories())); ...
void function() throws MojoExecutionException { if (XhasMember) { ajcOptions.add(STR); } ajcOptions.add(STR); ajcOptions.add(AjcHelper.createClassPath(project, null, getClasspathDirectories())); if (null != bootclasspath) { ajcOptions.add(STR); ajcOptions.add(bootclasspath); } if (null != Xjoinpoints) { ajcOptions.add(...
/** * Assembles a complete ajc compiler arguments list. * * @throws MojoExecutionException error in configuration */
Assembles a complete ajc compiler arguments list
assembleArguments
{ "repo_name": "lukasniemeier-zalando/aspectj-maven-plugin", "path": "src/main/java/de/zalando/mojo/aspectj/AbstractAjcCompiler.java", "license": "mit", "size": 32764 }
[ "java.io.File", "java.util.Map", "org.apache.maven.plugin.MojoExecutionException", "org.codehaus.plexus.util.StringUtils" ]
import java.io.File; import java.util.Map; import org.apache.maven.plugin.MojoExecutionException; import org.codehaus.plexus.util.StringUtils;
import java.io.*; import java.util.*; import org.apache.maven.plugin.*; import org.codehaus.plexus.util.*;
[ "java.io", "java.util", "org.apache.maven", "org.codehaus.plexus" ]
java.io; java.util; org.apache.maven; org.codehaus.plexus;
1,814,644
protected void update() { ZDebug.print( 4, "update()" ); LinkedList< IRule > rules = new LinkedList< IRule >(); this.setDefaultReturnToken( getTokenForPreference( Preference.COLOUR_DEFAULT ) ); // Add whitespace matcher rules.add( new WhitespaceRule( new Whit...
void function() { ZDebug.print( 4, STR ); LinkedList< IRule > rules = new LinkedList< IRule >(); this.setDefaultReturnToken( getTokenForPreference( Preference.COLOUR_DEFAULT ) ); rules.add( new WhitespaceRule( new WhiteSpaceDetector() ) ); WordRule variableRule = new WordRule( new VariableDetecter(), getTokenForPrefere...
/** * This method is called when the we need to recreate the scanning rules. * It is called when the scanner is created and when colour preferences * change. */
This method is called when the we need to recreate the scanning rules. It is called when the scanner is created and when colour preferences change
update
{ "repo_name": "jthackray/vTM-eclipse", "path": "plugin/src/com/zeus/eclipsePlugin/editor/presentation/TrafficScriptCodeScanner.java", "license": "bsd-3-clause", "size": 3670 }
[ "com.zeus.eclipsePlugin.ZDebug", "com.zeus.eclipsePlugin.consts.Preference", "java.util.LinkedList", "org.eclipse.jface.text.rules.IRule", "org.eclipse.jface.text.rules.WhitespaceRule", "org.eclipse.jface.text.rules.WordRule" ]
import com.zeus.eclipsePlugin.ZDebug; import com.zeus.eclipsePlugin.consts.Preference; import java.util.LinkedList; import org.eclipse.jface.text.rules.IRule; import org.eclipse.jface.text.rules.WhitespaceRule; import org.eclipse.jface.text.rules.WordRule;
import com.zeus.*; import java.util.*; import org.eclipse.jface.text.rules.*;
[ "com.zeus", "java.util", "org.eclipse.jface" ]
com.zeus; java.util; org.eclipse.jface;
424,924
private void sendResponse( String status, String mime, Properties header, InputStream data , boolean isStreaming) { try { if ( status == null ) throw new Error( "sendResponse(): Status can't be null." ); OutputStream out = mySocket.getOutputStream(); PrintWriter pw = new PrintWriter( out ...
void function( String status, String mime, Properties header, InputStream data , boolean isStreaming) { try { if ( status == null ) throw new Error( STR ); OutputStream out = mySocket.getOutputStream(); PrintWriter pw = new PrintWriter( out ); pw.print(STR + status + STR); if ( mime != null ) pw.print(STR + mime + "\r\...
/** * Sends given response to the socket. */
Sends given response to the socket
sendResponse
{ "repo_name": "Z-app/zmote", "path": "src/se/z_app/httpserver/NanoHTTPD.java", "license": "bsd-2-clause", "size": 34368 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "java.io.PrintWriter", "java.net.Socket", "java.util.Date", "java.util.Enumeration", "java.util.Properties" ]
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.net.Socket; import java.util.Date; import java.util.Enumeration; import java.util.Properties;
import java.io.*; import java.net.*; import java.util.*;
[ "java.io", "java.net", "java.util" ]
java.io; java.net; java.util;
2,185,758
static String getSelectInnerJoin(String[] tables, String[][] columns, String[] join, String selection, String[] selectionArgs, String order) { StringBuffer cmdBuffer = new StringBuffer( "SELECT " ); // check arguments are correct if ( tables.length != 2 ) { Logger.w("getSelectInnerJoin invalid numbe...
static String getSelectInnerJoin(String[] tables, String[][] columns, String[] join, String selection, String[] selectionArgs, String order) { StringBuffer cmdBuffer = new StringBuffer( STR ); if ( tables.length != 2 ) { Logger.w(STR + tables.length); throw new IllegalArgumentException(); } if ( columns.length != 2 ) {...
/** * Generates an SQL 'SELECT INNER JOIN' command. * @param tables Tables to select from * @param columns Columns to select from tables * @param join Columns to join on * @param selection A selection criteria to apply when filtering rows. If null then all rows are included. * @param selectionArgs You ...
Generates an SQL 'SELECT INNER JOIN' command
getSelectInnerJoin
{ "repo_name": "ibuttimer/pmat", "path": "PoorManAccountTracker/src/ie/ibuttimer/pmat/db/SQLiteCommandFactory.java", "license": "apache-2.0", "size": 27995 }
[ "android.text.TextUtils", "ie.ibuttimer.pmat.util.Logger" ]
import android.text.TextUtils; import ie.ibuttimer.pmat.util.Logger;
import android.text.*; import ie.ibuttimer.pmat.util.*;
[ "android.text", "ie.ibuttimer.pmat" ]
android.text; ie.ibuttimer.pmat;
79,347
public HttpRequestBase getLogCollectionMethod(String serviceUrl, String datasetId, Boolean forMosaicService) throws URISyntaxException { HttpGet method = new HttpGet(); URIBuilder builder= new URIBuilder(urlPathConcat(serviceUrl, "getLogCollection.html")); //set all of the parameters ...
HttpRequestBase function(String serviceUrl, String datasetId, Boolean forMosaicService) throws URISyntaxException { HttpGet method = new HttpGet(); URIBuilder builder= new URIBuilder(urlPathConcat(serviceUrl, STR)); builder.setParameter(STR, datasetId); if (forMosaicService != null) { builder.setParameter(STR, forMosai...
/** * Generates a method for making a request for all NVCL logged elements that belong to a particular dataset * @param serviceUrl The URL of the NVCLDataService * @param datasetId The dataset ID to query * @param forMosaicService [Optional] indicates if the getLogCollection service should gener...
Generates a method for making a request for all NVCL logged elements that belong to a particular dataset
getLogCollectionMethod
{ "repo_name": "joshvote/webgl-sprint", "path": "src/main/java/au/csiro/domain/nvcldataservice/NVCLDataServiceMethodMaker.java", "license": "mit", "size": 13276 }
[ "java.net.URISyntaxException", "org.apache.http.client.methods.HttpGet", "org.apache.http.client.methods.HttpRequestBase", "org.apache.http.client.utils.URIBuilder" ]
import java.net.URISyntaxException; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.client.utils.URIBuilder;
import java.net.*; import org.apache.http.client.methods.*; import org.apache.http.client.utils.*;
[ "java.net", "org.apache.http" ]
java.net; org.apache.http;
1,766,771
@Test public void getGroupSecurityNameWithInvalidUniqueName() throws Exception { String group = "invalid"; Log.info(c, "getGroupSecurityNameWithUniqueName", "Checking with an invalid group."); expectedException.expect(EntryNotFoundException.class); expectedException.expectMessag...
void function() throws Exception { String group = STR; Log.info(c, STR, STR); expectedException.expect(EntryNotFoundException.class); expectedException.expectMessage(STR); servlet.getGroupSecurityName(group); }
/** * Hit the test servlet to see if getGroupSecurityName works when supplied with an invalid group (InvalidUniqueName) * This verifies the various required bundles got installed and are working. */
Hit the test servlet to see if getGroupSecurityName works when supplied with an invalid group (InvalidUniqueName) This verifies the various required bundles got installed and are working
getGroupSecurityNameWithInvalidUniqueName
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.security.wim.adapter.ldap_fat/fat/src/com/ibm/ws/security/wim/adapter/ldap/fat/URAPIs_SUNLDAPTest.java", "license": "epl-1.0", "size": 33239 }
[ "com.ibm.websphere.simplicity.log.Log", "com.ibm.ws.security.registry.EntryNotFoundException" ]
import com.ibm.websphere.simplicity.log.Log; import com.ibm.ws.security.registry.EntryNotFoundException;
import com.ibm.websphere.simplicity.log.*; import com.ibm.ws.security.registry.*;
[ "com.ibm.websphere", "com.ibm.ws" ]
com.ibm.websphere; com.ibm.ws;
2,537,389
@Test public void testAutoMaxParallelism() { int globalParallelism = 42; int mapParallelism = 17; int maxParallelism = 21; StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.setParallelism(globalParallelism); DataStream<Int...
void function() { int globalParallelism = 42; int mapParallelism = 17; int maxParallelism = 21; StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.setParallelism(globalParallelism); DataStream<Integer> source = env.fromElements(1, 2, 3); DataStream<Integer> keyedResult1 = source....
/** * Tests that the max parallelism is automatically set to the parallelism if it has not been * specified. */
Tests that the max parallelism is automatically set to the parallelism if it has not been specified
testAutoMaxParallelism
{ "repo_name": "aljoscha/flink", "path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/api/graph/StreamGraphGeneratorTest.java", "license": "apache-2.0", "size": 27080 }
[ "org.apache.flink.streaming.api.datastream.DataStream", "org.apache.flink.streaming.api.environment.StreamExecutionEnvironment", "org.apache.flink.streaming.api.functions.sink.DiscardingSink", "org.apache.flink.streaming.util.NoOpIntMap", "org.junit.Assert" ]
import org.apache.flink.streaming.api.datastream.DataStream; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.functions.sink.DiscardingSink; import org.apache.flink.streaming.util.NoOpIntMap; import org.junit.Assert;
import org.apache.flink.streaming.api.datastream.*; import org.apache.flink.streaming.api.environment.*; import org.apache.flink.streaming.api.functions.sink.*; import org.apache.flink.streaming.util.*; import org.junit.*;
[ "org.apache.flink", "org.junit" ]
org.apache.flink; org.junit;
1,005,251
public static void configureDB(Configuration conf, String driverClass, String dbUrl, String userName, String passwd, Integer fetchSize) { configureDB(conf, driverClass, dbUrl, userName, passwd, fetchSize, (Properties) null); }
static void function(Configuration conf, String driverClass, String dbUrl, String userName, String passwd, Integer fetchSize) { configureDB(conf, driverClass, dbUrl, userName, passwd, fetchSize, (Properties) null); }
/** * Sets the DB access related fields in the {@link Configuration}. * @param conf the configuration * @param driverClass JDBC Driver class name * @param dbUrl JDBC DB access URL * @param userName DB access username * @param passwd DB access passwd * @param fetchSize DB fetch size */
Sets the DB access related fields in the <code>Configuration</code>
configureDB
{ "repo_name": "cloudbow/sqoop-couchbase-pass-fix", "path": "src/java/org/apache/sqoop/mapreduce/db/DBConfiguration.java", "license": "apache-2.0", "size": 16055 }
[ "java.util.Properties", "org.apache.hadoop.conf.Configuration" ]
import java.util.Properties; import org.apache.hadoop.conf.Configuration;
import java.util.*; import org.apache.hadoop.conf.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,236,617
public BufferedReader getReader() throws IOException { return this.request.getReader(); }
BufferedReader function() throws IOException { return this.request.getReader(); }
/** * The default behavior of this method is to return getReader() * on the wrapped request object. */
The default behavior of this method is to return getReader() on the wrapped request object
getReader
{ "repo_name": "jboss/jboss-servlet-api_spec", "path": "src/main/java/javax/servlet/ServletRequestWrapper.java", "license": "gpl-2.0", "size": 17902 }
[ "java.io.BufferedReader", "java.io.IOException" ]
import java.io.BufferedReader; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,876,909
private void processResultSet(final ResultSet resultSet) throws SQLException { final StringBuilder output = new StringBuilder(); while (resultSet.next()) { log.debug("resultSet = {}", resultSet); final String rowAsString = processRow(resultSet); log.info("row...
void function(final ResultSet resultSet) throws SQLException { final StringBuilder output = new StringBuilder(); while (resultSet.next()) { log.debug(STR, resultSet); final String rowAsString = processRow(resultSet); log.info(STR, rowAsString); output.append(rowAsString); } }
/** * Handle result set. * * @param resultSet the result set * @throws SQLException the SQL exception */
Handle result set
processResultSet
{ "repo_name": "Martin-Spamer/java-coaching", "path": "src/main/java/coaching/jdbc/JdbcBase.java", "license": "gpl-3.0", "size": 7086 }
[ "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,076,293
private Class<?> createClass(Enhancer enhancer) { Class<?> subclass = enhancer.createClass(); // Registering callbacks statically (as opposed to thread-local) // is critical for usage in an OSGi environment (SPR-5932)... Enhancer.registerStaticCallbacks(subclass, CALLBACKS); return subclass; } public...
Class<?> function(Enhancer enhancer) { Class<?> subclass = enhancer.createClass(); Enhancer.registerStaticCallbacks(subclass, CALLBACKS); return subclass; } public interface EnhancedConfiguration extends BeanFactoryAware { } private interface ConditionalCallback extends Callback {
/** * Uses enhancer to generate a subclass of superclass, * ensuring that callbacks are registered for the new subclass. */
Uses enhancer to generate a subclass of superclass, ensuring that callbacks are registered for the new subclass
createClass
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/spring/org/springframework/context/annotation/ConfigurationClassEnhancer.java", "license": "gpl-2.0", "size": 23833 }
[ "org.springframework.beans.factory.BeanFactoryAware", "org.springframework.cglib.proxy.Callback", "org.springframework.cglib.proxy.Enhancer" ]
import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.cglib.proxy.Callback; import org.springframework.cglib.proxy.Enhancer;
import org.springframework.beans.factory.*; import org.springframework.cglib.proxy.*;
[ "org.springframework.beans", "org.springframework.cglib" ]
org.springframework.beans; org.springframework.cglib;
1,566,900
public static boolean startupEnvironment (boolean isClient) { startup(isClient); // returns if already initiated if (!DB.isConnected()) { log.severe ("No Database"); return false; } MSystem system = MSystem.get(Env.getCtx()); // Initializes Base Context too if (system == null) ...
static boolean function (boolean isClient) { startup(isClient); if (!DB.isConnected()) { log.severe (STR); return false; } MSystem system = MSystem.get(Env.getCtx()); if (system == null) return false; ModelValidationEngine.get(); try { String className = system.getEncryptionKey(); if (className == null className.length...
/** * Startup Adempiere Environment. * Automatically called for Server connections * For testing call this method. * @param isClient true if client connection * @return successful startup */
Startup Adempiere Environment. Automatically called for Server connections For testing call this method
startupEnvironment
{ "repo_name": "neuroidss/adempiere", "path": "base/src/org/compiere/Adempiere.java", "license": "gpl-2.0", "size": 17859 }
[ "org.compiere.model.MClient", "org.compiere.model.MSystem", "org.compiere.model.ModelValidationEngine", "org.compiere.util.DB", "org.compiere.util.Env", "org.compiere.util.SecureEngine", "org.compiere.util.SecureInterface" ]
import org.compiere.model.MClient; import org.compiere.model.MSystem; import org.compiere.model.ModelValidationEngine; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.SecureEngine; import org.compiere.util.SecureInterface;
import org.compiere.model.*; import org.compiere.util.*;
[ "org.compiere.model", "org.compiere.util" ]
org.compiere.model; org.compiere.util;
2,747,387
NotificationFilterSupport f = new NotificationFilterSupport(); assertEquals("No one notification type should be enabled!", 0, f .getEnabledTypes().size()); assertTrue("The instance should be serializable!", (Serializable.class .isAssignableFrom(f.getClass()))); }
NotificationFilterSupport f = new NotificationFilterSupport(); assertEquals(STR, 0, f .getEnabledTypes().size()); assertTrue(STR, (Serializable.class .isAssignableFrom(f.getClass()))); }
/** * Test for the constructor NotificationFilterSupport() * * @see javax.management.NotificationFilterSupport#NotificationFilterSupport() */
Test for the constructor NotificationFilterSupport()
testNotificationFilterSupport
{ "repo_name": "freeVM/freeVM", "path": "enhanced/buildtest/tests/functional/src/test/functional/org/apache/harmony/test/func/api/javax/management/NotificationFilterSupportTest.java", "license": "apache-2.0", "size": 8850 }
[ "java.io.Serializable", "javax.management.NotificationFilterSupport" ]
import java.io.Serializable; import javax.management.NotificationFilterSupport;
import java.io.*; import javax.management.*;
[ "java.io", "javax.management" ]
java.io; javax.management;
1,691,901
@Override public List<Entry<StringItem, StringItem>> extractPairs( StringItem[] dataSet, double threshold) { validation(dataSet, threshold, useSortAtExtractPairs); double coeff = threshold / (1 + threshold); List<Entry<StringItem, StringItem>> S = new ArrayList<Entry<StringItem, StringItem>>(); Str...
List<Entry<StringItem, StringItem>> function( StringItem[] dataSet, double threshold) { validation(dataSet, threshold, useSortAtExtractPairs); double coeff = threshold / (1 + threshold); List<Entry<StringItem, StringItem>> S = new ArrayList<Entry<StringItem, StringItem>>(); StringLinkedInvertedIndex index = new StringL...
/** * extract similarity data-pairs in StringItem Type of dataSet.</br> This * method extracts all similarity data-pairs with other than threshold.</br> * And this is exact similarity search, but not approximate search.such as * LSH </br> * * @param dataSet * @param threshold * @return */
extract similarity data-pairs in StringItem Type of dataSet. This method extracts all similarity data-pairs with other than threshold. And this is exact similarity search, but not approximate search.such as LSH
extractPairs
{ "repo_name": "mommi84/ppjoin-handler", "path": "src/main/java/jp/ndca/similarity/join/PPJoin.java", "license": "gpl-3.0", "size": 47577 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,019,157
public String doDeleteFilter( HttpServletRequest request ) throws AccessDeniedException { if ( !SecurityTokenService.getInstance( ).validate( request, TEMPLATE_MODIFY_MAILINGLIST ) ) { throw new AccessDeniedException( ERROR_INVALID_TOKEN ); } String strId = request.g...
String function( HttpServletRequest request ) throws AccessDeniedException { if ( !SecurityTokenService.getInstance( ).validate( request, TEMPLATE_MODIFY_MAILINGLIST ) ) { throw new AccessDeniedException( ERROR_INVALID_TOKEN ); } String strId = request.getParameter( PARAMETER_MAILINGLIST_ID ); String strWorkgroup = req...
/** * Process the data capture form to remove users filters * * @param request * The HTTP Request * @return The Jsp URL of the process result * @throws AccessDeniedException * if the security token is invalid */
Process the data capture form to remove users filters
doDeleteFilter
{ "repo_name": "lutece-platform/lutece-core", "path": "src/java/fr/paris/lutece/portal/web/mailinglist/MailingListJspBean.java", "license": "bsd-3-clause", "size": 22936 }
[ "fr.paris.lutece.portal.business.mailinglist.MailingListHome", "fr.paris.lutece.portal.business.mailinglist.MailingListUsersFilter", "fr.paris.lutece.portal.service.admin.AccessDeniedException", "fr.paris.lutece.portal.service.security.SecurityTokenService", "fr.paris.lutece.util.url.UrlItem", "javax.serv...
import fr.paris.lutece.portal.business.mailinglist.MailingListHome; import fr.paris.lutece.portal.business.mailinglist.MailingListUsersFilter; import fr.paris.lutece.portal.service.admin.AccessDeniedException; import fr.paris.lutece.portal.service.security.SecurityTokenService; import fr.paris.lutece.util.url.UrlItem; ...
import fr.paris.lutece.portal.business.mailinglist.*; import fr.paris.lutece.portal.service.admin.*; import fr.paris.lutece.portal.service.security.*; import fr.paris.lutece.util.url.*; import javax.servlet.http.*;
[ "fr.paris.lutece", "javax.servlet" ]
fr.paris.lutece; javax.servlet;
2,608,470
void initializePartnerLinks(Long parentScopeId, Collection<? extends PartnerLinkModel> partnerLinks);
void initializePartnerLinks(Long parentScopeId, Collection<? extends PartnerLinkModel> partnerLinks);
/** * Initializes endpoint references for partner links inside a scope. * @param parentScopeId * @param partnerLinks */
Initializes endpoint references for partner links inside a scope
initializePartnerLinks
{ "repo_name": "aaronanderson/ode", "path": "bpel-api/src/main/java/org/apache/ode/bpel/rapi/VariableContext.java", "license": "apache-2.0", "size": 5112 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
691,776
static public void checkStrContainsSubStr(String str, String subStr){ if(!str.contains(subStr)){ fail("String '"+ subStr + "' is not a substring of '" + str + "'"); } }
static void function(String str, String subStr){ if(!str.contains(subStr)){ fail(STR+ subStr + STR + str + "'"); } }
/** * Check if subStr is a subString of str . calls org.junit.Assert.fail if it is not * @param str * @param subStr */
Check if subStr is a subString of str . calls org.junit.Assert.fail if it is not
checkStrContainsSubStr
{ "repo_name": "Altiscale/pig", "path": "test/org/apache/pig/test/Util.java", "license": "apache-2.0", "size": 51333 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,910,658
SocketAddress getAddress();
SocketAddress getAddress();
/** * Returns the socket address of this endpoint. * * @return socket address. */
Returns the socket address of this endpoint
getAddress
{ "repo_name": "apache/httpcore", "path": "httpcore5/src/main/java/org/apache/hc/core5/reactor/ListenerEndpoint.java", "license": "apache-2.0", "size": 1914 }
[ "java.net.SocketAddress" ]
import java.net.SocketAddress;
import java.net.*;
[ "java.net" ]
java.net;
93,771
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLTransitiveObjectPropertyAxiomImpl instance) throws SerializationException { deserialize(streamReader, instance); }
void function(SerializationStreamReader streamReader, OWLTransitiveObjectPropertyAxiomImpl instance) throws SerializationException { deserialize(streamReader, instance); }
/** * Deserializes the content of the object from the * {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. * * @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the * object's content from * @param instance ...
Deserializes the content of the object from the <code>com.google.gwt.user.client.rpc.SerializationStreamReader</code>
deserializeInstance
{ "repo_name": "matthewhorridge/owlapi-gwt", "path": "owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLTransitiveObjectPropertyAxiomImpl_CustomFieldSerializer.java", "license": "lgpl-3.0", "size": 4714 }
[ "com.google.gwt.user.client.rpc.SerializationException", "com.google.gwt.user.client.rpc.SerializationStreamReader" ]
import com.google.gwt.user.client.rpc.SerializationException; import com.google.gwt.user.client.rpc.SerializationStreamReader;
import com.google.gwt.user.client.rpc.*;
[ "com.google.gwt" ]
com.google.gwt;
1,869,516
public B duration(ReadableDuration d) { return set("duration", d); }
B function(ReadableDuration d) { return set(STR, d); }
/** * Set the duration as a Joda-Time Duration * @param d Duration * @return B **/
Set the duration as a Joda-Time Duration
duration
{ "repo_name": "worldline-messaging/activitystreams", "path": "core/src/main/java/com/ibm/common/activitystreams/ASObject.java", "license": "apache-2.0", "size": 65559 }
[ "org.joda.time.ReadableDuration" ]
import org.joda.time.ReadableDuration;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
2,266,746
public Observable<ServiceResponse<FlowLogInformationInner>> beginSetFlowLogConfigurationWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroup...
Observable<ServiceResponse<FlowLogInformationInner>> function(String resourceGroupName, String networkWatcherName, FlowLogInformationInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (networkWatcherName == null) { throw new IllegalArgumentException(STR); } if (this.clien...
/** * Configures flow log on a specified resource. * * @param resourceGroupName The name of the network watcher resource group. * @param networkWatcherName The name of the network watcher resource. * @param parameters Parameters that define the configuration of flow log. * @throws IllegalA...
Configures flow log on a specified resource
beginSetFlowLogConfigurationWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java", "license": "mit", "size": 171166 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,168,639
@Message(id = 171, value = "Bean %s does not have a Home interface") IllegalStateException beanHomeInterfaceIsNull(String componentName);
@Message(id = 171, value = STR) IllegalStateException beanHomeInterfaceIsNull(String componentName);
/** * Creates an exception indicating the bean home interface was not set * * @return a {@link IllegalStateException} for the error. */
Creates an exception indicating the bean home interface was not set
beanHomeInterfaceIsNull
{ "repo_name": "xasx/wildfly", "path": "ejb3/src/main/java/org/jboss/as/ejb3/logging/EjbLogger.java", "license": "lgpl-2.1", "size": 147231 }
[ "org.jboss.logging.annotations.Message" ]
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.*;
[ "org.jboss.logging" ]
org.jboss.logging;
49,761
public int doEndTag() throws JspException { // Clean up our started state started = false; iterator = null; // Continue processing this page return (EVAL_PAGE); }
int function() throws JspException { started = false; iterator = null; return (EVAL_PAGE); }
/** * Clean up after processing this enumeration. * * @throws JspException if a JSP exception has occurred */
Clean up after processing this enumeration
doEndTag
{ "repo_name": "davcamer/clients", "path": "projects-for-testing/struts/taglib/src/main/java/org/apache/struts/taglib/logic/IterateTag.java", "license": "apache-2.0", "size": 12290 }
[ "javax.servlet.jsp.JspException" ]
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.*;
[ "javax.servlet" ]
javax.servlet;
745,011
public void parseStyleSheet( InputSource source ) throws CSSException, IOException { this.source = source; ReInit( getCharStreamWithLurk( source ) ); if ( selectorFactory == null ) { selectorFactory = new SelectorFactoryImpl(); } if ( conditionFactory == null ) { conditionFactory =...
void function( InputSource source ) throws CSSException, IOException { this.source = source; ReInit( getCharStreamWithLurk( source ) ); if ( selectorFactory == null ) { selectorFactory = new SelectorFactoryImpl(); } if ( conditionFactory == null ) { conditionFactory = new ConditionFactoryImpl(); } parserUnit(); }
/** * Main parse methods * * @param source the source of the style sheet. * @throws IOException the source can't be parsed. * @throws CSSException the source is not CSS valid. */
Main parse methods
parseStyleSheet
{ "repo_name": "EgorZhuk/pentaho-reporting", "path": "libraries/flute/src/main/java/org/w3c/flute/parser/Parser.java", "license": "lgpl-2.1", "size": 111660 }
[ "java.io.IOException", "org.w3c.css.sac.CSSException", "org.w3c.css.sac.InputSource", "org.w3c.flute.parser.selectors.ConditionFactoryImpl", "org.w3c.flute.parser.selectors.SelectorFactoryImpl" ]
import java.io.IOException; import org.w3c.css.sac.CSSException; import org.w3c.css.sac.InputSource; import org.w3c.flute.parser.selectors.ConditionFactoryImpl; import org.w3c.flute.parser.selectors.SelectorFactoryImpl;
import java.io.*; import org.w3c.css.sac.*; import org.w3c.flute.parser.selectors.*;
[ "java.io", "org.w3c.css", "org.w3c.flute" ]
java.io; org.w3c.css; org.w3c.flute;
466,861
public static void parseRecipesAddToGit(String owner, String repoName, Experiment experimentContext) throws KaramelException { try { StringBuilder kitchenContents = CookbookGenerator.instantiateFromTemplate( Settings.CB_TEMPLATE_KITCHEN_YML, "name", repoName ); Github...
static void function(String owner, String repoName, Experiment experimentContext) throws KaramelException { try { StringBuilder kitchenContents = CookbookGenerator.instantiateFromTemplate( Settings.CB_TEMPLATE_KITCHEN_YML, "name", repoName ); GithubApi.addFile(owner, repoName, STR, kitchenContents.toString()); List<Cod...
/** * Parses the user-defined script files and for each script, a recipe file is generated and added to the git repo. * * @param owner * @param repoName * @param experimentContext * @throws se.kth.karamel.common.exception.KaramelException * @throws KaramelExceptionntents.toString()); // Update Kara...
Parses the user-defined script files and for each script, a recipe file is generated and added to the git repo
parseRecipesAddToGit
{ "repo_name": "karamelchef/karamel", "path": "karamel-core/src/main/java/se/kth/karamel/backend/github/util/ChefExperimentExtractor.java", "license": "apache-2.0", "size": 12535 }
[ "java.io.File", "java.util.HashMap", "java.util.HashSet", "java.util.List", "java.util.Map", "java.util.Set", "se.kth.karamel.backend.Experiment", "se.kth.karamel.backend.github.GithubApi", "se.kth.karamel.common.exception.KaramelException", "se.kth.karamel.common.util.Settings" ]
import java.io.File; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import se.kth.karamel.backend.Experiment; import se.kth.karamel.backend.github.GithubApi; import se.kth.karamel.common.exception.KaramelException; import se.kth.karamel.common.util...
import java.io.*; import java.util.*; import se.kth.karamel.backend.*; import se.kth.karamel.backend.github.*; import se.kth.karamel.common.exception.*; import se.kth.karamel.common.util.*;
[ "java.io", "java.util", "se.kth.karamel" ]
java.io; java.util; se.kth.karamel;
2,622,926
public boolean supportsExpressionsInOrderBy() throws SQLException { return true; }
boolean function() throws SQLException { return true; }
/** * Are expressions in "ORDER BY" lists supported? * * @return true if so * @throws SQLException DOCUMENT ME! */
Are expressions in "ORDER BY" lists supported
supportsExpressionsInOrderBy
{ "repo_name": "hongliangpan/manydesigns.cn", "path": "trunk/portofino-database/mysql.src/com/mysql/jdbc/DatabaseMetaData.java", "license": "lgpl-3.0", "size": 275823 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,356,962
public BaseObject getWatchListObject(String user, XWikiContext context) throws XWikiException { XWikiDocument userDocument = context.getWiki().getDocument(user, context); if (userDocument.isNew() || userDocument.getObject(USERS_CLASS) == null) { throw new XWikiException(XWikiExceptio...
BaseObject function(String user, XWikiContext context) throws XWikiException { XWikiDocument userDocument = context.getWiki().getDocument(user, context); if (userDocument.isNew() userDocument.getObject(USERS_CLASS) == null) { throw new XWikiException(XWikiException.MODULE_XWIKI_PLUGINS, XWikiException.ERROR_XWIKI_UNKNO...
/** * Gets the WatchList XWiki Object from user's profile's page. * * @param user XWiki User * @param context Context of the request * @return the WatchList XWiki BaseObject * @throws XWikiException if BaseObject creation fails or if user does not exists */
Gets the WatchList XWiki Object from user's profile's page
getWatchListObject
{ "repo_name": "pbondoer/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-legacy/xwiki-platform-legacy-watchlist-api/src/main/java/com/xpn/xwiki/plugin/watchlist/WatchListStore.java", "license": "lgpl-2.1", "size": 12207 }
[ "com.xpn.xwiki.XWikiContext", "com.xpn.xwiki.XWikiException", "com.xpn.xwiki.doc.XWikiDocument", "com.xpn.xwiki.objects.BaseObject" ]
import com.xpn.xwiki.XWikiContext; import com.xpn.xwiki.XWikiException; import com.xpn.xwiki.doc.XWikiDocument; import com.xpn.xwiki.objects.BaseObject;
import com.xpn.xwiki.*; import com.xpn.xwiki.doc.*; import com.xpn.xwiki.objects.*;
[ "com.xpn.xwiki" ]
com.xpn.xwiki;
1,015
public static void close(@Nullable SelectionKey rsrc, @Nullable IgniteLogger log) { if (rsrc != null) // This apply will automatically deregister the selection key as well. close(rsrc.channel(), log); }
static void function(@Nullable SelectionKey rsrc, @Nullable IgniteLogger log) { if (rsrc != null) close(rsrc.channel(), log); }
/** * Closes given resource logging possible checked exceptions. * * @param rsrc Resource to close. If it's {@code null} - it's no-op. * @param log Logger to log possible checked exception with (optional). */
Closes given resource logging possible checked exceptions
close
{ "repo_name": "murador/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 294985 }
[ "java.nio.channels.SelectionKey", "org.apache.ignite.IgniteLogger", "org.jetbrains.annotations.Nullable" ]
import java.nio.channels.SelectionKey; import org.apache.ignite.IgniteLogger; import org.jetbrains.annotations.Nullable;
import java.nio.channels.*; import org.apache.ignite.*; import org.jetbrains.annotations.*;
[ "java.nio", "org.apache.ignite", "org.jetbrains.annotations" ]
java.nio; org.apache.ignite; org.jetbrains.annotations;
1,945,075
public static Path leftShift(Path self, Object text) throws IOException { append(self, text); return self; }
static Path function(Path self, Object text) throws IOException { append(self, text); return self; }
/** * Write the text to the Path. * * @param self a Path * @param text the text to write to the Path * @return the original file * @throws java.io.IOException if an IOException occurs. * @since 2.3.0 */
Write the text to the Path
leftShift
{ "repo_name": "paulk-asert/groovy", "path": "subprojects/groovy-nio/src/main/java/org/apache/groovy/nio/extensions/NioExtensions.java", "license": "apache-2.0", "size": 88073 }
[ "java.io.IOException", "java.nio.file.Path" ]
import java.io.IOException; import java.nio.file.Path;
import java.io.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,350,853
@Override public List<PartitionInfo> partitionsFor(String topic) { try { return waitOnMetadata(topic, null, maxBlockTimeMs).cluster.partitionsForTopic(topic); } catch (InterruptedException e) { throw new InterruptException(e); } }
List<PartitionInfo> function(String topic) { try { return waitOnMetadata(topic, null, maxBlockTimeMs).cluster.partitionsForTopic(topic); } catch (InterruptedException e) { throw new InterruptException(e); } }
/** * Get the partition metadata for the give topic. This can be used for custom partitioning. * @throws InterruptException If the thread is interrupted while blocked */
Get the partition metadata for the give topic. This can be used for custom partitioning
partitionsFor
{ "repo_name": "eribeiro/kafka", "path": "clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java", "license": "apache-2.0", "size": 45441 }
[ "java.util.List", "org.apache.kafka.common.PartitionInfo", "org.apache.kafka.common.errors.InterruptException" ]
import java.util.List; import org.apache.kafka.common.PartitionInfo; import org.apache.kafka.common.errors.InterruptException;
import java.util.*; import org.apache.kafka.common.*; import org.apache.kafka.common.errors.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
1,457,301
private boolean checkBarometer() { PackageManager packageManager = this.getPackageManager(); hasBarometer = packageManager .hasSystemFeature(PackageManager.FEATURE_SENSOR_BAROMETER); return hasBarometer; } private class ReadingSender implements Runnable {
boolean function() { PackageManager packageManager = this.getPackageManager(); hasBarometer = packageManager .hasSystemFeature(PackageManager.FEATURE_SENSOR_BAROMETER); return hasBarometer; } private class ReadingSender implements Runnable {
/** * Check if we have a barometer. Use info to disable menu items, choose to * run the service or not, etc. */
Check if we have a barometer. Use info to disable menu items, choose to run the service or not, etc
checkBarometer
{ "repo_name": "Cbsoftware/PressureNet-SDK", "path": "src/ca/cumulonimbus/pressurenetsdk/CbService.java", "license": "mit", "size": 67493 }
[ "android.content.pm.PackageManager" ]
import android.content.pm.PackageManager;
import android.content.pm.*;
[ "android.content" ]
android.content;
1,655,204
@SuppressWarnings("unchecked") @Override public int[] evaluate(String rec, String userid, String context){ RecommendationMapper recommendationMapper = new RecommendationMapper(); LOG.debug("Context String: " + context); int[] contentResult = null; try { contentResult = MultiRecContentTesting...
@SuppressWarnings(STR) int[] function(String rec, String userid, String context){ RecommendationMapper recommendationMapper = new RecommendationMapper(); LOG.debug(STR + context); int[] contentResult = null; try { contentResult = MultiRecContentTesting.multiRecContextTest(context); } catch (Exception e) { e.printStackT...
/** * Returns evaluations for the multi-recommendation case * <p> * * @param rec * @param userid * @param context * @return evaluations */
Returns evaluations for the multi-recommendation case
evaluate
{ "repo_name": "ubiquitous-computing-lab/Mining-Minds", "path": "service-curation-layer/recommendation-interpreter/src/main/java/org/uclab/scl/framework/RecInterpreter/PARecommender/MultipleRecEvaluator.java", "license": "apache-2.0", "size": 5621 }
[ "java.io.FileNotFoundException", "org.uclab.scl.datamodel.contextMapper.RecommendationMapper", "org.uclab.scl.framework.RecInterpreter" ]
import java.io.FileNotFoundException; import org.uclab.scl.datamodel.contextMapper.RecommendationMapper; import org.uclab.scl.framework.RecInterpreter;
import java.io.*; import org.uclab.scl.datamodel.*; import org.uclab.scl.framework.*;
[ "java.io", "org.uclab.scl" ]
java.io; org.uclab.scl;
1,844,598
public DataNode setGroup_index(IDataset group_index);
DataNode function(IDataset group_index);
/** * Unique ID for group. A group_index array * in ``NXdetector`` gives the base group for a detector element. * <p> * <b>Type:</b> NX_INT * <b>Dimensions:</b> 1: i; * </p> * * @param group_index the group_index */
Unique ID for group. A group_index array in ``NXdetector`` gives the base group for a detector element. Type: NX_INT Dimensions: 1: i;
setGroup_index
{ "repo_name": "jamesmudd/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXdetector_group.java", "license": "epl-1.0", "size": 5346 }
[ "org.eclipse.dawnsci.analysis.api.tree.DataNode", "org.eclipse.january.dataset.IDataset" ]
import org.eclipse.dawnsci.analysis.api.tree.DataNode; import org.eclipse.january.dataset.IDataset;
import org.eclipse.dawnsci.analysis.api.tree.*; import org.eclipse.january.dataset.*;
[ "org.eclipse.dawnsci", "org.eclipse.january" ]
org.eclipse.dawnsci; org.eclipse.january;
1,855,328
private void fillBuffer() throws IOException { bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); if (bytesRead == -1) buffer[0] = -1; } }
void function() throws IOException { bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); if (bytesRead == -1) buffer[0] = -1; } }
/** * Read data from the input stream into the buffer * @throws IOException if an I/O error occurs. */
Read data from the input stream into the buffer
fillBuffer
{ "repo_name": "darrensun/OJ-Solutions", "path": "src/com/darrensun/spoj/anarc05b/Main.java", "license": "apache-2.0", "size": 4358 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,872,286
public void publish(ServletContext context, @CheckForNull File home) { LOGGER.log(Level.SEVERE, "Failed to initialize Jenkins", this); WebApp.get(context).setApp(this); if (home == null) { return; } new GroovyHookScript("boot-failure", context, home, BootFailure....
void function(ServletContext context, @CheckForNull File home) { LOGGER.log(Level.SEVERE, STR, this); WebApp.get(context).setApp(this); if (home == null) { return; } new GroovyHookScript(STR, context, home, BootFailure.class.getClassLoader()) .bind(STR, this) .bind("home", home) .bind(STR, context) .bind(STR, loadAttem...
/** * Exposes this failure to UI and invoke the hook. * * @param home * JENKINS_HOME if it's already known. */
Exposes this failure to UI and invoke the hook
publish
{ "repo_name": "v1v/jenkins", "path": "core/src/main/java/hudson/util/BootFailure.java", "license": "mit", "size": 3119 }
[ "edu.umd.cs.findbugs.annotations.CheckForNull", "java.io.File", "java.util.logging.Level", "javax.servlet.ServletContext", "org.kohsuke.stapler.WebApp" ]
import edu.umd.cs.findbugs.annotations.CheckForNull; import java.io.File; import java.util.logging.Level; import javax.servlet.ServletContext; import org.kohsuke.stapler.WebApp;
import edu.umd.cs.findbugs.annotations.*; import java.io.*; import java.util.logging.*; import javax.servlet.*; import org.kohsuke.stapler.*;
[ "edu.umd.cs", "java.io", "java.util", "javax.servlet", "org.kohsuke.stapler" ]
edu.umd.cs; java.io; java.util; javax.servlet; org.kohsuke.stapler;
1,439,691
@Override public Stroke createStroke(Expression color, Expression width, Expression opacity) { return createStroke( color, width, opacity, filterFactory.literal("miter"), filterFactory.literal("butt"), null, ...
Stroke function(Expression color, Expression width, Expression opacity) { return createStroke( color, width, opacity, filterFactory.literal("miter"), filterFactory.literal("butt"), null, filterFactory.literal(0.0), null, null); }
/** * A convienice method to make a simple stroke * * @param color the color of the line * @param width The width of the line * @param opacity The opacity of the line * @return The stroke * @see org.geotools.stroke */
A convienice method to make a simple stroke
createStroke
{ "repo_name": "geotools/geotools", "path": "modules/library/main/src/main/java/org/geotools/styling/StyleFactoryImpl.java", "license": "lgpl-2.1", "size": 38233 }
[ "org.opengis.filter.expression.Expression" ]
import org.opengis.filter.expression.Expression;
import org.opengis.filter.expression.*;
[ "org.opengis.filter" ]
org.opengis.filter;
1,620,541
public static DisbursementPayee getPayeeFromPerson(Person person) { DisbursementPayee disbursementPayee = new DisbursementPayee(); disbursementPayee.setActive(person.isActive()); disbursementPayee.setPayeeIdNumber(person.getEmployeeId()); disbursementPayee.setPrincipalId(pers...
static DisbursementPayee function(Person person) { DisbursementPayee disbursementPayee = new DisbursementPayee(); disbursementPayee.setActive(person.isActive()); disbursementPayee.setPayeeIdNumber(person.getEmployeeId()); disbursementPayee.setPrincipalId(person.getPrincipalId()); disbursementPayee.setPayeeName(person.g...
/** * build a payee object from the given person object * * @param person the given person object * @return a payee object built from the given person object */
build a payee object from the given person object
getPayeeFromPerson
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/fp/businessobject/DisbursementPayee.java", "license": "agpl-3.0", "size": 15384 }
[ "java.text.MessageFormat", "org.kuali.kfs.sys.KFSConstants", "org.kuali.rice.kim.api.identity.Person" ]
import java.text.MessageFormat; import org.kuali.kfs.sys.KFSConstants; import org.kuali.rice.kim.api.identity.Person;
import java.text.*; import org.kuali.kfs.sys.*; import org.kuali.rice.kim.api.identity.*;
[ "java.text", "org.kuali.kfs", "org.kuali.rice" ]
java.text; org.kuali.kfs; org.kuali.rice;
2,406,918
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11") public void setRecalcstat(long value) { this.recalcstat = value; }
@Generated(value = STR, date = STR, comments = STR) void function(long value) { this.recalcstat = value; }
/** * Sets the value of the recalcstat property. * */
Sets the value of the recalcstat property
setRecalcstat
{ "repo_name": "kanonirov/lanb-client", "path": "src/main/java/ru/lanbilling/webservice/wsdl/SoapRecalcData.java", "license": "mit", "size": 7165 }
[ "javax.annotation.Generated" ]
import javax.annotation.Generated;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,780,006
public void addClassroom(Classroom classroom) { classroom.setSectionIdsection(this); this.classrooms.add(classroom); }
void function(Classroom classroom) { classroom.setSectionIdsection(this); this.classrooms.add(classroom); }
/** * Adds a bi-directional link of type Classroom to the classrooms set. * @param classroom item to add */
Adds a bi-directional link of type Classroom to the classrooms set
addClassroom
{ "repo_name": "rpgm/mi15", "path": "rpgm/modules/repository/src/main/java/org/yarlithub/yschool/repository/model/obj/yschool/Section.java", "license": "apache-2.0", "size": 9679 }
[ "org.yarlithub.yschool.repository.model.obj.yschool.Classroom" ]
import org.yarlithub.yschool.repository.model.obj.yschool.Classroom;
import org.yarlithub.yschool.repository.model.obj.yschool.*;
[ "org.yarlithub.yschool" ]
org.yarlithub.yschool;
2,738,714
@ApiMethod(name="photocases.list", path="photocases/") public Collection<PhotoCase> listAllPhotoCases(com.google.appengine.api.users.User user, HttpServletRequest req) throws UnauthorizedException { if (user == null) throw new UnauthorizedException("Client application is not authorized"); Collection<PhotoCas...
@ApiMethod(name=STR, path=STR) Collection<PhotoCase> function(com.google.appengine.api.users.User user, HttpServletRequest req) throws UnauthorizedException { if (user == null) throw new UnauthorizedException(STR); Collection<PhotoCase> result; String websitePath = req.getScheme() + ": PhotoCaseManager pcm = PhotoCaseM...
/** * Returns a list of all photo cases * @return */
Returns a list of all photo cases
listAllPhotoCases
{ "repo_name": "iordanis12590/mobilezeit", "path": "src/main/java/org/wahlzeit/api/PhotoCasesEndpoint.java", "license": "agpl-3.0", "size": 4223 }
[ "com.google.api.server.spi.config.ApiMethod", "com.google.api.server.spi.response.UnauthorizedException", "java.util.Arrays", "java.util.Collection", "java.util.HashSet", "javax.servlet.http.HttpServletRequest", "org.wahlzeit.model.PhotoCase", "org.wahlzeit.model.PhotoCaseManager" ]
import com.google.api.server.spi.config.ApiMethod; import com.google.api.server.spi.response.UnauthorizedException; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import javax.servlet.http.HttpServletRequest; import org.wahlzeit.model.PhotoCase; import org.wahlzeit.model.PhotoCaseManage...
import com.google.api.server.spi.config.*; import com.google.api.server.spi.response.*; import java.util.*; import javax.servlet.http.*; import org.wahlzeit.model.*;
[ "com.google.api", "java.util", "javax.servlet", "org.wahlzeit.model" ]
com.google.api; java.util; javax.servlet; org.wahlzeit.model;
2,373,738
public Collection<Relationship> getRelationships() { return relationships; }
Collection<Relationship> function() { return relationships; }
/** * The relationships of a person. * * @return The relationships of a person. */
The relationships of a person
getRelationships
{ "repo_name": "garyhodgson/enunciate", "path": "integration-tests/cxf-rest/src/main/samples/full/org/codehaus/enunciate/samples/genealogy/data/Person.java", "license": "apache-2.0", "size": 3594 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,434,918
protected static Vector vectorize(RenderedImage image) { if(image == null) { throw new IllegalArgumentException(JaiI18N.getString("OpImage3")); } Vector v = new Vector(1); v.addElement(image); return v; }
static Vector function(RenderedImage image) { if(image == null) { throw new IllegalArgumentException(JaiI18N.getString(STR)); } Vector v = new Vector(1); v.addElement(image); return v; }
/** * Stores a <code>RenderedImage</code> in a <code>Vector</code>. * * @param image The image to be stored in the <code>Vector</code>. * * @return A <code>Vector</code> containing the image. * * @throws IllegalArgumentException if <code>image</code> is * <code>null</code>. ...
Stores a <code>RenderedImage</code> in a <code>Vector</code>
vectorize
{ "repo_name": "AntonKast/LightZone", "path": "lightcrafts/extsrc/com/lightcrafts/mediax/jai/OpImage.java", "license": "bsd-3-clause", "size": 85808 }
[ "java.awt.image.RenderedImage", "java.util.Vector" ]
import java.awt.image.RenderedImage; import java.util.Vector;
import java.awt.image.*; import java.util.*;
[ "java.awt", "java.util" ]
java.awt; java.util;
2,855,234
public ManagedConnectionFactory getManagedConnectionFactory();
ManagedConnectionFactory function();
/** * Retrieve the managed connection factory for this pool. * * @return the managed connection factory */
Retrieve the managed connection factory for this pool
getManagedConnectionFactory
{ "repo_name": "ironjacamar/ironjacamar", "path": "core/impl/src/main/java/org/jboss/jca/core/connectionmanager/pool/api/Pool.java", "license": "lgpl-2.1", "size": 5769 }
[ "javax.resource.spi.ManagedConnectionFactory" ]
import javax.resource.spi.ManagedConnectionFactory;
import javax.resource.spi.*;
[ "javax.resource" ]
javax.resource;
787,795
@Nullable public IgniteInternalFuture<?> awaitFinishAckAsync(UUID rmtNodeId, long threadId) { if (finishSyncDisabled) return null; assert txFinishSync != null; return txFinishSync.awaitAckAsync(rmtNodeId, threadId); }
@Nullable IgniteInternalFuture<?> function(UUID rmtNodeId, long threadId) { if (finishSyncDisabled) return null; assert txFinishSync != null; return txFinishSync.awaitAckAsync(rmtNodeId, threadId); }
/** * Asynchronously waits for last finish request ack. * * @param rmtNodeId Remote node ID. * @param threadId Near tx thread ID. * @return {@code null} if ack was received or future that will be completed when ack is received. */
Asynchronously waits for last finish request ack
awaitFinishAckAsync
{ "repo_name": "nivanov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java", "license": "apache-2.0", "size": 89685 }
[ "org.apache.ignite.internal.IgniteInternalFuture", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.internal.IgniteInternalFuture; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.internal.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
2,381,626
public void testSubRoles() throws Exception { echo("Testing subroles operations"); CmsObject cms = getCmsObject(); CmsRoleManager roleMan = OpenCms.getRoleManager(); // check preconditions for admin List adminRoles = roleMan.getRolesOfUser( cms, cms....
void function() throws Exception { echo(STR); CmsObject cms = getCmsObject(); CmsRoleManager roleMan = OpenCms.getRoleManager(); List adminRoles = roleMan.getRolesOfUser( cms, cms.getRequestContext().getCurrentUser().getName(), STRSTRSTRtest2STRSTRSTRSTRSTRSTRSTRSTRSTRSTRSTR")); assertEquals(children.size(), roles.size...
/** * Tests subroles operations.<p> * * @throws Exception if the test fails */
Tests subroles operations
testSubRoles
{ "repo_name": "sbonoc/opencms-core", "path": "test/org/opencms/security/TestRoles.java", "license": "lgpl-2.1", "size": 17410 }
[ "java.util.List", "org.opencms.file.CmsObject", "org.opencms.main.OpenCms" ]
import java.util.List; import org.opencms.file.CmsObject; import org.opencms.main.OpenCms;
import java.util.*; import org.opencms.file.*; import org.opencms.main.*;
[ "java.util", "org.opencms.file", "org.opencms.main" ]
java.util; org.opencms.file; org.opencms.main;
1,070,270
void upsert(ITupleReference tuple) throws HyracksDataException;
void upsert(ITupleReference tuple) throws HyracksDataException;
/** * This operation is only supported by indexes with the notion of a unique key. * If tuple's key already exists, then this operation performs an update. * Otherwise, it performs an insert. * * @param tuple * Tuple to be deleted. * @throws HyracksDataException * ...
This operation is only supported by indexes with the notion of a unique key. If tuple's key already exists, then this operation performs an update. Otherwise, it performs an insert
upsert
{ "repo_name": "ecarm002/incubator-asterixdb", "path": "hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/IIndexAccessor.java", "license": "apache-2.0", "size": 4030 }
[ "org.apache.hyracks.api.exceptions.HyracksDataException", "org.apache.hyracks.dataflow.common.data.accessors.ITupleReference" ]
import org.apache.hyracks.api.exceptions.HyracksDataException; import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
import org.apache.hyracks.api.exceptions.*; import org.apache.hyracks.dataflow.common.data.accessors.*;
[ "org.apache.hyracks" ]
org.apache.hyracks;
18,164
@XmlTransient @JsonIgnore @OneToMany(mappedBy="node",orphanRemoval=true) @org.hibernate.annotations.Cascade(org.hibernate.annotations.CascadeType.ALL) public Set<OnmsIpInterface> getIpInterfaces() { return m_ipInterfaces; }
@OneToMany(mappedBy="node",orphanRemoval=true) @org.hibernate.annotations.Cascade(org.hibernate.annotations.CascadeType.ALL) Set<OnmsIpInterface> function() { return m_ipInterfaces; }
/** * The interfaces on this node * * @return a {@link java.util.Set} object. */
The interfaces on this node
getIpInterfaces
{ "repo_name": "rdkgit/opennms", "path": "opennms-model/src/main/java/org/opennms/netmgt/model/OnmsNode.java", "license": "agpl-3.0", "size": 49219 }
[ "java.util.Set", "javax.persistence.CascadeType", "javax.persistence.OneToMany" ]
import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.OneToMany;
import java.util.*; import javax.persistence.*;
[ "java.util", "javax.persistence" ]
java.util; javax.persistence;
417,955
public JceKeyAgreeRecipient setProvider(Provider provider) { this.helper = new EnvelopedDataHelper(new ProviderJcaJceExtHelper(provider)); this.contentHelper = helper; return this; }
JceKeyAgreeRecipient function(Provider provider) { this.helper = new EnvelopedDataHelper(new ProviderJcaJceExtHelper(provider)); this.contentHelper = helper; return this; }
/** * Set the provider to use for key recovery and content processing. * * @param provider provider to use. * @return this recipient. */
Set the provider to use for key recovery and content processing
setProvider
{ "repo_name": "onessimofalconi/bc-java", "path": "pkix/src/main/java/org/bouncycastle/cms/jcajce/JceKeyAgreeRecipient.java", "license": "mit", "size": 7655 }
[ "java.security.Provider" ]
import java.security.Provider;
import java.security.*;
[ "java.security" ]
java.security;
1,031,132
public static short[] decodeOctetString(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, ASN1_OCTET_STRING_TAG_NUM)) { throw new IllegalArgumentException("Expected OCTET STRING identifier, received " + id); } int len = DerUtils.dec...
static short[] function(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, ASN1_OCTET_STRING_TAG_NUM)) { throw new IllegalArgumentException(STR + id); } int len = DerUtils.decodeLength(buf); if (buf.remaining() < len) { throw new IllegalArgumentException(STR); } short[] dst = new ...
/** * Decode an ASN.1 OCTET STRING. * * @param buf * the DER-encoded OCTET STRING * @return the octets */
Decode an ASN.1 OCTET STRING
decodeOctetString
{ "repo_name": "a-zuckut/gateway", "path": "util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java", "license": "apache-2.0", "size": 16522 }
[ "java.nio.ByteBuffer", "org.kaazing.gateway.util.der.DerId", "org.kaazing.gateway.util.der.DerUtils" ]
import java.nio.ByteBuffer; import org.kaazing.gateway.util.der.DerId; import org.kaazing.gateway.util.der.DerUtils;
import java.nio.*; import org.kaazing.gateway.util.der.*;
[ "java.nio", "org.kaazing.gateway" ]
java.nio; org.kaazing.gateway;
2,714,687
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<WhatIfOperationResultInner>, WhatIfOperationResultInner> beginWhatIfAtTenantScope( String deploymentName, ScopedDeploymentWhatIf parameters);
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<WhatIfOperationResultInner>, WhatIfOperationResultInner> beginWhatIfAtTenantScope( String deploymentName, ScopedDeploymentWhatIf parameters);
/** * Returns changes that will be made by the deployment if executed at the scope of the tenant group. * * @param deploymentName The name of the deployment. * @param parameters Parameters to validate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws c...
Returns changes that will be made by the deployment if executed at the scope of the tenant group
beginWhatIfAtTenantScope
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentsClient.java", "license": "mit", "size": 218889 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.polling.SyncPoller", "com.azure.resourcemanager.resources.fluent.models.WhatIfOperationResultInner", "com.azure.resourcemanager.resources.models.ScopedDep...
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.resources.fluent.models.WhatIfOperationResultInner; import com.azure.resourcemanager.resources...
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.resources.fluent.models.*; import com.azure.resourcemanager.resources.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
217,461
@Override public String process() throws ConQATException { Properties properties = new Properties(); try { InputStream inputStream = new FileInputStream(filename); properties.load(inputStream); inputStream.close(); } catch (IOException e) { throw new ConQATException("Can't read file: " + filename...
String function() throws ConQATException { Properties properties = new Properties(); try { InputStream inputStream = new FileInputStream(filename); properties.load(inputStream); inputStream.close(); } catch (IOException e) { throw new ConQATException(STR + filename + "!", e); } String value = properties.getProperty(key...
/** * Reads properties file and extracts value. * * @throws ConQATException * if the file isn't found or the key isn't present */
Reads properties file and extracts value
process
{ "repo_name": "vimaier/conqat", "path": "org.conqat.engine.commons/src/org/conqat/engine/commons/input/PropertiesFileReader.java", "license": "apache-2.0", "size": 3692 }
[ "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream", "java.util.Properties", "org.conqat.engine.core.core.ConQATException" ]
import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Properties; import org.conqat.engine.core.core.ConQATException;
import java.io.*; import java.util.*; import org.conqat.engine.core.core.*;
[ "java.io", "java.util", "org.conqat.engine" ]
java.io; java.util; org.conqat.engine;
1,033,130
protected void updateEvohomeThingStatus(ThingStatus newStatus, ThingStatusDetail detail, String message) { // Prevent spamming the log file if (!newStatus.equals(getThing().getStatus())) { updateStatus(newStatus, detail, message); } }
void function(ThingStatus newStatus, ThingStatusDetail detail, String message) { if (!newStatus.equals(getThing().getStatus())) { updateStatus(newStatus, detail, message); } }
/** * Updates the status of the evohome thing when it changes * * @param newStatus The new status to update to * @param detail The status detail value * @param message The message to show with the status */
Updates the status of the evohome thing when it changes
updateEvohomeThingStatus
{ "repo_name": "MikeJMajor/openhab2-addons-dlinksmarthome", "path": "bundles/org.openhab.binding.evohome/src/main/java/org/openhab/binding/evohome/internal/handler/BaseEvohomeHandler.java", "license": "epl-1.0", "size": 4134 }
[ "org.openhab.core.thing.ThingStatus", "org.openhab.core.thing.ThingStatusDetail" ]
import org.openhab.core.thing.ThingStatus; import org.openhab.core.thing.ThingStatusDetail;
import org.openhab.core.thing.*;
[ "org.openhab.core" ]
org.openhab.core;
80,976
private void setShowActionScriptWarning(Class<? extends ICompilerProblem> problem, int warningCode) { setShowProblemByClass(problem, problemSettings.checkActionScriptWarning(warningCode)); }
void function(Class<? extends ICompilerProblem> problem, int warningCode) { setShowProblemByClass(problem, problemSettings.checkActionScriptWarning(warningCode)); }
/** * Hide/show actionscript warnings based on compiler option settings. * * @param problem * @param warningCode */
Hide/show actionscript warnings based on compiler option settings
setShowActionScriptWarning
{ "repo_name": "adufilie/flex-falcon", "path": "compiler/src/org/apache/flex/compiler/clients/problems/ProblemSettingsFilter.java", "license": "apache-2.0", "size": 8966 }
[ "org.apache.flex.compiler.problems.ICompilerProblem" ]
import org.apache.flex.compiler.problems.ICompilerProblem;
import org.apache.flex.compiler.problems.*;
[ "org.apache.flex" ]
org.apache.flex;
1,295,863
protected PassiveProbe<KeyType> findProbe(Message message) { String hostname = identifyHost(message); String probename = identifyProbe(message); log(Level.DEBUG, "looking for %s in %s", message, probes); if(! probes.containsKey(hostname)) { log(Level.WARN, "unregistered s...
PassiveProbe<KeyType> function(Message message) { String hostname = identifyHost(message); String probename = identifyProbe(message); log(Level.DEBUG, STR, message, probes); if(! probes.containsKey(hostname)) { log(Level.WARN, STR, hostname); return null; } PassiveProbe<KeyType> pp = probes.get(hostname).get(probename)...
/** * This method should be call to identify the probe used to store a received external input. It uses result from identifyHost and identifyProbe to find it. * @param message the external input * @return the probe where values will be stored */
This method should be call to identify the probe used to store a received external input. It uses result from identifyHost and identifyProbe to find it
findProbe
{ "repo_name": "springlin2012/Mycat-Web", "path": "src/main/java/jrds/starter/Listener.java", "license": "apache-2.0", "size": 4253 }
[ "org.apache.log4j.Level" ]
import org.apache.log4j.Level;
import org.apache.log4j.*;
[ "org.apache.log4j" ]
org.apache.log4j;
719,157
@Override public boolean validate(Page page) throws UnsupportedFormatVersionException { return run(page, null, true); }
boolean function(Page page) throws UnsupportedFormatVersionException { return run(page, null, true); }
/** * Validates the given Page object against the XML schema. * * @param page Page object * @return Returns true if valid, false otherwise. */
Validates the given Page object against the XML schema
validate
{ "repo_name": "PRImA-Research-Lab/prima-core-libs", "path": "java/PrimaDla/src/org/primaresearch/dla/page/io/xml/XmlPageWriter_2019_07_15.java", "license": "apache-2.0", "size": 34412 }
[ "org.primaresearch.dla.page.Page", "org.primaresearch.io.UnsupportedFormatVersionException" ]
import org.primaresearch.dla.page.Page; import org.primaresearch.io.UnsupportedFormatVersionException;
import org.primaresearch.dla.page.*; import org.primaresearch.io.*;
[ "org.primaresearch.dla", "org.primaresearch.io" ]
org.primaresearch.dla; org.primaresearch.io;
2,657,638
private boolean scanFile(DownloadInfo info, final boolean updateDatabase, final boolean deleteFile) { synchronized (this) { if (mMediaScannerService == null) { // not bound to mediaservice. but if in the process of connecting to it, wait until // conne...
boolean function(DownloadInfo info, final boolean updateDatabase, final boolean deleteFile) { synchronized (this) { if (mMediaScannerService == null) { while (mMediaScannerConnecting) { Log.d(Constants.TAG, STR); try { this.wait(WAIT_TIMEOUT); } catch (InterruptedException e1) { throw new IllegalStateException(STR); } ...
/** * Attempts to scan the file if necessary. * @return true if the file has been properly scanned. */
Attempts to scan the file if necessary
scanFile
{ "repo_name": "xjwangliang/android_source_note", "path": "Download-Provider/DownloadProvider/src/com/android/providers/downloads/DownloadService.java", "license": "apache-2.0", "size": 22610 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
988,850
interface WithRedisConfiguration { Update withRedisConfiguration(Map<String, String> redisConfiguration); }
interface WithRedisConfiguration { Update withRedisConfiguration(Map<String, String> redisConfiguration); }
/** * Specifies redisConfiguration. */
Specifies redisConfiguration
withRedisConfiguration
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/RedisResource.java", "license": "mit", "size": 8070 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
41,535
public ServiceFuture<NetworkSecurityGroupInner> updateTagsAsync(String resourceGroupName, String networkSecurityGroupName, Map<String, String> tags, final ServiceCallback<NetworkSecurityGroupInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, net...
ServiceFuture<NetworkSecurityGroupInner> function(String resourceGroupName, String networkSecurityGroupName, Map<String, String> tags, final ServiceCallback<NetworkSecurityGroupInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tag...
/** * Updates a network security group tags. * * @param resourceGroupName The name of the resource group. * @param networkSecurityGroupName The name of the network security group. * @param tags Resource tags. * @param serviceCallback the async ServiceCallback to handle successful and faile...
Updates a network security group tags
updateTagsAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/NetworkSecurityGroupsInner.java", "license": "mit", "size": 81333 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture", "java.util.Map" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.Map;
import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.rest", "java.util" ]
com.microsoft.rest; java.util;
399,707
PagedIterable<EventSubscription> listRegionalBySubscription( String location, String filter, Integer top, Context context);
PagedIterable<EventSubscription> listRegionalBySubscription( String location, String filter, Integer top, Context context);
/** * List all event subscriptions from the given location under a specific Azure subscription. * * @param location Name of the location. * @param filter The query used to filter the search results using OData syntax. Filtering is permitted on the * 'name' property only and with limited num...
List all event subscriptions from the given location under a specific Azure subscription
listRegionalBySubscription
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/EventSubscriptions.java", "license": "mit", "size": 37641 }
[ "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context" ]
import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context;
import com.azure.core.http.rest.*; import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
283,586
public List<PersistableBusinessObject> generateGlobalChangesToPersist();
List<PersistableBusinessObject> function();
/** * * This method applies the global changed fields to the list of BOs contained within, and returns the list, with all the * relevant values updated. * * @return Returns a List of BusinessObjects that are ready for persisting, with any relevant values changed * */
This method applies the global changed fields to the list of BOs contained within, and returns the list, with all the relevant values updated
generateGlobalChangesToPersist
{ "repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua", "path": "rice-framework/krad-app-framework/src/main/java/org/kuali/rice/krad/bo/GlobalBusinessObject.java", "license": "apache-2.0", "size": 3177 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
697,198
ResourceKey<Level> getDeathDim();
ResourceKey<Level> getDeathDim();
/** * Returns the dimension of the most recent player's death, or null * * @return RegistryKey corresponding to the dimension, or null */
Returns the dimension of the most recent player's death, or null
getDeathDim
{ "repo_name": "legobmw99/Allomancy", "path": "src/main/java/com/legobmw99/allomancy/api/data/IAllomancerData.java", "license": "gpl-3.0", "size": 4591 }
[ "net.minecraft.resources.ResourceKey", "net.minecraft.world.level.Level" ]
import net.minecraft.resources.ResourceKey; import net.minecraft.world.level.Level;
import net.minecraft.resources.*; import net.minecraft.world.level.*;
[ "net.minecraft.resources", "net.minecraft.world" ]
net.minecraft.resources; net.minecraft.world;
978,811
protected void buildPaths() { Set<V> destinations = new HashSet<>(); if (dst == null) { destinations.addAll(costs.keySet()); } else { destinations.add(dst); } // Build all paths between the source and all requested dest...
void function() { Set<V> destinations = new HashSet<>(); if (dst == null) { destinations.addAll(costs.keySet()); } else { destinations.add(dst); } for (V v : destinations) { if (!v.equals(src)) { buildAllPaths(this, src, v, maxPaths); } } } }
/** * Builds a set of paths for the specified src/dst vertex pair. */
Builds a set of paths for the specified src/dst vertex pair
buildPaths
{ "repo_name": "kuangrewawa/onos", "path": "utils/misc/src/main/java/org/onlab/graph/AbstractGraphPathSearch.java", "license": "apache-2.0", "size": 11378 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
344,416
@ReportableProperty(order=2, value="Extra properties.") public List<Reportable> getExtraProperties() throws JHOVE2Exception;
@ReportableProperty(order=2, value=STR) List<Reportable> function() throws JHOVE2Exception;
/** Get extra properties. Extra properties are those not known at the * time the source unit is instantiated but which are not associated with * a particular {@link org.jhove2.module.format.FormatModule}. * @return Extra properties * @throws JHOVE2Exception */
Get extra properties. Extra properties are those not known at the time the source unit is instantiated but which are not associated with a particular <code>org.jhove2.module.format.FormatModule</code>
getExtraProperties
{ "repo_name": "opf-labs/jhove2", "path": "src/main/java/org/jhove2/core/source/Source.java", "license": "bsd-2-clause", "size": 15326 }
[ "java.util.List", "org.jhove2.annotation.ReportableProperty", "org.jhove2.core.JHOVE2Exception", "org.jhove2.core.reportable.Reportable" ]
import java.util.List; import org.jhove2.annotation.ReportableProperty; import org.jhove2.core.JHOVE2Exception; import org.jhove2.core.reportable.Reportable;
import java.util.*; import org.jhove2.annotation.*; import org.jhove2.core.*; import org.jhove2.core.reportable.*;
[ "java.util", "org.jhove2.annotation", "org.jhove2.core" ]
java.util; org.jhove2.annotation; org.jhove2.core;
2,680,336
public void initialize() throws OfficeServerException { if (this.config.getServerType() == OfficeServerConfiguration.SERVER_TYPE_INTERNAL) { LocalOfficeManager.Builder configuration = LocalOfficeManager.builder(); configuration.portNumbers(this.config.getServerPorts()); ...
void function() throws OfficeServerException { if (this.config.getServerType() == OfficeServerConfiguration.SERVER_TYPE_INTERNAL) { LocalOfficeManager.Builder configuration = LocalOfficeManager.builder(); configuration.portNumbers(this.config.getServerPorts()); String homePath = this.config.getHomePath(); if (homePath ...
/** * Initialize JodConverter. * * @throws OfficeServerException when failed to initialize */
Initialize JodConverter
initialize
{ "repo_name": "xwiki/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-office/xwiki-platform-office-importer/src/main/java/org/xwiki/officeimporter/internal/server/DefaultOfficeServer.java", "license": "lgpl-2.1", "size": 8881 }
[ "java.io.File", "java.io.InputStream", "org.jodconverter.core.document.JsonDocumentFormatRegistry", "org.jodconverter.local.LocalConverter", "org.jodconverter.local.filter.text.LinkedImagesEmbedderFilter", "org.jodconverter.local.office.ExternalOfficeManager", "org.jodconverter.local.office.LocalOfficeM...
import java.io.File; import java.io.InputStream; import org.jodconverter.core.document.JsonDocumentFormatRegistry; import org.jodconverter.local.LocalConverter; import org.jodconverter.local.filter.text.LinkedImagesEmbedderFilter; import org.jodconverter.local.office.ExternalOfficeManager; import org.jodconverter.local...
import java.io.*; import org.jodconverter.core.document.*; import org.jodconverter.local.*; import org.jodconverter.local.filter.text.*; import org.jodconverter.local.office.*; import org.xwiki.officeimporter.internal.converter.*; import org.xwiki.officeimporter.server.*;
[ "java.io", "org.jodconverter.core", "org.jodconverter.local", "org.xwiki.officeimporter" ]
java.io; org.jodconverter.core; org.jodconverter.local; org.xwiki.officeimporter;
1,381,347
public ImmutableList<ConfigurationFragmentFactory> getConfigurationFragments() { return configurationFragments; }
ImmutableList<ConfigurationFragmentFactory> function() { return configurationFragments; }
/** * Returns the set of configuration fragments provided by this module. */
Returns the set of configuration fragments provided by this module
getConfigurationFragments
{ "repo_name": "manashmndl/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/ConfiguredRuleClassProvider.java", "license": "apache-2.0", "size": 17031 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.analysis.config.ConfigurationFragmentFactory" ]
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.analysis.config.ConfigurationFragmentFactory;
import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.config.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
1,649,115
private void raidTestFiles(Path raidPath, Path[] filePaths, boolean doHar) throws IOException, ClassNotFoundException { // create RaidNode raidConf = new Configuration(conf); raidConf.setInt(RaidNode.RAID_PARITY_HAR_THRESHOLD_DAYS_KEY, 0); raidConf.setInt("raid.blockfix.interval", 1000); // th...
void function(Path raidPath, Path[] filePaths, boolean doHar) throws IOException, ClassNotFoundException { raidConf = new Configuration(conf); raidConf.setInt(RaidNode.RAID_PARITY_HAR_THRESHOLD_DAYS_KEY, 0); raidConf.setInt(STR, 1000); conf.set(STR, STR); rnode = RaidNode.createRaidNode(null, raidConf); for (Path fileP...
/** * raids test file */
raids test file
raidTestFiles
{ "repo_name": "iVCE/RDFS", "path": "src/contrib/raid/src/test/org/apache/hadoop/raid/TestRaidShellFsck.java", "license": "apache-2.0", "size": 22939 }
[ "java.io.FileNotFoundException", "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.Path", "org.apache.hadoop.raid.HarIndex", "org.apache.hadoop.raid.RaidNode" ]
import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; import org.apache.hadoop.raid.HarIndex; import org.apache.hadoop.raid.RaidNode;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.raid.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,666,494
File cacheDir = new File(context.getCacheDir(), DEFAULT_CACHE_DIR); String userAgent = "volley/0"; try { String packageName = context.getPackageName(); PackageInfo info = context.getPackageManager().getPackageInfo(packageName, 0); userAgent = packageName + "/" + info...
File cacheDir = new File(context.getCacheDir(), DEFAULT_CACHE_DIR); String userAgent = STR; try { String packageName = context.getPackageName(); PackageInfo info = context.getPackageManager().getPackageInfo(packageName, 0); userAgent = packageName + "/" + info.versionCode; } catch (NameNotFoundException e) { } if (stac...
/** * Creates a default instance of the worker pool and calls {@link RequestQueue#start()} on it. * * @param context A {@link Context} to use for creating the cache dir. * @param stack An {@link HttpStack} to use for the network, or null for default. * @return A started {@link RequestQueue} ins...
Creates a default instance of the worker pool and calls <code>RequestQueue#start()</code> on it
newRequestQueue
{ "repo_name": "mirai2015keitai/KuruchanGuide", "path": "volley/src/main/java/com/android/volley/toolbox/Volley.java", "license": "gpl-2.0", "size": 2921 }
[ "android.content.pm.PackageInfo", "android.content.pm.PackageManager", "android.net.http.AndroidHttpClient", "android.os.Build", "com.android.volley.Network", "com.android.volley.RequestQueue", "java.io.File" ]
import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.net.http.AndroidHttpClient; import android.os.Build; import com.android.volley.Network; import com.android.volley.RequestQueue; import java.io.File;
import android.content.pm.*; import android.net.http.*; import android.os.*; import com.android.volley.*; import java.io.*;
[ "android.content", "android.net", "android.os", "com.android.volley", "java.io" ]
android.content; android.net; android.os; com.android.volley; java.io;
1,346,426