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 synchronized static void addExtensionInstallationProvider (ExtensionInstallationProvider eip) { if (providers == null) { providers = new Vector<>(); } providers.add(eip); }
synchronized static void function (ExtensionInstallationProvider eip) { if (providers == null) { providers = new Vector<>(); } providers.add(eip); }
/** * <p> * Register an ExtensionInstallationProvider. The provider is responsible * for handling the installation (upgrade) of any missing extensions. * </p> * @param eip ExtensionInstallationProvider implementation */
Register an ExtensionInstallationProvider. The provider is responsible for handling the installation (upgrade) of any missing extensions.
addExtensionInstallationProvider
{ "repo_name": "openjdk/jdk7u", "path": "jdk/src/share/classes/sun/misc/ExtensionDependency.java", "license": "gpl-2.0", "size": 20843 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,327,387
public void addHighlighter(Highlighter highlighter) { Highlighter[] old = getHighlighters(); getCompoundHighlighter().addHighlighter(highlighter); firePropertyChange("highlighters", old, getHighlighters()); }
void function(Highlighter highlighter) { Highlighter[] old = getHighlighters(); getCompoundHighlighter().addHighlighter(highlighter); firePropertyChange(STR, old, getHighlighters()); }
/** * Appends a <code>Highlighter</code> to the end of the list of used * <code>Highlighter</code>s. The argument must not be null. * <p> * * @param highlighter the <code>Highlighter</code> to add, must not be null. * @throws NullPointerException if <code>Highlighter</code> is null. * * @see #removeHighlighter(Highlighter) * @see #setHighlighters(Highlighter[]) */
Appends a <code>Highlighter</code> to the end of the list of used <code>Highlighter</code>s. The argument must not be null.
addHighlighter
{ "repo_name": "tmyroadctfig/swingx", "path": "swingx-core/src/main/java/org/jdesktop/swingx/JXList.java", "license": "lgpl-2.1", "size": 57047 }
[ "org.jdesktop.swingx.decorator.Highlighter" ]
import org.jdesktop.swingx.decorator.Highlighter;
import org.jdesktop.swingx.decorator.*;
[ "org.jdesktop.swingx" ]
org.jdesktop.swingx;
1,728,608
public static Set<AppContext> getAppContexts() { synchronized (threadGroup2appContext) { return new HashSet<AppContext>(threadGroup2appContext.values()); } } private static volatile AppContext mainAppContext = null; private final HashMap table = new HashMap(); private final ThreadGroup threadGroup; private PropertyChangeSupport changeSupport = null; public static final String DISPOSED_PROPERTY_NAME = "disposed"; public static final String GUI_DISPOSED = "guidisposed"; private volatile boolean isDisposed = false; // true if AppContext is disposed
static Set<AppContext> function() { synchronized (threadGroup2appContext) { return new HashSet<AppContext>(threadGroup2appContext.values()); } } private static volatile AppContext mainAppContext = null; private final HashMap table = new HashMap(); private final ThreadGroup threadGroup; private PropertyChangeSupport changeSupport = null; public static final String DISPOSED_PROPERTY_NAME = STR; public static final String GUI_DISPOSED = STR; private volatile boolean isDisposed = false;
/** * Returns a set containing all <code>AppContext</code>s. */
Returns a set containing all <code>AppContext</code>s
getAppContexts
{ "repo_name": "neomantic/Android-SISC-Scheme-Eval", "path": "src/neomantic/sun/awt/AppContext.java", "license": "gpl-2.0", "size": 32353 }
[ "java.beans.PropertyChangeSupport", "java.util.HashMap", "java.util.HashSet", "java.util.Set" ]
import java.beans.PropertyChangeSupport; import java.util.HashMap; import java.util.HashSet; import java.util.Set;
import java.beans.*; import java.util.*;
[ "java.beans", "java.util" ]
java.beans; java.util;
2,586,433
public static MozuClient<List<com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice>> updateProductVariationLocalizedDeltaPricesClient(com.mozu.api.DataViewMode dataViewMode, List<com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice> localizedDeltaPrice, String productCode, String variationKey) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.products.ProductVariationUrl.updateProductVariationLocalizedDeltaPricesUrl(productCode, variationKey); String verb = "PUT"; Class<?> clz = new ArrayList<com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice>(){}.getClass(); MozuClient<List<com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice>> mozuClient = (MozuClient<List<com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice>>) MozuClientFactory.getInstance(clz); mozuClient.setVerb(verb); mozuClient.setResourceUrl(url); mozuClient.setBody(localizedDeltaPrice); mozuClient.addHeader(Headers.X_VOL_DATAVIEW_MODE ,dataViewMode.toString()); return mozuClient; }
static MozuClient<List<com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice>> function(com.mozu.api.DataViewMode dataViewMode, List<com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice> localizedDeltaPrice, String productCode, String variationKey) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.products.ProductVariationUrl.updateProductVariationLocalizedDeltaPricesUrl(productCode, variationKey); String verb = "PUT"; Class<?> clz = new ArrayList<com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice>(){}.getClass(); MozuClient<List<com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice>> mozuClient = (MozuClient<List<com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice>>) MozuClientFactory.getInstance(clz); mozuClient.setVerb(verb); mozuClient.setResourceUrl(url); mozuClient.setBody(localizedDeltaPrice); mozuClient.addHeader(Headers.X_VOL_DATAVIEW_MODE ,dataViewMode.toString()); return mozuClient; }
/** * Updates all localized delta price values for a product variation. Localized delta prices are deltas between two differing monetary conversion amounts between countries, such as US Dollar vs Euro. * <p><pre><code> * MozuClient<List<com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice>> mozuClient=UpdateProductVariationLocalizedDeltaPricesClient(dataViewMode, localizedDeltaPrice, productCode, variationKey); * client.setBaseAddress(url); * client.executeRequest(); * ProductVariationDeltaPrice productVariationDeltaPrice = client.Result(); * </code></pre></p> * @param productCode The unique, user-defined product code of a product, used throughout Mozu to reference and associate to a product. * @param variationKey System-generated key that represents the attribute values that uniquely identify a specific product variation. * @param localizedDeltaPrice The difference between the base price for the product and this variation of the product, which can be a positive or negative decimal value. For example, if the base price for a t-shirt product is $10, but the XL variation should cost $12, the DeltaPrice value should be "2". However, if the XS variation should only cost $8, the DeltaPrice value should be "-2". * @return Mozu.Api.MozuClient <List<com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice>> * @see com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice * @see com.mozu.api.contracts.productadmin.ProductVariationDeltaPrice */
Updates all localized delta price values for a product variation. Localized delta prices are deltas between two differing monetary conversion amounts between countries, such as US Dollar vs Euro. <code><code> MozuClient> mozuClient=UpdateProductVariationLocalizedDeltaPricesClient(dataViewMode, localizedDeltaPrice, productCode, variationKey); client.setBaseAddress(url); client.executeRequest(); ProductVariationDeltaPrice productVariationDeltaPrice = client.Result(); </code></code>
updateProductVariationLocalizedDeltaPricesClient
{ "repo_name": "sanjaymandadi/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/products/ProductVariationClient.java", "license": "mit", "size": 35451 }
[ "com.mozu.api.DataViewMode", "com.mozu.api.Headers", "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl", "java.util.ArrayList", "java.util.List" ]
import com.mozu.api.DataViewMode; import com.mozu.api.Headers; import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; import java.util.ArrayList; import java.util.List;
import com.mozu.api.*; import java.util.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
2,705,612
public static LogRecord format(final Level level, final int key, final Object arg0) throws MissingResourceException { return getResources(null).getLogRecord(level, key, arg0); }
static LogRecord function(final Level level, final int key, final Object arg0) throws MissingResourceException { return getResources(null).getLogRecord(level, key, arg0); }
/** * Gets a log record for the given key. Replaces all occurence of "{0}" with values of {@code * arg0}. * * @param level The log record level. * @param key The key for the desired string. * @param arg0 Value to substitute to "{0}". * @return The formatted string for the given key. * @throws MissingResourceException If no object for the given key can be found. */
Gets a log record for the given key. Replaces all occurence of "{0}" with values of arg0
format
{ "repo_name": "geotools/geotools", "path": "modules/library/render/src/main/java/org/geotools/renderer/i18n/Logging.java", "license": "lgpl-2.1", "size": 5529 }
[ "java.util.MissingResourceException", "java.util.logging.Level", "java.util.logging.LogRecord" ]
import java.util.MissingResourceException; import java.util.logging.Level; import java.util.logging.LogRecord;
import java.util.*; import java.util.logging.*;
[ "java.util" ]
java.util;
489,757
public static boolean hasWork (Transaction tx) { synchronized (_transactions) { Stack workers = _transactions.get(tx); return (boolean) (workers != null); } }
static boolean function (Transaction tx) { synchronized (_transactions) { Stack workers = _transactions.get(tx); return (boolean) (workers != null); } }
/** * Does the transaction have any work associated with it? * * @param tx the transaction to check. * * @return <code>true</code> if there is work associated with the transaction, * <code>false</code> otherwise. */
Does the transaction have any work associated with it
hasWork
{ "repo_name": "nmcl/scratch", "path": "graalvm/transactions/fork/narayana/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/jca/TxWorkManager.java", "license": "apache-2.0", "size": 4259 }
[ "java.util.Stack", "javax.transaction.Transaction" ]
import java.util.Stack; import javax.transaction.Transaction;
import java.util.*; import javax.transaction.*;
[ "java.util", "javax.transaction" ]
java.util; javax.transaction;
890,016
public static HashMap<String, String> getNonEncryptedQueryValues(String query) { return getNonEncryptedQueryValues(query, 0); }
static HashMap<String, String> function(String query) { return getNonEncryptedQueryValues(query, 0); }
/** * Retrieves key-val pairs according to given query. * * @param query query that determines what key-val pairs will be returned * @return hashmap of key-val pairs */
Retrieves key-val pairs according to given query
getNonEncryptedQueryValues
{ "repo_name": "soomla/soomla-android-core", "path": "src/com/soomla/data/KeyValueStorage.java", "license": "mit", "size": 7401 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,550,172
void write(Collection<byte[]> records) throws StreamingException, InterruptedException;
void write(Collection<byte[]> records) throws StreamingException, InterruptedException;
/** * Write records using RecordWriter. * @throws StreamingException if there are errors when writing * @throws InterruptedException if call in interrupted */
Write records using RecordWriter
write
{ "repo_name": "alanfgates/hive", "path": "hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/TransactionBatch.java", "license": "apache-2.0", "size": 4202 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,863,865
public static Dataset loadCSV2Memory(final String filename, final int input, final int ideal, final boolean headers, final CSVFormat format, final boolean significance) { final DataSetCODEC codec = new CSVDataCODEC(new File(filename), format, headers, input, ideal, significance); final MemoryDataLoader load = new MemoryDataLoader(codec); final Dataset dataset = load.external2Memory(); return dataset; }
static Dataset function(final String filename, final int input, final int ideal, final boolean headers, final CSVFormat format, final boolean significance) { final DataSetCODEC codec = new CSVDataCODEC(new File(filename), format, headers, input, ideal, significance); final MemoryDataLoader load = new MemoryDataLoader(codec); final Dataset dataset = load.external2Memory(); return dataset; }
/** * Load CSV to memory. * * @param filename The CSV file to load. * @param input The input count. * @param ideal The ideal count. * @param headers True, if headers are present. * @param format The loaded dataset. * @param significance True, if there is a significance column. * @return The loaded dataset. */
Load CSV to memory
loadCSV2Memory
{ "repo_name": "automenta/java_dann", "path": "src/syncleus/dann/math/EncogUtility.java", "license": "agpl-3.0", "size": 16287 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,178,864
private Set<String> getColumnFamilyList(Set<String> columns, HbckInfo hbi) throws IOException { Path regionDir = hbi.getHdfsRegionDir(); FileSystem fs = regionDir.getFileSystem(getConf()); FileStatus[] subDirs = fs.listStatus(regionDir, new FSUtils.FamilyDirFilter(fs)); for (FileStatus subdir : subDirs) { String columnfamily = subdir.getPath().getName(); columns.add(columnfamily); } return columns; }
Set<String> function(Set<String> columns, HbckInfo hbi) throws IOException { Path regionDir = hbi.getHdfsRegionDir(); FileSystem fs = regionDir.getFileSystem(getConf()); FileStatus[] subDirs = fs.listStatus(regionDir, new FSUtils.FamilyDirFilter(fs)); for (FileStatus subdir : subDirs) { String columnfamily = subdir.getPath().getName(); columns.add(columnfamily); } return columns; }
/** * To get the column family list according to the column family dirs * @param columns * @param hbi * @return a set of column families * @throws IOException */
To get the column family list according to the column family dirs
getColumnFamilyList
{ "repo_name": "StackVista/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java", "license": "apache-2.0", "size": 172348 }
[ "java.io.IOException", "java.util.Set", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import java.util.Set; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,482,050
protected void resume() throws IOException { logger.trace("Sending resume request"); channel.basicPublish("", "shard-" + shardId + "-send", null, new JSONObject() .put("t", "gateway-resume") .toString() .getBytes(StandardCharsets.UTF_8) ); }
void function() throws IOException { logger.trace(STR); channel.basicPublish(STRshard-STR-sendSTRtSTRgateway-resume") .toString() .getBytes(StandardCharsets.UTF_8) ); }
/** * Requests that the gateway sends a RESUME payload to discord for the last acknowledged event. * * @throws IOException If there's an error sending the resume request. * * @see #ack(long) */
Requests that the gateway sends a RESUME payload to discord for the last acknowledged event
resume
{ "repo_name": "natanbc/discord-bot-gateway", "path": "jda-client/src/main/java/com/github/natanbc/gateway/jdaclient/GatewayClient.java", "license": "apache-2.0", "size": 8377 }
[ "java.io.IOException", "java.nio.charset.StandardCharsets" ]
import java.io.IOException; import java.nio.charset.StandardCharsets;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
581,311
@Endpoint( describeByClass = true ) public static <T extends TType, U extends TNumber> Gather<T> create(Scope scope, Operand<T> operand, Operand<U> startIndices, Operand<U> sliceSizes, String dimensionNumbers, Boolean indicesAreSorted) { OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "Gather"); opBuilder.addInput(operand.asOutput()); opBuilder.addInput(startIndices.asOutput()); opBuilder.addInput(sliceSizes.asOutput()); opBuilder.setAttr("dimension_numbers", dimensionNumbers); opBuilder.setAttr("indices_are_sorted", indicesAreSorted); return new Gather<>(opBuilder.build()); }
@Endpoint( describeByClass = true ) static <T extends TType, U extends TNumber> Gather<T> function(Scope scope, Operand<T> operand, Operand<U> startIndices, Operand<U> sliceSizes, String dimensionNumbers, Boolean indicesAreSorted) { OperationBuilder opBuilder = scope.opBuilder(OP_NAME, STR); opBuilder.addInput(operand.asOutput()); opBuilder.addInput(startIndices.asOutput()); opBuilder.addInput(sliceSizes.asOutput()); opBuilder.setAttr(STR, dimensionNumbers); opBuilder.setAttr(STR, indicesAreSorted); return new Gather<>(opBuilder.build()); }
/** * Factory method to create a class wrapping a new XlaGather operation. * * @param scope current scope * @param operand The array we're gathering from. * @param startIndices Array containing the starting indices of the slices we gather. * @param sliceSizes slice_sizes[i] is the bounds for the slice on dimension i. * @param dimensionNumbers A serialized xla::GatherDimensionNumbers proto. * @param indicesAreSorted Boolean indicating if the indices are sorted. * @param <T> data type for {@code XlaGather} output and operands * @param <U> data type for {@code XlaGather} output and operands * @return a new instance of Gather */
Factory method to create a class wrapping a new XlaGather operation
create
{ "repo_name": "tensorflow/java", "path": "tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/Gather.java", "license": "apache-2.0", "size": 5015 }
[ "org.tensorflow.Operand", "org.tensorflow.OperationBuilder", "org.tensorflow.op.Scope", "org.tensorflow.op.annotation.Endpoint", "org.tensorflow.types.family.TNumber", "org.tensorflow.types.family.TType" ]
import org.tensorflow.Operand; import org.tensorflow.OperationBuilder; import org.tensorflow.op.Scope; import org.tensorflow.op.annotation.Endpoint; import org.tensorflow.types.family.TNumber; import org.tensorflow.types.family.TType;
import org.tensorflow.*; import org.tensorflow.op.*; import org.tensorflow.op.annotation.*; import org.tensorflow.types.family.*;
[ "org.tensorflow", "org.tensorflow.op", "org.tensorflow.types" ]
org.tensorflow; org.tensorflow.op; org.tensorflow.types;
2,580,550
@Override // override with covariant return type public LocalDate dateYearDay(int prolepticYear, int dayOfYear) { return LocalDate.ofYearDay(prolepticYear, dayOfYear); }
@Override LocalDate function(int prolepticYear, int dayOfYear) { return LocalDate.ofYearDay(prolepticYear, dayOfYear); }
/** * Obtains an ISO local date from the proleptic-year and day-of-year fields. * <p> * This is equivalent to {@link LocalDate#ofYearDay(int, int)}. * * @param prolepticYear the ISO proleptic-year * @param dayOfYear the ISO day-of-year * @return the ISO local date, not null * @throws DateTimeException if unable to create the date */
Obtains an ISO local date from the proleptic-year and day-of-year fields. This is equivalent to <code>LocalDate#ofYearDay(int, int)</code>
dateYearDay
{ "repo_name": "karianna/jdk8_tl", "path": "jdk/src/share/classes/java/time/chrono/IsoChronology.java", "license": "gpl-2.0", "size": 15904 }
[ "java.time.LocalDate" ]
import java.time.LocalDate;
import java.time.*;
[ "java.time" ]
java.time;
1,266,523
public Next assignAndDone(Object rhs) { return lhs.set(rhs,k); // just straight assignment }
Next function(Object rhs) { return lhs.set(rhs,k); }
/** * Just straight assignment from RHS to LHS, then done */
Just straight assignment from RHS to LHS, then done
assignAndDone
{ "repo_name": "cloudbees/groovy-cps", "path": "lib/src/main/java/com/cloudbees/groovy/cps/impl/AssignmentBlock.java", "license": "apache-2.0", "size": 2955 }
[ "com.cloudbees.groovy.cps.Next" ]
import com.cloudbees.groovy.cps.Next;
import com.cloudbees.groovy.cps.*;
[ "com.cloudbees.groovy" ]
com.cloudbees.groovy;
1,488,523
public static Apfloat pow(Apfloat x, Apfloat y) throws ArithmeticException, ApfloatRuntimeException { long targetPrecision = Math.min(x.precision(), y.precision()); Apfloat result = ApfloatHelper.checkPow(x, y, targetPrecision); if (result != null) { return result; } // Try to precalculate the needed values just once to the required precision, // this may not work too efficiently if x is close to 1 or y is close to zero logRadix(targetPrecision, x.radix()); // Limits precision for log() but may be sub-optimal; precision could be limited more Apfloat one = new Apfloat(1, Apfloat.INFINITE, x.radix()); targetPrecision = Util.ifFinite(targetPrecision, targetPrecision + one.equalDigits(x)); // If the log() argument is close to 1, the result is less accurate x = x.precision(Math.min(x.precision(), targetPrecision)); result = log(x); long intermediatePrecision = Math.min(y.precision(), result.precision()); result = ApfloatHelper.extendPrecision(result); result = ApfloatHelper.extendPrecision(y).multiply(result); result = exp(result.precision(intermediatePrecision)); return result; }
static Apfloat function(Apfloat x, Apfloat y) throws ArithmeticException, ApfloatRuntimeException { long targetPrecision = Math.min(x.precision(), y.precision()); Apfloat result = ApfloatHelper.checkPow(x, y, targetPrecision); if (result != null) { return result; } logRadix(targetPrecision, x.radix()); Apfloat one = new Apfloat(1, Apfloat.INFINITE, x.radix()); targetPrecision = Util.ifFinite(targetPrecision, targetPrecision + one.equalDigits(x)); x = x.precision(Math.min(x.precision(), targetPrecision)); result = log(x); long intermediatePrecision = Math.min(y.precision(), result.precision()); result = ApfloatHelper.extendPrecision(result); result = ApfloatHelper.extendPrecision(y).multiply(result); result = exp(result.precision(intermediatePrecision)); return result; }
/** * Arbitrary power. Calculated using <code>log()</code> and <code>exp()</code>.<p> * * This method doesn't calculate the result properly if <code>x</code> is negative * and <code>y</code> is an integer. For that you should use {@link #pow(Apfloat,long)}. * * @param x The base. * @param y The exponent. * * @return <code>x<sup>y</sup></code>. * * @exception ArithmeticException If both <code>x</code> and <code>y</code> are zero, or <code>x</code> is negative. */
Arbitrary power. Calculated using <code>log()</code> and <code>exp()</code>. This method doesn't calculate the result properly if <code>x</code> is negative and <code>y</code> is an integer. For that you should use <code>#pow(Apfloat,long)</code>
pow
{ "repo_name": "natis1/void-Plague", "path": "src/org/apfloat/ApfloatMath.java", "license": "gpl-3.0", "size": 68713 }
[ "org.apfloat.spi.Util" ]
import org.apfloat.spi.Util;
import org.apfloat.spi.*;
[ "org.apfloat.spi" ]
org.apfloat.spi;
83,192
CastingRuleBuilder explicitNotFromFamily(LogicalTypeFamily... sourceFamilies) { for (LogicalTypeFamily family : sourceFamilies) { for (LogicalTypeRoot root : LogicalTypeRoot.values()) { if (root.getFamilies().contains(family)) { this.explicitSourceTypes.remove(root); } } } return this; }
CastingRuleBuilder explicitNotFromFamily(LogicalTypeFamily... sourceFamilies) { for (LogicalTypeFamily family : sourceFamilies) { for (LogicalTypeRoot root : LogicalTypeRoot.values()) { if (root.getFamilies().contains(family)) { this.explicitSourceTypes.remove(root); } } } return this; }
/** * Should be called after {@link #explicitFromFamily(LogicalTypeFamily...)} to remove * previously added types. */
Should be called after <code>#explicitFromFamily(LogicalTypeFamily...)</code> to remove previously added types
explicitNotFromFamily
{ "repo_name": "apache/flink", "path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/logical/utils/LogicalTypeCasts.java", "license": "apache-2.0", "size": 27176 }
[ "org.apache.flink.table.types.logical.LogicalTypeFamily", "org.apache.flink.table.types.logical.LogicalTypeRoot" ]
import org.apache.flink.table.types.logical.LogicalTypeFamily; import org.apache.flink.table.types.logical.LogicalTypeRoot;
import org.apache.flink.table.types.logical.*;
[ "org.apache.flink" ]
org.apache.flink;
80,512
private Lifecycle createStandaloneLifeCycle() throws Exception { return new StandaloneLifeCycle(); }
Lifecycle function() throws Exception { return new StandaloneLifeCycle(); }
/** * TODO Because a lot of our lifecycles live behind the embedded plugin and the KEWConfigurer does not, this is a * simple * measure to load these without having to deal with the removal of the embedded plugin right away. * * @return Life Cycle * @throws Exception if life cycle not created */
TODO Because a lot of our lifecycles live behind the embedded plugin and the KEWConfigurer does not, this is a simple measure to load these without having to deal with the removal of the embedded plugin right away
createStandaloneLifeCycle
{ "repo_name": "ricepanda/rice-git3", "path": "rice-middleware/impl/src/main/java/org/kuali/rice/kew/config/KEWConfigurer.java", "license": "apache-2.0", "size": 5365 }
[ "org.kuali.rice.core.api.lifecycle.Lifecycle", "org.kuali.rice.kew.lifecycle.StandaloneLifeCycle" ]
import org.kuali.rice.core.api.lifecycle.Lifecycle; import org.kuali.rice.kew.lifecycle.StandaloneLifeCycle;
import org.kuali.rice.core.api.lifecycle.*; import org.kuali.rice.kew.lifecycle.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,848,699
public void setUniformf (String name, float value1, float value2, float value3) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchUniformLocation(name); gl.glUniform3f(location, value1, value2, value3); }
void function (String name, float value1, float value2, float value3) { GL20 gl = Gdx.gl20; checkManaged(); int location = fetchUniformLocation(name); gl.glUniform3f(location, value1, value2, value3); }
/** Sets the uniform with the given name. The {@link ShaderProgram} must be bound for this to work. * * @param name the name of the uniform * @param value1 the first value * @param value2 the second value * @param value3 the third value */
Sets the uniform with the given name. The <code>ShaderProgram</code> must be bound for this to work
setUniformf
{ "repo_name": "MadcowD/libgdx", "path": "gdx/src/com/badlogic/gdx/graphics/glutils/ShaderProgram.java", "license": "apache-2.0", "size": 31675 }
[ "com.badlogic.gdx.Gdx" ]
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
1,451,072
BusinessObjectService getKraBusinessObjectService() { if(businessObjectService == null){ businessObjectService = (BusinessObjectService) KcServiceLocator.getService("businessObjectService"); } return businessObjectService; }
BusinessObjectService getKraBusinessObjectService() { if(businessObjectService == null){ businessObjectService = (BusinessObjectService) KcServiceLocator.getService(STR); } return businessObjectService; }
/** * This method returns the Kra business object service. * @return */
This method returns the Kra business object service
getKraBusinessObjectService
{ "repo_name": "mukadder/kc", "path": "coeus-impl/src/main/java/org/kuali/kra/award/commitments/AwardBenefitsRatesRuleImpl.java", "license": "agpl-3.0", "size": 7163 }
[ "org.kuali.coeus.sys.framework.service.KcServiceLocator", "org.kuali.rice.krad.service.BusinessObjectService" ]
import org.kuali.coeus.sys.framework.service.KcServiceLocator; import org.kuali.rice.krad.service.BusinessObjectService;
import org.kuali.coeus.sys.framework.service.*; import org.kuali.rice.krad.service.*;
[ "org.kuali.coeus", "org.kuali.rice" ]
org.kuali.coeus; org.kuali.rice;
1,859,288
public DDIDocumentBuilder buildWithCustomNodes(TreeMap<Integer, Map<Node, String>> nodesWithParentNames) { if (envelope) { if (null != itemNode) { // packagedDocument.getDocumentElement().appendChild(itemNode); appendChildByParent("g:ResourcePackage", itemNode); refactor(itemNode, packagedDocument); } for (Integer key : nodesWithParentNames.keySet()) { Map<Node, String> map = nodesWithParentNames.get(key); for (Node node : map.keySet()) { importChildByParent(map.get(node), node); } } } if (null != resourcePackageNode) { packagedDocument.getDocumentElement().appendChild(resourcePackageNode); } else { if (null != itemNode) { // packagedDocument.appendChild(itemNode); } } return this; }
DDIDocumentBuilder function(TreeMap<Integer, Map<Node, String>> nodesWithParentNames) { if (envelope) { if (null != itemNode) { appendChildByParent(STR, itemNode); refactor(itemNode, packagedDocument); } for (Integer key : nodesWithParentNames.keySet()) { Map<Node, String> map = nodesWithParentNames.get(key); for (Node node : map.keySet()) { importChildByParent(map.get(node), node); } } } if (null != resourcePackageNode) { packagedDocument.getDocumentElement().appendChild(resourcePackageNode); } else { if (null != itemNode) { } } return this; }
/** * Build a DDIDocument with specific nodes in addition to the main node. * * @param Map<Node,String> * nodesWithParentNames * @return DDIDocumentBuilder ddiDocument */
Build a DDIDocument with specific nodes in addition to the main node
buildWithCustomNodes
{ "repo_name": "InseeFr/DDI-Access-Services", "path": "src/main/java/fr/insee/rmes/utils/ddi/DDIDocumentBuilder.java", "license": "mit", "size": 13871 }
[ "java.util.Map", "java.util.TreeMap", "org.w3c.dom.Node" ]
import java.util.Map; import java.util.TreeMap; import org.w3c.dom.Node;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
1,440,330
private Coder<?> getCoderFromFactories( TypeDescriptor<?> typeDescriptor, List<Coder<?>> typeArgumentCoders) throws CannotProvideCoderException { List<CannotProvideCoderException> suppressedExceptions = new ArrayList<>(); for (CoderProvider coderProvider : coderProviders) { try { return coderProvider.coderFor(typeDescriptor, typeArgumentCoders); } catch (CannotProvideCoderException e) { // Add all failures as suppressed exceptions. suppressedExceptions.add(e); } } // Build up the error message and list of causes. StringBuilder messageBuilder = new StringBuilder() .append("Unable to provide a Coder for ") .append(typeDescriptor) .append(".\n") .append(" Building a Coder using a registered CoderProvider failed.\n") .append(" See suppressed exceptions for detailed failures."); CannotProvideCoderException exceptionOnFailure = new CannotProvideCoderException(messageBuilder.toString()); for (CannotProvideCoderException suppressedException : suppressedExceptions) { exceptionOnFailure.addSuppressed(suppressedException); } throw exceptionOnFailure; }
Coder<?> function( TypeDescriptor<?> typeDescriptor, List<Coder<?>> typeArgumentCoders) throws CannotProvideCoderException { List<CannotProvideCoderException> suppressedExceptions = new ArrayList<>(); for (CoderProvider coderProvider : coderProviders) { try { return coderProvider.coderFor(typeDescriptor, typeArgumentCoders); } catch (CannotProvideCoderException e) { suppressedExceptions.add(e); } } StringBuilder messageBuilder = new StringBuilder() .append(STR) .append(typeDescriptor) .append(".\n") .append(STR) .append(STR); CannotProvideCoderException exceptionOnFailure = new CannotProvideCoderException(messageBuilder.toString()); for (CannotProvideCoderException suppressedException : suppressedExceptions) { exceptionOnFailure.addSuppressed(suppressedException); } throw exceptionOnFailure; }
/** * Attempts to create a {@link Coder} from any registered {@link CoderProvider} returning the * first successfully created instance. */
Attempts to create a <code>Coder</code> from any registered <code>CoderProvider</code> returning the first successfully created instance
getCoderFromFactories
{ "repo_name": "lukecwik/incubator-beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/coders/CoderRegistry.java", "license": "apache-2.0", "size": 33315 }
[ "java.util.ArrayList", "java.util.List", "org.apache.beam.sdk.values.TypeDescriptor" ]
import java.util.ArrayList; import java.util.List; import org.apache.beam.sdk.values.TypeDescriptor;
import java.util.*; import org.apache.beam.sdk.values.*;
[ "java.util", "org.apache.beam" ]
java.util; org.apache.beam;
1,469,391
protected final boolean SI16(Address value) { return (value.LE(Address.fromIntSignExtend(32767)) || value.GE(Address.fromIntSignExtend(-32768))); }
final boolean function(Address value) { return (value.LE(Address.fromIntSignExtend(32767)) value.GE(Address.fromIntSignExtend(-32768))); }
/** * returns true if a signed integer in 16 bits */
returns true if a signed integer in 16 bits
SI16
{ "repo_name": "ut-osa/laminar", "path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/compilers/opt/lir2mir/ppc/BURS_Helpers.java", "license": "bsd-3-clause", "size": 86889 }
[ "org.vmmagic.unboxed.Address" ]
import org.vmmagic.unboxed.Address;
import org.vmmagic.unboxed.*;
[ "org.vmmagic.unboxed" ]
org.vmmagic.unboxed;
550,316
protected AdminClient admin() { return client().admin(); }
AdminClient function() { return client().admin(); }
/** * Returns a random admin client. This client can either be a node or a transport client pointing to any of * the nodes in the cluster. */
Returns a random admin client. This client can either be a node or a transport client pointing to any of the nodes in the cluster
admin
{ "repo_name": "palecur/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java", "license": "apache-2.0", "size": 98171 }
[ "org.elasticsearch.client.AdminClient" ]
import org.elasticsearch.client.AdminClient;
import org.elasticsearch.client.*;
[ "org.elasticsearch.client" ]
org.elasticsearch.client;
103,386
public QueryBuilder clearFeatureCodes() { featureCodes = EnumSet.noneOf(FeatureCode.class); return this; }
QueryBuilder function() { featureCodes = EnumSet.noneOf(FeatureCode.class); return this; }
/** * Convenience method to clear any existing {@link FeatureCode} restrictions. * @return this */
Convenience method to clear any existing <code>FeatureCode</code> restrictions
clearFeatureCodes
{ "repo_name": "OpenWhere/CLAVIN", "path": "src/main/java/com/bericotech/clavin/gazetteer/query/QueryBuilder.java", "license": "apache-2.0", "size": 16999 }
[ "com.bericotech.clavin.gazetteer.FeatureCode", "java.util.EnumSet" ]
import com.bericotech.clavin.gazetteer.FeatureCode; import java.util.EnumSet;
import com.bericotech.clavin.gazetteer.*; import java.util.*;
[ "com.bericotech.clavin", "java.util" ]
com.bericotech.clavin; java.util;
524,069
// Tokens are minted with the consumer role and authorized to access tripId. TripCommands tripCommands = commandsFactory.createTripCommands( configuration.getFleetEngineAddress(), configuration.getProviderId(), () -> configuration.getMinter().getConsumerToken(TripClaims.create(tripId))); VehicleCommands vehicleCommands = commandsFactory.createVehicleCommands( configuration.getFleetEngineAddress(), configuration.getProviderId(), () -> configuration.getMinter().getConsumerToken(TripClaims.create(tripId))); // Trip id matches the trip id with the authorization claim runtime.runCommand( "Get trip with same trip id on consumer token", () -> tripCommands.getTrip(tripId)); runtime.runCommand( "Search for vehicles with consumer token", () -> vehicleCommands.searchVehicles(tripId)); // Rejected when trying to get a trip with an id other than the other one specified. String randomTripId = ScriptUtils.generateRandomTripId(); runtime.expectPermissionDenied( "Get trip fails when trip id different than consumer token trip id", () -> tripCommands.getTrip(randomTripId)); // Create trip should always fail for consumer token runtime.expectPermissionDenied( "Consumer token does not have permission to create trip", () -> tripCommands.createTrip(tripId)); }
TripCommands tripCommands = commandsFactory.createTripCommands( configuration.getFleetEngineAddress(), configuration.getProviderId(), () -> configuration.getMinter().getConsumerToken(TripClaims.create(tripId))); VehicleCommands vehicleCommands = commandsFactory.createVehicleCommands( configuration.getFleetEngineAddress(), configuration.getProviderId(), () -> configuration.getMinter().getConsumerToken(TripClaims.create(tripId))); runtime.runCommand( STR, () -> tripCommands.getTrip(tripId)); runtime.runCommand( STR, () -> vehicleCommands.searchVehicles(tripId)); String randomTripId = ScriptUtils.generateRandomTripId(); runtime.expectPermissionDenied( STR, () -> tripCommands.getTrip(randomTripId)); runtime.expectPermissionDenied( STR, () -> tripCommands.createTrip(tripId)); }
/** * Run validation script. * * @param tripId existing trip id */
Run validation script
run
{ "repo_name": "googlemaps/java-fleetengine-auth", "path": "sample/src/main/java/com/google/fleetengine/auth/sample/validation/ConsumerTokenValidationScript.java", "license": "apache-2.0", "size": 2852 }
[ "com.google.fleetengine.auth.token.TripClaims" ]
import com.google.fleetengine.auth.token.TripClaims;
import com.google.fleetengine.auth.token.*;
[ "com.google.fleetengine" ]
com.google.fleetengine;
2,666,621
public List<V> values() { final Collection<Entry<V>> values = map.values(); // Note below that e.value avoids updating the access time final List<V> res = values.stream().map(e -> e.value).collect(Collectors.toList()); return Collections.unmodifiableList(res); }
List<V> function() { final Collection<Entry<V>> values = map.values(); final List<V> res = values.stream().map(e -> e.value).collect(Collectors.toList()); return Collections.unmodifiableList(res); }
/** * Get the list of all values that are members of this cache. Does not * affect the access time used for eviction. */
Get the list of all values that are members of this cache. Does not affect the access time used for eviction
values
{ "repo_name": "eonezhang/servo", "path": "servo-core/src/main/java/com/netflix/servo/util/ExpiringCache.java", "license": "apache-2.0", "size": 5426 }
[ "java.util.Collection", "java.util.Collections", "java.util.List", "java.util.stream.Collectors" ]
import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.stream.Collectors;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
911,914
public Builder setWriteDisposition(WriteDisposition writeDisposition) { this.writeDisposition = writeDisposition; return this; }
Builder function(WriteDisposition writeDisposition) { this.writeDisposition = writeDisposition; return this; }
/** * Sets the action that should occur if the destination table already exists. * * @see <a href="https://cloud.google.com/bigquery/docs/reference/v2/jobs#configuration.query.writeDisposition"> * Write Disposition</a> */
Sets the action that should occur if the destination table already exists
setWriteDisposition
{ "repo_name": "shinfan/gcloud-java", "path": "google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/QueryJobConfiguration.java", "license": "apache-2.0", "size": 31845 }
[ "com.google.cloud.bigquery.JobInfo", "com.google.cloud.bigquery.QueryRequest" ]
import com.google.cloud.bigquery.JobInfo; import com.google.cloud.bigquery.QueryRequest;
import com.google.cloud.bigquery.*;
[ "com.google.cloud" ]
com.google.cloud;
280,862
CompletableFuture<Versioned<V>> get(K key);
CompletableFuture<Versioned<V>> get(K key);
/** * Returns the value (and version) to which the specified key is mapped, or null if this * map contains no mapping for the key. * * @param key the key whose associated value (and version) is to be returned * @return a future value (and version) to which the specified key is mapped, or null if * this map contains no mapping for the key */
Returns the value (and version) to which the specified key is mapped, or null if this map contains no mapping for the key
get
{ "repo_name": "osinstom/onos", "path": "core/api/src/main/java/org/onosproject/store/service/AsyncConsistentMap.java", "license": "apache-2.0", "size": 15961 }
[ "java.util.concurrent.CompletableFuture" ]
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,854,900
@Override protected Collection<? extends GrantedAuthority> loadUserAuthorities( DirContextOperations userData, String username, String password) { return populator.getGrantedAuthorities(userData, username); }
Collection<? extends GrantedAuthority> function( DirContextOperations userData, String username, String password) { return populator.getGrantedAuthorities(userData, username); }
/** * Returns the user authorities from the OpenLDAP */
Returns the user authorities from the OpenLDAP
loadUserAuthorities
{ "repo_name": "debard/georchestra-ird", "path": "security-proxy/src/main/java/org/georchestra/security/custom/CustomAuthenticationProvider.java", "license": "gpl-3.0", "size": 15249 }
[ "java.util.Collection", "org.springframework.ldap.core.DirContextOperations", "org.springframework.security.core.GrantedAuthority" ]
import java.util.Collection; import org.springframework.ldap.core.DirContextOperations; import org.springframework.security.core.GrantedAuthority;
import java.util.*; import org.springframework.ldap.core.*; import org.springframework.security.core.*;
[ "java.util", "org.springframework.ldap", "org.springframework.security" ]
java.util; org.springframework.ldap; org.springframework.security;
2,880,233
protected Text createFilterText(Composite parent) { filterText = super.createFilterText(parent); return filterText; }
Text function(Composite parent) { filterText = super.createFilterText(parent); return filterText; }
/** * Only used to get the Text instance. */
Only used to get the Text instance
createFilterText
{ "repo_name": "chanakaudaya/developer-studio", "path": "bps/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/VariableSelectorDialog.java", "license": "apache-2.0", "size": 7169 }
[ "org.eclipse.swt.widgets.Composite", "org.eclipse.swt.widgets.Text" ]
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,577,798
public boolean delete () { boolean success = true; List<Path> pathsCopy = new ArrayList<Path>(paths); Collections.sort(pathsCopy, LONGEST_TO_SHORTEST); for (File file : getFiles(pathsCopy)) { if (file.isDirectory()) { if (!deleteDirectory(file)) success = false; } else { if (!file.delete()) success = false; } } return success; }
boolean function () { boolean success = true; List<Path> pathsCopy = new ArrayList<Path>(paths); Collections.sort(pathsCopy, LONGEST_TO_SHORTEST); for (File file : getFiles(pathsCopy)) { if (file.isDirectory()) { if (!deleteDirectory(file)) success = false; } else { if (!file.delete()) success = false; } } return success; }
/** Deletes all the files, directories, and any files in the directories. * @return False if any file could not be deleted. */
Deletes all the files, directories, and any files in the directories
delete
{ "repo_name": "waitttttttttttttttttttttttting/apitools", "path": "apitools-web/src/main/java/com/shunwang/apitools/util/wildcard/Paths.java", "license": "apache-2.0", "size": 14589 }
[ "java.io.File", "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
250,717
private ValidationHandler retrieveValidationHandler(Map<Object, Object> context) { if (context != null) { var handler = (ValidationHandler) context.get(ValidationHandler.class); if (handler != null) { return handler; } } return new DefaultValidationHandler(); }
ValidationHandler function(Map<Object, Object> context) { if (context != null) { var handler = (ValidationHandler) context.get(ValidationHandler.class); if (handler != null) { return handler; } } return new DefaultValidationHandler(); }
/** * Retrieves validation handler from context. If none found returns a * default validation handler. * * @param context * @return Validation handler */
Retrieves validation handler from context. If none found returns a default validation handler
retrieveValidationHandler
{ "repo_name": "oehf/ipf", "path": "modules/cda/mdht/src/main/java/org/openehealth/ipf/modules/cda/CDAR2Validator.java", "license": "apache-2.0", "size": 2118 }
[ "java.util.Map", "org.openhealthtools.mdht.uml.cda.util.CDAUtil" ]
import java.util.Map; import org.openhealthtools.mdht.uml.cda.util.CDAUtil;
import java.util.*; import org.openhealthtools.mdht.uml.cda.util.*;
[ "java.util", "org.openhealthtools.mdht" ]
java.util; org.openhealthtools.mdht;
2,635,990
public static void replace(ByteString namespace, ByteString key, ByteString value) { getOrCreate().replace(namespace, key, value); }
static void function(ByteString namespace, ByteString key, ByteString value) { getOrCreate().replace(namespace, key, value); }
/** Replace the value for a key in the current baggage * * @param namespace The namespace the key resides in * @param key The key to look up * @param value The value to set for the key, removing previous values */
Replace the value for a key in the current baggage
replace
{ "repo_name": "brownsys/tracing-framework", "path": "tracingplane/client/src/main/java/edu/brown/cs/systems/baggage/BaggageContents.java", "license": "bsd-3-clause", "size": 6827 }
[ "com.google.protobuf.ByteString" ]
import com.google.protobuf.ByteString;
import com.google.protobuf.*;
[ "com.google.protobuf" ]
com.google.protobuf;
1,709,655
@RequiresPermissions("objects:read") private static ArrayList<EnvObjectLogic> getObjectByProtocol(String protocol) { ArrayList<EnvObjectLogic> list = new ArrayList<EnvObjectLogic>(); for (Iterator<EnvObjectLogic> it = ThingRepositoryImpl.iterator(); it.hasNext();) { EnvObjectLogic object = it.next(); if (object.getPojo().getProtocol().equalsIgnoreCase(protocol.trim()) // && auth.isPermitted("objects:read:" + object.getPojo().getUUID()) ) { list.add(object); } } return list; }
@RequiresPermissions(STR) static ArrayList<EnvObjectLogic> function(String protocol) { ArrayList<EnvObjectLogic> list = new ArrayList<EnvObjectLogic>(); for (Iterator<EnvObjectLogic> it = ThingRepositoryImpl.iterator(); it.hasNext();) { EnvObjectLogic object = it.next(); if (object.getPojo().getProtocol().equalsIgnoreCase(protocol.trim()) ) { list.add(object); } } return list; }
/** * Gets the object by its protocol * * @param protocol * @return */
Gets the object by its protocol
getObjectByProtocol
{ "repo_name": "bgarrels/freedomotic", "path": "framework/freedomotic-core/src/main/java/com/freedomotic/things/impl/ThingRepositoryImpl.java", "license": "gpl-2.0", "size": 21123 }
[ "com.freedomotic.things.EnvObjectLogic", "java.util.ArrayList", "java.util.Iterator", "org.apache.shiro.authz.annotation.RequiresPermissions" ]
import com.freedomotic.things.EnvObjectLogic; import java.util.ArrayList; import java.util.Iterator; import org.apache.shiro.authz.annotation.RequiresPermissions;
import com.freedomotic.things.*; import java.util.*; import org.apache.shiro.authz.annotation.*;
[ "com.freedomotic.things", "java.util", "org.apache.shiro" ]
com.freedomotic.things; java.util; org.apache.shiro;
430,390
private Date parseDate(CmsXmlContentValueLocation dateLoc) { if (dateLoc == null) { return null; } String dateStr = dateLoc.getValue().getStringValue(m_cms); if (CmsStringUtil.isEmptyOrWhitespaceOnly(dateStr)) { return null; } try { return new Date(Long.parseLong(dateStr)); } catch (Exception e) { LOG.info(e.getLocalizedMessage() + " date = " + dateStr, e); return null; } }
Date function(CmsXmlContentValueLocation dateLoc) { if (dateLoc == null) { return null; } String dateStr = dateLoc.getValue().getStringValue(m_cms); if (CmsStringUtil.isEmptyOrWhitespaceOnly(dateStr)) { return null; } try { return new Date(Long.parseLong(dateStr)); } catch (Exception e) { LOG.info(e.getLocalizedMessage() + STR + dateStr, e); return null; } }
/** * Parses a date.<p> * * @param dateLoc the location of the date * @return the date, or null if it could not be parsed */
Parses a date
parseDate
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/ui/apps/lists/daterestrictions/CmsDateRestrictionParser.java", "license": "lgpl-2.1", "size": 8040 }
[ "java.util.Date", "org.opencms.util.CmsStringUtil", "org.opencms.xml.content.CmsXmlContentValueLocation" ]
import java.util.Date; import org.opencms.util.CmsStringUtil; import org.opencms.xml.content.CmsXmlContentValueLocation;
import java.util.*; import org.opencms.util.*; import org.opencms.xml.content.*;
[ "java.util", "org.opencms.util", "org.opencms.xml" ]
java.util; org.opencms.util; org.opencms.xml;
2,805,691
@Override public void setProgress(String message, int progress, int max) { Log.d(Constants.TAG, "Send message by setProgress with progress=" + progress + ", max=" + max); Bundle data = new Bundle(); if (message != null) { data.putString(ServiceProgressHandler.DATA_MESSAGE, message); } data.putInt(ServiceProgressHandler.DATA_PROGRESS, progress); data.putInt(ServiceProgressHandler.DATA_PROGRESS_MAX, max); sendMessageToHandler(MessageStatus.UPDATE_PROGRESS, null, data); }
void function(String message, int progress, int max) { Log.d(Constants.TAG, STR + progress + STR + max); Bundle data = new Bundle(); if (message != null) { data.putString(ServiceProgressHandler.DATA_MESSAGE, message); } data.putInt(ServiceProgressHandler.DATA_PROGRESS, progress); data.putInt(ServiceProgressHandler.DATA_PROGRESS_MAX, max); sendMessageToHandler(MessageStatus.UPDATE_PROGRESS, null, data); }
/** * Set progress of ProgressDialog by sending message to handler on UI thread */
Set progress of ProgressDialog by sending message to handler on UI thread
setProgress
{ "repo_name": "thialfihar/apg", "path": "OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainService.java", "license": "gpl-3.0", "size": 33814 }
[ "android.os.Bundle", "org.sufficientlysecure.keychain.Constants", "org.sufficientlysecure.keychain.service.ServiceProgressHandler", "org.sufficientlysecure.keychain.util.Log" ]
import android.os.Bundle; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.service.ServiceProgressHandler; import org.sufficientlysecure.keychain.util.Log;
import android.os.*; import org.sufficientlysecure.keychain.*; import org.sufficientlysecure.keychain.service.*; import org.sufficientlysecure.keychain.util.*;
[ "android.os", "org.sufficientlysecure.keychain" ]
android.os; org.sufficientlysecure.keychain;
310,211
protected InputStream getStreamFromOtherSource(String imageUri, Object extra) throws IOException { throw new UnsupportedOperationException(String.format(ERROR_UNSUPPORTED_SCHEME, imageUri)); }
InputStream function(String imageUri, Object extra) throws IOException { throw new UnsupportedOperationException(String.format(ERROR_UNSUPPORTED_SCHEME, imageUri)); }
/** * Retrieves {@link java.io.InputStream} of image by URI from other source with unsupported scheme. Should be overriden by * successors to implement image downloading from special sources.<br /> * This method is called only if image URI has unsupported scheme. Throws {@link UnsupportedOperationException} by * default. * * @param imageUri Image URI * @param extra Auxiliary object which was passed to {@link DisplayImageOptions.Builder#extraForDownloader(Object) * DisplayImageOptions.extraForDownloader(Object)}; can be null * @return {@link java.io.InputStream} of image * @throws java.io.IOException if some I/O error occurs * @throws UnsupportedOperationException if image URI has unsupported scheme(protocol) */
Retrieves <code>java.io.InputStream</code> of image by URI from other source with unsupported scheme. Should be overriden by successors to implement image downloading from special sources. This method is called only if image URI has unsupported scheme. Throws <code>UnsupportedOperationException</code> by default
getStreamFromOtherSource
{ "repo_name": "liftting/XmWeiBo", "path": "XmWei/app/src/main/java/wm/xmwei/core/image/universalimageloader/core/download/BaseImageDownloader.java", "license": "apache-2.0", "size": 12151 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
179,466
public static void setLocalePL() { // lokalizacja komponentu JFileChooser UIManager.put("FileChooser.saveButtonText", "Zapisz"); UIManager.put("FileChooser.saveButtonToolTipText", "Zapisz jako"); UIManager.put("FileChooser.openButtonText", "Otwórz"); UIManager.put("FileChooser.openButtonToolTipText", "Otwórz wybrany plik"); UIManager.put("FileChooser.directoryOpenButtonText", "Otwórz"); UIManager.put("FileChooser.directoryOpenButtonToolTipText", "Otwórz wybrany plik"); UIManager.put("FileChooser.cancelButtonText", "Anuluj"); UIManager.put("FileChooser.cancelButtonToolTipText", "Anuluj i zamknij okno"); UIManager.put("FileChooser.updateButtonText", "Modyfikuj"); UIManager.put("FileChooser.helpButtonText", "Pomoc"); UIManager.put("FileChooser.fileNameLabelText", "Nazwa pliku:"); UIManager.put("FileChooser.filesOfTypeLabelText", "Pliki typu:"); UIManager.put("FileChooser.upFolderToolTipText", "Poziom do góry"); UIManager.put("FileChooser.homeFolderToolTipText", "Folder domowy"); UIManager.put("FileChooser.newFolderToolTipText", "Utwórz nowy folder"); UIManager.put("FileChooser.listViewButtonToolTipText", "Lista"); UIManager.put("FileChooser.detailsViewButtonToolTipText", "Szczegóły"); UIManager.put("FileChooser.lookInLabelText", "Szukaj w:"); UIManager.put("FileChooser.saveInLabelText", "Zapisz w:"); UIManager.put("FileChooser.acceptAllFileFilterText", "Wszystkie pliki"); }
static void function() { UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, "Pomoc"); UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, "Lista"); UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, STR); UIManager.put(STR, STR); }
/** * Statyczna metoda lokalizujaca wybrane komponenty GUI */
Statyczna metoda lokalizujaca wybrane komponenty GUI
setLocalePL
{ "repo_name": "makaw/fotik", "path": "src/gui/GUI.java", "license": "mit", "size": 9949 }
[ "javax.swing.UIManager" ]
import javax.swing.UIManager;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,429,402
public static AnnotationNode getParameter(List<AnnotationNode>[] parameterAnnotations, String annotationType, int paramIndex) { if (parameterAnnotations == null || paramIndex < 0 || paramIndex >= parameterAnnotations.length) { return null; } return Annotations.get(parameterAnnotations[paramIndex], annotationType); }
static AnnotationNode function(List<AnnotationNode>[] parameterAnnotations, String annotationType, int paramIndex) { if (parameterAnnotations == null paramIndex < 0 paramIndex >= parameterAnnotations.length) { return null; } return Annotations.get(parameterAnnotations[paramIndex], annotationType); }
/** * Get a parameter annotation of the specified class from the supplied * method node * * @param parameterAnnotations Annotations for the parameter * @param annotationType Type of annotation to search for * @param paramIndex Index of the parameter to fetch annotation for * @return the annotation, or null if not present */
Get a parameter annotation of the specified class from the supplied method node
getParameter
{ "repo_name": "SpongePowered/Mixin", "path": "src/main/java/org/spongepowered/asm/util/Annotations.java", "license": "mit", "size": 31514 }
[ "java.util.List", "org.objectweb.asm.tree.AnnotationNode" ]
import java.util.List; import org.objectweb.asm.tree.AnnotationNode;
import java.util.*; import org.objectweb.asm.tree.*;
[ "java.util", "org.objectweb.asm" ]
java.util; org.objectweb.asm;
1,426,939
return new SwingInteractiveReporter(reporter, new DefaultFileSystemUtils()); }
return new SwingInteractiveReporter(reporter, new DefaultFileSystemUtils()); }
/** * Wrap another reporter. * @param reporter the other reporter * @return a new reporter that call the other reporter and then propmts the user */
Wrap another reporter
wrap
{ "repo_name": "nikolavp/approval", "path": "approval-core/src/main/java/com/github/approval/reporters/SwingInteractiveReporter.java", "license": "apache-2.0", "size": 3938 }
[ "com.github.approval.utils.DefaultFileSystemUtils" ]
import com.github.approval.utils.DefaultFileSystemUtils;
import com.github.approval.utils.*;
[ "com.github.approval" ]
com.github.approval;
1,207,530
public void testMatchUpDifferentLines() { final ImmutableList<String> documentText = ImmutableList.of("var list = ['str1',", " 'str2',", " 'str3']"); customSetUp(documentText); LineInfo startLineInfo = document.getLastLineInfo(); Line matchLine = document.getFirstLine(); // should find the match on line 1, column 11 expect( mockAnchorManager.createAnchor(EasyMock.eq(ParenMatchHighlighter.MATCH_ANCHOR_TYPE), EasyMock.eq(matchLine), EasyMock.eq(0), EasyMock.eq(11))).andReturn(null); replay(mockAnchorManager); parenMatchHighlighter.search(SearchDirection.UP, '[', ']', startLineInfo, 10); verify(mockAnchorManager); }
void function() { final ImmutableList<String> documentText = ImmutableList.of(STR, STR, STR); customSetUp(documentText); LineInfo startLineInfo = document.getLastLineInfo(); Line matchLine = document.getFirstLine(); expect( mockAnchorManager.createAnchor(EasyMock.eq(ParenMatchHighlighter.MATCH_ANCHOR_TYPE), EasyMock.eq(matchLine), EasyMock.eq(0), EasyMock.eq(11))).andReturn(null); replay(mockAnchorManager); parenMatchHighlighter.search(SearchDirection.UP, '[', ']', startLineInfo, 10); verify(mockAnchorManager); }
/** * Starts after last ] and searches up for [ <code> * var list = ['str1', * 'str2', * 'str3'] * </code> */
Starts after last ] and searches up for [ <code> var list = ['str1', 'str2', 'str3'] </code>
testMatchUpDifferentLines
{ "repo_name": "WeTheInternet/collide", "path": "javatests/com/google/collide/client/code/parenmatch/ParenMatchHighlighterTests.java", "license": "apache-2.0", "size": 6737 }
[ "com.google.collide.client.editor.search.SearchTask", "com.google.collide.shared.document.Line", "com.google.collide.shared.document.LineInfo", "com.google.common.collect.ImmutableList", "org.easymock.EasyMock" ]
import com.google.collide.client.editor.search.SearchTask; import com.google.collide.shared.document.Line; import com.google.collide.shared.document.LineInfo; import com.google.common.collect.ImmutableList; import org.easymock.EasyMock;
import com.google.collide.client.editor.search.*; import com.google.collide.shared.document.*; import com.google.common.collect.*; import org.easymock.*;
[ "com.google.collide", "com.google.common", "org.easymock" ]
com.google.collide; com.google.common; org.easymock;
2,626,535
private void addFragmentInfo(PeakListRow mainRow, PeakListRow fragmentRow) { FragmentIdentity newIdentity = new FragmentIdentity(mainRow); fragmentRow.addPeakIdentity(newIdentity, false); // Notify the GUI about the change in the project MZmineCore.getProjectManager().getCurrentProject().notifyObjectChanged(fragmentRow, false); }
void function(PeakListRow mainRow, PeakListRow fragmentRow) { FragmentIdentity newIdentity = new FragmentIdentity(mainRow); fragmentRow.addPeakIdentity(newIdentity, false); MZmineCore.getProjectManager().getCurrentProject().notifyObjectChanged(fragmentRow, false); }
/** * Add new identity to the fragment row * * @param mainRow * @param fragmentRow */
Add new identity to the fragment row
addFragmentInfo
{ "repo_name": "mzmine/mzmine2", "path": "src/main/java/net/sf/mzmine/modules/peaklistmethods/identification/fragmentsearch/FragmentSearchTask.java", "license": "gpl-2.0", "size": 6557 }
[ "net.sf.mzmine.datamodel.PeakListRow", "net.sf.mzmine.main.MZmineCore" ]
import net.sf.mzmine.datamodel.PeakListRow; import net.sf.mzmine.main.MZmineCore;
import net.sf.mzmine.datamodel.*; import net.sf.mzmine.main.*;
[ "net.sf.mzmine" ]
net.sf.mzmine;
450,468
public static void prepareWebViewInZygote() { try { System.loadLibrary("webviewchromium_loader"); long addressSpaceToReserve = SystemProperties.getLong(CHROMIUM_WEBVIEW_VMSIZE_SIZE_PROPERTY, CHROMIUM_WEBVIEW_DEFAULT_VMSIZE_BYTES); sAddressSpaceReserved = nativeReserveAddressSpace(addressSpaceToReserve); if (sAddressSpaceReserved) { if (DEBUG) { Log.v(LOGTAG, "address space reserved: " + addressSpaceToReserve + " bytes"); } } else { Log.e(LOGTAG, "reserving " + addressSpaceToReserve + " bytes of address space failed"); } } catch (Throwable t) { // Log and discard errors at this stage as we must not crash the zygote. Log.e(LOGTAG, "error preparing native loader", t); } }
static void function() { try { System.loadLibrary(STR); long addressSpaceToReserve = SystemProperties.getLong(CHROMIUM_WEBVIEW_VMSIZE_SIZE_PROPERTY, CHROMIUM_WEBVIEW_DEFAULT_VMSIZE_BYTES); sAddressSpaceReserved = nativeReserveAddressSpace(addressSpaceToReserve); if (sAddressSpaceReserved) { if (DEBUG) { Log.v(LOGTAG, STR + addressSpaceToReserve + STR); } } else { Log.e(LOGTAG, STR + addressSpaceToReserve + STR); } } catch (Throwable t) { Log.e(LOGTAG, STR, t); } }
/** * Perform any WebView loading preparations that must happen in the zygote. * Currently, this means allocating address space to load the real JNI library later. */
Perform any WebView loading preparations that must happen in the zygote. Currently, this means allocating address space to load the real JNI library later
prepareWebViewInZygote
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "frameworks/base/core/java/android/webkit/WebViewFactory.java", "license": "gpl-3.0", "size": 20753 }
[ "android.os.SystemProperties", "android.util.Log" ]
import android.os.SystemProperties; import android.util.Log;
import android.os.*; import android.util.*;
[ "android.os", "android.util" ]
android.os; android.util;
951,155
@Element( name = "TAXES", order = 70) public Double getTaxes() { return taxes; }
@Element( name = "TAXES", order = 70) Double function() { return taxes; }
/** * Gets the taxes for the sale. This is an optional field according to the OFX spec. * @see "Section 13.9.2.4.3, OFX Spec" * * @return the transaction taxes */
Gets the taxes for the sale. This is an optional field according to the OFX spec
getTaxes
{ "repo_name": "stoicflame/ofx4j", "path": "src/main/java/com/webcohesion/ofx4j/domain/data/investment/transactions/SellInvestmentTransaction.java", "license": "apache-2.0", "size": 16738 }
[ "com.webcohesion.ofx4j.meta.Element" ]
import com.webcohesion.ofx4j.meta.Element;
import com.webcohesion.ofx4j.meta.*;
[ "com.webcohesion.ofx4j" ]
com.webcohesion.ofx4j;
1,627,663
EReference getAsset_AssetPropertyCurves();
EReference getAsset_AssetPropertyCurves();
/** * Returns the meta object for the reference list '{@link CIM.IEC61968.Assets.Asset#getAssetPropertyCurves <em>Asset Property Curves</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Asset Property Curves</em>'. * @see CIM.IEC61968.Assets.Asset#getAssetPropertyCurves() * @see #getAsset() * @generated */
Returns the meta object for the reference list '<code>CIM.IEC61968.Assets.Asset#getAssetPropertyCurves Asset Property Curves</code>'.
getAsset_AssetPropertyCurves
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/CIM/IEC61968/Assets/AssetsPackage.java", "license": "mit", "size": 88490 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,317,933
private int fillRows() { int nRow = 0; while (nRow < nVisibleDataRows) { DataModel<?> rRow = rData.getElement(nFirstRow + nRow); if (rRow.equals(rCurrentSelection)) { nSelectedRow = nRow; } fillRow(rRow, nRow++); } return nRow; }
int function() { int nRow = 0; while (nRow < nVisibleDataRows) { DataModel<?> rRow = rData.getElement(nFirstRow + nRow); if (rRow.equals(rCurrentSelection)) { nSelectedRow = nRow; } fillRow(rRow, nRow++); } return nRow; }
/*************************************** * Fills all visible rows with data. * * @return The index of the row after the last filled row */
Fills all visible rows with data
fillRows
{ "repo_name": "esoco/gewt", "path": "src/main/java/de/esoco/ewt/impl/gwt/table/GwtTable.java", "license": "apache-2.0", "size": 48655 }
[ "de.esoco.lib.model.DataModel" ]
import de.esoco.lib.model.DataModel;
import de.esoco.lib.model.*;
[ "de.esoco.lib" ]
de.esoco.lib;
1,202,844
public List<SshPairImpl> getPairs(String owner, String service) throws ServerException { return sshDao.get(owner, service); }
List<SshPairImpl> function(String owner, String service) throws ServerException { return sshDao.get(owner, service); }
/** * Returns ssh pairs by owner and service. * * @param owner the id of the user who is the owner of the ssh pairs * @param service service name of ssh pair * @return list of ssh pair with given service and owned by given service. * @throws ServerException when any other error occurs during ssh pair fetching */
Returns ssh pairs by owner and service
getPairs
{ "repo_name": "sleshchenko/che", "path": "wsmaster/che-core-api-ssh/src/main/java/org/eclipse/che/api/ssh/server/SshManager.java", "license": "epl-1.0", "size": 4294 }
[ "java.util.List", "org.eclipse.che.api.core.ServerException", "org.eclipse.che.api.ssh.server.model.impl.SshPairImpl" ]
import java.util.List; import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.ssh.server.model.impl.SshPairImpl;
import java.util.*; import org.eclipse.che.api.core.*; import org.eclipse.che.api.ssh.server.model.impl.*;
[ "java.util", "org.eclipse.che" ]
java.util; org.eclipse.che;
2,889,163
this.createContents(); this.registerEvents(); this.setWindowInitialized(true); this.setVisible(true); Display display = this.getShell().getDisplay(); while (!this.shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } }
this.createContents(); this.registerEvents(); this.setWindowInitialized(true); this.setVisible(true); Display display = this.getShell().getDisplay(); while (!this.shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } }
/** * Open the dialog. * @return the result */
Open the dialog
open
{ "repo_name": "taxi-wind/logbook", "path": "main/logbook/gui/twitter/OauthDialog.java", "license": "mit", "size": 5252 }
[ "org.eclipse.swt.widgets.Display" ]
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
628,246
private void register_table_player2() { int count = 0; List<List<PlayCard>> t1 = model.get_game().get_player2().get_player_table();
void function() { int count = 0; List<List<PlayCard>> t1 = model.get_game().get_player2().get_player_table();
/** * Register the listeners of the cards played. */
Register the listeners of the cards played
register_table_player2
{ "repo_name": "Tenza/Decktet-Magnate", "path": "Decktet - Magnate/src/magnate/ui/graphics/Table.java", "license": "gpl-3.0", "size": 29302 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,509,241
public VideoMoment interpolateTimecodeByDate(String cameraIdentifier, Date date, int millisecTolerance, double frameRate) { List<VideoMoment> videoTimes = findTimecodesNearDate(cameraIdentifier, date, millisecTolerance); VideoMoment returnTapeTime = null; if (videoTimes.size() > 1) { Timecode timecode = null; List<VideoMoment> nonNullTimecodes = new ArrayList<VideoMoment>(Collections2.filter(videoTimes, nonNullTimecodePredicate)); Collections.sort(nonNullTimecodes, new VideoMomentByDateComparator()); BigDecimal[] dates = new BigDecimal[nonNullTimecodes.size()]; BigDecimal[] frames = new BigDecimal[nonNullTimecodes.size()]; for (int i = 0; i < nonNullTimecodes.size(); i++) { VideoMoment tapeTime = nonNullTimecodes.get(i); dates[i] = new BigDecimal(tapeTime.getRecordedDate().getTime()); Timecode tc = new Timecode(tapeTime.getTimecode(), frameRate); frames[i] = new BigDecimal(tc.getFrames()); } BigDecimal[] iFrame = Matlib.interpolate(dates, frames, new BigDecimal[]{new BigDecimal(date.getTime())}); if ((iFrame != null) && (iFrame.length > 0) && (iFrame[0] != null)) { timecode = new Timecode(iFrame[0].doubleValue(), frameRate); } Timecode alternateTimecode = null; List<VideoMoment> nonNullAltTimecodes = new ArrayList<VideoMoment>(Collections2.filter(videoTimes, nonNullAlternateTimecodePredicate)); Collections.sort(nonNullAltTimecodes, new VideoMomentByDateComparator()); dates = new BigDecimal[nonNullAltTimecodes.size()]; frames = new BigDecimal[nonNullAltTimecodes.size()]; for (int i = 0; i < nonNullAltTimecodes.size(); i++) { VideoMoment tapeTime = nonNullAltTimecodes.get(i); dates[i] = new BigDecimal(tapeTime.getRecordedDate().getTime()); Timecode tc = new Timecode(tapeTime.getTimecode(), frameRate); frames[i] = new BigDecimal(tc.getFrames()); } iFrame = Matlib.interpolate(dates, frames, new BigDecimal[]{new BigDecimal(date.getTime())}); if ((iFrame != null) && (iFrame.length > 0) && (iFrame[0] != null)) { alternateTimecode = new Timecode(iFrame[0].doubleValue(), frameRate); } String tc = (timecode == null) ? VideoMoment.TIMECODE_INVALID : timecode.toString(); String altTc = (alternateTimecode == null) ? VideoMoment.TIMECODE_INVALID : alternateTimecode.toString(); returnTapeTime = new VideoMomentBean(date, tc, altTc); } return returnTapeTime; }
VideoMoment function(String cameraIdentifier, Date date, int millisecTolerance, double frameRate) { List<VideoMoment> videoTimes = findTimecodesNearDate(cameraIdentifier, date, millisecTolerance); VideoMoment returnTapeTime = null; if (videoTimes.size() > 1) { Timecode timecode = null; List<VideoMoment> nonNullTimecodes = new ArrayList<VideoMoment>(Collections2.filter(videoTimes, nonNullTimecodePredicate)); Collections.sort(nonNullTimecodes, new VideoMomentByDateComparator()); BigDecimal[] dates = new BigDecimal[nonNullTimecodes.size()]; BigDecimal[] frames = new BigDecimal[nonNullTimecodes.size()]; for (int i = 0; i < nonNullTimecodes.size(); i++) { VideoMoment tapeTime = nonNullTimecodes.get(i); dates[i] = new BigDecimal(tapeTime.getRecordedDate().getTime()); Timecode tc = new Timecode(tapeTime.getTimecode(), frameRate); frames[i] = new BigDecimal(tc.getFrames()); } BigDecimal[] iFrame = Matlib.interpolate(dates, frames, new BigDecimal[]{new BigDecimal(date.getTime())}); if ((iFrame != null) && (iFrame.length > 0) && (iFrame[0] != null)) { timecode = new Timecode(iFrame[0].doubleValue(), frameRate); } Timecode alternateTimecode = null; List<VideoMoment> nonNullAltTimecodes = new ArrayList<VideoMoment>(Collections2.filter(videoTimes, nonNullAlternateTimecodePredicate)); Collections.sort(nonNullAltTimecodes, new VideoMomentByDateComparator()); dates = new BigDecimal[nonNullAltTimecodes.size()]; frames = new BigDecimal[nonNullAltTimecodes.size()]; for (int i = 0; i < nonNullAltTimecodes.size(); i++) { VideoMoment tapeTime = nonNullAltTimecodes.get(i); dates[i] = new BigDecimal(tapeTime.getRecordedDate().getTime()); Timecode tc = new Timecode(tapeTime.getTimecode(), frameRate); frames[i] = new BigDecimal(tc.getFrames()); } iFrame = Matlib.interpolate(dates, frames, new BigDecimal[]{new BigDecimal(date.getTime())}); if ((iFrame != null) && (iFrame.length > 0) && (iFrame[0] != null)) { alternateTimecode = new Timecode(iFrame[0].doubleValue(), frameRate); } String tc = (timecode == null) ? VideoMoment.TIMECODE_INVALID : timecode.toString(); String altTc = (alternateTimecode == null) ? VideoMoment.TIMECODE_INVALID : alternateTimecode.toString(); returnTapeTime = new VideoMomentBean(date, tc, altTc); } return returnTapeTime; }
/** * Interpolates a given date to a timecode from data stored in the * datastore. * * @param cameraIdentifier The cameraIdentifier (e.g. Ventana or Tiburon) * @param date The date of that we're interested in * @param millisecTolerance Specifies the widthInMeters of the time window to pull samples * from the database * @param frameRate The Frame rate to use. At MBARI, we use NTSC (29.97 fps) * @return The interpolated tape time value. */
Interpolates a given date to a timecode from data stored in the datastore
interpolateTimecodeByDate
{ "repo_name": "hohonuuli/vars", "path": "vars-jpa/src/main/java/vars/EXPDPersistenceService.java", "license": "lgpl-2.1", "size": 9791 }
[ "com.google.common.collect.Collections2", "java.math.BigDecimal", "java.util.ArrayList", "java.util.Collections", "java.util.Date", "java.util.List", "org.mbari.vcr4j.time.Timecode" ]
import com.google.common.collect.Collections2; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; import org.mbari.vcr4j.time.Timecode;
import com.google.common.collect.*; import java.math.*; import java.util.*; import org.mbari.vcr4j.time.*;
[ "com.google.common", "java.math", "java.util", "org.mbari.vcr4j" ]
com.google.common; java.math; java.util; org.mbari.vcr4j;
1,580,831
public void removeComment(Comment comment) { if (comment == null) { throw new IllegalArgumentException("Null comment"); } if (comment.getImage().equals(this)) { comment.setImage(null); comments.remove(comment); } else { throw new IllegalArgumentException( "Comment not belongs to this image"); } }
void function(Comment comment) { if (comment == null) { throw new IllegalArgumentException(STR); } if (comment.getImage().equals(this)) { comment.setImage(null); comments.remove(comment); } else { throw new IllegalArgumentException( STR); } }
/** * Remove comment from list of comments, belongs to that image. * * @param comment * - comment to delete */
Remove comment from list of comments, belongs to that image
removeComment
{ "repo_name": "wylfrand/smart-album", "path": "smartalbum-service/src/main/java/com/mycompany/services/smartalbum/vo/ImageVO.java", "license": "gpl-3.0", "size": 10394 }
[ "com.mycompany.database.smartalbum.model.Comment" ]
import com.mycompany.database.smartalbum.model.Comment;
import com.mycompany.database.smartalbum.model.*;
[ "com.mycompany.database" ]
com.mycompany.database;
2,612,454
public void initVerify( PGPPublicKey pubKey, String provider) throws NoSuchProviderException, PGPException { initVerify(pubKey, PGPUtil.getProvider(provider)); }
void function( PGPPublicKey pubKey, String provider) throws NoSuchProviderException, PGPException { initVerify(pubKey, PGPUtil.getProvider(provider)); }
/** * Initialise the signature object for verification. * * @param pubKey * @param provider * @throws NoSuchProviderException * @throws PGPException * @deprecated use init() method. */
Initialise the signature object for verification
initVerify
{ "repo_name": "sake/bouncycastle-java", "path": "src/org/bouncycastle/openpgp/PGPOnePassSignature.java", "license": "mit", "size": 6747 }
[ "java.security.NoSuchProviderException" ]
import java.security.NoSuchProviderException;
import java.security.*;
[ "java.security" ]
java.security;
2,449,375
@Override public Component getToolbarPresenter() { return toolbarButton; }
Component function() { return toolbarButton; }
/** * Returns the toolbar component of this action * * @return component the toolbar button */
Returns the toolbar component of this action
getToolbarPresenter
{ "repo_name": "APriestman/autopsy", "path": "Core/src/org/sleuthkit/autopsy/timeline/OpenTimelineAction.java", "license": "apache-2.0", "size": 8307 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,697,679
public void assertJson(RestTest restTest, JsonNode expectedJson, JsonNode actualJson) { if (expectedJson instanceof ArrayNode) { JsonNode actualValue = actualJson; ArrayNode expectedArray = (ArrayNode) expectedJson; Assert.assertEquals("Expected JSON array but found non-array [" + actualValue.getClass().getSimpleName() + "] instead.", expectedJson.getClass(), actualValue.getClass()); ArrayNode actualArray = (ArrayNode) actualValue; Assert.assertEquals("Array size mismatch.", expectedArray.size(), actualArray.size()); String ordering = restTest.getExpectedResponseHeaders().get("X-RestTest-ArrayOrdering"); JsonNode [] expected = new JsonNode[expectedArray.size()]; JsonNode [] actual = new JsonNode[actualArray.size()]; for (int idx = 0; idx < expected.length; idx++) { expected[idx] = expectedArray.get(idx); actual[idx] = actualArray.get(idx); }
void function(RestTest restTest, JsonNode expectedJson, JsonNode actualJson) { if (expectedJson instanceof ArrayNode) { JsonNode actualValue = actualJson; ArrayNode expectedArray = (ArrayNode) expectedJson; Assert.assertEquals(STR + actualValue.getClass().getSimpleName() + STR, expectedJson.getClass(), actualValue.getClass()); ArrayNode actualArray = (ArrayNode) actualValue; Assert.assertEquals(STR, expectedArray.size(), actualArray.size()); String ordering = restTest.getExpectedResponseHeaders().get(STR); JsonNode [] expected = new JsonNode[expectedArray.size()]; JsonNode [] actual = new JsonNode[actualArray.size()]; for (int idx = 0; idx < expected.length; idx++) { expected[idx] = expectedArray.get(idx); actual[idx] = actualArray.get(idx); }
/** * Asserts that the JSON payload matches what we expected, as defined * in the configuration of the rest test. * @param restTest * @param expectedJson * @param actualJson */
Asserts that the JSON payload matches what we expected, as defined in the configuration of the rest test
assertJson
{ "repo_name": "bgaisford/apiman", "path": "test/common/src/main/java/io/apiman/test/common/util/TestPlanRunner.java", "license": "apache-2.0", "size": 25276 }
[ "io.apiman.test.common.resttest.RestTest", "org.codehaus.jackson.JsonNode", "org.codehaus.jackson.node.ArrayNode", "org.junit.Assert" ]
import io.apiman.test.common.resttest.RestTest; import org.codehaus.jackson.JsonNode; import org.codehaus.jackson.node.ArrayNode; import org.junit.Assert;
import io.apiman.test.common.resttest.*; import org.codehaus.jackson.*; import org.codehaus.jackson.node.*; import org.junit.*;
[ "io.apiman.test", "org.codehaus.jackson", "org.junit" ]
io.apiman.test; org.codehaus.jackson; org.junit;
2,239,884
private void ackStart(RuntimeMXBean rtBean) { ClusterNode locNode = localNode(); if (log.isQuiet()) { U.quiet(false, ""); U.quiet(false, "Ignite node started OK (id=" + U.id8(locNode.id()) + (F.isEmpty(igniteInstanceName) ? "" : ", instance name=" + igniteInstanceName) + ')'); } if (log.isInfoEnabled()) { log.info(""); String ack = "Ignite ver. " + VER_STR + '#' + BUILD_TSTAMP_STR + "-sha1:" + REV_HASH_STR; String dash = U.dash(ack.length()); SB sb = new SB(); for (GridPortRecord rec : ctx.ports().records()) sb.a(rec.protocol()).a(":").a(rec.port()).a(" "); String str = NL + NL + ">>> " + dash + NL + ">>> " + ack + NL + ">>> " + dash + NL + ">>> OS name: " + U.osString() + NL + ">>> CPU(s): " + locNode.metrics().getTotalCpus() + NL + ">>> Heap: " + U.heapSize(locNode, 2) + "GB" + NL + ">>> VM name: " + rtBean.getName() + NL + (igniteInstanceName == null ? "" : ">>> Ignite instance name: " + igniteInstanceName + NL) + ">>> Local node [" + "ID=" + locNode.id().toString().toUpperCase() + ", order=" + locNode.order() + ", clientMode=" + ctx.clientNode() + "]" + NL + ">>> Local node addresses: " + U.addressesAsString(locNode) + NL + ">>> Local ports: " + sb + NL; log.info(str); } }
void function(RuntimeMXBean rtBean) { ClusterNode locNode = localNode(); if (log.isQuiet()) { U.quiet(false, STRIgnite node started OK (id=STRSTR, instance name=STRSTRIgnite ver. STR-sha1:STR:STR STR>>> STR>>> STR>>> STR>>> OS name: STR>>> CPU(s): STR>>> Heap: STRGBSTR>>> VM name: STRSTR>>> Ignite instance name: STR>>> Local node [STRID=STR, order=STR, clientMode=STR]STR>>> Local node addresses: STR>>> Local ports: " + sb + NL; log.info(str); } }
/** * Prints start info. * * @param rtBean Java runtime bean. */
Prints start info
ackStart
{ "repo_name": "pperalta/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java", "license": "apache-2.0", "size": 133143 }
[ "java.lang.management.RuntimeMXBean", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.util.typedef.internal.U" ]
import java.lang.management.RuntimeMXBean; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.util.typedef.internal.U;
import java.lang.management.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "java.lang", "org.apache.ignite" ]
java.lang; org.apache.ignite;
749,872
public String waitOnMaster(int serverNumber) { JVMClusterUtil.MasterThread masterThread = this.masterThreads.remove(serverNumber); while (masterThread.isAlive()) { try { LOG.info("Waiting on " + masterThread.getMaster().getServerName().toString()); masterThread.join(); } catch (InterruptedException e) { e.printStackTrace(); } } return masterThread.getName(); }
String function(int serverNumber) { JVMClusterUtil.MasterThread masterThread = this.masterThreads.remove(serverNumber); while (masterThread.isAlive()) { try { LOG.info(STR + masterThread.getMaster().getServerName().toString()); masterThread.join(); } catch (InterruptedException e) { e.printStackTrace(); } } return masterThread.getName(); }
/** * Wait for the specified master to stop * Removes this thread from list of running threads. * @param serverNumber * @return Name of master that just went down. */
Wait for the specified master to stop Removes this thread from list of running threads
waitOnMaster
{ "repo_name": "grokcoder/pbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java", "license": "apache-2.0", "size": 16019 }
[ "org.apache.hadoop.hbase.util.JVMClusterUtil" ]
import org.apache.hadoop.hbase.util.JVMClusterUtil;
import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,444,360
protected void playErrorSound() { AudioManager audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE); audio.playSoundEffect(Sounds.ERROR); }
void function() { AudioManager audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE); audio.playSoundEffect(Sounds.ERROR); }
/** * Play the standard Glass failure sound */
Play the standard Glass failure sound
playErrorSound
{ "repo_name": "victorkp/GlassAuth", "path": "library/app/src/main/java/com/victor/kaiser/pendergrast/auth/AuthActivity.java", "license": "mit", "size": 7708 }
[ "android.content.Context", "android.media.AudioManager", "com.google.android.glass.media.Sounds" ]
import android.content.Context; import android.media.AudioManager; import com.google.android.glass.media.Sounds;
import android.content.*; import android.media.*; import com.google.android.glass.media.*;
[ "android.content", "android.media", "com.google.android" ]
android.content; android.media; com.google.android;
1,208,978
protected List listObjectsByNamedQuery(String qryName, Map qryParams, Collection col, String colLabel) { if (col.isEmpty()) { return Collections.EMPTY_LIST; } ArrayList<Long> tmpList = new ArrayList<Long>(); List<Long> toRet = new ArrayList<Long>(); tmpList.addAll(col); for (int i = 0; i < col.size();) { int initial = i; int fin = i + 500 < col.size() ? i + 500 : col.size(); List<Long> sublist = tmpList.subList(i, fin); qryParams.put(colLabel, sublist); toRet.addAll(listObjectsByNamedQuery(qryName, qryParams, false)); i = fin; } return toRet; }
List function(String qryName, Map qryParams, Collection col, String colLabel) { if (col.isEmpty()) { return Collections.EMPTY_LIST; } ArrayList<Long> tmpList = new ArrayList<Long>(); List<Long> toRet = new ArrayList<Long>(); tmpList.addAll(col); for (int i = 0; i < col.size();) { int initial = i; int fin = i + 500 < col.size() ? i + 500 : col.size(); List<Long> sublist = tmpList.subList(i, fin); qryParams.put(colLabel, sublist); toRet.addAll(listObjectsByNamedQuery(qryName, qryParams, false)); i = fin; } return toRet; }
/** * Using a named query, find all the objects matching the criteria within. * Warning: This can be very expensive if the returned list is large. Use * only for small tables with static data * @param qryName Named query to use to find a list of objects. * @param qryParams Map of named bind parameters whose keys are Strings. The * map can also be null. * @param col the collection to use as an inclause * @param colLabel the label the collection will have * @return List of objects returned by named query, or null if nothing * found. */
Using a named query, find all the objects matching the criteria within. Warning: This can be very expensive if the returned list is large. Use only for small tables with static data
listObjectsByNamedQuery
{ "repo_name": "colloquium/spacewalk", "path": "java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java", "license": "gpl-2.0", "size": 19375 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,724,183
@Test public void testHAConfWithoutLeaderElection() { Configuration conf = new Configuration(configuration); conf.setBoolean(YarnConfiguration.RM_HA_ENABLED, true); conf.setBoolean(YarnConfiguration.AUTO_FAILOVER_ENABLED, true); conf.setBoolean(YarnConfiguration.AUTO_FAILOVER_EMBEDDED, false); conf.setBoolean(YarnConfiguration.CURATOR_LEADER_ELECTOR, false); conf.set(YarnConfiguration.RM_HA_IDS, "rm1,rm2"); int base = 100; for (String confKey : YarnConfiguration.getServiceAddressConfKeys(configuration)) { conf.set(HAUtil.addSuffix(confKey, "rm1"), "0.0.0.0:" + (base + 20)); conf.set(HAUtil.addSuffix(confKey, "rm2"), "0.0.0.0:" + (base + 40)); base = base * 2; } conf.set(YarnConfiguration.RM_HA_ID, "rm1"); checkBadConfiguration(conf); }
void function() { Configuration conf = new Configuration(configuration); conf.setBoolean(YarnConfiguration.RM_HA_ENABLED, true); conf.setBoolean(YarnConfiguration.AUTO_FAILOVER_ENABLED, true); conf.setBoolean(YarnConfiguration.AUTO_FAILOVER_EMBEDDED, false); conf.setBoolean(YarnConfiguration.CURATOR_LEADER_ELECTOR, false); conf.set(YarnConfiguration.RM_HA_IDS, STR); int base = 100; for (String confKey : YarnConfiguration.getServiceAddressConfKeys(configuration)) { conf.set(HAUtil.addSuffix(confKey, "rm1"), STR + (base + 20)); conf.set(HAUtil.addSuffix(confKey, "rm2"), STR + (base + 40)); base = base * 2; } conf.set(YarnConfiguration.RM_HA_ID, "rm1"); checkBadConfiguration(conf); }
/** * Test that a configuration with no leader election configured fails. */
Test that a configuration with no leader election configured fails
testHAConfWithoutLeaderElection
{ "repo_name": "xiao-chen/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMAdminService.java", "license": "apache-2.0", "size": 65029 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.yarn.conf.HAUtil", "org.apache.hadoop.yarn.conf.YarnConfiguration" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.yarn.conf.HAUtil; import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.conf.*; import org.apache.hadoop.yarn.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,495,247
public String getCacheKey() { return cacheKey; } public static class SingleSegmentRepresentation extends Representation { public final Uri uri; public final long contentLength; private final RangedUri indexUri; private final DashSingleSegmentIndex segmentIndex;
String function() { return cacheKey; } public static class SingleSegmentRepresentation extends Representation { public final Uri uri; public final long contentLength; private final RangedUri indexUri; private final DashSingleSegmentIndex segmentIndex;
/** * A cache key for the {@link Representation}, in the format * {@code contentId + "." + format.id + "." + revisionId}. * * @return A cache key. */
A cache key for the <code>Representation</code>, in the format contentId + "." + format.id + "." + revisionId
getCacheKey
{ "repo_name": "ppamorim/ExoPlayer", "path": "library/src/main/java/com/google/android/exoplayer/dash/mpd/Representation.java", "license": "apache-2.0", "size": 10721 }
[ "android.net.Uri" ]
import android.net.Uri;
import android.net.*;
[ "android.net" ]
android.net;
1,102,540
@ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable<DatastoreInner> list(String resourceGroupName, String privateCloudName, String clusterName) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, clusterName)); }
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<DatastoreInner> function(String resourceGroupName, String privateCloudName, String clusterName) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, clusterName)); }
/** * List datastores in a private cloud cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster in the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paged list of datastores. */
List datastores in a private cloud cluster
list
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java", "license": "mit", "size": 60129 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.resourcemanager.avs.fluent.models.DatastoreInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.avs.fluent.models.DatastoreInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.avs.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,633,065
@Nonnull public OutlookCategoryRequestBuilder masterCategories(@Nonnull final String id) { return new OutlookCategoryRequestBuilder(getRequestUrlWithAdditionalSegment("masterCategories") + "/" + id, getClient(), null); }
OutlookCategoryRequestBuilder function(@Nonnull final String id) { return new OutlookCategoryRequestBuilder(getRequestUrlWithAdditionalSegment(STR) + "/" + id, getClient(), null); }
/** * Gets a request builder for the OutlookCategory item * * @return the request builder * @param id the item identifier */
Gets a request builder for the OutlookCategory item
masterCategories
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/OutlookUserRequestBuilder.java", "license": "mit", "size": 4739 }
[ "com.microsoft.graph.requests.OutlookCategoryRequestBuilder", "javax.annotation.Nonnull" ]
import com.microsoft.graph.requests.OutlookCategoryRequestBuilder; import javax.annotation.Nonnull;
import com.microsoft.graph.requests.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
1,102,755
@JsonSerialize(include = Inclusion.NON_EMPTY) @JsonProperty("host_overrides") public List<HostOverride> getHostOverrides() { return hostOverrides; } public static class HostOverride { private String hostName; private String versionOverrideTag; public HostOverride(String name, String tag) { hostName = name; versionOverrideTag = tag; }
@JsonSerialize(include = Inclusion.NON_EMPTY) @JsonProperty(STR) List<HostOverride> function() { return hostOverrides; } public static class HostOverride { private String hostName; private String versionOverrideTag; public HostOverride(String name, String tag) { hostName = name; versionOverrideTag = tag; }
/** * Gets the host overrides for the desired config. Cluster-based desired configs only. * @return the host names that override the desired config */
Gets the host overrides for the desired config. Cluster-based desired configs only
getHostOverrides
{ "repo_name": "telefonicaid/fiware-cosmos-ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/state/DesiredConfig.java", "license": "apache-2.0", "size": 4275 }
[ "java.util.List", "org.codehaus.jackson.annotate.JsonProperty", "org.codehaus.jackson.map.annotate.JsonSerialize" ]
import java.util.List; import org.codehaus.jackson.annotate.JsonProperty; import org.codehaus.jackson.map.annotate.JsonSerialize;
import java.util.*; import org.codehaus.jackson.annotate.*; import org.codehaus.jackson.map.annotate.*;
[ "java.util", "org.codehaus.jackson" ]
java.util; org.codehaus.jackson;
609,606
private Section layoutSection(Composite parent) { Section result = nabuccoFormToolKit.createSection(parent, SECTION_TITLE, new GridLayout(1, true)); return result; }
Section function(Composite parent) { Section result = nabuccoFormToolKit.createSection(parent, SECTION_TITLE, new GridLayout(1, true)); return result; }
/** * Layout the section. * * @param parent * the parent frame * * @return the layouted section */
Layout the section
layoutSection
{ "repo_name": "NABUCCO/org.nabucco.framework.common.dynamiccode", "path": "org.nabucco.framework.common.dynamiccode.ui.rcp/src/main/man/org/nabucco/framework/common/dynamiccode/ui/rcp/search/code/view/DynamicCodeCodeSearchViewLayouter.java", "license": "epl-1.0", "size": 4641 }
[ "org.eclipse.swt.layout.GridLayout", "org.eclipse.swt.widgets.Composite", "org.eclipse.ui.forms.widgets.Section" ]
import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.eclipse.ui.forms.widgets.*;
[ "org.eclipse.swt", "org.eclipse.ui" ]
org.eclipse.swt; org.eclipse.ui;
326,338
@SimpleProperty(description = "Whether Bluetooth is enabled", category = PropertyCategory.BEHAVIOR) public boolean Enabled() { Object bluetoothAdapter = BluetoothReflection.getBluetoothAdapter(); if (bluetoothAdapter != null) { if (BluetoothReflection.isBluetoothEnabled(bluetoothAdapter)) { return true; } } return false; }
@SimpleProperty(description = STR, category = PropertyCategory.BEHAVIOR) boolean function() { Object bluetoothAdapter = BluetoothReflection.getBluetoothAdapter(); if (bluetoothAdapter != null) { if (BluetoothReflection.isBluetoothEnabled(bluetoothAdapter)) { return true; } } return false; }
/** * Returns true if Bluetooth is enabled, false otherwise. * * @return true if Bluetooth is enabled, false otherwise */
Returns true if Bluetooth is enabled, false otherwise
Enabled
{ "repo_name": "Mateopato/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/BluetoothConnectionBase.java", "license": "apache-2.0", "size": 26395 }
[ "com.google.appinventor.components.annotations.PropertyCategory", "com.google.appinventor.components.annotations.SimpleProperty", "com.google.appinventor.components.runtime.util.BluetoothReflection" ]
import com.google.appinventor.components.annotations.PropertyCategory; import com.google.appinventor.components.annotations.SimpleProperty; import com.google.appinventor.components.runtime.util.BluetoothReflection;
import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.runtime.util.*;
[ "com.google.appinventor" ]
com.google.appinventor;
355,020
public interface InitialContextFactoryBuilder { public InitialContextFactory createInitialContextFactory(Hashtable<?, ?> environment) throws NamingException;
interface InitialContextFactoryBuilder { public InitialContextFactory function(Hashtable<?, ?> environment) throws NamingException;
/** * Creates an initial context factory using the specified * environment. *<p> * The environment parameter is owned by the caller. * The implementation will not modify the object or keep a reference * to it, although it may keep a reference to a clone or copy. * * @param environment Environment used in creating an initial * context implementation. Can be null. * @return A non-null initial context factory. * @exception NamingException If an initial context factory could not be created. */
Creates an initial context factory using the specified environment. The environment parameter is owned by the caller. The implementation will not modify the object or keep a reference to it, although it may keep a reference to a clone or copy
createInitialContextFactory
{ "repo_name": "wangsongpeng/jdk-src", "path": "src/main/java/javax/naming/spi/InitialContextFactoryBuilder.java", "license": "apache-2.0", "size": 1996 }
[ "java.util.Hashtable", "javax.naming.NamingException" ]
import java.util.Hashtable; import javax.naming.NamingException;
import java.util.*; import javax.naming.*;
[ "java.util", "javax.naming" ]
java.util; javax.naming;
73,094
synchronized (lock) { // first shutdown the thread pool ScheduledExecutorService es = this.executorService; if (es != null) { es.shutdown(); try { es.awaitTermination(cleanupInterval, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { // may happen } } entries.clear(); jobRefHolders.clear(); // clean up the all storage directories for (File dir : storageDirectories) { try { FileUtils.deleteDirectory(dir); LOG.info("removed file cache directory {}", dir.getAbsolutePath()); } catch (IOException e) { LOG.error("File cache could not properly clean up storage directory: {}", dir.getAbsolutePath(), e); } } // Remove shutdown hook to prevent resource leaks ShutdownHookUtil.removeShutdownHook(shutdownHook, getClass().getSimpleName(), LOG); } } // ------------------------------------------------------------------------
synchronized (lock) { ScheduledExecutorService es = this.executorService; if (es != null) { es.shutdown(); try { es.awaitTermination(cleanupInterval, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { } } entries.clear(); jobRefHolders.clear(); for (File dir : storageDirectories) { try { FileUtils.deleteDirectory(dir); LOG.info(STR, dir.getAbsolutePath()); } catch (IOException e) { LOG.error(STR, dir.getAbsolutePath(), e); } } ShutdownHookUtil.removeShutdownHook(shutdownHook, getClass().getSimpleName(), LOG); } }
/** * Shuts down the file cache by cancelling all. */
Shuts down the file cache by cancelling all
shutdown
{ "repo_name": "ueshin/apache-flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/filecache/FileCache.java", "license": "apache-2.0", "size": 11259 }
[ "java.io.File", "java.io.IOException", "java.util.concurrent.ScheduledExecutorService", "java.util.concurrent.TimeUnit", "org.apache.flink.util.FileUtils", "org.apache.flink.util.ShutdownHookUtil" ]
import java.io.File; import java.io.IOException; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import org.apache.flink.util.FileUtils; import org.apache.flink.util.ShutdownHookUtil;
import java.io.*; import java.util.concurrent.*; import org.apache.flink.util.*;
[ "java.io", "java.util", "org.apache.flink" ]
java.io; java.util; org.apache.flink;
427,396
private void updateContents(String documentId, byte[] contents) throws DataAccessException { if(contents == null) { return; } // Lookup the document's URL. String documentUrl = getDocumentUrl(documentId); // Update the size in the database. try { getJdbcTemplate().update(SQL_UPDATE_SIZE, new Object[] { contents.length, documentId }); } catch(org.springframework.dao.DataAccessException e) { throw new DataAccessException("Error executing SQL '" + SQL_UPDATE_SIZE + "' with parameters: " + contents.length + ", " + documentId, e); } // Write the new contents to the document. try { // TODO: If we are really going to support any URL, then we need to // find a way to be able to write to URLs as well. Currently, we // are only writing to files, so that is what is "hard coded." But, // we really need to switch the writer based on the URL. FileOutputStream fileOutputStream = new FileOutputStream(new URL(documentUrl).getFile()); fileOutputStream.write(contents); fileOutputStream.flush(); fileOutputStream.close(); } catch(MalformedURLException e) { throw new DataAccessException("The URL pointing to this resource is broken. This could be a major issue.", e); } catch(FileNotFoundException e) { throw new DataAccessException("The file that this URL points to is missing. This could be a major issue.", e); } catch(SecurityException e) { throw new DataAccessException("We don't have permissions to open a connection or write to a document.", e); } catch (IOException e) { throw new DataAccessException("There was an error writing to the URL.", e); } }
void function(String documentId, byte[] contents) throws DataAccessException { if(contents == null) { return; } String documentUrl = getDocumentUrl(documentId); try { getJdbcTemplate().update(SQL_UPDATE_SIZE, new Object[] { contents.length, documentId }); } catch(org.springframework.dao.DataAccessException e) { throw new DataAccessException(STR + SQL_UPDATE_SIZE + STR + contents.length + STR + documentId, e); } try { FileOutputStream fileOutputStream = new FileOutputStream(new URL(documentUrl).getFile()); fileOutputStream.write(contents); fileOutputStream.flush(); fileOutputStream.close(); } catch(MalformedURLException e) { throw new DataAccessException(STR, e); } catch(FileNotFoundException e) { throw new DataAccessException(STR, e); } catch(SecurityException e) { throw new DataAccessException(STR, e); } catch (IOException e) { throw new DataAccessException(STR, e); } }
/** * Updates the file's size in the database and updates the contents on the * disk. If the contents is null, nothing happens. * * @param documentId The unique identifier for the document. * * @param contents The new contents of the document. */
Updates the file's size in the database and updates the contents on the disk. If the contents is null, nothing happens
updateContents
{ "repo_name": "HaiJiaoXinHeng/server-1", "path": "src/org/ohmage/query/impl/DocumentQueries.java", "license": "apache-2.0", "size": 49677 }
[ "java.io.FileNotFoundException", "java.io.FileOutputStream", "java.io.IOException", "java.net.MalformedURLException", "org.ohmage.exception.DataAccessException" ]
import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.net.MalformedURLException; import org.ohmage.exception.DataAccessException;
import java.io.*; import java.net.*; import org.ohmage.exception.*;
[ "java.io", "java.net", "org.ohmage.exception" ]
java.io; java.net; org.ohmage.exception;
1,819,037
ImmutableValue<Boolean> connectedWest();
ImmutableValue<Boolean> connectedWest();
/** * Gets the {@link ImmutableValue} for whether {@link Direction#WEST} is * "connected". * * @return The immutable value for the west direction */
Gets the <code>ImmutableValue</code> for whether <code>Direction#WEST</code> is "connected"
connectedWest
{ "repo_name": "Lergin/SpongeAPI", "path": "src/main/java/org/spongepowered/api/data/manipulator/immutable/block/ImmutableConnectedDirectionData.java", "license": "mit", "size": 3222 }
[ "org.spongepowered.api.data.value.immutable.ImmutableValue" ]
import org.spongepowered.api.data.value.immutable.ImmutableValue;
import org.spongepowered.api.data.value.immutable.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
1,450,714
TaskSummaryQueryBuilder taskSummaryQuery(String userId);
TaskSummaryQueryBuilder taskSummaryQuery(String userId);
/** * Query on {@link TaskSummary} instaances. * @param userId The user associated with the tasks queried. * @return A {@link TaskSummaryQueryBuilder} used to create the query. */
Query on <code>TaskSummary</code> instaances
taskSummaryQuery
{ "repo_name": "pleacu/jbpm", "path": "jbpm-services/jbpm-services-api/src/main/java/org/jbpm/services/api/RuntimeDataService.java", "license": "apache-2.0", "size": 26171 }
[ "org.kie.internal.task.query.TaskSummaryQueryBuilder" ]
import org.kie.internal.task.query.TaskSummaryQueryBuilder;
import org.kie.internal.task.query.*;
[ "org.kie.internal" ]
org.kie.internal;
383,151
public FileInfoDescriptor getFileInfoDescriptor(SchemaDescriptor sd, String name) throws StandardException;
FileInfoDescriptor function(SchemaDescriptor sd, String name) throws StandardException;
/** * Get a FileInfoDescriptor given its SQL name and * schema name. * * @param sd the schema that holds the FileInfoDescriptor. * @param name SQL name of file. * * @exception StandardException Thrown on failure */
Get a FileInfoDescriptor given its SQL name and schema name
getFileInfoDescriptor
{ "repo_name": "gemxd/gemfirexd-oss", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/sql/dictionary/DataDictionary.java", "license": "apache-2.0", "size": 73679 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException" ]
import com.pivotal.gemfirexd.internal.iapi.error.StandardException;
import com.pivotal.gemfirexd.internal.iapi.error.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
99,879
protected Collection readIndices(DatabaseMetaDataWrapper metaData, String tableName) throws SQLException { Map indices = new ListOrderedMap(); ResultSet indexData = null; try { indexData = metaData.getIndices(tableName, false, false); while (indexData.next()) { Map values = readColumns(indexData, getColumnsForIndex()); readIndex(metaData, values, indices); } } finally { if (indexData != null) { indexData.close(); } } return indices.values(); } /** * Reads the next index spec from the result set. * * @param metaData The database meta data * @param values The index meta data as defined by {@link #getColumnsForIndex()}
Collection function(DatabaseMetaDataWrapper metaData, String tableName) throws SQLException { Map indices = new ListOrderedMap(); ResultSet indexData = null; try { indexData = metaData.getIndices(tableName, false, false); while (indexData.next()) { Map values = readColumns(indexData, getColumnsForIndex()); readIndex(metaData, values, indices); } } finally { if (indexData != null) { indexData.close(); } } return indices.values(); } /** * Reads the next index spec from the result set. * * @param metaData The database meta data * @param values The index meta data as defined by {@link #getColumnsForIndex()}
/** * Determines the indices for the indicated table. * * @param metaData The database meta data * @param tableName The name of the table * @return The list of indices */
Determines the indices for the indicated table
readIndices
{ "repo_name": "etiago/apache-ddlutils", "path": "src/java/org/apache/ddlutils/platform/JdbcModelReader.java", "license": "apache-2.0", "size": 41971 }
[ "java.sql.ResultSet", "java.sql.SQLException", "java.util.Collection", "java.util.Map", "org.apache.commons.collections.map.ListOrderedMap" ]
import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; import java.util.Map; import org.apache.commons.collections.map.ListOrderedMap;
import java.sql.*; import java.util.*; import org.apache.commons.collections.map.*;
[ "java.sql", "java.util", "org.apache.commons" ]
java.sql; java.util; org.apache.commons;
1,359,505
public boolean removeParameter(String paramName, String paramValue) throws IllegalArgumentException { LOG.trace("enter PostMethod.removeParameter(String, String)"); if (paramName == null) { throw new IllegalArgumentException("Parameter name may not be null"); } if (paramValue == null) { throw new IllegalArgumentException("Parameter value may not be null"); } Iterator iter = this.params.iterator(); while (iter.hasNext()) { NameValuePair pair = (NameValuePair) iter.next(); if (paramName.equals(pair.getName()) && paramValue.equals(pair.getValue())) { iter.remove(); return true; } } return false; }
boolean function(String paramName, String paramValue) throws IllegalArgumentException { LOG.trace(STR); if (paramName == null) { throw new IllegalArgumentException(STR); } if (paramValue == null) { throw new IllegalArgumentException(STR); } Iterator iter = this.params.iterator(); while (iter.hasNext()) { NameValuePair pair = (NameValuePair) iter.next(); if (paramName.equals(pair.getName()) && paramValue.equals(pair.getValue())) { iter.remove(); return true; } } return false; }
/** * Removes all parameter with the given paramName and paramValue. If there * is more than one parameter with the given paramName, only one is * removed. If there are none, then the request is ignored. * * @param paramName The parameter name to remove. * @param paramValue The parameter value to remove. * * @return true if a parameter was removed. * * @throws IllegalArgumentException when param name or value are null * * @since 2.0 */
Removes all parameter with the given paramName and paramValue. If there is more than one parameter with the given paramName, only one is removed. If there are none, then the request is ignored
removeParameter
{ "repo_name": "magneticmoon/httpclient3-ntml", "path": "src/java/org/apache/commons/httpclient/methods/PostMethod.java", "license": "apache-2.0", "size": 13417 }
[ "java.util.Iterator", "org.apache.commons.httpclient.NameValuePair" ]
import java.util.Iterator; import org.apache.commons.httpclient.NameValuePair;
import java.util.*; import org.apache.commons.httpclient.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
100,949
public static ByteArrayDataInput newDataInput(byte[] bytes, int start) { Preconditions.checkPositionIndex(start, bytes.length); return new ByteArrayDataInputStream(bytes, start); } private static class ByteArrayDataInputStream implements ByteArrayDataInput { final DataInput input; ByteArrayDataInputStream(byte[] bytes) { this.input = new DataInputStream(new ByteArrayInputStream(bytes)); } ByteArrayDataInputStream(byte[] bytes, int start) { this.input = new DataInputStream( new ByteArrayInputStream(bytes, start, bytes.length - start)); }
static ByteArrayDataInput function(byte[] bytes, int start) { Preconditions.checkPositionIndex(start, bytes.length); return new ByteArrayDataInputStream(bytes, start); } private static class ByteArrayDataInputStream implements ByteArrayDataInput { final DataInput input; ByteArrayDataInputStream(byte[] bytes) { this.input = new DataInputStream(new ByteArrayInputStream(bytes)); } ByteArrayDataInputStream(byte[] bytes, int start) { this.input = new DataInputStream( new ByteArrayInputStream(bytes, start, bytes.length - start)); }
/** * Returns a new {@link ByteArrayDataInput} instance to read from the {@code * bytes} array, starting at the given position. * * @throws IndexOutOfBoundsException if {@code start} is negative or greater * than the length of the array */
Returns a new <code>ByteArrayDataInput</code> instance to read from the bytes array, starting at the given position
newDataInput
{ "repo_name": "eugeneiiim/AndroidCollections", "path": "src/com/google/common/io/ByteStreams.java", "license": "apache-2.0", "size": 24892 }
[ "com.google.common.base.Preconditions", "java.io.ByteArrayInputStream", "java.io.DataInput", "java.io.DataInputStream" ]
import com.google.common.base.Preconditions; import java.io.ByteArrayInputStream; import java.io.DataInput; import java.io.DataInputStream;
import com.google.common.base.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
2,369,679
private void statInit() throws Exception { lDocumentNo.setLabelFor(fDocumentNo); fDocumentNo.setBackground(AdempierePLAF.getInfoBackground()); fDocumentNo.addActionListener(this); fIsReceipt.setSelected(!"N".equals(Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx"))); fIsReceipt.addActionListener(this); // // fOrg_ID = new VLookup("AD_Org_ID", false, false, true, // MLookupFactory.create(Env.getCtx(), 3486, m_WindowNo, DisplayType.TableDir, false), // DisplayType.TableDir, m_WindowNo); // lOrg_ID.setLabelFor(fOrg_ID); // fOrg_ID.setBackground(AdempierePLAF.getInfoBackground()); fBPartner_ID = new VLookup("C_BPartner_ID", false, false, true, MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, 3499, DisplayType.Search)); lBPartner_ID.setLabelFor(fBPartner_ID); fBPartner_ID.setBackground(AdempierePLAF.getInfoBackground()); // lDateFrom.setLabelFor(fDateFrom); fDateFrom.setBackground(AdempierePLAF.getInfoBackground()); fDateFrom.setToolTipText(Msg.translate(Env.getCtx(), "DateFrom")); lDateTo.setLabelFor(fDateTo); fDateTo.setBackground(AdempierePLAF.getInfoBackground()); fDateTo.setToolTipText(Msg.translate(Env.getCtx(), "DateTo")); lAmtFrom.setLabelFor(fAmtFrom); fAmtFrom.setBackground(AdempierePLAF.getInfoBackground()); fAmtFrom.setToolTipText(Msg.translate(Env.getCtx(), "AmtFrom")); lAmtTo.setLabelFor(fAmtTo); fAmtTo.setBackground(AdempierePLAF.getInfoBackground()); fAmtTo.setToolTipText(Msg.translate(Env.getCtx(), "AmtTo")); // parameterPanel.setLayout(new ALayout()); // First Row parameterPanel.add(lDocumentNo, new ALayoutConstraint(0,0)); parameterPanel.add(fDocumentNo, null); parameterPanel.add(lBPartner_ID, null); parameterPanel.add(fBPartner_ID, null); parameterPanel.add(fIsReceipt, new ALayoutConstraint(0,5)); // 2nd Row parameterPanel.add(lDateFrom, new ALayoutConstraint(1,2)); parameterPanel.add(fDateFrom, null); parameterPanel.add(lDateTo, null); parameterPanel.add(fDateTo, null); // 3rd Row parameterPanel.add(lAmtFrom, new ALayoutConstraint(2,2)); parameterPanel.add(fAmtFrom, null); parameterPanel.add(lAmtTo, null); parameterPanel.add(fAmtTo, null); // parameterPanel.add(lOrg_ID, null); // parameterPanel.add(fOrg_ID, null); } // statInit
void function() throws Exception { lDocumentNo.setLabelFor(fDocumentNo); fDocumentNo.setBackground(AdempierePLAF.getInfoBackground()); fDocumentNo.addActionListener(this); fIsReceipt.setSelected(!"N".equals(Env.getContext(Env.getCtx(), p_WindowNo, STR))); fIsReceipt.addActionListener(this); fBPartner_ID = new VLookup(STR, false, false, true, MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, 3499, DisplayType.Search)); lBPartner_ID.setLabelFor(fBPartner_ID); fBPartner_ID.setBackground(AdempierePLAF.getInfoBackground()); lDateFrom.setLabelFor(fDateFrom); fDateFrom.setBackground(AdempierePLAF.getInfoBackground()); fDateFrom.setToolTipText(Msg.translate(Env.getCtx(), STR)); lDateTo.setLabelFor(fDateTo); fDateTo.setBackground(AdempierePLAF.getInfoBackground()); fDateTo.setToolTipText(Msg.translate(Env.getCtx(), STR)); lAmtFrom.setLabelFor(fAmtFrom); fAmtFrom.setBackground(AdempierePLAF.getInfoBackground()); fAmtFrom.setToolTipText(Msg.translate(Env.getCtx(), STR)); lAmtTo.setLabelFor(fAmtTo); fAmtTo.setBackground(AdempierePLAF.getInfoBackground()); fAmtTo.setToolTipText(Msg.translate(Env.getCtx(), "AmtTo")); parameterPanel.setLayout(new ALayout()); parameterPanel.add(lDocumentNo, new ALayoutConstraint(0,0)); parameterPanel.add(fDocumentNo, null); parameterPanel.add(lBPartner_ID, null); parameterPanel.add(fBPartner_ID, null); parameterPanel.add(fIsReceipt, new ALayoutConstraint(0,5)); parameterPanel.add(lDateFrom, new ALayoutConstraint(1,2)); parameterPanel.add(fDateFrom, null); parameterPanel.add(lDateTo, null); parameterPanel.add(fDateTo, null); parameterPanel.add(lAmtFrom, new ALayoutConstraint(2,2)); parameterPanel.add(fAmtFrom, null); parameterPanel.add(lAmtTo, null); parameterPanel.add(fAmtTo, null); }
/** * Static Setup - add fields to parameterPanel * @throws Exception if Lookups cannot be created */
Static Setup - add fields to parameterPanel
statInit
{ "repo_name": "geneos/adempiere", "path": "client/src/org/compiere/apps/search/InfoPayment.java", "license": "gpl-2.0", "size": 13816 }
[ "org.adempiere.plaf.AdempierePLAF", "org.compiere.apps.ALayout", "org.compiere.apps.ALayoutConstraint", "org.compiere.grid.ed.VLookup", "org.compiere.model.MLookupFactory", "org.compiere.util.DisplayType", "org.compiere.util.Env", "org.compiere.util.Msg" ]
import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.ALayout; import org.compiere.apps.ALayoutConstraint; import org.compiere.grid.ed.VLookup; import org.compiere.model.MLookupFactory; import org.compiere.util.DisplayType; import org.compiere.util.Env; import org.compiere.util.Msg;
import org.adempiere.plaf.*; import org.compiere.apps.*; import org.compiere.grid.ed.*; import org.compiere.model.*; import org.compiere.util.*;
[ "org.adempiere.plaf", "org.compiere.apps", "org.compiere.grid", "org.compiere.model", "org.compiere.util" ]
org.adempiere.plaf; org.compiere.apps; org.compiere.grid; org.compiere.model; org.compiere.util;
325,739
@Override public void setMovementQty (java.math.BigDecimal MovementQty) { set_Value (COLUMNNAME_MovementQty, MovementQty); }
void function (java.math.BigDecimal MovementQty) { set_Value (COLUMNNAME_MovementQty, MovementQty); }
/** Set Bewegungs-Menge. @param MovementQty Quantity of a product moved. */
Set Bewegungs-Menge
setMovementQty
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/X_M_InOutLine.java", "license": "gpl-2.0", "size": 25759 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,743,875
public boolean saveQuestionScores(QuestionScoresBean bean, TotalScoresBean tbean) { try { GradingService delegate = new GradingService(); //String publishedId = ContextUtil.lookupParam("publishedId"); String itemId = ContextUtil.lookupParam("itemId"); String which = ContextUtil.lookupParam("allSubmissions"); if (which == null) which = "false"; Collection agents = bean.getAgents(); //ArrayList items = new ArrayList(); Iterator iter = agents.iterator(); while (iter.hasNext()) { // each agent has a list of modified itemGrading AgentResults ar = (AgentResults) iter.next(); // Get the itemgradingdata list for this result ArrayList datas = (ArrayList) bean.getScoresByItem().get (ar.getAssessmentGradingId() + ":" + itemId); if (datas == null) datas = new ArrayList(); int fibFinNumCorrect = 0; if (bean.getTypeId().equals("8") || bean.getTypeId().equals("11")) { Iterator iter1 = datas.iterator(); while (iter1.hasNext()){ Object obj = iter1.next(); ItemGradingData data = (ItemGradingData) obj; if (data.getIsCorrect() != null && data.getIsCorrect().booleanValue()) { fibFinNumCorrect++; } } } boolean hasUpdateAttachment = false; Iterator iter2 = datas.iterator(); while (iter2.hasNext()){ Object obj = iter2.next(); //log.info("Data = " + obj); ItemGradingData data = (ItemGradingData) obj; // check if there is differnce in score, if so, update. Otherwise, do nothing double newAutoScore = 0; if ((bean.getTypeId().equals("8") || bean.getTypeId().equals("11")) && fibFinNumCorrect != 0) { if (Boolean.TRUE.equals(data.getIsCorrect())) { newAutoScore = (Double.valueOf(ar.getTotalAutoScore())).doubleValue() / (double) fibFinNumCorrect; } } else { newAutoScore = (Double.valueOf(ar.getTotalAutoScore())).doubleValue() / (double) datas.size(); } String newComments = TextFormat.convertPlaintextToFormattedTextNoHighUnicode(log, ar.getComments()); ar.setComments(newComments); if (newComments!=null) { newComments = newComments.trim(); } else { newComments = ""; } double oldAutoScore = 0; if (data.getAutoScore() !=null) oldAutoScore=data.getAutoScore().doubleValue(); String oldComments = data.getComments(); if (oldComments!=null) { oldComments = oldComments.trim(); } else { oldComments = ""; } StringBuffer logString = new StringBuffer(); logString.append("gradedBy="); logString.append(AgentFacade.getAgentString()); logString.append(", itemGradingId="); logString.append(data.getItemGradingId()); // if newAutoScore != oldAutoScore if (!(MathUtils.equalsIncludingNaN(newAutoScore, oldAutoScore, 0.0001))) { data.setAutoScore(Double.valueOf(newAutoScore)); logString.append(", newAutoScore="); logString.append(newAutoScore); logString.append(", oldAutoScore="); logString.append(oldAutoScore); } if (!newComments.equals(oldComments)) { data.setComments(ar.getComments()); logString.append(", newComments="); logString.append(newComments); logString.append(", oldComments="); logString.append(oldComments); } // if newAutoScore != oldAutoScore or newComments != oldComments if (!(MathUtils.equalsIncludingNaN(newAutoScore, oldAutoScore, 0.0001)) || !newComments.equals(oldComments)){ data.setGradedBy(AgentFacade.getAgentString()); data.setGradedDate(new Date()); String targetString = "siteId=" + AgentFacade.getCurrentSiteId() + ", " + logString.toString(); String safeString = targetString.length() > 255 ? targetString.substring(0, 255) : targetString; EventTrackingService.post(EventTrackingService.newEvent("sam.question.score.update", safeString, true)); delegate.updateItemScore(data, newAutoScore-oldAutoScore, tbean.getPublishedAssessment()); } if (!hasUpdateAttachment) { hasUpdateAttachment = true; updateAttachment(data, ar, bean); } } } } catch (GradebookServiceException ge) { FacesContext context = FacesContext.getCurrentInstance(); String err=(String)ContextUtil.getLocalizedString("org.sakaiproject.tool.assessment.bundle.AuthorMessages", "gradebook_exception_error"); context.addMessage(null, new FacesMessage(err)); } catch (Exception e) { e.printStackTrace(); return false; } return true; }
boolean function(QuestionScoresBean bean, TotalScoresBean tbean) { try { GradingService delegate = new GradingService(); String itemId = ContextUtil.lookupParam(STR); String which = ContextUtil.lookupParam(STR); if (which == null) which = "false"; Collection agents = bean.getAgents(); Iterator iter = agents.iterator(); while (iter.hasNext()) { AgentResults ar = (AgentResults) iter.next(); ArrayList datas = (ArrayList) bean.getScoresByItem().get (ar.getAssessmentGradingId() + ":" + itemId); if (datas == null) datas = new ArrayList(); int fibFinNumCorrect = 0; if (bean.getTypeId().equals("8") bean.getTypeId().equals("11")) { Iterator iter1 = datas.iterator(); while (iter1.hasNext()){ Object obj = iter1.next(); ItemGradingData data = (ItemGradingData) obj; if (data.getIsCorrect() != null && data.getIsCorrect().booleanValue()) { fibFinNumCorrect++; } } } boolean hasUpdateAttachment = false; Iterator iter2 = datas.iterator(); while (iter2.hasNext()){ Object obj = iter2.next(); ItemGradingData data = (ItemGradingData) obj; double newAutoScore = 0; if ((bean.getTypeId().equals("8") bean.getTypeId().equals("11")) && fibFinNumCorrect != 0) { if (Boolean.TRUE.equals(data.getIsCorrect())) { newAutoScore = (Double.valueOf(ar.getTotalAutoScore())).doubleValue() / (double) fibFinNumCorrect; } } else { newAutoScore = (Double.valueOf(ar.getTotalAutoScore())).doubleValue() / (double) datas.size(); } String newComments = TextFormat.convertPlaintextToFormattedTextNoHighUnicode(log, ar.getComments()); ar.setComments(newComments); if (newComments!=null) { newComments = newComments.trim(); } else { newComments = STRSTRgradedBy=STR, itemGradingId=STR, newAutoScore=STR, oldAutoScore=STR, newComments=STR, oldComments=STRsiteId=STR, STRsam.question.score.updateSTRorg.sakaiproject.tool.assessment.bundle.AuthorMessagesSTRgradebook_exception_error"); context.addMessage(null, new FacesMessage(err)); } catch (Exception e) { e.printStackTrace(); return false; } return true; }
/** * Persist the results from the ActionForm in the question page. * @param bean QuestionScoresBean bean * @return true if successful */
Persist the results from the ActionForm in the question page
saveQuestionScores
{ "repo_name": "rodriguezdevera/sakai", "path": "samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/evaluation/QuestionScoreUpdateListener.java", "license": "apache-2.0", "size": 11767 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Iterator", "javax.faces.application.FacesMessage", "org.sakaiproject.tool.assessment.data.dao.grading.ItemGradingData", "org.sakaiproject.tool.assessment.services.GradingService", "org.sakaiproject.tool.assessment.ui.bean.evaluation.AgentResults", "org.sakaiproject.tool.assessment.ui.bean.evaluation.QuestionScoresBean", "org.sakaiproject.tool.assessment.ui.bean.evaluation.TotalScoresBean", "org.sakaiproject.tool.assessment.ui.listener.util.ContextUtil", "org.sakaiproject.tool.assessment.util.TextFormat" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import javax.faces.application.FacesMessage; import org.sakaiproject.tool.assessment.data.dao.grading.ItemGradingData; import org.sakaiproject.tool.assessment.services.GradingService; import org.sakaiproject.tool.assessment.ui.bean.evaluation.AgentResults; import org.sakaiproject.tool.assessment.ui.bean.evaluation.QuestionScoresBean; import org.sakaiproject.tool.assessment.ui.bean.evaluation.TotalScoresBean; import org.sakaiproject.tool.assessment.ui.listener.util.ContextUtil; import org.sakaiproject.tool.assessment.util.TextFormat;
import java.util.*; import javax.faces.application.*; import org.sakaiproject.tool.assessment.data.dao.grading.*; import org.sakaiproject.tool.assessment.services.*; import org.sakaiproject.tool.assessment.ui.bean.evaluation.*; import org.sakaiproject.tool.assessment.ui.listener.util.*; import org.sakaiproject.tool.assessment.util.*;
[ "java.util", "javax.faces", "org.sakaiproject.tool" ]
java.util; javax.faces; org.sakaiproject.tool;
440,469
public void setBarcodeType() { this.barcodeTypeListBox.setVisibleItemCount(1); this.barcodeTypeListBox.addItem(AdminConstants.EMPTY_STRING); if (allBarcodeValues != null && !allBarcodeValues.isEmpty()) { for (String barcodeType : allBarcodeValues) { this.barcodeTypeListBox.addItem(barcodeType); } } }
void function() { this.barcodeTypeListBox.setVisibleItemCount(1); this.barcodeTypeListBox.addItem(AdminConstants.EMPTY_STRING); if (allBarcodeValues != null && !allBarcodeValues.isEmpty()) { for (String barcodeType : allBarcodeValues) { this.barcodeTypeListBox.addItem(barcodeType); } } }
/** * To set Barcode Type. */
To set Barcode Type
setBarcodeType
{ "repo_name": "kuzavas/ephesoft", "path": "dcma-gwt/dcma-gwt-admin/src/main/java/com/ephesoft/dcma/gwt/admin/bm/client/view/fieldtype/EditFieldTypeView.java", "license": "agpl-3.0", "size": 20768 }
[ "com.ephesoft.dcma.gwt.admin.bm.client.AdminConstants" ]
import com.ephesoft.dcma.gwt.admin.bm.client.AdminConstants;
import com.ephesoft.dcma.gwt.admin.bm.client.*;
[ "com.ephesoft.dcma" ]
com.ephesoft.dcma;
1,105,542
// create and populate test context TestContext contextO = new TestContext(); contextO.setValue(5); // submit new workflow to Coordinator and obtain request id String context = converter.toStorableString(contextO); String rid = getCoordinator().submitWork("unittests", context, "testflow"); System.out.println("rid:" + rid); // wait for work flow to complete and obtain context object after // it went thru all the steps in the flow contextO = waitForComplete(getCoordinator(), rid, 5); // 5 is odd, so the final result is 5*3 ("triple" step ran) Assert.assertEquals(15, contextO.getValue()); // workflow did not fail Assert.assertFalse(getCoordinator().checkFailed(rid)); Assert.assertTrue(getCoordinator().checkComplete(rid)); // now reset context with value of 6 contextO.setValue(6); // submit new workflow context = converter.toStorableString(contextO); rid = getCoordinator().submitWork("unittests", context, "testflow"); System.out.println("rid:" + rid); // wait for completion contextO = waitForComplete(getCoordinator(), rid, 5); // 6 is even, so the result is 6*2 ("double" step ran) Assert.assertEquals(12, contextO.getValue()); }
TestContext contextO = new TestContext(); contextO.setValue(5); String context = converter.toStorableString(contextO); String rid = getCoordinator().submitWork(STR, context, STR); System.out.println("rid:" + rid); contextO = waitForComplete(getCoordinator(), rid, 5); Assert.assertEquals(15, contextO.getValue()); Assert.assertFalse(getCoordinator().checkFailed(rid)); Assert.assertTrue(getCoordinator().checkComplete(rid)); contextO.setValue(6); context = converter.toStorableString(contextO); rid = getCoordinator().submitWork(STR, context, STR); System.out.println("rid:" + rid); contextO = waitForComplete(getCoordinator(), rid, 5); Assert.assertEquals(12, contextO.getValue()); }
/** * test basic functionlity, see inline comments * @throws Exception */
test basic functionlity, see inline comments
testFlow
{ "repo_name": "tectronics/business-plumber", "path": "src/test/java/plumber/CompleteTest.java", "license": "lgpl-3.0", "size": 4300 }
[ "junit.framework.Assert" ]
import junit.framework.Assert;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
1,618,297
public void write(String name, Complex[] array, int[] dimensions) throws IOException { this.write(name, array, dimensions, false); }
void function(String name, Complex[] array, int[] dimensions) throws IOException { this.write(name, array, dimensions, false); }
/** * Writes a <code>Complex</code> array variable to the MAT-file. * @param name The name of the variable. * @param array The array elements. * @param dimensions The array dimensions (there must be at least two * dimensions and the product of the dimensions must be * <code>array.length</code>). * @throws IOException if writing to the underlying stream fails. * @throws IllegalArgumentException if the product of * <code>dimensions</code> is not equal to <code>array.length</code>. */
Writes a <code>Complex</code> array variable to the MAT-file
write
{ "repo_name": "bwkimmel/jmist", "path": "jmist-core/src/main/java/ca/eandb/jmist/util/matlab/MatlabWriter.java", "license": "mit", "size": 83818 }
[ "ca.eandb.jmist.math.Complex", "java.io.IOException" ]
import ca.eandb.jmist.math.Complex; import java.io.IOException;
import ca.eandb.jmist.math.*; import java.io.*;
[ "ca.eandb.jmist", "java.io" ]
ca.eandb.jmist; java.io;
192,264
public void setSearchHandlers( LdapRequestHandler<SearchRequest> searchRequestHandler, LdapResponseHandler<SearchResultEntry> searchResultEntryHandler, LdapResponseHandler<SearchResultReference> searchResultReferenceHandler, LdapResponseHandler<SearchResultDone> searchResultDoneHandler ) { this.handler.removeReceivedMessageHandler( SearchRequest.class ); this.searchRequestHandler = searchRequestHandler; this.searchRequestHandler.setLdapServer( this ); this.handler.addReceivedMessageHandler( SearchRequest.class, this.searchRequestHandler ); this.handler.removeSentMessageHandler( SearchResultEntry.class ); this.searchResultEntryHandler = searchResultEntryHandler; this.searchResultEntryHandler.setLdapServer( this ); this.handler.addSentMessageHandler( SearchResultEntry.class, this.searchResultEntryHandler ); this.handler.removeSentMessageHandler( SearchResultReference.class ); this.searchResultReferenceHandler = searchResultReferenceHandler; this.searchResultReferenceHandler.setLdapServer( this ); this.handler.addSentMessageHandler( SearchResultReference.class, this.searchResultReferenceHandler ); this.handler.removeSentMessageHandler( SearchResultDone.class ); this.searchResultDoneHandler = searchResultDoneHandler; this.searchResultDoneHandler.setLdapServer( this ); this.handler.addSentMessageHandler( SearchResultDone.class, this.searchResultDoneHandler ); }
void function( LdapRequestHandler<SearchRequest> searchRequestHandler, LdapResponseHandler<SearchResultEntry> searchResultEntryHandler, LdapResponseHandler<SearchResultReference> searchResultReferenceHandler, LdapResponseHandler<SearchResultDone> searchResultDoneHandler ) { this.handler.removeReceivedMessageHandler( SearchRequest.class ); this.searchRequestHandler = searchRequestHandler; this.searchRequestHandler.setLdapServer( this ); this.handler.addReceivedMessageHandler( SearchRequest.class, this.searchRequestHandler ); this.handler.removeSentMessageHandler( SearchResultEntry.class ); this.searchResultEntryHandler = searchResultEntryHandler; this.searchResultEntryHandler.setLdapServer( this ); this.handler.addSentMessageHandler( SearchResultEntry.class, this.searchResultEntryHandler ); this.handler.removeSentMessageHandler( SearchResultReference.class ); this.searchResultReferenceHandler = searchResultReferenceHandler; this.searchResultReferenceHandler.setLdapServer( this ); this.handler.addSentMessageHandler( SearchResultReference.class, this.searchResultReferenceHandler ); this.handler.removeSentMessageHandler( SearchResultDone.class ); this.searchResultDoneHandler = searchResultDoneHandler; this.searchResultDoneHandler.setLdapServer( this ); this.handler.addSentMessageHandler( SearchResultDone.class, this.searchResultDoneHandler ); }
/** * Inject the MessageReceived and MessageSent handler into the IoHandler * * @param searchRequestHandler The SearchRequest message received handler * @param searchResultEntryHandler The SearchResultEntry message sent handler * @param searchResultReferenceHandler The SearchResultReference message sent handler * @param searchResultDoneHandler The SearchResultDone message sent handler */
Inject the MessageReceived and MessageSent handler into the IoHandler
setSearchHandlers
{ "repo_name": "TremoloSecurity/MyVirtualDirectory", "path": "server/src/main/java/org/apache/directory/server/ldap/LdapServer.java", "license": "apache-2.0", "size": 59925 }
[ "org.apache.directory.api.ldap.model.message.SearchRequest", "org.apache.directory.api.ldap.model.message.SearchResultDone", "org.apache.directory.api.ldap.model.message.SearchResultEntry", "org.apache.directory.api.ldap.model.message.SearchResultReference", "org.apache.directory.server.ldap.handlers.LdapRequestHandler", "org.apache.directory.server.ldap.handlers.LdapResponseHandler" ]
import org.apache.directory.api.ldap.model.message.SearchRequest; import org.apache.directory.api.ldap.model.message.SearchResultDone; import org.apache.directory.api.ldap.model.message.SearchResultEntry; import org.apache.directory.api.ldap.model.message.SearchResultReference; import org.apache.directory.server.ldap.handlers.LdapRequestHandler; import org.apache.directory.server.ldap.handlers.LdapResponseHandler;
import org.apache.directory.api.ldap.model.message.*; import org.apache.directory.server.ldap.handlers.*;
[ "org.apache.directory" ]
org.apache.directory;
239,279
public static Map<Index, LocalDateDoubleTimeSeries> impliedTimeSeries( RatesProvider multicurve, Set<Index> indices, LocalDate maximumDate, ReferenceData refData) { Map<Index, LocalDateDoubleTimeSeries> ts = new HashMap<>(); for (Index index : indices) { ts.put(index, impliedTimeSeries(multicurve, index, maximumDate, refData)); } return ts; }
static Map<Index, LocalDateDoubleTimeSeries> function( RatesProvider multicurve, Set<Index> indices, LocalDate maximumDate, ReferenceData refData) { Map<Index, LocalDateDoubleTimeSeries> ts = new HashMap<>(); for (Index index : indices) { ts.put(index, impliedTimeSeries(multicurve, index, maximumDate, refData)); } return ts; }
/** * Returns the implied time series of forward fixing from a multi-curve provider. * <p> * The time series in the rates provider are part of the fixing time series returned. * * @param multicurve the multi-curve rates provider used to compute the forward fixings * @param indices the indices for which the time series should be computed * @param maximumDate the maximum date for which the fixing should be computed (maximum date inclusive) * @param refData the reference data * @return the time series */
Returns the implied time series of forward fixing from a multi-curve provider. The time series in the rates provider are part of the fixing time series returned
impliedTimeSeries
{ "repo_name": "marc-henrard/RisQ-ir-models", "path": "src/main/java/marc/henrard/murisq/model/multicurve/TimeSeriesImpliedForward.java", "license": "apache-2.0", "size": 4910 }
[ "com.opengamma.strata.basics.ReferenceData", "com.opengamma.strata.basics.index.Index", "com.opengamma.strata.collect.timeseries.LocalDateDoubleTimeSeries", "com.opengamma.strata.pricer.rate.RatesProvider", "java.time.LocalDate", "java.util.HashMap", "java.util.Map", "java.util.Set" ]
import com.opengamma.strata.basics.ReferenceData; import com.opengamma.strata.basics.index.Index; import com.opengamma.strata.collect.timeseries.LocalDateDoubleTimeSeries; import com.opengamma.strata.pricer.rate.RatesProvider; import java.time.LocalDate; import java.util.HashMap; import java.util.Map; import java.util.Set;
import com.opengamma.strata.basics.*; import com.opengamma.strata.basics.index.*; import com.opengamma.strata.collect.timeseries.*; import com.opengamma.strata.pricer.rate.*; import java.time.*; import java.util.*;
[ "com.opengamma.strata", "java.time", "java.util" ]
com.opengamma.strata; java.time; java.util;
1,804,098
@Test public void fromFilenamesIterable_Single_asFiles() throws IOException { // given String f1 = "src/test/resources/Thumbnailator/grid.png"; File outFile1 = new File("src/test/resources/Thumbnailator/thumbnail.grid.png"); outFile1.deleteOnExit(); // when List<File> thumbnails = Thumbnails.fromFilenames((Iterable<String>)Arrays.asList(f1)) .size(50, 50) .asFiles(Rename.PREFIX_DOT_THUMBNAIL); // then assertEquals(1, thumbnails.size()); BufferedImage fromFileImage1 = ImageIO.read(thumbnails.get(0)); assertEquals(50, fromFileImage1.getWidth()); assertEquals(50, fromFileImage1.getHeight()); }
void function() throws IOException { String f1 = STR; File outFile1 = new File(STR); outFile1.deleteOnExit(); List<File> thumbnails = Thumbnails.fromFilenames((Iterable<String>)Arrays.asList(f1)) .size(50, 50) .asFiles(Rename.PREFIX_DOT_THUMBNAIL); assertEquals(1, thumbnails.size()); BufferedImage fromFileImage1 = ImageIO.read(thumbnails.get(0)); assertEquals(50, fromFileImage1.getWidth()); assertEquals(50, fromFileImage1.getHeight()); }
/** * Test for the {@link Thumbnails.Builder} class where, * <ol> * <li>Thumbnails.fromFilenames(Iterable[String])</li> * <li>toFiles(Rename)</li> * </ol> * and the expected outcome is, * <ol> * <li>An image is generated and written to a file whose name is generated * from the Rename object.</li> * </ol> * @throws IOException */
Test for the <code>Thumbnails.Builder</code> class where, Thumbnails.fromFilenames(Iterable[String]) toFiles(Rename) and the expected outcome is, An image is generated and written to a file whose name is generated from the Rename object.
fromFilenamesIterable_Single_asFiles
{ "repo_name": "passerby4j/thumbnailator", "path": "src/test/java/net/coobird/thumbnailator/ThumbnailsBuilderInputOutputTest.java", "license": "mit", "size": 303967 }
[ "java.awt.image.BufferedImage", "java.io.File", "java.io.IOException", "java.util.Arrays", "java.util.List", "javax.imageio.ImageIO", "net.coobird.thumbnailator.name.Rename", "org.junit.Assert" ]
import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.List; import javax.imageio.ImageIO; import net.coobird.thumbnailator.name.Rename; import org.junit.Assert;
import java.awt.image.*; import java.io.*; import java.util.*; import javax.imageio.*; import net.coobird.thumbnailator.name.*; import org.junit.*;
[ "java.awt", "java.io", "java.util", "javax.imageio", "net.coobird.thumbnailator", "org.junit" ]
java.awt; java.io; java.util; javax.imageio; net.coobird.thumbnailator; org.junit;
272,304
public static void main(String[] args) throws Exception { final int maxSteps = 10; // create test ScalarAverager object with maxSteps steps per episode ScalarAverager da = new ScalarAverager(maxSteps, "Testfunction"); // fill data array with dummy values (reward values) for (int i=0; i<maxSteps; i++) { da.update(new State(0), new Action(0), new State(0), new Action(0), Math.random(), false); } DataAveragePlotter dataPlotter = new DataAveragePlotter(da, "data.gnuplot", "Plot Title"); dataPlotter.plotGraph(); System.out.println("Please press any key ..."); System.in.read(); }
static void function(String[] args) throws Exception { final int maxSteps = 10; ScalarAverager da = new ScalarAverager(maxSteps, STR); for (int i=0; i<maxSteps; i++) { da.update(new State(0), new Action(0), new State(0), new Action(0), Math.random(), false); } DataAveragePlotter dataPlotter = new DataAveragePlotter(da, STR, STR); dataPlotter.plotGraph(); System.out.println(STR); System.in.read(); }
/** * test main function * @param args * @throws Exception */
test main function
main
{ "repo_name": "ieugen/Teachingbox", "path": "src/org/hswgt/teachingbox/core/rl/plot/DataAveragePlotter.java", "license": "gpl-3.0", "size": 5720 }
[ "org.hswgt.teachingbox.core.rl.env.Action", "org.hswgt.teachingbox.core.rl.env.State", "org.hswgt.teachingbox.core.rl.experiment.ScalarAverager" ]
import org.hswgt.teachingbox.core.rl.env.Action; import org.hswgt.teachingbox.core.rl.env.State; import org.hswgt.teachingbox.core.rl.experiment.ScalarAverager;
import org.hswgt.teachingbox.core.rl.env.*; import org.hswgt.teachingbox.core.rl.experiment.*;
[ "org.hswgt.teachingbox" ]
org.hswgt.teachingbox;
1,693,894
public RSSBusiness getRSSBusiness(IWContext iwc) throws RemoteException{ return (RSSBusiness) IBOLookup.getServiceInstance(iwc, RSSBusiness.class); }
RSSBusiness function(IWContext iwc) throws RemoteException{ return (RSSBusiness) IBOLookup.getServiceInstance(iwc, RSSBusiness.class); }
/** * Gets a RSSBusiness instance from a IWContext, used by the presentation classes * @param iwc The IWContext * @return A RSSBusiness instance * @throws RemoteException */
Gets a RSSBusiness instance from a IWContext, used by the presentation classes
getRSSBusiness
{ "repo_name": "idega/platform2", "path": "src/com/idega/block/rss/presentation/RSSSourceHandler.java", "license": "gpl-3.0", "size": 3516 }
[ "com.idega.block.rss.business.RSSBusiness", "com.idega.business.IBOLookup", "com.idega.presentation.IWContext", "java.rmi.RemoteException" ]
import com.idega.block.rss.business.RSSBusiness; import com.idega.business.IBOLookup; import com.idega.presentation.IWContext; import java.rmi.RemoteException;
import com.idega.block.rss.business.*; import com.idega.business.*; import com.idega.presentation.*; import java.rmi.*;
[ "com.idega.block", "com.idega.business", "com.idega.presentation", "java.rmi" ]
com.idega.block; com.idega.business; com.idega.presentation; java.rmi;
1,451,698
public static void merge(Configuration destConf, Configuration srcConf) { for (Map.Entry<String, String> e : srcConf) { destConf.set(e.getKey(), e.getValue()); } }
static void function(Configuration destConf, Configuration srcConf) { for (Map.Entry<String, String> e : srcConf) { destConf.set(e.getKey(), e.getValue()); } }
/** * Merge two configurations. * @param destConf the configuration that will be overwritten with items * from the srcConf * @param srcConf the source configuration **/
Merge two configurations
merge
{ "repo_name": "ultratendency/hbase", "path": "hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseConfiguration.java", "license": "apache-2.0", "size": 11555 }
[ "java.util.Map", "org.apache.hadoop.conf.Configuration" ]
import java.util.Map; import org.apache.hadoop.conf.Configuration;
import java.util.*; import org.apache.hadoop.conf.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,074,790
private void checkSetUpTearDownMethod(DetailAST aAST, String aActualName, String aExpectedName) { if (!aActualName.equals(aExpectedName)) { log(aAST, "junit.method.name", aActualName, aExpectedName); } if (!isPublicOrProtected(aAST)) { log(aAST, "junit.method.protected.or.public", aExpectedName); } if (isStatic(aAST)) { log(aAST, "junit.method.static", aExpectedName); } checkReturnValue(aAST, aActualName); checkParameters(aAST, aActualName); }
void function(DetailAST aAST, String aActualName, String aExpectedName) { if (!aActualName.equals(aExpectedName)) { log(aAST, STR, aActualName, aExpectedName); } if (!isPublicOrProtected(aAST)) { log(aAST, STR, aExpectedName); } if (isStatic(aAST)) { log(aAST, STR, aExpectedName); } checkReturnValue(aAST, aActualName); checkParameters(aAST, aActualName); }
/** * Checks signature/name of <code>setUp()</code>/<code>tearDown</code>. * @param aAST method definition node * @param aActualName actual method name * @param aExpectedName expected method name */
Checks signature/name of <code>setUp()</code>/<code>tearDown</code>
checkSetUpTearDownMethod
{ "repo_name": "gkzhong/checkstyle", "path": "src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/JUnitTestCaseCheck.java", "license": "lgpl-2.1", "size": 7836 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
2,255,380
@ZeppelinApi public void setEventClient(RemoteEventClientWrapper eventClient) { if (ZeppelinContext.eventClient == null) { ZeppelinContext.eventClient = eventClient; } }
void function(RemoteEventClientWrapper eventClient) { if (ZeppelinContext.eventClient == null) { ZeppelinContext.eventClient = eventClient; } }
/** * Set event client */
Set event client
setEventClient
{ "repo_name": "Nova-Boy/zeppelin", "path": "spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java", "license": "apache-2.0", "size": 31197 }
[ "org.apache.zeppelin.interpreter.remote.RemoteEventClientWrapper" ]
import org.apache.zeppelin.interpreter.remote.RemoteEventClientWrapper;
import org.apache.zeppelin.interpreter.remote.*;
[ "org.apache.zeppelin" ]
org.apache.zeppelin;
2,245,722
public FSDataOutputStream create(Path f, FsPermission permission, EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize, Progressable progress, ChecksumOpt checksumOpt) throws IOException { // Checksum options are ignored by default. The file systems that // implement checksum need to override this method. The full // support is currently only available in DFS. return create(f, permission, flags.contains(CreateFlag.OVERWRITE), bufferSize, replication, blockSize, progress); }
FSDataOutputStream function(Path f, FsPermission permission, EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize, Progressable progress, ChecksumOpt checksumOpt) throws IOException { return create(f, permission, flags.contains(CreateFlag.OVERWRITE), bufferSize, replication, blockSize, progress); }
/** * Create an FSDataOutputStream at the indicated Path with a custom * checksum option * @param f the file name to open * @param permission * @param flags {@link CreateFlag}s to use for this stream. * @param bufferSize the size of the buffer to be used. * @param replication required block replication for the file. * @param blockSize * @param progress * @param checksumOpt checksum parameter. If null, the values * found in conf will be used. * @throws IOException * @see #setPermission(Path, FsPermission) */
Create an FSDataOutputStream at the indicated Path with a custom checksum option
create
{ "repo_name": "joyghosh/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java", "license": "gpl-3.0", "size": 116427 }
[ "java.io.IOException", "java.util.EnumSet", "org.apache.hadoop.fs.Options", "org.apache.hadoop.fs.permission.FsPermission", "org.apache.hadoop.util.Progressable" ]
import java.io.IOException; import java.util.EnumSet; import org.apache.hadoop.fs.Options; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.util.Progressable;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.util.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,307,764
public Single<List<generated.rx.reactive.guice.tables.pojos.Something>> findManyBySomehugenumber(Collection<Long> values) { return findManyByCondition(Something.SOMETHING.SOMEHUGENUMBER.in(values)); }
Single<List<generated.rx.reactive.guice.tables.pojos.Something>> function(Collection<Long> values) { return findManyByCondition(Something.SOMETHING.SOMEHUGENUMBER.in(values)); }
/** * Find records that have <code>someHugeNumber IN (values)</code> * asynchronously */
Find records that have <code>someHugeNumber IN (values)</code> asynchronously
findManyBySomehugenumber
{ "repo_name": "jklingsporn/vertx-jooq", "path": "vertx-jooq-generate/src/test/java/generated/rx/reactive/guice/tables/daos/SomethingDao.java", "license": "mit", "size": 15084 }
[ "io.reactivex.Single", "java.util.Collection", "java.util.List" ]
import io.reactivex.Single; import java.util.Collection; import java.util.List;
import io.reactivex.*; import java.util.*;
[ "io.reactivex", "java.util" ]
io.reactivex; java.util;
833,062
public void setColor(Color color) { this.isEmpty = color == null; if (this.isEmpty) { this.rectangle.setFill(Color.TRANSPARENT); } else { this.rectangle.setFill(color); } } } private static class StyleableProperties { public static final PseudoClass PANNABLE_PSEUDOCLASS_STATE = PseudoClass.getPseudoClass("pannable"); //$NON-NLS-1$ public static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES; public static final CssMetaData<ZoomablePane<?>, Boolean> PANNABLE = new CssMetaData<>( "-afc-pannable", //$NON-NLS-1$ BooleanConverter.getInstance(), Boolean.FALSE) {
void function(Color color) { this.isEmpty = color == null; if (this.isEmpty) { this.rectangle.setFill(Color.TRANSPARENT); } else { this.rectangle.setFill(color); } } } private static class StyleableProperties { public static final PseudoClass PANNABLE_PSEUDOCLASS_STATE = PseudoClass.getPseudoClass(STR); public static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES; public static final CssMetaData<ZoomablePane<?>, Boolean> PANNABLE = new CssMetaData<>( STR, BooleanConverter.getInstance(), Boolean.FALSE) {
/** Change the color. * * @param color the color of the square. */
Change the color
setColor
{ "repo_name": "gallandarakhneorg/afc", "path": "advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java", "license": "apache-2.0", "size": 38874 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
155,735
public void setX509HostnameVerifier(HostnameVerifier x509HostnameVerifier) { this.x509HostnameVerifier = x509HostnameVerifier; }
void function(HostnameVerifier x509HostnameVerifier) { this.x509HostnameVerifier = x509HostnameVerifier; }
/** * To use a custom X509HostnameVerifier such as DefaultHostnameVerifier or NoopHostnameVerifier. */
To use a custom X509HostnameVerifier such as DefaultHostnameVerifier or NoopHostnameVerifier
setX509HostnameVerifier
{ "repo_name": "CodeSmell/camel", "path": "components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java", "license": "apache-2.0", "size": 31063 }
[ "javax.net.ssl.HostnameVerifier" ]
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
805,102
@Path("/complete") @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public ResponseStatus serveComplete(final ParamsCounterSession params) throws SQLException { return Controller.DB.serveComplete(params); }
@Path(STR) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) ResponseStatus function(final ParamsCounterSession params) throws SQLException { return Controller.DB.serveComplete(params); }
/** * Retrieves representation of an instance of main.CounterResource * @param params * @return an instance of java.lang.String * @throws java.sql.SQLException */
Retrieves representation of an instance of main.CounterResource
serveComplete
{ "repo_name": "jericomanapsal/genericqueueingsystem", "path": "ws/src/java/main/CounterResource.java", "license": "mit", "size": 2986 }
[ "java.sql.SQLException", "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType" ]
import java.sql.SQLException; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType;
import java.sql.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "java.sql", "javax.ws" ]
java.sql; javax.ws;
2,138,212
public static IOStream s_create(String config) { if (config.startsWith("/hub2/")) { config = config.substring(6); //Get rid of the /hub2/ part String user = null; String pass = null; String host = null; int port = 25105; int pollTime = 1000; // poll time in milliseconds String[] parts = config.split(","); // split off options at the end //Parse the first part, the address String[] adr = parts[0].split("@"); String[] hostPort; if (adr.length > 1) { String[] userPass = adr[0].split(":"); user = userPass[0]; pass = userPass[1]; hostPort = adr[1].split(":"); } else { hostPort = parts[0].split(":"); } host = hostPort[0]; if (hostPort.length > 1) port = Integer.parseInt(hostPort[1]); // check if additional options are given if (parts.length > 1) { if (parts[1].trim().startsWith("poll_time")) { pollTime = Integer.parseInt(parts[1].split("=")[1].trim()); } } return new HubIOStream(host, port, pollTime, user, pass); } else if (config.startsWith("/hub/")) { throw new IllegalArgumentException("old-style hub not implemented yet!"); } else return new SerialIOStream(config); }
static IOStream function(String config) { if (config.startsWith(STR)) { config = config.substring(6); String user = null; String pass = null; String host = null; int port = 25105; int pollTime = 1000; String[] parts = config.split(","); String[] adr = parts[0].split("@"); String[] hostPort; if (adr.length > 1) { String[] userPass = adr[0].split(":"); user = userPass[0]; pass = userPass[1]; hostPort = adr[1].split(":"); } else { hostPort = parts[0].split(":"); } host = hostPort[0]; if (hostPort.length > 1) port = Integer.parseInt(hostPort[1]); if (parts.length > 1) { if (parts[1].trim().startsWith(STR)) { pollTime = Integer.parseInt(parts[1].split("=")[1].trim()); } } return new HubIOStream(host, port, pollTime, user, pass); } else if (config.startsWith("/hub/")) { throw new IllegalArgumentException(STR); } else return new SerialIOStream(config); }
/** * Creates an IOStream from an allowed config string: * * /dev/ttyXYZ (serial port like e.g. usb: /dev/ttyUSB0 or alias /dev/insteon) * * /hub2/user:password@myinsteonhub.mydomain.com:25105,poll_time=1000 (insteon hub2 (2014)) * * /hub/user:password@myinsteonhub.mydomain.com:9761 (pre-2014 hub with raw tcp PLM access) * * @param config * @return reference to IOStream */
Creates an IOStream from an allowed config string: dev/ttyXYZ (serial port like e.g. usb: /dev/ttyUSB0 or alias /dev/insteon) hub2/user:password@myinsteonhub.mydomain.com:25105,poll_time=1000 (insteon hub2 (2014)) hub/user:password@myinsteonhub.mydomain.com:9761 (pre-2014 hub with raw tcp PLM access)
s_create
{ "repo_name": "Jakey69/openhab", "path": "bundles/binding/org.openhab.binding.insteonplm/src/main/java/org/openhab/binding/insteonplm/internal/driver/IOStream.java", "license": "epl-1.0", "size": 2878 }
[ "org.openhab.binding.insteonplm.internal.driver.hub.HubIOStream" ]
import org.openhab.binding.insteonplm.internal.driver.hub.HubIOStream;
import org.openhab.binding.insteonplm.internal.driver.hub.*;
[ "org.openhab.binding" ]
org.openhab.binding;
726,231
SocialAccount getSocialAccount(final Long socialAccountId, final Account account); /** * Get Twitter Verified Accounts. * @param secUsers {@link AccountDaoImp} * @param provider {@link SocialProvider}
SocialAccount getSocialAccount(final Long socialAccountId, final Account account); /** * Get Twitter Verified Accounts. * @param secUsers {@link AccountDaoImp} * @param provider {@link SocialProvider}
/** * Get Social Account. * @param socialAccountId * @param account * @return */
Get Social Account
getSocialAccount
{ "repo_name": "cristiani/encuestame", "path": "enme-persistence/enme-dao/src/main/java/org/encuestame/persistence/dao/IAccountDao.java", "license": "apache-2.0", "size": 9584 }
[ "org.encuestame.persistence.dao.imp.AccountDaoImp", "org.encuestame.persistence.domain.security.Account", "org.encuestame.persistence.domain.security.SocialAccount", "org.encuestame.utils.social.SocialProvider" ]
import org.encuestame.persistence.dao.imp.AccountDaoImp; import org.encuestame.persistence.domain.security.Account; import org.encuestame.persistence.domain.security.SocialAccount; import org.encuestame.utils.social.SocialProvider;
import org.encuestame.persistence.dao.imp.*; import org.encuestame.persistence.domain.security.*; import org.encuestame.utils.social.*;
[ "org.encuestame.persistence", "org.encuestame.utils" ]
org.encuestame.persistence; org.encuestame.utils;
1,461,312
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<VpnSiteInner>> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .<PagedResponse<VpnSiteInner>>map( res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); }
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<VpnSiteInner>> function(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accept = STR; return FluxUtil .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .<PagedResponse<VpnSiteInner>>map( res -> new PagedResponseBase<>( res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); }
/** * Get the next page of items. * * @param nextLink The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to list VpnSites along with {@link PagedResponse} on successful completion of * {@link Mono}. */
Get the next page of items
listNextSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VpnSitesClientImpl.java", "license": "mit", "size": 70877 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.network.fluent.models.VpnSiteInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.network.fluent.models.VpnSiteInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,256,464
void convert(final String fieldName, final T data, final ArrayNode node);
void convert(final String fieldName, final T data, final ArrayNode node);
/** * Convert the given data to a JSON compatible format. * * @param fieldName The field name * @param data The data to convert * @param node The node where to put the converted data * @since 16.01.18 */
Convert the given data to a JSON compatible format
convert
{ "repo_name": "0xbaadf00d/partialize", "path": "src/main/java/com/zero_x_baadf00d/partialize/converter/Converter.java", "license": "mit", "size": 2323 }
[ "com.fasterxml.jackson.databind.node.ArrayNode" ]
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
1,967,308
protected String post(HttpEntity entity, ResponseHandler<String> responseHandler) throws IOException, AuthenticationException { URI uri = getUriBuilder().getBasePutUri(); return this.post(uri, entity, responseHandler); }
String function(HttpEntity entity, ResponseHandler<String> responseHandler) throws IOException, AuthenticationException { URI uri = getUriBuilder().getBasePutUri(); return this.post(uri, entity, responseHandler); }
/** * post an entity to the fimagestore. * * @param entity the object entity to be posted * @param responseHandler the Handler object that checks status codes and produces the result String * @return the file key to the newly created file * @throws IOException if any error happens on the network * @throws AuthenticationException if authentication fails */
post an entity to the fimagestore
post
{ "repo_name": "Transkribus/fimagestoreClient", "path": "src/main/java/org/dea/fimgstoreclient/AbstractHttpClient.java", "license": "gpl-3.0", "size": 10523 }
[ "java.io.IOException", "org.apache.http.HttpEntity", "org.apache.http.auth.AuthenticationException", "org.apache.http.client.ResponseHandler" ]
import java.io.IOException; import org.apache.http.HttpEntity; import org.apache.http.auth.AuthenticationException; import org.apache.http.client.ResponseHandler;
import java.io.*; import org.apache.http.*; import org.apache.http.auth.*; import org.apache.http.client.*;
[ "java.io", "org.apache.http" ]
java.io; org.apache.http;
364,285
public PresenceSubscribeHandler getPresenceSubscribeHandler() { return (PresenceSubscribeHandler) modules.get(PresenceSubscribeHandler.class); }
PresenceSubscribeHandler function() { return (PresenceSubscribeHandler) modules.get(PresenceSubscribeHandler.class); }
/** * Returns the <code>PresenceSubscribeHandler</code> registered with this server. The * <code>PresenceSubscribeHandler</code> was registered with the server as a module while * starting up the server. * * @return the <code>PresenceSubscribeHandler</code> registered with this server. */
Returns the <code>PresenceSubscribeHandler</code> registered with this server. The <code>PresenceSubscribeHandler</code> was registered with the server as a module while starting up the server
getPresenceSubscribeHandler
{ "repo_name": "GinRyan/OpenFireMODxmppServer", "path": "src/java/org/jivesoftware/openfire/XMPPServer.java", "license": "apache-2.0", "size": 59961 }
[ "org.jivesoftware.openfire.handler.PresenceSubscribeHandler" ]
import org.jivesoftware.openfire.handler.PresenceSubscribeHandler;
import org.jivesoftware.openfire.handler.*;
[ "org.jivesoftware.openfire" ]
org.jivesoftware.openfire;
2,876,784
private AstSetExpr castTo(TypedExpr<AstSetExpr> expr, AstClafer target) { return castTo(expr, new ProductType(target)); }
AstSetExpr function(TypedExpr<AstSetExpr> expr, AstClafer target) { return castTo(expr, new ProductType(target)); }
/** * Multilevel cast. * * @param expr the expression * @param target the target type * @return the same expression but with the target type */
Multilevel cast
castTo
{ "repo_name": "gsdlab/chocosolver", "path": "src/main/java/org/clafer/ast/analysis/TypeAnalyzer.java", "license": "mit", "size": 38304 }
[ "org.clafer.ast.AstClafer", "org.clafer.ast.AstSetExpr", "org.clafer.ast.ProductType" ]
import org.clafer.ast.AstClafer; import org.clafer.ast.AstSetExpr; import org.clafer.ast.ProductType;
import org.clafer.ast.*;
[ "org.clafer.ast" ]
org.clafer.ast;
880,631