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
public void testCounting() throws Exception {
assertFalse("screenshots only", Screenshots.UPDATE_SCREENSHOTS);
// show some logs on console
ConsoleHandler consoleHandler = new ConsoleHandler();
consoleHandler.setLevel(Level.ALL);
Logger processExecutorLogger =
... | void function() throws Exception { assertFalse(STR, Screenshots.UPDATE_SCREENSHOTS); ConsoleHandler consoleHandler = new ConsoleHandler(); consoleHandler.setLevel(Level.ALL); Logger processExecutorLogger = Logger.getLogger(ProcessExecutor.class.getName()); processExecutorLogger.setLevel(Level.ALL); processExecutorLogge... | /**
* test counting of restore files
* @throws Exception if an exception occurs
*/ | test counting of restore files | testCounting | {
"repo_name": "amon-ra/jbackpack",
"path": "test/ch/fhnw/jbackpack/RdiffBackupRestoreTest.java",
"license": "gpl-3.0",
"size": 11031
} | [
"ch.fhnw.jbackpack.chooser.Increment",
"ch.fhnw.jbackpack.chooser.RdiffFileDatabase",
"ch.fhnw.util.FileTools",
"ch.fhnw.util.ProcessExecutor",
"java.io.File",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"java.util.logging.ConsoleHandler",
"java.util.logging.Level",
"java.uti... | import ch.fhnw.jbackpack.chooser.Increment; import ch.fhnw.jbackpack.chooser.RdiffFileDatabase; import ch.fhnw.util.FileTools; import ch.fhnw.util.ProcessExecutor; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.logging.ConsoleHandler; import java.uti... | import ch.fhnw.jbackpack.chooser.*; import ch.fhnw.util.*; import java.io.*; import java.util.*; import java.util.logging.*; | [
"ch.fhnw.jbackpack",
"ch.fhnw.util",
"java.io",
"java.util"
] | ch.fhnw.jbackpack; ch.fhnw.util; java.io; java.util; | 135,567 |
private Node tryFoldKnownNumericMethods(Node subtree) {
Preconditions.checkArgument(subtree.getType() == Token.CALL);
if (isASTNormalized()) {
// check if this is a call on a string method
// then dispatch to specific folding method.
Node callTarget = subtree.getFirstChild();
if (!No... | Node function(Node subtree) { Preconditions.checkArgument(subtree.getType() == Token.CALL); if (isASTNormalized()) { Node callTarget = subtree.getFirstChild(); if (!NodeUtil.isName(callTarget)) { return subtree; } String functionNameString = callTarget.getString(); Node firstArgument = callTarget.getNext(); if ((firstA... | /**
* Try to evaluate known Numeric methods
* .parseInt(), parseFloat()
*/ | Try to evaluate known Numeric methods .parseInt(), parseFloat() | tryFoldKnownNumericMethods | {
"repo_name": "nuxleus/closure-compiler",
"path": "src/com/google/javascript/jscomp/PeepholeReplaceKnownMethods.java",
"license": "apache-2.0",
"size": 17771
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.Token"
] | import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; | import com.google.common.base.*; import com.google.javascript.rhino.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 2,595,150 |
public static <T extends Enum<T> & IStringSerializable> PropertyEnum<T> create(String name, Class<T> clazz, Collection<T> values)
{
return new PropertyEnum(name, clazz, values);
} | static <T extends Enum<T> & IStringSerializable> PropertyEnum<T> function(String name, Class<T> clazz, Collection<T> values) { return new PropertyEnum(name, clazz, values); } | /**
* Create a new PropertyEnum with the specified values
*/ | Create a new PropertyEnum with the specified values | create | {
"repo_name": "SuperUnitato/UnLonely",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/properties/PropertyEnum.java",
"license": "lgpl-2.1",
"size": 3526
} | [
"java.util.Collection",
"net.minecraft.util.IStringSerializable"
] | import java.util.Collection; import net.minecraft.util.IStringSerializable; | import java.util.*; import net.minecraft.util.*; | [
"java.util",
"net.minecraft.util"
] | java.util; net.minecraft.util; | 1,676,650 |
public InputMap getInputMap() {
return inputMap;
} | InputMap function() { return inputMap; } | /**
* <p>Returns the input map. The input map should NOT be edited
* directly!</p>
*
* @return the input map
*/ | Returns the input map. The input map should NOT be edited directly | getInputMap | {
"repo_name": "boompieman/iim_project",
"path": "nxt_1.4.4/src/net/sourceforge/nite/tools/videolabeler/GlobalInputMap.java",
"license": "gpl-3.0",
"size": 7580
} | [
"javax.swing.InputMap"
] | import javax.swing.InputMap; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 539,486 |
assertEquals(expectedValue, StringUtil.substring(input1, input2, input3));
} | assertEquals(expectedValue, StringUtil.substring(input1, input2, input3)); } | /**
* Test substring.
*/ | Test substring | testSubstring | {
"repo_name": "venusdrogon/feilong-core",
"path": "src/test/java/com/feilong/core/lang/stringutiltest/SubstringStartIndexAndLengthParameterizedTest.java",
"license": "apache-2.0",
"size": 2308
} | [
"com.feilong.core.lang.StringUtil"
] | import com.feilong.core.lang.StringUtil; | import com.feilong.core.lang.*; | [
"com.feilong.core"
] | com.feilong.core; | 1,952,264 |
@Override
public void readFully(byte[] array, int offset, int n) throws IOException {
raf.readFully(array, offset, n);
}
// -- InputStream API methods -- | void function(byte[] array, int offset, int n) throws IOException { raf.readFully(array, offset, n); } | /**
* Read n bytes from the stream into the given array at the specified offset.
*/ | Read n bytes from the stream into the given array at the specified offset | readFully | {
"repo_name": "JoeHsiao/bioformats",
"path": "components/formats-common/src/loci/common/NIOInputStream.java",
"license": "gpl-2.0",
"size": 13301
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,873,611 |
public static <T> String[] filter(String args[], Class<T> argProxyInterface) {
ArrayList<String> parameters = new ArrayList<String>(args.length);
for (Method method : argProxyInterface.getMethods()) {
String parameterName = methodNameToParameter(method.getName());
int idx = CmdLineUtil.getParame... | static <T> String[] function(String args[], Class<T> argProxyInterface) { ArrayList<String> parameters = new ArrayList<String>(args.length); for (Method method : argProxyInterface.getMethods()) { String parameterName = methodNameToParameter(method.getName()); int idx = CmdLineUtil.getParameterIndex(parameterName, args)... | /**
* Filters arguments leaving only those pertaining to argProxyInterface.
*
* @param args arguments
* @param argProxyInterface interface with parameters description
* @param <T> T
* @return arguments pertaining to argProxyInterface
*/ | Filters arguments leaving only those pertaining to argProxyInterface | filter | {
"repo_name": "SowaLabs/OpenNLP",
"path": "opennlp-tools/src/main/java/opennlp/tools/cmdline/ArgumentParser.java",
"license": "apache-2.0",
"size": 16459
} | [
"java.lang.reflect.Method",
"java.util.ArrayList"
] | import java.lang.reflect.Method; import java.util.ArrayList; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 2,791,392 |
@NonNull
public Subscription subscribeOnValueChange(@NonNull Callback<T> callback);
| Subscription function(@NonNull Callback<T> callback); | /**
* Subscribe for value change events
*
* @param callback
* the callback to be invoked
* @return the subscription to revoke it
*/ | Subscribe for value change events | subscribeOnValueChange | {
"repo_name": "arichiardi/eclipse-addons",
"path": "bundles/com.andrearichiardi.eclipse.addons/src/main/java/com/andrearichiardi/eclipse/addons/di/ContextBoundValue.java",
"license": "epl-1.0",
"size": 2648
} | [
"com.andrearichiardi.eclipse.addons.Callback",
"com.andrearichiardi.eclipse.addons.Subscription",
"org.eclipse.jdt.annotation.NonNull"
] | import com.andrearichiardi.eclipse.addons.Callback; import com.andrearichiardi.eclipse.addons.Subscription; import org.eclipse.jdt.annotation.NonNull; | import com.andrearichiardi.eclipse.addons.*; import org.eclipse.jdt.annotation.*; | [
"com.andrearichiardi.eclipse",
"org.eclipse.jdt"
] | com.andrearichiardi.eclipse; org.eclipse.jdt; | 1,769,195 |
private void startDiscovery(JSONArray args, CallbackContext callbackCtx)
{
// TODO Someday add an option to fetch UUIDs at the same time
try
{
if(_bluetooth.isConnecting())
{
this.error(callbackCtx, "A Connection attempt is in progress.", BluetoothError.ERR_CONNECTING_IN_PROGRESS);
}
else
... | void function(JSONArray args, CallbackContext callbackCtx) { try { if(_bluetooth.isConnecting()) { this.error(callbackCtx, STR, BluetoothError.ERR_CONNECTING_IN_PROGRESS); } else { if(_bluetooth.isDiscovering()) { _wasDiscoveryCanceled = true; _bluetooth.stopDiscovery(); if(_discoveryCallback != null) { this.error(_dis... | /**
* Start a device discovery.
*
* @param args Arguments given.
* @param callbackCtx Where to send results.
*/ | Start a device discovery | startDiscovery | {
"repo_name": "nadavelyashiv/metal-finder-new",
"path": "platforms/android/src/org/apache/cordova/bluetooth/BluetoothPlugin.java",
"license": "mit",
"size": 26410
} | [
"org.apache.cordova.CallbackContext",
"org.apache.cordova.PluginResult",
"org.json.JSONArray"
] | import org.apache.cordova.CallbackContext; import org.apache.cordova.PluginResult; import org.json.JSONArray; | import org.apache.cordova.*; import org.json.*; | [
"org.apache.cordova",
"org.json"
] | org.apache.cordova; org.json; | 2,851,503 |
public static Jets3tProperties getInstance(InputStream inputStream, String propertiesIdentifer)
throws IOException
{
Jets3tProperties jets3tProperties = null;
// Keep static references to properties classes by propertiesIdentifer.
if (propertiesHashtable.containsKey(propertiesId... | static Jets3tProperties function(InputStream inputStream, String propertiesIdentifer) throws IOException { Jets3tProperties jets3tProperties = null; if (propertiesHashtable.containsKey(propertiesIdentifer)) { jets3tProperties = propertiesHashtable.get(propertiesIdentifer); } else { jets3tProperties = new Jets3tProperti... | /**
* Return a properties instance based on properties read from an input stream, and stores
* the properties object in a cache referenced by the propertiesIdentifier.
*
* @param inputStream
* an input stream containing property name/value pairs in a format that can be read by
* {@link Pro... | Return a properties instance based on properties read from an input stream, and stores the properties object in a cache referenced by the propertiesIdentifier | getInstance | {
"repo_name": "rjainqb/jets3t-rj",
"path": "src/org/jets3t/service/Jets3tProperties.java",
"license": "apache-2.0",
"size": 13979
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,548,630 |
public void append(ByteBuffer from) throws IOException
{
int len = from.remaining();
// will grow, up to limit
makeSpace(len);
// if we don't have limit: makeSpace can grow as it wants
if (limit < 0) {
// assert: makeSpace made enough space
from.get(buff, end, len);
end += len;
return;
}
... | void function(ByteBuffer from) throws IOException { int len = from.remaining(); makeSpace(len); if (limit < 0) { from.get(buff, end, len); end += len; return; } if (len == limit && end == start && out != null) { out.realWriteBytes(from); from.position(from.limit()); return; } if (len <= limit - end) { from.get(buff, en... | /**
* Add data to the buffer.
*
* @param from
* the ByteBuffer with the data
* @throws IOException
* Writing overflow data to the output channel failed
*/ | Add data to the buffer | append | {
"repo_name": "emacslisp/Java",
"path": "TomcatReading/src/org/apache/tomcat/util/buf/ByteChunk.java",
"license": "mit",
"size": 22665
} | [
"java.io.IOException",
"java.nio.ByteBuffer"
] | import java.io.IOException; import java.nio.ByteBuffer; | import java.io.*; import java.nio.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,807,875 |
private ItemState getNonVirtualItemState(ItemId id)
throws NoSuchItemStateException, ItemStateException {
// First check if the item state is already in the cache
ItemState state = cache.retrieve(id);
if (state != null) {
return state;
}
// Wait if an... | ItemState function(ItemId id) throws NoSuchItemStateException, ItemStateException { ItemState state = cache.retrieve(id); if (state != null) { return state; } synchronized (this) { while (currentlyLoading.contains(id)) { try { wait(); } catch (InterruptedException e) { throw new ItemStateException( STR + id, e); } } st... | /**
* Returns the item state for the given id without considering virtual
* item state providers.
*/ | Returns the item state for the given id without considering virtual item state providers | getNonVirtualItemState | {
"repo_name": "Overseas-Student-Living/jackrabbit",
"path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java",
"license": "apache-2.0",
"size": 75818
} | [
"org.apache.jackrabbit.core.id.ItemId"
] | import org.apache.jackrabbit.core.id.ItemId; | import org.apache.jackrabbit.core.id.*; | [
"org.apache.jackrabbit"
] | org.apache.jackrabbit; | 1,982,403 |
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getTitle());
} | KeyNamePair function() { return new KeyNamePair(get_ID(), getTitle()); } | /** Get Record ID/ColumnName
@return ID/ColumnName pair
*/ | Get Record ID/ColumnName | getKeyNamePair | {
"repo_name": "erpcya/adempierePOS",
"path": "base/src/org/compiere/model/X_AD_Attachment.java",
"license": "gpl-2.0",
"size": 5541
} | [
"org.compiere.util.KeyNamePair"
] | import org.compiere.util.KeyNamePair; | import org.compiere.util.*; | [
"org.compiere.util"
] | org.compiere.util; | 780,233 |
public StringElement addAbstract (String x) throws XmlContentException {
StringElement se = new StringElement (x, ELEM_ABSTRACT);
addToList(se, ELEM_ABSTRACT);
return se;
} | StringElement function (String x) throws XmlContentException { StringElement se = new StringElement (x, ELEM_ABSTRACT); addToList(se, ELEM_ABSTRACT); return se; } | /** Add a abstract object
* @throws XmlContentException
* @return the StringElement which is created
*/ | Add a abstract object | addAbstract | {
"repo_name": "opf-labs/ots-schema",
"path": "src/edu/harvard/hul/ois/ots/schemas/ModsMD/Mods.java",
"license": "gpl-3.0",
"size": 20723
} | [
"edu.harvard.hul.ois.ots.schemas.XmlContent"
] | import edu.harvard.hul.ois.ots.schemas.XmlContent; | import edu.harvard.hul.ois.ots.schemas.*; | [
"edu.harvard.hul"
] | edu.harvard.hul; | 876,641 |
@javax.annotation.Nullable
@ApiModelProperty(
value =
"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/s... | @javax.annotation.Nullable @ApiModelProperty( value = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https: String function() { return apiVersion; } | /**
* APIVersion defines the versioned schema of this representation of an object. Servers should
* convert recognized schemas to the latest internal value, and may reject unrecognized values.
* More info:
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*
... | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: HREF | getApiVersion | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1DeleteOptions.java",
"license": "apache-2.0",
"size": 11384
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,436,740 |
protected void enhance(GenClass genClass,
JavaClass baseClass,
String extClassName)
throws Exception
{
} | void function(GenClass genClass, JavaClass baseClass, String extClassName) throws Exception { } | /**
* Enhances the class.
*/ | Enhances the class | enhance | {
"repo_name": "christianchristensen/resin",
"path": "modules/kernel/src/com/caucho/loader/enhancer/Enhancer.java",
"license": "gpl-2.0",
"size": 2027
} | [
"com.caucho.bytecode.JavaClass",
"com.caucho.java.gen.GenClass"
] | import com.caucho.bytecode.JavaClass; import com.caucho.java.gen.GenClass; | import com.caucho.bytecode.*; import com.caucho.java.gen.*; | [
"com.caucho.bytecode",
"com.caucho.java"
] | com.caucho.bytecode; com.caucho.java; | 1,235,806 |
public void removeTeam(Team team){
ArrayList<Player> playersToRemoveFromTeam = null;
teams.remove(team.getName(), team);
playersToRemoveFromTeam = team.getPlayers();
for (Player player: playersToRemoveFromTeam){
team.removePlayer(player);
}
availableColors.add(team.getColor(... | void function(Team team){ ArrayList<Player> playersToRemoveFromTeam = null; teams.remove(team.getName(), team); playersToRemoveFromTeam = team.getPlayers(); for (Player player: playersToRemoveFromTeam){ team.removePlayer(player); } availableColors.add(team.getColor()); team.getScoreboardTeam().unregister(); plugin.Matc... | /**
* Remove a team
* @param teamName the name of the team to remove
*/ | Remove a team | removeTeam | {
"repo_name": "LetMeR00t/TaupeGunINSA",
"path": "src/taupegun/structures/Context.java",
"license": "mit",
"size": 20409
} | [
"java.util.ArrayList",
"org.bukkit.entity.Player"
] | import java.util.ArrayList; import org.bukkit.entity.Player; | import java.util.*; import org.bukkit.entity.*; | [
"java.util",
"org.bukkit.entity"
] | java.util; org.bukkit.entity; | 2,063,561 |
@Override
protected void doInitialize() throws JMSException {
synchronized (this.lifecycleMonitor) {
for (int i = 0; i < this.concurrentConsumers; i++) {
scheduleNewInvoker();
}
}
} | void function() throws JMSException { synchronized (this.lifecycleMonitor) { for (int i = 0; i < this.concurrentConsumers; i++) { scheduleNewInvoker(); } } } | /**
* Creates the specified number of concurrent consumers,
* in the form of a JMS Session plus associated MessageConsumer
* running in a separate thread.
* @see #scheduleNewInvoker
* @see #setTaskExecutor
*/ | Creates the specified number of concurrent consumers, in the form of a JMS Session plus associated MessageConsumer running in a separate thread | doInitialize | {
"repo_name": "kingtang/spring-learn",
"path": "spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java",
"license": "gpl-3.0",
"size": 44580
} | [
"javax.jms.JMSException"
] | import javax.jms.JMSException; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 2,696,848 |
//-----------------------------------------------------------------------
public TenorBean getMaturityTenor() {
return _maturityTenor;
} | TenorBean function() { return _maturityTenor; } | /**
* Gets the maturityTenor.
* @return the value of the property
*/ | Gets the maturityTenor | getMaturityTenor | {
"repo_name": "DevStreet/FinanceAnalytics",
"path": "projects/OG-MasterDB/src/main/java/com/opengamma/masterdb/security/hibernate/swap/SwapSecurityBean.java",
"license": "apache-2.0",
"size": 24017
} | [
"com.opengamma.masterdb.security.hibernate.TenorBean"
] | import com.opengamma.masterdb.security.hibernate.TenorBean; | import com.opengamma.masterdb.security.hibernate.*; | [
"com.opengamma.masterdb"
] | com.opengamma.masterdb; | 703,312 |
@Override
public Schema getSchema() {
return schema$;
} | Schema function() { return schema$; } | /**
* This method supports the Avro framework and is not intended to be called
* directly by the user.
*
* @return the schema object describing this class.
*
*/ | This method supports the Avro framework and is not intended to be called directly by the user | getSchema | {
"repo_name": "kineticadb/kinetica-api-java",
"path": "api/src/main/java/com/gpudb/protocol/ShowTableMonitorsRequest.java",
"license": "mit",
"size": 6552
} | [
"org.apache.avro.Schema"
] | import org.apache.avro.Schema; | import org.apache.avro.*; | [
"org.apache.avro"
] | org.apache.avro; | 1,179,931 |
@Override
public HostConnectionPool<CL> getPoolForOperation(BaseOperation<CL, ?> op, String hashtag) throws NoAvailableHostsException {
String key = op.getKey();
HostToken hToken = null;
if (hashtag == null || hashtag.isEmpty()) {
hToken = this.getTokenForKey(ke... | HostConnectionPool<CL> function(BaseOperation<CL, ?> op, String hashtag) throws NoAvailableHostsException { String key = op.getKey(); HostToken hToken = null; if (hashtag == null hashtag.isEmpty()) { hToken = this.getTokenForKey(key); } else { String hashValue = StringUtils.substringBetween(key,Character.toString(hasht... | /**
* If a hashtag is provided by Dynomite then we use that to create the key to hash.
*/ | If a hashtag is provided by Dynomite then we use that to create the key to hash | getPoolForOperation | {
"repo_name": "jcacciatore/dyno",
"path": "dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/lb/TokenAwareSelection.java",
"license": "apache-2.0",
"size": 5902
} | [
"com.netflix.dyno.connectionpool.BaseOperation",
"com.netflix.dyno.connectionpool.HostConnectionPool",
"com.netflix.dyno.connectionpool.exception.NoAvailableHostsException",
"org.apache.commons.lang3.StringUtils"
] | import com.netflix.dyno.connectionpool.BaseOperation; import com.netflix.dyno.connectionpool.HostConnectionPool; import com.netflix.dyno.connectionpool.exception.NoAvailableHostsException; import org.apache.commons.lang3.StringUtils; | import com.netflix.dyno.connectionpool.*; import com.netflix.dyno.connectionpool.exception.*; import org.apache.commons.lang3.*; | [
"com.netflix.dyno",
"org.apache.commons"
] | com.netflix.dyno; org.apache.commons; | 2,332,363 |
public static void setFailureHandled(Exchange exchange) {
exchange.setProperty(Exchange.FAILURE_HANDLED, Boolean.TRUE);
// clear exception since its failure handled
exchange.setException(null);
} | static void function(Exchange exchange) { exchange.setProperty(Exchange.FAILURE_HANDLED, Boolean.TRUE); exchange.setException(null); } | /**
* Sets the exchange to be failure handled.
*
* @param exchange the exchange
*/ | Sets the exchange to be failure handled | setFailureHandled | {
"repo_name": "zregvart/camel",
"path": "core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java",
"license": "apache-2.0",
"size": 42299
} | [
"org.apache.camel.Exchange"
] | import org.apache.camel.Exchange; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 661,538 |
//@Override
public List<GenericEntity> getStudentAssessments(final String token, String studentId) {
// make a call to student-assessments, with the student id
List<GenericEntity> responses = createEntitiesFromAPI(getApiUrl() + STUDENTS_URL + studentId
+ STUDENT_ASSESSMENTS, ... | List<GenericEntity> responses = createEntitiesFromAPI(getApiUrl() + STUDENTS_URL + studentId + STUDENT_ASSESSMENTS, token); List<GenericEntity> studentAssmts = new ArrayList<GenericEntity>(); if (responses != null) { for (GenericEntity studentAssmt : responses) { studentAssmts.add(studentAssmt); } } return studentAssmt... | /**
* Get a list of student assessment results, given a student id
*/ | Get a list of student assessment results, given a student id | getStudentAssessments | {
"repo_name": "inbloom/APP-dashboard",
"path": "src/main/java/org/slc/sli/dashboard/client/LiveAPIClient.java",
"license": "apache-2.0",
"size": 44963
} | [
"java.util.ArrayList",
"java.util.List",
"org.slc.sli.dashboard.entity.GenericEntity"
] | import java.util.ArrayList; import java.util.List; import org.slc.sli.dashboard.entity.GenericEntity; | import java.util.*; import org.slc.sli.dashboard.entity.*; | [
"java.util",
"org.slc.sli"
] | java.util; org.slc.sli; | 1,000,473 |
@Override
public IReleaseDateData getDate() {
return release;
} | IReleaseDateData function() { return release; } | /**
* Returns the release date
*
* @return the date
*/ | Returns the release date | getDate | {
"repo_name": "Yorxxx/playednext",
"path": "app/src/main/java/com/piticlistudio/playednext/gamerelease/model/entity/datasource/RealmGameRelease.java",
"license": "apache-2.0",
"size": 1581
} | [
"com.piticlistudio.playednext.releasedate.model.entity.datasource.IReleaseDateData"
] | import com.piticlistudio.playednext.releasedate.model.entity.datasource.IReleaseDateData; | import com.piticlistudio.playednext.releasedate.model.entity.datasource.*; | [
"com.piticlistudio.playednext"
] | com.piticlistudio.playednext; | 375,428 |
@Override
public Set<Map<String, String>> findKeysOfMissingSubFundGroupsForBalances(Integer balanceFiscalYear) {
// see algorithm for findKeysOfMissingPriorYearAccountsForBalances
List subFundGroupKeys = getJdbcTemplate().query("select distinct CA_PRIOR_YR_ACCT_T.sub_fund_grp_cd from CA_PRIOR_YR... | Set<Map<String, String>> function(Integer balanceFiscalYear) { List subFundGroupKeys = getJdbcTemplate().query(STR, new Object[] { balanceFiscalYear }, subFundGroupRowMapper); return selectMissingSubFundGroups(subFundGroupKeys); } | /**
* Queries the database to find missing sub fund groups
*
* @param balanceFiscalYear the fiscal year of the balance to find missing sub fund groups for
* @return a Set of Maps holding the primary keys of missing sub fund groups
* @see org.kuali.kfs.gl.batch.dataaccess.YearEndDao#findKeysOfMi... | Queries the database to find missing sub fund groups | findKeysOfMissingSubFundGroupsForBalances | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-core/src/main/java/org/kuali/kfs/gl/batch/dataaccess/impl/YearEndDaoJdbc.java",
"license": "agpl-3.0",
"size": 14998
} | [
"java.util.List",
"java.util.Map",
"java.util.Set"
] | import java.util.List; import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,802,835 |
NetworkThread getNetworkThread(); | NetworkThread getNetworkThread(); | /**
* The networking thread that is running in the background
*/ | The networking thread that is running in the background | getNetworkThread | {
"repo_name": "VUMARLE/Server",
"path": "src/main/java/nl/vu/ict4d/marle/server/MarleManager.java",
"license": "gpl-2.0",
"size": 1148
} | [
"nl.vu.ict4d.marle.server.multicast.NetworkThread"
] | import nl.vu.ict4d.marle.server.multicast.NetworkThread; | import nl.vu.ict4d.marle.server.multicast.*; | [
"nl.vu.ict4d"
] | nl.vu.ict4d; | 458,706 |
default DisplayCallback getDisplayCallback() {
return null;
}
| default DisplayCallback getDisplayCallback() { return null; } | /**
* Returns the display callback.
*
* @return the display callback.
*/ | Returns the display callback | getDisplayCallback | {
"repo_name": "pepstock-org/Charba",
"path": "src/org/pepstock/charba/client/datalabels/IsDefaultDataLabelsItem.java",
"license": "apache-2.0",
"size": 11112
} | [
"org.pepstock.charba.client.datalabels.callbacks.DisplayCallback"
] | import org.pepstock.charba.client.datalabels.callbacks.DisplayCallback; | import org.pepstock.charba.client.datalabels.callbacks.*; | [
"org.pepstock.charba"
] | org.pepstock.charba; | 659,331 |
private void lock(final Lock lock, final int multiplier)
throws RegionTooBusyException, InterruptedIOException {
try {
final long waitTime = Math.min(maxBusyWaitDuration,
busyWaitDuration * Math.min(multiplier, maxBusyWaitMultiplier));
if (!lock.tryLock(waitTime, TimeUnit.MILLISECONDS)... | void function(final Lock lock, final int multiplier) throws RegionTooBusyException, InterruptedIOException { try { final long waitTime = Math.min(maxBusyWaitDuration, busyWaitDuration * Math.min(multiplier, maxBusyWaitMultiplier)); if (!lock.tryLock(waitTime, TimeUnit.MILLISECONDS)) { throw new RegionTooBusyException( ... | /**
* Try to acquire a lock. Throw RegionTooBusyException
* if failed to get the lock in time. Throw InterruptedIOException
* if interrupted while waiting for the lock.
*/ | Try to acquire a lock. Throw RegionTooBusyException if failed to get the lock in time. Throw InterruptedIOException if interrupted while waiting for the lock | lock | {
"repo_name": "throughsky/lywebank",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java",
"license": "apache-2.0",
"size": 235118
} | [
"java.io.InterruptedIOException",
"java.util.concurrent.TimeUnit",
"java.util.concurrent.locks.Lock",
"org.apache.hadoop.hbase.RegionTooBusyException"
] | import java.io.InterruptedIOException; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Lock; import org.apache.hadoop.hbase.RegionTooBusyException; | import java.io.*; import java.util.concurrent.*; import java.util.concurrent.locks.*; import org.apache.hadoop.hbase.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,972,102 |
public NestedSet<PathFragment> getLooseHdrsDirs() {
return looseHdrsDirs;
} | NestedSet<PathFragment> function() { return looseHdrsDirs; } | /**
* Returns the immutable set of declared include directories, relative to a "-I" or "-iquote"
* directory" (possibly empty but never null).
*/ | Returns the immutable set of declared include directories, relative to a "-I" or "-iquote" directory" (possibly empty but never null) | getLooseHdrsDirs | {
"repo_name": "dslomov/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationContext.java",
"license": "apache-2.0",
"size": 43349
} | [
"com.google.devtools.build.lib.collect.nestedset.NestedSet",
"com.google.devtools.build.lib.vfs.PathFragment"
] | import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.vfs.PathFragment; | import com.google.devtools.build.lib.collect.nestedset.*; import com.google.devtools.build.lib.vfs.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,888,407 |
public SnapshotDiffReport diff(final INodesInPath iip,
final String snapshotPath, final String from,
final String to) throws IOException {
// Find the source root directory path where the snapshots were taken.
// All the check for path has been included in the valueOf method.
INodeDirectory sn... | SnapshotDiffReport function(final INodesInPath iip, final String snapshotPath, final String from, final String to) throws IOException { INodeDirectory snapshotRootDir; if (this.snapshotDiffAllowSnapRootDescendant) { snapshotRootDir = getSnapshottableAncestorDir(iip); } else { snapshotRootDir = getSnapshottableRoot(iip)... | /**
* Compute the difference between two snapshots of a directory, or between a
* snapshot of the directory and its current tree.
*/ | Compute the difference between two snapshots of a directory, or between a snapshot of the directory and its current tree | diff | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotManager.java",
"license": "apache-2.0",
"size": 22108
} | [
"com.google.common.base.Preconditions",
"java.io.IOException",
"java.util.Collections",
"org.apache.hadoop.hdfs.protocol.SnapshotDiffReport",
"org.apache.hadoop.hdfs.server.namenode.INodeDirectory",
"org.apache.hadoop.hdfs.server.namenode.INodesInPath"
] | import com.google.common.base.Preconditions; import java.io.IOException; import java.util.Collections; import org.apache.hadoop.hdfs.protocol.SnapshotDiffReport; import org.apache.hadoop.hdfs.server.namenode.INodeDirectory; import org.apache.hadoop.hdfs.server.namenode.INodesInPath; | import com.google.common.base.*; import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.hadoop"
] | com.google.common; java.io; java.util; org.apache.hadoop; | 163,147 |
private double readAndCalcStdDev(Path path, Configuration conf)
throws IOException {
FileSystem fs = FileSystem.get(conf);
Path file = new Path(path, "part-r-00000");
if (!fs.exists(file))
throw new IOException("Output not found!");
double stddev = 0;
BufferedReader br = null;
tr... | double function(Path path, Configuration conf) throws IOException { FileSystem fs = FileSystem.get(conf); Path file = new Path(path, STR); if (!fs.exists(file)) throw new IOException(STR); double stddev = 0; BufferedReader br = null; try { br = new BufferedReader(new InputStreamReader(fs.open(file), Charsets.UTF_8)); l... | /**
* Reads the output file and parses the summation of lengths, the word count,
* and the lengths squared, to perform a quick calculation of the standard
* deviation.
*
* @param path
* The path to find the output file in. Set in main to the output
* directory.
* @throws IOExc... | Reads the output file and parses the summation of lengths, the word count, and the lengths squared, to perform a quick calculation of the standard deviation | readAndCalcStdDev | {
"repo_name": "tseen/Federated-HDFS",
"path": "tseenliu/FedHDFS-hadoop-src/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/WordStandardDeviation.java",
"license": "apache-2.0",
"size": 7253
} | [
"com.google.common.base.Charsets",
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStreamReader",
"java.util.StringTokenizer",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import com.google.common.base.Charsets; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import com.google.common.base.*; import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.hadoop"
] | com.google.common; java.io; java.util; org.apache.hadoop; | 2,773,116 |
public static Object findValueOfType(Collection collection, Class type) {
if (isEmpty(collection)) {
return null;
}
Object value = null;
for (Iterator it = collection.iterator(); it.hasNext();) {
Object obj = it.next();
if (type == null || type.isInstance(obj)) {
if (value != null) {
... | static Object function(Collection collection, Class type) { if (isEmpty(collection)) { return null; } Object value = null; for (Iterator it = collection.iterator(); it.hasNext();) { Object obj = it.next(); if (type == null type.isInstance(obj)) { if (value != null) { return null; } value = obj; } } return value; } | /**
* Find a single value of the given type in the given Collection.
* @param collection the Collection to search
* @param type the type to look for
* @return a value of the given type found if there is a clear match,
* or <code>null</code> if none or more than one such value found
*/ | Find a single value of the given type in the given Collection | findValueOfType | {
"repo_name": "codeApeFromChina/resource",
"path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/util/CollectionUtils.java",
"license": "unlicense",
"size": 8998
} | [
"java.util.Collection",
"java.util.Iterator"
] | import java.util.Collection; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,284,676 |
public DoubleWritable evaluate(HiveDecimalWritable baseWritable, HiveDecimalWritable writable) {
if (baseWritable == null || writable == null) {
return null;
}
double base = baseWritable.doubleValue();
double d = writable.doubleValue();
return log(base, d);
} | DoubleWritable function(HiveDecimalWritable baseWritable, HiveDecimalWritable writable) { if (baseWritable == null writable == null) { return null; } double base = baseWritable.doubleValue(); double d = writable.doubleValue(); return log(base, d); } | /**
* Get the logarithm of the given decimal input with the given decimal base.
*/ | Get the logarithm of the given decimal input with the given decimal base | evaluate | {
"repo_name": "vergilchiu/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/udf/UDFLog.java",
"license": "apache-2.0",
"size": 3046
} | [
"org.apache.hadoop.hive.serde2.io.DoubleWritable",
"org.apache.hadoop.hive.serde2.io.HiveDecimalWritable"
] | import org.apache.hadoop.hive.serde2.io.DoubleWritable; import org.apache.hadoop.hive.serde2.io.HiveDecimalWritable; | import org.apache.hadoop.hive.serde2.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 979,543 |
public ZonedDateTime getPaymentDate() {
return _paymentDate;
} | ZonedDateTime function() { return _paymentDate; } | /**
* Gets the payment date.
* @return The payment date.
*/ | Gets the payment date | getPaymentDate | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/instrument/payment/PaymentDefinition.java",
"license": "apache-2.0",
"size": 2620
} | [
"org.threeten.bp.ZonedDateTime"
] | import org.threeten.bp.ZonedDateTime; | import org.threeten.bp.*; | [
"org.threeten.bp"
] | org.threeten.bp; | 1,504,301 |
public static byte[] toBytes(String s) {
try {
return s.getBytes(UTF8_ENCODING);
} catch (UnsupportedEncodingException e) {
LOG.error("UTF-8 not supported?", e);
return null;
}
} | static byte[] function(String s) { try { return s.getBytes(UTF8_ENCODING); } catch (UnsupportedEncodingException e) { LOG.error(STR, e); return null; } } | /**
* Converts a string to a UTF-8 byte array.
*
* @param s
* string
* @return the byte array
*/ | Converts a string to a UTF-8 byte array | toBytes | {
"repo_name": "supermy/nutch2",
"path": "src/java/org/apache/nutch/util/Bytes.java",
"license": "apache-2.0",
"size": 39793
} | [
"java.io.UnsupportedEncodingException"
] | import java.io.UnsupportedEncodingException; | import java.io.*; | [
"java.io"
] | java.io; | 2,255,663 |
@Test
public void testIsCachedRes() {
System.out.println("Testing CKANCache.isCachedRes");
cache.setTree(tree);
try {
assertTrue(cache.isCachedRes(orgName, pkgName, resName));
} catch (Exception e) {
fail(e.getMessage());
} // try catch
... | void function() { System.out.println(STR); cache.setTree(tree); try { assertTrue(cache.isCachedRes(orgName, pkgName, resName)); } catch (Exception e) { fail(e.getMessage()); } } | /**
* Test of isCachedRes method, of class CKANCache.
*/ | Test of isCachedRes method, of class CKANCache | testIsCachedRes | {
"repo_name": "jmcanterafonseca/fiware-cygnus",
"path": "src/test/java/com/telefonica/iot/cygnus/backends/ckan/CKANCacheTest.java",
"license": "agpl-3.0",
"size": 6111
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 994,162 |
public Optional<Artifact> getCompiledArchive() {
if (compilationArtifacts.isPresent()) {
return compilationArtifacts.get().getArchive();
}
return Optional.absent();
} | Optional<Artifact> function() { if (compilationArtifacts.isPresent()) { return compilationArtifacts.get().getArchive(); } return Optional.absent(); } | /**
* Returns an {@link Optional} containing the compiled {@code .a} file, or
* {@link Optional#absent()} if this object contains no {@link CompilationArtifacts} or the
* compilation information has no sources.
*/ | Returns an <code>Optional</code> containing the compiled .a file, or <code>Optional#absent()</code> if this object contains no <code>CompilationArtifacts</code> or the compilation information has no sources | getCompiledArchive | {
"repo_name": "spxtr/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/objc/ObjcCommon.java",
"license": "apache-2.0",
"size": 32056
} | [
"com.google.common.base.Optional",
"com.google.devtools.build.lib.actions.Artifact"
] | import com.google.common.base.Optional; import com.google.devtools.build.lib.actions.Artifact; | import com.google.common.base.*; import com.google.devtools.build.lib.actions.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 1,443,218 |
public void refresh () {
((DefaultTreeModel)tree.getModel()).nodeStructureChanged (root);
} | void function () { ((DefaultTreeModel)tree.getModel()).nodeStructureChanged (root); } | /**
* Refresh all the nodes.
*/ | Refresh all the nodes | refresh | {
"repo_name": "lsilvestre/Jogre",
"path": "server/src/org/jogre/server/administrator/AdminTreePanel.java",
"license": "gpl-2.0",
"size": 4186
} | [
"javax.swing.tree.DefaultTreeModel"
] | import javax.swing.tree.DefaultTreeModel; | import javax.swing.tree.*; | [
"javax.swing"
] | javax.swing; | 717,624 |
public void testNoTransitionFound() throws Exception
{
// Construct and build the map.
StateTransitionMap map = new StateTransitionMap();
State start = new State("START", StateType.START);
State end = new State("END", StateType.END);
Transition transition = new Transition... | void function() throws Exception { StateTransitionMap map = new StateTransitionMap(); State start = new State("START", StateType.START); State end = new State("END", StateType.END); Transition transition = new Transition(new NegationGuard( new PositiveGuard()), start, null, end); map.addState(start); map.addState(end);... | /**
* Confirm that a state machine throws a TransitionNotFoundException if it
* enters a state and cannot find a matching transition when a message is
* processed.
*/ | Confirm that a state machine throws a TransitionNotFoundException if it enters a state and cannot find a matching transition when a message is processed | testNoTransitionFound | {
"repo_name": "anomalizer/tungsten-fsm",
"path": "test/java/com/continuent/tungsten/commons/patterns/fsm/test/StateMachineTest.java",
"license": "gpl-2.0",
"size": 51917
} | [
"com.continuent.tungsten.commons.patterns.fsm.EntityAdapter",
"com.continuent.tungsten.commons.patterns.fsm.Event",
"com.continuent.tungsten.commons.patterns.fsm.NegationGuard",
"com.continuent.tungsten.commons.patterns.fsm.PositiveGuard",
"com.continuent.tungsten.commons.patterns.fsm.State",
"com.continu... | import com.continuent.tungsten.commons.patterns.fsm.EntityAdapter; import com.continuent.tungsten.commons.patterns.fsm.Event; import com.continuent.tungsten.commons.patterns.fsm.NegationGuard; import com.continuent.tungsten.commons.patterns.fsm.PositiveGuard; import com.continuent.tungsten.commons.patterns.fsm.State; i... | import com.continuent.tungsten.commons.patterns.fsm.*; | [
"com.continuent.tungsten"
] | com.continuent.tungsten; | 856,558 |
public void onClientEvent(final GridDhtPartitionsExchangeFuture fut, boolean crd) throws IgniteCheckedException {
boolean locJoin = fut.discoveryEvent().eventNode().isLocal(); | void function(final GridDhtPartitionsExchangeFuture fut, boolean crd) throws IgniteCheckedException { boolean locJoin = fut.discoveryEvent().eventNode().isLocal(); | /**
* Called on exchange initiated by client node join/fail.
*
* @param fut Exchange future.
* @param crd Coordinator flag.
* @throws IgniteCheckedException If failed.
*/ | Called on exchange initiated by client node join/fail | onClientEvent | {
"repo_name": "nivanov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java",
"license": "apache-2.0",
"size": 66037
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture; | import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,992,565 |
public void addAllTo(List<StaffStamping> list) {
for (val s : stavesBySystem)
list.addAll(s);
} | void function(List<StaffStamping> list) { for (val s : stavesBySystem) list.addAll(s); } | /**
* Adds all staves to the given list, system by system.
*/ | Adds all staves to the given list, system by system | addAllTo | {
"repo_name": "Xenoage/Zong",
"path": "layout/src/com/xenoage/zong/musiclayout/layouter/scoreframelayout/util/StaffStampings.java",
"license": "agpl-3.0",
"size": 2351
} | [
"com.xenoage.zong.musiclayout.stampings.StaffStamping",
"java.util.List"
] | import com.xenoage.zong.musiclayout.stampings.StaffStamping; import java.util.List; | import com.xenoage.zong.musiclayout.stampings.*; import java.util.*; | [
"com.xenoage.zong",
"java.util"
] | com.xenoage.zong; java.util; | 1,110,731 |
@SimpleFunction
public void RequestFollowers() {
if (twitter == null || userName.length() == 0) {
form.dispatchErrorOccurredEvent(this, "RequestFollowers",
ErrorMessages.ERROR_TWITTER_REQUEST_FOLLOWERS_FAILED,
"Need to login?");
return;
}
AsynchUtil.runAsynchronously(new ... | void function() { if (twitter == null userName.length() == 0) { form.dispatchErrorOccurredEvent(this, STR, ErrorMessages.ERROR_TWITTER_REQUEST_FOLLOWERS_FAILED, STR); return; } AsynchUtil.runAsynchronously(new Runnable() { List<User> friends = new ArrayList<User>(); | /**
* Gets who is following you.
*/ | Gets who is following you | RequestFollowers | {
"repo_name": "shilpamagrawal15/appinventor-sources",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/Twitter.java",
"license": "mit",
"size": 38300
} | [
"com.google.appinventor.components.runtime.util.AsynchUtil",
"com.google.appinventor.components.runtime.util.ErrorMessages",
"java.util.ArrayList",
"java.util.List"
] | import com.google.appinventor.components.runtime.util.AsynchUtil; import com.google.appinventor.components.runtime.util.ErrorMessages; import java.util.ArrayList; import java.util.List; | import com.google.appinventor.components.runtime.util.*; import java.util.*; | [
"com.google.appinventor",
"java.util"
] | com.google.appinventor; java.util; | 110,847 |
public AbstractDataStore get(String dataStoreName) {
if (StringHelper.isEmpty(dataStoreName)) {
return null;
}
return dataStoreMap.get(dataStoreName);
} | AbstractDataStore function(String dataStoreName) { if (StringHelper.isEmpty(dataStoreName)) { return null; } return dataStoreMap.get(dataStoreName); } | /**
* get data store
*
* @param dataStoreName
* @return
*/ | get data store | get | {
"repo_name": "xxxllluuu/uavstack",
"path": "com.creditease.uav.dbaccess/src/main/java/com/creditease/uav/datastore/api/DataStoreFactory.java",
"license": "apache-2.0",
"size": 4457
} | [
"com.creditease.agent.helpers.StringHelper",
"com.creditease.uav.datastore.core.AbstractDataStore"
] | import com.creditease.agent.helpers.StringHelper; import com.creditease.uav.datastore.core.AbstractDataStore; | import com.creditease.agent.helpers.*; import com.creditease.uav.datastore.core.*; | [
"com.creditease.agent",
"com.creditease.uav"
] | com.creditease.agent; com.creditease.uav; | 1,717,886 |
public void setProperties(Map<String, String> properties) {
this.properties = (properties == null)
? null
: new TreeMap<String, String>(properties);
} | void function(Map<String, String> properties) { this.properties = (properties == null) ? null : new TreeMap<String, String>(properties); } | /**
* Set the Map of properties for this KerberosDescriptor
*
* @param properties a Map of String to String values
*/ | Set the Map of properties for this KerberosDescriptor | setProperties | {
"repo_name": "alexryndin/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosDescriptor.java",
"license": "apache-2.0",
"size": 16099
} | [
"java.util.Map",
"java.util.TreeMap"
] | import java.util.Map; import java.util.TreeMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,212,994 |
@Override
public boolean matches(HttpServletRequest request) {
if (matchers.matches(request))
return false;
return processingMatcher.matches(request) ? true : false;
}
//endregion | boolean function(HttpServletRequest request) { if (matchers.matches(request)) return false; return processingMatcher.matches(request) ? true : false; } | /**
* Return whether requesting path matches with one of the skipped paths.
* @param request - Request.
* @return
*/ | Return whether requesting path matches with one of the skipped paths | matches | {
"repo_name": "yaseminalpay/Living-History-API",
"path": "src/main/java/com/zenith/livinghistory/api/zenithlivinghistoryapi/security/auth/jwt/SkipPathRequestMatcher.java",
"license": "mit",
"size": 1701
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 433,504 |
List getY(); | List getY(); | /**
* Returns the value of the '<em><b>Y</b></em>' attribute list.
* The list contents are of type {@link java.lang.String}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Y</em>' attribute list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-u... | Returns the value of the 'Y' attribute list. The list contents are of type <code>java.lang.String</code>. If the meaning of the 'Y' attribute list isn't clear, there really should be more of a description here... | getY | {
"repo_name": "apache/tuscany-sdo",
"path": "tools/src/test/java/com/example/sequences/TwoRCs.java",
"license": "apache-2.0",
"size": 5712
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 58,613 |
public Direction getSimpleDirection(AiHero hero,AiHero enemy) throws StopRequestException
{
this.ai.checkInterruption();
Direction result=Direction.NONE;
if(hero.getRow()==enemy.getRow())
{
if(hero.getCol()>enemy.getCol())
{
result=Direction.LEFT;
}
else if(hero.getCol()<enemy.get... | Direction function(AiHero hero,AiHero enemy) throws StopRequestException { this.ai.checkInterruption(); Direction result=Direction.NONE; if(hero.getRow()==enemy.getRow()) { if(hero.getCol()>enemy.getCol()) { result=Direction.LEFT; } else if(hero.getCol()<enemy.getCol()){ result=Direction.RIGHT; } } else if(hero.getCol(... | /**Method pour trouver si un jouer s'est trouve dans quel direction selon un autre jouer.
* @param hero
* description manquante !
* @param enemy
* description manquante !
* @return Les direction de base donc up,down,left,right. Direction.None s'il ne sont pas dans un direction de base.
* @throws... | Method pour trouver si un jouer s'est trouve dans quel direction selon un autre jouer | getSimpleDirection | {
"repo_name": "vlabatut/totalboumboum",
"path": "resources/ai/org/totalboumboum/ai/v201213/ais/oralozugur/v4/BombHandler.java",
"license": "gpl-2.0",
"size": 20349
} | [
"org.totalboumboum.ai.v201213.adapter.communication.StopRequestException",
"org.totalboumboum.ai.v201213.adapter.data.AiHero",
"org.totalboumboum.engine.content.feature.Direction"
] | import org.totalboumboum.ai.v201213.adapter.communication.StopRequestException; import org.totalboumboum.ai.v201213.adapter.data.AiHero; import org.totalboumboum.engine.content.feature.Direction; | import org.totalboumboum.ai.v201213.adapter.communication.*; import org.totalboumboum.ai.v201213.adapter.data.*; import org.totalboumboum.engine.content.feature.*; | [
"org.totalboumboum.ai",
"org.totalboumboum.engine"
] | org.totalboumboum.ai; org.totalboumboum.engine; | 2,831,578 |
private void displayRNG(final RNGGrammar grammar) {
setLoadedGrammar(grammar);
IPanel<?> root = null;
if(mode == MODE.EDIT){
EditRendererSML renderer = new EditRendererSML();
renderer.setObservers(observers);
renderer.setRefreshHandler(refreshHandler);
renderer.visit(grammar);
root = rendere... | void function(final RNGGrammar grammar) { setLoadedGrammar(grammar); IPanel<?> root = null; if(mode == MODE.EDIT){ EditRendererSML renderer = new EditRendererSML(); renderer.setObservers(observers); renderer.setRefreshHandler(refreshHandler); renderer.visit(grammar); root = renderer.getRoot(); } else if(mode == MODE.VI... | /**
* Displays the RelaxNG grammar
* @param grammar the grammar
*/ | Displays the RelaxNG grammar | displayRNG | {
"repo_name": "opensensorhub/sensorml-editor",
"path": "src/com/sensia/tools/client/swetools/editors/sensorml/RNGProcessorSML.java",
"license": "mpl-2.0",
"size": 5888
} | [
"com.sensia.relaxNG.RNGGrammar",
"com.sensia.tools.client.swetools.editors.sensorml.controller.IObserver",
"com.sensia.tools.client.swetools.editors.sensorml.panels.IPanel",
"com.sensia.tools.client.swetools.editors.sensorml.renderer.editor.EditRendererSML",
"com.sensia.tools.client.swetools.editors.sensorm... | import com.sensia.relaxNG.RNGGrammar; import com.sensia.tools.client.swetools.editors.sensorml.controller.IObserver; import com.sensia.tools.client.swetools.editors.sensorml.panels.IPanel; import com.sensia.tools.client.swetools.editors.sensorml.renderer.editor.EditRendererSML; import com.sensia.tools.client.swetools.e... | import com.sensia.*; import com.sensia.tools.client.swetools.editors.sensorml.controller.*; import com.sensia.tools.client.swetools.editors.sensorml.panels.*; import com.sensia.tools.client.swetools.editors.sensorml.renderer.editor.*; import com.sensia.tools.client.swetools.editors.sensorml.renderer.viewer.*; | [
"com.sensia",
"com.sensia.tools"
] | com.sensia; com.sensia.tools; | 213,434 |
public void endElement(String uri, String localName, String qName) throws SAXException {
if (state >= IN_METADATA) {
// Stop parsing at the end of metadata
if (METADATA_TAG.equals(localName)) throw new StopParsingException();
metadata.put(localName, text);
}
}
public static class Sto... | void function(String uri, String localName, String qName) throws SAXException { if (state >= IN_METADATA) { if (METADATA_TAG.equals(localName)) throw new StopParsingException(); metadata.put(localName, text); } } public static class StopParsingException extends SAXException {} | /**
* The parser has encountered end of element.
*/ | The parser has encountered end of element | endElement | {
"repo_name": "motrice/postxdb",
"path": "src/java/org/motrice/postxdb/MetaExtractor.java",
"license": "gpl-3.0",
"size": 7936
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 183,813 |
private static void initializeSlotMapForQueue(String queueName)
throws AndesException {
// Read slot window size from cluster configuration
Integer slotSize = AndesConfigurationManager.readValue
(AndesConfiguration.PERFORMANCE_TUNING_SLOTS_SLOT_WINDOW_SIZE);
List<... | static void function(String queueName) throws AndesException { Integer slotSize = AndesConfigurationManager.readValue (AndesConfiguration.PERFORMANCE_TUNING_SLOTS_SLOT_WINDOW_SIZE); List<AndesMessageMetadata> messageList = messageStore .getNextNMessageMetadataFromQueue(queueName, 0, slotSize); int numberOfMessages = me... | /**
* Create slots for the given queue name. This is done by reading all the messages from the
* message store and creating slots according to the slot window size.
*
* @param queueName
* Name of the queue
* @throws AndesException
*/ | Create slots for the given queue name. This is done by reading all the messages from the message store and creating slots according to the slot window size | initializeSlotMapForQueue | {
"repo_name": "IndunilRathnayake/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/AndesKernelBoot.java",
"license": "apache-2.0",
"size": 18406
} | [
"java.util.List",
"org.wso2.andes.configuration.AndesConfigurationManager",
"org.wso2.andes.configuration.enums.AndesConfiguration",
"org.wso2.andes.kernel.slot.SlotManagerClusterMode",
"org.wso2.andes.kernel.slot.SlotManagerStandalone",
"org.wso2.andes.server.cluster.coordination.hazelcast.HazelcastAgent... | import java.util.List; import org.wso2.andes.configuration.AndesConfigurationManager; import org.wso2.andes.configuration.enums.AndesConfiguration; import org.wso2.andes.kernel.slot.SlotManagerClusterMode; import org.wso2.andes.kernel.slot.SlotManagerStandalone; import org.wso2.andes.server.cluster.coordination.hazelca... | import java.util.*; import org.wso2.andes.configuration.*; import org.wso2.andes.configuration.enums.*; import org.wso2.andes.kernel.slot.*; import org.wso2.andes.server.cluster.coordination.hazelcast.*; | [
"java.util",
"org.wso2.andes"
] | java.util; org.wso2.andes; | 2,326,299 |
public static boolean visitInterfaces(ITypeBinding type, TypeBindingVisitor visitor) {
ITypeBinding[] interfaces= type.getInterfaces();
for (int i= 0; i < interfaces.length; i++) {
if (!visitor.visit(interfaces[i])) {
return false;
}
}
return true;
} | static boolean function(ITypeBinding type, TypeBindingVisitor visitor) { ITypeBinding[] interfaces= type.getInterfaces(); for (int i= 0; i < interfaces.length; i++) { if (!visitor.visit(interfaces[i])) { return false; } } return true; } | /**
* Method to visit a interface hierarchy defined by a given type.
*
* @param type the type which interface hierarchy is to be visited
* @param visitor the visitor
* @return <code>false</code> if the visiting got interrupted
*/ | Method to visit a interface hierarchy defined by a given type | visitInterfaces | {
"repo_name": "brunyuriy/quick-fix-scout",
"path": "org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/internal/corext/dom/Bindings.java",
"license": "mit",
"size": 52777
} | [
"org.eclipse.jdt.core.dom.ITypeBinding"
] | import org.eclipse.jdt.core.dom.ITypeBinding; | import org.eclipse.jdt.core.dom.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 1,044,087 |
@Test
public void getCharactersCharacterIdWalletJournalTest() throws ApiException {
final Integer page = null;
final List<CharacterWalletJournalResponse> response = api.getCharactersCharacterIdWalletJournal(characterId, DATASOURCE, null, page, null);
assertThat(response, notNullValue())... | void function() throws ApiException { final Integer page = null; final List<CharacterWalletJournalResponse> response = api.getCharactersCharacterIdWalletJournal(characterId, DATASOURCE, null, page, null); assertThat(response, notNullValue()); assumeFalse(response.isEmpty()); final CharacterWalletJournalResponse charact... | /**
* Get character wallet journal
*
* Retrieve the given character's wallet journal going 30 days back --- This route is cached for up to 3600 seconds SSO Scope: esi-wallet.read_character_wallet.v1
*
* @throws ApiException
* if the Api call fails
*/ | Get character wallet journal Retrieve the given character's wallet journal going 30 days back --- This route is cached for up to 3600 seconds SSO Scope: esi-wallet.read_character_wallet.v1 | getCharactersCharacterIdWalletJournalTest | {
"repo_name": "burberius/eve-esi",
"path": "src/test/java/net/troja/eve/esi/api/WalletApiTest.java",
"license": "apache-2.0",
"size": 5064
} | [
"java.util.List",
"net.troja.eve.esi.ApiException",
"net.troja.eve.esi.model.CharacterWalletJournalResponse",
"org.hamcrest.Matchers",
"org.junit.Assert",
"org.junit.Assume"
] | import java.util.List; import net.troja.eve.esi.ApiException; import net.troja.eve.esi.model.CharacterWalletJournalResponse; import org.hamcrest.Matchers; import org.junit.Assert; import org.junit.Assume; | import java.util.*; import net.troja.eve.esi.*; import net.troja.eve.esi.model.*; import org.hamcrest.*; import org.junit.*; | [
"java.util",
"net.troja.eve",
"org.hamcrest",
"org.junit"
] | java.util; net.troja.eve; org.hamcrest; org.junit; | 166,584 |
public static AffineTransform mptToPt(AffineTransform at) {
double[] matrix = new double[6];
at.getMatrix(matrix);
//Convert to points
matrix[4] = matrix[4] / 1000;
matrix[5] = matrix[5] / 1000;
return new AffineTransform(matrix);
} | static AffineTransform function(AffineTransform at) { double[] matrix = new double[6]; at.getMatrix(matrix); matrix[4] = matrix[4] / 1000; matrix[5] = matrix[5] / 1000; return new AffineTransform(matrix); } | /**
* Converts a millipoint-based transformation matrix to points.
* @param at a millipoint-based transformation matrix
* @return a point-based transformation matrix
*/ | Converts a millipoint-based transformation matrix to points | mptToPt | {
"repo_name": "apache/xml-graphics-commons",
"path": "src/main/java/org/apache/xmlgraphics/util/UnitConv.java",
"license": "apache-2.0",
"size": 7009
} | [
"java.awt.geom.AffineTransform"
] | import java.awt.geom.AffineTransform; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 2,186,274 |
public void remove(IRegion... region) {
for (IRegion r : region) {
Assert.isLegal(r.getLength() >= 0, "Negative region length"); //$NON-NLS-1$
IRegion from = new Region(r.getOffset(), Integer.MAX_VALUE);
IRegion floor = NavigableSetFloor(regions, from);
List<IRegion> list = new ArrayList<IRegion>(Navig... | void function(IRegion... region) { for (IRegion r : region) { Assert.isLegal(r.getLength() >= 0, STR); IRegion from = new Region(r.getOffset(), Integer.MAX_VALUE); IRegion floor = NavigableSetFloor(regions, from); List<IRegion> list = new ArrayList<IRegion>(NavigableSetTailSet(regions, floor != null ? floor : from, tru... | /**
* Exclude specified regions
*/ | Exclude specified regions | remove | {
"repo_name": "shakaran/studio3",
"path": "plugins/com.aptana.editor.common/src/com/aptana/editor/common/Regions.java",
"license": "gpl-3.0",
"size": 7139
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.eclipse.core.runtime.Assert",
"org.eclipse.jface.text.IRegion",
"org.eclipse.jface.text.Region"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.eclipse.core.runtime.Assert; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.Region; | import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.jface.text.*; | [
"java.util",
"org.eclipse.core",
"org.eclipse.jface"
] | java.util; org.eclipse.core; org.eclipse.jface; | 1,464,560 |
@Override
public void handlePreferences(GenericPreferencesEvent event) {
log.debug("Called");
if (event == null) {
log.warn("Received a null event");
return;
}
log.debug("Event class is {}",event.getClass().getSimpleName());
log.debug("Broadcasting... | void function(GenericPreferencesEvent event) { log.debug(STR); if (event == null) { log.warn(STR); return; } log.debug(STR,event.getClass().getSimpleName()); log.debug(STR,listeners.size()); for (GenericPreferencesEventListener listener: listeners) { listener.onPreferencesEvent(event); } } | /**
* Handles the process of broadcasting the event to listeners
* allowing this process to be decoupled
* @param event The generic event (or it's proxy)
*/ | Handles the process of broadcasting the event to listeners allowing this process to be decoupled | handlePreferences | {
"repo_name": "ychaim/sparkbit",
"path": "src/main/java/org/multibit/platform/handler/DefaultPreferencesHandler.java",
"license": "mit",
"size": 2425
} | [
"org.multibit.platform.listener.GenericPreferencesEvent",
"org.multibit.platform.listener.GenericPreferencesEventListener"
] | import org.multibit.platform.listener.GenericPreferencesEvent; import org.multibit.platform.listener.GenericPreferencesEventListener; | import org.multibit.platform.listener.*; | [
"org.multibit.platform"
] | org.multibit.platform; | 1,326,421 |
public synchronized void saveToken(HttpServletRequest request) {
HttpSession session = request.getSession();
String token = generateToken(request);
if (token != null) {
session.setAttribute(Globals.TRANSACTION_TOKEN_KEY, token);
}
} | synchronized void function(HttpServletRequest request) { HttpSession session = request.getSession(); String token = generateToken(request); if (token != null) { session.setAttribute(Globals.TRANSACTION_TOKEN_KEY, token); } } | /**
* Save a new transaction token in the user's current session, creating
* a new session if necessary.
*
* @param request The servlet request we are processing
*/ | Save a new transaction token in the user's current session, creating a new session if necessary | saveToken | {
"repo_name": "kawasima/struts-taglib-compatible",
"path": "src/share/org/apache/struts/util/TokenProcessor.java",
"license": "apache-2.0",
"size": 6673
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpSession",
"org.apache.struts.Globals"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.apache.struts.Globals; | import javax.servlet.http.*; import org.apache.struts.*; | [
"javax.servlet",
"org.apache.struts"
] | javax.servlet; org.apache.struts; | 2,229,605 |
public long calculateExpiry(URLConnection urlConnection); | long function(URLConnection urlConnection); | /**
* Given a URL connection, returns a calculated heuristic expiry time (in
* terms of milliseconds since epoch) for the resource.
* @param urlConnection the URL connection for the resource
* @return the expiry for the resource
*/ | Given a URL connection, returns a calculated heuristic expiry time (in terms of milliseconds since epoch) for the resource | calculateExpiry | {
"repo_name": "tntim96/rhino-jscover-repackaged",
"path": "src/jscover/mozilla/javascript/commonjs/module/provider/UrlConnectionExpiryCalculator.java",
"license": "mpl-2.0",
"size": 1016
} | [
"java.net.URLConnection"
] | import java.net.URLConnection; | import java.net.*; | [
"java.net"
] | java.net; | 958,151 |
public void resetSunlight()
{
// MagicNumber OFF
this.sunPosition = new SimpleXYZ(-100.0f, 0.0f, 0.0f);
this.sunColour = new FloatRGBA(1.0f, 1.0f, 1.0f);
// MagicNumber ON
}
| void function() { this.sunPosition = new SimpleXYZ(-100.0f, 0.0f, 0.0f); this.sunColour = new FloatRGBA(1.0f, 1.0f, 1.0f); } | /**
* Reset the sunlight rendering parameters to default values
*/ | Reset the sunlight rendering parameters to default values | resetSunlight | {
"repo_name": "madebyjeffrey/TerraJ",
"path": "src/main/java/com/alvermont/terraj/fracplanet/RenderParameters.java",
"license": "gpl-2.0",
"size": 11782
} | [
"com.alvermont.terraj.fracplanet.colour.FloatRGBA",
"com.alvermont.terraj.fracplanet.geom.SimpleXYZ"
] | import com.alvermont.terraj.fracplanet.colour.FloatRGBA; import com.alvermont.terraj.fracplanet.geom.SimpleXYZ; | import com.alvermont.terraj.fracplanet.colour.*; import com.alvermont.terraj.fracplanet.geom.*; | [
"com.alvermont.terraj"
] | com.alvermont.terraj; | 2,450,669 |
public void updateMoney(int index,
BigDecimal x,
boolean forceEncrypt) throws SQLServerException {
if (loggerExternal.isLoggable(java.util.logging.Level.FINER))
loggerExternal.entering(getClassNameLogging(), "updateMoney", new Object[] {index, x, forceEncrypt});
c... | void function(int index, BigDecimal x, boolean forceEncrypt) throws SQLServerException { if (loggerExternal.isLoggable(java.util.logging.Level.FINER)) loggerExternal.entering(getClassNameLogging(), STR, new Object[] {index, x, forceEncrypt}); checkClosed(); updateValue(index, JDBCType.MONEY, x, JavaType.BIGDECIMAL, for... | /**
* Updates the designated column with a <code>money</code> value. The updater methods are used to update column values in the current row or the
* insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> methods are
* called to... | Updates the designated column with a <code>money</code> value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> methods are called to update the database | updateMoney | {
"repo_name": "v-nisidh/mssql-jdbc",
"path": "src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResultSet.java",
"license": "mit",
"size": 288041
} | [
"java.math.BigDecimal",
"java.util.logging.Level"
] | import java.math.BigDecimal; import java.util.logging.Level; | import java.math.*; import java.util.logging.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 2,630,789 |
public List<AutoCompletionChoice> getChoices()
{
return new ArrayList<AutoCompletionChoice>(rChoices);
} | List<AutoCompletionChoice> function() { return new ArrayList<AutoCompletionChoice>(rChoices); } | /***************************************
* Returns the choices.
*
* @return The choices
*/ | Returns the choices | getChoices | {
"repo_name": "esoco/gewt",
"path": "src/main/java/de/esoco/ewt/impl/gwt/code/AutoCompletionResult.java",
"license": "apache-2.0",
"size": 3718
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,133,335 |
public final FileSearchConfiguration getFileSearchConfiguration() {
return fileSearchConfiguration;
} | final FileSearchConfiguration function() { return fileSearchConfiguration; } | /**
* This method returns the file search configuration.
*
* @return A {@link FileSearchConfiguration} is returned. A relative path is
* relative to the project root directory. An absolute path is used
* as such.
*/ | This method returns the file search configuration | getFileSearchConfiguration | {
"repo_name": "PureSolTechnologies/Purifinity",
"path": "analysis/api/analysis.api/src/main/java/com/puresoltechnologies/purifinity/analysis/api/AnalysisProjectSettings.java",
"license": "agpl-3.0",
"size": 5163
} | [
"com.puresoltechnologies.commons.misc.io.FileSearchConfiguration"
] | import com.puresoltechnologies.commons.misc.io.FileSearchConfiguration; | import com.puresoltechnologies.commons.misc.io.*; | [
"com.puresoltechnologies.commons"
] | com.puresoltechnologies.commons; | 766,288 |
@VisibleForTesting
static void configureDataBlockEncoding(Table table,
Configuration conf) throws IOException {
HTableDescriptor tableDescriptor = table.getTableDescriptor();
if (tableDescriptor == null) {
// could happen with mock table instance
return;
}
StringBuilder dataBlockEn... | static void configureDataBlockEncoding(Table table, Configuration conf) throws IOException { HTableDescriptor tableDescriptor = table.getTableDescriptor(); if (tableDescriptor == null) { return; } StringBuilder dataBlockEncodingConfigValue = new StringBuilder(); Collection<HColumnDescriptor> families = tableDescriptor.... | /**
* Serialize column family to data block encoding map to configuration.
* Invoked while configuring the MR job for incremental load.
*
* @param table to read the properties from
* @param conf to persist serialized values into
* @throws IOException
* on failure to read column family des... | Serialize column family to data block encoding map to configuration. Invoked while configuring the MR job for incremental load | configureDataBlockEncoding | {
"repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java",
"license": "apache-2.0",
"size": 29732
} | [
"java.io.IOException",
"java.net.URLEncoder",
"java.util.Collection",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.HColumnDescriptor",
"org.apache.hadoop.hbase.HTableDescriptor",
"org.apache.hadoop.hbase.client.Table",
"org.apache.hadoop.hbase.io.encoding.DataBlockEncoding"
] | import java.io.IOException; import java.net.URLEncoder; import java.util.Collection; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.io.encoding.Dat... | import java.io.*; import java.net.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.io.encoding.*; | [
"java.io",
"java.net",
"java.util",
"org.apache.hadoop"
] | java.io; java.net; java.util; org.apache.hadoop; | 1,596,597 |
public void setLensDistortion( int width, int height,
@Nullable PixelTransform<Point2D_F32> distToUndist,
@Nullable PixelTransform<Point2D_F32> undistToDist ) {
this.distToUndist = distToUndist;
this.undistToDist = undistToDist;
} | void function( int width, int height, @Nullable PixelTransform<Point2D_F32> distToUndist, @Nullable PixelTransform<Point2D_F32> undistToDist ) { this.distToUndist = distToUndist; this.undistToDist = undistToDist; } | /**
* <p>Specifies transforms which can be used to change coordinates from distorted to undistorted and the opposite
* coordinates. The undistorted image is never explicitly created.</p>
*
* @param width Input image width. Used in sanity check only.
* @param height Input image height. Used in sanity check onl... | Specifies transforms which can be used to change coordinates from distorted to undistorted and the opposite coordinates. The undistorted image is never explicitly created | setLensDistortion | {
"repo_name": "lessthanoptimal/BoofCV",
"path": "main/boofcv-feature/src/main/java/boofcv/alg/shapes/polygon/DetectPolygonFromContour.java",
"license": "apache-2.0",
"size": 20901
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 963,080 |
public void insertNewPassword(PasswordModel passwordModel) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("encryptedPassword", passwordModel.password);
contentValues.put("title", passwordModel.passwordTitle);
... | void function(PasswordModel passwordModel) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues contentValues = new ContentValues(); contentValues.put(STR, passwordModel.password); contentValues.put("title", passwordModel.passwordTitle); contentValues.put(STR, passwordModel.createdDate); db.insert(VAULT_PASS... | /**
* insertNewPassword
* Insert a new encrypted password into the database
* @param passwordModel: A password model object
*/ | insertNewPassword Insert a new encrypted password into the database | insertNewPassword | {
"repo_name": "frozenjava/VaultAndroid",
"path": "Vault/app/src/main/java/codeit/space/vault/db/VaultDatabaseHandler.java",
"license": "gpl-2.0",
"size": 7260
} | [
"android.content.ContentValues",
"android.database.sqlite.SQLiteDatabase"
] | import android.content.ContentValues; import android.database.sqlite.SQLiteDatabase; | import android.content.*; import android.database.sqlite.*; | [
"android.content",
"android.database"
] | android.content; android.database; | 1,817,352 |
public static Object lookupMandatoryBean(Exchange exchange, String name) throws NoSuchBeanException {
Object value = lookupBean(exchange, name);
if (value == null) {
throw new NoSuchBeanException(name);
}
return value;
} | static Object function(Exchange exchange, String name) throws NoSuchBeanException { Object value = lookupBean(exchange, name); if (value == null) { throw new NoSuchBeanException(name); } return value; } | /**
* Performs a lookup in the registry of the mandatory bean name and throws an exception if it could not be found
*
* @param exchange the exchange
* @param name the bean name
* @return the bean
* @throws NoSuchBeanException if no bean could be found in the registry
*/ | Performs a lookup in the registry of the mandatory bean name and throws an exception if it could not be found | lookupMandatoryBean | {
"repo_name": "oscerd/camel",
"path": "camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java",
"license": "apache-2.0",
"size": 35401
} | [
"org.apache.camel.Exchange",
"org.apache.camel.NoSuchBeanException"
] | import org.apache.camel.Exchange; import org.apache.camel.NoSuchBeanException; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 20,308 |
@Access(AccessType.PUBLIC)
public void updateCurrentReport(final boolean contract) {
final PowerProfile aggregate = generateReport();
currentRepLock.lock();
if (currentReport == null) {
currentReport = aggregate;
} else {
final PowerProfile newReport = new PowerProfile(currentTimeslot);
for (Catego... | @Access(AccessType.PUBLIC) void function(final boolean contract) { final PowerProfile aggregate = generateReport(); currentRepLock.lock(); if (currentReport == null) { currentReport = aggregate; } else { final PowerProfile newReport = new PowerProfile(currentTimeslot); for (Categories cat : Categories.values()) { final... | /**
* Update current report.
* TODO: still copy reported flexibility and expected demand?
*
* @param contract
* the contract
*/ | Update current report | updateCurrentReport | {
"repo_name": "almende/pi5",
"path": "common/src/main/java/com/almende/pi5/common/agents/GraphAgent.java",
"license": "apache-2.0",
"size": 13489
} | [
"com.almende.eve.protocol.jsonrpc.annotation.Access",
"com.almende.eve.protocol.jsonrpc.annotation.AccessType",
"com.almende.pi5.common.Categories",
"com.almende.pi5.common.CategoryProfile",
"com.almende.pi5.common.PowerProfile"
] | import com.almende.eve.protocol.jsonrpc.annotation.Access; import com.almende.eve.protocol.jsonrpc.annotation.AccessType; import com.almende.pi5.common.Categories; import com.almende.pi5.common.CategoryProfile; import com.almende.pi5.common.PowerProfile; | import com.almende.eve.protocol.jsonrpc.annotation.*; import com.almende.pi5.common.*; | [
"com.almende.eve",
"com.almende.pi5"
] | com.almende.eve; com.almende.pi5; | 2,002,066 |
private void showErrorDialog(int errorCode) {
// Get the error dialog from Google Play services
Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(
errorCode,
this,
LocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);
// If Google Play services ... | void function(int errorCode) { Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog( errorCode, this, LocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST); if (errorDialog != null) { ErrorDialogFragment errorFragment = new ErrorDialogFragment(); errorFragment.setDialog(errorDialog); errorFragment.show(getSupportF... | /**
* Show a dialog returned by Google Play services for the
* connection error code
*
* @param errorCode An error code returned from onConnectionFailed
*/ | Show a dialog returned by Google Play services for the connection error code | showErrorDialog | {
"repo_name": "ProfessorX/CIS508",
"path": "Lab/LocationUpdates/src/com/example/android/location/MainActivity.java",
"license": "gpl-2.0",
"size": 22257
} | [
"android.app.Dialog",
"android.support.v4.app.DialogFragment",
"com.google.android.gms.common.GooglePlayServicesUtil"
] | import android.app.Dialog; import android.support.v4.app.DialogFragment; import com.google.android.gms.common.GooglePlayServicesUtil; | import android.app.*; import android.support.v4.app.*; import com.google.android.gms.common.*; | [
"android.app",
"android.support",
"com.google.android"
] | android.app; android.support; com.google.android; | 1,362,792 |
private Result pInitialClause(final int yyStart) throws IOException {
Result yyResult;
int yyBase;
int yyOption1;
Node yyOpValue1;
Node yyValue;
ParseError yyError = ParseError.DUMMY;
// Start a state modification.
yyState.start();
// Alternative <De... | Result function(final int yyStart) throws IOException { Result yyResult; int yyBase; int yyOption1; Node yyOpValue1; Node yyValue; ParseError yyError = ParseError.DUMMY; yyState.start(); yyResult = pJeannieC$Declaration(yyStart); yyError = yyResult.select(yyError); if (yyResult.hasValue()) { yyValue = yyResult.semantic... | /**
* Parse nonterminal xtc.lang.jeannie.JeannieC.InitialClause.
*
* @param yyStart The index.
* @return The result.
* @throws IOException Signals an I/O error.
*/ | Parse nonterminal xtc.lang.jeannie.JeannieC.InitialClause | pInitialClause | {
"repo_name": "wandoulabs/xtc-rats",
"path": "xtc-core/src/main/java/xtc/lang/jeannie/JeannieParser.java",
"license": "lgpl-2.1",
"size": 647687
} | [
"java.io.IOException",
"xtc.parser.ParseError",
"xtc.parser.Result",
"xtc.tree.Node"
] | import java.io.IOException; import xtc.parser.ParseError; import xtc.parser.Result; import xtc.tree.Node; | import java.io.*; import xtc.parser.*; import xtc.tree.*; | [
"java.io",
"xtc.parser",
"xtc.tree"
] | java.io; xtc.parser; xtc.tree; | 2,001,470 |
public FileItemIterator getItemIterator(RequestContext ctx)
throws FileUploadException, IOException {
return new FileItemIteratorImpl(ctx);
} | FileItemIterator function(RequestContext ctx) throws FileUploadException, IOException { return new FileItemIteratorImpl(ctx); } | /**
* Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
* compliant <code>multipart/form-data</code> stream.
*
* @param ctx The context for the request to be parsed.
*
* @return An iterator to instances of <code>FileItemStream</code>
* parsed from the req... | Processes an RFC 1867 compliant <code>multipart/form-data</code> stream | getItemIterator | {
"repo_name": "codelibs/commons-fileupload-1.2",
"path": "src/java/org/apache/commons/fileupload/FileUploadBase.java",
"license": "apache-2.0",
"size": 49159
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,278,733 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
} | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "occiware/Multi-Cloud-Studio",
"path": "plugins/org.eclipse.cmf.occi.multicloud.aws.ec2.edit/src-gen/org/eclipse/cmf/occi/multicloud/aws/ec2/provider/C5_4xlargeItemProvider.java",
"license": "epl-1.0",
"size": 6072
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,416,756 |
public void setXenstoreData(Connection c, Map<String, String> xenstoreData) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
String method_call = "VM.set_xenstore_data";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(... | void function(Connection c, Map<String, String> xenstoreData) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(xenstoreData)}; Map... | /**
* Set the xenstore_data field of the given VM.
*
* @param xenstoreData New value to set
*/ | Set the xenstore_data field of the given VM | setXenstoreData | {
"repo_name": "cinderella/incubator-cloudstack",
"path": "deps/XenServerJava/com/xensource/xenapi/VM.java",
"license": "apache-2.0",
"size": 169722
} | [
"com.xensource.xenapi.Types",
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException"
] | import com.xensource.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException; | import com.xensource.xenapi.*; import java.util.*; import org.apache.xmlrpc.*; | [
"com.xensource.xenapi",
"java.util",
"org.apache.xmlrpc"
] | com.xensource.xenapi; java.util; org.apache.xmlrpc; | 1,830,771 |
private int computePaddingPosition(BaseBrick currentBrick) {
int currentRow = 0;
int startingBrickIndex = getRecyclerViewItems().indexOf(currentBrick);
if (startingBrickIndex < 0) {
startingBrickIndex = 0;
}
ListIterator<BaseBrick> iterator = getRecyclerViewItem... | int function(BaseBrick currentBrick) { int currentRow = 0; int startingBrickIndex = getRecyclerViewItems().indexOf(currentBrick); if (startingBrickIndex < 0) { startingBrickIndex = 0; } ListIterator<BaseBrick> iterator = getRecyclerViewItems().listIterator(startingBrickIndex); while (iterator.hasPrevious()) { currentBr... | /**
* Checks / Determines if the brick is on the left wall, first row, right wall, last row.
*
* @param currentBrick BaseBrick item that was changed / added / removed
* @return index of first modified item
*/ | Checks / Determines if the brick is on the left wall, first row, right wall, last row | computePaddingPosition | {
"repo_name": "patbeagan1/brickkit-android",
"path": "BrickKit/bricks/src/main/java/com/wayfair/brickkit/BrickDataManager.java",
"license": "apache-2.0",
"size": 41493
} | [
"com.wayfair.brickkit.brick.BaseBrick",
"java.util.ListIterator"
] | import com.wayfair.brickkit.brick.BaseBrick; import java.util.ListIterator; | import com.wayfair.brickkit.brick.*; import java.util.*; | [
"com.wayfair.brickkit",
"java.util"
] | com.wayfair.brickkit; java.util; | 1,577,085 |
@Override
public String getTenantDomain(String fullyQualifiedUserName) throws CharonException {
return fullyQualifiedUserName.split("@")[1];
} | String function(String fullyQualifiedUserName) throws CharonException { return fullyQualifiedUserName.split("@")[1]; } | /**
* Retrieve the tenant domain name given the tenant admin user name.
*
* @param fullyQualifiedUserName
* @return
* @throws org.wso2.charon.core.exceptions.CharonException
*
*/ | Retrieve the tenant domain name given the tenant admin user name | getTenantDomain | {
"repo_name": "maheshika/charon",
"path": "modules/charon-utils/src/main/java/org/wso2/charon/utils/storage/InMemoryTenantManager.java",
"license": "apache-2.0",
"size": 3734
} | [
"org.wso2.charon.core.exceptions.CharonException"
] | import org.wso2.charon.core.exceptions.CharonException; | import org.wso2.charon.core.exceptions.*; | [
"org.wso2.charon"
] | org.wso2.charon; | 428,796 |
public void setSessionFactory(SessionFactory sessionFactory);
| void function(SessionFactory sessionFactory); | /**
* Set the Hibernate SessionFactory to connect to the database.
*
* @param sessionFactory
*/ | Set the Hibernate SessionFactory to connect to the database | setSessionFactory | {
"repo_name": "openmrs/openmrs-module-jsslab",
"path": "api/src/main/java/org/openmrs/module/jsslab/db/LabInstrumentDAO.java",
"license": "mpl-2.0",
"size": 3128
} | [
"org.hibernate.SessionFactory"
] | import org.hibernate.SessionFactory; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 1,896,913 |
@Test
public void testWritesWhileGetting() throws Exception {
int testCount = 50;
int numRows = 1;
int numFamilies = 10;
int numQualifiers = 100;
int compactInterval = 100;
byte[][] families = new byte[numFamilies][];
for (int i = 0; i < numFamilies; i++) {
families[i] = Bytes.toBy... | void function() throws Exception { int testCount = 50; int numRows = 1; int numFamilies = 10; int numQualifiers = 100; int compactInterval = 100; byte[][] families = new byte[numFamilies][]; for (int i = 0; i < numFamilies; i++) { families[i] = Bytes.toBytes(STR + i); } byte[][] qualifiers = new byte[numQualifiers][]; ... | /**
* Writes very wide records and gets the latest row every time.. Flushes and
* compacts the region aggressivly to catch issues.
*
* @throws IOException
* by flush / scan / compaction
* @throws InterruptedException
* when joining threads
*/ | Writes very wide records and gets the latest row every time.. Flushes and compacts the region aggressivly to catch issues | testWritesWhileGetting | {
"repo_name": "mahak/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java",
"license": "apache-2.0",
"size": 302897
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.HBaseConfiguration",
"org.apache.hadoop.hbase.MultithreadedTestUtil",
"org.apache.hadoop.hbase.util.Bytes"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.MultithreadedTestUtil; import org.apache.hadoop.hbase.util.Bytes; | import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,897,195 |
public Builder number(String number) {
this.number = number;
return this;
} | Builder function(String number) { this.number = number; return this; } | /**
* The customer's phone number.
*/ | The customer's phone number | number | {
"repo_name": "cailingxiao/wire",
"path": "wire-runtime/src/test/java/com/squareup/wire/protos/person/Person.java",
"license": "apache-2.0",
"size": 6327
} | [
"java.lang.String"
] | import java.lang.String; | import java.lang.*; | [
"java.lang"
] | java.lang; | 2,753,132 |
assertNotSame("same", o1, o2);
assertFalse("equals", Objects .equals (o1, o2));
assertFalse("deepEquals", Objects .deepEquals(o1, o2));
assertFalse("deepEquals(STRICT)", Utilities.deepEquals(o1, o2, ComparisonMode.STRICT));
assertFalse(... | assertNotSame("same", o1, o2); assertFalse(STR, Objects .equals (o1, o2)); assertFalse(STR, Objects .deepEquals(o1, o2)); assertFalse(STR, Utilities.deepEquals(o1, o2, ComparisonMode.STRICT)); assertFalse(STR, Utilities.deepEquals(o1, o2, ComparisonMode.BY_CONTRACT)); assertFalse(STR, Utilities.deepEquals(o1, o2, Compa... | /**
* Asserts that the two given objects are not equal.
* This method tests all {@link ComparisonMode} except {@code DEBUG}.
*
* @param o1 the first object.
* @param o2 the second object.
*/ | Asserts that the two given objects are not equal. This method tests all <code>ComparisonMode</code> except DEBUG | assertNotDeepEquals | {
"repo_name": "Geomatys/sis",
"path": "core/sis-utility/src/test/java/org/apache/sis/test/Assert.java",
"license": "apache-2.0",
"size": 20447
} | [
"java.util.Objects",
"org.apache.sis.util.ComparisonMode",
"org.apache.sis.util.Utilities"
] | import java.util.Objects; import org.apache.sis.util.ComparisonMode; import org.apache.sis.util.Utilities; | import java.util.*; import org.apache.sis.util.*; | [
"java.util",
"org.apache.sis"
] | java.util; org.apache.sis; | 917,547 |
@Override
public ORecordIteratorClusters<REC> last() {
if (clusterIds.length == 0)
return this;
browsedRecords = 0;
currentClusterIdx = clusterIds.length - 1;
if (liveUpdated)
updateClusterRange();
current.clusterId = clusterIds[currentClusterIdx];
resetCurrentPosi... | ORecordIteratorClusters<REC> function() { if (clusterIds.length == 0) return this; browsedRecords = 0; currentClusterIdx = clusterIds.length - 1; if (liveUpdated) updateClusterRange(); current.clusterId = clusterIds[currentClusterIdx]; resetCurrentPosition(); prevPosition(); final ORecord record = getRecord(); currentR... | /**
* Move the iterator to the end of the range. If no range was specified move to the last record of the cluster.
*
* @return The object itself
*/ | Move the iterator to the end of the range. If no range was specified move to the last record of the cluster | last | {
"repo_name": "alonsod86/orientdb",
"path": "core/src/main/java/com/orientechnologies/orient/core/iterator/ORecordIteratorClusters.java",
"license": "apache-2.0",
"size": 13180
} | [
"com.orientechnologies.orient.core.record.ORecord"
] | import com.orientechnologies.orient.core.record.ORecord; | import com.orientechnologies.orient.core.record.*; | [
"com.orientechnologies.orient"
] | com.orientechnologies.orient; | 2,551,780 |
public FeatureResultSet queryFeatures(BoundingBox boundingBox,
Projection projection, String where, String[] whereArgs) {
return queryFeatures(false, boundingBox, projection, where, whereArgs);
} | FeatureResultSet function(BoundingBox boundingBox, Projection projection, String where, String[] whereArgs) { return queryFeatures(false, boundingBox, projection, where, whereArgs); } | /**
* Query for features within the bounding box in the provided projection
*
* @param boundingBox
* bounding box
* @param projection
* projection
* @param where
* where clause
* @param whereArgs
* where arguments
* @return feature results
* @since 3.... | Query for features within the bounding box in the provided projection | queryFeatures | {
"repo_name": "ngageoint/geopackage-java",
"path": "src/main/java/mil/nga/geopackage/extension/rtree/RTreeIndexTableDao.java",
"license": "mit",
"size": 349361
} | [
"mil.nga.geopackage.BoundingBox",
"mil.nga.geopackage.features.user.FeatureResultSet",
"mil.nga.proj.Projection"
] | import mil.nga.geopackage.BoundingBox; import mil.nga.geopackage.features.user.FeatureResultSet; import mil.nga.proj.Projection; | import mil.nga.geopackage.*; import mil.nga.geopackage.features.user.*; import mil.nga.proj.*; | [
"mil.nga.geopackage",
"mil.nga.proj"
] | mil.nga.geopackage; mil.nga.proj; | 1,962,343 |
@Test
public void testSetVariables_1()
throws Exception {
HDTestPlan fixture = new HDTestPlan();
fixture.setTestPlanName("");
fixture.setVariables(new HDTestVariables());
fixture.setUserPercentage(1);
HDTestVariables variables = new HDTestVariables();
... | void function() throws Exception { HDTestPlan fixture = new HDTestPlan(); fixture.setTestPlanName(""); fixture.setVariables(new HDTestVariables()); fixture.setUserPercentage(1); HDTestVariables variables = new HDTestVariables(); fixture.setVariables(variables); } | /**
* Run the void setVariables(HDTestVariables) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 9/10/14 9:36 AM
*/ | Run the void setVariables(HDTestVariables) method test | testSetVariables_1 | {
"repo_name": "intuit/Tank",
"path": "harness_data/src/test/java/com/intuit/tank/harness/data/HDTestPlanTest.java",
"license": "epl-1.0",
"size": 5345
} | [
"com.intuit.tank.harness.data.HDTestPlan",
"com.intuit.tank.harness.data.HDTestVariables"
] | import com.intuit.tank.harness.data.HDTestPlan; import com.intuit.tank.harness.data.HDTestVariables; | import com.intuit.tank.harness.data.*; | [
"com.intuit.tank"
] | com.intuit.tank; | 1,492,419 |
public static ByteBuffer encode(String string)
throws CharacterCodingException {
return encode(string, true);
} | static ByteBuffer function(String string) throws CharacterCodingException { return encode(string, true); } | /**
* Converts the provided String to bytes using the UTF-8 encoding. If the input is malformed, invalid chars are
* replaced by a default value.
*
* @return ByteBuffer: bytes stores at ByteBuffer.array() and length is ByteBuffer.limit()
*/ | Converts the provided String to bytes using the UTF-8 encoding. If the input is malformed, invalid chars are replaced by a default value | encode | {
"repo_name": "pwong-mapr/incubator-drill",
"path": "exec/vector/src/main/java/org/apache/drill/exec/util/Text.java",
"license": "apache-2.0",
"size": 19109
} | [
"java.nio.ByteBuffer",
"java.nio.charset.CharacterCodingException"
] | import java.nio.ByteBuffer; import java.nio.charset.CharacterCodingException; | import java.nio.*; import java.nio.charset.*; | [
"java.nio"
] | java.nio; | 1,791,439 |
public static Path getBackReferencesDir(final Path storeDir, final String fileName) {
return new Path(storeDir, BACK_REFERENCES_DIRECTORY_PREFIX + fileName);
} | static Path function(final Path storeDir, final String fileName) { return new Path(storeDir, BACK_REFERENCES_DIRECTORY_PREFIX + fileName); } | /**
* Get the directory to store the link back references
*
* <p>To simplify the reference count process, during the FileLink creation
* a back-reference is added to the back-reference directory of the specified file.
*
* @param storeDir Root directory for the link reference folder
* @param fileNam... | Get the directory to store the link back references To simplify the reference count process, during the FileLink creation a back-reference is added to the back-reference directory of the specified file | getBackReferencesDir | {
"repo_name": "justintung/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/FileLink.java",
"license": "apache-2.0",
"size": 16375
} | [
"org.apache.hadoop.fs.Path"
] | import org.apache.hadoop.fs.Path; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,289,567 |
@Test
public void testParentCleanedEvenIfDaughterGoneFirst()
throws IOException, InterruptedException {
parentWithSpecifiedEndKeyCleanedEvenIfDaughterGoneFirst(
"testParentCleanedEvenIfDaughterGoneFirst", Bytes.toBytes("eee"));
} | void function() throws IOException, InterruptedException { parentWithSpecifiedEndKeyCleanedEvenIfDaughterGoneFirst( STR, Bytes.toBytes("eee")); } | /**
* Make sure parent gets cleaned up even if daughter is cleaned up before it.
* @throws IOException
* @throws InterruptedException
*/ | Make sure parent gets cleaned up even if daughter is cleaned up before it | testParentCleanedEvenIfDaughterGoneFirst | {
"repo_name": "wowoshen/hbase",
"path": "src/test/java/org/apache/hadoop/hbase/master/TestCatalogJanitor.java",
"license": "apache-2.0",
"size": 31193
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.io.IOException; import org.apache.hadoop.hbase.util.Bytes; | import java.io.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 792,114 |
public static ISO8601DateTime fromISO8601DateTimeString(String strDateTime) throws ParseException {
int startPos = ParseUtils.nextNonWhite(strDateTime, 0);
ParseUtils.ParseValue<Integer> parseValue = ParseUtils.getSignedValue(strDateTime, startPos);
if (parseValue == null) {
throw new ParseException("... | static ISO8601DateTime function(String strDateTime) throws ParseException { int startPos = ParseUtils.nextNonWhite(strDateTime, 0); ParseUtils.ParseValue<Integer> parseValue = ParseUtils.getSignedValue(strDateTime, startPos); if (parseValue == null) { throw new ParseException(STR, startPos); } int year = parseValue.get... | /**
* Creates a new <code>ISO8601DateTime</code> by parsing the given <code>String</code> in the extended ISO8601
* format defined for XML.
*
* @param strDateTime the <code>String</code> in ISO8601 date-time format.
* @return a new <code>ISO8601DateTime</code>.
* @throws ParseException if there is an erro... | Creates a new <code>ISO8601DateTime</code> by parsing the given <code>String</code> in the extended ISO8601 format defined for XML | fromISO8601DateTimeString | {
"repo_name": "att/XACML",
"path": "XACML/src/main/java/com/att/research/xacml/std/datatypes/ISO8601DateTime.java",
"license": "mit",
"size": 16782
} | [
"java.text.ParseException"
] | import java.text.ParseException; | import java.text.*; | [
"java.text"
] | java.text; | 1,960,144 |
void removeQuorumServer(NetAddress serverAddress) throws IOException; | void removeQuorumServer(NetAddress serverAddress) throws IOException; | /**
* Removes a server from journal quorum. This method is supported only for
* {@link alluxio.master.journal.JournalType#EMBEDDED} journal.
*
* @param serverAddress server address to remove from quorum
* @throws IOException
*/ | Removes a server from journal quorum. This method is supported only for <code>alluxio.master.journal.JournalType#EMBEDDED</code> journal | removeQuorumServer | {
"repo_name": "madanadit/alluxio",
"path": "core/server/common/src/main/java/alluxio/master/journal/JournalMaster.java",
"license": "apache-2.0",
"size": 1316
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,037,490 |
AtomicLongArray aa = new AtomicLongArray(SIZE);
for (int i = 0; i < SIZE; i++)
assertEquals(0, aa.get(i));
} | AtomicLongArray aa = new AtomicLongArray(SIZE); for (int i = 0; i < SIZE; i++) assertEquals(0, aa.get(i)); } | /**
* constructor creates array of given size with all elements zero
*/ | constructor creates array of given size with all elements zero | testConstructor | {
"repo_name": "life-beam/j2objc",
"path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/AtomicLongArrayTest.java",
"license": "apache-2.0",
"size": 11190
} | [
"java.util.concurrent.atomic.AtomicLongArray"
] | import java.util.concurrent.atomic.AtomicLongArray; | import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 327,403 |
public void onApplicationStart(Connection newConn) {
try {
onConnectionCreate(newConn);
Statement stmt = newConn.createStatement();
stmt.execute("CREATE OR REPLACE TRIGGER set_nls_date_formats "+
"AFTER LOGON ON SCHEMA "+
"BEGIN "+
"EXECUTE IMMEDIATE ('ALTER SESSION SET NLS_DATE_FOR... | void function(Connection newConn) { try { onConnectionCreate(newConn); Statement stmt = newConn.createStatement(); stmt.execute(STR+ STR+ STR+ STR+ STR+ "END;"); stmt.close(); System.out.println(STR); } catch (SQLException sqle) { System.err.println(STR + sqle.getMessage()); sqle.printStackTrace(); } } | /**
* This is a callback method and is called by the idegaWeb when it starts up and connects to the Oracle database first<br>.
* This is overrided to create the 'set_nls_date_formats' logon trigger.
*/ | This is a callback method and is called by the idegaWeb when it starts up and connects to the Oracle database first. This is overrided to create the 'set_nls_date_formats' logon trigger | onApplicationStart | {
"repo_name": "idega/platform2",
"path": "src/com/idega/data/OracleDatastoreInterface.java",
"license": "gpl-3.0",
"size": 14531
} | [
"java.sql.Connection",
"java.sql.SQLException",
"java.sql.Statement"
] | import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 539,479 |
public void testSerialization() throws IOException {
for (int i = 0; i < NUMBER_OF_RUNS; i++) {
SuggestBuilder suggestBuilder = randomSuggestBuilder();
SuggestBuilder deserializedModel = copyWriteable(suggestBuilder, namedWriteableRegistry, SuggestBuilder::new);
assertEqu... | void function() throws IOException { for (int i = 0; i < NUMBER_OF_RUNS; i++) { SuggestBuilder suggestBuilder = randomSuggestBuilder(); SuggestBuilder deserializedModel = copyWriteable(suggestBuilder, namedWriteableRegistry, SuggestBuilder::new); assertEquals(suggestBuilder, deserializedModel); assertEquals(suggestBuil... | /**
* Test serialization and deserialization
*/ | Test serialization and deserialization | testSerialization | {
"repo_name": "gingerwizard/elasticsearch",
"path": "server/src/test/java/org/elasticsearch/search/suggest/SuggestBuilderTests.java",
"license": "apache-2.0",
"size": 7298
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,292,298 |
@SuppressWarnings("NullableProblems")
public void testUpdateProperties() throws Exception {
assertEmpty(mgr.directoryListing(ROOT_ID));
IgfsFileInfo dir = new IgfsFileInfo(true, null);
IgfsFileInfo file = new IgfsFileInfo(new IgfsFileInfo(400, null, false, null), 1);
assertNull... | @SuppressWarnings(STR) void function() throws Exception { assertEmpty(mgr.directoryListing(ROOT_ID)); IgfsFileInfo dir = new IgfsFileInfo(true, null); IgfsFileInfo file = new IgfsFileInfo(new IgfsFileInfo(400, null, false, null), 1); assertNull(mgr.putIfAbsent(ROOT_ID, "dir", dir)); assertNull(mgr.putIfAbsent(ROOT_ID, ... | /**
* Test properties management in meta-cache.
*
* @throws Exception If failed.
*/ | Test properties management in meta-cache | testUpdateProperties | {
"repo_name": "dlnufox/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManagerSelfTest.java",
"license": "apache-2.0",
"size": 20158
} | [
"java.util.Arrays",
"java.util.Collections",
"java.util.Map",
"java.util.UUID",
"org.apache.ignite.igfs.IgfsPath",
"org.apache.ignite.internal.util.typedef.F",
"org.apache.ignite.lang.IgniteBiTuple",
"org.apache.ignite.lang.IgniteUuid",
"org.apache.ignite.testframework.GridTestUtils"
] | import java.util.Arrays; import java.util.Collections; import java.util.Map; import java.util.UUID; import org.apache.ignite.igfs.IgfsPath; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.testframework.Grid... | import java.util.*; import org.apache.ignite.igfs.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.lang.*; import org.apache.ignite.testframework.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,915,824 |
@Override
protected Term truncateSymbolicValue(Term term, int type) {
// TODO
return term;
}
| Term function(Term term, int type) { return term; } | /**
* Truncate the symbolic value if this is required by its' type. In this case the integer value
* is truncated to a short.
*
* @param term The Term that needs to be truncated.
* @param type The type of the Term, which determines the truncation strategy.
* @return The truncated term.
*/ | Truncate the symbolic value if this is required by its' type. In this case the integer value is truncated to a short | truncateSymbolicValue | {
"repo_name": "wwu-pi/muggl",
"path": "muggl-core/src/de/wwu/muggl/instructions/typed/ShortInstruction.java",
"license": "gpl-3.0",
"size": 3366
} | [
"de.wwu.muggl.solvers.expressions.Term"
] | import de.wwu.muggl.solvers.expressions.Term; | import de.wwu.muggl.solvers.expressions.*; | [
"de.wwu.muggl"
] | de.wwu.muggl; | 390,519 |
static ImmutableSet<String> mergerDexopts(
RuleContext ruleContext, Iterable<String> tokenizedDexopts) {
// We don't need an ordered set but might as well. Note we don't need to worry about coverage
// builds since the merger doesn't use --no-locals.
return normalizeDexopts(
Iterables.filte... | static ImmutableSet<String> mergerDexopts( RuleContext ruleContext, Iterable<String> tokenizedDexopts) { return normalizeDexopts( Iterables.filter( tokenizedDexopts, new FlagMatcher(getAndroidConfig(ruleContext).getDexoptsSupportedInDexMerger()))); } | /**
* Derives options to use in DexFileMerger actions from the given context and dx flags, where the
* latter typically come from a {@code dexopts} attribute on a top-level target.
*/ | Derives options to use in DexFileMerger actions from the given context and dx flags, where the latter typically come from a dexopts attribute on a top-level target | mergerDexopts | {
"repo_name": "twitter-forks/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/android/DexArchiveAspect.java",
"license": "apache-2.0",
"size": 31763
} | [
"com.google.common.collect.ImmutableSet",
"com.google.common.collect.Iterables",
"com.google.devtools.build.lib.analysis.RuleContext"
] | import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.devtools.build.lib.analysis.RuleContext; | import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 2,561,970 |
EAttribute getAnimateMotionType_Id(); | EAttribute getAnimateMotionType_Id(); | /**
* Returns the meta object for the attribute '{@link org.w3._2001.smil20.language.AnimateMotionType#getId <em>Id</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Id</em>'.
* @see org.w3._2001.smil20.language.AnimateMotionType#getId()
... | Returns the meta object for the attribute '<code>org.w3._2001.smil20.language.AnimateMotionType#getId Id</code>'. | getAnimateMotionType_Id | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wmts/src/org/w3/_2001/smil20/language/LanguagePackage.java",
"license": "lgpl-2.1",
"size": 137841
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,284,531 |
public SVGPoint appendItem(SVGPoint newItem)
throws DOMException, SVGException {
return (SVGPoint) appendItemImpl(newItem);
} | SVGPoint function(SVGPoint newItem) throws DOMException, SVGException { return (SVGPoint) appendItemImpl(newItem); } | /**
* <b>DOM</b>: Implements {@link SVGPointList#appendItem(SVGPoint)}.
*/ | DOM: Implements <code>SVGPointList#appendItem(SVGPoint)</code> | appendItem | {
"repo_name": "shyamalschandra/flex-sdk",
"path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/dom/svg/AbstractSVGPointList.java",
"license": "apache-2.0",
"size": 7356
} | [
"org.w3c.dom.DOMException",
"org.w3c.dom.svg.SVGException",
"org.w3c.dom.svg.SVGPoint"
] | import org.w3c.dom.DOMException; import org.w3c.dom.svg.SVGException; import org.w3c.dom.svg.SVGPoint; | import org.w3c.dom.*; import org.w3c.dom.svg.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 914,573 |
@ApiMethod(
httpMethod = "PATCH",
path = "me/trashes/{trashName}"
)
public void emptyTrash(final User user, @Named("trashName") final String trashName)
throws UnauthorizedException, NotFoundException {
Authentication.validateUser(user);
this.trashService... | @ApiMethod( httpMethod = "PATCH", path = STR ) void function(final User user, @Named(STR) final String trashName) throws UnauthorizedException, NotFoundException { Authentication.validateUser(user); this.trashService.emptyTrash(user, trashName); } | /**
* Empty a given trash
*
* @param user injected user if authenticated
* @param trashName trash to empty
*
* @throws UnauthorizedException if user is not authenticated
* @throws NotFoundException if the given trash doesn't exists
*/ | Empty a given trash | emptyTrash | {
"repo_name": "fabien88/poubelleconnetable",
"path": "src/main/java/com/example/poubelleconnetable/api/TrashEndpoint.java",
"license": "apache-2.0",
"size": 4303
} | [
"com.example.poubelleconnetable.utilities.Authentication",
"com.google.api.server.spi.config.ApiMethod",
"com.google.api.server.spi.response.NotFoundException",
"com.google.api.server.spi.response.UnauthorizedException",
"com.google.appengine.api.users.User",
"javax.inject.Named"
] | import com.example.poubelleconnetable.utilities.Authentication; import com.google.api.server.spi.config.ApiMethod; import com.google.api.server.spi.response.NotFoundException; import com.google.api.server.spi.response.UnauthorizedException; import com.google.appengine.api.users.User; import javax.inject.Named; | import com.example.poubelleconnetable.utilities.*; import com.google.api.server.spi.config.*; import com.google.api.server.spi.response.*; import com.google.appengine.api.users.*; import javax.inject.*; | [
"com.example.poubelleconnetable",
"com.google.api",
"com.google.appengine",
"javax.inject"
] | com.example.poubelleconnetable; com.google.api; com.google.appengine; javax.inject; | 549,913 |
Set<ValidationType> getUseFor() {
return (this.useFor != null) ? this.useFor : evaluateUseFor(false);
} | Set<ValidationType> getUseFor() { return (this.useFor != null) ? this.useFor : evaluateUseFor(false); } | /**
* Get the useFor for the {@link IdentityStore}.
*
* @return The useFor.
*
* @see LdapIdentityStoreDefinition#useFor()
* @see LdapIdentityStoreDefinition#useForExpression()
*/ | Get the useFor for the <code>IdentityStore</code> | getUseFor | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.javaeesec/src/com/ibm/ws/security/javaeesec/identitystore/LdapIdentityStoreDefinitionWrapper.java",
"license": "epl-1.0",
"size": 44802
} | [
"java.util.Set",
"javax.security.enterprise.identitystore.IdentityStore"
] | import java.util.Set; import javax.security.enterprise.identitystore.IdentityStore; | import java.util.*; import javax.security.enterprise.identitystore.*; | [
"java.util",
"javax.security"
] | java.util; javax.security; | 302,768 |
private void drawLabels(Canvas canvas) {
int width = chartRect.right - chartRect.left;
float labelY = chartRect.bottom;
float part = (float) width / (labels.length - 1);
for (int i = 0; i < labels.length; i++) {
String s = labels[i];
float centerX = chartRect.left + part * i;
float labelWidth = g... | void function(Canvas canvas) { int width = chartRect.right - chartRect.left; float labelY = chartRect.bottom; float part = (float) width / (labels.length - 1); for (int i = 0; i < labels.length; i++) { String s = labels[i]; float centerX = chartRect.left + part * i; float labelWidth = getTextWidth(labelPaint, s); float... | /**
* Draw labels on the bottom
* @param canvas
*/ | Draw labels on the bottom | drawLabels | {
"repo_name": "Steven-Luo/android-bezier-curve-chart",
"path": "bezier-curve-chart/src/com/cn/naive/lib/view/BezierCurveChart.java",
"license": "apache-2.0",
"size": 10161
} | [
"android.graphics.Canvas"
] | import android.graphics.Canvas; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,374,184 |
protected MelatiConfig melatiConfig() {
MelatiConfig config = super.melatiConfig();
config.setFormDataAdaptorFactory(new MemoryFormDataAdaptorFactory());
return config;
} | MelatiConfig function() { MelatiConfig config = super.melatiConfig(); config.setFormDataAdaptorFactory(new MemoryFormDataAdaptorFactory()); return config; } | /**
* Demonstrates how to use a different melati configuration.
*/ | Demonstrates how to use a different melati configuration | melatiConfig | {
"repo_name": "timp21337/melati-old",
"path": "melati/src/main/java/org/melati/test/ConfigServletTest.java",
"license": "gpl-2.0",
"size": 7112
} | [
"org.melati.MelatiConfig",
"org.melati.servlet.MemoryFormDataAdaptorFactory"
] | import org.melati.MelatiConfig; import org.melati.servlet.MemoryFormDataAdaptorFactory; | import org.melati.*; import org.melati.servlet.*; | [
"org.melati",
"org.melati.servlet"
] | org.melati; org.melati.servlet; | 572,741 |
public Single<ContainerChangeLeaseResponse> changeLeaseWithRestResponseAsync(Context context, @NonNull String leaseId, @NonNull String proposedLeaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions) {
if (this.client.url() == null) {
throw new IllegalArgume... | Single<ContainerChangeLeaseResponse> function(Context context, @NonNull String leaseId, @NonNull String proposedLeaseId, Integer timeout, String requestId, ModifiedAccessConditions modifiedAccessConditions) { if (this.client.url() == null) { throw new IllegalArgumentException(STR); } if (leaseId == null) { throw new Il... | /**
* [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
*
* @param context The context to associate with this operation.
* @param leaseId Specifies the current lease ID on the resource.
* @param proposedL... | [Update] establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite | changeLeaseWithRestResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/storage/microsoft-azure-storage-blob/src/main/java/com/microsoft/azure/storage/blob/GeneratedContainers.java",
"license": "mit",
"size": 119957
} | [
"com.microsoft.azure.storage.blob.models.ContainerChangeLeaseResponse",
"com.microsoft.azure.storage.blob.models.ModifiedAccessConditions",
"com.microsoft.rest.v2.Context",
"com.microsoft.rest.v2.DateTimeRfc1123",
"com.microsoft.rest.v2.Validator",
"io.reactivex.Single",
"io.reactivex.annotations.NonNul... | import com.microsoft.azure.storage.blob.models.ContainerChangeLeaseResponse; import com.microsoft.azure.storage.blob.models.ModifiedAccessConditions; import com.microsoft.rest.v2.Context; import com.microsoft.rest.v2.DateTimeRfc1123; import com.microsoft.rest.v2.Validator; import io.reactivex.Single; import io.reactive... | import com.microsoft.azure.storage.blob.models.*; import com.microsoft.rest.v2.*; import io.reactivex.*; import io.reactivex.annotations.*; import java.time.*; | [
"com.microsoft.azure",
"com.microsoft.rest",
"io.reactivex",
"io.reactivex.annotations",
"java.time"
] | com.microsoft.azure; com.microsoft.rest; io.reactivex; io.reactivex.annotations; java.time; | 1,085,815 |
List<Long> getProjects(String userId); | List<Long> getProjects(String userId); | /**
* Returns an array with the user's projects.
*
* @param userId user ID
* @return list of projects
*/ | Returns an array with the user's projects | getProjects | {
"repo_name": "themadrobot/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/server/storage/StorageIo.java",
"license": "apache-2.0",
"size": 19838
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,024,441 |
void imageLoadComplete() {
Preconditions.checkState(!imageLoaded, "FSDirectory already loaded");
setImageLoaded();
} | void imageLoadComplete() { Preconditions.checkState(!imageLoaded, STR); setImageLoaded(); } | /**
* Notify that loading of this FSDirectory is complete, and
* it is imageLoaded for use
*/ | Notify that loading of this FSDirectory is complete, and it is imageLoaded for use | imageLoadComplete | {
"repo_name": "jiayuhan-it/yarn-jyhtest",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java",
"license": "apache-2.0",
"size": 298813
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,455,145 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.