method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public ServiceFuture<AuthorizationPolicyResourceFormatInner> getAsync(String resourceGroupName, String hubName, String authorizationPolicyName, final ServiceCallback<AuthorizationPolicyResourceFormatInner> serviceCallback) {
return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hu... | ServiceFuture<AuthorizationPolicyResourceFormatInner> function(String resourceGroupName, String hubName, String authorizationPolicyName, final ServiceCallback<AuthorizationPolicyResourceFormatInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, hubName, authorizatio... | /**
* Gets an authorization policy in the hub.
*
* @param resourceGroupName The name of the resource group.
* @param hubName The name of the hub.
* @param authorizationPolicyName The name of the policy.
* @param serviceCallback the async ServiceCallback to handle successful and failed resp... | Gets an authorization policy in the hub | getAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPoliciesInner.java",
"license": "mit",
"size": 43999
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,289,213 |
private TrafficSelector buildSelector(byte ipProto, IpAddress srcIp,
IpAddress dstIp, Short srcTcpPort,
Short dstTcpPort) {
TrafficSelector.Builder builder = null;
if (dstIp.isIp4()) {
builder = DefaultT... | TrafficSelector function(byte ipProto, IpAddress srcIp, IpAddress dstIp, Short srcTcpPort, Short dstTcpPort) { TrafficSelector.Builder builder = null; if (dstIp.isIp4()) { builder = DefaultTrafficSelector.builder() .matchEthType(Ethernet.TYPE_IPV4) .matchIPProtocol(ipProto) .matchIPSrc(IpPrefix.valueOf(srcIp, IpPrefix.... | /**
* Builds a traffic selector based on the set of input parameters.
*
* @param ipProto IP protocol
* @param srcIp source IP address
* @param dstIp destination IP address
* @param srcTcpPort source TCP port, or null if shouldn't be set
* @param dstTcpPort destination TCP port, or nul... | Builds a traffic selector based on the set of input parameters | buildSelector | {
"repo_name": "jmiserez/onos",
"path": "apps/sdnip/src/main/java/org/onosproject/sdnip/PeerConnectivityManager.java",
"license": "apache-2.0",
"size": 11430
} | [
"org.onlab.packet.Ethernet",
"org.onlab.packet.IpAddress",
"org.onlab.packet.IpPrefix",
"org.onosproject.net.flow.DefaultTrafficSelector",
"org.onosproject.net.flow.TrafficSelector"
] | import org.onlab.packet.Ethernet; import org.onlab.packet.IpAddress; import org.onlab.packet.IpPrefix; import org.onosproject.net.flow.DefaultTrafficSelector; import org.onosproject.net.flow.TrafficSelector; | import org.onlab.packet.*; import org.onosproject.net.flow.*; | [
"org.onlab.packet",
"org.onosproject.net"
] | org.onlab.packet; org.onosproject.net; | 1,025,466 |
public Set<Description> refine(Description description, int maxLength);
| Set<Description> function(Description description, int maxLength); | /**
* Optional refinement operation, where the learning algorithm can
* specify an additional bound on the length of descriptions.
*
* @param description The description, which will be refined.
* @param maxLength The maximum length of returned description, where length is defined by {@link Description#getLe... | Optional refinement operation, where the learning algorithm can specify an additional bound on the length of descriptions | refine | {
"repo_name": "daftano/dl-learner",
"path": "components-core/src/main/java/org/dllearner/refinementoperators/LengthLimitedRefinementOperator.java",
"license": "gpl-3.0",
"size": 2247
} | [
"java.util.Set",
"org.dllearner.core.owl.Description"
] | import java.util.Set; import org.dllearner.core.owl.Description; | import java.util.*; import org.dllearner.core.owl.*; | [
"java.util",
"org.dllearner.core"
] | java.util; org.dllearner.core; | 2,664,044 |
private synchronized void startNewSubprocedure(String path) {
LOG.debug("Found procedure znode: " + path);
String opName = ZKUtil.getNodeName(path);
// start watching for an abort notification for the procedure
String abortZNode = zkController.getAbortZNode(opName);
try {
if (ZKUtil.watchAnd... | synchronized void function(String path) { LOG.debug(STR + path); String opName = ZKUtil.getNodeName(path); String abortZNode = zkController.getAbortZNode(opName); try { if (ZKUtil.watchAndCheckExists(zkController.getWatcher(), abortZNode)) { LOG.debug(STR + opName + STR); return; } } catch (KeeperException e) { member.... | /**
* Kick off a new sub-procedure on the listener with the data stored in the passed znode.
* <p>
* Will attempt to create the same procedure multiple times if an procedure znode with the same
* name is created. It is left up the coordinator to ensure this doesn't occur.
* @param path full path to the z... | Kick off a new sub-procedure on the listener with the data stored in the passed znode. Will attempt to create the same procedure multiple times if an procedure znode with the same name is created. It is left up the coordinator to ensure this doesn't occur | startNewSubprocedure | {
"repo_name": "vincentpoon/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/ZKProcedureMemberRpcs.java",
"license": "apache-2.0",
"size": 14780
} | [
"java.util.Arrays",
"org.apache.hadoop.hbase.errorhandling.ForeignException",
"org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil",
"org.apache.hadoop.hbase.util.Bytes",
"org.apache.hadoop.hbase.zookeeper.ZKUtil",
"org.apache.zookeeper.KeeperException"
] | import java.util.Arrays; import org.apache.hadoop.hbase.errorhandling.ForeignException; import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.zookeeper.ZKUtil; import org.apache.zookeeper.KeeperException; | import java.util.*; import org.apache.hadoop.hbase.errorhandling.*; import org.apache.hadoop.hbase.shaded.protobuf.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.hbase.zookeeper.*; import org.apache.zookeeper.*; | [
"java.util",
"org.apache.hadoop",
"org.apache.zookeeper"
] | java.util; org.apache.hadoop; org.apache.zookeeper; | 1,704,888 |
@Test
public void testFetchSize() throws Exception {
final DatabaseEngineDriver engineDriver = DatabaseEngineDriver.fromEngine(properties.getProperty(ENGINE));
final TestRouter testRouter = new TestRouter(engineDriver.defaultPort());
testRouter.init();
final Properties testProp... | void function() throws Exception { final DatabaseEngineDriver engineDriver = DatabaseEngineDriver.fromEngine(properties.getProperty(ENGINE)); final TestRouter testRouter = new TestRouter(engineDriver.defaultPort()); testRouter.init(); final Properties testProps = TestRouter.getPatchedDbProperties(properties, testRouter... | /**
* Tests that the different DB engines respect the fetch size set in a query.
*
* @throws Exception If any error occurs, thus failing the test.
*/ | Tests that the different DB engines respect the fetch size set in a query | testFetchSize | {
"repo_name": "feedzai/pdb",
"path": "src/test/java/com/feedzai/commons/sql/abstraction/engine/impl/abs/AbstractEngineSchemaTest.java",
"license": "apache-2.0",
"size": 40851
} | [
"com.feedzai.commons.sql.abstraction.ddl.DbEntity",
"com.feedzai.commons.sql.abstraction.dml.dialect.SqlBuilder",
"com.feedzai.commons.sql.abstraction.dml.result.ResultIterator",
"com.feedzai.commons.sql.abstraction.engine.DatabaseEngine",
"com.feedzai.commons.sql.abstraction.engine.DatabaseEngineDriver",
... | import com.feedzai.commons.sql.abstraction.ddl.DbEntity; import com.feedzai.commons.sql.abstraction.dml.dialect.SqlBuilder; import com.feedzai.commons.sql.abstraction.dml.result.ResultIterator; import com.feedzai.commons.sql.abstraction.engine.DatabaseEngine; import com.feedzai.commons.sql.abstraction.engine.DatabaseEn... | import com.feedzai.commons.sql.abstraction.ddl.*; import com.feedzai.commons.sql.abstraction.dml.dialect.*; import com.feedzai.commons.sql.abstraction.dml.result.*; import com.feedzai.commons.sql.abstraction.engine.*; import com.feedzai.commons.sql.abstraction.engine.configuration.*; import java.util.*; import org.asse... | [
"com.feedzai.commons",
"java.util",
"org.assertj.core"
] | com.feedzai.commons; java.util; org.assertj.core; | 2,896,115 |
@Test(expectedExceptions = { LDAPBindException.class })
public void testSCRAMSHA256SuccessfulNoCredentials()
throws Exception
{
final SCRAMSHA256BindRequest bindRequest =
new SCRAMSHA256BindRequest("user", "pencil");
final SCRAMClientFirstMessage clientFirstMessage =
new SCRAMC... | @Test(expectedExceptions = { LDAPBindException.class }) void function() throws Exception { final SCRAMSHA256BindRequest bindRequest = new SCRAMSHA256BindRequest("user", STR); final SCRAMClientFirstMessage clientFirstMessage = new SCRAMClientFirstMessage(bindRequest, STR); final String serverFirstMessageString = STR + S... | /**
* Tests the behavior when creating a server first message for a successful
* bind that does not include server SASL credentials.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the behavior when creating a server first message for a successful bind that does not include server SASL credentials | testSCRAMSHA256SuccessfulNoCredentials | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/SCRAMServerFinalMessageTestCase.java",
"license": "gpl-2.0",
"size": 21596
} | [
"com.unboundid.asn1.ASN1OctetString",
"org.testng.annotations.Test"
] | import com.unboundid.asn1.ASN1OctetString; import org.testng.annotations.Test; | import com.unboundid.asn1.*; import org.testng.annotations.*; | [
"com.unboundid.asn1",
"org.testng.annotations"
] | com.unboundid.asn1; org.testng.annotations; | 2,764,538 |
@Override
public JSONObject getJson() throws JSONException {
JSONObject json = create();
json.put("type", type);
json.put("category", getCategory());
if (label != null && !label.isEmpty())
json.put("label", label);
if (displaySequence != null && displaySequenc... | JSONObject function() throws JSONException { JSONObject json = create(); json.put("type", type); json.put(STR, getCategory()); if (label != null && !label.isEmpty()) json.put("label", label); if (displaySequence != null && displaySequence > 0) json.put(STR, displaySequence); if (display != null) json.put(STR, display.t... | /**
* Serialized as an object, so name is not included.
*/ | Serialized as an object, so name is not included | getJson | {
"repo_name": "CenturyLinkCloud/mdw",
"path": "mdw-common/src/com/centurylink/mdw/model/variable/Variable.java",
"license": "apache-2.0",
"size": 7654
} | [
"org.json.JSONException",
"org.json.JSONObject"
] | import org.json.JSONException; import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 2,560,065 |
private byte[] generateUserSpecifiedHash(StreamNode node, Hasher hasher) {
hasher.putString(node.getTransformationUID(), Charset.forName("UTF-8"));
return hasher.hash().asBytes();
} | byte[] function(StreamNode node, Hasher hasher) { hasher.putString(node.getTransformationUID(), Charset.forName("UTF-8")); return hasher.hash().asBytes(); } | /**
* Generates a hash from a user-specified ID.
*/ | Generates a hash from a user-specified ID | generateUserSpecifiedHash | {
"repo_name": "oscarceballos/flink-1.3.2",
"path": "flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphHasherV2.java",
"license": "apache-2.0",
"size": 10796
} | [
"com.google.common.hash.Hasher",
"java.nio.charset.Charset"
] | import com.google.common.hash.Hasher; import java.nio.charset.Charset; | import com.google.common.hash.*; import java.nio.charset.*; | [
"com.google.common",
"java.nio"
] | com.google.common; java.nio; | 558,043 |
public Stream<I> getAllItems(); | Stream<I> function(); | /**
* Retrieves a stream of the indexed items.
*
* @return a stream of all the items
*/ | Retrieves a stream of the indexed items | getAllItems | {
"repo_name": "OlafLee/RankSys",
"path": "RankSys-core/src/main/java/es/uam/eps/ir/ranksys/core/index/ItemIndex.java",
"license": "gpl-3.0",
"size": 1488
} | [
"java.util.stream.Stream"
] | import java.util.stream.Stream; | import java.util.stream.*; | [
"java.util"
] | java.util; | 2,862,855 |
@Test(expectedExceptions = NullPointerException.class)
public void testMajorPart_Null() {
MonetaryOperators.majorPart().apply(null);
} | @Test(expectedExceptions = NullPointerException.class) void function() { MonetaryOperators.majorPart().apply(null); } | /**
* Test method for
* {@link org.javamoney.moneta.function.MonetaryOperators#majorPart()}.
*/ | Test method for <code>org.javamoney.moneta.function.MonetaryOperators#majorPart()</code> | testMajorPart_Null | {
"repo_name": "msgilligan/jsr354-ri",
"path": "src/test/java/org/javamoney/moneta/function/MonetaryOperatorsTest.java",
"license": "apache-2.0",
"size": 9967
} | [
"org.testng.annotations.Test"
] | import org.testng.annotations.Test; | import org.testng.annotations.*; | [
"org.testng.annotations"
] | org.testng.annotations; | 2,620,956 |
public static PublishedItem getLastPublishedItem(LeafNode node) {
Lock itemLock = CacheFactory.getLock(ITEM_CACHE, itemCache);
try {
// NOTE: force other requests to wait for DB I/O to complete
itemLock.lock();
flushPendingItems();
} finally {
itemLock.unlock... | static PublishedItem function(LeafNode node) { Lock itemLock = CacheFactory.getLock(ITEM_CACHE, itemCache); try { itemLock.lock(); flushPendingItems(); } finally { itemLock.unlock(); } Connection con = null; PreparedStatement pstmt = null; ResultSet rs = null; PublishedItem item = null; try { con = DbConnectionManager.... | /**
* Fetches the last published item for the specified node.
*
* @param node the leaf node to load its last published items.
*/ | Fetches the last published item for the specified node | getLastPublishedItem | {
"repo_name": "derek-wang/ca.rides.openfire",
"path": "src/java/org/jivesoftware/openfire/pubsub/PubSubPersistenceManager.java",
"license": "apache-2.0",
"size": 73661
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.util.Date",
"java.util.concurrent.locks.Lock",
"org.jivesoftware.database.DbConnectionManager",
"org.jivesoftware.util.cache.CacheFactory"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.Date; import java.util.concurrent.locks.Lock; import org.jivesoftware.database.DbConnectionManager; import org.jivesoftware.util.cache.CacheFactory; | import java.sql.*; import java.util.*; import java.util.concurrent.locks.*; import org.jivesoftware.database.*; import org.jivesoftware.util.cache.*; | [
"java.sql",
"java.util",
"org.jivesoftware.database",
"org.jivesoftware.util"
] | java.sql; java.util; org.jivesoftware.database; org.jivesoftware.util; | 621,933 |
final Client client = this.getClientFromNameParam(name);
if (client == Client.NONE) {
return "redirect:/";
}
model.addAttribute("messages", this.messageService.getClientMessages(client));
return "ShowMessages";
} | final Client client = this.getClientFromNameParam(name); if (client == Client.NONE) { return STR; } model.addAttribute(STR, this.messageService.getClientMessages(client)); return STR; } | /**
* Show client's messages.
*
* @param model model that will be sent to view.
* @return view name.
*/ | Show client's messages | show | {
"repo_name": "lightstar/jobj4-clinic-web",
"path": "src/main/java/ru/lightstar/clinic/controller/message/ShowMessages.java",
"license": "gpl-3.0",
"size": 1710
} | [
"ru.lightstar.clinic.model.Client"
] | import ru.lightstar.clinic.model.Client; | import ru.lightstar.clinic.model.*; | [
"ru.lightstar.clinic"
] | ru.lightstar.clinic; | 2,037,790 |
public void invokeStatic(final Type owner, final Method method) {
invokeInsn(Opcodes.INVOKESTATIC, owner, method);
}
| void function(final Type owner, final Method method) { invokeInsn(Opcodes.INVOKESTATIC, owner, method); } | /**
* Generates the instruction to invoke a static method.
*
* @param owner the class in which the method is defined.
* @param method the method to be invoked.
*/ | Generates the instruction to invoke a static method | invokeStatic | {
"repo_name": "coolking70/aviator",
"path": "src/main/java/com/googlecode/aviator/asm/commons/GeneratorAdapter.java",
"license": "lgpl-3.0",
"size": 46627
} | [
"com.googlecode.aviator.asm.Opcodes",
"com.googlecode.aviator.asm.Type"
] | import com.googlecode.aviator.asm.Opcodes; import com.googlecode.aviator.asm.Type; | import com.googlecode.aviator.asm.*; | [
"com.googlecode.aviator"
] | com.googlecode.aviator; | 86,988 |
void setDataProvider(AbstractDataProvider<ToDoItem> data); | void setDataProvider(AbstractDataProvider<ToDoItem> data); | /**
* Sets the data provider that acts as a source of {@link ToDoItem} instances.
*/ | Sets the data provider that acts as a source of <code>ToDoItem</code> instances | setDataProvider | {
"repo_name": "ckirkendall/todomvc",
"path": "architecture-examples/gwt/src/com/todo/client/ToDoPresenter.java",
"license": "mit",
"size": 7527
} | [
"com.google.gwt.view.client.AbstractDataProvider"
] | import com.google.gwt.view.client.AbstractDataProvider; | import com.google.gwt.view.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,570,912 |
@Test(dataProvider = "testTypesAndValues")
public void testConstructor2(byte type, byte[] value)
throws Exception
{
ASN1Element element = new ASN1Element(type, value);
assertEquals(element.getType(), type);
if (value == null)
{
assertTrue(Arrays.equals(element.getValue(), new byte[0... | @Test(dataProvider = STR) void function(byte type, byte[] value) throws Exception { ASN1Element element = new ASN1Element(type, value); assertEquals(element.getType(), type); if (value == null) { assertTrue(Arrays.equals(element.getValue(), new byte[0])); } else { assertTrue(Arrays.equals(element.getValue(), value)); }... | /**
* Tests the second constructor, which takes both a type and value.
*
* @param type The type to use for the test element.
* @param value The value to use for the test element.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the second constructor, which takes both a type and value | testConstructor2 | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/asn1/ASN1ElementTestCase.java",
"license": "gpl-2.0",
"size": 23932
} | [
"com.unboundid.util.ByteStringBuffer",
"java.util.Arrays",
"org.testng.annotations.Test"
] | import com.unboundid.util.ByteStringBuffer; import java.util.Arrays; import org.testng.annotations.Test; | import com.unboundid.util.*; import java.util.*; import org.testng.annotations.*; | [
"com.unboundid.util",
"java.util",
"org.testng.annotations"
] | com.unboundid.util; java.util; org.testng.annotations; | 2,545,491 |
@Test
public void testGetAddress_1()
throws Exception {
JobRecipient fixture = new JobRecipient("", RecipientType.email);
String result = fixture.getAddress();
assertEquals("", result);
} | void function() throws Exception { JobRecipient fixture = new JobRecipient(STR", result); } | /**
* Run the String getAddress() method test.
*
* @throws Exception
*
* @generatedBy CodePro at 12/15/14 1:34 PM
*/ | Run the String getAddress() method test | testGetAddress_1 | {
"repo_name": "kevinmcgoldrick/Tank",
"path": "data_model/src/test/java/com/intuit/tank/project/JobRecipientTest.java",
"license": "epl-1.0",
"size": 5593
} | [
"com.intuit.tank.project.JobRecipient"
] | import com.intuit.tank.project.JobRecipient; | import com.intuit.tank.project.*; | [
"com.intuit.tank"
] | com.intuit.tank; | 2,781,633 |
@VisibleForTesting
static ImmutableSortedMap<String, SourcePath> convertToFlatCxxHeaders(
BuildTarget buildTarget,
Path headerPathPrefix,
Function<SourcePath, Path> sourcePathResolver,
Set<SourcePath> headerPaths) {
Set<String> includeToFile = new HashSet<String>(headerPaths.size());
... | static ImmutableSortedMap<String, SourcePath> convertToFlatCxxHeaders( BuildTarget buildTarget, Path headerPathPrefix, Function<SourcePath, Path> sourcePathResolver, Set<SourcePath> headerPaths) { Set<String> includeToFile = new HashSet<String>(headerPaths.size()); ImmutableSortedMap.Builder<String, SourcePath> builder... | /**
* Convert {@link SourcePath} to a mapping of {@code include path -> file path}.
*
* <p>{@code include path} is the path that can be referenced in {@code #include} directives.
* {@code file path} is the actual path to the file on disk.
*
* @throws HumanReadableException when two {@code SourcePath} ... | Convert <code>SourcePath</code> to a mapping of include path -> file path. include path is the path that can be referenced in #include directives. file path is the actual path to the file on disk | convertToFlatCxxHeaders | {
"repo_name": "facebook/buck",
"path": "src/com/facebook/buck/apple/AppleDescriptions.java",
"license": "apache-2.0",
"size": 51591
} | [
"com.facebook.buck.core.exceptions.HumanReadableException",
"com.facebook.buck.core.model.BuildTarget",
"com.facebook.buck.core.sourcepath.SourcePath",
"com.google.common.collect.ImmutableSortedMap",
"java.nio.file.Path",
"java.util.HashSet",
"java.util.Set",
"java.util.function.Function"
] | import com.facebook.buck.core.exceptions.HumanReadableException; import com.facebook.buck.core.model.BuildTarget; import com.facebook.buck.core.sourcepath.SourcePath; import com.google.common.collect.ImmutableSortedMap; import java.nio.file.Path; import java.util.HashSet; import java.util.Set; import java.util.function... | import com.facebook.buck.core.exceptions.*; import com.facebook.buck.core.model.*; import com.facebook.buck.core.sourcepath.*; import com.google.common.collect.*; import java.nio.file.*; import java.util.*; import java.util.function.*; | [
"com.facebook.buck",
"com.google.common",
"java.nio",
"java.util"
] | com.facebook.buck; com.google.common; java.nio; java.util; | 12,400 |
public void peaceOut(Context context) {
progUpdater.interrupt();
if (mediaPlayer != null)
mediaPlayer.release();
if (prog != null) {
prog.dismissManualProgress();
}
// assume we are going back to the card selection activity
Intent backToCardsIntent = new Intent(context, SelectCardActivity.class)... | void function(Context context) { progUpdater.interrupt(); if (mediaPlayer != null) mediaPlayer.release(); if (prog != null) { prog.dismissManualProgress(); } Intent backToCardsIntent = new Intent(context, SelectCardActivity.class); backToCardsIntent.putExtra(EXTRA_SELECTED_POS, cardPos); setResult(RESULT_OK, backToCard... | /**
* Gracefully exits the activity, freeing up the resources as it goes out.
*
* @param context
* The activity context in which this is called.
*/ | Gracefully exits the activity, freeing up the resources as it goes out | peaceOut | {
"repo_name": "ameijer/TellMeMore_repo",
"path": "TellMeMore/src/com/google/android/glass/TMM/AudioPlayer.java",
"license": "bsd-2-clause",
"size": 16747
} | [
"android.content.Context",
"android.content.Intent"
] | import android.content.Context; import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 1,753,291 |
@Test
public void testString2Int_2() {
try {
Message message = senderSession.createMessage();
message.setStringProperty("pi", "3.14159");
message.getIntProperty("pi");
Assert.fail("sec. 3.5.4 The String to numeric conversions must throw the java.lang.NumberFormatException... | void function() { try { Message message = senderSession.createMessage(); message.setStringProperty("pi", STR); message.getIntProperty("pi"); Assert.fail(STR + STR); } catch (java.lang.NumberFormatException e) { } catch (JMSException e) { fail(e); } } | /**
* if a property is set as a <code>java.lang.String</code>,
* to get it as a <code>int</code> throws a <code>java.lang.NuberFormatException</code>
* if the <code>String</code> is not a correct representation for a <code>int</code>
* (e.g. <code>"3.14159"</code>).
*/ | if a property is set as a <code>java.lang.String</code>, to get it as a <code>int</code> throws a <code>java.lang.NuberFormatException</code> if the <code>String</code> is not a correct representation for a <code>int</code> (e.g. <code>"3.14159"</code>) | testString2Int_2 | {
"repo_name": "cshannon/activemq-artemis",
"path": "tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/message/properties/MessagePropertyConversionTest.java",
"license": "apache-2.0",
"size": 43771
} | [
"javax.jms.JMSException",
"javax.jms.Message",
"org.junit.Assert"
] | import javax.jms.JMSException; import javax.jms.Message; import org.junit.Assert; | import javax.jms.*; import org.junit.*; | [
"javax.jms",
"org.junit"
] | javax.jms; org.junit; | 11,410 |
protected HSSFWorkbook getTemplateSource(String url, HttpServletRequest request) throws Exception {
LocalizedResourceHelper helper = new LocalizedResourceHelper(getApplicationContext());
Locale userLocale = RequestContextUtils.getLocale(request);
Resource inputFile = helper.findLocalizedResource(url, EXTENSION... | HSSFWorkbook function(String url, HttpServletRequest request) throws Exception { LocalizedResourceHelper helper = new LocalizedResourceHelper(getApplicationContext()); Locale userLocale = RequestContextUtils.getLocale(request); Resource inputFile = helper.findLocalizedResource(url, EXTENSION, userLocale); if (logger.is... | /**
* Creates the workbook from an existing XLS document.
* @param url the URL of the Excel template without localization part nor extension
* @param request current HTTP request
* @return the HSSFWorkbook
* @throws Exception in case of failure
*/ | Creates the workbook from an existing XLS document | getTemplateSource | {
"repo_name": "kingtang/spring-learn",
"path": "spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractExcelView.java",
"license": "gpl-3.0",
"size": 7230
} | [
"java.util.Locale",
"javax.servlet.http.HttpServletRequest",
"org.apache.poi.hssf.usermodel.HSSFWorkbook",
"org.apache.poi.poifs.filesystem.POIFSFileSystem",
"org.springframework.core.io.Resource",
"org.springframework.core.io.support.LocalizedResourceHelper",
"org.springframework.web.servlet.support.Re... | import java.util.Locale; import javax.servlet.http.HttpServletRequest; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.poifs.filesystem.POIFSFileSystem; import org.springframework.core.io.Resource; import org.springframework.core.io.support.LocalizedResourceHelper; import org.springframework.we... | import java.util.*; import javax.servlet.http.*; import org.apache.poi.hssf.usermodel.*; import org.apache.poi.poifs.filesystem.*; import org.springframework.core.io.*; import org.springframework.core.io.support.*; import org.springframework.web.servlet.support.*; | [
"java.util",
"javax.servlet",
"org.apache.poi",
"org.springframework.core",
"org.springframework.web"
] | java.util; javax.servlet; org.apache.poi; org.springframework.core; org.springframework.web; | 2,690,257 |
// take default Eclipse formatting options
@SuppressWarnings("unchecked")
Map<String, String> options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
// initialize the compiler settings to be able to format 1.7 code
options.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_7);
options.put(J... | @SuppressWarnings(STR) Map<String, String> options = DefaultCodeFormatterConstants.getEclipseDefaultSettings(); options.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_7); options.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_7); options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_7); opti... | /**
* From http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jdt.doc
* .isv%2Freference%2Fapi%2Forg%2Feclipse%2F jdt%2Fcore%2Fformatter%2Fpackage-summary.html
*
* @param source
* The raw java source code to format.
* @return Formatted java code.
*/ | From HREF .isv%2Freference%2Fapi%2Forg%2Feclipse%2F jdt%2Fcore%2Fformatter%2Fpackage-summary.html | formatJavaCode | {
"repo_name": "SiriusLab/SiriusAnimator",
"path": "trace/commons/plugins/org.eclipse.gemoc.trace.commons/src/org/eclipse/gemoc/trace/commons/CodeGenUtil.java",
"license": "epl-1.0",
"size": 2774
} | [
"java.util.Map",
"org.eclipse.jdt.core.JavaCore",
"org.eclipse.jdt.core.ToolFactory",
"org.eclipse.jdt.core.formatter.CodeFormatter",
"org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants",
"org.eclipse.jface.text.Document",
"org.eclipse.jface.text.IDocument",
"org.eclipse.text.edits.Malformed... | import java.util.Map; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.ToolFactory; import org.eclipse.jdt.core.formatter.CodeFormatter; import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants; import org.eclipse.jface.text.Document; import org.eclipse.jface.text.IDocument; import org.eclip... | import java.util.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.core.formatter.*; import org.eclipse.jface.text.*; import org.eclipse.text.edits.*; | [
"java.util",
"org.eclipse.jdt",
"org.eclipse.jface",
"org.eclipse.text"
] | java.util; org.eclipse.jdt; org.eclipse.jface; org.eclipse.text; | 832,204 |
private List<Index2D> buildUnlockPairs() {
final List<Index2D> unlocks = new ArrayList<>(levels.size());
for(int i=0; i<levels.size(); i++) {
for(int j=i+1; j<levels.size(); j++) {
if(levels.get(i).getLevelID() + 1 == levels.get(j).getLevelID()) {
unlocks.add(new Index2D(i, j));
} else {
... | List<Index2D> function() { final List<Index2D> unlocks = new ArrayList<>(levels.size()); for(int i=0; i<levels.size(); i++) { for(int j=i+1; j<levels.size(); j++) { if(levels.get(i).getLevelID() + 1 == levels.get(j).getLevelID()) { unlocks.add(new Index2D(i, j)); } else { break; } } } return unlocks; } | /**
* Computes the list of pairs of indices (i, j) such
* that the ith Level unlocks the jth Level.
*/ | Computes the list of pairs of indices (i, j) such that the ith Level unlocks the jth Level | buildUnlockPairs | {
"repo_name": "j-rock/invade",
"path": "src/com/fourthrock/invade/game/levels/LevelMap.java",
"license": "gpl-2.0",
"size": 2871
} | [
"com.fourthrock.invade.util.Index2D",
"java.util.ArrayList",
"java.util.List"
] | import com.fourthrock.invade.util.Index2D; import java.util.ArrayList; import java.util.List; | import com.fourthrock.invade.util.*; import java.util.*; | [
"com.fourthrock.invade",
"java.util"
] | com.fourthrock.invade; java.util; | 598,933 |
public static final Parcelable.Creator<RectF> CREATOR = new Parcelable.Creator<RectF>() {
public RectF createFromParcel(Parcel in) {
RectF r = new RectF();
r.readFromParcel(in);
return r;
} | static final Parcelable.Creator<RectF> CREATOR = new Parcelable.Creator<RectF>() { public RectF function(Parcel in) { RectF r = new RectF(); r.readFromParcel(in); return r; } | /**
* Return a new rectangle from the data in the specified parcel.
*/ | Return a new rectangle from the data in the specified parcel | createFromParcel | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/android/graphics/RectF.java",
"license": "apache-2.0",
"size": 21081
} | [
"android.os.Parcel",
"android.os.Parcelable"
] | import android.os.Parcel; import android.os.Parcelable; | import android.os.*; | [
"android.os"
] | android.os; | 2,317,734 |
public void keyPressed(KeyEvent e) {
if(!estaTeclaPulsada(e.getKeyCode()))
teclasPulsadas.add(e.getKeyCode());
} | void function(KeyEvent e) { if(!estaTeclaPulsada(e.getKeyCode())) teclasPulsadas.add(e.getKeyCode()); } | /**
* Captura la tecla pulsada
*
* @param e the eventhandler opbect
*/ | Captura la tecla pulsada | keyPressed | {
"repo_name": "jj-gallardo/swgEngine",
"path": "src/engine/input/EntradaTeclado.java",
"license": "gpl-2.0",
"size": 1576
} | [
"java.awt.event.KeyEvent"
] | import java.awt.event.KeyEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,735,668 |
public static Vec3d applyTo(Vec3d u, double q0, double q1, double q2, double q3)
{
double x = u.xCoord;
double y = u.yCoord;
double z = u.zCoord;
double s = q1 * x + q2 * y + q3 * z;
return new Vec3d(2 * (q0 * (x * q0 - (q2 * z - q3 * y)) + s * q1) - x,
2 * (q0 * (y * q0 - (q3 * x - q1 * z)) + s *... | static Vec3d function(Vec3d u, double q0, double q1, double q2, double q3) { double x = u.xCoord; double y = u.yCoord; double z = u.zCoord; double s = q1 * x + q2 * y + q3 * z; return new Vec3d(2 * (q0 * (x * q0 - (q2 * z - q3 * y)) + s * q1) - x, 2 * (q0 * (y * q0 - (q3 * x - q1 * z)) + s * q2) - y, 2 * (q0 * (z * q0 ... | /** Apply the rotation to a vector.
* @param u vector to apply the rotation to
* @return a new vector which is the image of u by the rotation
*/ | Apply the rotation to a vector | applyTo | {
"repo_name": "CHeuberger/TFC2",
"path": "src/API/com/bioxx/tfc2/api/util/Helper.java",
"license": "gpl-3.0",
"size": 4676
} | [
"net.minecraft.util.math.Vec3d"
] | import net.minecraft.util.math.Vec3d; | import net.minecraft.util.math.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 1,984,370 |
private ImmutableList<SqlNode> getGroupExprs() {
if (distinct) {
// Cannot compute this in the constructor: select list has not been
// expanded yet.
assert select.isDistinct();
// Remove the AS operator so the expressions are consistent with
// OrderExpressionExpander.
Immuta... | ImmutableList<SqlNode> function() { if (distinct) { assert select.isDistinct(); ImmutableList.Builder<SqlNode> groupExprs = ImmutableList.builder(); final SelectScope selectScope = (SelectScope) parent; for (SqlNode selectItem : selectScope.getExpandedSelectList()) { groupExprs.add(stripAs(selectItem)); } return groupE... | /**
* Returns the expressions that are in the GROUP BY clause (or the SELECT
* DISTINCT clause, if distinct) and that can therefore be referenced
* without being wrapped in aggregate functions.
*
* <p>The expressions are fully-qualified, and any "*" in select clauses are
* expanded.
*
* @return ... | Returns the expressions that are in the GROUP BY clause (or the SELECT DISTINCT clause, if distinct) and that can therefore be referenced without being wrapped in aggregate functions. The expressions are fully-qualified, and any "*" in select clauses are expanded | getGroupExprs | {
"repo_name": "YrAuYong/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/sql/validate/AggregatingSelectScope.java",
"license": "apache-2.0",
"size": 9823
} | [
"com.google.common.collect.ImmutableList",
"org.apache.calcite.sql.SqlNode"
] | import com.google.common.collect.ImmutableList; import org.apache.calcite.sql.SqlNode; | import com.google.common.collect.*; import org.apache.calcite.sql.*; | [
"com.google.common",
"org.apache.calcite"
] | com.google.common; org.apache.calcite; | 2,279,091 |
public static void appendDeep(StringBuilder b, Object o) {
if (o == null) {
b.append((Object) null);
return;
}
if (o.getClass().isArray()) {
int l = Array.getLength(o);
b.append("[");
for (int i = 0; i < l; i++) {
i... | static void function(StringBuilder b, Object o) { if (o == null) { b.append((Object) null); return; } if (o.getClass().isArray()) { int l = Array.getLength(o); b.append("["); for (int i = 0; i < l; i++) { if (i > 0) b.append(STR); appendDeep(b, Array.get(o, i)); } b.append("]"); return; } b.append(o); } | /**
* <p>Appends an object, deeply appending arrays</p>
*
* @param b The target
* @param o The object
*/ | Appends an object, deeply appending arrays | appendDeep | {
"repo_name": "Institute-Web-Science-and-Technologies/LiveGovWP1",
"path": "mobile/SensorCollectorProject/SensorCollectorLibrary/src/main/java/eu/liveandgov/wp1/sensor_collector/util/MoraStrings.java",
"license": "mit",
"size": 1871
} | [
"java.lang.reflect.Array"
] | import java.lang.reflect.Array; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 303,668 |
public DayCount getFixedLegDayCount() {
return _fixedLegDayCount;
} | DayCount function() { return _fixedLegDayCount; } | /**
* Gets the _fixedLegDayCount field.
*
* @return the _fixedLegDayCount
*/ | Gets the _fixedLegDayCount field | getFixedLegDayCount | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/instrument/index/GeneratorSwapFixedInflationYearOnYear.java",
"license": "apache-2.0",
"size": 8848
} | [
"com.opengamma.financial.convention.daycount.DayCount"
] | import com.opengamma.financial.convention.daycount.DayCount; | import com.opengamma.financial.convention.daycount.*; | [
"com.opengamma.financial"
] | com.opengamma.financial; | 1,465,518 |
private void addOption(StringBuilder sb, Object value, Object disp) {
String dispValue = (String) disp;
if (dispValue != null && dispValue.startsWith("message:")) {
String temp = dispValue.substring("message:".length());
Locale locale = localeResolver.resolveLocale((HttpServletRequest) pageContext.getReque... | void function(StringBuilder sb, Object value, Object disp) { String dispValue = (String) disp; if (dispValue != null && dispValue.startsWith(STR)) { String temp = dispValue.substring(STR.length()); Locale locale = localeResolver.resolveLocale((HttpServletRequest) pageContext.getRequest()); if (locale != null) { disp = ... | /**
* Adds the option.
*
* @param sb
* the sb
* @param value
* the value
* @param disp
* the disp
*/ | Adds the option | addOption | {
"repo_name": "8090boy/gomall.la",
"path": "legendshop_core/src/java/com/legendshop/core/tag/OptionGroupTag.java",
"license": "apache-2.0",
"size": 12408
} | [
"com.legendshop.core.helper.ResourceBundleHelper",
"java.util.Locale",
"javax.servlet.http.HttpServletRequest"
] | import com.legendshop.core.helper.ResourceBundleHelper; import java.util.Locale; import javax.servlet.http.HttpServletRequest; | import com.legendshop.core.helper.*; import java.util.*; import javax.servlet.http.*; | [
"com.legendshop.core",
"java.util",
"javax.servlet"
] | com.legendshop.core; java.util; javax.servlet; | 1,557,685 |
public Scan withStopRow(byte[] stopRow, boolean inclusive) {
if (Bytes.len(stopRow) > HConstants.MAX_ROW_LENGTH) {
throw new IllegalArgumentException("stopRow's length must be less than or equal to "
+ HConstants.MAX_ROW_LENGTH + " to meet the criteria" + " for a row key.");
}
this.stopRow... | Scan function(byte[] stopRow, boolean inclusive) { if (Bytes.len(stopRow) > HConstants.MAX_ROW_LENGTH) { throw new IllegalArgumentException(STR + HConstants.MAX_ROW_LENGTH + STR + STR); } this.stopRow = stopRow; this.includeStopRow = inclusive; return this; } /** * <p>Set a filter (using stopRow and startRow) so the re... | /**
* Set the stop row of the scan.
* <p>
* The scan will include rows that are lexicographically less than (or equal to if
* {@code inclusive} is {@code true}) the provided stopRow.
* @param stopRow row to end at
* @param inclusive whether we should include the stop row when scan
* @return this
... | Set the stop row of the scan. The scan will include rows that are lexicographically less than (or equal to if inclusive is true) the provided stopRow | withStopRow | {
"repo_name": "vincentpoon/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java",
"license": "apache-2.0",
"size": 42336
} | [
"org.apache.hadoop.hbase.HConstants",
"org.apache.hadoop.hbase.util.Bytes"
] | import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.util.Bytes; | import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,031,426 |
public String getGroupId(int applicationId) throws APIManagementException {
String grpId = "";
ArrayList<String> grpIdList = new ArrayList<String>();
PreparedStatement preparedStatement = null;
Connection conn = null;
ResultSet resultSet = null;
String sqlQuery = SQL... | String function(int applicationId) throws APIManagementException { String grpId = STRGROUP_IDSTR,STRFailed to Retrieve GroupId for application " + applicationId, e); } finally { APIMgtDBUtil.closeAllConnections(preparedStatement, conn, resultSet); } return grpId; } | /**
* Fetches all the groups for a given application and creates a single string separated by comma
*
* @param applicationId
* @return comma separated group Id String
* @throws APIManagementException
*/ | Fetches all the groups for a given application and creates a single string separated by comma | getGroupId | {
"repo_name": "Rajith90/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java",
"license": "apache-2.0",
"size": 811404
} | [
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil"
] | import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil; | import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 1,773,062 |
public void initActivity(Body body) {
thisStub = (CronPolicy) PAActiveObject.getStubOnThis();
} | void function(Body body) { thisStub = (CronPolicy) PAActiveObject.getStubOnThis(); } | /**
* Initializes stub to this active object
*/ | Initializes stub to this active object | initActivity | {
"repo_name": "marcocast/scheduling",
"path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/nodesource/policy/CronPolicy.java",
"license": "agpl-3.0",
"size": 5347
} | [
"org.objectweb.proactive.Body",
"org.objectweb.proactive.api.PAActiveObject"
] | import org.objectweb.proactive.Body; import org.objectweb.proactive.api.PAActiveObject; | import org.objectweb.proactive.*; import org.objectweb.proactive.api.*; | [
"org.objectweb.proactive"
] | org.objectweb.proactive; | 1,484,973 |
public static Element createDSctx(Document doc, String prefix, String namespace) {
if ((prefix == null) || (prefix.trim().length() == 0)) {
throw new IllegalArgumentException("You must supply a prefix");
}
Element ctx = doc.createElementNS(null, "namespaceContext");
ctx... | static Element function(Document doc, String prefix, String namespace) { if ((prefix == null) (prefix.trim().length() == 0)) { throw new IllegalArgumentException(STR); } Element ctx = doc.createElementNS(null, STR); ctx.setAttributeNS(Constants.NamespaceSpecNS, STR + prefix.trim(), namespace); return ctx; } | /**
* Method createDSctx
*
* @param doc
* @param prefix
* @param namespace
* @return the element.
*/ | Method createDSctx | createDSctx | {
"repo_name": "isaacl/openjdk-jdk",
"path": "src/share/classes/com/sun/org/apache/xml/internal/security/utils/XMLUtils.java",
"license": "gpl-2.0",
"size": 35599
} | [
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import org.w3c.dom.Document; import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,642,717 |
public DBCache getDbCache() {
return dbCache;
} | DBCache function() { return dbCache; } | /**
* Gets the database cache object.
*
* @return the database cache object.
*/ | Gets the database cache object | getDbCache | {
"repo_name": "Advent51/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/TransMeta.java",
"license": "apache-2.0",
"size": 225587
} | [
"org.pentaho.di.core.DBCache"
] | import org.pentaho.di.core.DBCache; | import org.pentaho.di.core.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,713,037 |
public static String getCMDOutputString(String[] args) {
try {
ProcessBuilder cmd = new ProcessBuilder(args);
Process process = cmd.start();
InputStream in = process.getInputStream();
StringBuilder sb = new StringBuilder();
byte[] re = new byte[64]... | static String function(String[] args) { try { ProcessBuilder cmd = new ProcessBuilder(args); Process process = cmd.start(); InputStream in = process.getInputStream(); StringBuilder sb = new StringBuilder(); byte[] re = new byte[64]; int len; while ((len = in.read(re)) != -1) { sb.append(new String(re, 0, len)); } in.cl... | /**
* Get command output string.
*/ | Get command output string | getCMDOutputString | {
"repo_name": "jeasinlee/AndroidBasicLibs",
"path": "common/src/main/java/cn/wwah/common/system/CpuUtil.java",
"license": "mit",
"size": 5464
} | [
"cn.wwah.common.JLog",
"java.io.IOException",
"java.io.InputStream"
] | import cn.wwah.common.JLog; import java.io.IOException; import java.io.InputStream; | import cn.wwah.common.*; import java.io.*; | [
"cn.wwah.common",
"java.io"
] | cn.wwah.common; java.io; | 2,544,299 |
public boolean isUserAllowedInAdhocGroup(String userId, String permissionConstant, String evalGroupId) {
boolean allowed = false;
if ( (Boolean) settings.get(EvalSettings.ENABLE_ADHOC_GROUPS) ) {
// passthrough to the dao method
allowed = dao.isUserAllowedInAdhocGroup(userId, permission... | boolean function(String userId, String permissionConstant, String evalGroupId) { boolean allowed = false; if ( (Boolean) settings.get(EvalSettings.ENABLE_ADHOC_GROUPS) ) { allowed = dao.isUserAllowedInAdhocGroup(userId, permissionConstant, evalGroupId); } return allowed; } | /**
* Check if a user has a specified permission/role within an adhoc group
*
* @param userId the internal user id (not username)
* @param permission a permission string PERM constant (from this API),
* <b>Note</b>: only take evaluation and be evaluated are supported
* @param evalGroupId the un... | Check if a user has a specified permission/role within an adhoc group | isUserAllowedInAdhocGroup | {
"repo_name": "payten/nyu-sakai-10.4",
"path": "evaluation/impl/src/java/org/sakaiproject/evaluation/dao/EvalAdhocSupportImpl.java",
"license": "apache-2.0",
"size": 12976
} | [
"org.sakaiproject.evaluation.logic.EvalSettings"
] | import org.sakaiproject.evaluation.logic.EvalSettings; | import org.sakaiproject.evaluation.logic.*; | [
"org.sakaiproject.evaluation"
] | org.sakaiproject.evaluation; | 973,409 |
public static <T> boolean any(
Iterable<T> iterable, Predicate<? super T> predicate) {
return Iterators.any(iterable.iterator(), predicate);
} | static <T> boolean function( Iterable<T> iterable, Predicate<? super T> predicate) { return Iterators.any(iterable.iterator(), predicate); } | /**
* Returns {@code true} if any element in {@code iterable} satisfies the predicate.
*/ | Returns true if any element in iterable satisfies the predicate | any | {
"repo_name": "sensui/guava-libraries",
"path": "guava/src/com/google/common/collect/Iterables.java",
"license": "apache-2.0",
"size": 37377
} | [
"com.google.common.base.Predicate"
] | import com.google.common.base.Predicate; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,123,740 |
public List<String> getRow() {
if (rowData == null) {
try {
rowData = getOrderedRowDataAsStrings();
// replace null values if attribute was not defined
for (int i = 0; i < rowData.size(); i++) {
if (r... | List<String> function() { if (rowData == null) { try { rowData = getOrderedRowDataAsStrings(); for (int i = 0; i < rowData.size(); i++) { if (rowData.get(i) == null) { rowData.set(i, STRReportGenerator.errList.coreExceptionWhileGenRptRowSTRCore exception while generating row data for artifact report.", ex); rowData = C... | /**
* Get the values for each row in the table report.
*/ | Get the values for each row in the table report | getRow | {
"repo_name": "maxrp/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java",
"license": "apache-2.0",
"size": 105736
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,804,224 |
Map handleList(HttpServletRequest request, HttpServletResponse reponse);
| Map handleList(HttpServletRequest request, HttpServletResponse reponse); | /**
* Handles a request to list all scaffolded instances
* @param request
* @param reponse
* @return Optionally a map which represents the generated model
*/ | Handles a request to list all scaffolded instances | handleList | {
"repo_name": "lpicanco/grails",
"path": "src/commons/org/codehaus/groovy/grails/scaffolding/ScaffoldRequestHandler.java",
"license": "apache-2.0",
"size": 3192
} | [
"java.util.Map",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.util.*; import javax.servlet.http.*; | [
"java.util",
"javax.servlet"
] | java.util; javax.servlet; | 364,652 |
public void decBlogCommentCount() throws JSONException, RepositoryException {
final JSONObject statistic = statisticRepository.get(Statistic.STATISTIC);
if (null == statistic) {
throw new RepositoryException("Not found statistic");
}
statistic.put(Statistic.STATI... | void function() throws JSONException, RepositoryException { final JSONObject statistic = statisticRepository.get(Statistic.STATISTIC); if (null == statistic) { throw new RepositoryException(STR); } statistic.put(Statistic.STATISTIC_BLOG_COMMENT_COUNT, statistic.getInt(Statistic.STATISTIC_BLOG_COMMENT_COUNT) - 1); stati... | /**
* Blog statistic comment count -1.
*
* @throws JSONException json exception
* @throws RepositoryException repository exception
*/ | Blog statistic comment count -1 | decBlogCommentCount | {
"repo_name": "446541492/solo",
"path": "src/main/java/org/b3log/solo/service/StatisticMgmtService.java",
"license": "apache-2.0",
"size": 14248
} | [
"org.b3log.latke.repository.RepositoryException",
"org.b3log.solo.model.Statistic",
"org.json.JSONException",
"org.json.JSONObject"
] | import org.b3log.latke.repository.RepositoryException; import org.b3log.solo.model.Statistic; import org.json.JSONException; import org.json.JSONObject; | import org.b3log.latke.repository.*; import org.b3log.solo.model.*; import org.json.*; | [
"org.b3log.latke",
"org.b3log.solo",
"org.json"
] | org.b3log.latke; org.b3log.solo; org.json; | 280,336 |
private void testEverything() throws SQLException {
for (int c = 0; c < 2; c++) {
if (c == 0) {
cipher = null;
} else {
cipher = "AES";
}
for (int a = 0; a < 64; a++) {
smallLog = (a & 1) != 0;
bi... | void function() throws SQLException { for (int c = 0; c < 2; c++) { if (c == 0) { cipher = null; } else { cipher = "AES"; } for (int a = 0; a < 64; a++) { smallLog = (a & 1) != 0; big = (a & 2) != 0; networked = (a & 4) != 0; memory = (a & 8) != 0; ssl = (a & 16) != 0; diskResult = (a & 32) != 0; for (int trace = 0; tr... | /**
* Run all tests in all possible combinations.
*/ | Run all tests in all possible combinations | testEverything | {
"repo_name": "paulnguyen/data",
"path": "sqldbs/h2java/src/test/org/h2/test/TestAll.java",
"license": "apache-2.0",
"size": 33821
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 935,756 |
public static FolderConfiguration createConfig(
int size1,
int size2,
ScreenSize screenSize,
ScreenRatio screenRatio,
ScreenOrientation orientation,
Density density,
TouchScreen touchScreen,
KeyboardState keyboardState,
... | static FolderConfiguration function( int size1, int size2, ScreenSize screenSize, ScreenRatio screenRatio, ScreenOrientation orientation, Density density, TouchScreen touchScreen, KeyboardState keyboardState, Keyboard keyboard, NavigationState navigationState, Navigation navigation, int apiLevel) { FolderConfiguration ... | /**
* Creates a config. This must be a valid config like a device would return. This is to
* prevent issues where some resources don't exist in all cases and not in the default
* (for instance only available in hdpi and mdpi but not in default).
*
* @param size1
* @param size2
* @para... | Creates a config. This must be a valid config like a device would return. This is to prevent issues where some resources don't exist in all cases and not in the default (for instance only available in hdpi and mdpi but not in default) | createConfig | {
"repo_name": "consulo/consulo-android",
"path": "tools-base/layoutlib-api/sample/src/com/example/android/render/RenderServiceFactory.java",
"license": "apache-2.0",
"size": 13028
} | [
"com.android.ide.common.resources.configuration.DensityQualifier",
"com.android.ide.common.resources.configuration.FolderConfiguration",
"com.android.ide.common.resources.configuration.KeyboardStateQualifier",
"com.android.ide.common.resources.configuration.NavigationMethodQualifier",
"com.android.ide.commo... | import com.android.ide.common.resources.configuration.DensityQualifier; import com.android.ide.common.resources.configuration.FolderConfiguration; import com.android.ide.common.resources.configuration.KeyboardStateQualifier; import com.android.ide.common.resources.configuration.NavigationMethodQualifier; import com.and... | import com.android.ide.common.resources.configuration.*; import com.android.resources.*; | [
"com.android.ide",
"com.android.resources"
] | com.android.ide; com.android.resources; | 1,199,347 |
private void initialize() {
frame = new JFrame();
frame.setBounds(100, 100, 782, 601);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
JLabel lblWelcomeToThe = new JLabel("Welcome to the student management system");
lblWelcomeToThe.setBounds(251, 24... | void function() { frame = new JFrame(); frame.setBounds(100, 100, 782, 601); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(null); JLabel lblWelcomeToThe = new JLabel(STR); lblWelcomeToThe.setBounds(251, 24, 249, 14); frame.getContentPane().add(lblWelcomeToThe); JMenuBar menuBar ... | /**
* Initialize the contents of the frame.
*/ | Initialize the contents of the frame | initialize | {
"repo_name": "Tibblist/Tests",
"path": "personnelManagement/src/personnelManagement/Menu.java",
"license": "gpl-3.0",
"size": 2064
} | [
"javax.swing.JFrame",
"javax.swing.JLabel",
"javax.swing.JMenuBar"
] | import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenuBar; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,181,167 |
public void setSessionFactory(final SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
} | void function(final SessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } | /**
* Asigna un sessionFactory para ser usado de ahora en mas para obtener
* sessiones y mantener transacciones
*
* @param sessionFactory
*/ | Asigna un sessionFactory para ser usado de ahora en mas para obtener sessiones y mantener transacciones | setSessionFactory | {
"repo_name": "fpuna-cia/karaku",
"path": "src/main/java/py/una/pol/karaku/dao/impl/BaseDAOImpl.java",
"license": "lgpl-2.1",
"size": 14009
} | [
"org.hibernate.SessionFactory"
] | import org.hibernate.SessionFactory; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 474,719 |
private static <T> int find(T[] arr, T val, int bnd, int l, int r, Comparator<T> c) {
int m = l;
int d = 1;
while (m <= r) {
if (c.compare(val, arr[m]) > bnd) {
l = m + 1;
} else {
r = m - 1;
break;
}
m += d;
d <<= 1;
}
while (l <= r) {
m... | static <T> int function(T[] arr, T val, int bnd, int l, int r, Comparator<T> c) { int m = l; int d = 1; while (m <= r) { if (c.compare(val, arr[m]) > bnd) { l = m + 1; } else { r = m - 1; break; } m += d; d <<= 1; } while (l <= r) { m = (l + r) >>> 1; if (c.compare(val, arr[m]) > bnd) { l = m + 1; } else { r = m - 1; }... | /**
* Finds the place of specified range of specified sorted array, where the
* element should be inserted for getting sorted array. Uses exponential
* search algorithm.
*
* @param arr
* - the array with already sorted range
* @param val
* - object to be inserted
* @param l... | Finds the place of specified range of specified sorted array, where the element should be inserted for getting sorted array. Uses exponential search algorithm | find | {
"repo_name": "amikey/zongtui-classifier",
"path": "src/main/java/com/zongtui/classifier/math/Sorting.java",
"license": "mit",
"size": 68793
} | [
"java.util.Comparator"
] | import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 2,368,450 |
public Writer getPageConfigurationWriter(String path) throws Exception;
| Writer function(String path) throws Exception; | /**
* Get a page configuration writer for the page at the specified
* path. This method may throw an UnsupportedOperationException if
* the PageManager implementation does not provide for updating
* a page's configuration.
*
* @param path The page path
* @return The Writer
... | Get a page configuration writer for the page at the specified path. This method may throw an UnsupportedOperationException if the PageManager implementation does not provide for updating a page's configuration | getPageConfigurationWriter | {
"repo_name": "florinpatrascu/jpublish",
"path": "java/src/org/jpublish/PageManager.java",
"license": "apache-2.0",
"size": 4794
} | [
"java.io.Writer"
] | import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 1,061,675 |
void iconify() throws IOException; | void iconify() throws IOException; | /**
* Iconifies the terminal, this likely means minimizing the window with most window managers
* @throws IOException If the was an underlying I/O error
*/ | Iconifies the terminal, this likely means minimizing the window with most window managers | iconify | {
"repo_name": "nbzwt/lanterna",
"path": "src/main/java/com/googlecode/lanterna/terminal/ExtendedTerminal.java",
"license": "lgpl-3.0",
"size": 4438
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 537,360 |
private List<Advisory> legacyAnalysis(final File file, Dependency dependency, Map<String, String> dependencyMap)
throws AnalysisException {
try (JsonReader jsonReader = Json.createReader(FileUtils.openInputStream(file))) {
// Retrieves the contents of package-lock.json from the Dep... | List<Advisory> function(final File file, Dependency dependency, Map<String, String> dependencyMap) throws AnalysisException { try (JsonReader jsonReader = Json.createReader(FileUtils.openInputStream(file))) { final JsonObject packageJson = jsonReader.readObject(); final String projectName = packageJson.getString("name"... | /**
* Analyzes the package and package-lock files by extracting dependency
* information, creating a payload to submit to the npm audit API,
* submitting the payload, and returning the identified advisories.
*
* @param file a reference to the package-lock.json
* @param dependency a referen... | Analyzes the package and package-lock files by extracting dependency information, creating a payload to submit to the npm audit API, submitting the payload, and returning the identified advisories | legacyAnalysis | {
"repo_name": "stefanneuhaus/DependencyCheck",
"path": "core/src/main/java/org/owasp/dependencycheck/analyzer/NodeAuditAnalyzer.java",
"license": "apache-2.0",
"size": 16885
} | [
"java.io.File",
"java.util.List",
"java.util.Map",
"javax.json.Json",
"javax.json.JsonObject",
"javax.json.JsonReader",
"org.apache.commons.io.FileUtils",
"org.owasp.dependencycheck.analyzer.exception.AnalysisException",
"org.owasp.dependencycheck.data.nodeaudit.Advisory",
"org.owasp.dependencyche... | import java.io.File; import java.util.List; import java.util.Map; import javax.json.Json; import javax.json.JsonObject; import javax.json.JsonReader; import org.apache.commons.io.FileUtils; import org.owasp.dependencycheck.analyzer.exception.AnalysisException; import org.owasp.dependencycheck.data.nodeaudit.Advisory; i... | import java.io.*; import java.util.*; import javax.json.*; import org.apache.commons.io.*; import org.owasp.dependencycheck.analyzer.exception.*; import org.owasp.dependencycheck.data.nodeaudit.*; import org.owasp.dependencycheck.dependency.*; | [
"java.io",
"java.util",
"javax.json",
"org.apache.commons",
"org.owasp.dependencycheck"
] | java.io; java.util; javax.json; org.apache.commons; org.owasp.dependencycheck; | 745,341 |
public Builder addRootSymlinks(NestedSet<SymlinkEntry> symlinks) {
rootSymlinksBuilder.addTransitive(symlinks);
return this;
} | Builder function(NestedSet<SymlinkEntry> symlinks) { rootSymlinksBuilder.addTransitive(symlinks); return this; } | /**
* Adds several root symlinks as a NestedSet.
*/ | Adds several root symlinks as a NestedSet | addRootSymlinks | {
"repo_name": "twitter-forks/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java",
"license": "apache-2.0",
"size": 45422
} | [
"com.google.devtools.build.lib.collect.nestedset.NestedSet"
] | import com.google.devtools.build.lib.collect.nestedset.NestedSet; | import com.google.devtools.build.lib.collect.nestedset.*; | [
"com.google.devtools"
] | com.google.devtools; | 595,776 |
private Object writeReplace() {
return new DataTransferObject(compiler.getFreeParameters(), compiler.getOrder(), data);
}
private static class DataTransferObject implements Serializable {
private static final long serialVersionUID = 20120730L;
private final ... | Object function() { return new DataTransferObject(compiler.getFreeParameters(), compiler.getOrder(), data); } private static class DataTransferObject implements Serializable { private static final long serialVersionUID = 20120730L; private final int variables; private final int order; private final double[] data; publi... | /**
* Replace the instance with a data transfer object for serialization.
* @return data transfer object that will be serialized
*/ | Replace the instance with a data transfer object for serialization | writeReplace | {
"repo_name": "SpoonLabs/astor",
"path": "examples/math_5/src/main/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructure.java",
"license": "gpl-2.0",
"size": 43085
} | [
"java.io.Serializable"
] | import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 2,072,474 |
public int setSELinux(User loggedInUser, String ksLabel, String enforcingMode) {
ensureConfigAdmin(loggedInUser);
SystemDetailsCommand command = getSystemDetailsCommand(ksLabel, loggedInUser);
command.setMode(SELinuxMode.lookup(enforcingMode));
return setRemoteCommandsFlag(loggedInU... | int function(User loggedInUser, String ksLabel, String enforcingMode) { ensureConfigAdmin(loggedInUser); SystemDetailsCommand command = getSystemDetailsCommand(ksLabel, loggedInUser); command.setMode(SELinuxMode.lookup(enforcingMode)); return setRemoteCommandsFlag(loggedInUser, ksLabel, true); } | /**
* Sets the SELinux enforcing mode property of a kickstart profile
* so that a system created using this profile will be have
* the appropriate SELinux enforcing mode.
* @param loggedInUser The current user
* @param ksLabel the ks profile label
* @param enforcingMode the SELinux enforci... | Sets the SELinux enforcing mode property of a kickstart profile so that a system created using this profile will be have the appropriate SELinux enforcing mode | setSELinux | {
"repo_name": "mcalmer/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/SystemDetailsHandler.java",
"license": "gpl-2.0",
"size": 30846
} | [
"com.redhat.rhn.domain.kickstart.SELinuxMode",
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.manager.kickstart.SystemDetailsCommand"
] | import com.redhat.rhn.domain.kickstart.SELinuxMode; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.manager.kickstart.SystemDetailsCommand; | import com.redhat.rhn.domain.kickstart.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.manager.kickstart.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 1,380,303 |
public UserDetailsDTO validateLogin(String userName, String password) {
UserDetailsDTO user = getUserDetails(userName);
if (user == null) {
System.out.println("User not in database");
return null;
}
if (user.getUserName().equalsIgnoreCase(userName) && user.getPassword().equals(password)) {
return... | UserDetailsDTO function(String userName, String password) { UserDetailsDTO user = getUserDetails(userName); if (user == null) { System.out.println(STR); return null; } if (user.getUserName().equalsIgnoreCase(userName) && user.getPassword().equals(password)) { return user; } else { return null; } } | /**
* Method for validating the user in DB or collection.
* If user exist in DB or collection then return UserDetails object
* otherwise return null.
* @param userName
* @param password
* @return UserDetailsDTO
*/ | Method for validating the user in DB or collection. If user exist in DB or collection then return UserDetails object otherwise return null | validateLogin | {
"repo_name": "raviraj92/tutorials",
"path": "LoginTutorial/src/org/login/tutorials/DAO/UserDAO.java",
"license": "apache-2.0",
"size": 2929
} | [
"org.login.tutorial.resource.UserDetailsDTO"
] | import org.login.tutorial.resource.UserDetailsDTO; | import org.login.tutorial.resource.*; | [
"org.login.tutorial"
] | org.login.tutorial; | 1,648,178 |
void setCollationType(int collationType)
{
type = getType().getCollatedType(collationType,
StringDataValue.COLLATION_DERIVATION_IMPLICIT);
} | void setCollationType(int collationType) { type = getType().getCollatedType(collationType, StringDataValue.COLLATION_DERIVATION_IMPLICIT); } | /**
* Set the collation type, note derivation is always
* implicit for any catalog item.
*/ | Set the collation type, note derivation is always implicit for any catalog item | setCollationType | {
"repo_name": "viaper/DBPlus",
"path": "DerbyHodgepodge/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java",
"license": "apache-2.0",
"size": 27826
} | [
"org.apache.derby.iapi.types.StringDataValue"
] | import org.apache.derby.iapi.types.StringDataValue; | import org.apache.derby.iapi.types.*; | [
"org.apache.derby"
] | org.apache.derby; | 1,390,713 |
public void mouseExited(final MouseEvent e) {
}
// --- Static icon accessors ------------------------------------------- | void function(final MouseEvent e) { } | /**
* Mouse event
* @param e Mouse event
*/ | Mouse event | mouseExited | {
"repo_name": "GenomicParisCentre/doelan",
"path": "src/main/java/fr/ens/transcriptome/doelan/gui/MyImageView.java",
"license": "gpl-2.0",
"size": 27126
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,081,900 |
public void onClickAppsUgr(View v) {
Intent webBrowser = new Intent(Intent.ACTION_VIEW,
Uri.parse(URL_APPS_UGR));
startActivity(webBrowser);
} | void function(View v) { Intent webBrowser = new Intent(Intent.ACTION_VIEW, Uri.parse(URL_APPS_UGR)); startActivity(webBrowser); } | /**
* Metodo que nos permite que al pulsar el boton se abra la pagina web de las Apps de la UGR
* @param v
*/ | Metodo que nos permite que al pulsar el boton se abra la pagina web de las Apps de la UGR | onClickAppsUgr | {
"repo_name": "jjramos-dev/DeportesUGRApp",
"path": "src/es/ugr/deportesugrapp/AboutActivity.java",
"license": "gpl-3.0",
"size": 7600
} | [
"android.content.Intent",
"android.net.Uri",
"android.view.View"
] | import android.content.Intent; import android.net.Uri; import android.view.View; | import android.content.*; import android.net.*; import android.view.*; | [
"android.content",
"android.net",
"android.view"
] | android.content; android.net; android.view; | 1,460,502 |
DataResult updateCustomAnnotations(Query query, String name, AdditionalAttribute attribute, long timeStamp, QueryOptions options); | DataResult updateCustomAnnotations(Query query, String name, AdditionalAttribute attribute, long timeStamp, QueryOptions options); | /**
* Update custom annotation for all the variants with in a given region.
*
* @param query Region to update
* @param name Custom annotation name.
* @param attribute Custom annotation for the region
* @param timeStamp Timestamp of the operation
* @param options O... | Update custom annotation for all the variants with in a given region | updateCustomAnnotations | {
"repo_name": "j-coll/opencga",
"path": "opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/adaptors/VariantDBAdaptor.java",
"license": "apache-2.0",
"size": 9708
} | [
"org.opencb.biodata.models.variant.avro.AdditionalAttribute",
"org.opencb.commons.datastore.core.DataResult",
"org.opencb.commons.datastore.core.Query",
"org.opencb.commons.datastore.core.QueryOptions"
] | import org.opencb.biodata.models.variant.avro.AdditionalAttribute; import org.opencb.commons.datastore.core.DataResult; import org.opencb.commons.datastore.core.Query; import org.opencb.commons.datastore.core.QueryOptions; | import org.opencb.biodata.models.variant.avro.*; import org.opencb.commons.datastore.core.*; | [
"org.opencb.biodata",
"org.opencb.commons"
] | org.opencb.biodata; org.opencb.commons; | 464,029 |
public void registerClient(CaliperClient client) {
clients.put(client.getId(), client);
} | void function(CaliperClient client) { clients.put(client.getId(), client); } | /**
* Register a Sensor client.
* @param client the client object
*/ | Register a Sensor client | registerClient | {
"repo_name": "IMSGlobal/caliper-java-public",
"path": "src/main/java/org/imsglobal/caliper/Sensor.java",
"license": "lgpl-3.0",
"size": 3674
} | [
"org.imsglobal.caliper.clients.CaliperClient"
] | import org.imsglobal.caliper.clients.CaliperClient; | import org.imsglobal.caliper.clients.*; | [
"org.imsglobal.caliper"
] | org.imsglobal.caliper; | 179,220 |
public void testDefine() {
try {
final Map components = new HashMap();
components.put(this.calciumChloride, new Float(0.1f)); // 0.1M
final Sample solution =
SampleFactory.defineSolution(this.wv, "0.1M CaCl2" + System.currentTimeMillis(), 1.0f,
... | void function() { try { final Map components = new HashMap(); components.put(this.calciumChloride, new Float(0.1f)); final Sample solution = SampleFactory.defineSolution(this.wv, STR + System.currentTimeMillis(), 1.0f, components, new ArrayList(this.sampleCategories)); Assert.assertEquals(STR, "L", solution.getAmountUn... | /**
* test defineSolution and getMoles
*/ | test defineSolution and getMoles | testDefine | {
"repo_name": "homiak/pims-lims",
"path": "TestSource/org/pimslims/lab/TestSampleFactory.java",
"license": "bsd-2-clause",
"size": 8642
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.Map",
"junit.framework.Assert",
"org.pimslims.exception.AccessException",
"org.pimslims.exception.ConstraintException",
"org.pimslims.lab.sample.SampleFactory",
"org.pimslims.model.sample.Sample"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import junit.framework.Assert; import org.pimslims.exception.AccessException; import org.pimslims.exception.ConstraintException; import org.pimslims.lab.sample.SampleFactory; import org.pimslims.model.sample.Sample; | import java.util.*; import junit.framework.*; import org.pimslims.exception.*; import org.pimslims.lab.sample.*; import org.pimslims.model.sample.*; | [
"java.util",
"junit.framework",
"org.pimslims.exception",
"org.pimslims.lab",
"org.pimslims.model"
] | java.util; junit.framework; org.pimslims.exception; org.pimslims.lab; org.pimslims.model; | 1,405,191 |
System.out.println( Copyright.STRING );
if ( args.length < 2 ) {
System.err
.println( "usage: <cmd> <properties-file> <chromosome-id1> [<chromosome-id2> <chromosome-id3> ...]" );
System.exit( -1 );
}
// load fitness function from properties
Properties props = new Properties();
props.loadFromReso... | System.out.println( Copyright.STRING ); if ( args.length < 2 ) { System.err .println( STR ); System.exit( -1 ); } Properties props = new Properties(); props.loadFromResource( args[ 0 ] ); EvaluationFunction fitnessFunc = (EvaluationFunction) props .singletonObjectProperty( Evolver.FITNESS_FUNCTION_CLASS_KEY ); Persiste... | /**
* main method
* @param args
* @throws Exception
*/ | main method | main | {
"repo_name": "agileDevelopment/anji4naiec",
"path": "anji4naiec/src/com/anji/integration/Evaluator.java",
"license": "mit",
"size": 2829
} | [
"com.anji.Copyright",
"com.anji.neat.Evolver",
"com.anji.persistence.Persistence",
"com.anji.util.DummyConfiguration",
"com.anji.util.Properties",
"java.util.ArrayList",
"java.util.Iterator",
"org.jgap.Chromosome",
"org.jgap.Configuration",
"org.jgap.EvaluationFunction"
] | import com.anji.Copyright; import com.anji.neat.Evolver; import com.anji.persistence.Persistence; import com.anji.util.DummyConfiguration; import com.anji.util.Properties; import java.util.ArrayList; import java.util.Iterator; import org.jgap.Chromosome; import org.jgap.Configuration; import org.jgap.EvaluationFunction... | import com.anji.*; import com.anji.neat.*; import com.anji.persistence.*; import com.anji.util.*; import java.util.*; import org.jgap.*; | [
"com.anji",
"com.anji.neat",
"com.anji.persistence",
"com.anji.util",
"java.util",
"org.jgap"
] | com.anji; com.anji.neat; com.anji.persistence; com.anji.util; java.util; org.jgap; | 1,868,872 |
@param name The name of the new {@link Type}.
@param baseType The {@link Type} to extend.
@param finality The finality restrictions to apply to the new
{@link Type}.
@param facets The {@link Facet}s to add to the new {@link
Type}.
@return The newly created {@link Type}.
@throws Par... | @param name The name of the new {@link Type}. @param baseType The {@link Type} to extend. @param finality The finality restrictions to apply to the new {@link Type}. @param facets The {@link Facet}s to add to the new { Type}. @return The newly created {@link Type}. @throws ParserException if the base type cannot be ext... | /** Extend a {@link Type} by restriction.
@param name The name of the new {@link Type}.
@param baseType The {@link Type} to extend.
@param finality The finality restrictions to apply to the new
{@link Type}.
@param facets The {@link Facet}s to add to the new {@link
Type}.
@return Th... | Extend a <code>Type</code> by restriction | extendByRestriction | {
"repo_name": "conormcd/exemplar",
"path": "src/com/mcdermottroe/exemplar/input/schema/TypeManager.java",
"license": "bsd-3-clause",
"size": 10973
} | [
"com.mcdermottroe.exemplar.input.ParserException",
"com.mcdermottroe.exemplar.input.schema.type.AtomicType",
"com.mcdermottroe.exemplar.input.schema.type.Finality",
"com.mcdermottroe.exemplar.input.schema.type.Type",
"com.mcdermottroe.exemplar.input.schema.type.facet.Facet",
"java.util.Set"
] | import com.mcdermottroe.exemplar.input.ParserException; import com.mcdermottroe.exemplar.input.schema.type.AtomicType; import com.mcdermottroe.exemplar.input.schema.type.Finality; import com.mcdermottroe.exemplar.input.schema.type.Type; import com.mcdermottroe.exemplar.input.schema.type.facet.Facet; import java.util.Se... | import com.mcdermottroe.exemplar.input.*; import com.mcdermottroe.exemplar.input.schema.type.*; import com.mcdermottroe.exemplar.input.schema.type.facet.*; import java.util.*; | [
"com.mcdermottroe.exemplar",
"java.util"
] | com.mcdermottroe.exemplar; java.util; | 2,148,531 |
// Close the welcome view using a temporary SWTBot.
SWTWorkbenchBot bot = new SWTWorkbenchBot();
try {
bot.viewByTitle("Welcome").close();
} catch (WidgetNotFoundException e) {
// Nothing to do.
}
return;
}
| SWTWorkbenchBot bot = new SWTWorkbenchBot(); try { bot.viewByTitle(STR).close(); } catch (WidgetNotFoundException e) { } return; } | /**
* Tries to close the "Welcome" view if it is open. This only needs to be
* done once, and nothing needs to be disposed afterward.
*/ | Tries to close the "Welcome" view if it is open. This only needs to be done once, and nothing needs to be disposed afterward | beforeWorkbenchClass | {
"repo_name": "jarrah42/eavp",
"path": "org.eclipse.eavp.viz.service.test/src/org/eclipse/eavp/viz/service/test/utils/AbstractWorkbenchTester.java",
"license": "epl-1.0",
"size": 7217
} | [
"org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot",
"org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException"
] | import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot; import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException; | import org.eclipse.swtbot.eclipse.finder.*; import org.eclipse.swtbot.swt.finder.exceptions.*; | [
"org.eclipse.swtbot"
] | org.eclipse.swtbot; | 2,745,877 |
public static Integer getClientPort(final Configuration configuration) {
Preconditions.checkNotNull(configuration);
String clientPortString = configuration.get(HConstants.ZOOKEEPER_CLIENT_PORT);
return clientPortString==null ? null : Integer.parseInt(clientPortString);
} | static Integer function(final Configuration configuration) { Preconditions.checkNotNull(configuration); String clientPortString = configuration.get(HConstants.ZOOKEEPER_CLIENT_PORT); return clientPortString==null ? null : Integer.parseInt(clientPortString); } | /**
* Returns the HBase Client Port
* @param configuration
* @return
*/ | Returns the HBase Client Port | getClientPort | {
"repo_name": "jfernandosf/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/mapreduce/util/PhoenixConfigurationUtil.java",
"license": "apache-2.0",
"size": 27351
} | [
"com.google.common.base.Preconditions",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.HConstants"
] | import com.google.common.base.Preconditions; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HConstants; | import com.google.common.base.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; | [
"com.google.common",
"org.apache.hadoop"
] | com.google.common; org.apache.hadoop; | 2,016,400 |
public Entry getItem() {
return new Entry(alert.getItem());
} | Entry function() { return new Entry(alert.getItem()); } | /**
* the data for this item
*
* @return
*/ | the data for this item | getItem | {
"repo_name": "moria/popcorn-android",
"path": "base/src/main/java/com/frostwire/jlibtorrent/alerts/DhtImmutableItemAlert.java",
"license": "gpl-3.0",
"size": 1005
} | [
"com.frostwire.jlibtorrent.Entry"
] | import com.frostwire.jlibtorrent.Entry; | import com.frostwire.jlibtorrent.*; | [
"com.frostwire.jlibtorrent"
] | com.frostwire.jlibtorrent; | 2,789,684 |
public void assertIsValidResultPath(String path) {
assertIsValidReferencePath(path, PropertyNames.RESULT_PATH);
} | void function(String path) { assertIsValidReferencePath(path, PropertyNames.RESULT_PATH); } | /**
* Asserts that the string represents a valid JsonPath expression.
*
* @param path Path expression to validate.
*/ | Asserts that the string represents a valid JsonPath expression | assertIsValidResultPath | {
"repo_name": "aws/aws-sdk-java",
"path": "aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/internal/validation/ValidationContext.java",
"license": "apache-2.0",
"size": 11078
} | [
"com.amazonaws.services.stepfunctions.builder.internal.PropertyNames"
] | import com.amazonaws.services.stepfunctions.builder.internal.PropertyNames; | import com.amazonaws.services.stepfunctions.builder.internal.*; | [
"com.amazonaws.services"
] | com.amazonaws.services; | 2,236,329 |
void setInput(int inputNumber, INDArray input); | void setInput(int inputNumber, INDArray input); | /** Set the input activations.
*
* @param inputNumber Must be in range 0 to {@link #getNumInputArrays()}-1
* @param input The input array
*/ | Set the input activations | setInput | {
"repo_name": "crockpotveggies/deeplearning4j",
"path": "deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/GraphVertex.java",
"license": "apache-2.0",
"size": 6052
} | [
"org.nd4j.linalg.api.ndarray.INDArray"
] | import org.nd4j.linalg.api.ndarray.INDArray; | import org.nd4j.linalg.api.ndarray.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 2,620,057 |
return new AtividadeDAO();
} | return new AtividadeDAO(); } | /**
* Instancia um objeto de cidade DAO
* @return instância de acesso aos dados do cidade
*/ | Instancia um objeto de cidade DAO | instanciarDAO | {
"repo_name": "Ronneesley/redesocial",
"path": "codigo/RedeSocial/src/br/com/redesocial/modelo/bo/AtividadeBO.java",
"license": "mit",
"size": 1627
} | [
"br.com.redesocial.modelo.dao.AtividadeDAO"
] | import br.com.redesocial.modelo.dao.AtividadeDAO; | import br.com.redesocial.modelo.dao.*; | [
"br.com.redesocial"
] | br.com.redesocial; | 1,750,702 |
public void addLayersToBeanContext(List<Layer> layers) {
BeanContext bc = getBeanContext();
if (bc == null || layers == null) {
return;
}
for (Layer layer : layers) {
if (layer.getAddToBeanContext() && layer.getBeanContext() == null) {
bc.add(... | void function(List<Layer> layers) { BeanContext bc = getBeanContext(); if (bc == null layers == null) { return; } for (Layer layer : layers) { if (layer.getAddToBeanContext() && layer.getBeanContext() == null) { bc.add(layer); } } } | /**
* Add layers to the BeanContext, if they want to be. Since the BeanContext
* is a Collection, it doesn't matter if a layer is already there because
* duplicates aren't allowed.
*
* @param layers layers to add, if they want to be.
*/ | Add layers to the BeanContext, if they want to be. Since the BeanContext is a Collection, it doesn't matter if a layer is already there because duplicates aren't allowed | addLayersToBeanContext | {
"repo_name": "d2fn/passage",
"path": "src/main/java/com/bbn/openmap/LayerHandler.java",
"license": "mit",
"size": 43324
} | [
"java.beans.beancontext.BeanContext",
"java.util.List"
] | import java.beans.beancontext.BeanContext; import java.util.List; | import java.beans.beancontext.*; import java.util.*; | [
"java.beans",
"java.util"
] | java.beans; java.util; | 1,693,463 |
public EAttribute getCurve_Y1Unit() {
return (EAttribute)getCurve().getEStructuralFeatures().get(5);
} | EAttribute function() { return (EAttribute)getCurve().getEStructuralFeatures().get(5); } | /**
* Returns the meta object for the attribute '{@link CIM15.IEC61970.Core.Curve#getY1Unit <em>Y1 Unit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Y1 Unit</em>'.
* @see CIM15.IEC61970.Core.Curve#getY1Unit()
* @see #getCurve()
* @generated
*... | Returns the meta object for the attribute '<code>CIM15.IEC61970.Core.Curve#getY1Unit Y1 Unit</code>'. | getCurve_Y1Unit | {
"repo_name": "SES-fortiss/SmartGridCoSimulation",
"path": "core/cim15/src/CIM15/IEC61970/Core/CorePackage.java",
"license": "apache-2.0",
"size": 304427
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 507,365 |
public Map<Integer, Browser> getBrowsers(); | Map<Integer, Browser> function(); | /**
* Returns the available {@link Browser}s.
*
* @return See above.
*/ | Returns the available <code>Browser</code>s | getBrowsers | {
"repo_name": "emilroz/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewer.java",
"license": "gpl-2.0",
"size": 36185
} | [
"java.util.Map",
"org.openmicroscopy.shoola.agents.treeviewer.browser.Browser"
] | import java.util.Map; import org.openmicroscopy.shoola.agents.treeviewer.browser.Browser; | import java.util.*; import org.openmicroscopy.shoola.agents.treeviewer.browser.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 1,580,500 |
@Test
public void testNextAction() {
final TitForTatStrategy strategy = new TitForTatStrategy();
// first action should always be cooperate
assertEquals(Action.COOPERATE, strategy.nextAction());
// next action should do what the previous adversary did
strategy
.addToMemory(new Pair<... | void function() { final TitForTatStrategy strategy = new TitForTatStrategy(); assertEquals(Action.COOPERATE, strategy.nextAction()); strategy .addToMemory(new Pair<Action, Action>(Action.DEFECT, Action.DEFECT)); assertEquals(Action.DEFECT, strategy.nextAction()); strategy.addToMemory(new Pair<Action, Action>(Action.COO... | /**
* Test method for
* {@link jmona.example.ipd.strategy.TitForTatStrategy#nextAction()}.
*/ | Test method for <code>jmona.example.ipd.strategy.TitForTatStrategy#nextAction()</code> | testNextAction | {
"repo_name": "jfinkels/jmona",
"path": "jmona-examples/src/test/java/jmona/example/ipd/strategy/TitForTatStrategyTester.java",
"license": "gpl-3.0",
"size": 2640
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,559,244 |
MapScene scene = visualizer.getScene();
if (scene != null){
scene.setNodesVisible(showNodesBox.isSelected());
}
}
| MapScene scene = visualizer.getScene(); if (scene != null){ scene.setNodesVisible(showNodesBox.isSelected()); } } | /**
* Run whenever the {@link ShowNodesHandler#showNodesBox} is checked/unchecked.
* Shows or hides the nodes appropriately.
*/ | Run whenever the <code>ShowNodesHandler#showNodesBox</code> is checked/unchecked. Shows or hides the nodes appropriately | handle | {
"repo_name": "filipekt/JDEECoVisualizer",
"path": "src/cz/filipekt/jdcv/gui_logic/ShowNodesHandler.java",
"license": "mit",
"size": 1262
} | [
"cz.filipekt.jdcv.MapScene"
] | import cz.filipekt.jdcv.MapScene; | import cz.filipekt.jdcv.*; | [
"cz.filipekt.jdcv"
] | cz.filipekt.jdcv; | 2,411,341 |
private boolean openFileDownloadFromDB (MappingManager fileMapper ) {
// If we get here, we know the CSV file is not found or invalid
boolean fileOK = false; // true if we were able to download the CSV, it becomes the return value
Collection<String> mappedFileNames = null; // the list of names defined in the... | boolean function (MappingManager fileMapper ) { boolean fileOK = false; Collection<String> mappedFileNames = null; boolean workDone = false; try { mappedFileNames = MappingSingleton.getInstance().mapping.getDatasetNames(); } catch (Exception e1) { LogST.logP(0, STR+e1.toString()); e1.printStackTrace(); } if (mappedFile... | /**
* Download CSV data from the DBMS in case a valid CSV file is not found but we have a DB mapping for that
* filename.
*
* TODO Maybe a file that is not downloadable should not reach here at all.
*
* @param fileMapper class providing mapping information for DM-downloadable files
*
* @return true ... | Download CSV data from the DBMS in case a valid CSV file is not found but we have a DB mapping for that filename. TODO Maybe a file that is not downloadable should not reach here at all | openFileDownloadFromDB | {
"repo_name": "hpclab/TheMatrixProject",
"path": "src/it/cnr/isti/thematrix/scripting/modules/MatrixFileInput.java",
"license": "gpl-3.0",
"size": 20173
} | [
"it.cnr.isti.thematrix.configuration.Dynamic",
"it.cnr.isti.thematrix.configuration.LogST",
"it.cnr.isti.thematrix.configuration.MappingSingleton",
"it.cnr.isti.thematrix.exception.JDBCConnectionException",
"it.cnr.isti.thematrix.exception.SyntaxErrorInMappingException",
"it.cnr.isti.thematrix.exception.U... | import it.cnr.isti.thematrix.configuration.Dynamic; import it.cnr.isti.thematrix.configuration.LogST; import it.cnr.isti.thematrix.configuration.MappingSingleton; import it.cnr.isti.thematrix.exception.JDBCConnectionException; import it.cnr.isti.thematrix.exception.SyntaxErrorInMappingException; import it.cnr.isti.them... | import it.cnr.isti.thematrix.configuration.*; import it.cnr.isti.thematrix.exception.*; import it.cnr.isti.thematrix.mapping.*; import java.io.*; import java.security.*; import java.sql.*; import java.util.*; import javax.xml.bind.*; | [
"it.cnr.isti",
"java.io",
"java.security",
"java.sql",
"java.util",
"javax.xml"
] | it.cnr.isti; java.io; java.security; java.sql; java.util; javax.xml; | 199,607 |
private static View createPlaybackListItemNameElement(Context context, Drawable icon, String uniqueDeviceId, String title) {
View item = inflate(context, R.layout.audio_viewer_playback_list_item, null);
TextView uniqueDeviceIdTextView = (TextView) item.findViewById(R.id.uniqueDeviceIdLabel);
... | static View function(Context context, Drawable icon, String uniqueDeviceId, String title) { View item = inflate(context, R.layout.audio_viewer_playback_list_item, null); TextView uniqueDeviceIdTextView = (TextView) item.findViewById(R.id.uniqueDeviceIdLabel); TextView titleTextView = (TextView) item.findViewById(R.id.t... | /**
* Creates a list item
* @param context the context
* @param uniqueDeviceId the unique device id
* @param title the title text to be displayed instead of the state name
* @return the view
*/ | Creates a list item | createPlaybackListItemNameElement | {
"repo_name": "Blaubot/Blaubot",
"path": "examples/blaubot-cam/src/main/java/eu/hgross/blaubotcam/views/AudioViewer.java",
"license": "mit",
"size": 8031
} | [
"android.content.Context",
"android.graphics.drawable.Drawable",
"android.view.View",
"android.widget.ImageView",
"android.widget.TextView"
] | import android.content.Context; import android.graphics.drawable.Drawable; import android.view.View; import android.widget.ImageView; import android.widget.TextView; | import android.content.*; import android.graphics.drawable.*; import android.view.*; import android.widget.*; | [
"android.content",
"android.graphics",
"android.view",
"android.widget"
] | android.content; android.graphics; android.view; android.widget; | 2,382,766 |
@ApiMethod(name = "sayHi")
public MyBean sayHi(@Named("name") String name) {
MyBean response = new MyBean();
response.setData("Hi, " + name);
return response;
} | @ApiMethod(name = "sayHi") MyBean function(@Named("name") String name) { MyBean response = new MyBean(); response.setData(STR + name); return response; } | /**
* A simple endpoint method that takes a name and says Hi back
*/ | A simple endpoint method that takes a name and says Hi back | sayHi | {
"repo_name": "jyodroid/BuildItBigger",
"path": "backend/src/main/java/com/example/jyodroid/myapplication/backend/MyEndpoint.java",
"license": "mit",
"size": 1498
} | [
"com.google.api.server.spi.config.ApiMethod",
"javax.inject.Named"
] | import com.google.api.server.spi.config.ApiMethod; import javax.inject.Named; | import com.google.api.server.spi.config.*; import javax.inject.*; | [
"com.google.api",
"javax.inject"
] | com.google.api; javax.inject; | 2,685,912 |
public synchronized void setTransactionIsolation(int level) throws SQLException {
checkClosed();
if (this.hasIsolationLevels) {
String sql = null;
boolean shouldSendSet = false;
if (getAlwaysSendSetIsolation()) {
shouldSendSet = true;
} else {
if (level != this.isolationLevel) {
shoul... | synchronized void function(int level) throws SQLException { checkClosed(); if (this.hasIsolationLevels) { String sql = null; boolean shouldSendSet = false; if (getAlwaysSendSetIsolation()) { shouldSendSet = true; } else { if (level != this.isolationLevel) { shouldSendSet = true; } } if (getUseLocalSessionState()) { sho... | /**
* DOCUMENT ME!
*
* @param level
* DOCUMENT ME!
* @throws SQLException
* DOCUMENT ME!
*/ | DOCUMENT ME | setTransactionIsolation | {
"repo_name": "mashuai/Open-Source-Research",
"path": "MySQL-JDBC-Driver/src/com/mysql/jdbc/ConnectionImpl.java",
"license": "apache-2.0",
"size": 172162
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 113,671 |
public List<ProcessFunctionParameterValue> extractParameters(
ProcessDescriptionType selectedCustomFunction) {
List<ProcessFunctionParameterValue> valueList = new ArrayList<>();
if (dataTypeMap.isEmpty()) {
populateDataMap();
}
if (selectedCustomFunction != ... | List<ProcessFunctionParameterValue> function( ProcessDescriptionType selectedCustomFunction) { List<ProcessFunctionParameterValue> valueList = new ArrayList<>(); if (dataTypeMap.isEmpty()) { populateDataMap(); } if (selectedCustomFunction != null) { for (int index = 0; index < selectedCustomFunction.getDataInputs().get... | /**
* Extract parameters.
*
* @param selectedCustomFunction the selected custom function
* @return the list
*/ | Extract parameters | extractParameters | {
"repo_name": "robward-scisys/sldeditor",
"path": "modules/application/src/main/java/com/sldeditor/rendertransformation/CustomProcessFunction.java",
"license": "gpl-3.0",
"size": 5164
} | [
"java.util.ArrayList",
"java.util.List",
"net.opengis.wps10.InputDescriptionType",
"net.opengis.wps10.ProcessDescriptionType"
] | import java.util.ArrayList; import java.util.List; import net.opengis.wps10.InputDescriptionType; import net.opengis.wps10.ProcessDescriptionType; | import java.util.*; import net.opengis.wps10.*; | [
"java.util",
"net.opengis.wps10"
] | java.util; net.opengis.wps10; | 2,052,354 |
protected void report(Request request, Response response,
Throwable throwable) {
// Do nothing on non-HTTP responses
int statusCode = response.getStatus();
// Do nothing on a 1xx, 2xx and 3xx status
// Do nothing if anything has been written already... | void function(Request request, Response response, Throwable throwable) { int statusCode = response.getStatus(); if (statusCode < 400 response.getContentCount() > 0 !response.isError()) { return; } String message = RequestUtil.filter(response.getMessage()); if (message == null) { if (throwable != null) { String exceptio... | /**
* Prints out an error report.
*
* @param request The request being processed
* @param response The response being generated
* @param throwable The exception that occurred (which possibly wraps
* a root cause exception
*/ | Prints out an error report | report | {
"repo_name": "yuyupapa/OpenSource",
"path": "apache-tomcat-6.0.48/java/org/apache/catalina/valves/ErrorReportValve.java",
"license": "apache-2.0",
"size": 10222
} | [
"java.io.IOException",
"java.io.Writer",
"java.util.Scanner",
"org.apache.catalina.connector.Request",
"org.apache.catalina.connector.Response",
"org.apache.catalina.util.RequestUtil"
] | import java.io.IOException; import java.io.Writer; import java.util.Scanner; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.apache.catalina.util.RequestUtil; | import java.io.*; import java.util.*; import org.apache.catalina.connector.*; import org.apache.catalina.util.*; | [
"java.io",
"java.util",
"org.apache.catalina"
] | java.io; java.util; org.apache.catalina; | 2,806,313 |
public static java.util.Set extractMRSAAssessmentSet(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.MRSAAssessmentVoCollection voCollection)
{
return extractMRSAAssessmentSet(domainFactory, voCollection, null, new HashMap());
}
| static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.MRSAAssessmentVoCollection voCollection) { return extractMRSAAssessmentSet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.nursing.assessmenttools.domain.objects.MRSAAssessment set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.nursing.assessmenttools.domain.objects.MRSAAssessment set from the value object collection | extractMRSAAssessmentSet | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/nursing/vo/domain/MRSAAssessmentVoAssembler.java",
"license": "agpl-3.0",
"size": 21373
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,281,769 |
private static Matcher getDocumentObj(String doc, String objName)
{
Pattern p = Pattern.compile(objName + " \\[\n([^\\]]*)\\]", Pattern.MULTILINE);
Matcher m = p.matcher(doc);
return m;
} | static Matcher function(String doc, String objName) { Pattern p = Pattern.compile(objName + STR, Pattern.MULTILINE); Matcher m = p.matcher(doc); return m; } | /**
* Takes a GML document & returns the inner object under objName header
* @param doc The document to filter
* @param objName The inner object header name
* @return The filtered inner document
*/ | Takes a GML document & returns the inner object under objName header | getDocumentObj | {
"repo_name": "denkers/graphi",
"path": "src/com/graphi/io/GMLParser.java",
"license": "mit",
"size": 8314
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 591,717 |
//-----------------------------------------------------------------------
public ExternalId getSwapConvention() {
return _swapConvention;
} | ExternalId function() { return _swapConvention; } | /**
* Gets the convention for the underlying swap.
* @return the value of the property, not null
*/ | Gets the convention for the underlying swap | getSwapConvention | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial-types/src/main/java/com/opengamma/financial/convention/DeliverablePriceQuotedSwapFutureConvention.java",
"license": "apache-2.0",
"size": 10873
} | [
"com.opengamma.id.ExternalId"
] | import com.opengamma.id.ExternalId; | import com.opengamma.id.*; | [
"com.opengamma.id"
] | com.opengamma.id; | 1,115,678 |
String assemblyName = ASSEMBLY_FILE.getName();
int extensionIndex = assemblyName.lastIndexOf('.');
if (extensionIndex != -1) {
assemblyName = assemblyName.substring(0, extensionIndex);
}
File documentationFile = new File(ASSEMBLY_FILE.getParent(), assemblyNa... | String assemblyName = ASSEMBLY_FILE.getName(); int extensionIndex = assemblyName.lastIndexOf('.'); if (extensionIndex != -1) { assemblyName = assemblyName.substring(0, extensionIndex); } File documentationFile = new File(ASSEMBLY_FILE.getParent(), assemblyName + ".xml"); PrintWriter pw = null; try { FileOutputStream fo... | /**
* Generate the .NET XML Documentation.
*
* @param root represents the root of the program structure information for one run of javadoc
* @return <code>true</code> on success; <code>false</code> on failure
*/ | Generate the .NET XML Documentation | start | {
"repo_name": "nugetmonkey/gradle-nugetmonkey-plugin",
"path": "src/main/java/com/nugetmonkey/IKVMDocLet.java",
"license": "apache-2.0",
"size": 32122
} | [
"com.sun.javadoc.ClassDoc",
"java.io.BufferedWriter",
"java.io.File",
"java.io.FileOutputStream",
"java.io.OutputStreamWriter",
"java.io.PrintWriter"
] | import com.sun.javadoc.ClassDoc; import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; | import com.sun.javadoc.*; import java.io.*; | [
"com.sun.javadoc",
"java.io"
] | com.sun.javadoc; java.io; | 2,423,958 |
public void registerSyncListener(SyncListener syncListener) {
EventBus.getDefault().register(syncListener);
}
| void function(SyncListener syncListener) { EventBus.getDefault().register(syncListener); } | /**
* Registers a {@link SyncListener} to listen for events fired by {@link SyncIntentService}.<br>
* Ideally, call {@link #registerSyncListener(SyncListener)} from <code>onCreate()</code> or <code>onStart()</code> or <code>onResume()</code> methods.<br>
* Call {@link #unregisterSyncListener(SyncListener)} from <... | Registers a <code>SyncListener</code> to listen for events fired by <code>SyncIntentService</code>. Ideally, call <code>#registerSyncListener(SyncListener)</code> from <code>onCreate()</code> or <code>onStart()</code> or <code>onResume()</code> methods. Call <code>#unregisterSyncListener(SyncListener)</code> from <code... | registerSyncListener | {
"repo_name": "michelzanini/appglu-androidsdk",
"path": "appglu-android-sdk/src/main/java/com/appglu/android/sync/SyncApi.java",
"license": "apache-2.0",
"size": 21357
} | [
"de.greenrobot.event.EventBus"
] | import de.greenrobot.event.EventBus; | import de.greenrobot.event.*; | [
"de.greenrobot.event"
] | de.greenrobot.event; | 1,056,739 |
public default Map<String, Object> serialize() {
return Collections.emptyMap();
} | default Map<String, Object> function() { return Collections.emptyMap(); } | /**
* Serialize method for ConfigurationSerializable interface.
* The default implementation returns an empty map.
*/ | Serialize method for ConfigurationSerializable interface. The default implementation returns an empty map | serialize | {
"repo_name": "Jannyboy11/CustomRecipes",
"path": "src/main/java/com/gmail/jannyboy11/customrecipes/api/crafting/CraftingIngredient.java",
"license": "bsd-2-clause",
"size": 1212
} | [
"java.util.Collections",
"java.util.Map"
] | import java.util.Collections; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,742,366 |
public void visit(GetFileMessage msg) throws PermissionDenied {
ArgumentNotValid.checkNotNull(msg, "msg");
deny(msg);
} | void function(GetFileMessage msg) throws PermissionDenied { ArgumentNotValid.checkNotNull(msg, "msg"); deny(msg); } | /**
* This method should be overridden and implemented by a sub class if
* message handling is wanted.
* @param msg a GetFileMessage
* @throws PermissionDenied when invoked
*/ | This method should be overridden and implemented by a sub class if message handling is wanted | visit | {
"repo_name": "netarchivesuite/netarchivesuite-svngit-migration",
"path": "src/dk/netarkivet/archive/distribute/ArchiveMessageHandler.java",
"license": "lgpl-2.1",
"size": 8951
} | [
"dk.netarkivet.archive.bitarchive.distribute.GetFileMessage",
"dk.netarkivet.common.exceptions.ArgumentNotValid",
"dk.netarkivet.common.exceptions.PermissionDenied"
] | import dk.netarkivet.archive.bitarchive.distribute.GetFileMessage; import dk.netarkivet.common.exceptions.ArgumentNotValid; import dk.netarkivet.common.exceptions.PermissionDenied; | import dk.netarkivet.archive.bitarchive.distribute.*; import dk.netarkivet.common.exceptions.*; | [
"dk.netarkivet.archive",
"dk.netarkivet.common"
] | dk.netarkivet.archive; dk.netarkivet.common; | 2,491,985 |
public TagResourceContractInner withOperation(OperationTagResourceContractProperties operation) {
this.operation = operation;
return this;
} | TagResourceContractInner function(OperationTagResourceContractProperties operation) { this.operation = operation; return this; } | /**
* Set the operation property: Operation associated with the tag.
*
* @param operation the operation value to set.
* @return the TagResourceContractInner object itself.
*/ | Set the operation property: Operation associated with the tag | withOperation | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/fluent/models/TagResourceContractInner.java",
"license": "mit",
"size": 4433
} | [
"com.azure.resourcemanager.apimanagement.models.OperationTagResourceContractProperties"
] | import com.azure.resourcemanager.apimanagement.models.OperationTagResourceContractProperties; | import com.azure.resourcemanager.apimanagement.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,520,195 |
public static synchronized void removeCurrent()
{
Thread thread = Thread.currentThread();
Stack<Object> stack = currentMap.get(thread);
if (stack != null) {
stack.pop();
if (stack.empty()) {
currentMap.remove(thread);
}
}
} | static synchronized void function() { Thread thread = Thread.currentThread(); Stack<Object> stack = currentMap.get(thread); if (stack != null) { stack.pop(); if (stack.empty()) { currentMap.remove(thread); } } } | /**
* Dissociates the current Thread from the context object.
*/ | Dissociates the current Thread from the context object | removeCurrent | {
"repo_name": "green-vulcano/gv-engine",
"path": "gvengine/gvbase/src/main/java/it/greenvulcano/util/xpath/search/jaxen/CurrentFunction.java",
"license": "lgpl-3.0",
"size": 3041
} | [
"java.util.Stack"
] | import java.util.Stack; | import java.util.*; | [
"java.util"
] | java.util; | 252,913 |
public String generate(TemplateInfo templateInfo) {
Preconditions.checkNotNull(templateInfo);
StringBuilder newTemplate = new StringBuilder();
String template = templateInfo.getTemplate();
int lastIndex = 0; | String function(TemplateInfo templateInfo) { Preconditions.checkNotNull(templateInfo); StringBuilder newTemplate = new StringBuilder(); String template = templateInfo.getTemplate(); int lastIndex = 0; | /**
* Generates a modified template from the specified {@link TemplateInfo} inserting specific
* attributes into html tags which contain template variables.
*
* @param templateInfo the {@link TemplateInfo} instance of the template to be updated
* @return the modified template with the inserted id attrib... | Generates a modified template from the specified <code>TemplateInfo</code> inserting specific attributes into html tags which contain template variables | generate | {
"repo_name": "phcomputer/pageobjectgenerator",
"path": "src/main/java/com/google/testing/pogen/generator/template/TemplateUpdater.java",
"license": "apache-2.0",
"size": 4581
} | [
"com.google.common.base.Preconditions",
"com.google.testing.pogen.parser.template.TemplateInfo"
] | import com.google.common.base.Preconditions; import com.google.testing.pogen.parser.template.TemplateInfo; | import com.google.common.base.*; import com.google.testing.pogen.parser.template.*; | [
"com.google.common",
"com.google.testing"
] | com.google.common; com.google.testing; | 1,251,094 |
public void setImage(final BufferedImage i) {
image = i;
scaledImage = null;
revalidate();
repaint();
} | void function(final BufferedImage i) { image = i; scaledImage = null; revalidate(); repaint(); } | /**
* Set the image.
*
* @param i the image
*/ | Set the image | setImage | {
"repo_name": "chriswareham/superfly",
"path": "src/main/java/net/chriswareham/gui/ImagePanel.java",
"license": "bsd-2-clause",
"size": 11436
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 1,652,944 |
public void setCreator(User creator) {
this.creator = creator;
} | void function(User creator) { this.creator = creator; } | /**
* Sets the creator of this entity.
*
* @param creator The creator of this entity
*/ | Sets the creator of this entity | setCreator | {
"repo_name": "leafsoftinfo/pyramus",
"path": "persistence/src/main/java/fi/pyramus/domainmodel/projects/StudentProject.java",
"license": "gpl-3.0",
"size": 9520
} | [
"fi.pyramus.domainmodel.users.User"
] | import fi.pyramus.domainmodel.users.User; | import fi.pyramus.domainmodel.users.*; | [
"fi.pyramus.domainmodel"
] | fi.pyramus.domainmodel; | 2,833,960 |
if (ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper", null)) {
return new JacksonJsonParser();
}
if (ClassUtils.isPresent("com.google.gson.Gson", null)) {
return new GsonJsonParser();
}
if (ClassUtils.isPresent("org.yaml.snakeyaml.Yaml", null)) {
return new YamlJsonParser();
}
r... | if (ClassUtils.isPresent(STR, null)) { return new JacksonJsonParser(); } if (ClassUtils.isPresent(STR, null)) { return new GsonJsonParser(); } if (ClassUtils.isPresent(STR, null)) { return new YamlJsonParser(); } return new BasicJsonParser(); } | /**
* Static factory for the "best" JSON parser available on the classpath. Tries
* Jackson, then Gson, Snake YAML, and then falls back to the {@link BasicJsonParser}.
* @return a {@link JsonParser}
*/ | Static factory for the "best" JSON parser available on the classpath. Tries Jackson, then Gson, Snake YAML, and then falls back to the <code>BasicJsonParser</code> | getJsonParser | {
"repo_name": "hello2009chen/spring-boot",
"path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/json/JsonParserFactory.java",
"license": "apache-2.0",
"size": 1531
} | [
"org.springframework.util.ClassUtils"
] | import org.springframework.util.ClassUtils; | import org.springframework.util.*; | [
"org.springframework.util"
] | org.springframework.util; | 2,401,292 |
public synchronized void init(ClientServiceDesc serviceDesc, URL serviceURL) throws ServiceException
{
if (m_status != STATUS.UNINITIALIZED)
return;
try {
CachePolicyHolder holder = new CachePolicyHolder();
OperationCachePolicy opPolicy = new OperationCachePolicy();
opPolicy.setTTL(60);
holder.ge... | synchronized void function(ClientServiceDesc serviceDesc, URL serviceURL) throws ServiceException { if (m_status != STATUS.UNINITIALIZED) return; try { CachePolicyHolder holder = new CachePolicyHolder(); OperationCachePolicy opPolicy = new OperationCachePolicy(); opPolicy.setTTL(60); holder.getOperationCachePolicies().... | /**
* Create simplified CachePolicyDesc, CachePolicyHolder, OperationCachePolicy
*/ | Create simplified CachePolicyDesc, CachePolicyHolder, OperationCachePolicy | init | {
"repo_name": "vthangathurai/SOA-Runtime",
"path": "integration-tests/SOATests/src/test/java/org/ebayopensource/turmeric/runtime/tests/common/cachepolicy/TestCachePolicyProvider.java",
"license": "apache-2.0",
"size": 4034
} | [
"java.util.HashMap",
"java.util.Map",
"org.ebayopensource.turmeric.runtime.common.cachepolicy.CacheKey",
"org.ebayopensource.turmeric.runtime.common.cachepolicy.CachePolicyDesc",
"org.ebayopensource.turmeric.runtime.common.cachepolicy.CachePolicyHolder",
"org.ebayopensource.turmeric.runtime.common.cachepo... | import java.util.HashMap; import java.util.Map; import org.ebayopensource.turmeric.runtime.common.cachepolicy.CacheKey; import org.ebayopensource.turmeric.runtime.common.cachepolicy.CachePolicyDesc; import org.ebayopensource.turmeric.runtime.common.cachepolicy.CachePolicyHolder; import org.ebayopensource.turmeric.runti... | import java.util.*; import org.ebayopensource.turmeric.runtime.common.cachepolicy.*; import org.ebayopensource.turmeric.runtime.common.exceptions.*; import org.ebayopensource.turmeric.runtime.sif.impl.internal.service.*; | [
"java.util",
"org.ebayopensource.turmeric"
] | java.util; org.ebayopensource.turmeric; | 1,923,167 |
public void testSerialization() {
final SimpleTimePeriod p1 = new SimpleTimePeriod(new Date(1000L), new Date(1001L));
SimpleTimePeriod p2 = null;
try {
final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
final ObjectOutput out = new ObjectOutputStream(... | void function() { final SimpleTimePeriod p1 = new SimpleTimePeriod(new Date(1000L), new Date(1001L)); SimpleTimePeriod p2 = null; try { final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); final ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(p1); out.close(); final ObjectInput in = new ... | /**
* Serialize an instance, restore it, and check for equality.
*/ | Serialize an instance, restore it, and check for equality | testSerialization | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/jfreechart0921/source/org/jfree/data/time/junit/SimpleTimePeriodTests.java",
"license": "lgpl-3.0",
"size": 4495
} | [
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"java.io.ObjectInput",
"java.io.ObjectInputStream",
"java.io.ObjectOutput",
"java.io.ObjectOutputStream",
"java.util.Date",
"org.jfree.data.time.SimpleTimePeriod"
] | import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.util.Date; import org.jfree.data.time.SimpleTimePeriod; | import java.io.*; import java.util.*; import org.jfree.data.time.*; | [
"java.io",
"java.util",
"org.jfree.data"
] | java.io; java.util; org.jfree.data; | 1,118,329 |
public static final Duration getDuration(double value, TimeUnit type)
{
double duration;
// Value is given in 1/10 of minute
switch (type)
{
case MINUTES:
case ELAPSED_MINUTES:
{
duration = value / 10;
break;
}
case HOUR... | static final Duration function(double value, TimeUnit type) { double duration; switch (type) { case MINUTES: case ELAPSED_MINUTES: { duration = value / 10; break; } case HOURS: case ELAPSED_HOURS: { duration = value / 600; break; } case DAYS: { duration = value / 4800; break; } case ELAPSED_DAYS: { duration = value / 1... | /**
* Reads a duration value. This method relies on the fact that
* the units of the duration have been specified elsewhere.
*
* @param value Duration value
* @param type type of units of the duration
* @return Duration instance
*/ | Reads a duration value. This method relies on the fact that the units of the duration have been specified elsewhere | getDuration | {
"repo_name": "tmyroadctfig/mpxj",
"path": "net/sf/mpxj/mpp/MPPUtility.java",
"license": "lgpl-2.1",
"size": 42670
} | [
"net.sf.mpxj.Duration",
"net.sf.mpxj.TimeUnit"
] | import net.sf.mpxj.Duration; import net.sf.mpxj.TimeUnit; | import net.sf.mpxj.*; | [
"net.sf.mpxj"
] | net.sf.mpxj; | 1,301,989 |
public static View createLayout(Context context, Object obj) {
return createLayout(context, obj, null);
} | static View function(Context context, Object obj) { return createLayout(context, obj, null); } | /**
* Helper method to create a layout within an Object annotated with the <code>@Layout</code> annotation.
*
* @param context an Activity Context
* @param obj the Object with the <code>@Layout</code> annotation
* @return the layout
*/ | Helper method to create a layout within an Object annotated with the <code>@Layout</code> annotation | createLayout | {
"repo_name": "davidargylethacker/Slim",
"path": "src/main/java/com/metova/slim/Slim.java",
"license": "apache-2.0",
"size": 9765
} | [
"android.content.Context",
"android.view.View"
] | import android.content.Context; import android.view.View; | import android.content.*; import android.view.*; | [
"android.content",
"android.view"
] | android.content; android.view; | 2,390,821 |
public PrintStream getStderr() {
return mStderr;
} | PrintStream function() { return mStderr; } | /**
* Access the caller's stderr output stream.
*/ | Access the caller's stderr output stream | getStderr | {
"repo_name": "Jericho25/stetho",
"path": "stetho/src/main/java/com/facebook/stetho/dumpapp/DumperContext.java",
"license": "bsd-3-clause",
"size": 2232
} | [
"java.io.PrintStream"
] | import java.io.PrintStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,774,976 |
public void bulbOff(int c){
alphaBulbs[c].setForeground(Color.GRAY);
}
| void function(int c){ alphaBulbs[c].setForeground(Color.GRAY); } | /**
* Bulb off
* @param c
*/ | Bulb off | bulbOff | {
"repo_name": "amirbawab/Enigma-machine-simulator",
"path": "gui/panels/BulbPanel.java",
"license": "mit",
"size": 3217
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 415,988 |
private JTextField getBufferDistanceTextField() {
if (bufferDistanceTextField == null) {
bufferDistanceTextField = new JTextField();
bufferDistanceTextField.setBounds(new java.awt.Rectangle(308, 11,
134, 21));
}
return bufferDistanceTextField;
} | JTextField function() { if (bufferDistanceTextField == null) { bufferDistanceTextField = new JTextField(); bufferDistanceTextField.setBounds(new java.awt.Rectangle(308, 11, 134, 21)); } return bufferDistanceTextField; } | /**
* This method initializes bufferDistanceTextField
*
* @return javax.swing.JTextField
*/ | This method initializes bufferDistanceTextField | getBufferDistanceTextField | {
"repo_name": "iCarto/siga",
"path": "extGeoProcessing/src/com/iver/cit/gvsig/geoprocess/impl/buffer/gui/GeoProcessingBufferPanel.java",
"license": "gpl-3.0",
"size": 21001
} | [
"javax.swing.JTextField"
] | import javax.swing.JTextField; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,537,967 |
public Collection<Line2D> getWalls() {
return this.walls;
} | Collection<Line2D> function() { return this.walls; } | /**
* Returns the list walls seen (the origin of coordinates
* is the agent's current position)
* @return the list of walls seen
*/ | Returns the list walls seen (the origin of coordinates is the agent's current position) | getWalls | {
"repo_name": "XavierCollBagur/ZombieInvasion--Prepare-yourself-",
"path": "ZombieInvasion/src/Agents/Base/BasePerceptions.java",
"license": "gpl-3.0",
"size": 3770
} | [
"java.awt.geom.Line2D",
"java.util.Collection"
] | import java.awt.geom.Line2D; import java.util.Collection; | import java.awt.geom.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 870,439 |
public void registerFilters() {
boolean acceptAllInterfaces = true;
// if specified, use the given annotation and / or marker interface
if (this.annotationClass != null) {
addIncludeFilter(new AnnotationTypeFilter(this.annotationClass));
acceptAllInterfaces = false;
} | void function() { boolean acceptAllInterfaces = true; if (this.annotationClass != null) { addIncludeFilter(new AnnotationTypeFilter(this.annotationClass)); acceptAllInterfaces = false; } | /**
* Configures parent scanner to search for the right interfaces. It can search
* for all interfaces or just for those that extends a markerInterface or/and
* those annotated with the annotationClass
*/ | Configures parent scanner to search for the right interfaces. It can search for all interfaces or just for those that extends a markerInterface or/and those annotated with the annotationClass | registerFilters | {
"repo_name": "gdarmont/mybatis-spring",
"path": "src/main/java/org/mybatis/spring/mapper/ClassPathMapperScanner.java",
"license": "apache-2.0",
"size": 8868
} | [
"org.springframework.core.type.filter.AnnotationTypeFilter"
] | import org.springframework.core.type.filter.AnnotationTypeFilter; | import org.springframework.core.type.filter.*; | [
"org.springframework.core"
] | org.springframework.core; | 2,738,572 |
@VisibleForTesting
static boolean parseArguments(String args[], Configuration conf) {
StartupOption startOpt = StartupOption.REGULAR;
int i = 0;
if (args != null && args.length != 0) {
String cmd = args[i++];
if ("-r".equalsIgnoreCase(cmd) || "--rack".equalsIgnoreCase(cmd)) {
LOG.er... | static boolean parseArguments(String args[], Configuration conf) { StartupOption startOpt = StartupOption.REGULAR; int i = 0; if (args != null && args.length != 0) { String cmd = args[i++]; if ("-r".equalsIgnoreCase(cmd) STR.equalsIgnoreCase(cmd)) { LOG.error(STR + STR); return false; } else if (StartupOption.ROLLBACK.... | /**
* Parse and verify command line arguments and set configuration parameters.
*
* @return false if passed argements are incorrect
*/ | Parse and verify command line arguments and set configuration parameters | parseArguments | {
"repo_name": "oza/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java",
"license": "apache-2.0",
"size": 116795
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.server.common.HdfsServerConstants"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; | import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.server.common.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,036,195 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.