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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Test(expectedExceptions = IllegalArgumentException.class)
public void testNullIdBundleArray() {
new SecurityProviderRequest().addExternalIds((ExternalIdBundle[]) null);
} | @Test(expectedExceptions = IllegalArgumentException.class) void function() { new SecurityProviderRequest().addExternalIds((ExternalIdBundle[]) null); } | /**
* Tests that the identifiers array cannot be null.
*/ | Tests that the identifiers array cannot be null | testNullIdBundleArray | {
"repo_name": "McLeodMoores/starling",
"path": "projects/provider/src/test/java/com/opengamma/provider/security/SecurityProviderRequestTest.java",
"license": "apache-2.0",
"size": 4933
} | [
"com.opengamma.id.ExternalIdBundle",
"org.testng.annotations.Test"
] | import com.opengamma.id.ExternalIdBundle; import org.testng.annotations.Test; | import com.opengamma.id.*; import org.testng.annotations.*; | [
"com.opengamma.id",
"org.testng.annotations"
] | com.opengamma.id; org.testng.annotations; | 2,854,641 |
public void testAnonIdPreserved()
{
final AnonId anon = AnonId.create();
final String id = anon.toString();
Assert.assertEquals(anon, AnonId.create(id));
Assert.assertEquals(id, AnonId.create(id).toString());
} | void function() { final AnonId anon = AnonId.create(); final String id = anon.toString(); Assert.assertEquals(anon, AnonId.create(id)); Assert.assertEquals(id, AnonId.create(id).toString()); } | /**
* Test that creation of an AnonId from an AnonId string preserves that
* string and is equal to the original AnonId.
*/ | Test that creation of an AnonId from an AnonId string preserves that string and is equal to the original AnonId | testAnonIdPreserved | {
"repo_name": "CesarPantoja/jena",
"path": "jena-core/src/test/java/org/apache/jena/rdf/model/test/TestAnonID.java",
"license": "apache-2.0",
"size": 2678
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,964,898 |
public static Object getDefaultValue(Method method) {
if (method.getReturnType().isPrimitive()) {
return DEFAULT_VALUES.get(method.getReturnType().getSimpleName());
}
return null;
}
private static final Map<String, Object> DEFAULT_VALUES = new LinkedHashMap<String, Object>();
static {
... | static Object function(Method method) { if (method.getReturnType().isPrimitive()) { return DEFAULT_VALUES.get(method.getReturnType().getSimpleName()); } return null; } private static final Map<String, Object> DEFAULT_VALUES = new LinkedHashMap<String, Object>(); static { DEFAULT_VALUES.put("int", Integer.valueOf(0)); D... | /**
* Returns the default value for a given method, which is null or the default primitive value.
*
* @param method method
* @return null or default primitive value
*/ | Returns the default value for a given method, which is null or the default primitive value | getDefaultValue | {
"repo_name": "edgarmueller/emfstore-rest",
"path": "bundles/org.eclipse.emf.emfstore.common/src/org/eclipse/emf/emfstore/internal/common/observer/ObserverCall.java",
"license": "epl-1.0",
"size": 4355
} | [
"java.lang.reflect.Method",
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.lang.reflect.Method; import java.util.LinkedHashMap; import java.util.Map; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 2,688,039 |
public DirectCandidateGeneratorBuilder maxEdits(Integer maxEdits) {
if (maxEdits < 1 || maxEdits > LevenshteinAutomata.MAXIMUM_SUPPORTED_DISTANCE) {
throw new IllegalArgumentException("Illegal max_edits value " + maxEdits);
}
this.maxEdits = maxEdits;
return this;
} | DirectCandidateGeneratorBuilder function(Integer maxEdits) { if (maxEdits < 1 maxEdits > LevenshteinAutomata.MAXIMUM_SUPPORTED_DISTANCE) { throw new IllegalArgumentException(STR + maxEdits); } this.maxEdits = maxEdits; return this; } | /**
* Sets the maximum edit distance candidate suggestions can have in
* order to be considered as a suggestion. Can only be a value between 1
* and 2. Any other value result in an bad request error being thrown.
* Defaults to <tt>2</tt>.
*/ | Sets the maximum edit distance candidate suggestions can have in order to be considered as a suggestion. Can only be a value between 1 and 2. Any other value result in an bad request error being thrown. Defaults to 2 | maxEdits | {
"repo_name": "wenpos/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/suggest/phrase/DirectCandidateGeneratorBuilder.java",
"license": "apache-2.0",
"size": 22103
} | [
"org.apache.lucene.util.automaton.LevenshteinAutomata"
] | import org.apache.lucene.util.automaton.LevenshteinAutomata; | import org.apache.lucene.util.automaton.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 1,652,798 |
public static Map<String, String> convert(Map<String, Object> settings,
Map<String, TreeMap<Integer, SettingsDescription>> settingDescriptions) {
Map<String, String> serializedSettings = new HashMap<String, String>();
for (Entry<String, Object> setting : settings.entrySet()) {
... | static Map<String, String> function(Map<String, Object> settings, Map<String, TreeMap<Integer, SettingsDescription>> settingDescriptions) { Map<String, String> serializedSettings = new HashMap<String, String>(); for (Entry<String, Object> setting : settings.entrySet()) { String settingName = setting.getKey(); Object in... | /**
* Convert settings from the internal representation to the string representation used in the
* preference storage.
*
* @param settings
* The map of settings to convert.
* @param settingDescriptions
* The structure containing the {@link SettingsDescription} objects ... | Convert settings from the internal representation to the string representation used in the preference storage | convert | {
"repo_name": "gilbertw1/k-9",
"path": "k9mail/src/main/java/com/fsck/k9/preferences/Settings.java",
"license": "bsd-3-clause",
"size": 21642
} | [
"android.util.Log",
"java.util.HashMap",
"java.util.Map",
"java.util.TreeMap"
] | import android.util.Log; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; | import android.util.*; import java.util.*; | [
"android.util",
"java.util"
] | android.util; java.util; | 60,794 |
protected void defineComponent(NamedComponent name, Class<?> type, Component component) {
components.put(name, component);
}
| void function(NamedComponent name, Class<?> type, Component component) { components.put(name, component); } | /**
* Define a component and initial value that relates to the Behavior.
* <br>
* The defined component will be added to any Entity using this Behavior.
*
* @param name reference to component
* @param type class defining component's data
* @param component instance of component that represents the initia... | Define a component and initial value that relates to the Behavior. The defined component will be added to any Entity using this Behavior | defineComponent | {
"repo_name": "tacocat/lambda",
"path": "src/main/java/com/tacocat/lambda/core/entity/Behavior.java",
"license": "apache-2.0",
"size": 2744
} | [
"com.tacocat.lambda.core.component.Component"
] | import com.tacocat.lambda.core.component.Component; | import com.tacocat.lambda.core.component.*; | [
"com.tacocat.lambda"
] | com.tacocat.lambda; | 724,717 |
@Override
public int setBytes(long pos, byte[] bytes) throws SQLException {
try {
if (isDebugEnabled()) {
debugCode("setBytes("+pos+", "+quoteBytes(bytes)+");");
}
checkClosed();
if (pos != 1) {
throw DbException.getInvalidV... | int function(long pos, byte[] bytes) throws SQLException { try { if (isDebugEnabled()) { debugCode(STR+pos+STR+quoteBytes(bytes)+");"); } checkClosed(); if (pos != 1) { throw DbException.getInvalidValueException("pos", pos); } value = conn.createBlob(new ByteArrayInputStream(bytes), -1); return bytes.length; } catch (E... | /**
* Fills the Blob. This is only supported for new, empty Blob objects that
* were created with Connection.createBlob(). The position
* must be 1, meaning the whole Blob data is set.
*
* @param pos where to start writing (the first byte is at position 1)
* @param bytes the bytes to set
... | Fills the Blob. This is only supported for new, empty Blob objects that were created with Connection.createBlob(). The position must be 1, meaning the whole Blob data is set | setBytes | {
"repo_name": "wizardofos/Protozoo",
"path": "extra/h2/src/main/java/org/h2/jdbc/JdbcBlob.java",
"license": "mit",
"size": 10418
} | [
"java.io.ByteArrayInputStream",
"java.sql.SQLException",
"org.h2.message.DbException"
] | import java.io.ByteArrayInputStream; import java.sql.SQLException; import org.h2.message.DbException; | import java.io.*; import java.sql.*; import org.h2.message.*; | [
"java.io",
"java.sql",
"org.h2.message"
] | java.io; java.sql; org.h2.message; | 135,241 |
public static String formatPlayerName(final OfflinePlayer player, final boolean displayRealName) {
if (player.isOnline()) {
return formatPlayerName(player.getPlayer(), displayRealName);
}
return player.getName();
}
| static String function(final OfflinePlayer player, final boolean displayRealName) { if (player.isOnline()) { return formatPlayerName(player.getPlayer(), displayRealName); } return player.getName(); } | /**
* Returns the given player's name in a custom display format.
* <br />
* If the display name does not contain the real name the format is:
* <br />
* <i>displayName (realName)</i>
*
* @param player The player whose name will be formatted.
* @param displayRealName If true the player ... | Returns the given player's name in a custom display format. If the display name does not contain the real name the format is: displayName (realName) | formatPlayerName | {
"repo_name": "KabOOm356/Reporter",
"path": "src/main/java/net/KabOOm356/Util/BukkitUtil.java",
"license": "gpl-3.0",
"size": 15948
} | [
"org.bukkit.OfflinePlayer"
] | import org.bukkit.OfflinePlayer; | import org.bukkit.*; | [
"org.bukkit"
] | org.bukkit; | 1,341,827 |
public static AbstractResource getResourceFrom(final String location) throws IOException {
val resource = getRawResourceFrom(location);
if (!resource.exists() || (resource.isFile() && resource.getFile().isFile() && !resource.isReadable())) {
throw new FileNotFoundException("Resource " + ... | static AbstractResource function(final String location) throws IOException { val resource = getRawResourceFrom(location); if (!resource.exists() (resource.isFile() && resource.getFile().isFile() && !resource.isReadable())) { throw new FileNotFoundException(STR + location + STR); } return resource; } | /**
* Gets resource from a String location.
*
* @param location the metadata location
* @return the resource from
* @throws IOException the exception
*/ | Gets resource from a String location | getResourceFrom | {
"repo_name": "fogbeam/cas_mirror",
"path": "core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/ResourceUtils.java",
"license": "apache-2.0",
"size": 10899
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"org.springframework.core.io.AbstractResource"
] | import java.io.FileNotFoundException; import java.io.IOException; import org.springframework.core.io.AbstractResource; | import java.io.*; import org.springframework.core.io.*; | [
"java.io",
"org.springframework.core"
] | java.io; org.springframework.core; | 1,199,247 |
public static boolean verifyElementSelected(QAFWebElement ele, String arg0) {
return ele.verifySelected(arg0);
}
| static boolean function(QAFWebElement ele, String arg0) { return ele.verifySelected(arg0); } | /**
* To verify element selected
*
* @param ele
* @param arg0
* @return
*/ | To verify element selected | verifyElementSelected | {
"repo_name": "infoneershalin/qaf",
"path": "src/com/qmetry/qaf/automation/step/WebElementStepLib.java",
"license": "gpl-3.0",
"size": 28625
} | [
"com.qmetry.qaf.automation.ui.webdriver.QAFWebElement"
] | import com.qmetry.qaf.automation.ui.webdriver.QAFWebElement; | import com.qmetry.qaf.automation.ui.webdriver.*; | [
"com.qmetry.qaf"
] | com.qmetry.qaf; | 381,792 |
public void start() throws SchedulerException {
if (shuttingDown|| closed) {
throw new SchedulerException(
"The Scheduler cannot be restarted after shutdown() has been called.");
}
if (initialStart == null) {
initialStart = new Date();
... | void function() throws SchedulerException { if (shuttingDown closed) { throw new SchedulerException( STR); } if (initialStart == null) { initialStart = new Date(); this.resources.getJobStore().schedulerStarted(); startPlugins(); } schedThread.togglePause(false); getLog().info( STR + resources.getUniqueIdentifier() + ST... | /**
* <p>
* Starts the <code>QuartzScheduler</code>'s threads that fire <code>{@link org.quartz.Trigger}s</code>.
* </p>
*
* <p>
* All <code>{@link org.quartz.Trigger}s</code> that have misfired will
* be passed to the appropriate TriggerListener(s).
* </p>
*/ | Starts the <code>QuartzScheduler</code>'s threads that fire <code><code>org.quartz.Trigger</code>s</code>. All <code><code>org.quartz.Trigger</code>s</code> that have misfired will be passed to the appropriate TriggerListener(s). | start | {
"repo_name": "dumptruckman/Pail",
"path": "lib/quartz-2.0.1/quartz/src/main/java/org/quartz/core/QuartzScheduler.java",
"license": "gpl-2.0",
"size": 77924
} | [
"java.util.Date",
"org.quartz.SchedulerException"
] | import java.util.Date; import org.quartz.SchedulerException; | import java.util.*; import org.quartz.*; | [
"java.util",
"org.quartz"
] | java.util; org.quartz; | 639,505 |
public static double arcLength(MatOfPoint2f curve, boolean closed)
{
Mat curve_mat = curve;
double retVal = arcLength_0(curve_mat.nativeObj, closed);
return retVal;
}
//
// C++: void bilateralFilter(Mat src, Mat& dst, int d, double sigmaColor, double sigmaSpace, int borde... | static double function(MatOfPoint2f curve, boolean closed) { Mat curve_mat = curve; double retVal = arcLength_0(curve_mat.nativeObj, closed); return retVal; } // | /**
* <p>Calculates a contour perimeter or a curve length.</p>
*
* <p>The function computes a curve length or a closed contour perimeter.</p>
*
* @param curve Input vector of 2D points, stored in <code>std.vector</code> or
* <code>Mat</code>.
* @param closed Flag indicating whether the curve is closed or not.
*... | Calculates a contour perimeter or a curve length. The function computes a curve length or a closed contour perimeter | arcLength | {
"repo_name": "henriqueguchi/SikuliServer",
"path": "new/org/opencv/imgproc/Imgproc.java",
"license": "mit",
"size": 419653
} | [
"org.opencv.core.Mat",
"org.opencv.core.MatOfPoint2f"
] | import org.opencv.core.Mat; import org.opencv.core.MatOfPoint2f; | import org.opencv.core.*; | [
"org.opencv.core"
] | org.opencv.core; | 1,807,964 |
private View nextFromLimitedList() {
int size = mScrapList.size();
RecyclerView.ViewHolder closest = null;
int closestDistance = Integer.MAX_VALUE;
for (int i = 0; i < size; i++) {
RecyclerView.ViewHolder viewHolder = mScrapList.get(i);
... | View function() { int size = mScrapList.size(); RecyclerView.ViewHolder closest = null; int closestDistance = Integer.MAX_VALUE; for (int i = 0; i < size; i++) { RecyclerView.ViewHolder viewHolder = mScrapList.get(i); final int distance = (viewHolder.getPosition() - mCurrentPosition) * mItemDirection; if (distance < 0)... | /**
* Returns next item from limited list.
* <p/>
* Upon finding a valid VH, sets current item position to VH.itemPosition + mItemDirection
*
* @return View if an item in the current position or direction exists if not null.
*/ | Returns next item from limited list. Upon finding a valid VH, sets current item position to VH.itemPosition + mItemDirection | nextFromLimitedList | {
"repo_name": "twotoasters/RecyclerViewLib",
"path": "library/src/main/java/com/twotoasters/layoutmanager/BaseLayoutManager.java",
"license": "apache-2.0",
"size": 63779
} | [
"android.util.Log",
"android.view.View",
"com.twotoasters.android.support.v7.widget.RecyclerView"
] | import android.util.Log; import android.view.View; import com.twotoasters.android.support.v7.widget.RecyclerView; | import android.util.*; import android.view.*; import com.twotoasters.android.support.v7.widget.*; | [
"android.util",
"android.view",
"com.twotoasters.android"
] | android.util; android.view; com.twotoasters.android; | 105,440 |
public boolean setField(Object entity, ColumnList<ByteBuffer> columns) throws Exception {
List<Object> list = getOrCreateField(entity);
// Iterate through columns and add embedded entities to the list
for (com.netflix.astyanax.model.Column<ByteBuffer> c : columns) {
... | boolean function(Object entity, ColumnList<ByteBuffer> columns) throws Exception { List<Object> list = getOrCreateField(entity); for (com.netflix.astyanax.model.Column<ByteBuffer> c : columns) { list.add(fromColumn(c)); } return true; } | /**
* Set the collection field using the provided column list of embedded entities
* @param entity
* @param name
* @param column
* @return
* @throws Exception
*/ | Set the collection field using the provided column list of embedded entities | setField | {
"repo_name": "bazaarvoice/astyanax",
"path": "astyanax-entity-mapper/src/main/java/com/netflix/astyanax/entitystore/CompositeColumnEntityMapper.java",
"license": "apache-2.0",
"size": 11912
} | [
"com.netflix.astyanax.model.ColumnList",
"java.nio.ByteBuffer",
"java.util.List",
"javax.persistence.Column"
] | import com.netflix.astyanax.model.ColumnList; import java.nio.ByteBuffer; import java.util.List; import javax.persistence.Column; | import com.netflix.astyanax.model.*; import java.nio.*; import java.util.*; import javax.persistence.*; | [
"com.netflix.astyanax",
"java.nio",
"java.util",
"javax.persistence"
] | com.netflix.astyanax; java.nio; java.util; javax.persistence; | 2,291,171 |
public synchronized void fetchAndUpdateRemoteStore(int nodeId,
List<StoreDefinition> updatedStores) {
// Check for backwards compatibility
StoreDefinitionUtils.validateSchemasAsNeeded(updatedStores);
Map<String, Sto... | synchronized void function(int nodeId, List<StoreDefinition> updatedStores) { StoreDefinitionUtils.validateSchemasAsNeeded(updatedStores); Map<String, StoreDefinition> updatedStoresMap = new HashMap<String, StoreDefinition>(); Versioned<List<StoreDefinition>> originalStoreDefinitions = getRemoteStoreDefList(nodeId); if... | /**
* Helper method to fetch the current stores xml list and update the
* specified stores
*
* @param nodeId ID of the node for which the stores list has to be
* updated
* @param updatedStores New version of the stores to be updated
*/ | Helper method to fetch the current stores xml list and update the specified stores | fetchAndUpdateRemoteStore | {
"repo_name": "birendraa/voldemort",
"path": "src/java/voldemort/client/protocol/admin/AdminClient.java",
"license": "apache-2.0",
"size": 239787
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,837,470 |
private PersistenceManagerFactory getPersistenceManagerFactory(String pmfName) {
return JDOHelper.getPersistenceManagerFactory(pmfName);
} | PersistenceManagerFactory function(String pmfName) { return JDOHelper.getPersistenceManagerFactory(pmfName); } | /**
* A new PersistenceManagerFactory should be fetched on a per-test basis. The
* DatastoreService within the DatastorePersistenceHandler is obtained via the
* DatastoreServiceFactory, so this ensures that the "injected" factory impl
* is returned.
*/ | A new PersistenceManagerFactory should be fetched on a per-test basis. The DatastoreService within the DatastorePersistenceHandler is obtained via the DatastoreServiceFactory, so this ensures that the "injected" factory impl is returned | getPersistenceManagerFactory | {
"repo_name": "GoogleCloudPlatform/datanucleus-appengine",
"path": "tests/com/google/appengine/datanucleus/jdo/JDOTransactionTest.java",
"license": "apache-2.0",
"size": 26626
} | [
"javax.jdo.JDOHelper",
"javax.jdo.PersistenceManagerFactory"
] | import javax.jdo.JDOHelper; import javax.jdo.PersistenceManagerFactory; | import javax.jdo.*; | [
"javax.jdo"
] | javax.jdo; | 814,564 |
private static void checkExists(FileSystem fs, Path location) {
try {
if (!fs.exists(location)) {
throw new DatasetNotFoundException(
"Descriptor location does not exist: " + location);
}
} catch (IOException ex) {
throw new DatasetIOException(
"Cannot access de... | static void function(FileSystem fs, Path location) { try { if (!fs.exists(location)) { throw new DatasetNotFoundException( STR + location); } } catch (IOException ex) { throw new DatasetIOException( STR + location, ex); } } | /**
* Precondition-style static validation that a dataset exists
*
* @param fs A FileSystem where the metadata should be stored
* @param location The Path where the metadata should be stored
* @throws org.kitesdk.data.DatasetNotFoundException if the descriptor location is missing
* @throws org... | Precondition-style static validation that a dataset exists | checkExists | {
"repo_name": "rbrush/kite",
"path": "kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemMetadataProvider.java",
"license": "apache-2.0",
"size": 21765
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.kitesdk.data.DatasetIOException",
"org.kitesdk.data.DatasetNotFoundException"
] | import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.kitesdk.data.DatasetIOException; import org.kitesdk.data.DatasetNotFoundException; | import java.io.*; import org.apache.hadoop.fs.*; import org.kitesdk.data.*; | [
"java.io",
"org.apache.hadoop",
"org.kitesdk.data"
] | java.io; org.apache.hadoop; org.kitesdk.data; | 65,052 |
public static void removePlacementGroup(PlacementGroupId id) {
Ray.internal().removePlacementGroup(id);
} | static void function(PlacementGroupId id) { Ray.internal().removePlacementGroup(id); } | /**
* Remove a placement group by id. Throw RayException if remove failed.
*
* @param id Id of the placement group.
*/ | Remove a placement group by id. Throw RayException if remove failed | removePlacementGroup | {
"repo_name": "pcmoritz/ray-1",
"path": "java/api/src/main/java/io/ray/api/PlacementGroups.java",
"license": "apache-2.0",
"size": 2256
} | [
"io.ray.api.id.PlacementGroupId"
] | import io.ray.api.id.PlacementGroupId; | import io.ray.api.id.*; | [
"io.ray.api"
] | io.ray.api; | 2,499,434 |
void setSchemaKey(RegistryKeyProperty value); | void setSchemaKey(RegistryKeyProperty value); | /**
* Sets the value of the '{@link org.wso2.developerstudio.eclipse.esb.mediators.ValidateSchema#getSchemaKey <em>Schema Key</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Schema Key</em>' reference.
* @see #getSchemaKey()
* @generated
*/ | Sets the value of the '<code>org.wso2.developerstudio.eclipse.esb.mediators.ValidateSchema#getSchemaKey Schema Key</code>' reference. | setSchemaKey | {
"repo_name": "chanakaudaya/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.esb/src/org/wso2/developerstudio/eclipse/esb/mediators/ValidateSchema.java",
"license": "apache-2.0",
"size": 6157
} | [
"org.wso2.developerstudio.eclipse.esb.RegistryKeyProperty"
] | import org.wso2.developerstudio.eclipse.esb.RegistryKeyProperty; | import org.wso2.developerstudio.eclipse.esb.*; | [
"org.wso2.developerstudio"
] | org.wso2.developerstudio; | 1,681,446 |
public final ObjectName getJmxName() {
return oname;
} | final ObjectName function() { return oname; } | /**
* Provides the name under which the pool has been registered with the
* platform MBean server or <code>null</code> if the pool has not been
* registered.
* @return the JMX name
*/ | Provides the name under which the pool has been registered with the platform MBean server or <code>null</code> if the pool has not been registered | getJmxName | {
"repo_name": "EdwardLee03/commons-pool2-sr",
"path": "src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java",
"license": "apache-2.0",
"size": 49103
} | [
"javax.management.ObjectName"
] | import javax.management.ObjectName; | import javax.management.*; | [
"javax.management"
] | javax.management; | 2,095,208 |
@Test
public void testNestedAndCollectionPdx() throws CacheException {
final Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
VM vm1 = host.getVM(1);
VM vm2 = host.getVM(2);
VM vm3 = host.getVM(3);
final int numberOfEntries = 50;
final String[] queries = new String[] {
"SEL... | void function() throws CacheException { final Host host = Host.getHost(0); VM vm0 = host.getVM(0); VM vm1 = host.getVM(1); VM vm2 = host.getVM(2); VM vm3 = host.getVM(3); final int numberOfEntries = 50; final String[] queries = new String[] { STR + this.regName + STR, STR + this.regName + STR, STR + this.regName + STR,... | /**
* Tests client-server query with nested and collection of Pdx.
*/ | Tests client-server query with nested and collection of Pdx | testNestedAndCollectionPdx | {
"repo_name": "deepakddixit/incubator-geode",
"path": "geode-core/src/distributedTest/java/org/apache/geode/cache/query/dunit/PdxQueryDUnitTest.java",
"license": "apache-2.0",
"size": 137231
} | [
"org.apache.geode.cache.CacheException",
"org.apache.geode.test.dunit.Host"
] | import org.apache.geode.cache.CacheException; import org.apache.geode.test.dunit.Host; | import org.apache.geode.cache.*; import org.apache.geode.test.dunit.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,525,760 |
public HostnameType hostnameType() {
return this.hostnameType;
} | HostnameType function() { return this.hostnameType; } | /**
* Get the hostnameType property: Hostname type.
*
* @return the hostnameType value.
*/ | Get the hostnameType property: Hostname type | hostnameType | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/HostnameBindingInner.java",
"license": "mit",
"size": 7307
} | [
"com.azure.resourcemanager.appservice.models.HostnameType"
] | import com.azure.resourcemanager.appservice.models.HostnameType; | import com.azure.resourcemanager.appservice.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 524,730 |
@Test
public void testGetListUnknownNoDefault()
{
PropertiesConfiguration config = new PropertiesConfiguration();
assertNull("Wrong result", config.getList(Integer.class, KEY_PREFIX));
} | void function() { PropertiesConfiguration config = new PropertiesConfiguration(); assertNull(STR, config.getList(Integer.class, KEY_PREFIX)); } | /**
* Tests a conversion to a list if the property is unknown and no default
* value is provided.
*/ | Tests a conversion to a list if the property is unknown and no default value is provided | testGetListUnknownNoDefault | {
"repo_name": "mohanaraosv/commons-configuration",
"path": "src/test/java/org/apache/commons/configuration2/TestAbstractConfigurationBasicFeatures.java",
"license": "apache-2.0",
"size": 42180
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,818,274 |
static String spawnString(ByteBuffer source) {
return spawnString(source, StandardCharsets.UTF_8);
} | static String spawnString(ByteBuffer source) { return spawnString(source, StandardCharsets.UTF_8); } | /**
* Get string from source buffer using UTF-8 charset.
*
* @param source byte buffer to read from
* @return the string
* @see #spawnString(ByteBuffer, Charset)
* @see #stashString(ByteBuffer, String)
*/ | Get string from source buffer using UTF-8 charset | spawnString | {
"repo_name": "sormuras/stash",
"path": "com.github.sormuras.stash/main/java/com/github/sormuras/stash/Stashable.java",
"license": "apache-2.0",
"size": 11354
} | [
"java.nio.ByteBuffer",
"java.nio.charset.StandardCharsets"
] | import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; | import java.nio.*; import java.nio.charset.*; | [
"java.nio"
] | java.nio; | 2,052,826 |
public void setUserService(UserService userService) {
this.userService = userService;
} | void function(UserService userService) { this.userService = userService; } | /**
* Sets the user remote service.
*
* @param userService the user remote service
*/ | Sets the user remote service | setUserService | {
"repo_name": "RamkumarChandran/My-Courses-Portlet",
"path": "docroot/WEB-INF/src/org/gnenc/internet/mycourses/service/base/HostLocalServiceBaseImpl.java",
"license": "gpl-3.0",
"size": 17570
} | [
"com.liferay.portal.service.UserService"
] | import com.liferay.portal.service.UserService; | import com.liferay.portal.service.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 2,485,249 |
public Timestamp getAssetDepreciationDate();
public static final String COLUMNNAME_AssetDisposalDate = "AssetDisposalDate"; | Timestamp function(); public static final String COLUMNNAME_AssetDisposalDate = STR; | /** Get Asset Depreciation Date.
* Date of last depreciation
*/ | Get Asset Depreciation Date. Date of last depreciation | getAssetDepreciationDate | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/I_I_Asset.java",
"license": "gpl-2.0",
"size": 29371
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,845,311 |
XaStatus startDtx(Xid xid, int flag) throws FailoverException, AMQException {
DtxStartBody dtxStartBody = methodRegistry
.createDtxStartBody(xid.getFormatId(), xid.getGlobalTransactionId(), xid.getBranchQualifier(),
flag == XAResource.TMJOIN, flag == XAResource.TMRES... | XaStatus startDtx(Xid xid, int flag) throws FailoverException, AMQException { DtxStartBody dtxStartBody = methodRegistry .createDtxStartBody(xid.getFormatId(), xid.getGlobalTransactionId(), xid.getBranchQualifier(), flag == XAResource.TMJOIN, flag == XAResource.TMRESUME); AMQMethodEvent amqMethodEvent = _connection._pr... | /**
* Send startDtx command to server
*
* @param xid q global transaction identifier to be associated with the resource
* @param flag one of TMNOFLAGS, TMJOIN, or TMRESUME
* @return XaStatus returned by server
* @throws FailoverException when a connection issue is detected
* @throws ... | Send startDtx command to server | startDtx | {
"repo_name": "hastef88/andes",
"path": "modules/andes-core/client/src/main/java/org/wso2/andes/client/XASession_9_1.java",
"license": "apache-2.0",
"size": 12542
} | [
"javax.transaction.xa.XAResource",
"javax.transaction.xa.Xid",
"org.wso2.andes.AMQException",
"org.wso2.andes.client.failover.FailoverException",
"org.wso2.andes.framing.DtxStartBody",
"org.wso2.andes.framing.DtxStartOkBody",
"org.wso2.andes.framing.amqp_0_91.DtxStartOkBodyImpl",
"org.wso2.andes.proto... | import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; import org.wso2.andes.AMQException; import org.wso2.andes.client.failover.FailoverException; import org.wso2.andes.framing.DtxStartBody; import org.wso2.andes.framing.DtxStartOkBody; import org.wso2.andes.framing.amqp_0_91.DtxStartOkBodyImpl; impo... | import javax.transaction.xa.*; import org.wso2.andes.*; import org.wso2.andes.client.failover.*; import org.wso2.andes.framing.*; import org.wso2.andes.framing.amqp_0_91.*; import org.wso2.andes.protocol.*; import org.wso2.andes.transport.*; | [
"javax.transaction",
"org.wso2.andes"
] | javax.transaction; org.wso2.andes; | 1,738,884 |
URI cookieUri = uri;
if (cookie.getDomain() != null) {
// Remove the starting dot character of the domain, if exists (e.g: .domain.com -> domain.com)
String domain = cookie.getDomain();
if (domain.charAt(0) == '.') {
domain = domain.substring(1);
}... | URI cookieUri = uri; if (cookie.getDomain() != null) { String domain = cookie.getDomain(); if (domain.charAt(0) == '.') { domain = domain.substring(1); } try { cookieUri = new URI(uri.getScheme() == null ? "http" : uri.getScheme(), domain, cookie.getPath() == null ? "/" : cookie.getPath(), null); } catch (URISyntaxExce... | /**
* Get the real URI from the cookie "domain" and "path" attributes, if they
* are not set then uses the URI provided (coming from the response)
*
* @param uri
* @param cookie
* @return
*/ | Get the real URI from the cookie "domain" and "path" attributes, if they are not set then uses the URI provided (coming from the response) | cookieUri | {
"repo_name": "room-15/ChatSE",
"path": "app/src/main/java/com/tristanwiley/chatse/network/cookie/PersistentCookieStore.java",
"license": "apache-2.0",
"size": 9896
} | [
"java.net.URISyntaxException"
] | import java.net.URISyntaxException; | import java.net.*; | [
"java.net"
] | java.net; | 798,666 |
public void displayNewGallery(CmsGalleryFolderEntry galleryFolder) {
String parent = CmsResource.getParentFolder(galleryFolder.getSitePath());
CmsSitemapTreeItem parentItem = getTreeItem(parent);
if (parentItem != null) {
CmsUUID parentId = parentItem.getEntryId();
m... | void function(CmsGalleryFolderEntry galleryFolder) { String parent = CmsResource.getParentFolder(galleryFolder.getSitePath()); CmsSitemapTreeItem parentItem = getTreeItem(parent); if (parentItem != null) { CmsUUID parentId = parentItem.getEntryId(); m_controller.updateEntry(parentId); } else { m_controller.loadPath(par... | /**
* Displays a newly created gallery folder.<p>
*
* @param galleryFolder the gallery folder
*/ | Displays a newly created gallery folder | displayNewGallery | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-gwt/org/opencms/ade/sitemap/client/CmsSitemapView.java",
"license": "lgpl-2.1",
"size": 69569
} | [
"com.google.gwt.dom.client.Style",
"org.opencms.ade.sitemap.shared.CmsGalleryFolderEntry",
"org.opencms.file.CmsResource",
"org.opencms.util.CmsUUID"
] | import com.google.gwt.dom.client.Style; import org.opencms.ade.sitemap.shared.CmsGalleryFolderEntry; import org.opencms.file.CmsResource; import org.opencms.util.CmsUUID; | import com.google.gwt.dom.client.*; import org.opencms.ade.sitemap.shared.*; import org.opencms.file.*; import org.opencms.util.*; | [
"com.google.gwt",
"org.opencms.ade",
"org.opencms.file",
"org.opencms.util"
] | com.google.gwt; org.opencms.ade; org.opencms.file; org.opencms.util; | 2,524,383 |
public Call<ResponseBody> putFloatAsync(FloatWrapper complexBody, final ServiceCallback<Void> serviceCallback) {
if (complexBody == null) {
serviceCallback.failure(new ServiceException(
new IllegalArgumentException("Parameter complexBody is required and cannot be null.")));
... | Call<ResponseBody> function(FloatWrapper complexBody, final ServiceCallback<Void> serviceCallback) { if (complexBody == null) { serviceCallback.failure(new ServiceException( new IllegalArgumentException(STR))); } | /**
* Put complex types with float properties
*
* @param complexBody Please put 1.05 and -0.003
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
*/ | Put complex types with float properties | putFloatAsync | {
"repo_name": "BretJohnson/autorest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodycomplex/PrimitiveImpl.java",
"license": "mit",
"size": 48767
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceException",
"com.squareup.okhttp.ResponseBody"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceException; import com.squareup.okhttp.ResponseBody; | import com.microsoft.rest.*; import com.squareup.okhttp.*; | [
"com.microsoft.rest",
"com.squareup.okhttp"
] | com.microsoft.rest; com.squareup.okhttp; | 1,693,324 |
protected void addDestroyShortcutsCommand(ICompositeCommand cmd, View view) {
assert view.getEAnnotation("Shortcut") == null; //$NON-NLS-1$
for (Iterator it = view.getDiagram().getChildren().iterator(); it
.hasNext();) {
View nextView = (View) it.next();
if (nextView.getEAnnotation("Shortcut") == null ... | void function(ICompositeCommand cmd, View view) { assert view.getEAnnotation(STR) == null; for (Iterator it = view.getDiagram().getChildren().iterator(); it .hasNext();) { View nextView = (View) it.next(); if (nextView.getEAnnotation(STR) == null !nextView.isSetElement() nextView.getElement() != view.getElement()) { co... | /**
* Clean all shortcuts to the host element from the same diagram
* @generated
*/ | Clean all shortcuts to the host element from the same diagram | addDestroyShortcutsCommand | {
"repo_name": "asankas/developer-studio",
"path": "data-mapper/org.wso2.developerstudio.visualdatamapper.diagram/src/dataMapper/diagram/edit/policies/DataMapperBaseItemSemanticEditPolicy.java",
"license": "apache-2.0",
"size": 10579
} | [
"java.util.Iterator",
"org.eclipse.gmf.runtime.common.core.command.ICompositeCommand",
"org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand",
"org.eclipse.gmf.runtime.notation.View"
] | import java.util.Iterator; import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand; import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand; import org.eclipse.gmf.runtime.notation.View; | import java.util.*; import org.eclipse.gmf.runtime.common.core.command.*; import org.eclipse.gmf.runtime.diagram.core.commands.*; import org.eclipse.gmf.runtime.notation.*; | [
"java.util",
"org.eclipse.gmf"
] | java.util; org.eclipse.gmf; | 1,447,876 |
public static List<DynamicTest> dynamicTests(boolean testIfArchive, TestExecutable testFunction) throws Exception {
final List<ExampleDescription> descriptions = getExampleDescriptions();
final List<DynamicTest> tests = new ArrayList<>();
for (final ExampleDescription description : descriptions) {
if (!test... | static List<DynamicTest> function(boolean testIfArchive, TestExecutable testFunction) throws Exception { final List<ExampleDescription> descriptions = getExampleDescriptions(); final List<DynamicTest> tests = new ArrayList<>(); for (final ExampleDescription description : descriptions) { if (!testIfArchive description.a... | /** Create the dynamic tests with the given function.
*
* @param testIfArchive indicates if the example archive should be test for creating the dynamic test.
* @param testFunction the test code.
* @return the dynamic tests.
* @throws Exception if the example descriptions cannot be read.
*/ | Create the dynamic tests with the given function | dynamicTests | {
"repo_name": "sarl/sarl",
"path": "contribs/io.sarl.examples/io.sarl.examples.tests/src/test/java/io/sarl/examples/tests/utils/ExamplesTestUtils.java",
"license": "apache-2.0",
"size": 22676
} | [
"java.util.ArrayList",
"java.util.List",
"org.junit.jupiter.api.DynamicTest"
] | import java.util.ArrayList; import java.util.List; import org.junit.jupiter.api.DynamicTest; | import java.util.*; import org.junit.jupiter.api.*; | [
"java.util",
"org.junit.jupiter"
] | java.util; org.junit.jupiter; | 787,024 |
protected void addFunctionUpdatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Class_functionUpdate_feature"),
getString("_UI_PropertyDescr... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), MetawebdesignPackage.Literals.CLASS__FUNCTION_UPDATE, true, false, false, ItemPropertyDescriptor.... | /**
* This adds a property descriptor for the Function Update feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Function Update feature. | addFunctionUpdatePropertyDescriptor | {
"repo_name": "MetaWebDesign/Editor",
"path": "Editor_MWD.edit/src/Metawebdesign/metawebdesign/provider/ClassItemProvider.java",
"license": "agpl-3.0",
"size": 13250
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,224,416 |
boolean setVoice(Device device, int value); | boolean setVoice(Device device, int value); | /**
* Set the device's voice.
*
* @param device
* The device be controlled.
* @param value
* Target voice want be set.
* @return
*/ | Set the device's voice | setVoice | {
"repo_name": "lxxgreat/VideoPlayer",
"path": "app/src/main/java/com/shane/android/videoplayer/interf/IController.java",
"license": "mit",
"size": 3180
} | [
"org.cybergarage.upnp.Device"
] | import org.cybergarage.upnp.Device; | import org.cybergarage.upnp.*; | [
"org.cybergarage.upnp"
] | org.cybergarage.upnp; | 1,939,426 |
@Override
protected void reportFatalError(Exception e)
throws RDFParseException
{
reportFatalError(e, lineNo, -1);
} | void function(Exception e) throws RDFParseException { reportFatalError(e, lineNo, -1); } | /**
* Overrides {@link RDFParserBase#reportFatalError(Exception)}, adding line
* number information to the error.
*/ | Overrides <code>RDFParserBase#reportFatalError(Exception)</code>, adding line number information to the error | reportFatalError | {
"repo_name": "gomezgoiri/rio-clp",
"path": "src/main/java/es/deusto/deustotech/rio/clips/CLPParser.java",
"license": "bsd-2-clause",
"size": 18936
} | [
"org.openrdf.rio.RDFParseException"
] | import org.openrdf.rio.RDFParseException; | import org.openrdf.rio.*; | [
"org.openrdf.rio"
] | org.openrdf.rio; | 1,634,528 |
@Function(name = "slice", arity = 2)
public static Object slice(ExecutionContext cx, Object thisValue, Object start, Object end) {
ArrayBufferObject obj = thisArrayBufferObject(cx, thisValue);
long len = obj.getByteLength();
doub... | @Function(name = "slice", arity = 2) static Object function(ExecutionContext cx, Object thisValue, Object start, Object end) { ArrayBufferObject obj = thisArrayBufferObject(cx, thisValue); long len = obj.getByteLength(); double relativeStart = ToInteger(cx, start); long first = (long) (relativeStart < 0 ? Math.max((len... | /**
* 24.1.4.3 ArrayBuffer.prototype.slice (start, end)
*/ | 24.1.4.3 ArrayBuffer.prototype.slice (start, end) | slice | {
"repo_name": "rwaldron/es6draft",
"path": "src/main/java/com/github/anba/es6draft/runtime/objects/binary/ArrayBufferPrototype.java",
"license": "mit",
"size": 5549
} | [
"com.github.anba.es6draft.runtime.AbstractOperations",
"com.github.anba.es6draft.runtime.ExecutionContext",
"com.github.anba.es6draft.runtime.internal.Errors",
"com.github.anba.es6draft.runtime.internal.Messages",
"com.github.anba.es6draft.runtime.internal.Properties",
"com.github.anba.es6draft.runtime.ob... | import com.github.anba.es6draft.runtime.AbstractOperations; import com.github.anba.es6draft.runtime.ExecutionContext; import com.github.anba.es6draft.runtime.internal.Errors; import com.github.anba.es6draft.runtime.internal.Messages; import com.github.anba.es6draft.runtime.internal.Properties; import com.github.anba.es... | import com.github.anba.es6draft.runtime.*; import com.github.anba.es6draft.runtime.internal.*; import com.github.anba.es6draft.runtime.objects.binary.*; import com.github.anba.es6draft.runtime.types.*; import java.nio.*; | [
"com.github.anba",
"java.nio"
] | com.github.anba; java.nio; | 430,180 |
public Collection<Class<? extends SimpleServlet>> getServlets(); | Collection<Class<? extends SimpleServlet>> function(); | /**
* For anyone externally interested, will return the list of servlet classes
* that are registered
* @return the list of servlet classes
*/ | For anyone externally interested, will return the list of servlet classes that are registered | getServlets | {
"repo_name": "vjanmey/EpicMudfia",
"path": "com/planet_ink/miniweb/interfaces/SimpleServletManager.java",
"license": "apache-2.0",
"size": 1985
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,165,904 |
if (dir.exists() && dir.isDirectory()) {
File[] files = dir.listFiles();
for (File file : files) {
if (file.isFile()) {
if (file.getName().toLowerCase().endsWith(".jar") && !addFile(file)) {
System.out.println("Unable to add "+file+" to the classpath.");
}
}
else if (file.isDirectory... | if (dir.exists() && dir.isDirectory()) { File[] files = dir.listFiles(); for (File file : files) { if (file.isFile()) { if (file.getName().toLowerCase().endsWith(".jar") && !addFile(file)) { System.out.println(STR+file+STR); } } else if (file.isDirectory()) addJARs(file); } } } | /**
* Add all the jar files in a directory tree to the classpath.
* @param dir the top-level directory in the tree
*/ | Add all the jar files in a directory tree to the classpath | addJARs | {
"repo_name": "blezek/Notion",
"path": "src/main/java/org/rsna/util/ClasspathUtil.java",
"license": "bsd-3-clause",
"size": 2386
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 292,175 |
@Override
public void evalUnset(Env env) {
env.error(getLocation(),
L.l("{0}::${1}: Cannot unset static variables.",
env.getCallingClass().getName(), _varName));
} | void function(Env env) { env.error(getLocation(), L.l(STR, env.getCallingClass().getName(), _varName)); } | /**
* Evaluates the expression.
*
* @param env the calling environment.
*
* @return the expression value.
*/ | Evaluates the expression | evalUnset | {
"repo_name": "CleverCloud/Quercus",
"path": "quercus/src/main/java/com/caucho/quercus/expr/ClassVirtualFieldVarExpr.java",
"license": "gpl-2.0",
"size": 4179
} | [
"com.caucho.quercus.env.Env"
] | import com.caucho.quercus.env.Env; | import com.caucho.quercus.env.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 2,719,930 |
public SimpleType searchSimpleType(String name);
| SimpleType function(String name); | /**
* Search simple type.
*
* @param name the name
* @return the simple type
*/ | Search simple type | searchSimpleType | {
"repo_name": "kingargyle/turmeric-wsdldoctool",
"path": "wsdl-doc-tool/src/main/java/org/ebayopensource/turmeric/tools/annoparser/XSDDocInterface.java",
"license": "apache-2.0",
"size": 2507
} | [
"org.ebayopensource.turmeric.tools.annoparser.dataobjects.SimpleType"
] | import org.ebayopensource.turmeric.tools.annoparser.dataobjects.SimpleType; | import org.ebayopensource.turmeric.tools.annoparser.dataobjects.*; | [
"org.ebayopensource.turmeric"
] | org.ebayopensource.turmeric; | 2,111,717 |
public static Resource findDuplicateResource(
IModelContainer modelContainer, String uri) {
if (uri == null || uri.isEmpty()) {
return null;
}
Resource retval = ResourceFactory.createResource(uri);
if (modelContainer.getModel().containsResource(retval)) {
return modelContainer.getModel().getResource... | static Resource function( IModelContainer modelContainer, String uri) { if (uri == null uri.isEmpty()) { return null; } Resource retval = ResourceFactory.createResource(uri); if (modelContainer.getModel().containsResource(retval)) { return modelContainer.getModel().getResource(uri); } else { return null; } } | /**
* Search the model to see if there is a duplicate resource either based on the
* URI or based on other information. Subclasses may choose to override this
* method to prevent duplicate resource from being created with the same properties.
* @param modelContainer
* @param uri
* @return Any duplicate res... | Search the model to see if there is a duplicate resource either based on the URI or based on other information. Subclasses may choose to override this method to prevent duplicate resource from being created with the same properties | findDuplicateResource | {
"repo_name": "sschuberth/spdx-tools",
"path": "src/org/spdx/rdfparser/RdfModelHelper.java",
"license": "apache-2.0",
"size": 4556
} | [
"com.hp.hpl.jena.rdf.model.Resource",
"com.hp.hpl.jena.rdf.model.ResourceFactory"
] | import com.hp.hpl.jena.rdf.model.Resource; import com.hp.hpl.jena.rdf.model.ResourceFactory; | import com.hp.hpl.jena.rdf.model.*; | [
"com.hp.hpl"
] | com.hp.hpl; | 1,920,487 |
private static int parseHdlr(ParsableByteArray hdlr) {
hdlr.setPosition(Atom.FULL_HEADER_SIZE + 4);
return hdlr.readInt();
} | static int function(ParsableByteArray hdlr) { hdlr.setPosition(Atom.FULL_HEADER_SIZE + 4); return hdlr.readInt(); } | /**
* Parses an hdlr atom.
*
* @param hdlr The hdlr atom to parse.
* @return The track type.
*/ | Parses an hdlr atom | parseHdlr | {
"repo_name": "raphanda/ExoPlayer",
"path": "library/src/main/java/com/google/android/exoplayer/extractor/mp4/AtomParsers.java",
"license": "apache-2.0",
"size": 28544
} | [
"com.google.android.exoplayer.util.ParsableByteArray"
] | import com.google.android.exoplayer.util.ParsableByteArray; | import com.google.android.exoplayer.util.*; | [
"com.google.android"
] | com.google.android; | 172,459 |
Variable resolveVariable(String name) throws XPathException; | Variable resolveVariable(String name) throws XPathException; | /**
* Try to resolve a variable.
*
* @param name the qualified name of the variable as string
* @return the declared Variable object
* @throws XPathException if the variable is unknown
*/ | Try to resolve a variable | resolveVariable | {
"repo_name": "hungerburg/exist",
"path": "src/org/exist/interpreter/Context.java",
"license": "lgpl-2.1",
"size": 26301
} | [
"org.exist.xquery.Variable",
"org.exist.xquery.XPathException"
] | import org.exist.xquery.Variable; import org.exist.xquery.XPathException; | import org.exist.xquery.*; | [
"org.exist.xquery"
] | org.exist.xquery; | 1,373,584 |
@Test
public void testBlobForJobCacheHa() throws IOException {
Configuration config = new Configuration();
config.setString(
BlobServerOptions.STORAGE_DIRECTORY, temporaryFolder.newFolder().getAbsolutePath());
config.setString(HighAvailabilityOptions.HA_MODE, "ZOOKEEPER")... | void function() throws IOException { Configuration config = new Configuration(); config.setString( BlobServerOptions.STORAGE_DIRECTORY, temporaryFolder.newFolder().getAbsolutePath()); config.setString(HighAvailabilityOptions.HA_MODE, STR); config.setString( HighAvailabilityOptions.HA_STORAGE_PATH, temporaryFolder.newFo... | /**
* BlobCache is configured in HA mode and the cache can download files from the file system
* directly and does not need to download BLOBs from the BlobServer which remains active after
* the BLOB upload. Using job-related BLOBs.
*/ | BlobCache is configured in HA mode and the cache can download files from the file system directly and does not need to download BLOBs from the BlobServer which remains active after the BLOB upload. Using job-related BLOBs | testBlobForJobCacheHa | {
"repo_name": "clarkyzl/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheSuccessTest.java",
"license": "apache-2.0",
"size": 8550
} | [
"java.io.IOException",
"org.apache.flink.api.common.JobID",
"org.apache.flink.configuration.BlobServerOptions",
"org.apache.flink.configuration.Configuration",
"org.apache.flink.configuration.HighAvailabilityOptions"
] | import java.io.IOException; import org.apache.flink.api.common.JobID; import org.apache.flink.configuration.BlobServerOptions; import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.HighAvailabilityOptions; | import java.io.*; import org.apache.flink.api.common.*; import org.apache.flink.configuration.*; | [
"java.io",
"org.apache.flink"
] | java.io; org.apache.flink; | 1,707,730 |
public List<String> getAvailableActions(String orderId, AuthTicket authTicket) throws Exception
{
MozuClient<List<String>> client = com.mozu.api.clients.commerce.OrderClient.getAvailableActionsClient( orderId, authTicket);
client.setContext(_apiContext);
client.executeRequest();
return client.getResult();
... | List<String> function(String orderId, AuthTicket authTicket) throws Exception { MozuClient<List<String>> client = com.mozu.api.clients.commerce.OrderClient.getAvailableActionsClient( orderId, authTicket); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } | /**
* Retrieves available order actions which depends on the status of the order. Actions are "CreateOrder," "SubmitOrder," "SetOrderAsProcessing," "CloseOrder," or "CancelOrder."
* <p><pre><code>
* Order order = new Order();
* string string = order.GetAvailableActions( orderId, authTicket);
* </code></pre></... | Retrieves available order actions which depends on the status of the order. Actions are "CreateOrder," "SubmitOrder," "SetOrderAsProcessing," "CloseOrder," or "CancelOrder." <code><code> Order order = new Order(); string string = order.GetAvailableActions( orderId, authTicket); </code></code> | getAvailableActions | {
"repo_name": "carsonreinke/mozu-java-sdk",
"path": "src/main/java/com/mozu/api/resources/commerce/OrderResource.java",
"license": "mit",
"size": 17569
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.security.AuthTicket",
"java.util.List"
] | import com.mozu.api.MozuClient; import com.mozu.api.security.AuthTicket; import java.util.List; | import com.mozu.api.*; import com.mozu.api.security.*; import java.util.*; | [
"com.mozu.api",
"java.util"
] | com.mozu.api; java.util; | 1,850,662 |
void sendInternal(int messageId, String topic, int qos, ByteBuf payload, boolean retain, boolean internal) throws Exception {
synchronized (lock) {
Message serverMessage = MQTTUtil.createServerMessageFromByteBuf(session, topic, retain, qos, payload);
if (qos > 0) {
serverMessage.... | void sendInternal(int messageId, String topic, int qos, ByteBuf payload, boolean retain, boolean internal) throws Exception { synchronized (lock) { Message serverMessage = MQTTUtil.createServerMessageFromByteBuf(session, topic, retain, qos, payload); if (qos > 0) { serverMessage.setDurable(MQTTUtil.DURABLE_MESSAGES); }... | /**
* Sends a message either on behalf of the client or on behalf of the broker (Will Messages)
* @param messageId
* @param topic
* @param qos
* @param payload
* @param retain
* @param internal if true means on behalf of the broker (skips authorisation) and does not return ack.
* @throws... | Sends a message either on behalf of the client or on behalf of the broker (Will Messages) | sendInternal | {
"repo_name": "mnovak1/activemq-artemis",
"path": "artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java",
"license": "apache-2.0",
"size": 12644
} | [
"io.netty.buffer.ByteBuf",
"io.netty.buffer.EmptyByteBuf",
"org.apache.activemq.artemis.api.core.Message",
"org.apache.activemq.artemis.core.transaction.Transaction"
] | import io.netty.buffer.ByteBuf; import io.netty.buffer.EmptyByteBuf; import org.apache.activemq.artemis.api.core.Message; import org.apache.activemq.artemis.core.transaction.Transaction; | import io.netty.buffer.*; import org.apache.activemq.artemis.api.core.*; import org.apache.activemq.artemis.core.transaction.*; | [
"io.netty.buffer",
"org.apache.activemq"
] | io.netty.buffer; org.apache.activemq; | 1,766,179 |
public short getInterrupt() throws TimeoutException, NotConnectedException {
byte options = 0;
boolean isResponseExpected = getResponseExpected(FUNCTION_GET_INTERRUPT);
if(isResponseExpected) {
options = 8;
}
ByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)8, FUNCTION_GET_INTERRUPT, options, (byte)... | short function() throws TimeoutException, NotConnectedException { byte options = 0; boolean isResponseExpected = getResponseExpected(FUNCTION_GET_INTERRUPT); if(isResponseExpected) { options = 8; } ByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)8, FUNCTION_GET_INTERRUPT, options, (byte)(0)); byte[] response = sen... | /**
* Returns the interrupt bitmask as set by {@link com.tinkerforge.BrickletIO4.setInterrupt}.
*/ | Returns the interrupt bitmask as set by <code>com.tinkerforge.BrickletIO4.setInterrupt</code> | getInterrupt | {
"repo_name": "ezeeb/pipes-tinkerforge",
"path": "src/main/java/com/tinkerforge/BrickletIO4.java",
"license": "apache-2.0",
"size": 19966
} | [
"java.nio.ByteBuffer",
"java.nio.ByteOrder"
] | import java.nio.ByteBuffer; import java.nio.ByteOrder; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,594,256 |
public PropertyInfoBuilder addValue(Path value) throws RepositoryException {
return addValue(QValueFactoryImpl.getInstance().create(value));
} | PropertyInfoBuilder function(Path value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); } | /**
* Add a {@link PropertyType#PATH} value to this property.
*
* @param value
* @return <code>this</code>
* @throws RepositoryException
* @throws IllegalStateException if the type of the value does not match the type of this property
*/ | Add a <code>PropertyType#PATH</code> value to this property | addValue | {
"repo_name": "apache/jackrabbit",
"path": "jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoBuilder.java",
"license": "apache-2.0",
"size": 28049
} | [
"javax.jcr.RepositoryException",
"org.apache.jackrabbit.spi.Path",
"org.apache.jackrabbit.spi.commons.value.QValueFactoryImpl"
] | import javax.jcr.RepositoryException; import org.apache.jackrabbit.spi.Path; import org.apache.jackrabbit.spi.commons.value.QValueFactoryImpl; | import javax.jcr.*; import org.apache.jackrabbit.spi.*; import org.apache.jackrabbit.spi.commons.value.*; | [
"javax.jcr",
"org.apache.jackrabbit"
] | javax.jcr; org.apache.jackrabbit; | 2,490,606 |
public void removePropertyChangeListener(PropertyChangeListener listener) {
this.propertyChangeSupport.removePropertyChangeListener(listener);
} | void function(PropertyChangeListener listener) { this.propertyChangeSupport.removePropertyChangeListener(listener); } | /**
* Removes a property change listener from the series.
*
* @param listener the listener.
*/ | Removes a property change listener from the series | removePropertyChangeListener | {
"repo_name": "simon04/jfreechart",
"path": "src/main/java/org/jfree/data/general/Series.java",
"license": "lgpl-2.1",
"size": 13494
} | [
"java.beans.PropertyChangeListener"
] | import java.beans.PropertyChangeListener; | import java.beans.*; | [
"java.beans"
] | java.beans; | 454,403 |
public static Key getKey(byte[] keyData) {
return new SecretKeySpec(keyData, "AES");
} | static Key function(byte[] keyData) { return new SecretKeySpec(keyData, "AES"); } | /**
* Instantiates an AES key.
*
* @param keyData The key bytes
* @return An AES key
*/ | Instantiates an AES key | getKey | {
"repo_name": "cpslabteam/codebase",
"path": "src/main/java/codebase/AESUtil.java",
"license": "gpl-2.0",
"size": 4480
} | [
"java.security.Key",
"javax.crypto.spec.SecretKeySpec"
] | import java.security.Key; import javax.crypto.spec.SecretKeySpec; | import java.security.*; import javax.crypto.spec.*; | [
"java.security",
"javax.crypto"
] | java.security; javax.crypto; | 1,189,787 |
public ClusterUpdate withEnablePurge(Boolean enablePurge) {
if (this.innerProperties() == null) {
this.innerProperties = new ClusterProperties();
}
this.innerProperties().withEnablePurge(enablePurge);
return this;
} | ClusterUpdate function(Boolean enablePurge) { if (this.innerProperties() == null) { this.innerProperties = new ClusterProperties(); } this.innerProperties().withEnablePurge(enablePurge); return this; } | /**
* Set the enablePurge property: A boolean value that indicates if the purge operations are enabled.
*
* @param enablePurge the enablePurge value to set.
* @return the ClusterUpdate object itself.
*/ | Set the enablePurge property: A boolean value that indicates if the purge operations are enabled | withEnablePurge | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/ClusterUpdate.java",
"license": "mit",
"size": 21531
} | [
"com.azure.resourcemanager.kusto.fluent.models.ClusterProperties"
] | import com.azure.resourcemanager.kusto.fluent.models.ClusterProperties; | import com.azure.resourcemanager.kusto.fluent.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 372,021 |
public static String dateToString(String date, String actualFormat, String newFormat) {
String stringDate = "";
if(date != null){
DateFormat dateFormat = new SimpleDateFormat(actualFormat);
try {
Date newDate = dateFormat.parse(date);
dateFormat = new SimpleDateFormat(newFormat);
stringD... | static String function(String date, String actualFormat, String newFormat) { String stringDate = STRError in the method dateToString(Date date, String format)", e); } } return stringDate; } | /**
* Convert a Date to String in the format argument.
*/ | Convert a Date to String in the format argument | dateToString | {
"repo_name": "darciopacifico/omr",
"path": "di-pepsico/src/main/java/br/com/mastersaf/util/UtilSS.java",
"license": "apache-2.0",
"size": 22280
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,460,469 |
public void remove(final int[] indices)
{
ArrayList newData = (ArrayList)((ArrayList)data).clone();
for(int i=0; i<indices.length; i++)
{
if( indices[i] < data.size() )
newData.remove(data.get(indices[i]));
}
this.data = newData;
super.fireTableDat... | void function(final int[] indices) { ArrayList newData = (ArrayList)((ArrayList)data).clone(); for(int i=0; i<indices.length; i++) { if( indices[i] < data.size() ) newData.remove(data.get(indices[i])); } this.data = newData; super.fireTableDataChanged(); } | /**
* Removes the values at the specified indices from the model.
*/ | Removes the values at the specified indices from the model | remove | {
"repo_name": "tolo/JServer",
"path": "src/java/com/teletalk/jadmin/gui/overview/PropertyDialog.java",
"license": "apache-2.0",
"size": 27133
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,488,134 |
private static boolean useUntrimmedConfigs(BuildOptions options) {
return options.get(BuildConfiguration.Options.class).configsMode
== BuildConfiguration.Options.ConfigsMode.NOTRIM;
} | static boolean function(BuildOptions options) { return options.get(BuildConfiguration.Options.class).configsMode == BuildConfiguration.Options.ConfigsMode.NOTRIM; } | /**
* Returns whether configurations should trim their fragments to only those needed by
* targets and their transitive dependencies.
*/ | Returns whether configurations should trim their fragments to only those needed by targets and their transitive dependencies | useUntrimmedConfigs | {
"repo_name": "damienmg/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java",
"license": "apache-2.0",
"size": 90831
} | [
"com.google.devtools.build.lib.analysis.BuildView",
"com.google.devtools.build.lib.analysis.config.BuildConfiguration",
"com.google.devtools.build.lib.analysis.config.BuildOptions"
] | import com.google.devtools.build.lib.analysis.BuildView; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; import com.google.devtools.build.lib.analysis.config.BuildOptions; | import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.analysis.config.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,024,965 |
public void testBudgetGreaterThanActualNoEncumbrancesLogicN2() {
LOG.info("budget greater than actual, no encumbrances test started...");
List<Balance> balancesToCheck = new ArrayList<Balance>();
// add balances to check N2
Balance cbBalance = BALANCE_FIXTURE.SCENARIO1_CURRENT_... | void function() { LOG.info(STR); List<Balance> balancesToCheck = new ArrayList<Balance>(); Balance cbBalance = BALANCE_FIXTURE.SCENARIO1_CURRENT_BUDGET_BALANCE.convertToBalance(); cbBalance.setObjectCode(OBJECT_CODE_FIXTURE.C05_RESERVE_CODE.getCode()); Balance acBalance = BALANCE_FIXTURE.SCENARIO1_ACTUAL_BALANCE.conver... | /**
* Tests that Logic N2 generates the correct origin entries for Scenario 1, budget exceeds actual
*/ | Tests that Logic N2 generates the correct origin entries for Scenario 1, budget exceeds actual | testBudgetGreaterThanActualNoEncumbrancesLogicN2 | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "test/unit/src/org/kuali/kfs/gl/service/OrganizationReversionLogicTest.java",
"license": "agpl-3.0",
"size": 107922
} | [
"java.util.ArrayList",
"java.util.List",
"org.kuali.kfs.gl.batch.service.impl.OrganizationReversionMockServiceImpl",
"org.kuali.kfs.gl.businessobject.Balance",
"org.kuali.kfs.gl.businessobject.OriginEntryInformation",
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import java.util.ArrayList; import java.util.List; import org.kuali.kfs.gl.batch.service.impl.OrganizationReversionMockServiceImpl; import org.kuali.kfs.gl.businessobject.Balance; import org.kuali.kfs.gl.businessobject.OriginEntryInformation; import org.kuali.rice.core.api.util.type.KualiDecimal; | import java.util.*; import org.kuali.kfs.gl.batch.service.impl.*; import org.kuali.kfs.gl.businessobject.*; import org.kuali.rice.core.api.util.type.*; | [
"java.util",
"org.kuali.kfs",
"org.kuali.rice"
] | java.util; org.kuali.kfs; org.kuali.rice; | 714,960 |
public WobmailFolder getInboxFolder(); | WobmailFolder function(); | /**
* Get a (possibly) new <code>WobmailFolder</code> for the current account's inbox.
* If multiple <code>WobmailFolder</code>s are created for the inbox, they
* will each have their own sorting/reverse setting and selection of
* messages. This is probably not what you want, so avoid using this where
* poss... | Get a (possibly) new <code>WobmailFolder</code> for the current account's inbox. If multiple <code>WobmailFolder</code>s are created for the inbox, they will each have their own sorting/reverse setting and selection of messages. This is probably not what you want, so avoid using this where possible | getInboxFolder | {
"repo_name": "plotters/wobmail",
"path": "src/net/xytra/wobmail/mailconn/session/WobmailSession.java",
"license": "bsd-3-clause",
"size": 1723
} | [
"net.xytra.wobmail.mailconn.folder.WobmailFolder"
] | import net.xytra.wobmail.mailconn.folder.WobmailFolder; | import net.xytra.wobmail.mailconn.folder.*; | [
"net.xytra.wobmail"
] | net.xytra.wobmail; | 1,127,376 |
@Test
void testHeuristic()
{
final Heuristic heuristic = new HeuristicManhattan(1);
assertEquals(4.0, heuristic.getCost(1, 2, 3, 4));
}
| void testHeuristic() { final Heuristic heuristic = new HeuristicManhattan(1); assertEquals(4.0, heuristic.getCost(1, 2, 3, 4)); } | /**
* Test the heuristic.
*/ | Test the heuristic | testHeuristic | {
"repo_name": "b3dgs/lionengine",
"path": "lionengine-game/src/test/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/HeuristicManhattanTest.java",
"license": "gpl-3.0",
"size": 1255
} | [
"com.b3dgs.lionengine.UtilAssert"
] | import com.b3dgs.lionengine.UtilAssert; | import com.b3dgs.lionengine.*; | [
"com.b3dgs.lionengine"
] | com.b3dgs.lionengine; | 2,338,141 |
Date getLastExecuted();
| Date getLastExecuted(); | /**
* Get last execution date
*/ | Get last execution date | getLastExecuted | {
"repo_name": "Cognifide/APM",
"path": "app/aem/api/src/main/java/com/cognifide/apm/api/scripts/Script.java",
"license": "apache-2.0",
"size": 1922
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 313,772 |
Type getType() {
return delegation.getType();
}
| Type getType() { return delegation.getType(); } | /**
* Returns the controller type.
*
* @return the controller type.
*/ | Returns the controller type | getType | {
"repo_name": "pepstock-org/Charba",
"path": "src/org/pepstock/charba/client/controllers/WrapperController.java",
"license": "apache-2.0",
"size": 11986
} | [
"org.pepstock.charba.client.Type"
] | import org.pepstock.charba.client.Type; | import org.pepstock.charba.client.*; | [
"org.pepstock.charba"
] | org.pepstock.charba; | 1,505,277 |
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
} | ComponentUI[] function() { return MultiLookAndFeel.uisToArray(uis); } | /**
* Returns an array containing the UI delegates managed by this
* <code>MultiToolTipUI</code>. The first item in the array is always
* the UI delegate from the installed default look and feel.
*
* @return An array of UI delegates.
*/ | Returns an array containing the UI delegates managed by this <code>MultiToolTipUI</code>. The first item in the array is always the UI delegate from the installed default look and feel | getUIs | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/plaf/multi/MultiToolTipUI.java",
"license": "bsd-3-clause",
"size": 11188
} | [
"javax.swing.plaf.ComponentUI"
] | import javax.swing.plaf.ComponentUI; | import javax.swing.plaf.*; | [
"javax.swing"
] | javax.swing; | 1,558,818 |
public void appendChild(TextElement element) {
if( !(element instanceof DOMXMLElement) )
throw new IllegalArgumentException( "element type not supported." );
getAssocNode().appendChild( ((DOMXMLElement) element).getAssocNode() );
}; | void function(TextElement element) { if( !(element instanceof DOMXMLElement) ) throw new IllegalArgumentException( STR ); getAssocNode().appendChild( ((DOMXMLElement) element).getAssocNode() ); }; | /**
* Add a child element to this element
*
* @param element the element to be added as a child
*/ | Add a child element to this element | appendChild | {
"repo_name": "idega/net.jxta",
"path": "src/java/net/jxta/impl/document/DOMXMLElement.java",
"license": "gpl-3.0",
"size": 12364
} | [
"net.jxta.document.TextElement"
] | import net.jxta.document.TextElement; | import net.jxta.document.*; | [
"net.jxta.document"
] | net.jxta.document; | 1,935,141 |
public Type getDataType() {
if ( super.getDataType() == null ) {
super.setDataType( resolveDataType() );
}
return super.getDataType();
} | Type function() { if ( super.getDataType() == null ) { super.setDataType( resolveDataType() ); } return super.getDataType(); } | /**
* Figure out the type of the binary expression by looking at
* the types of the operands. Sometimes we don't know both types,
* if, for example, one is a parameter.
*/ | Figure out the type of the binary expression by looking at the types of the operands. Sometimes we don't know both types, if, for example, one is a parameter | getDataType | {
"repo_name": "ControlSystemStudio/cs-studio",
"path": "thirdparty/plugins/org.csstudio.platform.libs.hibernate/project/core/src/main/java/org/hibernate/hql/ast/tree/BinaryArithmeticOperatorNode.java",
"license": "epl-1.0",
"size": 7854
} | [
"org.hibernate.type.Type"
] | import org.hibernate.type.Type; | import org.hibernate.type.*; | [
"org.hibernate.type"
] | org.hibernate.type; | 2,274,284 |
void renameSnapshot(String path, String snapshotOldName,
String snapshotNewName) throws SafeModeException, IOException {
checkOperation(OperationCategory.WRITE);
final FSPermissionChecker pc = getPermissionChecker();
CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache);
if (cacheEntr... | void renameSnapshot(String path, String snapshotOldName, String snapshotNewName) throws SafeModeException, IOException { checkOperation(OperationCategory.WRITE); final FSPermissionChecker pc = getPermissionChecker(); CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache); if (cacheEntry != null && cacheEntry.... | /**
* Rename a snapshot
* @param path The directory path where the snapshot was taken
* @param snapshotOldName Old snapshot name
* @param snapshotNewName New snapshot name
* @throws SafeModeException
* @throws IOException
*/ | Rename a snapshot | renameSnapshot | {
"repo_name": "yncxcw/Yarn-SBlock",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java",
"license": "apache-2.0",
"size": 338725
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.server.namenode.NameNode",
"org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot",
"org.apache.hadoop.ipc.RetryCache"
] | import java.io.IOException; import org.apache.hadoop.hdfs.server.namenode.NameNode; import org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot; import org.apache.hadoop.ipc.RetryCache; | import java.io.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.hdfs.server.namenode.snapshot.*; import org.apache.hadoop.ipc.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,318,707 |
private boolean listenerReplace0(Object topic, GridMessageListener exp, GridMessageListener newVal) {
if (topic instanceof GridTopic) {
synchronized (sysLsnrsMux) {
return systemListenerChange(topic, exp, newVal);
}
}
else
return lsnrMap.re... | boolean function(Object topic, GridMessageListener exp, GridMessageListener newVal) { if (topic instanceof GridTopic) { synchronized (sysLsnrsMux) { return systemListenerChange(topic, exp, newVal); } } else return lsnrMap.replace(topic, exp, newVal); } | /**
* Replace listener.
*
* @param topic Topic.
* @param exp Old value.
* @param newVal New value.
* @return Result.
*/ | Replace listener | listenerReplace0 | {
"repo_name": "amirakhmedov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java",
"license": "apache-2.0",
"size": 103166
} | [
"org.apache.ignite.internal.GridTopic"
] | import org.apache.ignite.internal.GridTopic; | import org.apache.ignite.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,697,167 |
private void onRequestPermissions() {
if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION)) {
showExplanationDialog();
} else {
ActivityCompat.requestPermissions(
this,
new String[]{Man... | void function() { if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION)) { showExplanationDialog(); } else { ActivityCompat.requestPermissions( this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, Constants.PERMISSION_REQUEST_CODE_ACCESS_FINE_LOCATION ); } } | /**
* Requests the location permissions from the user. Displays a dialog in which the user
* can decide whether or not to grant them. If already declined, it will display another
* dialog stating that the app cannot be used without the location permissions.
*/ | Requests the location permissions from the user. Displays a dialog in which the user can decide whether or not to grant them. If already declined, it will display another dialog stating that the app cannot be used without the location permissions | onRequestPermissions | {
"repo_name": "pkrastev25/weather-app",
"path": "app/src/main/java/com/petar/weather/ui/activities/MainActivity.java",
"license": "apache-2.0",
"size": 6725
} | [
"android.support.v4.app.ActivityCompat",
"com.petar.weather.app.Constants"
] | import android.support.v4.app.ActivityCompat; import com.petar.weather.app.Constants; | import android.support.v4.app.*; import com.petar.weather.app.*; | [
"android.support",
"com.petar.weather"
] | android.support; com.petar.weather; | 127,153 |
public void setEnabled(final Enabled b) {
this.enabled = b;
} | void function(final Enabled b) { this.enabled = b; } | /**
* A rule is enabled by default. This can explicitly disable it in which case it will never activate.
*/ | A rule is enabled by default. This can explicitly disable it in which case it will never activate | setEnabled | {
"repo_name": "etirelli/drools",
"path": "drools-core/src/main/java/org/drools/core/definitions/rule/impl/RuleImpl.java",
"license": "apache-2.0",
"size": 30173
} | [
"org.drools.core.spi.Enabled"
] | import org.drools.core.spi.Enabled; | import org.drools.core.spi.*; | [
"org.drools.core"
] | org.drools.core; | 702,483 |
private void parseTelType(String group, String value, String paramTypes, VCardImpl vcard) throws VCardBuildException {
try {
TelephoneFeature telephoneFeature = new TelephoneType();
if(paramTypes != null) {
if(paramTypes.indexOf(';') != -1) {
//Parameter List Style
//Example: TYPE=cell;TY... | void function(String group, String value, String paramTypes, VCardImpl vcard) throws VCardBuildException { try { TelephoneFeature telephoneFeature = new TelephoneType(); if(paramTypes != null) { if(paramTypes.indexOf(';') != -1) { String[] list = paramTypes.split(";"); for(int i = 0; i < list.length; i++) { String para... | /**
* <p>Parses the TEL type.</p>
*
* @param group
* @param value
* @param paramTypes
* @param vcard
* @throws VCardBuildException
*/ | Parses the TEL type | parseTelType | {
"repo_name": "FullMetal210/milton2",
"path": "external/cardme/src/main/java/info/ineighborhood/cardme/engine/VCardEngine.java",
"license": "agpl-3.0",
"size": 85305
} | [
"info.ineighborhood.cardme.util.VCardUtils",
"info.ineighborhood.cardme.vcard.VCardImpl",
"info.ineighborhood.cardme.vcard.VCardType",
"info.ineighborhood.cardme.vcard.errors.VCardBuildException",
"info.ineighborhood.cardme.vcard.features.TelephoneFeature",
"info.ineighborhood.cardme.vcard.types.Telephone... | import info.ineighborhood.cardme.util.VCardUtils; import info.ineighborhood.cardme.vcard.VCardImpl; import info.ineighborhood.cardme.vcard.VCardType; import info.ineighborhood.cardme.vcard.errors.VCardBuildException; import info.ineighborhood.cardme.vcard.features.TelephoneFeature; import info.ineighborhood.cardme.vcar... | import info.ineighborhood.cardme.util.*; import info.ineighborhood.cardme.vcard.*; import info.ineighborhood.cardme.vcard.errors.*; import info.ineighborhood.cardme.vcard.features.*; import info.ineighborhood.cardme.vcard.types.*; import info.ineighborhood.cardme.vcard.types.parameters.*; | [
"info.ineighborhood.cardme"
] | info.ineighborhood.cardme; | 654,359 |
protected void formatAsTruthValue(Node n) {
if (GNode.cast(n).hasName("AssignmentExpression")) {
printer.p('(').p(n).p(')');
} else {
printer.p(n);
}
} | void function(Node n) { if (GNode.cast(n).hasName(STR)) { printer.p('(').p(n).p(')'); } else { printer.p(n); } } | /**
* Print an expression as a truth value. This method parenthesizes
* assignment expressions.
*
* @param n The node to print.
*/ | Print an expression as a truth value. This method parenthesizes assignment expressions | formatAsTruthValue | {
"repo_name": "wandoulabs/xtc-rats",
"path": "xtc-core/src/main/java/xtc/lang/JavaPrinter.java",
"license": "lgpl-2.1",
"size": 42618
} | [
"xtc.tree.GNode",
"xtc.tree.Node"
] | import xtc.tree.GNode; import xtc.tree.Node; | import xtc.tree.*; | [
"xtc.tree"
] | xtc.tree; | 2,694,782 |
public static File getBpRoot(String bpID, File dnCurDir) {
return new File(dnCurDir, bpID);
} | static File function(String bpID, File dnCurDir) { return new File(dnCurDir, bpID); } | /**
* Get a block pool storage root based on data node storage root
* @param bpID block pool ID
* @param dnCurDir data node storage root directory
* @return root directory for block pool storage
*/ | Get a block pool storage root based on data node storage root | getBpRoot | {
"repo_name": "mix/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolSliceStorage.java",
"license": "apache-2.0",
"size": 31745
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 105,979 |
public Integer getPartValue() {
AbstractField tmp = getPart();
if (tmp != null) {
if (tmp instanceof IntegerType) {
return ((IntegerType) tmp).getValue();
}
return null;
} else {
for (Attribute attribute : getAllAttributes()) {
if (attribute.getQualifiedName().equals(IDPREFIXSEP + PART)) {
... | Integer function() { AbstractField tmp = getPart(); if (tmp != null) { if (tmp instanceof IntegerType) { return ((IntegerType) tmp).getValue(); } return null; } else { for (Attribute attribute : getAllAttributes()) { if (attribute.getQualifiedName().equals(IDPREFIXSEP + PART)) { return new Integer(attribute.getValue())... | /**
* Give the PDFAVersionId (as an integer)
*
* @return Part value (Integer)
*/ | Give the PDFAVersionId (as an integer) | getPartValue | {
"repo_name": "gbm-bailleul/padaf",
"path": "xmpbox/src/main/java/net/padaf/xmpbox/schema/PDFAIdentificationSchema.java",
"license": "apache-2.0",
"size": 7487
} | [
"net.padaf.xmpbox.type.AbstractField",
"net.padaf.xmpbox.type.Attribute",
"net.padaf.xmpbox.type.IntegerType"
] | import net.padaf.xmpbox.type.AbstractField; import net.padaf.xmpbox.type.Attribute; import net.padaf.xmpbox.type.IntegerType; | import net.padaf.xmpbox.type.*; | [
"net.padaf.xmpbox"
] | net.padaf.xmpbox; | 97,130 |
public BigSparseRealMatrix add(BigSparseRealMatrix m)
throws MatrixDimensionMismatchException {
MatrixUtils.checkAdditionCompatible(this, m);
final BigSparseRealMatrix out = new BigSparseRealMatrix(this);
for (OpenLongToDoubleHashMap.Iterator iterator = m.entries.iterator(); iter... | BigSparseRealMatrix function(BigSparseRealMatrix m) throws MatrixDimensionMismatchException { MatrixUtils.checkAdditionCompatible(this, m); final BigSparseRealMatrix out = new BigSparseRealMatrix(this); for (OpenLongToDoubleHashMap.Iterator iterator = m.entries.iterator(); iterator.hasNext();) { iterator.advance(); fin... | /**
* Compute the sum of this matrix and {@code m}.
*
* @param m Matrix to be added.
* @return {@code this} + {@code m}.
* @throws MatrixDimensionMismatchException if {@code m} is not the same
* size as {@code this}.
*/ | Compute the sum of this matrix and m | add | {
"repo_name": "rbouadjenek/PMF",
"path": "MatrixFactorization/src/main/java/lirmm/inria/fr/math/BigSparseRealMatrix.java",
"license": "apache-2.0",
"size": 21324
} | [
"org.apache.commons.math3.linear.MatrixDimensionMismatchException",
"org.apache.commons.math3.linear.MatrixUtils"
] | import org.apache.commons.math3.linear.MatrixDimensionMismatchException; import org.apache.commons.math3.linear.MatrixUtils; | import org.apache.commons.math3.linear.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,760,538 |
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {
if (action.equals("start")) {
if (this.moniterCallbackContext != null) {
callbackContext.error( "Battery listener already running.");
return true;
}
th... | boolean function(String action, JSONArray args, CallbackContext callbackContext) { if (action.equals("start")) { if (this.moniterCallbackContext != null) { callbackContext.error( STR); return true; } this.moniterCallbackContext = callbackContext; | /**
* Executes the request.
*
* @param action The action to execute.
* @param args JSONArry of arguments for the plugin.
* @param callbackContext The callback context used when calling back into JavaScript.
* @return True if the action was valid, false if n... | Executes the request | execute | {
"repo_name": "tangpei1989/cordova-plg-monitor-event",
"path": "src/android/MonitorEventListener.java",
"license": "apache-2.0",
"size": 5913
} | [
"org.apache.cordova.CallbackContext",
"org.json.JSONArray"
] | import org.apache.cordova.CallbackContext; import org.json.JSONArray; | import org.apache.cordova.*; import org.json.*; | [
"org.apache.cordova",
"org.json"
] | org.apache.cordova; org.json; | 825,200 |
public Observable<ServiceResponse<PortalSigninSettingsInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String ifMatch, Boolean enabled) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and c... | Observable<ServiceResponse<PortalSigninSettingsInner>> function(String resourceGroupName, String serviceName, String ifMatch, Boolean enabled) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (serviceName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionI... | /**
* Create or Update Sign-In settings.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param ifMatch ETag of the Entity. Not required when creating an entity, but required when updating an entity.
* @param enabl... | Create or Update Sign-In settings | createOrUpdateWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/apimanagement/mgmt-v2019_12_01/src/main/java/com/microsoft/azure/management/apimanagement/v2019_12_01/implementation/SignInSettingsInner.java",
"license": "mit",
"size": 36152
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,930,737 |
public static void fillCalcSheetWithContent(XSpreadsheet xSheet,
int startCellX, int startCellY, int rangeLengthX, int rangeLengthY)
throws java.lang.Exception {
try{
// create a range with content
Object[][] newData = new Object[rangeLength... | static void function(XSpreadsheet xSheet, int startCellX, int startCellY, int rangeLengthX, int rangeLengthY) throws java.lang.Exception { try{ Object[][] newData = new Object[rangeLengthY][rangeLengthX]; for (int i=0; i<rangeLengthY; i++) { for (int j=0; j<rangeLengthX; j++) { newData[i][j] = new Double(10*i +j); } } ... | /**
* fills a range of a calc sheet with computed data of type
* <CODE>Double</CODE>.
* @param xSheet the sheet to fill with content
* @param startCellX the cell number of the X start point (row) of the range to fill
* @param startCellY the cell number of the Y start point (column) of the range... | fills a range of a calc sheet with computed data of type <code>Double</code> | fillCalcSheetWithContent | {
"repo_name": "qt-haiku/LibreOffice",
"path": "qadevOOo/runner/util/CalcTools.java",
"license": "gpl-3.0",
"size": 6411
} | [
"com.sun.star.lang.IndexOutOfBoundsException",
"com.sun.star.sheet.XCellRangeData",
"com.sun.star.sheet.XSpreadsheet",
"com.sun.star.table.XCellRange",
"com.sun.star.uno.Exception",
"com.sun.star.uno.UnoRuntime"
] | import com.sun.star.lang.IndexOutOfBoundsException; import com.sun.star.sheet.XCellRangeData; import com.sun.star.sheet.XSpreadsheet; import com.sun.star.table.XCellRange; import com.sun.star.uno.Exception; import com.sun.star.uno.UnoRuntime; | import com.sun.star.lang.*; import com.sun.star.sheet.*; import com.sun.star.table.*; import com.sun.star.uno.*; | [
"com.sun.star"
] | com.sun.star; | 2,173,770 |
//-----------------------------------------------------------------------
@Override
public SecurityInfo getInfo() {
return info;
} | SecurityInfo function() { return info; } | /**
* Gets the standard security information.
* <p>
* This includes the security identifier.
* @return the value of the property, not null
*/ | Gets the standard security information. This includes the security identifier | getInfo | {
"repo_name": "ChinaQuants/Strata",
"path": "modules/product/src/main/java/com/opengamma/strata/product/index/IborFutureOptionSecurity.java",
"license": "apache-2.0",
"size": 34787
} | [
"com.opengamma.strata.product.SecurityInfo"
] | import com.opengamma.strata.product.SecurityInfo; | import com.opengamma.strata.product.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 2,146,543 |
protected HeatPumpBindingConfig parseBindingConfig(Item item, HeatpumpCommandType bindingConfig) throws BindingConfigParseException {
if (HeatpumpCommandType.validateBinding(bindingConfig, item.getClass())) {
return new HeatPumpBindingConfig(bindingConfig);
} else {
throw new BindingConfigParseException("'... | HeatPumpBindingConfig function(Item item, HeatpumpCommandType bindingConfig) throws BindingConfigParseException { if (HeatpumpCommandType.validateBinding(bindingConfig, item.getClass())) { return new HeatPumpBindingConfig(bindingConfig); } else { throw new BindingConfigParseException("'" + bindingConfig + STR); } } | /**
* Checks if the bindingConfig contains a valid binding type and returns an appropriate instance.
*
* @param item
* @param bindingConfig
*
* @throws BindingConfigParseException if bindingConfig is no valid binding type
*/ | Checks if the bindingConfig contains a valid binding type and returns an appropriate instance | parseBindingConfig | {
"repo_name": "Cougar/mirror-openhab",
"path": "bundles/binding/org.openhab.binding.novelanheatpump/src/main/java/org/openhab/binding/novelanheatpump/internal/HeatPumpGenericBindingProvider.java",
"license": "gpl-3.0",
"size": 6027
} | [
"org.openhab.binding.novelanheatpump.HeatpumpCommandType",
"org.openhab.core.items.Item",
"org.openhab.model.item.binding.BindingConfigParseException"
] | import org.openhab.binding.novelanheatpump.HeatpumpCommandType; import org.openhab.core.items.Item; import org.openhab.model.item.binding.BindingConfigParseException; | import org.openhab.binding.novelanheatpump.*; import org.openhab.core.items.*; import org.openhab.model.item.binding.*; | [
"org.openhab.binding",
"org.openhab.core",
"org.openhab.model"
] | org.openhab.binding; org.openhab.core; org.openhab.model; | 1,751,802 |
public boolean is(String jsonPathExpression) {
final String conditionalText = String.format("%1$s is TRUE.", jsonPathExpression);
// turn simplified into valid JSONPath expression
if (!jsonPathExpression.startsWith("?(@.")) {
jsonPathExpression = "?(@." + jsonPathExpression + ")"... | boolean function(String jsonPathExpression) { final String conditionalText = String.format(STR, jsonPathExpression); if (!jsonPathExpression.startsWith("?(@.")) { jsonPathExpression = "?(@." + jsonPathExpression + ")"; } final String jsonPath = STR + jsonPathExpression + "]"; final Object o = JsonPath.using(config).par... | /**
* Validates a custom json-path expression
* @param jsonPathExpression a json-path expression
* @return True, if expression returns an element
*/ | Validates a custom json-path expression | is | {
"repo_name": "KayLerch/alexa-skills-kit-tester-java",
"path": "src/main/java/io/klerch/alexa/test/response/AlexaResponse.java",
"license": "apache-2.0",
"size": 10580
} | [
"com.jayway.jsonpath.JsonPath",
"net.minidev.json.JSONArray"
] | import com.jayway.jsonpath.JsonPath; import net.minidev.json.JSONArray; | import com.jayway.jsonpath.*; import net.minidev.json.*; | [
"com.jayway.jsonpath",
"net.minidev.json"
] | com.jayway.jsonpath; net.minidev.json; | 810,644 |
@Override
byte[] getResponseData(HttpEntity entity) throws IOException {
byte[] responseBody = null;
if (entity != null) {
InputStream instream = entity.getContent();
if (instream != null) {
long contentLength = entity.getContentLength();
... | byte[] getResponseData(HttpEntity entity) throws IOException { byte[] responseBody = null; if (entity != null) { InputStream instream = entity.getContent(); if (instream != null) { long contentLength = entity.getContentLength(); if (contentLength > Integer.MAX_VALUE) { throw new IllegalArgumentException(STR); } if (con... | /**
* Returns byte array of response HttpEntity contents
*
* @param entity can be null
* @return response entity body or null
* @throws java.io.IOException if reading entity or creating byte array failed
*/ | Returns byte array of response HttpEntity contents | getResponseData | {
"repo_name": "zhenyue007/Decrypt-The-Stranger",
"path": "src/com/loopj/android/http/DataAsyncHttpResponseHandler.java",
"license": "gpl-2.0",
"size": 5697
} | [
"java.io.IOException",
"java.io.InputStream",
"org.apache.http.HttpEntity",
"org.apache.http.util.ByteArrayBuffer"
] | import java.io.IOException; import java.io.InputStream; import org.apache.http.HttpEntity; import org.apache.http.util.ByteArrayBuffer; | import java.io.*; import org.apache.http.*; import org.apache.http.util.*; | [
"java.io",
"org.apache.http"
] | java.io; org.apache.http; | 358,489 |
public static IssuerSerial getIssuerSerial(final CertificateToken certToken) {
final X500Name issuerX500Name = getX509CertificateHolder(certToken).getIssuer();
final GeneralName generalName = new GeneralName(issuerX500Name);
final GeneralNames generalNames = new GeneralNames(generalName);
final BigInteger se... | static IssuerSerial function(final CertificateToken certToken) { final X500Name issuerX500Name = getX509CertificateHolder(certToken).getIssuer(); final GeneralName generalName = new GeneralName(issuerX500Name); final GeneralNames generalNames = new GeneralNames(generalName); final BigInteger serialNumber = certToken.ge... | /**
* This method returns a new IssuerSerial based on the certificate token
*
* @param certToken
* the certificate token
* @return a IssuerSerial
*/ | This method returns a new IssuerSerial based on the certificate token | getIssuerSerial | {
"repo_name": "zsoltii/dss",
"path": "dss-spi/src/main/java/eu/europa/esig/dss/DSSASN1Utils.java",
"license": "lgpl-2.1",
"size": 33516
} | [
"eu.europa.esig.dss.x509.CertificateToken",
"java.math.BigInteger",
"org.bouncycastle.asn1.x500.X500Name",
"org.bouncycastle.asn1.x509.GeneralName",
"org.bouncycastle.asn1.x509.GeneralNames",
"org.bouncycastle.asn1.x509.IssuerSerial"
] | import eu.europa.esig.dss.x509.CertificateToken; import java.math.BigInteger; import org.bouncycastle.asn1.x500.X500Name; import org.bouncycastle.asn1.x509.GeneralName; import org.bouncycastle.asn1.x509.GeneralNames; import org.bouncycastle.asn1.x509.IssuerSerial; | import eu.europa.esig.dss.x509.*; import java.math.*; import org.bouncycastle.asn1.x500.*; import org.bouncycastle.asn1.x509.*; | [
"eu.europa.esig",
"java.math",
"org.bouncycastle.asn1"
] | eu.europa.esig; java.math; org.bouncycastle.asn1; | 1,018,492 |
protected void requireFixedThreadPoolExecutor(int threadCount, String poolName) {
service = Optional.of(SafeExecutors.newFixedThreadPool(threadCount, poolName));
} | void function(int threadCount, String poolName) { service = Optional.of(SafeExecutors.newFixedThreadPool(threadCount, poolName)); } | /**
* <p>Provide a fixed thread pool executor</p>
*
* @param threadCount The number of threads
* @param poolName The thread pool name (use lowercase hyphenated)
*/ | Provide a fixed thread pool executor | requireFixedThreadPoolExecutor | {
"repo_name": "bitcoin-solutions/multibit-hd",
"path": "mbhd-core/src/main/java/org/multibit/hd/core/services/AbstractService.java",
"license": "mit",
"size": 4883
} | [
"com.google.common.base.Optional",
"org.multibit.commons.concurrent.SafeExecutors"
] | import com.google.common.base.Optional; import org.multibit.commons.concurrent.SafeExecutors; | import com.google.common.base.*; import org.multibit.commons.concurrent.*; | [
"com.google.common",
"org.multibit.commons"
] | com.google.common; org.multibit.commons; | 1,804,843 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> cancelJobAsync(
String resourceGroupName, String accountName, String transformName, String jobName) {
return cancelJobWithResponseAsync(resourceGroupName, accountName, transformName, jobName)
.flatMap((Response<Void> res)... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function( String resourceGroupName, String accountName, String transformName, String jobName) { return cancelJobWithResponseAsync(resourceGroupName, accountName, transformName, jobName) .flatMap((Response<Void> res) -> Mono.empty()); } | /**
* Cancel a Job.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
* @param transformName The Transform name.
* @param jobName The Job name.
* @throws IllegalArgumentException thrown if p... | Cancel a Job | cancelJobAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java",
"license": "mit",
"size": 66903
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; | [
"com.azure.core"
] | com.azure.core; | 299,471 |
public void finishAllInstancesButThis()
{
App.postEvent(new ForceFinishActivityEvent(getClass()).keepInstanceOf(this));
} | void function() { App.postEvent(new ForceFinishActivityEvent(getClass()).keepInstanceOf(this)); } | /**
* Force finish all (even not visible ones) activities of this activity class, excluding this (self) instance.
*/ | Force finish all (even not visible ones) activities of this activity class, excluding this (self) instance | finishAllInstancesButThis | {
"repo_name": "LivotovLabs/AndroidApplicationSkeleton",
"path": "template-java/mobile/src/main/java/eu/livotov/labs/androidappskeleton/core/base/BaseActivity.java",
"license": "apache-2.0",
"size": 16941
} | [
"eu.livotov.labs.androidappskeleton.core.App",
"eu.livotov.labs.androidappskeleton.event.system.ForceFinishActivityEvent"
] | import eu.livotov.labs.androidappskeleton.core.App; import eu.livotov.labs.androidappskeleton.event.system.ForceFinishActivityEvent; | import eu.livotov.labs.androidappskeleton.core.*; import eu.livotov.labs.androidappskeleton.event.system.*; | [
"eu.livotov.labs"
] | eu.livotov.labs; | 537,649 |
private String getAuditMessage(boolean success, String loggedInUser, int loggedInTenant, String userName,
int tenantId, String tenantDomain) {
Date currentTime = Calendar.getInstance().getTime();
SimpleDateFormat date = new SimpleDateFormat("'['yyyy-MM-dd HH:mm:ss... | String function(boolean success, String loggedInUser, int loggedInTenant, String userName, int tenantId, String tenantDomain) { Date currentTime = Calendar.getInstance().getTime(); SimpleDateFormat date = new SimpleDateFormat(STR); if (success) { return "\'" + loggedInUser + STR + loggedInTenant + STR + userName + "@" ... | /**
* Get audit message for on success or fail of switching
*
* @param success
* @param loggedInUser
* @param loggedInTenant
* @param userName
* @param tenantId
* @param tenantDomain
* @return
*/ | Get audit message for on success or fail of switching | getAuditMessage | {
"repo_name": "rswijesena/carbon-identity",
"path": "components/user-mgt/org.wso2.carbon.identity.user.account.connector/src/main/java/org/wso2/carbon/identity/user/account/connector/UserAccountConnectorImpl.java",
"license": "apache-2.0",
"size": 25772
} | [
"java.text.SimpleDateFormat",
"java.util.Calendar",
"java.util.Date"
] | import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 1,012,615 |
final Runnable task = () -> {
try (final FileOutputStream out = new FileOutputStream(outputFilename, true);
final FileChannel fileChannel = out.getChannel()) {
fileChannel.write(ByteBuffer.wrap(content.getBytes()));
} catch (final IOException e) {
LOG.error(e);
}
};
pool.execute(tas... | final Runnable task = () -> { try (final FileOutputStream out = new FileOutputStream(outputFilename, true); final FileChannel fileChannel = out.getChannel()) { fileChannel.write(ByteBuffer.wrap(content.getBytes())); } catch (final IOException e) { LOG.error(e); } }; pool.execute(task); } | /**
* Asynchronous writing operation.
*
* @param content
* gets queued for writing to the output file.
*/ | Asynchronous writing operation | write | {
"repo_name": "CjHare/systematic-trading",
"path": "systematic-trading-backtest-output-file/src/main/java/com/systematic/trading/backtest/output/file/util/FileMultithreading.java",
"license": "mit",
"size": 2906
} | [
"java.io.FileOutputStream",
"java.io.IOException",
"java.nio.ByteBuffer",
"java.nio.channels.FileChannel"
] | import java.io.FileOutputStream; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; | import java.io.*; import java.nio.*; import java.nio.channels.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 2,726,435 |
@RestrictTo(RestrictTo.Scope.LIBRARY)
@NonNull
public Builder setExtras(@Nullable Bundle extras) {
mExtras = (extras == null) ? null : new Bundle(extras);
return this;
} | @RestrictTo(RestrictTo.Scope.LIBRARY) Builder function(@Nullable Bundle extras) { mExtras = (extras == null) ? null : new Bundle(extras); return this; } | /**
* Set extras. Default value is {@link Bundle#EMPTY} if not set.
*
* @hide
*/ | Set extras. Default value is <code>Bundle#EMPTY</code> if not set | setExtras | {
"repo_name": "AndroidX/androidx",
"path": "mediarouter/mediarouter/src/main/java/androidx/mediarouter/media/MediaRouterParams.java",
"license": "apache-2.0",
"size": 10230
} | [
"android.os.Bundle",
"androidx.annotation.Nullable",
"androidx.annotation.RestrictTo"
] | import android.os.Bundle; import androidx.annotation.Nullable; import androidx.annotation.RestrictTo; | import android.os.*; import androidx.annotation.*; | [
"android.os",
"androidx.annotation"
] | android.os; androidx.annotation; | 196,615 |
public ICssCompressor getCssCompressor()
{
return cssCompressor;
} | ICssCompressor function() { return cssCompressor; } | /**
* Get the CSS compressor to remove comments and whitespace characters from css resources
*
* @return whether the comments and whitespace characters will be stripped from resources served
* through {@link org.apache.wicket.request.resource.CssPackageResource
* CssPackageResource}. Null is a... | Get the CSS compressor to remove comments and whitespace characters from css resources | getCssCompressor | {
"repo_name": "mosoft521/wicket",
"path": "wicket-core/src/main/java/org/apache/wicket/settings/ResourceSettings.java",
"license": "apache-2.0",
"size": 26293
} | [
"org.apache.wicket.css.ICssCompressor"
] | import org.apache.wicket.css.ICssCompressor; | import org.apache.wicket.css.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 47,674 |
private void setHoveredFriend(String displayName)
{
hoveredFriend = null;
if (!Strings.isNullOrEmpty(displayName))
{
final String note = getFriendNote(displayName);
if (note != null)
{
hoveredFriend = new HoveredFriend(displayName, note);
}
}
} | void function(String displayName) { hoveredFriend = null; if (!Strings.isNullOrEmpty(displayName)) { final String note = getFriendNote(displayName); if (note != null) { hoveredFriend = new HoveredFriend(displayName, note); } } } | /**
* Set the currently hovered display name, if a friend note exists for it.
*/ | Set the currently hovered display name, if a friend note exists for it | setHoveredFriend | {
"repo_name": "abelbriggs1/runelite",
"path": "runelite-client/src/main/java/net/runelite/client/plugins/friendnotes/FriendNotesPlugin.java",
"license": "bsd-2-clause",
"size": 7980
} | [
"com.google.common.base.Strings"
] | import com.google.common.base.Strings; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,578,295 |
@SuppressWarnings("unchecked")
public static <T> T create(final Class<T> type, final T target, final ClassLoader classLoader) {
checkNotNull(type);
checkNotNull(target);
checkNotNull(classLoader);
InvocationHandler handler = (proxy, method, args) -> {
try (TcclBlock tccl = TcclBlock.begin(cla... | @SuppressWarnings(STR) static <T> T function(final Class<T> type, final T target, final ClassLoader classLoader) { checkNotNull(type); checkNotNull(target); checkNotNull(classLoader); InvocationHandler handler = (proxy, method, args) -> { try (TcclBlock tccl = TcclBlock.begin(classLoader)) { return method.invoke(target... | /**
* Creates a dynamic-proxy for type, delegating to target and setting the TCCL to class-loader before invocation.
*/ | Creates a dynamic-proxy for type, delegating to target and setting the TCCL to class-loader before invocation | create | {
"repo_name": "sonatype/nexus-public",
"path": "components/nexus-common/src/main/java/org/sonatype/nexus/common/thread/TcclWrapper.java",
"license": "epl-1.0",
"size": 1777
} | [
"com.google.common.base.Preconditions",
"java.lang.reflect.InvocationHandler",
"java.lang.reflect.Proxy"
] | import com.google.common.base.Preconditions; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Proxy; | import com.google.common.base.*; import java.lang.reflect.*; | [
"com.google.common",
"java.lang"
] | com.google.common; java.lang; | 1,578,263 |
public static TableViewerColumn createTableViewerColumn(TableViewer tableViewer, String title, int width) {
return createTableViewerColumn(tableViewer, title, width, SWT.CENTER);
}
| static TableViewerColumn function(TableViewer tableViewer, String title, int width) { return createTableViewerColumn(tableViewer, title, width, SWT.CENTER); } | /**
* Convenience method for table viewer column
*
* @param tableViewer
* @param title
* @param width
* @return
*/ | Convenience method for table viewer column | createTableViewerColumn | {
"repo_name": "Agem-Bilisim/lider-console",
"path": "lider-console-core/src/tr/org/liderahenk/liderconsole/core/utils/SWTResourceManager.java",
"license": "lgpl-3.0",
"size": 32467
} | [
"org.eclipse.jface.viewers.TableViewer",
"org.eclipse.jface.viewers.TableViewerColumn"
] | import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TableViewerColumn; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 1,467,946 |
public static String createHash(char[] password)
throws NoSuchAlgorithmException, InvalidKeySpecException
{
// Generate a random salt
SecureRandom random = new SecureRandom();
byte[] salt = new byte[SALT_BYTE_SIZE];
random.nextBytes(salt);
// Hash the password
... | static String function(char[] password) throws NoSuchAlgorithmException, InvalidKeySpecException { SecureRandom random = new SecureRandom(); byte[] salt = new byte[SALT_BYTE_SIZE]; random.nextBytes(salt); byte[] hash = pbkdf2(password, salt, PBKDF2_ITERATIONS, HASH_BYTE_SIZE); return PBKDF2_ITERATIONS + ":" + toHex(sal... | /**
* Returns a salted PBKDF2 hash of the password.
*
* @param password the password to hash
* @return a salted PBKDF2 hash of the password
*/ | Returns a salted PBKDF2 hash of the password | createHash | {
"repo_name": "ajohnston9/ciscorouter",
"path": "CiscoRouterTool/src/ciscoroutertool/settings/PasswordHash.java",
"license": "mit",
"size": 7357
} | [
"java.security.NoSuchAlgorithmException",
"java.security.SecureRandom",
"java.security.spec.InvalidKeySpecException"
] | import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.security.spec.InvalidKeySpecException; | import java.security.*; import java.security.spec.*; | [
"java.security"
] | java.security; | 2,501,419 |
public void setResourceLocalService(
ResourceLocalService resourceLocalService) {
this.resourceLocalService = resourceLocalService;
} | void function( ResourceLocalService resourceLocalService) { this.resourceLocalService = resourceLocalService; } | /**
* Sets the resource local service.
*
* @param resourceLocalService the resource local service
*/ | Sets the resource local service | setResourceLocalService | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/benefit_rating_lkpLocalServiceBaseImpl.java",
"license": "gpl-2.0",
"size": 175742
} | [
"com.liferay.portal.service.ResourceLocalService"
] | import com.liferay.portal.service.ResourceLocalService; | import com.liferay.portal.service.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 1,159,842 |
EList<PointOfSale> getPointOfSales(); | EList<PointOfSale> getPointOfSales(); | /**
* Returns the value of the '<em><b>Point Of Sales</b></em>' reference list.
* The list contents are of type {@link CIM.IEC61968.PaymentMetering.PointOfSale}.
* It is bidirectional and its opposite is '{@link CIM.IEC61968.PaymentMetering.PointOfSale#getVendor <em>Vendor</em>}'.
* <!-- begin-user-doc -->
* ... | Returns the value of the 'Point Of Sales' reference list. The list contents are of type <code>CIM.IEC61968.PaymentMetering.PointOfSale</code>. It is bidirectional and its opposite is '<code>CIM.IEC61968.PaymentMetering.PointOfSale#getVendor Vendor</code>'. If the meaning of the 'Point Of Sales' reference list isn't cle... | getPointOfSales | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61968/PaymentMetering/Vendor.java",
"license": "mit",
"size": 8262
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,353,437 |
@Test
public void shouldAcceptSocks5BytestreamRequestAndReceiveData() throws Exception {
// start a local SOCKS5 proxy
Socks5TestProxy socks5Proxy = Socks5TestProxy.getProxy(7778);
// build SOCKS5 Bytestream initialization request
Bytestream bytestreamInitialization = Socks5Pac... | void function() throws Exception { Socks5TestProxy socks5Proxy = Socks5TestProxy.getProxy(7778); Bytestream bytestreamInitialization = Socks5PacketUtils.createBytestreamInitiation( initiatorJID, targetJID, sessionID); bytestreamInitialization.addStreamHost(proxyJID, proxyAddress, 7778); byte[] data = new byte[] { 1, 2,... | /**
* Accepting the SOCKS5 Bytestream request should be successfully.
*
* @throws Exception should not happen
*/ | Accepting the SOCKS5 Bytestream request should be successfully | shouldAcceptSocks5BytestreamRequestAndReceiveData | {
"repo_name": "opg7371/Smack",
"path": "smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamRequestTest.java",
"license": "apache-2.0",
"size": 17901
} | [
"java.io.InputStream",
"java.io.OutputStream",
"org.jivesoftware.smack.packet.Stanza",
"org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream",
"org.junit.Assert"
] | import java.io.InputStream; import java.io.OutputStream; import org.jivesoftware.smack.packet.Stanza; import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream; import org.junit.Assert; | import java.io.*; import org.jivesoftware.smack.packet.*; import org.jivesoftware.smackx.bytestreams.socks5.packet.*; import org.junit.*; | [
"java.io",
"org.jivesoftware.smack",
"org.jivesoftware.smackx",
"org.junit"
] | java.io; org.jivesoftware.smack; org.jivesoftware.smackx; org.junit; | 1,845,812 |
public void testOwnerAtReferencingSide()
{
PersistenceManager pm = pmf.getPersistenceManager();
Transaction tx = pm.currentTransaction();
try
{
// persist
tx.begin();
Person daffyDuck = new Person("Daffy", "Duck", "Daffy Duck", null, null);
... | void function() { PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); Person daffyDuck = new Person("Daffy", "Duck", STR, null, null); Department randd = new Department("R&D"); randd.getMembers().add(daffyDuck); pm.makePersistent(daffyDuck); pm.makePersistent... | /**
* Department-(1)------------------------(N)-Person
* <ul>
* <li>The Department class has a Collection<Person> members
* <li>In LDAP the relation is stored at the Department side (attribute members, multi-valued)
* </ul>
*/ | Department-(1)------------------------(N)-Person The Department class has a Collection members In LDAP the relation is stored at the Department side (attribute members, multi-valued) | testOwnerAtReferencingSide | {
"repo_name": "datanucleus/tests",
"path": "jdo/ldap/src/test/org/datanucleus/tests/directory/dn_unidir/OneManyTest.java",
"license": "apache-2.0",
"size": 30208
} | [
"javax.jdo.JDOObjectNotFoundException",
"javax.jdo.PersistenceManager",
"javax.jdo.Transaction"
] | import javax.jdo.JDOObjectNotFoundException; import javax.jdo.PersistenceManager; import javax.jdo.Transaction; | import javax.jdo.*; | [
"javax.jdo"
] | javax.jdo; | 809,993 |
private void initOrientProjectTable() {
orientDbService.createUniqueIndex(Project.class);
} | void function() { orientDbService.createUniqueIndex(Project.class); } | /**
* Init OrientDB project table here as we cannot inject ProjectService that depends on OpalRuntime...
*/ | Init OrientDB project table here as we cannot inject ProjectService that depends on OpalRuntime.. | initOrientProjectTable | {
"repo_name": "kazoompa/opal",
"path": "opal-upgrade/src/main/java/org/obiba/opal/core/upgrade/v2_0_x/database/MoveDatasourcesToOrientUpgradeStep.java",
"license": "gpl-3.0",
"size": 18581
} | [
"org.obiba.opal.core.domain.Project"
] | import org.obiba.opal.core.domain.Project; | import org.obiba.opal.core.domain.*; | [
"org.obiba.opal"
] | org.obiba.opal; | 1,403,294 |
public void drawTo(Point2D that) {
StdDraw.line(this.x, this.y, that.x, that.y);
} | void function(Point2D that) { StdDraw.line(this.x, this.y, that.x, that.y); } | /**
* Plot a line from this point to that point using standard draw.
*
* @param that the other point
*/ | Plot a line from this point to that point using standard draw | drawTo | {
"repo_name": "tigerforest/tiger-forest",
"path": "demo-http/src/main/java/com/xhh/demo/http/algorithms/chapter1/Point2D.java",
"license": "apache-2.0",
"size": 11359
} | [
"com.xhh.demo.http.algorithms.util.StdDraw"
] | import com.xhh.demo.http.algorithms.util.StdDraw; | import com.xhh.demo.http.algorithms.util.*; | [
"com.xhh.demo"
] | com.xhh.demo; | 676,770 |
boolean matches(long numberOfRows, Map<ColumnDescriptor, Statistics<?>> statistics, ParquetDataSourceId id, boolean failOnCorruptedParquetStatistics)
throws ParquetCorruptionException; | boolean matches(long numberOfRows, Map<ColumnDescriptor, Statistics<?>> statistics, ParquetDataSourceId id, boolean failOnCorruptedParquetStatistics) throws ParquetCorruptionException; | /**
* Should the Parquet Reader process a file section with the specified statistics.
*
* @param numberOfRows the number of rows in the segment; this can be used with
* Statistics to determine if a column is only null
* @param statistics column statistics
* @param id Parquet file name
... | Should the Parquet Reader process a file section with the specified statistics | matches | {
"repo_name": "nezihyigitbasi/presto",
"path": "presto-parquet/src/main/java/com/facebook/presto/parquet/predicate/Predicate.java",
"license": "apache-2.0",
"size": 2267
} | [
"com.facebook.presto.parquet.ParquetCorruptionException",
"com.facebook.presto.parquet.ParquetDataSourceId",
"java.util.Map",
"org.apache.parquet.column.ColumnDescriptor",
"org.apache.parquet.column.statistics.Statistics"
] | import com.facebook.presto.parquet.ParquetCorruptionException; import com.facebook.presto.parquet.ParquetDataSourceId; import java.util.Map; import org.apache.parquet.column.ColumnDescriptor; import org.apache.parquet.column.statistics.Statistics; | import com.facebook.presto.parquet.*; import java.util.*; import org.apache.parquet.column.*; import org.apache.parquet.column.statistics.*; | [
"com.facebook.presto",
"java.util",
"org.apache.parquet"
] | com.facebook.presto; java.util; org.apache.parquet; | 243,938 |
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.encrypt_files_fragment, container, false);
mSelectedFiles = (RecyclerView) view.findViewById(R.id.selected_files_list);
mSelectedFiles.addI... | View function(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.encrypt_files_fragment, container, false); mSelectedFiles = (RecyclerView) view.findViewById(R.id.selected_files_list); mSelectedFiles.addItemDecoration(new SpacesItemDecoration( FormattingUtil... | /**
* Inflate the layout for this fragment
*/ | Inflate the layout for this fragment | onCreateView | {
"repo_name": "bashrc/open-keychain",
"path": "OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java",
"license": "gpl-3.0",
"size": 33915
} | [
"android.os.Bundle",
"android.support.v7.widget.DefaultItemAnimator",
"android.support.v7.widget.LinearLayoutManager",
"android.support.v7.widget.RecyclerView",
"android.view.LayoutInflater",
"android.view.View",
"android.view.ViewGroup",
"org.sufficientlysecure.keychain.ui.adapter.SpacesItemDecoratio... | import android.os.Bundle; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import org.sufficientlysecure.keychain.ui.adap... | import android.os.*; import android.support.v7.widget.*; import android.view.*; import org.sufficientlysecure.keychain.ui.adapter.*; import org.sufficientlysecure.keychain.ui.util.*; | [
"android.os",
"android.support",
"android.view",
"org.sufficientlysecure.keychain"
] | android.os; android.support; android.view; org.sufficientlysecure.keychain; | 123,688 |
private static Collection getWildcardFiles(String path, String file)
{
ArrayList result = new ArrayList();
File fPath = new File(path);
try
{
if (!fPath.isDirectory())
{
log.warning("classpath directory " + fPath.getCanonicalPath() + " not found");
return result;
}
}
catch (Exception ex... | static Collection function(String path, String file) { ArrayList result = new ArrayList(); File fPath = new File(path); try { if (!fPath.isDirectory()) { log.warning(STR + fPath.getCanonicalPath() + STR); return result; } } catch (Exception ex) { log.warning(STR + path + STR + ex.getMessage()); return result; } FileFil... | /**
* Gets the wildcard files.
*
* @param path
* the path
* @param file
* the file
*
* @return the wildcard files
*/ | Gets the wildcard files | getWildcardFiles | {
"repo_name": "xien777/yajsw",
"path": "yajsw/wrapper/src/main/java/org/rzo/yajsw/os/ms/win/w32/FileUtils.java",
"license": "lgpl-2.1",
"size": 7482
} | [
"java.io.File",
"java.io.FileFilter",
"java.util.ArrayList",
"java.util.Collection",
"org.apache.commons.io.filefilter.WildcardFileFilter"
] | import java.io.File; import java.io.FileFilter; import java.util.ArrayList; import java.util.Collection; import org.apache.commons.io.filefilter.WildcardFileFilter; | import java.io.*; import java.util.*; import org.apache.commons.io.filefilter.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 796,141 |
public Reference getReference() {
debugCodeCall("getReference");
String factoryClassName = JdbcDataSourceFactory.class.getName();
Reference ref = new Reference(getClass().getName(), factoryClassName, null);
ref.add(new StringRefAddr("url", url));
ref.add(new StringRefAddr("us... | Reference function() { debugCodeCall(STR); String factoryClassName = JdbcDataSourceFactory.class.getName(); Reference ref = new Reference(getClass().getName(), factoryClassName, null); ref.add(new StringRefAddr("url", url)); ref.add(new StringRefAddr("user", userName)); ref.add(new StringRefAddr(STR, convertToString(pa... | /**
* Get a new reference for this object, using the current settings.
*
* @return the new reference
*/ | Get a new reference for this object, using the current settings | getReference | {
"repo_name": "titus08/frostwire-desktop",
"path": "lib/jars-src/h2-1.3.164/org/h2/jdbcx/JdbcDataSource.java",
"license": "gpl-3.0",
"size": 11322
} | [
"javax.naming.Reference",
"javax.naming.StringRefAddr"
] | import javax.naming.Reference; import javax.naming.StringRefAddr; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 2,395,504 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.