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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
void setServerSocket(ServerSocket serverSocket);
| void setServerSocket(ServerSocket serverSocket); | /**
* Sets the {@link ServerSocket} for the server.
*
* @param serverSocket for the server
* @see ServerSocket
* @since 0.0.1
*/ | Sets the <code>ServerSocket</code> for the server | setServerSocket | {
"repo_name": "slaubenberger/wichtel",
"path": "src/main/java/net/laubenberger/wichtel/controller/net/server/Server.java",
"license": "lgpl-3.0",
"size": 2969
} | [
"java.net.ServerSocket"
] | import java.net.ServerSocket; | import java.net.*; | [
"java.net"
] | java.net; | 2,185,050 |
@Override
public String toString() {
boolean connected = isConnected();
if (strValConnected == connected && strVal != null) {
return strVal;
}
StringBuilder buf = new StringBuilder(128);
buf.append("[id: 0x");
buf.append(getIdString());
Socke... | String function() { boolean connected = isConnected(); if (strValConnected == connected && strVal != null) { return strVal; } StringBuilder buf = new StringBuilder(128); buf.append(STR); buf.append(getIdString()); SocketAddress localAddress = getLocalAddress(); SocketAddress remoteAddress = getRemoteAddress(); if (remo... | /**
* Returns the {@link String} representation of this channel. The returned
* string contains the {@linkplain #getId() ID}, {@linkplain #getLocalAddress() local address},
* and {@linkplain #getRemoteAddress() remote address} of this channel for
* easier identification.
*/ | Returns the <code>String</code> representation of this channel. The returned string contains the #getId() ID, #getLocalAddress() local address, and #getRemoteAddress() remote address of this channel for easier identification | toString | {
"repo_name": "xiexingguang/simple-netty-source",
"path": "src/main/java/org/jboss/netty/channel/core/impl/AbstractChannel.java",
"license": "apache-2.0",
"size": 11034
} | [
"java.net.SocketAddress"
] | import java.net.SocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 2,705,081 |
public void tearDown() throws IOException {
objInputStream.close();
objOutputStream.close();
socket.close();
} | void function() throws IOException { objInputStream.close(); objOutputStream.close(); socket.close(); } | /**
* Closes the <code>Socket</code> and the object streams obtained
* from it.
*
* @throws IOException if an exception occurs while trying to close
* the socket or the streams.
*/ | Closes the <code>Socket</code> and the object streams obtained from it | tearDown | {
"repo_name": "gemxd/gemfirexd-oss",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/store/replication/net/SocketConnection.java",
"license": "apache-2.0",
"size": 4103
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,961,848 |
private ITreeNode createITreeNode(Competency c) {
ITreeNode node = new TreeNode();
node.setId(c.getId().toString());
if (isSetLocale()) {
// change name only when the locale is actually set
c.setName(cpm.getName(c, this.locale.getLanguage()));
}
node.setNa... | ITreeNode function(Competency c) { ITreeNode node = new TreeNode(); node.setId(c.getId().toString()); if (isSetLocale()) { c.setName(cpm.getName(c, this.locale.getLanguage())); } node.setName(c.getName()); node.setObject(c); if (c instanceof CompetencyProcess) { node.setType(STR); } if (c instanceof ConcreteCompetency)... | /**
* Create a an ITree representation of a competency process.
*
* @param c
* @return
*/ | Create a an ITree representation of a competency process | createITreeNode | {
"repo_name": "i2geo/CompEd",
"path": "comped/src/main/java/net/i2geo/comped/service/impl/CompetencyITreeManagerImpl.java",
"license": "apache-2.0",
"size": 10691
} | [
"com.jenkov.prizetags.tree.impl.TreeNode",
"com.jenkov.prizetags.tree.itf.ITreeNode",
"net.i2geo.comped.model.Competency",
"net.i2geo.comped.model.CompetencyProcess",
"net.i2geo.comped.model.ConcreteCompetency"
] | import com.jenkov.prizetags.tree.impl.TreeNode; import com.jenkov.prizetags.tree.itf.ITreeNode; import net.i2geo.comped.model.Competency; import net.i2geo.comped.model.CompetencyProcess; import net.i2geo.comped.model.ConcreteCompetency; | import com.jenkov.prizetags.tree.impl.*; import com.jenkov.prizetags.tree.itf.*; import net.i2geo.comped.model.*; | [
"com.jenkov.prizetags",
"net.i2geo.comped"
] | com.jenkov.prizetags; net.i2geo.comped; | 1,810,657 |
@Override
public int[] getGlyphCharIndices(int beginGlyphIndex, int numEntries,
int[] codeReturn) {
if ((beginGlyphIndex < 0) || (beginGlyphIndex >= this.getNumGlyphs())) {
// awt.44=beginGlyphIndex is out of vector's range
throw new IllegalArgumentException(Mess... | int[] function(int beginGlyphIndex, int numEntries, int[] codeReturn) { if ((beginGlyphIndex < 0) (beginGlyphIndex >= this.getNumGlyphs())) { throw new IllegalArgumentException(Messages.getString(STR)); } if ((numEntries < 0) ((numEntries + beginGlyphIndex) > this.getNumGlyphs())) { throw new IllegalArgumentException(M... | /**
* Returns an array of numEntries character indices for the specified glyphs.
*
* @param beginGlyphIndex the start index
* @param numEntries the number of glyph codes to get
* @param codeReturn the array that receives glyph codes' values
* @return an array that receives glyph cha... | Returns an array of numEntries character indices for the specified glyphs | getGlyphCharIndices | {
"repo_name": "shannah/cn1",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/CommonGlyphVector.java",
"license": "gpl-2.0",
"size": 32407
} | [
"org.apache.harmony.awt.internal.nls.Messages"
] | import org.apache.harmony.awt.internal.nls.Messages; | import org.apache.harmony.awt.internal.nls.*; | [
"org.apache.harmony"
] | org.apache.harmony; | 989,139 |
public static boolean isPseudoHeader(AsciiString header) {
return PSEUDO_HEADERS.contains(header);
}
} | static boolean function(AsciiString header) { return PSEUDO_HEADERS.contains(header); } } | /**
* Indicates whether the given header name is a valid HTTP/2 pseudo header.
*/ | Indicates whether the given header name is a valid HTTP/2 pseudo header | isPseudoHeader | {
"repo_name": "Sandyarathi/Lab2gRPC",
"path": "lib/netty/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Headers.java",
"license": "bsd-3-clause",
"size": 6206
} | [
"io.netty.handler.codec.AsciiString"
] | import io.netty.handler.codec.AsciiString; | import io.netty.handler.codec.*; | [
"io.netty.handler"
] | io.netty.handler; | 730,643 |
public DeploymentMode deploymentMode() {
return this.deploymentMode;
} | DeploymentMode function() { return this.deploymentMode; } | /**
* Get describes the type of ARM deployment to be performed on the resource. Possible values include: 'Incremental', 'Complete'.
*
* @return the deploymentMode value
*/ | Get describes the type of ARM deployment to be performed on the resource. Possible values include: 'Incremental', 'Complete' | deploymentMode | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/deploymentmanager/mgmt-v2019_11_01_preview/src/main/java/com/microsoft/azure/management/deploymentmanager/v2019_11_01_preview/implementation/ServiceUnitResourceInner.java",
"license": "mit",
"size": 3421
} | [
"com.microsoft.azure.management.deploymentmanager.v2019_11_01_preview.DeploymentMode"
] | import com.microsoft.azure.management.deploymentmanager.v2019_11_01_preview.DeploymentMode; | import com.microsoft.azure.management.deploymentmanager.v2019_11_01_preview.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,159,471 |
void processResourceRequirements(ResourceRequirements resourceRequirements); | void processResourceRequirements(ResourceRequirements resourceRequirements); | /**
* Notifies the slot manager about the resource requirements of a job.
*
* @param resourceRequirements resource requirements of a job
*/ | Notifies the slot manager about the resource requirements of a job | processResourceRequirements | {
"repo_name": "aljoscha/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java",
"license": "apache-2.0",
"size": 7178
} | [
"org.apache.flink.runtime.slots.ResourceRequirements"
] | import org.apache.flink.runtime.slots.ResourceRequirements; | import org.apache.flink.runtime.slots.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,846,047 |
private Object evaluate( MethodContext ctx ) {
String s = ctx.getChild( 1 ).getText();
int pos = s.indexOf( '.' );
String type = s.substring( 0, pos );
String method = s.substring( pos + 1 );
ParametersContext pc = (ParametersContext) ctx.getChild( 2 );
List<Object> params = new ArrayList<Object>();
fo... | Object function( MethodContext ctx ) { String s = ctx.getChild( 1 ).getText(); int pos = s.indexOf( '.' ); String type = s.substring( 0, pos ); String method = s.substring( pos + 1 ); ParametersContext pc = (ParametersContext) ctx.getChild( 2 ); List<Object> params = new ArrayList<Object>(); for ( int i = 1, count = pc... | /**
* Evaluate an EL method.
* <p>
* @param ctx the EL method context.
* @return the resolved value.
* @throws IllegalStateException if the EL method specifies an unknown evaluator.
*/ | Evaluate an EL method. | evaluate | {
"repo_name": "rnott/rnott.org",
"path": "mock/src/main/java/org/rnott/mock/ExpressionLanguageEvaluator.java",
"license": "apache-2.0",
"size": 5202
} | [
"java.util.ArrayList",
"java.util.List",
"org.antlr.v4.runtime.ParserRuleContext",
"org.rnott.mock.ExpressionLanguageParser"
] | import java.util.ArrayList; import java.util.List; import org.antlr.v4.runtime.ParserRuleContext; import org.rnott.mock.ExpressionLanguageParser; | import java.util.*; import org.antlr.v4.runtime.*; import org.rnott.mock.*; | [
"java.util",
"org.antlr.v4",
"org.rnott.mock"
] | java.util; org.antlr.v4; org.rnott.mock; | 2,060,202 |
protected void startActivityForResult(Intent intent, int code) {
if (fragment == null) {
activity.startActivityForResult(intent, code);
} else {
fragment.startActivityForResult(intent, code);
}
} | void function(Intent intent, int code) { if (fragment == null) { activity.startActivityForResult(intent, code); } else { fragment.startActivityForResult(intent, code); } } | /**
* Start an activity. This method is defined to allow different methods of activity starting for
* newer versions of Android and for compatibility library.
*
* @param intent Intent to start.
* @param code Request code for the activity
* @see Activity#startActivityForResult(Intent, int... | Start an activity. This method is defined to allow different methods of activity starting for newer versions of Android and for compatibility library | startActivityForResult | {
"repo_name": "JimSeker/AudioVideo",
"path": "qrDemo/app/src/main/java/edu/cs4730/qrDemo/IntentIntegrator.java",
"license": "apache-2.0",
"size": 20372
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 2,566,860 |
@NonNull
Self containsKey(@NonNull String key); | Self containsKey(@NonNull String key); | /**
* Assert the subject bundle contains key.
*/ | Assert the subject bundle contains key | containsKey | {
"repo_name": "busybusy/DBC-Android",
"path": "lib/src/main/java/com/busybusy/dbc/checks/BundleChecks.java",
"license": "apache-2.0",
"size": 1094
} | [
"androidx.annotation.NonNull"
] | import androidx.annotation.NonNull; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 1,042,678 |
synchronized void enterSafeMode() throws IOException {
if (!isInSafeMode()) {
safeMode = new SafeModeInfo();
return;
}
safeMode.setManual();
getEditLog().logSync();
NameNode.stateChangeLog.info("STATE* Safe mode is ON. "
+ safeMode.getTurnOffTip());
} | synchronized void enterSafeMode() throws IOException { if (!isInSafeMode()) { safeMode = new SafeModeInfo(); return; } safeMode.setManual(); getEditLog().logSync(); NameNode.stateChangeLog.info(STR + safeMode.getTurnOffTip()); } | /**
* Enter safe mode manually.
* @throws IOException
*/ | Enter safe mode manually | enterSafeMode | {
"repo_name": "wzhuo918/release-1.1.2-MDP",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java",
"license": "apache-2.0",
"size": 226670
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,605,780 |
public void setMenu(int res) {
setMenu(LayoutInflater.from(getContext()).inflate(res, null));
} | void function(int res) { setMenu(LayoutInflater.from(getContext()).inflate(res, null)); } | /**
* Set the behind view (menu) content from a layout resource. The resource will be inflated, adding all top-level views
* to the behind view.
*
* @param res the new content
*/ | Set the behind view (menu) content from a layout resource. The resource will be inflated, adding all top-level views to the behind view | setMenu | {
"repo_name": "kkooff114/LJWCommon",
"path": "src/com/slidingmenu/lib/SlidingMenu.java",
"license": "gpl-3.0",
"size": 28137
} | [
"android.view.LayoutInflater"
] | import android.view.LayoutInflater; | import android.view.*; | [
"android.view"
] | android.view; | 1,048,555 |
public void initWindow() {
//setLocationRelativeTo(null);
setAlwaysOnTop(false);
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
setLayout(new BorderLayout());
add(renderSurface, BorderLayout.CENTER);
Logger.info("Game window initialized.");
}
| void function() { setAlwaysOnTop(false); setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); setLayout(new BorderLayout()); add(renderSurface, BorderLayout.CENTER); Logger.info(STR); } | /**
* Initialize window components
*/ | Initialize window components | initWindow | {
"repo_name": "bwyap/java-familyfeud",
"path": "src/bwyap/familyfeud/gui/window/GameWindow.java",
"license": "mit",
"size": 2588
} | [
"java.awt.BorderLayout",
"javax.swing.JFrame"
] | import java.awt.BorderLayout; import javax.swing.JFrame; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,260,982 |
this.conf = conf;
// Grab the agent names we advertise to robots files.
String agentName = conf.get("http.agent.name");
if (agentName == null || (agentName = agentName.trim()).isEmpty()) {
throw new RuntimeException("Agent name not configured!");
}
agentNames = agentName;
// If there are... | this.conf = conf; String agentName = conf.get(STR); if (agentName == null (agentName = agentName.trim()).isEmpty()) { throw new RuntimeException(STR); } agentNames = agentName; String otherAgents = conf.get(STR); if (otherAgents != null && !otherAgents.trim().isEmpty()) { StringTokenizer tok = new StringTokenizer(other... | /**
* Set the {@link Configuration} object
*/ | Set the <code>Configuration</code> object | setConf | {
"repo_name": "supermy/nutch2",
"path": "src/java/org/apache/nutch/protocol/RobotRulesParser.java",
"license": "apache-2.0",
"size": 6297
} | [
"java.util.StringTokenizer"
] | import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 389,571 |
@Test()
public void testErrorBehaviors()
throws Exception
{
for (final MultiUpdateErrorBehavior b : MultiUpdateErrorBehavior.values())
{
assertNotNull(b);
assertEquals(MultiUpdateErrorBehavior.valueOf(b.intValue()), b);
assertEquals(MultiUpdateErrorBehavior.valueOf(b.name()), ... | @Test() void function() throws Exception { for (final MultiUpdateErrorBehavior b : MultiUpdateErrorBehavior.values()) { assertNotNull(b); assertEquals(MultiUpdateErrorBehavior.valueOf(b.intValue()), b); assertEquals(MultiUpdateErrorBehavior.valueOf(b.name()), b); } } | /**
* Provides basic test coverage for each of the error behaviors.
*
* @throws Exception If an unexpected problem occurs.
*/ | Provides basic test coverage for each of the error behaviors | testErrorBehaviors | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/extensions/MultiUpdateErrorBehaviorTestCase.java",
"license": "gpl-2.0",
"size": 4862
} | [
"org.testng.annotations.Test"
] | import org.testng.annotations.Test; | import org.testng.annotations.*; | [
"org.testng.annotations"
] | org.testng.annotations; | 1,844,229 |
public List<SubResource> loadBalancerBackendAddressPools() {
return this.innerProperties() == null ? null : this.innerProperties().loadBalancerBackendAddressPools();
} | List<SubResource> function() { return this.innerProperties() == null ? null : this.innerProperties().loadBalancerBackendAddressPools(); } | /**
* Get the loadBalancerBackendAddressPools property: Specifies an array of references to backend address pools of
* load balancers. A scale set can reference backend address pools of one public and one internal load balancer.
* Multiple scale sets cannot use the same basic sku load balancer.
*
... | Get the loadBalancerBackendAddressPools property: Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer | loadBalancerBackendAddressPools | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetIpConfiguration.java",
"license": "mit",
"size": 12249
} | [
"com.azure.core.management.SubResource",
"java.util.List"
] | import com.azure.core.management.SubResource; import java.util.List; | import com.azure.core.management.*; import java.util.*; | [
"com.azure.core",
"java.util"
] | com.azure.core; java.util; | 1,485,384 |
public synchronized Client smartClient() {
NodeAndClient randomNodeAndClient = getRandomNodeAndClient();
if (randomNodeAndClient != null) {
return randomNodeAndClient.nodeClient();
}
Assert.fail("No smart client found");
return null; // can't happen
} | synchronized Client function() { NodeAndClient randomNodeAndClient = getRandomNodeAndClient(); if (randomNodeAndClient != null) { return randomNodeAndClient.nodeClient(); } Assert.fail(STR); return null; } | /**
* Returns a "smart" node client to a random node in the cluster
*/ | Returns a "smart" node client to a random node in the cluster | smartClient | {
"repo_name": "zkidkid/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java",
"license": "apache-2.0",
"size": 85193
} | [
"org.elasticsearch.client.Client",
"org.junit.Assert"
] | import org.elasticsearch.client.Client; import org.junit.Assert; | import org.elasticsearch.client.*; import org.junit.*; | [
"org.elasticsearch.client",
"org.junit"
] | org.elasticsearch.client; org.junit; | 58,235 |
protected synchronized TestEnvironment createTestEnvironment(TestParameters Param,
PrintWriter log) {
return super.createTestEnvironment(Param, log);
} | synchronized TestEnvironment function(TestParameters Param, PrintWriter log) { return super.createTestEnvironment(Param, log); } | /**
* calls <CODE>createTestEnvironment()</CODE> from it's super class
* @param Param the test parameter
* @param log the log writer
* @return lib.TestEnvironment
*/ | calls <code>createTestEnvironment()</code> from it's super class | createTestEnvironment | {
"repo_name": "qt-haiku/LibreOffice",
"path": "qadevOOo/tests/java/mod/_forms/OEditModel.java",
"license": "gpl-3.0",
"size": 6242
} | [
"java.io.PrintWriter"
] | import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 2,154,301 |
private static <K, V> SetMultimap<K, V> filterFiltered(
FilteredSetMultimap<K, V> multimap,
Predicate<? super Entry<K, V>> entryPredicate) {
Predicate<Entry<K, V>> predicate
= Predicates.and(multimap.entryPredicate(), entryPredicate);
return new FilteredEntrySetMultimap<K, V>(multimap.unfi... | static <K, V> SetMultimap<K, V> function( FilteredSetMultimap<K, V> multimap, Predicate<? super Entry<K, V>> entryPredicate) { Predicate<Entry<K, V>> predicate = Predicates.and(multimap.entryPredicate(), entryPredicate); return new FilteredEntrySetMultimap<K, V>(multimap.unfiltered(), predicate); } | /**
* Support removal operations when filtering a filtered multimap. Since a filtered multimap has
* iterators that don't support remove, passing one to the FilteredEntryMultimap constructor would
* lead to a multimap whose removal operations would fail. This method combines the predicates to
* avoid that p... | Support removal operations when filtering a filtered multimap. Since a filtered multimap has iterators that don't support remove, passing one to the FilteredEntryMultimap constructor would lead to a multimap whose removal operations would fail. This method combines the predicates to avoid that problem | filterFiltered | {
"repo_name": "oneliang/third-party-lib",
"path": "google/com/google/common/collect/Multimaps.java",
"license": "apache-2.0",
"size": 78476
} | [
"com.google.common.base.Predicate",
"com.google.common.base.Predicates",
"java.util.Map"
] | import com.google.common.base.Predicate; import com.google.common.base.Predicates; import java.util.Map; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,691,808 |
public List getLocalBucketsListTestOnly() {
List localBucketList = null;
if (this.dataStore != null) {
localBucketList = this.dataStore.getLocalBucketsListTestOnly();
}
return localBucketList;
} | List function() { List localBucketList = null; if (this.dataStore != null) { localBucketList = this.dataStore.getLocalBucketsListTestOnly(); } return localBucketList; } | /**
* A test method to get the list of all the bucket ids for the partitioned region in the data
* Store.
*/ | A test method to get the list of all the bucket ids for the partitioned region in the data Store | getLocalBucketsListTestOnly | {
"repo_name": "PurelyApplied/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java",
"license": "apache-2.0",
"size": 379321
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 762,280 |
public void deleteColumn(K key, String familyName, ByteBuffer columnName) {
synchronized(mutator) {
HectorUtils.deleteColumn(mutator, key, familyName, columnName);
}
} | void function(K key, String familyName, ByteBuffer columnName) { synchronized(mutator) { HectorUtils.deleteColumn(mutator, key, familyName, columnName); } } | /**
* Delete a row within the keyspace.
* @param key
* @param fieldName
* @param columnName
*/ | Delete a row within the keyspace | deleteColumn | {
"repo_name": "infospace/gora",
"path": "gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java",
"license": "apache-2.0",
"size": 25042
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,606,150 |
protected List<BelDocument> getBelDocuments(KamHandle kamHandle) {
GetBelDocumentsRequest getBelDocumentsRequest = new GetBelDocumentsRequest();
getBelDocumentsRequest.setHandle(kamHandle);
GetBelDocumentsResponse response = api.getBelDocuments(getBelDocumentsRequest);
return respons... | List<BelDocument> function(KamHandle kamHandle) { GetBelDocumentsRequest getBelDocumentsRequest = new GetBelDocumentsRequest(); getBelDocumentsRequest.setHandle(kamHandle); GetBelDocumentsResponse response = api.getBelDocuments(getBelDocumentsRequest); return response.getDocuments(); } | /**
* Gets a list of documents used in a KAM
* @param kam
* @return
*/ | Gets a list of documents used in a KAM | getBelDocuments | {
"repo_name": "OpenBEL/openbel-framework-examples",
"path": "web-api/java/KamSummarizerExample.java",
"license": "apache-2.0",
"size": 9281
} | [
"com.selventa.belframework.ws.client.BelDocument",
"com.selventa.belframework.ws.client.GetBelDocumentsRequest",
"com.selventa.belframework.ws.client.GetBelDocumentsResponse",
"com.selventa.belframework.ws.client.KamHandle",
"java.util.List"
] | import com.selventa.belframework.ws.client.BelDocument; import com.selventa.belframework.ws.client.GetBelDocumentsRequest; import com.selventa.belframework.ws.client.GetBelDocumentsResponse; import com.selventa.belframework.ws.client.KamHandle; import java.util.List; | import com.selventa.belframework.ws.client.*; import java.util.*; | [
"com.selventa.belframework",
"java.util"
] | com.selventa.belframework; java.util; | 2,688,791 |
public void testGetDatasetCount() {
XYPlot plot = new XYPlot();
assertEquals(0, plot.getDatasetCount());
} | void function() { XYPlot plot = new XYPlot(); assertEquals(0, plot.getDatasetCount()); } | /**
* Added this test in response to a bug report.
*/ | Added this test in response to a bug report | testGetDatasetCount | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/plot/junit/XYPlotTests.java",
"license": "lgpl-2.1",
"size": 30048
} | [
"org.jfree.chart.plot.XYPlot"
] | import org.jfree.chart.plot.XYPlot; | import org.jfree.chart.plot.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 791,849 |
public void displayAlert(final String title, final String text, final AlertType type); | void function(final String title, final String text, final AlertType type); | /**
* Utility function to show a Java ME alert, as used for informing the user
* about events in this demo app.
* @param title title text to use for the message box.
* @param text text to show as the main message in the box.
* @param type one of the available alert types, defining the icon, sou... | Utility function to show a Java ME alert, as used for informing the user about events in this demo app | displayAlert | {
"repo_name": "andijakl/nfccreator",
"path": "src/com/nokia/examples/InfoInterface.java",
"license": "gpl-3.0",
"size": 2114
} | [
"javax.microedition.lcdui.AlertType"
] | import javax.microedition.lcdui.AlertType; | import javax.microedition.lcdui.*; | [
"javax.microedition"
] | javax.microedition; | 2,769,890 |
public String getAdjustmentTotalScore()
{
return Validator.check(adjustmentTotalScore, "N/A");
} | String function() { return Validator.check(adjustmentTotalScore, "N/A"); } | /**
* get the adjustment to the total score
*
* @return the total score
*/ | get the adjustment to the total score | getAdjustmentTotalScore | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/evaluation/TotalScoresBean.java",
"license": "apache-2.0",
"size": 32286
} | [
"org.sakaiproject.tool.assessment.ui.bean.util.Validator"
] | import org.sakaiproject.tool.assessment.ui.bean.util.Validator; | import org.sakaiproject.tool.assessment.ui.bean.util.*; | [
"org.sakaiproject.tool"
] | org.sakaiproject.tool; | 2,744,425 |
protected NBTTagList newFloatNBTList(float... numbers)
{
NBTTagList nbttaglist = new NBTTagList();
for (float f : numbers)
{
nbttaglist.appendTag(new NBTTagFloat(f));
}
return nbttaglist;
} | NBTTagList function(float... numbers) { NBTTagList nbttaglist = new NBTTagList(); for (float f : numbers) { nbttaglist.appendTag(new NBTTagFloat(f)); } return nbttaglist; } | /**
* Returns a new NBTTagList filled with the specified floats
*/ | Returns a new NBTTagList filled with the specified floats | newFloatNBTList | {
"repo_name": "SkidJava/BaseClient",
"path": "new_1.8.8/net/minecraft/entity/Entity.java",
"license": "gpl-2.0",
"size": 87662
} | [
"net.minecraft.nbt.NBTTagFloat",
"net.minecraft.nbt.NBTTagList"
] | import net.minecraft.nbt.NBTTagFloat; import net.minecraft.nbt.NBTTagList; | import net.minecraft.nbt.*; | [
"net.minecraft.nbt"
] | net.minecraft.nbt; | 1,785,056 |
protected boolean updateAttachmentPoint() {
if (attachmentPoints == null || attachmentPoints.isEmpty())
return false;
boolean moved = false;
Map<Long, AttachmentPoint> newMap = getAPMap(this.attachmentPoints);
if ( newMap.size() != this.attachmentPoints.size() ) {
moved = true;
}
// Prepar... | boolean function() { if (attachmentPoints == null attachmentPoints.isEmpty()) return false; boolean moved = false; Map<Long, AttachmentPoint> newMap = getAPMap(this.attachmentPoints); if ( newMap.size() != this.attachmentPoints.size() ) { moved = true; } if (moved) { if ( newMap != null ) { this.attachmentPoints.retain... | /**
* Updates the known attachment points. This method is called whenever
* topology changes.
*
* @return true if there is any change to the list of attachment points
* -- which indicates a possible device move
*/ | Updates the known attachment points. This method is called whenever topology changes | updateAttachmentPoint | {
"repo_name": "justin-labry/IRIS",
"path": "Torpedo/src/etri/sdn/controller/module/devicemanager/Device.java",
"license": "apache-2.0",
"size": 19357
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,133,171 |
public FeatureSet loadFeatureSet(File featureFile)
throws IOException; | FeatureSet function(File featureFile) throws IOException; | /**
* Load a FeatureSet
* @param featureFile
* @return
* @throws IOException
*/ | Load a FeatureSet | loadFeatureSet | {
"repo_name": "dhmay/msInspect",
"path": "src/org/fhcrc/cpl/toolbox/proteomics/feature/filehandler/FeatureSetFileHandler.java",
"license": "apache-2.0",
"size": 2045
} | [
"java.io.File",
"java.io.IOException",
"org.fhcrc.cpl.toolbox.proteomics.feature.FeatureSet"
] | import java.io.File; import java.io.IOException; import org.fhcrc.cpl.toolbox.proteomics.feature.FeatureSet; | import java.io.*; import org.fhcrc.cpl.toolbox.proteomics.feature.*; | [
"java.io",
"org.fhcrc.cpl"
] | java.io; org.fhcrc.cpl; | 2,233,982 |
public void verifySamlProfileRequestIfNeeded(final RequestAbstractType profileRequest,
final MetadataResolver resolver,
final HttpServletRequest request,
final MessageCo... | void function(final RequestAbstractType profileRequest, final MetadataResolver resolver, final HttpServletRequest request, final MessageContext context) throws Exception { val roleDescriptorResolver = getRoleDescriptorResolver(resolver, context, profileRequest); LOGGER.debug(STR, profileRequest.getClass().getName()); v... | /**
* Verify saml profile request if needed.
*
* @param profileRequest the profile request
* @param resolver the resolver
* @param request the request
* @param context the context
* @throws Exception the exception
*/ | Verify saml profile request if needed | verifySamlProfileRequestIfNeeded | {
"repo_name": "rrenomeron/cas",
"path": "support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/enc/validate/SamlObjectSignatureValidator.java",
"license": "apache-2.0",
"size": 14268
} | [
"javax.servlet.http.HttpServletRequest",
"org.opensaml.messaging.context.MessageContext",
"org.opensaml.saml.metadata.resolver.MetadataResolver",
"org.opensaml.saml.saml2.core.RequestAbstractType"
] | import javax.servlet.http.HttpServletRequest; import org.opensaml.messaging.context.MessageContext; import org.opensaml.saml.metadata.resolver.MetadataResolver; import org.opensaml.saml.saml2.core.RequestAbstractType; | import javax.servlet.http.*; import org.opensaml.messaging.context.*; import org.opensaml.saml.metadata.resolver.*; import org.opensaml.saml.saml2.core.*; | [
"javax.servlet",
"org.opensaml.messaging",
"org.opensaml.saml"
] | javax.servlet; org.opensaml.messaging; org.opensaml.saml; | 185,166 |
public synchronized void applyRule(TpsControlRule newControlRule) {
Loggers.TPS_CONTROL.info("Apply tps control rule parse start,pointName=[{}] ", this.getPointName());
//1.reset all monitor point for null.
if (newControlRule == null) {
Loggers.TPS_CONTROL.info... | synchronized void function(TpsControlRule newControlRule) { Loggers.TPS_CONTROL.info(STR, this.getPointName()); if (newControlRule == null) { Loggers.TPS_CONTROL.info(STR, this.getPointName()); this.tpsRecorder.clearLimitRule(); this.stopAllMonitorClient(); return; } TpsControlRule.Rule newPointRule = newControlRule.ge... | /**
* apply tps control rule to this point.
*
* @param newControlRule controlRule.
*/ | apply tps control rule to this point | applyRule | {
"repo_name": "alibaba/nacos",
"path": "core/src/main/java/com/alibaba/nacos/core/remote/control/TpsMonitorPoint.java",
"license": "apache-2.0",
"size": 12959
} | [
"com.alibaba.nacos.core.utils.Loggers",
"java.util.Iterator",
"java.util.Map",
"java.util.Objects",
"java.util.concurrent.TimeUnit"
] | import com.alibaba.nacos.core.utils.Loggers; import java.util.Iterator; import java.util.Map; import java.util.Objects; import java.util.concurrent.TimeUnit; | import com.alibaba.nacos.core.utils.*; import java.util.*; import java.util.concurrent.*; | [
"com.alibaba.nacos",
"java.util"
] | com.alibaba.nacos; java.util; | 1,130,452 |
MessageMetaData move(Mailbox<Id> mailbox,Message<Id> original) throws MailboxException;
/**
* Return the last uid which were used for storing a Message in the {@link Mailbox} | MessageMetaData move(Mailbox<Id> mailbox,Message<Id> original) throws MailboxException; /** * Return the last uid which were used for storing a Message in the {@link Mailbox} | /**
* Move the given {@link Message} to a new mailbox and return the uid of the moved. Be aware that the given uid is just a suggestion for the uid of the moved
* message. Implementation may choose to use a different one, so only depend on the returned uid!
*
* @param mailbox the Mailbox to move to... | Move the given <code>Message</code> to a new mailbox and return the uid of the moved. Be aware that the given uid is just a suggestion for the uid of the moved message. Implementation may choose to use a different one, so only depend on the returned uid | move | {
"repo_name": "aduprat/james-mailbox",
"path": "store/src/main/java/org/apache/james/mailbox/store/mail/MessageMapper.java",
"license": "apache-2.0",
"size": 8449
} | [
"org.apache.james.mailbox.exception.MailboxException",
"org.apache.james.mailbox.model.MessageMetaData",
"org.apache.james.mailbox.store.mail.model.Mailbox",
"org.apache.james.mailbox.store.mail.model.Message"
] | import org.apache.james.mailbox.exception.MailboxException; import org.apache.james.mailbox.model.MessageMetaData; import org.apache.james.mailbox.store.mail.model.Mailbox; import org.apache.james.mailbox.store.mail.model.Message; | import org.apache.james.mailbox.exception.*; import org.apache.james.mailbox.model.*; import org.apache.james.mailbox.store.mail.model.*; | [
"org.apache.james"
] | org.apache.james; | 1,244,343 |
static PrimaryKey[] pathToKey(Collection<Path> paths) {
if (paths == null) {
return null;
}
final PrimaryKey[] keys = new PrimaryKey[paths.size()];
int i = 0;
for (Path p : paths) {
keys[i++] = pathToKey(p);
}
return keys;
}
private PathMetadataDynamoDBTranslation() {
... | static PrimaryKey[] pathToKey(Collection<Path> paths) { if (paths == null) { return null; } final PrimaryKey[] keys = new PrimaryKey[paths.size()]; int i = 0; for (Path p : paths) { keys[i++] = pathToKey(p); } return keys; } private PathMetadataDynamoDBTranslation() { } | /**
* Converts a collection of {@link Path} to a collection of DynamoDB keys.
*
* @see #pathToKey(Path)
*/ | Converts a collection of <code>Path</code> to a collection of DynamoDB keys | pathToKey | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/s3guard/PathMetadataDynamoDBTranslation.java",
"license": "apache-2.0",
"size": 14184
} | [
"com.amazonaws.services.dynamodbv2.document.PrimaryKey",
"java.util.Collection",
"org.apache.hadoop.fs.Path"
] | import com.amazonaws.services.dynamodbv2.document.PrimaryKey; import java.util.Collection; import org.apache.hadoop.fs.Path; | import com.amazonaws.services.dynamodbv2.document.*; import java.util.*; import org.apache.hadoop.fs.*; | [
"com.amazonaws.services",
"java.util",
"org.apache.hadoop"
] | com.amazonaws.services; java.util; org.apache.hadoop; | 2,312,349 |
public String exportTemplateAsXml(String key, Locale locale);
| String function(String key, Locale locale); | /**
* Export a given template as xml
* @param key
* @param locale
* @return
*/ | Export a given template as xml | exportTemplateAsXml | {
"repo_name": "pushyamig/sakai",
"path": "emailtemplateservice/api/src/java/org/sakaiproject/emailtemplateservice/service/EmailTemplateService.java",
"license": "apache-2.0",
"size": 6070
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 952,989 |
List<GraphvizNode> getGraphvizNodes(); | List<GraphvizNode> getGraphvizNodes(); | /**
* Retrieve a list of nodes in the graph.
*
* @return A list of nodes in the graph.
*/ | Retrieve a list of nodes in the graph | getGraphvizNodes | {
"repo_name": "johan/closure-compiler",
"path": "src/com/google/javascript/jscomp/graph/GraphvizGraph.java",
"license": "apache-2.0",
"size": 2587
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,281,037 |
private boolean areDifferent(JournalHeader oldJournal, CalendarEntry element) {
if (oldJournal.getClassification().isPrivate() != Classification.PRIVATE.equals(element
.getClassification())) {
return true;
} else if (!oldJournal.getDescription().equals(element.getDescription())) {
return t... | boolean function(JournalHeader oldJournal, CalendarEntry element) { if (oldJournal.getClassification().isPrivate() != Classification.PRIVATE.equals(element .getClassification())) { return true; } else if (!oldJournal.getDescription().equals(element.getDescription())) { return true; } else if (!oldJournal.getEndDay().eq... | /**
* Check if event has changed
*
* @param oldJournal event in Silverpeas
* @param element event from external application
* @return
*/ | Check if event has changed | areDifferent | {
"repo_name": "ebonnet/Silverpeas-Core",
"path": "core-war/src/main/java/org/silverpeas/web/calendar/OutlookSyncCalendarServlet.java",
"license": "agpl-3.0",
"size": 10919
} | [
"org.silverpeas.core.calendar.model.Classification",
"org.silverpeas.core.calendar.model.JournalHeader"
] | import org.silverpeas.core.calendar.model.Classification; import org.silverpeas.core.calendar.model.JournalHeader; | import org.silverpeas.core.calendar.model.*; | [
"org.silverpeas.core"
] | org.silverpeas.core; | 2,675,391 |
private void requestRefLocation(int flags) {
TelephonyManager phone = (TelephonyManager)
mContext.getSystemService(Context.TELEPHONY_SERVICE);
final int phoneType = phone.getPhoneType();
if (phoneType == TelephonyManager.PHONE_TYPE_GSM) {
GsmCellLocation gsm_cell ... | void function(int flags) { TelephonyManager phone = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); final int phoneType = phone.getPhoneType(); if (phoneType == TelephonyManager.PHONE_TYPE_GSM) { GsmCellLocation gsm_cell = (GsmCellLocation) phone.getCellLocation(); if ((gsm_cell != null) && (ph... | /**
* Called from native code to request reference location info
*/ | Called from native code to request reference location info | requestRefLocation | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/com/android/server/location/GpsLocationProvider.java",
"license": "gpl-3.0",
"size": 92285
} | [
"android.content.Context",
"android.telephony.TelephonyManager",
"android.telephony.gsm.GsmCellLocation",
"android.util.Log"
] | import android.content.Context; import android.telephony.TelephonyManager; import android.telephony.gsm.GsmCellLocation; import android.util.Log; | import android.content.*; import android.telephony.*; import android.telephony.gsm.*; import android.util.*; | [
"android.content",
"android.telephony",
"android.util"
] | android.content; android.telephony; android.util; | 706,303 |
protected void putTriggerInfo( InputActionEvent event, int invocationIndex ) {
event.setTriggerName( name );
event.setTriggerAllowsRepeats( allowRepeats );
event.setTriggerDevice( getDeviceName() );
event.setTriggerCharacter( '\0' );
event.setTriggerDelta( 0 );
event.... | void function( InputActionEvent event, int invocationIndex ) { event.setTriggerName( name ); event.setTriggerAllowsRepeats( allowRepeats ); event.setTriggerDevice( getDeviceName() ); event.setTriggerCharacter( '\0' ); event.setTriggerDelta( 0 ); event.setTriggerIndex( 0 ); event.setTriggerPosition( 0 ); event.setTrigge... | /**
* Called by InputHandler to fill info about the trigger into an event. Commonly overwritten by trigger
* implementations to provide additional info.
*
* @param event where to put the information
* @param invocationIndex index to distinct multiple action invocations per trigger activation
... | Called by InputHandler to fill info about the trigger into an event. Commonly overwritten by trigger implementations to provide additional info | putTriggerInfo | {
"repo_name": "accelazh/ThreeBodyProblem",
"path": "lib/jME2_0_1-Stable/src/com/jme/input/ActionTrigger.java",
"license": "mit",
"size": 11088
} | [
"com.jme.input.action.InputActionEvent"
] | import com.jme.input.action.InputActionEvent; | import com.jme.input.action.*; | [
"com.jme.input"
] | com.jme.input; | 1,946,934 |
public java.util.List<Proxy> select(URI uri) {
if (uri == null) {
throw new IllegalArgumentException("URI can't be null.");
}
String protocol = uri.getScheme();
String host = uri.getHost();
if (host == null) {
// This is a hack to ensure backward comp... | java.util.List<Proxy> function(URI uri) { if (uri == null) { throw new IllegalArgumentException(STR); } String protocol = uri.getScheme(); String host = uri.getHost(); if (host == null) { String auth = uri.getAuthority(); if (auth != null) { int i; i = auth.indexOf('@'); if (i >= 0) { auth = auth.substring(i+1); } i = ... | /**
* select() method. Where all the hard work is done.
* Build a list of proxies depending on URI.
* Since we're only providing compatibility with the system properties
* from previous releases (see list above), that list will always
* contain 1 single proxy, default being NO_PROXY.
*/ | select() method. Where all the hard work is done. Build a list of proxies depending on URI. Since we're only providing compatibility with the system properties from previous releases (see list above), that list will always contain 1 single proxy, default being NO_PROXY | select | {
"repo_name": "openjdk-mirror/jdk7u-jdk",
"path": "src/share/classes/sun/net/spi/DefaultProxySelector.java",
"license": "gpl-2.0",
"size": 15466
} | [
"java.net.Proxy",
"java.util.ArrayList",
"java.util.List"
] | import java.net.Proxy; import java.util.ArrayList; import java.util.List; | import java.net.*; import java.util.*; | [
"java.net",
"java.util"
] | java.net; java.util; | 482,012 |
public void dragLeave(DropTargetEvent event) {
setCurrentEvent(event);
}
| void function(DropTargetEvent event) { setCurrentEvent(event); } | /**
* Override of the leave because the for some reason
* SWT call it before the drop action when the mouse button is
* released. and this normally call the unload (removed from the override)
* that set the target to null
*/ | Override of the leave because the for some reason SWT call it before the drop action when the mouse button is released. and this normally call the unload (removed from the override) that set the target to null | dragLeave | {
"repo_name": "OpenSoftwareSolutions/PDFReporter-Studio",
"path": "com.jaspersoft.studio/src/com/jaspersoft/studio/editor/report/ReportUnitDropTargetListener.java",
"license": "lgpl-3.0",
"size": 4978
} | [
"org.eclipse.swt.dnd.DropTargetEvent"
] | import org.eclipse.swt.dnd.DropTargetEvent; | import org.eclipse.swt.dnd.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,330,335 |
public synchronized void contextDestroyed(ServletContextEvent event) {
servletContext = null;
users = null;
counter = 0;
} | synchronized void function(ServletContextEvent event) { servletContext = null; users = null; counter = 0; } | /**
* Set the servletContext, users and counter to null
*
* @param event The servletContextEvent
*/ | Set the servletContext, users and counter to null | contextDestroyed | {
"repo_name": "bangqu/EShow",
"path": "eshow-web-common/src/main/java/cn/org/eshow/webapp/listener/UserCounterListener.java",
"license": "apache-2.0",
"size": 6709
} | [
"javax.servlet.ServletContextEvent"
] | import javax.servlet.ServletContextEvent; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 713,712 |
void notifyCreation(Object obj) throws DAOException; | void notifyCreation(Object obj) throws DAOException; | /**
* Notify all the DAO that a new Object has been added.
*
* @param obj an object
*/ | Notify all the DAO that a new Object has been added | notifyCreation | {
"repo_name": "hgdev-ch/toposuite-android",
"path": "app/src/main/java/ch/hgdev/toposuite/dao/interfaces/DAOMapper.java",
"license": "gpl-2.0",
"size": 704
} | [
"ch.hgdev.toposuite.dao.DAOException"
] | import ch.hgdev.toposuite.dao.DAOException; | import ch.hgdev.toposuite.dao.*; | [
"ch.hgdev.toposuite"
] | ch.hgdev.toposuite; | 1,869,032 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<MetadataResults>> getWithResponseAsync(String workspaceId, Context context) {
if (this.client.getHost() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getHost() is required... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<MetadataResults>> function(String workspaceId, Context context) { if (this.client.getHost() == null) { return Mono.error( new IllegalArgumentException(STR)); } if (workspaceId == null) { return Mono.error(new IllegalArgumentException(STR)); } final String accept... | /**
* Retrieve the metadata information for the workspace, including its schema, functions, workspace info, categories
* etc.
*
* @param workspaceId ID of the workspace. This is Workspace ID from the Properties blade in the Azure portal.
* @param context The context to associate with this opera... | Retrieve the metadata information for the workspace, including its schema, functions, workspace info, categories etc | getWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/monitor/azure-monitor-query/src/main/java/com/azure/monitor/query/implementation/logs/MetadatasImpl.java",
"license": "mit",
"size": 16297
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.monitor.query.implementation.logs.models.MetadataResults"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.monitor.query.implementation.logs.models.MetadataResults; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.monitor.query.implementation.logs.models.*; | [
"com.azure.core",
"com.azure.monitor"
] | com.azure.core; com.azure.monitor; | 2,529,245 |
IndexRequest createIndexRequest(
String index,
String docType,
XContentType contentType,
byte[] document); | IndexRequest createIndexRequest( String index, String docType, XContentType contentType, byte[] document); | /**
* Creates an index request to be added to a {@link RequestIndexer}.
* Note: the type field has been deprecated since Elasticsearch 7.x and it would not take any effort.
*/ | Creates an index request to be added to a <code>RequestIndexer</code>. Note: the type field has been deprecated since Elasticsearch 7.x and it would not take any effort | createIndexRequest | {
"repo_name": "gyfora/flink",
"path": "flink-connectors/flink-connector-elasticsearch-base/src/main/java/org/apache/flink/streaming/connectors/elasticsearch/ElasticsearchUpsertTableSinkBase.java",
"license": "apache-2.0",
"size": 16703
} | [
"org.elasticsearch.action.index.IndexRequest",
"org.elasticsearch.common.xcontent.XContentType"
] | import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.common.xcontent.XContentType; | import org.elasticsearch.action.index.*; import org.elasticsearch.common.xcontent.*; | [
"org.elasticsearch.action",
"org.elasticsearch.common"
] | org.elasticsearch.action; org.elasticsearch.common; | 1,141,674 |
private void registerSwiftCompileAction(
Artifact sourceFile,
Artifact objFile,
IntermediateArtifacts intermediateArtifacts,
ObjcProvider objcProvider) {
ObjcConfiguration objcConfiguration = ObjcRuleClasses.objcConfiguration(ruleContext);
AppleConfiguration appleConfiguration = ruleCo... | void function( Artifact sourceFile, Artifact objFile, IntermediateArtifacts intermediateArtifacts, ObjcProvider objcProvider) { ObjcConfiguration objcConfiguration = ObjcRuleClasses.objcConfiguration(ruleContext); AppleConfiguration appleConfiguration = ruleContext.getFragment(AppleConfiguration.class); ImmutableSet.Bu... | /**
* Compiles a single swift file.
*
* @param sourceFile the artifact to compile
* @param objFile the resulting object artifact
* @param intermediateArtifacts intermediary artifacts
* @param objcProvider ObjcProvider instance for this invocation
*/ | Compiles a single swift file | registerSwiftCompileAction | {
"repo_name": "dinowernli/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java",
"license": "apache-2.0",
"size": 60692
} | [
"com.google.common.base.Optional",
"com.google.common.collect.ImmutableList",
"com.google.common.collect.ImmutableSet",
"com.google.devtools.build.lib.actions.Artifact",
"com.google.devtools.build.lib.analysis.actions.CustomCommandLine",
"com.google.devtools.build.lib.rules.apple.AppleConfiguration",
"c... | import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.actions.CustomCommandLine; import com.google.devtools.build.lib.rules.apple.AppleCon... | import com.google.common.base.*; import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.actions.*; import com.google.devtools.build.lib.rules.apple.*; import com.google.devtools.build.lib.rules.objc.*; import com.google.devtools.build.lib.vfs.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 1,739,685 |
public void writeEntityToNBT(NBTTagCompound tagCompound)
{
super.writeEntityToNBT(tagCompound);
tagCompound.setBoolean("Saddle", this.getSaddled());
} | void function(NBTTagCompound tagCompound) { super.writeEntityToNBT(tagCompound); tagCompound.setBoolean(STR, this.getSaddled()); } | /**
* (abstract) Protected helper method to write subclass entity data to NBT.
*/ | (abstract) Protected helper method to write subclass entity data to NBT | writeEntityToNBT | {
"repo_name": "TorchPowered/CraftBloom",
"path": "src/net/minecraft/entity/passive/EntityPig.java",
"license": "mit",
"size": 7659
} | [
"net.minecraft.nbt.NBTTagCompound"
] | import net.minecraft.nbt.NBTTagCompound; | import net.minecraft.nbt.*; | [
"net.minecraft.nbt"
] | net.minecraft.nbt; | 2,841,686 |
public List getList(int current, String methodValue) throws HibernateSearchException {
if (current != 0 && current != 1 && current != 2) {
if (current == 3) {
if ("previous".equalsIgnoreCase(methodValue)) {
removeFromCacheMap(current + 3);
... | List function(int current, String methodValue) throws HibernateSearchException { if (current != 0 && current != 1 && current != 2) { if (current == 3) { if (STR.equalsIgnoreCase(methodValue)) { removeFromCacheMap(current + 3); if (!(cacheMap.containsKey(Integer.valueOf(1)))) { addFromObject(0, 1); } } } else { remove(c... | /**
* Function to set the cache repository size. we are putting 5 pages in
* cache anytime.
*
* @param current
* current page number.
* @param methodValue
* method value whether it is previous or next.
* @throws HibernateSearchException
*/ | Function to set the cache repository size. we are putting 5 pages in cache anytime | getList | {
"repo_name": "maduhu/mifos-head",
"path": "application/src/main/java/org/mifos/framework/util/helpers/Cache.java",
"license": "apache-2.0",
"size": 6935
} | [
"java.util.List",
"org.mifos.framework.exceptions.HibernateSearchException"
] | import java.util.List; import org.mifos.framework.exceptions.HibernateSearchException; | import java.util.*; import org.mifos.framework.exceptions.*; | [
"java.util",
"org.mifos.framework"
] | java.util; org.mifos.framework; | 567,826 |
public static TickUnitSource createStandardTickUnits(Locale locale) {
TickUnits units = new TickUnits();
NumberFormat numberFormat = NumberFormat.getNumberInstance(locale);
// we can add the units in any order, the TickUnits collection will
// sort them...
units.add(ne... | static TickUnitSource function(Locale locale) { TickUnits units = new TickUnits(); NumberFormat numberFormat = NumberFormat.getNumberInstance(locale); units.add(new NumberTickUnit(0.0000001, numberFormat, 2)); units.add(new NumberTickUnit(0.000001, numberFormat, 2)); units.add(new NumberTickUnit(0.00001, numberFormat, ... | /**
* Creates a collection of standard tick units. The supplied locale is
* used to create the number formatter (a localised instance of
* <code>NumberFormat</code>).
* <P>
* If you don't like these defaults, create your own instance of
* {@link TickUnits} and then pass it to the
... | Creates a collection of standard tick units. The supplied locale is used to create the number formatter (a localised instance of <code>NumberFormat</code>). If you don't like these defaults, create your own instance of <code>TickUnits</code> and then pass it to the <code>setStandardTickUnits()</code> method | createStandardTickUnits | {
"repo_name": "apetresc/JFreeChart",
"path": "src/main/java/org/jfree/chart/axis/NumberAxis.java",
"license": "lgpl-2.1",
"size": 56557
} | [
"java.text.NumberFormat",
"java.util.Locale"
] | import java.text.NumberFormat; import java.util.Locale; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 472,281 |
EReference getClassContent__Comment_1(); | EReference getClassContent__Comment_1(); | /**
* Returns the meta object for the containment reference list '{@link cruise.umple.umple.ClassContent_#getComment_1 <em>Comment 1</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Comment 1</em>'.
* @see cruise.umple.umple.Class... | Returns the meta object for the containment reference list '<code>cruise.umple.umple.ClassContent_#getComment_1 Comment 1</code>'. | getClassContent__Comment_1 | {
"repo_name": "ahmedvc/umple",
"path": "cruise.umple.xtext/src-gen/cruise/umple/umple/UmplePackage.java",
"license": "mit",
"size": 485842
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 392,006 |
T transform(TypeDescription instrumentedType, T target);
enum NoOp implements Transformer<Object> {
INSTANCE; | T transform(TypeDescription instrumentedType, T target); enum NoOp implements Transformer<Object> { INSTANCE; | /**
* Transforms the supplied target.
*
* @param instrumentedType The instrumented type that declares the target being transformed.
* @param target The target entity that is being transformed.
* @return The transformed instance.
*/ | Transforms the supplied target | transform | {
"repo_name": "DALDEI/byte-buddy",
"path": "byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/Transformer.java",
"license": "apache-2.0",
"size": 23320
} | [
"net.bytebuddy.description.type.TypeDescription"
] | import net.bytebuddy.description.type.TypeDescription; | import net.bytebuddy.description.type.*; | [
"net.bytebuddy.description"
] | net.bytebuddy.description; | 202,289 |
public void saveCssAttrs(String... cssProps) {
for (Element e : elements) {
for (String a : cssProps) {
data(OLD_DATA_PREFIX + a, getStyleImpl().curCSS(e, a, false));
}
}
} | void function(String... cssProps) { for (Element e : elements) { for (String a : cssProps) { data(OLD_DATA_PREFIX + a, getStyleImpl().curCSS(e, a, false)); } } } | /**
* Restore a set of previously saved Css properties in every matched element.
*/ | Restore a set of previously saved Css properties in every matched element | saveCssAttrs | {
"repo_name": "stori-es/stori_es",
"path": "dashboard/src/main/java/com/google/gwt/query/client/GQuery.java",
"license": "apache-2.0",
"size": 177285
} | [
"com.google.gwt.dom.client.Element"
] | import com.google.gwt.dom.client.Element; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,364,352 |
public static void Scharr(Mat src, Mat dst, int ddepth, int dx, int dy, double scale, double delta, int borderType)
{
Scharr_0(src.nativeObj, dst.nativeObj, ddepth, dx, dy, scale, delta, borderType);
return;
} | static void function(Mat src, Mat dst, int ddepth, int dx, int dy, double scale, double delta, int borderType) { Scharr_0(src.nativeObj, dst.nativeObj, ddepth, dx, dy, scale, delta, borderType); return; } | /**
* <p>Calculates the first x- or y- image derivative using Scharr operator.</p>
*
* <p>The function computes the first x- or y- spatial image derivative using the
* Scharr operator. The call</p>
*
* <p><em>Scharr(src, dst, ddepth, dx, dy, scale, delta, borderType)</em></p>
*
* <p>is equivalent to</p>
*
* <... | Calculates the first x- or y- image derivative using Scharr operator. The function computes the first x- or y- spatial image derivative using the Scharr operator. The call Scharr(src, dst, ddepth, dx, dy, scale, delta, borderType) is equivalent to Sobel(src, dst, ddepth, dx, dy, CV_SCHARR, scale, delta, borderType) | Scharr | {
"repo_name": "OSCAV/cvRecognition",
"path": "src/cvrecognition/openCVLibrary249/src/main/java/org/opencv/imgproc/Imgproc.java",
"license": "gpl-3.0",
"size": 420353
} | [
"org.opencv.core.Mat"
] | import org.opencv.core.Mat; | import org.opencv.core.*; | [
"org.opencv.core"
] | org.opencv.core; | 2,719,397 |
public Builder columnByMetadata(
String columnName,
String serializableTypeString,
@Nullable String metadataKey,
boolean isVirtual) {
return columnByMetadata(
columnName, DataTypes.of(serializableTypeString), metadat... | Builder function( String columnName, String serializableTypeString, @Nullable String metadataKey, boolean isVirtual) { return columnByMetadata( columnName, DataTypes.of(serializableTypeString), metadataKey, isVirtual); } /** * Declares that the given column should serve as an event-time (i.e. rowtime) attribute and * s... | /**
* Declares a metadata column that is appended to this schema.
*
* <p>See {@link #columnByMetadata(String, AbstractDataType, String, boolean)} for a
* detailed explanation.
*
* <p>This method uses a type string that can be easily persisted in a durable catalog.
... | Declares a metadata column that is appended to this schema. See <code>#columnByMetadata(String, AbstractDataType, String, boolean)</code> for a detailed explanation. This method uses a type string that can be easily persisted in a durable catalog | columnByMetadata | {
"repo_name": "rmetzger/flink",
"path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/Schema.java",
"license": "apache-2.0",
"size": 40275
} | [
"javax.annotation.Nullable"
] | import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,210,522 |
public void longPressView(View v, int x, int y) {
int location[] = getAbsoluteLocationFromRelative(v, x, y);
int absoluteX = location[0];
int absoluteY = location[1];
longPress(absoluteX, absoluteY);
} | void function(View v, int x, int y) { int location[] = getAbsoluteLocationFromRelative(v, x, y); int absoluteX = location[0]; int absoluteY = location[1]; longPress(absoluteX, absoluteY); } | /**
* Sends (synchronously) a long press to the View at the specified coordinates.
*
* @param v The view to be clicked.
* @param x Relative x location to v
* @param y Relative y location to v
*/ | Sends (synchronously) a long press to the View at the specified coordinates | longPressView | {
"repo_name": "imesong/chromium_webview",
"path": "testshell/javatests/src/org/chromium/content/browser/test/util/TouchCommon.java",
"license": "bsd-3-clause",
"size": 8106
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,286,630 |
public ComplexObsHandler getHandler(Obs obs) throws APIException;
| ComplexObsHandler function(Obs obs) throws APIException; | /**
* Get the ComplexObsHandler associated with a complex observation
* Returns the ComplexObsHandler.
* Returns null if the Obs.isComplexObs() is false or there is an error
* instantiating the handler class.
*
* @param obs A complex Obs.
* @return ComplexObsHandler for the complex Obs. or null on error.
... | Get the ComplexObsHandler associated with a complex observation Returns the ComplexObsHandler. Returns null if the Obs.isComplexObs() is false or there is an error instantiating the handler class | getHandler | {
"repo_name": "jamesfeshner/openmrs-module",
"path": "api/src/main/java/org/openmrs/api/ObsService.java",
"license": "mpl-2.0",
"size": 22252
} | [
"org.openmrs.Obs",
"org.openmrs.obs.ComplexObsHandler"
] | import org.openmrs.Obs; import org.openmrs.obs.ComplexObsHandler; | import org.openmrs.*; import org.openmrs.obs.*; | [
"org.openmrs",
"org.openmrs.obs"
] | org.openmrs; org.openmrs.obs; | 2,408,464 |
public T caseEnumValue(EnumValue object)
{
return null;
} | T function(EnumValue object) { return null; } | /**
* Returns the result of interpreting the object as an instance of '<em>Enum Value</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result ... | Returns the result of interpreting the object as an instance of 'Enum Value'. This implementation returns null; returning a non-null result will terminate the switch. | caseEnumValue | {
"repo_name": "RobertWalter83/DialogScriptDSL",
"path": "plugins/de.unidue.ecg.characterScript/src-gen/de/unidue/ecg/characterScript/characterScript/util/CharacterScriptSwitch.java",
"license": "apache-2.0",
"size": 17301
} | [
"de.unidue.ecg.characterScript.characterScript.EnumValue"
] | import de.unidue.ecg.characterScript.characterScript.EnumValue; | import de.unidue.ecg.*; | [
"de.unidue.ecg"
] | de.unidue.ecg; | 243,619 |
public final Uri insert(Uri url, ContentValues values)
{
IContentProvider provider = acquireProvider(url);
if (provider == null) {
throw new IllegalArgumentException("Unknown URL " + url);
}
try {
long startTime = SystemClock.uptimeMillis();
Ur... | final Uri function(Uri url, ContentValues values) { IContentProvider provider = acquireProvider(url); if (provider == null) { throw new IllegalArgumentException(STR + url); } try { long startTime = SystemClock.uptimeMillis(); Uri createdRow = provider.insert(url, values); long durationMillis = SystemClock.uptimeMillis(... | /**
* Inserts a row into a table at the given URL.
*
* If the content provider supports transactions the insertion will be atomic.
*
* @param url The URL of the table to insert into.
* @param values The initial values for the newly inserted row. The key is the column name for
* ... | Inserts a row into a table at the given URL. If the content provider supports transactions the insertion will be atomic | insert | {
"repo_name": "lynnlyc/for-honeynet-reviewers",
"path": "CallbackDroid/android-environment/src/base/core/java/android/content/ContentResolver.java",
"license": "gpl-3.0",
"size": 59446
} | [
"android.net.Uri",
"android.os.RemoteException",
"android.os.SystemClock"
] | import android.net.Uri; import android.os.RemoteException; import android.os.SystemClock; | import android.net.*; import android.os.*; | [
"android.net",
"android.os"
] | android.net; android.os; | 2,414,280 |
@Test
public void nestedZipInZipInputStream() throws Exception
{
ICloseableDirectory outer = FileSystem.getFSRoot(new FileInputStream("fileSystemTest/outer.zip"));
try {
IFile innerFile = outer.getFile("app2.zip");
assertNotNull(innerFile);
IDirectory inner = innerFile.convertNested();
... | void function() throws Exception { ICloseableDirectory outer = FileSystem.getFSRoot(new FileInputStream(STR)); try { IFile innerFile = outer.getFile(STR); assertNotNull(innerFile); IDirectory inner = innerFile.convertNested(); assertNotNull(inner); File desiredFile = new File(new File(getTestResourceDir(), "/app1"), ST... | /**
* Make sure that the operations work with zip files inside other zip files. Performance is not going to be great though :)
*/ | Make sure that the operations work with zip files inside other zip files. Performance is not going to be great though :) | nestedZipInZipInputStream | {
"repo_name": "WouterBanckenACA/aries",
"path": "util/util-r42/src/test/java/org/apache/aries/util/filesystem/FileSystemTest.java",
"license": "apache-2.0",
"size": 17083
} | [
"java.io.File",
"java.io.FileInputStream",
"java.lang.reflect.Field",
"org.junit.Assert"
] | import java.io.File; import java.io.FileInputStream; import java.lang.reflect.Field; import org.junit.Assert; | import java.io.*; import java.lang.reflect.*; import org.junit.*; | [
"java.io",
"java.lang",
"org.junit"
] | java.io; java.lang; org.junit; | 1,826,738 |
public static BgpAttrOpaqueNode read(ChannelBuffer cb)
throws BgpParseException {
byte[] opaqueNodeAttribute;
short lsAttrLength = cb.readShort();
if (cb.readableBytes() < lsAttrLength) {
Validation.validateLen(BgpErrorType.UPDATE_MESSAGE_ERROR,
... | static BgpAttrOpaqueNode function(ChannelBuffer cb) throws BgpParseException { byte[] opaqueNodeAttribute; short lsAttrLength = cb.readShort(); if (cb.readableBytes() < lsAttrLength) { Validation.validateLen(BgpErrorType.UPDATE_MESSAGE_ERROR, BgpErrorType.ATTRIBUTE_LENGTH_ERROR, lsAttrLength); } opaqueNodeAttribute = n... | /**
* Reads the Opaque Node Properties.
*
* @param cb ChannelBuffer
* @return object of BgpAttrOpaqueNode
* @throws BgpParseException while parsing BgpAttrOpaqueNode
*/ | Reads the Opaque Node Properties | read | {
"repo_name": "donNewtonAlpha/onos",
"path": "protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/attr/BgpAttrOpaqueNode.java",
"license": "apache-2.0",
"size": 3973
} | [
"org.jboss.netty.buffer.ChannelBuffer",
"org.onosproject.bgpio.exceptions.BgpParseException",
"org.onosproject.bgpio.types.BgpErrorType",
"org.onosproject.bgpio.util.Validation"
] | import org.jboss.netty.buffer.ChannelBuffer; import org.onosproject.bgpio.exceptions.BgpParseException; import org.onosproject.bgpio.types.BgpErrorType; import org.onosproject.bgpio.util.Validation; | import org.jboss.netty.buffer.*; import org.onosproject.bgpio.exceptions.*; import org.onosproject.bgpio.types.*; import org.onosproject.bgpio.util.*; | [
"org.jboss.netty",
"org.onosproject.bgpio"
] | org.jboss.netty; org.onosproject.bgpio; | 1,504,389 |
public static boolean onGenericMotionEvent(MotionEvent event) {
if (!isGamepadEvent(event)) return false;
return getInstance().handleMotionEvent(event);
} | static boolean function(MotionEvent event) { if (!isGamepadEvent(event)) return false; return getInstance().handleMotionEvent(event); } | /**
* Handles motion events from the gamepad devices.
* @return True if the event has been consumed.
*/ | Handles motion events from the gamepad devices | onGenericMotionEvent | {
"repo_name": "guorendong/iridium-browser-ubuntu",
"path": "content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java",
"license": "bsd-3-clause",
"size": 11062
} | [
"android.view.MotionEvent"
] | import android.view.MotionEvent; | import android.view.*; | [
"android.view"
] | android.view; | 1,610,337 |
void readToken()
throws IOException
{
Token t;
int ch;
enlarging:
while (true)
{
t = tokenMatches();
if (t != null)
break enlarging;
else
{
ch = reader.read();
readerPosition++;
if (ch == ETX)
... | void readToken() throws IOException { Token t; int ch; enlarging: while (true) { t = tokenMatches(); if (t != null) break enlarging; else { ch = reader.read(); readerPosition++; if (ch == ETX) ch = ' '; if (ch < 0) { if (buffer.length() == 0) { queue.add(eofToken()); return; } else { if (buffer.charAt(buffer.length() -... | /**
* Read next token from the reader, add it to the queue
*/ | Read next token from the reader, add it to the queue | readToken | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java",
"license": "gpl-2.0",
"size": 9653
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,036,728 |
void validate(Factory factory) throws ForbiddenException, ServerException; | void validate(Factory factory) throws ForbiddenException, ServerException; | /**
* Validates given factory by checking the current user is granted to edit the factory.
*
* @param factory
* factory object to validate
* @throws ForbiddenException
* when the current user is not granted to edit the factory
* @throws ServerException
* w... | Validates given factory by checking the current user is granted to edit the factory | validate | {
"repo_name": "Mirage20/che",
"path": "wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryEditValidator.java",
"license": "epl-1.0",
"size": 1364
} | [
"org.eclipse.che.api.core.ForbiddenException",
"org.eclipse.che.api.core.ServerException",
"org.eclipse.che.api.core.model.factory.Factory"
] | import org.eclipse.che.api.core.ForbiddenException; import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.core.model.factory.Factory; | import org.eclipse.che.api.core.*; import org.eclipse.che.api.core.model.factory.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 2,152,636 |
public Map<String[], String> getWarnings(String entityId) {
return m_warnings != null ? m_warnings.get(entityId) : null;
}
| Map<String[], String> function(String entityId) { return m_warnings != null ? m_warnings.get(entityId) : null; } | /**
* Returns the warning messages for the given entity.<p>
*
* @param entityId the entity id
*
* @return the warning messages for the given entity
*/ | Returns the warning messages for the given entity | getWarnings | {
"repo_name": "sbonoc/opencms-core",
"path": "src/org/opencms/acacia/shared/CmsValidationResult.java",
"license": "lgpl-2.1",
"size": 4534
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,887,769 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(TextLocation.class)) {
case MappingPackage.TEXT_LOCATION__START_OFFSET:
case MappingPackage.TEXT_LOCATION__END_OFFSET:
fireNotifyChanged(new ViewerNotification(notification... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(TextLocation.class)) { case MappingPackage.TEXT_LOCATION__START_OFFSET: case MappingPackage.TEXT_LOCATION__END_OFFSET: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true... | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached children and
* by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc
* --> <!-- end-user-doc -->
*
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "ModelWriter/Source",
"path": "plugins/org.eclipse.mylyn.docs.intent.mapping.emf.edit/src-gen/org/eclipse/mylyn/docs/intent/mapping/provider/TextLocationItemProvider.java",
"license": "epl-1.0",
"size": 5177
} | [
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification",
"org.eclipse.mylyn.docs.intent.mapping.MappingPackage",
"org.eclipse.mylyn.docs.intent.mapping.TextLocation"
] | import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.mylyn.docs.intent.mapping.MappingPackage; import org.eclipse.mylyn.docs.intent.mapping.TextLocation; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; import org.eclipse.mylyn.docs.intent.mapping.*; | [
"org.eclipse.emf",
"org.eclipse.mylyn"
] | org.eclipse.emf; org.eclipse.mylyn; | 61,797 |
//-------------------------------------------------------------------------
public LogContext withError (final Throwable aError)
{
Validate.isTrue(m_aParent != null, "Error can be defined only, in case you called forLevel() before.");
m_aError = aError;
return this;
} | LogContext function (final Throwable aError) { Validate.isTrue(m_aParent != null, STR); m_aError = aError; return this; } | /** define an error (exception) for a new spawned log level.
*
* Can be called as often as you want ...
* but the last error will be used only for logging.
*
* @param aError [IN]
* the error.
*
* @return the current log item for adding further details.
*/ | define an error (exception) for a new spawned log level. Can be called as often as you want ... but the last error will be used only for logging | withError | {
"repo_name": "andreas-schluens-asdev/asdk",
"path": "tools-logging/src/main/java/net/as_development/asdk/tools/logging/impl/LogContext.java",
"license": "unlicense",
"size": 17098
} | [
"org.apache.commons.lang3.Validate"
] | import org.apache.commons.lang3.Validate; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 126,593 |
void clear() {
if (mViewTypeCount == 1) {
final ArrayList<View> scrap = mCurrentScrap;
final int scrapCount = scrap.size();
for (int i = 0; i < scrapCount; i++) {
removeDetachedView(scrap.remove(scrapCount - 1 - i), false);
}
} else {
final int typeCount = mViewTypeCount;
for (in... | void clear() { if (mViewTypeCount == 1) { final ArrayList<View> scrap = mCurrentScrap; final int scrapCount = scrap.size(); for (int i = 0; i < scrapCount; i++) { removeDetachedView(scrap.remove(scrapCount - 1 - i), false); } } else { final int typeCount = mViewTypeCount; for (int i = 0; i < typeCount; i++) { final Arr... | /**
* Clears the scrap heap.
*/ | Clears the scrap heap | clear | {
"repo_name": "ogunwale/yaps",
"path": "yaps/src/com/jess/ui/TwoWayAbsListView.java",
"license": "mit",
"size": 162391
} | [
"android.view.View",
"java.util.ArrayList"
] | import android.view.View; import java.util.ArrayList; | import android.view.*; import java.util.*; | [
"android.view",
"java.util"
] | android.view; java.util; | 1,683,718 |
public void pauseScheduledJob(String name) {
ISchedulingService service = (ISchedulingService) ScopeUtils.getScopeService(scope, ISchedulingService.class, QuartzSchedulingService.class, false);
service.pauseScheduledJob(name);
} | void function(String name) { ISchedulingService service = (ISchedulingService) ScopeUtils.getScopeService(scope, ISchedulingService.class, QuartzSchedulingService.class, false); service.pauseScheduledJob(name); } | /**
* Pauses a scheduled job
*
* @param name
* Scheduled job name
*/ | Pauses a scheduled job | pauseScheduledJob | {
"repo_name": "cantren/red5-server",
"path": "src/main/java/org/red5/server/adapter/MultiThreadedApplicationAdapter.java",
"license": "apache-2.0",
"size": 46463
} | [
"org.red5.server.api.scheduling.ISchedulingService",
"org.red5.server.scheduling.QuartzSchedulingService",
"org.red5.server.util.ScopeUtils"
] | import org.red5.server.api.scheduling.ISchedulingService; import org.red5.server.scheduling.QuartzSchedulingService; import org.red5.server.util.ScopeUtils; | import org.red5.server.api.scheduling.*; import org.red5.server.scheduling.*; import org.red5.server.util.*; | [
"org.red5.server"
] | org.red5.server; | 117,909 |
@Test (timeout=180000)
public void testFixAssignmentsAndNoHdfsChecking() throws Exception {
TableName table =
TableName.valueOf("testFixAssignmentsAndNoHdfsChecking");
try {
setupTable(table);
assertEquals(ROWKEYS.length, countRows());
// Mess it up by closing a region
delet... | @Test (timeout=180000) void function() throws Exception { TableName table = TableName.valueOf(STR); try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("A"), Bytes.toBytes("B"), true, false, false, false, HRegionInfo.DEFAULT_REPLICA_ID); HBaseFs... | /**
* Test -noHdfsChecking option can detect and fix assignments issue.
*/ | Test -noHdfsChecking option can detect and fix assignments issue | testFixAssignmentsAndNoHdfsChecking | {
"repo_name": "joshelser/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java",
"license": "apache-2.0",
"size": 98829
} | [
"org.apache.hadoop.hbase.HRegionInfo",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.util.hbck.HbckTestingUtil",
"org.junit.Assert",
"org.junit.Test"
] | import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.util.hbck.HbckTestingUtil; import org.junit.Assert; import org.junit.Test; | import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.hbck.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 509,540 |
protected void createDataSourceInstance() throws SQLException {
PoolingDataSource pds = new PoolingDataSource(connectionPool);
pds.setAccessToUnderlyingConnectionAllowed(isAccessToUnderlyingConnectionAllowed());
pds.setLogWriter(logWriter);
dataSource = pds;
} | void function() throws SQLException { PoolingDataSource pds = new PoolingDataSource(connectionPool); pds.setAccessToUnderlyingConnectionAllowed(isAccessToUnderlyingConnectionAllowed()); pds.setLogWriter(logWriter); dataSource = pds; } | /**
* Creates the actual data source instance. This method only exists so
* subclasses can replace the implementation class.
*
* @throws SQLException if unable to create a datasource instance
*/ | Creates the actual data source instance. This method only exists so subclasses can replace the implementation class | createDataSourceInstance | {
"repo_name": "WilliamRen/bbossgroups-3.5",
"path": "bboss-persistent/src-jdk6/com/frameworkset/commons/dbcp/BasicDataSource.java",
"license": "apache-2.0",
"size": 58050
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,906,592 |
public Iterator<OutlierList> iterator() {
return this.outlierLists.iterator();
}
| Iterator<OutlierList> function() { return this.outlierLists.iterator(); } | /**
* Returns an iterator for the outlier lists.
*
* @return An iterator.
*/ | Returns an iterator for the outlier lists | iterator | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/main/java/org/jfree/chart/renderer/OutlierListCollection.java",
"license": "lgpl-2.1",
"size": 6107
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,628,180 |
public void addInfos(List<DeviceAlarm> infos){
this.infos.clear();
for (DeviceAlarm deviceAlarm : infos) {
this.infos.add(deviceAlarm);
}
adapter.notifyDataSetInvalidated();
} | void function(List<DeviceAlarm> infos){ this.infos.clear(); for (DeviceAlarm deviceAlarm : infos) { this.infos.add(deviceAlarm); } adapter.notifyDataSetInvalidated(); } | /**
* update alarm infos datas
* @param infos
*/ | update alarm infos datas | addInfos | {
"repo_name": "gizwits/Gizwits-AirPurifier_Android",
"path": "src/com/gizwits/airpurifier/activity/advanced/AlarmFragment.java",
"license": "mit",
"size": 1432
} | [
"com.gizwits.framework.entity.DeviceAlarm",
"java.util.List"
] | import com.gizwits.framework.entity.DeviceAlarm; import java.util.List; | import com.gizwits.framework.entity.*; import java.util.*; | [
"com.gizwits.framework",
"java.util"
] | com.gizwits.framework; java.util; | 1,232,962 |
public String start(String path) {
StringWriter stringWriter = new StringWriter();
PrintWriter printWriter = new PrintWriter(stringWriter);
super.start(printWriter, path);
return stringWriter.toString();
} | String function(String path) { StringWriter stringWriter = new StringWriter(); PrintWriter printWriter = new PrintWriter(stringWriter); super.start(printWriter, path); return stringWriter.toString(); } | /**
* Start the web application at the specified context path.
*
* @see ManagerServlet#start(PrintWriter, String)
*
* @param path Context path of the application to be started
* @return message String
*/ | Start the web application at the specified context path | start | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.43/HTMLManagerServlet.java",
"license": "mit",
"size": 47560
} | [
"java.io.PrintWriter",
"java.io.StringWriter"
] | import java.io.PrintWriter; import java.io.StringWriter; | import java.io.*; | [
"java.io"
] | java.io; | 768,040 |
public Cursor fetchAllUnreadPsuedo() {
String sql = "SELECT 'Unread' as " + KEY_ROWID + "" +
" UNION SELECT 'Read' as " + KEY_ROWID + "";
return mDb.rawQuery(sql, new String[]{});
}
| Cursor function() { String sql = STR + KEY_ROWID + STR UNION SELECT 'Read' as STR"; return mDb.rawQuery(sql, new String[]{}); } | /**
* This will return a list consisting of "Read" and "Unread"
*
* @return Cursor over all the psuedo list
*/ | This will return a list consisting of "Read" and "Unread" | fetchAllUnreadPsuedo | {
"repo_name": "jgaldo/Book-Catalogue",
"path": "src/com/eleybourn/bookcatalogue/CatalogueDBAdapter.java",
"license": "gpl-3.0",
"size": 238306
} | [
"android.database.Cursor"
] | import android.database.Cursor; | import android.database.*; | [
"android.database"
] | android.database; | 487,234 |
public DateTime timeCreated() {
return this.timeCreated;
} | DateTime function() { return this.timeCreated; } | /**
* Get the time when the disk was created.
*
* @return the timeCreated value
*/ | Get the time when the disk was created | timeCreated | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2018_09_30/src/main/java/com/microsoft/azure/management/compute/v2018_09_30/implementation/DiskInner.java",
"license": "mit",
"size": 10989
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 149,016 |
@ResponseStatus(HttpStatus.OK)
@RequestMapping(value = UrlHelpers.CERTIFIED_USER_TEST_RESPONSE_WITH_ID, method = RequestMethod.DELETE)
public void deleteQuizResponse(
@RequestParam(value = AuthorizationConstants.USER_ID_PARAM) Long userId,
@PathVariable(value = ID_PATH_VARIABLE) Long responseId
) throws N... | @ResponseStatus(HttpStatus.OK) @RequestMapping(value = UrlHelpers.CERTIFIED_USER_TEST_RESPONSE_WITH_ID, method = RequestMethod.DELETE) void function( @RequestParam(value = AuthorizationConstants.USER_ID_PARAM) Long userId, @PathVariable(value = ID_PATH_VARIABLE) Long responseId ) throws NotFoundException { serviceProvi... | /**
* Delete a test response. Note: This service is available to Synapse administrators only.
* @param userId
* @param responseId
* @throws NotFoundException
*/ | Delete a test response. Note: This service is available to Synapse administrators only | deleteQuizResponse | {
"repo_name": "hhu94/Synapse-Repository-Services",
"path": "services/repository/src/main/java/org/sagebionetworks/repo/web/controller/CertifiedUserController.java",
"license": "apache-2.0",
"size": 6629
} | [
"org.sagebionetworks.repo.model.AuthorizationConstants",
"org.sagebionetworks.repo.web.NotFoundException",
"org.sagebionetworks.repo.web.UrlHelpers",
"org.springframework.http.HttpStatus",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestMapping",
"... | import org.sagebionetworks.repo.model.AuthorizationConstants; import org.sagebionetworks.repo.web.NotFoundException; import org.sagebionetworks.repo.web.UrlHelpers; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.Req... | import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.web.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*; | [
"org.sagebionetworks.repo",
"org.springframework.http",
"org.springframework.web"
] | org.sagebionetworks.repo; org.springframework.http; org.springframework.web; | 1,249,963 |
@RequestMapping("/getFilteredCSWRecords.do")
public ModelAndView getFilteredCSWRecords(
@RequestParam(value="cswServiceId", required=false) String cswServiceId,
@RequestParam(value="anyText", required=false) String anyText,
@RequestParam(value="westBoundLongitude", requir... | @RequestMapping(STR) ModelAndView function( @RequestParam(value=STR, required=false) String cswServiceId, @RequestParam(value=STR, required=false) String anyText, @RequestParam(value=STR, required=false) Double westBoundLongitude, @RequestParam(value=STR, required=false) Double eastBoundLongitude, @RequestParam(value=S... | /**
* Gets a list of CSWRecord view objects filtered by the specified values from all internal
* CSW's
* @param cswServiceId [Optional] The ID of a CSWService to query (if omitted ALL CSWServices will be queried)
* @param westBoundLongitude [Optional] Spatial bbox constraint
* @param eastB... | Gets a list of CSWRecord view objects filtered by the specified values from all internal CSW's | getFilteredCSWRecords | {
"repo_name": "AuScope/GA-eResearch-Portal",
"path": "src/main/java/org/auscope/portal/server/web/controllers/CSWFilterController.java",
"license": "gpl-3.0",
"size": 10593
} | [
"java.util.ArrayList",
"java.util.List",
"org.auscope.portal.csw.CSWGetDataRecordsFilter",
"org.auscope.portal.csw.CSWGetRecordResponse",
"org.auscope.portal.csw.record.CSWRecord",
"org.auscope.portal.server.domain.filter.FilterBoundingBox",
"org.springframework.web.bind.annotation.RequestMapping",
"o... | import java.util.ArrayList; import java.util.List; import org.auscope.portal.csw.CSWGetDataRecordsFilter; import org.auscope.portal.csw.CSWGetRecordResponse; import org.auscope.portal.csw.record.CSWRecord; import org.auscope.portal.server.domain.filter.FilterBoundingBox; import org.springframework.web.bind.annotation.R... | import java.util.*; import org.auscope.portal.csw.*; import org.auscope.portal.csw.record.*; import org.auscope.portal.server.domain.filter.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*; | [
"java.util",
"org.auscope.portal",
"org.springframework.web"
] | java.util; org.auscope.portal; org.springframework.web; | 2,012,368 |
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
mViewPagerPageChangeListener = listener;
} | void function(ViewPager.OnPageChangeListener listener) { mViewPagerPageChangeListener = listener; } | /**
* Set the {@link ViewPager.OnPageChangeListener}. When using {@link SlidingTabLayout} you are
* required to set any {@link ViewPager.OnPageChangeListener} through this method. This is so
* that the layout can update it's scroll position correctly.
*
* @see ViewPager#setOnPageChangeListener(... | Set the <code>ViewPager.OnPageChangeListener</code>. When using <code>SlidingTabLayout</code> you are required to set any <code>ViewPager.OnPageChangeListener</code> through this method. This is so that the layout can update it's scroll position correctly | setOnPageChangeListener | {
"repo_name": "CE-KMITL-OOAD-2015/make-me-smile",
"path": "madeMeSmile/app/src/main/java/tabs/SlidingTabLayout.java",
"license": "apache-2.0",
"size": 11102
} | [
"android.support.v4.view.ViewPager"
] | import android.support.v4.view.ViewPager; | import android.support.v4.view.*; | [
"android.support"
] | android.support; | 54,469 |
public static AbstractFileSaver getSaverForFile(File file) {
return getSaverForFile(file.getAbsolutePath());
} | static AbstractFileSaver function(File file) { return getSaverForFile(file.getAbsolutePath()); } | /**
* tries to determine the saver to use for this kind of file, returns
* null if none can be found.
*
* @param file the file to return a converter for
* @return the converter if one was found, null otherwise
*/ | tries to determine the saver to use for this kind of file, returns null if none can be found | getSaverForFile | {
"repo_name": "goddesss/DataModeling",
"path": "src/weka/core/converters/ConverterUtils.java",
"license": "gpl-2.0",
"size": 34301
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 602,683 |
Set<SubscribedAPI> getSubscribedAPIsByApplicationId(Subscriber subscriber, int applicationId, String groupingId)
throws APIManagementException; | Set<SubscribedAPI> getSubscribedAPIsByApplicationId(Subscriber subscriber, int applicationId, String groupingId) throws APIManagementException; | /**
* Returns a set of SubscribedAPIs filtered by the given application id.
*
* @param subscriber Subscriber
* @param applicationId Application Id
* @param groupingId the groupId of the subscriber
* @return Set<API>
* @throws APIManagementException if failed to get API for subscriber
... | Returns a set of SubscribedAPIs filtered by the given application id | getSubscribedAPIsByApplicationId | {
"repo_name": "bhathiya/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/APIConsumer.java",
"license": "apache-2.0",
"size": 44201
} | [
"java.util.Set",
"org.wso2.carbon.apimgt.api.model.SubscribedAPI",
"org.wso2.carbon.apimgt.api.model.Subscriber"
] | import java.util.Set; import org.wso2.carbon.apimgt.api.model.SubscribedAPI; import org.wso2.carbon.apimgt.api.model.Subscriber; | import java.util.*; import org.wso2.carbon.apimgt.api.model.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 1,751,064 |
@Override
public void setHost(String host) throws URISyntaxException {
super.setHost(host);
} | void function(String host) throws URISyntaxException { super.setHost(host); } | /**
* The URI of the MQTT broker to connect too - this component also supports SSL - e.g. ssl://127.0.0.1:8883
*/ | The URI of the MQTT broker to connect too - this component also supports SSL - e.g. ssl://127.0.0.1:8883 | setHost | {
"repo_name": "askannon/camel",
"path": "components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTConfiguration.java",
"license": "apache-2.0",
"size": 18180
} | [
"java.net.URISyntaxException"
] | import java.net.URISyntaxException; | import java.net.*; | [
"java.net"
] | java.net; | 1,179,066 |
public void setNextElementAction(IDisplayableAction nextElementAction) {
this.nextElementAction = nextElementAction;
} | void function(IDisplayableAction nextElementAction) { this.nextElementAction = nextElementAction; } | /**
* Sets next element action.
*
* @param nextElementAction
* the next element action
*/ | Sets next element action | setNextElementAction | {
"repo_name": "jspresso/jspresso-ce",
"path": "remote/application/src/main/java/org/jspresso/framework/view/remote/mobile/MobileRemoteViewFactory.java",
"license": "lgpl-3.0",
"size": 49973
} | [
"org.jspresso.framework.view.action.IDisplayableAction"
] | import org.jspresso.framework.view.action.IDisplayableAction; | import org.jspresso.framework.view.action.*; | [
"org.jspresso.framework"
] | org.jspresso.framework; | 2,706,019 |
public synchronized Relationship addWeakRelationship(Primitive type, Primitive target, float correctnessMultiplier) {
return addWeakRelationship(this.network.createVertex(type), this.network.createVertex(target), correctnessMultiplier);
} | synchronized Relationship function(Primitive type, Primitive target, float correctnessMultiplier) { return addWeakRelationship(this.network.createVertex(type), this.network.createVertex(target), correctnessMultiplier); } | /**
* Add the relation of the relationship type to the target vertex.
* The correctness decreases the correctness of the relation.
*/ | Add the relation of the relationship type to the target vertex. The correctness decreases the correctness of the relation | addWeakRelationship | {
"repo_name": "BOTlibre/BOTlibre",
"path": "micro-ai-engine/android/source/org/botlibre/knowledge/BasicVertex.java",
"license": "epl-1.0",
"size": 152940
} | [
"org.botlibre.api.knowledge.Relationship"
] | import org.botlibre.api.knowledge.Relationship; | import org.botlibre.api.knowledge.*; | [
"org.botlibre.api"
] | org.botlibre.api; | 909,977 |
protected LabelPeer createLabel(Label label)
{
return new SwingLabelPeer(label);
} | LabelPeer function(Label label) { return new SwingLabelPeer(label); } | /**
* Creates a SwingLabelPeer.
*
* @param label the AWT label
*
* @return the Swing label peer
*/ | Creates a SwingLabelPeer | createLabel | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/java/awt/peer/swing/SwingToolkit.java",
"license": "gpl-2.0",
"size": 4677
} | [
"java.awt.Label",
"java.awt.peer.LabelPeer"
] | import java.awt.Label; import java.awt.peer.LabelPeer; | import java.awt.*; import java.awt.peer.*; | [
"java.awt"
] | java.awt; | 1,097,614 |
private void checkNotFinished() throws CmsUgcException {
if (m_finished) {
String message = Messages.get().container(Messages.ERR_FORM_SESSION_ALREADY_FINISHED_0).key(
getCmsObject().getRequestContext().getLocale());
throw new CmsUgcException(CmsUgcConstants.ErrorCod... | void function() throws CmsUgcException { if (m_finished) { String message = Messages.get().container(Messages.ERR_FORM_SESSION_ALREADY_FINISHED_0).key( getCmsObject().getRequestContext().getLocale()); throw new CmsUgcException(CmsUgcConstants.ErrorCode.errInvalidAction, message); } } | /**
* Checks that the session is not finished, and throws an exception otherwise.<p>
*
* @throws CmsUgcException if the session is finished
*/ | Checks that the session is not finished, and throws an exception otherwise | checkNotFinished | {
"repo_name": "gallardo/opencms-core",
"path": "src/org/opencms/ugc/CmsUgcSession.java",
"license": "lgpl-2.1",
"size": 29917
} | [
"org.opencms.ugc.shared.CmsUgcConstants",
"org.opencms.ugc.shared.CmsUgcException"
] | import org.opencms.ugc.shared.CmsUgcConstants; import org.opencms.ugc.shared.CmsUgcException; | import org.opencms.ugc.shared.*; | [
"org.opencms.ugc"
] | org.opencms.ugc; | 976,820 |
public static <T extends Component> void setComponentsPropertyDeep(List<T> components, String propertyPath,
Object propertyValue) {
if (components == null || components.isEmpty()) {
return;
}
Set<Class<?>> skipTypes = null;
@SuppressWarnings("unchecked... | static <T extends Component> void function(List<T> components, String propertyPath, Object propertyValue) { if (components == null components.isEmpty()) { return; } Set<Class<?>> skipTypes = null; @SuppressWarnings(STR) Queue<LifecycleElement> elementQueue = RecycleUtils.getInstance( LinkedList.class); elementQueue.add... | /**
* Traverse a component tree, setting a property on all components for which the property is writable.
*
* @param <T> component type
* @param <T> component type
* @param components The components to traverse.
* @param propertyPath The property path to set.
* @param propertyV... | Traverse a component tree, setting a property on all components for which the property is writable | setComponentsPropertyDeep | {
"repo_name": "ricepanda/rice-git3",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/util/ComponentUtils.java",
"license": "apache-2.0",
"size": 39745
} | [
"java.util.HashSet",
"java.util.LinkedList",
"java.util.List",
"java.util.Queue",
"java.util.Set",
"org.kuali.rice.krad.uif.component.Component",
"org.kuali.rice.krad.uif.lifecycle.ViewLifecycleUtils"
] | import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Queue; import java.util.Set; import org.kuali.rice.krad.uif.component.Component; import org.kuali.rice.krad.uif.lifecycle.ViewLifecycleUtils; | import java.util.*; import org.kuali.rice.krad.uif.component.*; import org.kuali.rice.krad.uif.lifecycle.*; | [
"java.util",
"org.kuali.rice"
] | java.util; org.kuali.rice; | 1,756,499 |
public void callMappingOnView(CarpaccioAction action, View view, Object mappedObject) {
if (action.isCallMapping()) {
CarpaccioLogger.d(TAG, "callMappingOnView mapping=" + mappedObject + " action=" + action.getCompleteCall() + " view=" + view.getClass().getName());
String arg = ac... | void function(CarpaccioAction action, View view, Object mappedObject) { if (action.isCallMapping()) { CarpaccioLogger.d(TAG, STR + mappedObject + STR + action.getCompleteCall() + STR + view.getClass().getName()); String arg = action.getArgs()[0]; String objectName = null; String call; if (arg.contains(".")) { call = ar... | /**
* Called when a view loaded and call a mapping function
*
* @param view the calling view
* @param mappedObject If available, the object to map with the view. Else add the view to mappingWaitings
*/ | Called when a view loaded and call a mapping function | callMappingOnView | {
"repo_name": "tianyutingxy/Carpaccio",
"path": "carpaccio/src/main/java/com/github/florent37/carpaccio/mapping/MappingManager.java",
"license": "apache-2.0",
"size": 7629
} | [
"android.view.View",
"com.github.florent37.carpaccio.CarpaccioLogger",
"com.github.florent37.carpaccio.model.CarpaccioAction",
"java.util.ArrayList",
"java.util.List"
] | import android.view.View; import com.github.florent37.carpaccio.CarpaccioLogger; import com.github.florent37.carpaccio.model.CarpaccioAction; import java.util.ArrayList; import java.util.List; | import android.view.*; import com.github.florent37.carpaccio.*; import com.github.florent37.carpaccio.model.*; import java.util.*; | [
"android.view",
"com.github.florent37",
"java.util"
] | android.view; com.github.florent37; java.util; | 1,660,698 |
public IndexMetadata getIndexMetadata() {
return indexMetadata;
}
public int getNumberOfShards() { return numberOfShards; } | IndexMetadata function() { return indexMetadata; } public int getNumberOfShards() { return numberOfShards; } | /**
* Returns the current IndexMetadata for this index
*/ | Returns the current IndexMetadata for this index | getIndexMetadata | {
"repo_name": "HonzaKral/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/IndexSettings.java",
"license": "apache-2.0",
"size": 44817
} | [
"org.elasticsearch.cluster.metadata.IndexMetadata"
] | import org.elasticsearch.cluster.metadata.IndexMetadata; | import org.elasticsearch.cluster.metadata.*; | [
"org.elasticsearch.cluster"
] | org.elasticsearch.cluster; | 158,787 |
private void roundRobinAssignment(Cluster cluster, List<HRegionInfo> regions,
List<HRegionInfo> unassignedRegions, List<ServerName> servers,
Map<ServerName, List<HRegionInfo>> assignments) {
int numServers = servers.size();
int numRegions = regions.size();
int max = (int) Math.ceil((float) nu... | void function(Cluster cluster, List<HRegionInfo> regions, List<HRegionInfo> unassignedRegions, List<ServerName> servers, Map<ServerName, List<HRegionInfo>> assignments) { int numServers = servers.size(); int numRegions = regions.size(); int max = (int) Math.ceil((float) numRegions / numServers); int serverIdx = 0; if (... | /**
* Round robin a list of regions to a list of servers
*/ | Round robin a list of regions to a list of servers | roundRobinAssignment | {
"repo_name": "gustavoanatoly/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java",
"license": "apache-2.0",
"size": 65936
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.apache.hadoop.hbase.HRegionInfo",
"org.apache.hadoop.hbase.ServerName"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.ServerName; | import java.util.*; import org.apache.hadoop.hbase.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,381,525 |
public Map<HmDatapointInfo, HmDatapoint> getDatapoints() {
return datapoints;
} | Map<HmDatapointInfo, HmDatapoint> function() { return datapoints; } | /**
* Returns all datapoints.
*/ | Returns all datapoints | getDatapoints | {
"repo_name": "beowulfe/openhab2",
"path": "addons/binding/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/model/HmChannel.java",
"license": "epl-1.0",
"size": 4011
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 276,670 |
protected char scanWhitespace(StringBuffer result)
throws IOException
{
for (;;) {
char ch = this.readChar();
switch (ch) {
case ' ':
case '\t':
case '\n':
result.append(ch);
case '\r':
... | char function(StringBuffer result) throws IOException { for (;;) { char ch = this.readChar(); switch (ch) { case ' ': case '\t': case '\n': result.append(ch); case '\r': break; default: return ch; } } } | /**
* This method scans an identifier from the current reader.
* The scanned whitespace is appended to <code>result</code>.
*
* @return the next character following the whitespace.
*
* </dl><dl><dt><b>Preconditions:</b></dt><dd>
* <ul><li><code>result != null</code>
* </ul></dd><... | This method scans an identifier from the current reader. The scanned whitespace is appended to <code>result</code> | scanWhitespace | {
"repo_name": "TheProjecter/sharedmind",
"path": "freemind/main/XMLElement.java",
"license": "gpl-2.0",
"size": 102420
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,861,058 |
@Test
public void whenRemoveAllWithKeysIsUsed_thenNearCacheShouldBeInvalidated_onNearCacheAdapter() {
whenEntryIsRemoved_thenNearCacheShouldBeInvalidated(false, DataStructureMethods.REMOVE_ALL_WITH_KEYS);
} | void function() { whenEntryIsRemoved_thenNearCacheShouldBeInvalidated(false, DataStructureMethods.REMOVE_ALL_WITH_KEYS); } | /**
* Checks that the Near Cache is eventually invalidated when {@link DataStructureMethods#REMOVE_ALL_WITH_KEYS)} is used.
*/ | Checks that the Near Cache is eventually invalidated when <code>DataStructureMethods#REMOVE_ALL_WITH_KEYS)</code> is used | whenRemoveAllWithKeysIsUsed_thenNearCacheShouldBeInvalidated_onNearCacheAdapter | {
"repo_name": "emrahkocaman/hazelcast",
"path": "hazelcast/src/test/java/com/hazelcast/internal/nearcache/AbstractNearCacheBasicTest.java",
"license": "apache-2.0",
"size": 46469
} | [
"com.hazelcast.internal.adapter.DataStructureAdapter"
] | import com.hazelcast.internal.adapter.DataStructureAdapter; | import com.hazelcast.internal.adapter.*; | [
"com.hazelcast.internal"
] | com.hazelcast.internal; | 657,310 |
public static String getPrev(String type, String iconName)
{
ArrayList<String> tempList = getListForType(type);
if (tempList.isEmpty()) {
return iconName;
} else {
int idx = iconName.equals("") ? tempList.size() - 1 : tempList.indexOf(iconName) - 1;
r... | static String function(String type, String iconName) { ArrayList<String> tempList = getListForType(type); if (tempList.isEmpty()) { return iconName; } else { int idx = iconName.equals("") ? tempList.size() - 1 : tempList.indexOf(iconName) - 1; return tempList.get(idx < 0 ? tempList.size() - 1 : idx); } } | /**
* Returns name of previous tile in list.
*/ | Returns name of previous tile in list | getPrev | {
"repo_name": "Nuchaz/carpentersblocks",
"path": "src/main/java/com/carpentersblocks/util/handler/DesignHandler.java",
"license": "lgpl-2.1",
"size": 8727
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,593,996 |
@Override
public Adapter createPublishEventMediatorAdapter() {
if (publishEventMediatorItemProvider == null) {
publishEventMediatorItemProvider = new PublishEventMediatorItemProvider(this);
}
return publishEventMediatorItemProvider;
}
protected PublishEventMedi... | Adapter function() { if (publishEventMediatorItemProvider == null) { publishEventMediatorItemProvider = new PublishEventMediatorItemProvider(this); } return publishEventMediatorItemProvider; } protected PublishEventMediatorInputConnectorItemProvider publishEventMediatorInputConnectorItemProvider; | /**
* This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.PublishEventMediator}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.PublishEventMediator</code>. | createPublishEventMediatorAdapter | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 339597
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,300,282 |
@ApiModelProperty(value = "Link to the next subset of resources qualified. \n " +
"Empty if no more resources are to be returned.")
@JsonProperty("next")
public String getNext() {
return next;
} | @ApiModelProperty(value = STR + STR) @JsonProperty("next") String function() { return next; } | /**
* Link to the next subset of resources qualified. \nEmpty if no more resources are to be returned.
*/ | Link to the next subset of resources qualified. \nEmpty if no more resources are to be returned | getNext | {
"repo_name": "Kamidu/carbon-device-mgt",
"path": "components/device-mgt/org.wso2.carbon.device.mgt.v09.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/NotificationList.java",
"license": "apache-2.0",
"size": 3135
} | [
"com.fasterxml.jackson.annotation.JsonProperty",
"io.swagger.annotations.ApiModelProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModelProperty; | import com.fasterxml.jackson.annotation.*; import io.swagger.annotations.*; | [
"com.fasterxml.jackson",
"io.swagger.annotations"
] | com.fasterxml.jackson; io.swagger.annotations; | 2,312,971 |
public Locator nonEmptyOptionLocator() {
return nonEmptyOption;
} | Locator function() { return nonEmptyOption; } | /**
* Returns the nonEmptyOption.
*
* @return the nonEmptyOption
*/ | Returns the nonEmptyOption | nonEmptyOptionLocator | {
"repo_name": "tripu/validator",
"path": "src/nu/validator/checker/schematronequiv/Assertions.java",
"license": "mit",
"size": 135371
} | [
"org.xml.sax.Locator"
] | import org.xml.sax.Locator; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 524,593 |
public static Map<String, Object> handleWindowCoveringSupportedGet(byte[] payload) {
// Create our response map
Map<String, Object> response = new HashMap<String, Object>();
// Return the map of processed response data;
return response;
}
/**
* Creates a new message wi... | static Map<String, Object> function(byte[] payload) { Map<String, Object> response = new HashMap<String, Object>(); return response; } /** * Creates a new message with the WINDOW_COVERING_SUPPORTED_REPORT command. * <p> * Window Covering Supported Report * * @param parameterMask {@link List<Integer>} | /**
* Processes a received frame with the WINDOW_COVERING_SUPPORTED_GET command.
* <p>
* Window Covering Supported Get
*
* @param payload the {@link byte[]} payload data to process
* @return a {@link Map} of processed response data
*/ | Processes a received frame with the WINDOW_COVERING_SUPPORTED_GET command. Window Covering Supported Get | handleWindowCoveringSupportedGet | {
"repo_name": "zsmartsystems/com.zsmartsystems.zwave",
"path": "com.zsmartsystems.zwave/src/main/java/com/zsmartsystems/zwave/commandclass/impl/CommandClassWindowCoveringV1.java",
"license": "epl-1.0",
"size": 35748
} | [
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import java.util.HashMap; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,044,185 |
public PresentValueSABRSensitivityDataBundle priceSABRSensitivity(final InterestRateFutureOptionMarginSecurity security,
final SABRSTIRFuturesProviderInterface sabrData) {
final PresentValueSABRSensitivityDataBundle sensi = new PresentValueSABRSensitivityDataBundle();
// Forward sweep
final double p... | PresentValueSABRSensitivityDataBundle function(final InterestRateFutureOptionMarginSecurity security, final SABRSTIRFuturesProviderInterface sabrData) { final PresentValueSABRSensitivityDataBundle sensi = new PresentValueSABRSensitivityDataBundle(); final double priceFuture = METHOD_FUTURE.price(security.getUnderlyingF... | /**
* Computes the option security price curve sensitivity. The future price is computed without convexity adjustment.
*
* @param security
* The future option security.
* @param sabrData
* The SABR data bundle.
* @return The security price curve sensitivity.
*/ | Computes the option security price curve sensitivity. The future price is computed without convexity adjustment | priceSABRSensitivity | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/interestrate/future/provider/InterestRateFutureOptionMarginSecuritySABRMethod.java",
"license": "apache-2.0",
"size": 8087
} | [
"com.opengamma.analytics.financial.interestrate.PresentValueSABRSensitivityDataBundle",
"com.opengamma.analytics.financial.interestrate.future.derivative.InterestRateFutureOptionMarginSecurity",
"com.opengamma.analytics.financial.model.option.pricing.analytic.formula.BlackFunctionData",
"com.opengamma.analyti... | import com.opengamma.analytics.financial.interestrate.PresentValueSABRSensitivityDataBundle; import com.opengamma.analytics.financial.interestrate.future.derivative.InterestRateFutureOptionMarginSecurity; import com.opengamma.analytics.financial.model.option.pricing.analytic.formula.BlackFunctionData; import com.openga... | import com.opengamma.analytics.financial.interestrate.*; import com.opengamma.analytics.financial.interestrate.future.derivative.*; import com.opengamma.analytics.financial.model.option.pricing.analytic.formula.*; import com.opengamma.analytics.financial.provider.description.interestrate.*; import com.opengamma.util.tu... | [
"com.opengamma.analytics",
"com.opengamma.util"
] | com.opengamma.analytics; com.opengamma.util; | 1,525,092 |
public void setIsUsingBigIcon() {
LayoutParams lp = (LayoutParams) mIconView.getLayoutParams();
lp.width = mBigIconSize;
lp.height = mBigIconSize;
lp.endMargin = mBigIconMargin;
Resources res = getContext().getResources();
String typeface = res.getString(R.string.inf... | void function() { LayoutParams lp = (LayoutParams) mIconView.getLayoutParams(); lp.width = mBigIconSize; lp.height = mBigIconSize; lp.endMargin = mBigIconMargin; Resources res = getContext().getResources(); String typeface = res.getString(R.string.infobar_message_typeface); int textStyle = res.getInteger(R.integer.info... | /**
* Adjusts styling to account for the big icon layout.
*/ | Adjusts styling to account for the big icon layout | setIsUsingBigIcon | {
"repo_name": "axinging/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarLayout.java",
"license": "bsd-3-clause",
"size": 21414
} | [
"android.content.res.Resources",
"android.graphics.Typeface",
"android.text.TextUtils",
"android.util.TypedValue"
] | import android.content.res.Resources; import android.graphics.Typeface; import android.text.TextUtils; import android.util.TypedValue; | import android.content.res.*; import android.graphics.*; import android.text.*; import android.util.*; | [
"android.content",
"android.graphics",
"android.text",
"android.util"
] | android.content; android.graphics; android.text; android.util; | 2,365,597 |
public static boolean validatePlanOfCareActivityProcedureTemplateId(PlanOfCareActivityProcedure planOfCareActivityProcedure, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (VALIDATE_PLAN_OF_CARE_ACTIVITY_PROCEDURE_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
OCL.Helper helper = EOCL... | static boolean function(PlanOfCareActivityProcedure planOfCareActivityProcedure, DiagnosticChain diagnostics, Map<Object, Object> context) { if (VALIDATE_PLAN_OF_CARE_ACTIVITY_PROCEDURE_TEMPLATE_ID__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setContext(CCDPackage.Li... | /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.1.25')
* @param planOfCareActivityProcedure The receiving '<em><b>Plan Of Care Activity Procedure</b></em>' model object.
* @param diagnost... | self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.1.25') | validatePlanOfCareActivityProcedureTemplateId | {
"repo_name": "drbgfc/mdht",
"path": "cda/deprecated/org.openhealthtools.mdht.uml.cda.ccd/src/org/openhealthtools/mdht/uml/cda/ccd/operations/PlanOfCareActivityProcedureOperations.java",
"license": "epl-1.0",
"size": 15129
} | [
"java.util.Map",
"org.eclipse.emf.common.util.BasicDiagnostic",
"org.eclipse.emf.common.util.Diagnostic",
"org.eclipse.emf.common.util.DiagnosticChain",
"org.eclipse.ocl.ParserException",
"org.eclipse.ocl.ecore.Constraint",
"org.openhealthtools.mdht.uml.cda.ccd.CCDPackage",
"org.openhealthtools.mdht.u... | import java.util.Map; import org.eclipse.emf.common.util.BasicDiagnostic; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.common.util.DiagnosticChain; import org.eclipse.ocl.ParserException; import org.eclipse.ocl.ecore.Constraint; import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage; import org... | import java.util.*; import org.eclipse.emf.common.util.*; import org.eclipse.ocl.*; import org.eclipse.ocl.ecore.*; import org.openhealthtools.mdht.uml.cda.ccd.*; import org.openhealthtools.mdht.uml.cda.ccd.util.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.ocl",
"org.openhealthtools.mdht"
] | java.util; org.eclipse.emf; org.eclipse.ocl; org.openhealthtools.mdht; | 2,377,602 |
protected void sequence_UiTabSheet(EObject context, UiTabSheet semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(EObject context, UiTabSheet semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Constraint:
* (
* (i18nInfo=UiI18nInfo? styles=STRING?)?
* name=ID?
* tabs+=UiTabAssignment*
* bindings+=UiBinding*
* processorAssignments+=UiVisibilityProcessorAssignment*
* )
*/ | Constraint: ( (i18nInfo=UiI18nInfo? styles=STRING?)? name=ID? tabs+=UiTabAssignment bindings+=UiBinding processorAssignments+=UiVisibilityProcessorAssignment ) | sequence_UiTabSheet | {
"repo_name": "lunifera/lunifera-ecview-addons",
"path": "org.lunifera.ecview.dsl/src-gen/org/lunifera/ecview/dsl/serializer/UIGrammarSemanticSequencer.java",
"license": "epl-1.0",
"size": 151691
} | [
"org.eclipse.emf.ecore.EObject",
"org.lunifera.ecview.semantic.uimodel.UiTabSheet"
] | import org.eclipse.emf.ecore.EObject; import org.lunifera.ecview.semantic.uimodel.UiTabSheet; | import org.eclipse.emf.ecore.*; import org.lunifera.ecview.semantic.uimodel.*; | [
"org.eclipse.emf",
"org.lunifera.ecview"
] | org.eclipse.emf; org.lunifera.ecview; | 2,916,261 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.