method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static void setChannelOptions(Channel channel, EndpointConfig config) {
ChannelOptions options = channel.options();
options.setOption(DIRECT_BUF, config.isSocketBufferDirect())
.setOption(TCP_NODELAY, config.isSocketTcpNoDelay())
.setOption(SO_KEEPALIVE, config.i... | static void function(Channel channel, EndpointConfig config) { ChannelOptions options = channel.options(); options.setOption(DIRECT_BUF, config.isSocketBufferDirect()) .setOption(TCP_NODELAY, config.isSocketTcpNoDelay()) .setOption(SO_KEEPALIVE, config.isSocketKeepAlive()) .setOption(SO_SNDBUF, config.getSocketSendBuff... | /**
* Sets configured channel options on given {@link Channel}.
* @param channel the {@link Channel} on which options will be set
* @param config the endpoint configuration
*/ | Sets configured channel options on given <code>Channel</code> | setChannelOptions | {
"repo_name": "mesutcelik/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/internal/nio/IOUtil.java",
"license": "apache-2.0",
"size": 30451
} | [
"com.hazelcast.config.EndpointConfig",
"com.hazelcast.internal.networking.Channel",
"com.hazelcast.internal.networking.ChannelOptions",
"com.hazelcast.nio.serialization.ClassNameFilter",
"java.io.IOException",
"java.io.InputStream",
"java.io.ObjectInputStream"
] | import com.hazelcast.config.EndpointConfig; import com.hazelcast.internal.networking.Channel; import com.hazelcast.internal.networking.ChannelOptions; import com.hazelcast.nio.serialization.ClassNameFilter; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; | import com.hazelcast.config.*; import com.hazelcast.internal.networking.*; import com.hazelcast.nio.serialization.*; import java.io.*; | [
"com.hazelcast.config",
"com.hazelcast.internal",
"com.hazelcast.nio",
"java.io"
] | com.hazelcast.config; com.hazelcast.internal; com.hazelcast.nio; java.io; | 33,910 |
public synchronized Map<String, Object> waitForResult(long milliseconds) {
if (Debug.verboseOn()) Debug.logVerbose("Waiting for results...", module);
while (!isCompleted()) {
try {
this.wait(milliseconds);
if (Debug.verboseOn()) Debug.logVerbose("Waiting..... | synchronized Map<String, Object> function(long milliseconds) { if (Debug.verboseOn()) Debug.logVerbose(STR, module); while (!isCompleted()) { try { this.wait(milliseconds); if (Debug.verboseOn()) Debug.logVerbose(STR, module); } catch (java.lang.InterruptedException e) { Debug.logError(e, module); } } return this.getRe... | /**
* Waits for the service to complete, check the status ever n milliseconds
* @param milliseconds
* @return Map
*/ | Waits for the service to complete, check the status ever n milliseconds | waitForResult | {
"repo_name": "yuri0x7c1/ofbiz-explorer",
"path": "src/test/resources/apache-ofbiz-16.11.03/framework/service/src/main/java/org/apache/ofbiz/service/GenericResultWaiter.java",
"license": "apache-2.0",
"size": 4196
} | [
"java.util.Map",
"org.apache.ofbiz.base.util.Debug"
] | import java.util.Map; import org.apache.ofbiz.base.util.Debug; | import java.util.*; import org.apache.ofbiz.base.util.*; | [
"java.util",
"org.apache.ofbiz"
] | java.util; org.apache.ofbiz; | 793,130 |
InspectionExtension extension = extensions.getExtension(InspectionExtension.class);
if (extension == null) {
LOG.warn("inspection support is not enabled");
return;
}
if (extension.isSupported(element) == false) {
LOG.warn(MessageFormat.format(
... | InspectionExtension extension = extensions.getExtension(InspectionExtension.class); if (extension == null) { LOG.warn(STR); return; } if (extension.isSupported(element) == false) { LOG.warn(MessageFormat.format( STR, element.getClass().getName())); return; } extension.inspect(location, element); } | /**
* Inspects the target element only if inspection is supported in this session.
* @param extensions the extension container
* @param location the output location of inspection information
* @param element the target element
* @throws DiagnosticException if failed to inspect the target elemen... | Inspects the target element only if inspection is supported in this session | inspect | {
"repo_name": "ashigeru/asakusafw-compiler",
"path": "compiler-project/inspection/src/main/java/com/asakusafw/lang/compiler/inspection/InspectionExtension.java",
"license": "apache-2.0",
"size": 3953
} | [
"java.text.MessageFormat"
] | import java.text.MessageFormat; | import java.text.*; | [
"java.text"
] | java.text; | 1,115,737 |
private Entry getOwnerOfRelationship(final Value<?> value)
throws LdapInvalidDnException, LdapException {
Entry relationshipEntry = ((ClonedServerEntry) this.opContext
.getSession().lookup(new Dn(value.getString())))
.getOriginalEntry();
Entry ownerOfRelationship = ((ClonedServerEntry) this.opContext... | Entry function(final Value<?> value) throws LdapInvalidDnException, LdapException { Entry relationshipEntry = ((ClonedServerEntry) this.opContext .getSession().lookup(new Dn(value.getString()))) .getOriginalEntry(); Entry ownerOfRelationship = ((ClonedServerEntry) this.opContext .getSession().lookup( new Dn(relationshi... | /**
* Returns the owner of a relationship based on the relationship dn.
*
* @param value Value containing the dn of the relationship.
* @return the owner entry of the relationship.
* @throws LdapInvalidDnException thrown on invalid value.
* @throws LdapException thrown on ... | Returns the owner of a relationship based on the relationship dn | getOwnerOfRelationship | {
"repo_name": "BFH-TI/hpd",
"path": "hpd-apacheds-interceptors/src/main/java/ch/bfh/i4mi/interceptor/RelationshipChecker.java",
"license": "gpl-2.0",
"size": 11255
} | [
"org.apache.directory.api.ldap.model.entry.Entry",
"org.apache.directory.api.ldap.model.entry.Value",
"org.apache.directory.api.ldap.model.exception.LdapException",
"org.apache.directory.api.ldap.model.exception.LdapInvalidDnException",
"org.apache.directory.api.ldap.model.name.Dn",
"org.apache.directory.... | import org.apache.directory.api.ldap.model.entry.Entry; import org.apache.directory.api.ldap.model.entry.Value; import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.api.ldap.model.exception.LdapInvalidDnException; import org.apache.directory.api.ldap.model.name.Dn; import org.... | import org.apache.directory.api.ldap.model.entry.*; import org.apache.directory.api.ldap.model.exception.*; import org.apache.directory.api.ldap.model.name.*; import org.apache.directory.server.core.api.entry.*; | [
"org.apache.directory"
] | org.apache.directory; | 342,939 |
private void propagateAndRecycleEvent(MotionEvent e, EventTarget target) {
propagateEvent(e, target);
e.recycle();
} | void function(MotionEvent e, EventTarget target) { propagateEvent(e, target); e.recycle(); } | /**
* Propagates the given {@link MotionEvent} to the given {@link EventTarget}, recycling it
* afterwards. This is intended for synthetic events only, those create by
* {@link MotionEvent#obtain} or the helper methods
* {@link OverlayPanelEventFilter#lockEventHorizontallty} and
* {@link Overla... | Propagates the given <code>MotionEvent</code> to the given <code>EventTarget</code>, recycling it afterwards. This is intended for synthetic events only, those create by <code>MotionEvent#obtain</code> or the helper methods <code>OverlayPanelEventFilter#lockEventHorizontallty</code> and <code>OverlayPanelEventFilter#co... | propagateAndRecycleEvent | {
"repo_name": "was4444/chromium.src",
"path": "chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/eventfilter/OverlayPanelEventFilter.java",
"license": "bsd-3-clause",
"size": 23071
} | [
"android.view.MotionEvent"
] | import android.view.MotionEvent; | import android.view.*; | [
"android.view"
] | android.view; | 1,014,624 |
BufferedReader getReader() throws IOException; | BufferedReader getReader() throws IOException; | /**
* Retrieves the body of the request as character data using
* a <code>BufferedReader</code>. The reader translates the character
* data according to the character encoding used on the body.
* Either this method or {@link #getInputStream} may be called to read the
* body, not both.
*
... | Retrieves the body of the request as character data using a <code>BufferedReader</code>. The reader translates the character data according to the character encoding used on the body. Either this method or <code>#getInputStream</code> may be called to read the body, not both | getReader | {
"repo_name": "salyh/javamailspec",
"path": "geronimo-servlet_3.1_spec/src/main/java/javax/servlet/ServletRequest.java",
"license": "apache-2.0",
"size": 19209
} | [
"java.io.BufferedReader",
"java.io.IOException"
] | import java.io.BufferedReader; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,647,298 |
@Override
public int read(byte[] bytes) throws IOException {
return read(bytes, 0, bytes.length);
} | int function(byte[] bytes) throws IOException { return read(bytes, 0, bytes.length); } | /**
* Read bytes into an array. This method will block until some input is
* available, an I/O error occurs, or the end of all underlying streams are
* reached.
*
* @param bytes
* The destination buffer.
* @return The number of bytes read, or -1 if the end of the stream has... | Read bytes into an array. This method will block until some input is available, an I/O error occurs, or the end of all underlying streams are reached | read | {
"repo_name": "alternet/alternet.ml",
"path": "tools/src/main/java/ml/alternet/io/InputStreamAggregator.java",
"license": "mit",
"size": 7992
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,461,514 |
@Test
public void testSingleAttributeOverride() throws Exception {
reader = getReader( Entity3.class, "field1", "element-collection.orm21.xml" );
assertAnnotationPresent( ElementCollection.class );
assertAnnotationNotPresent( AttributeOverride.class );
assertAnnotationPresent( AttributeOverrides.class );
... | void function() throws Exception { reader = getReader( Entity3.class, STR, STR ); assertAnnotationPresent( ElementCollection.class ); assertAnnotationNotPresent( AttributeOverride.class ); assertAnnotationPresent( AttributeOverrides.class ); AttributeOverrides overridesAnno = reader .getAnnotation( AttributeOverrides.c... | /**
* When there's a single attribute override, we still wrap it with an
* AttributeOverrides annotation.
*/ | When there's a single attribute override, we still wrap it with an AttributeOverrides annotation | testSingleAttributeOverride | {
"repo_name": "1fechner/FeatureExtractor",
"path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/ejb3/Ejb3XmlElementCollectionTest.java",
"license": "lgpl-2.1",
"size": 30738
} | [
"javax.persistence.AttributeOverride",
"javax.persistence.AttributeOverrides",
"javax.persistence.ElementCollection",
"org.junit.Assert"
] | import javax.persistence.AttributeOverride; import javax.persistence.AttributeOverrides; import javax.persistence.ElementCollection; import org.junit.Assert; | import javax.persistence.*; import org.junit.*; | [
"javax.persistence",
"org.junit"
] | javax.persistence; org.junit; | 1,181,272 |
public static void requestPasswordReset(String customer, String email) throws Exception {
SuperUser u = new SuperUser();
u.setCustomerName(customer);
Customer c = u.getCustomer();
AbstractPersistence p = AbstractPersistence.get();
try {
p.begin();
p.setUser(u);
DocumentQuery q = p.newDocumentQuery... | static void function(String customer, String email) throws Exception { SuperUser u = new SuperUser(); u.setCustomerName(customer); Customer c = u.getCustomer(); AbstractPersistence p = AbstractPersistence.get(); try { p.begin(); p.setUser(u); DocumentQuery q = p.newDocumentQuery(SQLMetaDataUtil.ADMIN_MODULE_NAME, SQLMe... | /**
* Called from the requestPasswordReset.jsp.
*
* @param userName
*/ | Called from the requestPasswordReset.jsp | requestPasswordReset | {
"repo_name": "skyvers/wildcat",
"path": "skyve-web/src/main/java/org/skyve/impl/web/WebUtil.java",
"license": "lgpl-2.1",
"size": 16920
} | [
"java.util.List",
"org.skyve.EXT",
"org.skyve.domain.Bean",
"org.skyve.domain.PersistentBean",
"org.skyve.impl.metadata.user.SuperUser",
"org.skyve.impl.persistence.AbstractPersistence",
"org.skyve.impl.util.SQLMetaDataUtil",
"org.skyve.metadata.customer.Customer",
"org.skyve.metadata.model.document... | import java.util.List; import org.skyve.EXT; import org.skyve.domain.Bean; import org.skyve.domain.PersistentBean; import org.skyve.impl.metadata.user.SuperUser; import org.skyve.impl.persistence.AbstractPersistence; import org.skyve.impl.util.SQLMetaDataUtil; import org.skyve.metadata.customer.Customer; import org.sky... | import java.util.*; import org.skyve.*; import org.skyve.domain.*; import org.skyve.impl.metadata.user.*; import org.skyve.impl.persistence.*; import org.skyve.impl.util.*; import org.skyve.metadata.customer.*; import org.skyve.metadata.model.document.*; import org.skyve.metadata.module.*; import org.skyve.persistence.... | [
"java.util",
"org.skyve",
"org.skyve.domain",
"org.skyve.impl",
"org.skyve.metadata",
"org.skyve.persistence",
"org.skyve.util"
] | java.util; org.skyve; org.skyve.domain; org.skyve.impl; org.skyve.metadata; org.skyve.persistence; org.skyve.util; | 195,313 |
public static PlaceholderFragment newInstance(int sectionNumber) {
PlaceholderFragment fragment = new PlaceholderFragment();
Bundle args = new Bundle();
args.putInt(ARG_SECTION_NUMBER, sectionNumber);
fragment.setArguments(args);
return fragment;
... | static PlaceholderFragment function(int sectionNumber) { PlaceholderFragment fragment = new PlaceholderFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; } | /**
* Returns a new instance of this fragment for the given section
* number.
*/ | Returns a new instance of this fragment for the given section number | newInstance | {
"repo_name": "vichuvrn/Firebase-RecyclerView",
"path": "Project -2/main/java/com/vichuvrntech/vichuvrn/testprojcet/MainActivity.java",
"license": "apache-2.0",
"size": 5194
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 1,134,974 |
void register(NamespaceInfo nsInfo) throws IOException {
// The handshake() phase loaded the block pool storage
// off disk - so update the bpRegistration object from that info
bpRegistration = bpos.createRegistration();
LOG.info(this + " beginning handshake with NN");
while (shouldRun()) {
... | void register(NamespaceInfo nsInfo) throws IOException { bpRegistration = bpos.createRegistration(); LOG.info(this + STR); while (shouldRun()) { try { bpRegistration = bpNamenode.registerDatanode(bpRegistration); bpRegistration.setNamespaceInfo(nsInfo); break; } catch(EOFException e) { LOG.info(STR + nnAddr + STR + e.g... | /**
* Register one bp with the corresponding NameNode
* <p>
* The bpDatanode needs to register with the namenode on startup in order
* 1) to report which storage it is serving now and
* 2) to receive a registrationID
*
* issued by the namenode to recognize registered datanodes.
*
* @param... | Register one bp with the corresponding NameNode The bpDatanode needs to register with the namenode on startup in order 1) to report which storage it is serving now and 2) to receive a registrationID issued by the namenode to recognize registered datanodes | register | {
"repo_name": "korrelate/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java",
"license": "apache-2.0",
"size": 36925
} | [
"java.io.EOFException",
"java.io.IOException",
"java.net.SocketTimeoutException",
"org.apache.hadoop.hdfs.server.protocol.NamespaceInfo"
] | import java.io.EOFException; import java.io.IOException; import java.net.SocketTimeoutException; import org.apache.hadoop.hdfs.server.protocol.NamespaceInfo; | import java.io.*; import java.net.*; import org.apache.hadoop.hdfs.server.protocol.*; | [
"java.io",
"java.net",
"org.apache.hadoop"
] | java.io; java.net; org.apache.hadoop; | 2,374,806 |
public void setLayoutManager(RecyclerView.LayoutManager manager) {
mRecyclerView.setLayoutManager(manager);
} | void function(RecyclerView.LayoutManager manager) { mRecyclerView.setLayoutManager(manager); } | /**
* Set the layout manager to the recycler
*
* @param manager
*/ | Set the layout manager to the recycler | setLayoutManager | {
"repo_name": "onlynight/UltimateRecyclerView",
"path": "UltimateRecyclerView/ultimaterecyclerview/src/main/java/com/marshalchen/ultimaterecyclerview/UltimateRecyclerView.java",
"license": "apache-2.0",
"size": 51708
} | [
"android.support.v7.widget.RecyclerView"
] | import android.support.v7.widget.RecyclerView; | import android.support.v7.widget.*; | [
"android.support"
] | android.support; | 2,652,531 |
private IFolder createFolderHandle(IContainer container, String folderName) {
return container.getFolder(new Path(folderName));
} | IFolder function(IContainer container, String folderName) { return container.getFolder(new Path(folderName)); } | /**
* Creates a folder resource handle for the folder with the given name. This method does not
* create the folder resource; this is the responsibility of <code>createFolder</code>.
*
* @param container the resource container
* @param folderName the name of the folder
* @return the new folder resourc... | Creates a folder resource handle for the folder with the given name. This method does not create the folder resource; this is the responsibility of <code>createFolder</code> | createFolderHandle | {
"repo_name": "sleshchenko/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ui-ide/src/main/java/org/eclipse/ui/dialogs/ContainerGenerator.java",
"license": "epl-1.0",
"size": 8191
} | [
"org.eclipse.core.resources.IContainer",
"org.eclipse.core.resources.IFolder",
"org.eclipse.core.runtime.Path"
] | import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFolder; import org.eclipse.core.runtime.Path; | import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 1,178,602 |
private float scaleTriggerPower(float power) {
// Ensure the values are legal.
float clipped_power = Range.clip(power, -1, 1);
// Remember if this is positive or negative
float sign = Math.signum(clipped_power);
// Work only with positive numbers for simplicity
flo... | float function(float power) { float clipped_power = Range.clip(power, -1, 1); float sign = Math.signum(clipped_power); float abs_power = Math.abs(clipped_power); int index = (int) (abs_power * (power_curve.length - 1)); float scaled_power = sign * power_curve[index]; return scaled_power; } private static float[] steer_... | /**
* The DC motors are scaled to make it easier to control them at slower speeds
* The clip method guarantees the value never exceeds the range 0-1.
*/ | The DC motors are scaled to make it easier to control them at slower speeds The clip method guarantees the value never exceeds the range 0-1 | scaleTriggerPower | {
"repo_name": "BaCoNeers/fgc_ftc_app",
"path": "TeamCode/src/main/java/org/baconeers/common/GamePadDualMotorSteerDrive.java",
"license": "bsd-3-clause",
"size": 4299
} | [
"com.qualcomm.robotcore.util.Range"
] | import com.qualcomm.robotcore.util.Range; | import com.qualcomm.robotcore.util.*; | [
"com.qualcomm.robotcore"
] | com.qualcomm.robotcore; | 1,662,001 |
public void assertConnectionCountTo(TestFunction inTarget, int desiredCount) {
int outCount = 0;
int inCount = 0;
for (AbstractConnector ac : this.getOutConnectors()) {
for (AbstractConnector to : ac.getConnections()) {
if (to.getParent().equals(inTarget.... | void function(TestFunction inTarget, int desiredCount) { int outCount = 0; int inCount = 0; for (AbstractConnector ac : this.getOutConnectors()) { for (AbstractConnector to : ac.getConnections()) { if (to.getParent().equals(inTarget.contained)) { outCount++; } } } for (AbstractConnector ac : inTarget.getInConnectors())... | /**
* Asserts there are exactly desiredCount connections to inTarget.
*
* @param inTarget
* @param desiredCount
*/ | Asserts there are exactly desiredCount connections to inTarget | assertConnectionCountTo | {
"repo_name": "openstreetmap/OSMembrane",
"path": "src/test/java/de/osmembrane/model/TestFunction.java",
"license": "gpl-3.0",
"size": 7509
} | [
"de.osmembrane.model.pipeline.AbstractConnector",
"org.junit.Assert"
] | import de.osmembrane.model.pipeline.AbstractConnector; import org.junit.Assert; | import de.osmembrane.model.pipeline.*; import org.junit.*; | [
"de.osmembrane.model",
"org.junit"
] | de.osmembrane.model; org.junit; | 118,655 |
private static Options constructGnuOptions() {
final Options gnuOptions = new Options();
gnuOptions.addOption("d", DEBUG_OPTION, false, "Print debug information")
.addOption("q", QUIET_OPTION, false, "Quiet output. Doesn't work if --" + DEBUG_OPTION + " specified.")
.addOption("h", HELP_OPTION, false, "Print... | static Options function() { final Options gnuOptions = new Options(); gnuOptions.addOption("d", DEBUG_OPTION, false, STR) .addOption("q", QUIET_OPTION, false, STR + DEBUG_OPTION + STR) .addOption("h", HELP_OPTION, false, STR); return gnuOptions; } | /**
* Constructs the set of GNU options.
*
* @return - The constructed options.
*/ | Constructs the set of GNU options | constructGnuOptions | {
"repo_name": "icegem/icegem",
"path": "icegem-cache-utils/src/main/java/com/googlecode/icegem/cacheutils/Launcher.java",
"license": "lgpl-3.0",
"size": 9330
} | [
"org.apache.commons.cli.Options"
] | import org.apache.commons.cli.Options; | import org.apache.commons.cli.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,308,862 |
void getChildren(String path, AsyncCallback<List<CmsVfsEntryBean>> callback); | void getChildren(String path, AsyncCallback<List<CmsVfsEntryBean>> callback); | /**
* Fetches the list of children of a path.<p>
*
* @param path the path for which the list of children should be retrieved
* @param callback the asynchronous callback
*/ | Fetches the list of children of a path | getChildren | {
"repo_name": "it-tavis/opencms-core",
"path": "src/org/opencms/gwt/shared/rpc/I_CmsVfsServiceAsync.java",
"license": "lgpl-2.1",
"size": 12380
} | [
"com.google.gwt.user.client.rpc.AsyncCallback",
"java.util.List",
"org.opencms.gwt.shared.CmsVfsEntryBean"
] | import com.google.gwt.user.client.rpc.AsyncCallback; import java.util.List; import org.opencms.gwt.shared.CmsVfsEntryBean; | import com.google.gwt.user.client.rpc.*; import java.util.*; import org.opencms.gwt.shared.*; | [
"com.google.gwt",
"java.util",
"org.opencms.gwt"
] | com.google.gwt; java.util; org.opencms.gwt; | 550,493 |
public org.opencps.usermgt.service.WorkingUnitService getWorkingUnitService() {
return workingUnitService;
} | org.opencps.usermgt.service.WorkingUnitService function() { return workingUnitService; } | /**
* Returns the working unit remote service.
*
* @return the working unit remote service
*/ | Returns the working unit remote service | getWorkingUnitService | {
"repo_name": "hltn/opencps",
"path": "portlets/opencps-portlet/docroot/WEB-INF/src/org/opencps/usermgt/service/base/WorkingUnitServiceBaseImpl.java",
"license": "agpl-3.0",
"size": 12775
} | [
"org.opencps.usermgt.service.WorkingUnitService"
] | import org.opencps.usermgt.service.WorkingUnitService; | import org.opencps.usermgt.service.*; | [
"org.opencps.usermgt"
] | org.opencps.usermgt; | 2,494,115 |
public void dump( final DataOutputStream file ) throws IOException {
file.writeShort(requiresIndex);
file.writeShort(requiresFlags);
file.writeShort(requiresVersionIndex);
} | void function( final DataOutputStream file ) throws IOException { file.writeShort(requiresIndex); file.writeShort(requiresFlags); file.writeShort(requiresVersionIndex); } | /**
* Dump table entry to file stream in binary format.
*
* @param file Output file stream
* @throws IOException if an I/O Exception occurs in writeShort
*/ | Dump table entry to file stream in binary format | dump | {
"repo_name": "apache/commons-bcel",
"path": "src/main/java/org/apache/bcel/classfile/ModuleRequires.java",
"license": "apache-2.0",
"size": 3792
} | [
"java.io.DataOutputStream",
"java.io.IOException"
] | import java.io.DataOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 276,721 |
public List<Topic> getAvailableTopics() {
return availableTopics;
} | List<Topic> function() { return availableTopics; } | /**
* Gets the value of the 'availableTopics' field.
*/ | Gets the value of the 'availableTopics' field | getAvailableTopics | {
"repo_name": "Oleh-Kravchenko/kaa",
"path": "server/common/server-shared/src/main/java/org/kaaproject/kaa/server/sync/NotificationServerSync.java",
"license": "apache-2.0",
"size": 4103
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,626,446 |
public static String createErrorXML(final ApplicationException exception)
{
return generateXML(new ResponseTO(new GenericErrorTO(exception)));
} | static String function(final ApplicationException exception) { return generateXML(new ResponseTO(new GenericErrorTO(exception))); } | /**
* Generates the error XML from the Application Exception.
*
* @param exception
* @return String
*/ | Generates the error XML from the Application Exception | createErrorXML | {
"repo_name": "monikadrajer/direct-vendor-tools",
"path": "site-login/src/main/java/org/sitenv/directvendortools/web/util/XMLGenerator.java",
"license": "bsd-2-clause",
"size": 1768
} | [
"org.sitenv.directvendortools.web.dto.GenericErrorTO",
"org.sitenv.directvendortools.web.dto.ResponseTO"
] | import org.sitenv.directvendortools.web.dto.GenericErrorTO; import org.sitenv.directvendortools.web.dto.ResponseTO; | import org.sitenv.directvendortools.web.dto.*; | [
"org.sitenv.directvendortools"
] | org.sitenv.directvendortools; | 158,612 |
protected TableConfig createOfflineTableConfig() {
return new TableConfigBuilder(TableType.OFFLINE).setTableName(getTableName()).setSchemaName(getSchemaName())
.setTimeColumnName(getTimeColumnName()).setSortedColumn(getSortedColumn())
.setInvertedIndexColumns(getInvertedIndexColumns()).setNoDictio... | TableConfig function() { return new TableConfigBuilder(TableType.OFFLINE).setTableName(getTableName()).setSchemaName(getSchemaName()) .setTimeColumnName(getTimeColumnName()).setSortedColumn(getSortedColumn()) .setInvertedIndexColumns(getInvertedIndexColumns()).setNoDictionaryColumns(getNoDictionaryColumns()) .setRangeI... | /**
* Creates a new OFFLINE table config.
*/ | Creates a new OFFLINE table config | createOfflineTableConfig | {
"repo_name": "linkedin/pinot",
"path": "pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTest.java",
"license": "apache-2.0",
"size": 19324
} | [
"org.apache.pinot.spi.config.table.TableConfig",
"org.apache.pinot.spi.config.table.TableType",
"org.apache.pinot.spi.utils.builder.TableConfigBuilder"
] | import org.apache.pinot.spi.config.table.TableConfig; import org.apache.pinot.spi.config.table.TableType; import org.apache.pinot.spi.utils.builder.TableConfigBuilder; | import org.apache.pinot.spi.config.table.*; import org.apache.pinot.spi.utils.builder.*; | [
"org.apache.pinot"
] | org.apache.pinot; | 2,655,940 |
boolean evaluate(Set<String> authorisations, Long aclId, PermissionContext context)
{
// Start out true and "and" all other results
boolean success = true;
// Check the required permissions but not for sets they rely on
// their underlying permissio... | boolean evaluate(Set<String> authorisations, Long aclId, PermissionContext context) { boolean success = true; if (modelDAO.checkPermission(required)) { success &= hasSinglePermission(authorisations, aclId, context); if (!success) { return false; } } for (PermissionReference pr : nodeRequirements) { AclTest nt = new Acl... | /**
* Internal hook point for recursion
*
* @param authorisations Set<String>
* @param aclId Long
* @param context PermissionContext
* @return true if granted
*/ | Internal hook point for recursion | evaluate | {
"repo_name": "Kast0rTr0y/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/security/permissions/impl/PermissionServiceImpl.java",
"license": "lgpl-3.0",
"size": 102917
} | [
"java.util.Set",
"org.alfresco.repo.security.permissions.PermissionReference",
"org.alfresco.service.cmr.security.PermissionContext"
] | import java.util.Set; import org.alfresco.repo.security.permissions.PermissionReference; import org.alfresco.service.cmr.security.PermissionContext; | import java.util.*; import org.alfresco.repo.security.permissions.*; import org.alfresco.service.cmr.security.*; | [
"java.util",
"org.alfresco.repo",
"org.alfresco.service"
] | java.util; org.alfresco.repo; org.alfresco.service; | 1,992,522 |
public SqlTriggerGetResultsInner withResource(SqlTriggerGetPropertiesResource resource) {
this.resource = resource;
return this;
} | SqlTriggerGetResultsInner function(SqlTriggerGetPropertiesResource resource) { this.resource = resource; return this; } | /**
* Set the resource property: The resource property.
*
* @param resource the resource value to set.
* @return the SqlTriggerGetResultsInner object itself.
*/ | Set the resource property: The resource property | withResource | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/models/SqlTriggerGetResultsInner.java",
"license": "mit",
"size": 1828
} | [
"com.azure.resourcemanager.cosmos.models.SqlTriggerGetPropertiesResource"
] | import com.azure.resourcemanager.cosmos.models.SqlTriggerGetPropertiesResource; | import com.azure.resourcemanager.cosmos.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 335,919 |
@WebMethod
@Path("/addConfigPropertyToPage")
@Produces("text/plain")
@GET
public String addConfigPropertyToPage(
@WebParam(name = "sessionid", partName = "sessionid") @QueryParam("sessionid") String sessionid,
@WebParam(name = "siteid", partName = "siteid") @QueryParam("sitei... | @Path(STR) @Produces(STR) String function( @WebParam(name = STR, partName = STR) @QueryParam(STR) String sessionid, @WebParam(name = STR, partName = STR) @QueryParam(STR) String siteid, @WebParam(name = STR, partName = STR) @QueryParam(STR) String pagetitle, @WebParam(name = STR, partName = STR) @QueryParam(STR) String... | /**
* Add a property to a page in a site
*
* @param sessionid the id of a valid session
* @param siteid the id of the site to add the page to
* @param pagetitle the title of the page the tool exists in
* @param propname the name of the property
* @param propvalue the value of the ... | Add a property to a page in a site | addConfigPropertyToPage | {
"repo_name": "pushyamig/sakai",
"path": "webservices/cxf/src/java/org/sakaiproject/webservices/SakaiScript.java",
"license": "apache-2.0",
"size": 209455
} | [
"java.util.Iterator",
"java.util.List",
"javax.jws.WebParam",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.QueryParam",
"org.sakaiproject.entity.api.ResourcePropertiesEdit",
"org.sakaiproject.site.api.Site",
"org.sakaiproject.site.api.SitePage",
"org.sakaiproject.tool.api.Session"
] | import java.util.Iterator; import java.util.List; import javax.jws.WebParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import org.sakaiproject.entity.api.ResourcePropertiesEdit; import org.sakaiproject.site.api.Site; import org.sakaiproject.site.api.SitePage; import org.sakaip... | import java.util.*; import javax.jws.*; import javax.ws.rs.*; import org.sakaiproject.entity.api.*; import org.sakaiproject.site.api.*; import org.sakaiproject.tool.api.*; | [
"java.util",
"javax.jws",
"javax.ws",
"org.sakaiproject.entity",
"org.sakaiproject.site",
"org.sakaiproject.tool"
] | java.util; javax.jws; javax.ws; org.sakaiproject.entity; org.sakaiproject.site; org.sakaiproject.tool; | 1,446,577 |
public List<WifiConfiguration> getConfiguredNetworks() {
try {
return mService.getConfiguredNetworks();
} catch (RemoteException e) {
return null;
}
} | List<WifiConfiguration> function() { try { return mService.getConfiguredNetworks(); } catch (RemoteException e) { return null; } } | /**
* Return a list of all the networks configured in the supplicant.
* Not all fields of WifiConfiguration are returned. Only the following
* fields are filled in:
* <ul>
* <li>networkId</li>
* <li>SSID</li>
* <li>BSSID</li>
* <li>priority</li>
* <li>allowedProtocols</li>
... | Return a list of all the networks configured in the supplicant. Not all fields of WifiConfiguration are returned. Only the following fields are filled in: networkId SSID BSSID priority allowedProtocols allowedKeyManagement allowedAuthAlgorithms allowedPairwiseCiphers allowedGroupCiphers | getConfiguredNetworks | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "frameworks/base/wifi/java/android/net/wifi/WifiManager.java",
"license": "gpl-2.0",
"size": 82514
} | [
"android.os.RemoteException",
"java.util.List"
] | import android.os.RemoteException; import java.util.List; | import android.os.*; import java.util.*; | [
"android.os",
"java.util"
] | android.os; java.util; | 1,882,725 |
private void createReferenceContainers() {
boolean parseAll = false;
IProject project = getCurrentProject();
if (project == null) {
if (bibContainer == null) bibContainer = new ReferenceContainer();
if (labelContainer == null) labelContainer = new ReferenceContainer()... | void function() { boolean parseAll = false; IProject project = getCurrentProject(); if (project == null) { if (bibContainer == null) bibContainer = new ReferenceContainer(); if (labelContainer == null) labelContainer = new ReferenceContainer(); if (commandContainer == null) commandContainer = new TexCommandContainer();... | /**
* Creates the reference containers.
*
*/ | Creates the reference containers | createReferenceContainers | {
"repo_name": "rondiplomatico/texlipse",
"path": "source/net/sourceforge/texlipse/model/TexDocumentModel.java",
"license": "epl-1.0",
"size": 40300
} | [
"net.sourceforge.texlipse.properties.TexlipseProperties",
"org.eclipse.core.resources.IProject"
] | import net.sourceforge.texlipse.properties.TexlipseProperties; import org.eclipse.core.resources.IProject; | import net.sourceforge.texlipse.properties.*; import org.eclipse.core.resources.*; | [
"net.sourceforge.texlipse",
"org.eclipse.core"
] | net.sourceforge.texlipse; org.eclipse.core; | 2,640,305 |
private String dumpPropertyValue(final String property,
final XPlannerProperties properties) {
return this.dumpNameValuePair(property,
properties.getProperty(property));
} | String function(final String property, final XPlannerProperties properties) { return this.dumpNameValuePair(property, properties.getProperty(property)); } | /**
* Dump property value.
*
* @param property
* the property
* @param properties
* the properties
* @return the string
*/ | Dump property value | dumpPropertyValue | {
"repo_name": "alarulrajan/CodeFest",
"path": "src/com/technoetic/xplanner/db/hsqldb/HsqlServer.java",
"license": "gpl-2.0",
"size": 17678
} | [
"com.technoetic.xplanner.XPlannerProperties"
] | import com.technoetic.xplanner.XPlannerProperties; | import com.technoetic.xplanner.*; | [
"com.technoetic.xplanner"
] | com.technoetic.xplanner; | 2,127,195 |
public String getFormatString(Locale locale, String key) {
String[] suffixes = toStrings(locale);
while(true) {
for (int i=0; i<suffixes.length; i++) {
String suffix = suffixes[i];
String msg = get(suffix).getProperty(key);
if(msg!=null &&... | String function(Locale locale, String key) { String[] suffixes = toStrings(locale); while(true) { for (int i=0; i<suffixes.length; i++) { String suffix = suffixes[i]; String msg = get(suffix).getProperty(key); if(msg!=null && msg.length()>0) return msg; int idx = suffix.lastIndexOf('_'); if(idx<0) return null; suffixes... | /**
* Gets the format string for the given key.
* <p>
* This method performs a search so that a look up for "pt_BR" would delegate
* to "pt" then "" (the no-locale locale.)
*/ | Gets the format string for the given key. This method performs a search so that a look up for "pt_BR" would delegate to "pt" then "" (the no-locale locale.) | getFormatString | {
"repo_name": "stapler/stapler",
"path": "jelly/src/main/java/org/kohsuke/stapler/jelly/ResourceBundle.java",
"license": "bsd-2-clause",
"size": 7366
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 200,322 |
public int[] getHeightOfTrees()
{
return Arrays.clone(heightOfTrees);
} | int[] function() { return Arrays.clone(heightOfTrees); } | /**
* Returns the array of height (for each layer) of the authentication trees
*
* @return The array of height (for each layer) of the authentication trees
*/ | Returns the array of height (for each layer) of the authentication trees | getHeightOfTrees | {
"repo_name": "sake/bouncycastle-java",
"path": "src/org/bouncycastle/pqc/crypto/gmss/GMSSParameters.java",
"license": "mit",
"size": 4516
} | [
"org.bouncycastle.util.Arrays"
] | import org.bouncycastle.util.Arrays; | import org.bouncycastle.util.*; | [
"org.bouncycastle.util"
] | org.bouncycastle.util; | 1,826,380 |
Optional<Double> getDouble(DataQuery path); | Optional<Double> getDouble(DataQuery path); | /**
* Gets the {@link Double} by path, if available.
*
* <p>
* If a {@link Double} does not exist, or the data residing at the path is
* not an instance of a {@link Double}, an absent is returned.
* </p>
*
* @param path
* The path of the value to get
* @retur... | Gets the <code>Double</code> by path, if available. If a <code>Double</code> does not exist, or the data residing at the path is not an instance of a <code>Double</code>, an absent is returned. | getDouble | {
"repo_name": "kenzierocks/AutoErgel",
"path": "src/main/java/me/kenzierocks/autoergel/osadata/data/DataView.java",
"license": "mit",
"size": 18455
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 1,508,851 |
private void unregisterMbean(Object o, @Nullable String cacheName, boolean near) {
assert o != null;
MBeanServer srvr = ctx.config().getMBeanServer();
assert srvr != null;
cacheName = U.maskName(cacheName);
cacheName = near ? cacheName + "-near" : cacheName;
for ... | void function(Object o, @Nullable String cacheName, boolean near) { assert o != null; MBeanServer srvr = ctx.config().getMBeanServer(); assert srvr != null; cacheName = U.maskName(cacheName); cacheName = near ? cacheName + "-near" : cacheName; for (Class<?> itf : o.getClass().getInterfaces()) { if (itf.getName().endsWi... | /**
* Unregisters MBean for cache components.
*
* @param o Cache component.
* @param cacheName Cache name.
* @param near Near flag.
*/ | Unregisters MBean for cache components | unregisterMbean | {
"repo_name": "DoudTechData/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java",
"license": "apache-2.0",
"size": 141407
} | [
"javax.management.JMException",
"javax.management.MBeanServer",
"org.apache.ignite.internal.util.typedef.internal.U",
"org.jetbrains.annotations.Nullable"
] | import javax.management.JMException; import javax.management.MBeanServer; import org.apache.ignite.internal.util.typedef.internal.U; import org.jetbrains.annotations.Nullable; | import javax.management.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.jetbrains.annotations.*; | [
"javax.management",
"org.apache.ignite",
"org.jetbrains.annotations"
] | javax.management; org.apache.ignite; org.jetbrains.annotations; | 1,646,436 |
@Override
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
{
if (!world.isRemote)
{
int meta = world.getBlockMetadata(x, y, z);
// sensible and off
if ((meta & 7) > 0 && (meta & 8) == 0)
{
... | void function(World world, int x, int y, int z, Entity entity) { if (!world.isRemote) { int meta = world.getBlockMetadata(x, y, z); if ((meta & 7) > 0 && (meta & 8) == 0) { this.checkForArrows(world, x, y, z); } } } | /**
* Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
*/ | Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity | onEntityCollidedWithBlock | {
"repo_name": "olee/SecretRoomsMod-forge",
"path": "src/main/java/com/github/abrarsyed/secretroomsmod/blocks/BlockCamoButton.java",
"license": "lgpl-3.0",
"size": 7009
} | [
"net.minecraft.entity.Entity",
"net.minecraft.world.World"
] | import net.minecraft.entity.Entity; import net.minecraft.world.World; | import net.minecraft.entity.*; import net.minecraft.world.*; | [
"net.minecraft.entity",
"net.minecraft.world"
] | net.minecraft.entity; net.minecraft.world; | 2,108,350 |
private boolean addDependencyToTable(
Map<UUID, List<Dependency>> table, UUID key, Dependency dy) {
List<Dependency> deps = table.get(key);
if (deps == null) {
deps = new ArrayList<Dependency>();
deps.add(dy);
table.put(key, deps);
}
else {
UUID provKey = dy.ge... | boolean function( Map<UUID, List<Dependency>> table, UUID key, Dependency dy) { List<Dependency> deps = table.get(key); if (deps == null) { deps = new ArrayList<Dependency>(); deps.add(dy); table.put(key, deps); } else { UUID provKey = dy.getProvider().getObjectID(); UUID depKey = dy.getDependent().getObjectID(); for (... | /**
* Add a new dependency to the specified table if it does not
* already exist in that table.
*
* @return boolean Whether or not the dependency get added.
*/ | Add a new dependency to the specified table if it does not already exist in that table | addDependencyToTable | {
"repo_name": "scnakandala/derby",
"path": "java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java",
"license": "apache-2.0",
"size": 35442
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.ListIterator",
"java.util.Map",
"org.apache.derby.iapi.sql.depend.Dependency",
"org.apache.derby.shared.common.sanity.SanityManager"
] | import java.util.ArrayList; import java.util.List; import java.util.ListIterator; import java.util.Map; import org.apache.derby.iapi.sql.depend.Dependency; import org.apache.derby.shared.common.sanity.SanityManager; | import java.util.*; import org.apache.derby.iapi.sql.depend.*; import org.apache.derby.shared.common.sanity.*; | [
"java.util",
"org.apache.derby"
] | java.util; org.apache.derby; | 2,758,507 |
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<ServiceResourceInner>, ServiceResourceInner> beginCreateOrUpdate(
String resourceGroupName, String serviceName, ServiceResourceInner resource); | @ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<ServiceResourceInner>, ServiceResourceInner> beginCreateOrUpdate( String resourceGroupName, String serviceName, ServiceResourceInner resource); | /**
* Create a new Service or update an exiting Service.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
* @para... | Create a new Service or update an exiting Service | beginCreateOrUpdate | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/fluent/ServicesClient.java",
"license": "mit",
"size": 43565
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.SyncPoller",
"com.azure.resourcemanager.appplatform.fluent.models.ServiceResourceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appplatform.fluent.models.ServiceResourceInner; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.appplatform.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,166,998 |
@PUT
@Path("jobs/{jobid}/resume")
@Produces("application/json")
boolean resumeJob(@HeaderParam("sessionid")
final String sessionId, @PathParam("jobid")
final String jobId) throws NotConnectedRestException, UnknownJobRestException, PermissionRestException; | @Path(STR) @Produces(STR) boolean resumeJob(@HeaderParam(STR) final String sessionId, @PathParam("jobid") final String jobId) throws NotConnectedRestException, UnknownJobRestException, PermissionRestException; | /**
* Resumes the job represented by jobid
*
* @param sessionId
* a valid session id
* @param jobId
* the id of the job
* @return true if success, false if not
*/ | Resumes the job represented by jobid | resumeJob | {
"repo_name": "tobwiens/scheduling",
"path": "rest/rest-api/src/main/java/org/ow2/proactive_grid_cloud_portal/common/SchedulerRestInterface.java",
"license": "agpl-3.0",
"size": 80291
} | [
"javax.ws.rs.HeaderParam",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"org.ow2.proactive_grid_cloud_portal.scheduler.exception.NotConnectedRestException",
"org.ow2.proactive_grid_cloud_portal.scheduler.exception.PermissionRestException",
"org.ow2.proactive_grid_cloud_portal.sch... | import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.NotConnectedRestException; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.PermissionRestException; import org.ow2.proactive_g... | import javax.ws.rs.*; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.*; | [
"javax.ws",
"org.ow2.proactive_grid_cloud_portal"
] | javax.ws; org.ow2.proactive_grid_cloud_portal; | 443,771 |
public String getStringValue() throws TypeMismatchException,
NoSuchElementException; | String function() throws TypeMismatchException, NoSuchElementException; | /**
* the {@code String} value of this object.
*
* @return the {@code String} value of this object, which may be null.
* @throws TypeMismatchException
* if the type of this object is not {@link Type#STRING}.
* @throws NoSuchElementException
* if this object has no value.
*/ | the String value of this object | getStringValue | {
"repo_name": "Haixing-Hu/commons",
"path": "src/main/java/com/github/haixing_hu/util/value/Value.java",
"license": "apache-2.0",
"size": 25153
} | [
"com.github.haixing_hu.lang.TypeMismatchException",
"java.util.NoSuchElementException"
] | import com.github.haixing_hu.lang.TypeMismatchException; import java.util.NoSuchElementException; | import com.github.haixing_hu.lang.*; import java.util.*; | [
"com.github.haixing_hu",
"java.util"
] | com.github.haixing_hu; java.util; | 1,983,886 |
@Nonnull
public DeviceManagementTroubleshootingEventRequest expand(@Nonnull final String value) {
addExpandOption(value);
return this;
} | DeviceManagementTroubleshootingEventRequest function(@Nonnull final String value) { addExpandOption(value); return this; } | /**
* Sets the expand clause for the request
*
* @param value the expand clause
* @return the updated request
*/ | Sets the expand clause for the request | expand | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/DeviceManagementTroubleshootingEventRequest.java",
"license": "mit",
"size": 7802
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,614,206 |
@ApiModelProperty(example = "null", value = "")
public MatchedAddress getMatchedAddress() {
return matchedAddress;
} | @ApiModelProperty(example = "null", value = "") MatchedAddress function() { return matchedAddress; } | /**
* Get matchedAddress
* @return matchedAddress
**/ | Get matchedAddress | getMatchedAddress | {
"repo_name": "PitneyBowes/LocationIntelligenceSDK-Java",
"path": "src/main/java/pb/locationintelligence/model/EarthquakeRiskResponse.java",
"license": "apache-2.0",
"size": 4755
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,600,397 |
public synchronized boolean exceededCursorSizeLimit(Context context) {
try {
getCol(context);
} catch (IllegalStateException e) {
return true;
}
return false;
} | synchronized boolean function(Context context) { try { getCol(context); } catch (IllegalStateException e) { return true; } return false; } | /**
* Checks whether or not the Android 1MB limit for the cursor size was exceeded
* @param context
* @return
*/ | Checks whether or not the Android 1MB limit for the cursor size was exceeded | exceededCursorSizeLimit | {
"repo_name": "timrae/Anki-Android",
"path": "AnkiDroid/src/main/java/com/ichi2/anki/CollectionHelper.java",
"license": "gpl-3.0",
"size": 9433
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 289,929 |
@Deprecated
public Future<CommandResult> cppEventResponse(Integer issuerEventId, Integer cppAuth) {
CppEventResponse command = new CppEventResponse();
// Set the fields
command.setIssuerEventId(issuerEventId);
command.setCppAuth(cppAuth);
return sendCommand(command);
... | Future<CommandResult> function(Integer issuerEventId, Integer cppAuth) { CppEventResponse command = new CppEventResponse(); command.setIssuerEventId(issuerEventId); command.setCppAuth(cppAuth); return sendCommand(command); } | /**
* The Cpp Event Response
* <p>
* The CPPEventResponse command is sent from a CLIENT (IHD) to the ESI to notify it of a
* Critical Peak Pricing event authorization.
*
* @param issuerEventId {@link Integer} Issuer Event ID
* @param cppAuth {@link Integer} Cpp Auth
* @return the... | The Cpp Event Response The CPPEventResponse command is sent from a CLIENT (IHD) to the ESI to notify it of a Critical Peak Pricing event authorization | cppEventResponse | {
"repo_name": "zsmartsystems/com.zsmartsystems.zigbee",
"path": "com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPriceCluster.java",
"license": "epl-1.0",
"size": 846624
} | [
"com.zsmartsystems.zigbee.CommandResult",
"com.zsmartsystems.zigbee.zcl.clusters.price.CppEventResponse",
"java.util.concurrent.Future"
] | import com.zsmartsystems.zigbee.CommandResult; import com.zsmartsystems.zigbee.zcl.clusters.price.CppEventResponse; import java.util.concurrent.Future; | import com.zsmartsystems.zigbee.*; import com.zsmartsystems.zigbee.zcl.clusters.price.*; import java.util.concurrent.*; | [
"com.zsmartsystems.zigbee",
"java.util"
] | com.zsmartsystems.zigbee; java.util; | 2,303,669 |
protected static void waitFor(final CyclicBarrier barrier) {
final String threadName = Thread.currentThread().getName();
try {
barrier.await();
} catch( final InterruptedException e ) {
fail( "Thread '" + threadName + "' was interrupted while waiting for the other thr... | static void function(final CyclicBarrier barrier) { final String threadName = Thread.currentThread().getName(); try { barrier.await(); } catch( final InterruptedException e ) { fail( STR + threadName + STR); } catch( final BrokenBarrierException e ) { fail( STR + threadName + STR); } } | /**
* HELPER METHODS -------------------------------------------------------------------------------------------------------------
*/ | HELPER METHODS ------------------------------------------------------------------------------------------------------------- | waitFor | {
"repo_name": "droolsjbpm/drools",
"path": "drools-mvel/src/test/java/org/drools/mvel/compiler/kie/builder/impl/KieModuleRepoTest.java",
"license": "apache-2.0",
"size": 26074
} | [
"java.util.concurrent.BrokenBarrierException",
"java.util.concurrent.CyclicBarrier",
"org.junit.Assert"
] | import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBarrier; import org.junit.Assert; | import java.util.concurrent.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 197,922 |
@ServiceMethod(returns = ReturnType.SINGLE)
private PollerFlux<PollResult<EndpointInner>, EndpointInner> beginStopAsync(
String resourceGroupName, String profileName, String endpointName, Context context) {
context = this.client.mergeContext(context);
Mono<Response<Flux<ByteBuffer>>> mon... | @ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<EndpointInner>, EndpointInner> function( String resourceGroupName, String profileName, String endpointName, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono = stopWithResponseAsync(resourceGroupName, p... | /**
* Stops an existing running CDN endpoint.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param endpointName Name of the endpoint under the profile which is uniq... | Stops an existing running CDN endpoint | beginStopAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/EndpointsClientImpl.java",
"license": "mit",
"size": 169310
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.Context",
"com.azure.core.util.polling.PollerFlux",
"com.azure.resourcemanager.cdn.fluent.models.EndpointInner",
... | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.resourcemanager.cdn.fluent.model... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.cdn.fluent.models.*; import java.nio.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.nio"
] | com.azure.core; com.azure.resourcemanager; java.nio; | 2,602,198 |
IoSessionRecycler getSessionRecycler(); | IoSessionRecycler getSessionRecycler(); | /**
* Returns the {@link IoSessionRecycler} for this service.
*/ | Returns the <code>IoSessionRecycler</code> for this service | getSessionRecycler | {
"repo_name": "chao-sun-kaazing/gateway",
"path": "mina.core/core/src/main/java/org/apache/mina/transport/socket/DatagramAcceptor.java",
"license": "apache-2.0",
"size": 1500
} | [
"org.apache.mina.core.session.IoSessionRecycler"
] | import org.apache.mina.core.session.IoSessionRecycler; | import org.apache.mina.core.session.*; | [
"org.apache.mina"
] | org.apache.mina; | 1,808,718 |
EList<WorkCostDetail> getWorkCostDetails(); | EList<WorkCostDetail> getWorkCostDetails(); | /**
* Returns the value of the '<em><b>Work Cost Details</b></em>' reference list.
* The list contents are of type {@link gluemodel.CIM.IEC61970.Informative.InfWork.WorkCostDetail}.
* It is bidirectional and its opposite is '{@link gluemodel.CIM.IEC61970.Informative.InfWork.WorkCostDetail#getWorks <em>Works</em>}... | Returns the value of the 'Work Cost Details' reference list. The list contents are of type <code>gluemodel.CIM.IEC61970.Informative.InfWork.WorkCostDetail</code>. It is bidirectional and its opposite is '<code>gluemodel.CIM.IEC61970.Informative.InfWork.WorkCostDetail#getWorks Works</code>'. If the meaning of the 'Work ... | getWorkCostDetails | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61968/Work/Work.java",
"license": "mit",
"size": 16827
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,977,107 |
@Test
@Ignore("Taking way too much time and very timing dependent")
public void testConcurrentOperations() throws Exception
{
SingleFileLdifPartition partition = injectEntries();
ThreadGroup tg = new ThreadGroup( "singlefileldifpartitionTG" );
Thread modifyTask = new Thread( tg... | @Ignore(STR) void function() throws Exception { SingleFileLdifPartition partition = injectEntries(); ThreadGroup tg = new ThreadGroup( STR ); Thread modifyTask = new Thread( tg, getModifyTask( partition ), STR ); Thread addAndDeleteTask = new Thread( tg, getAddAndDeleteTask( partition ), STR ); Thread renameTask = new ... | /**
* An important test to check the stability of the partition
* under high concurrency
*
* @throws Exception
*/ | An important test to check the stability of the partition under high concurrency | testConcurrentOperations | {
"repo_name": "drankye/directory-server",
"path": "ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java",
"license": "apache-2.0",
"size": 44064
} | [
"org.apache.directory.api.ldap.model.entry.Entry",
"org.apache.directory.api.ldap.model.name.Dn",
"org.apache.directory.server.core.api.interceptor.context.LookupOperationContext",
"org.junit.Assert",
"org.junit.Ignore"
] | import org.apache.directory.api.ldap.model.entry.Entry; import org.apache.directory.api.ldap.model.name.Dn; import org.apache.directory.server.core.api.interceptor.context.LookupOperationContext; import org.junit.Assert; import org.junit.Ignore; | import org.apache.directory.api.ldap.model.entry.*; import org.apache.directory.api.ldap.model.name.*; import org.apache.directory.server.core.api.interceptor.context.*; import org.junit.*; | [
"org.apache.directory",
"org.junit"
] | org.apache.directory; org.junit; | 1,390,959 |
public boolean deleteAttachmentPoint(long sw, short port) {
AttachmentPoint ap = new AttachmentPoint(sw, port, 0);
Collection<AttachmentPoint> oldAPs = getOldAPs();
if (oldAPs != null) {
ArrayList<AttachmentPoint> apList = new ArrayList<AttachmentPoint>();
apList.add... | boolean function(long sw, short port) { AttachmentPoint ap = new AttachmentPoint(sw, port, 0); Collection<AttachmentPoint> oldAPs = getOldAPs(); if (oldAPs != null) { ArrayList<AttachmentPoint> apList = new ArrayList<AttachmentPoint>(); apList.addAll(oldAPs); int index = apList.indexOf(ap); if (index > 0) { apList.remo... | /**
* Delete (sw,port) from the list of list of attachment points
* and oldAPs.
* @param sw
* @param port
* @return
*/ | Delete (sw,port) from the list of list of attachment points and oldAPs | deleteAttachmentPoint | {
"repo_name": "fbotelho-university-code/poseidon",
"path": "src/main/java/net/floodlightcontroller/devicemanager/internal/Device.java",
"license": "apache-2.0",
"size": 33542
} | [
"java.util.ArrayList",
"java.util.Collection"
] | import java.util.ArrayList; import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,302,220 |
public Iterator iterator() {
return stack.iterator();
} | Iterator function() { return stack.iterator(); } | /**
* Returns an iterator over all of the entries in the stack trace.
*
* @return An iterator over all of the entries in the stack trace.
*/ | Returns an iterator over all of the entries in the stack trace | iterator | {
"repo_name": "ms123s/simpl4-src",
"path": "bundles/libhelper/src/main/java/org/ms123/common/libhelper/StackTrace.java",
"license": "apache-2.0",
"size": 21072
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,580,480 |
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain)
throws IOException, ServletException {
// Conditionally select and set the character encoding to be used
if (ignore || (request.getCharacterEncoding() == null)) {
String e... | void function(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (ignore (request.getCharacterEncoding() == null)) { String encoding = selectEncoding(request); if (encoding != null) request.setCharacterEncoding(encoding); } chain.doFilter(request, response); } | /**
* Select and set (if specified) the character encoding to be used to
* interpret request parameters for this request.
*
* @param request The servlet request we are processing
* @param result The servlet response we are creating
* @param chain The filter chain we are processing
*
... | Select and set (if specified) the character encoding to be used to interpret request parameters for this request | doFilter | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/tomcat4131/webapps/examples/WEB-INF/classes/filters/SetCharacterEncodingFilter.java",
"license": "lgpl-3.0",
"size": 5597
} | [
"java.io.IOException",
"javax.servlet.FilterChain",
"javax.servlet.ServletException",
"javax.servlet.ServletRequest",
"javax.servlet.ServletResponse"
] | import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; | import java.io.*; import javax.servlet.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 2,437,796 |
private void shuffleItems(List<ItemStack> stacks, int p_186463_2_, Random rand)
{
List<ItemStack> list = Lists.<ItemStack>newArrayList();
Iterator<ItemStack> iterator = stacks.iterator();
while (iterator.hasNext())
{
ItemStack itemstack = (ItemStack)iterator.next();
... | void function(List<ItemStack> stacks, int p_186463_2_, Random rand) { List<ItemStack> list = Lists.<ItemStack>newArrayList(); Iterator<ItemStack> iterator = stacks.iterator(); while (iterator.hasNext()) { ItemStack itemstack = (ItemStack)iterator.next(); if (itemstack.stackSize <= 0) { iterator.remove(); } else if (ite... | /**
* shuffles items by changing their order and splitting stacks
*/ | shuffles items by changing their order and splitting stacks | shuffleItems | {
"repo_name": "F1r3w477/CustomWorldGen",
"path": "build/tmp/recompileMc/sources/net/minecraft/world/storage/loot/LootTable.java",
"license": "lgpl-3.0",
"size": 6932
} | [
"com.google.common.collect.Lists",
"java.util.Collections",
"java.util.Iterator",
"java.util.List",
"java.util.Random",
"net.minecraft.item.ItemStack",
"net.minecraft.util.math.MathHelper"
] | import com.google.common.collect.Lists; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Random; import net.minecraft.item.ItemStack; import net.minecraft.util.math.MathHelper; | import com.google.common.collect.*; import java.util.*; import net.minecraft.item.*; import net.minecraft.util.math.*; | [
"com.google.common",
"java.util",
"net.minecraft.item",
"net.minecraft.util"
] | com.google.common; java.util; net.minecraft.item; net.minecraft.util; | 572,645 |
@Override
public List<AccountWithDataSet> getAccounts(boolean contactWritableOnly) {
ensureAccountsLoaded();
return contactWritableOnly ? mContactWritableAccounts : mAccounts;
} | List<AccountWithDataSet> function(boolean contactWritableOnly) { ensureAccountsLoaded(); return contactWritableOnly ? mContactWritableAccounts : mAccounts; } | /**
* Return list of all known, contact writable {@link AccountWithDataSet}'s.
*/ | Return list of all known, contact writable <code>AccountWithDataSet</code>'s | getAccounts | {
"repo_name": "GuillaumeDelente/contact-picker",
"path": "library/src/main/java/com/guillaumedelente/android/contacts/common/model/AccountTypeManager.java",
"license": "apache-2.0",
"size": 35232
} | [
"com.guillaumedelente.android.contacts.common.model.account.AccountWithDataSet",
"java.util.List"
] | import com.guillaumedelente.android.contacts.common.model.account.AccountWithDataSet; import java.util.List; | import com.guillaumedelente.android.contacts.common.model.account.*; import java.util.*; | [
"com.guillaumedelente.android",
"java.util"
] | com.guillaumedelente.android; java.util; | 2,123,018 |
public void testFromXContent() throws IOException {
for (int runs = 0; runs < NUMBER_OF_TESTBUILDERS; runs++) {
HighlightBuilder highlightBuilder = randomHighlighterBuilder();
XContentBuilder builder = XContentFactory.contentBuilder(randomFrom(XContentType.values()));
if ... | void function() throws IOException { for (int runs = 0; runs < NUMBER_OF_TESTBUILDERS; runs++) { HighlightBuilder highlightBuilder = randomHighlighterBuilder(); XContentBuilder builder = XContentFactory.contentBuilder(randomFrom(XContentType.values())); if (randomBoolean()) { builder.prettyPrint(); } XContentBuilder sh... | /**
* creates random highlighter, renders it to xContent and back to new instance that should be equal to original
*/ | creates random highlighter, renders it to xContent and back to new instance that should be equal to original | testFromXContent | {
"repo_name": "jimczi/elasticsearch",
"path": "core/src/test/java/org/elasticsearch/search/fetch/subphase/highlight/HighlightBuilderTests.java",
"license": "apache-2.0",
"size": 34256
} | [
"java.io.IOException",
"org.elasticsearch.common.xcontent.ToXContent",
"org.elasticsearch.common.xcontent.XContentBuilder",
"org.elasticsearch.common.xcontent.XContentFactory",
"org.elasticsearch.common.xcontent.XContentParser",
"org.elasticsearch.common.xcontent.XContentType"
] | import java.io.IOException; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; | import java.io.*; import org.elasticsearch.common.xcontent.*; | [
"java.io",
"org.elasticsearch.common"
] | java.io; org.elasticsearch.common; | 535,500 |
AbstractCrs crs;
LOG.log(Level.INFO, "Get sky system {0}", new Object[]{coordinateSystem.name()});
switch (coordinateSystem) {
case ECLIPTIC:
crs = new Ecliptic();
break;
case EQUATORIAL:
crs = new Equatorial();
brea... | AbstractCrs crs; LOG.log(Level.INFO, STR, new Object[]{coordinateSystem.name()}); switch (coordinateSystem) { case ECLIPTIC: crs = new Ecliptic(); break; case EQUATORIAL: crs = new Equatorial(); break; case GALACTIC: crs = new Galactic(); break; case SUPER_GALACTIC: crs = new SuperGalactic(); break; default: throw new ... | /**
* Creates a coordinate reference system based on the coordinate system and
* a default coordinate reference frame.
*
* <p>The coordinate reference system is built based on ICRS reference frame
* when the coordinate system is equatorial or ecliptic
*
* @param coordinateSystem the... | Creates a coordinate reference system based on the coordinate system and a default coordinate reference frame. The coordinate reference system is built based on ICRS reference frame when the coordinate system is equatorial or ecliptic | create | {
"repo_name": "malapert/JWcs",
"path": "src/main/java/io/github/malapert/jwcs/crs/CrsFactory.java",
"license": "gpl-3.0",
"size": 2390
} | [
"io.github.malapert.jwcs.proj.exception.JWcsError",
"java.util.logging.Level"
] | import io.github.malapert.jwcs.proj.exception.JWcsError; import java.util.logging.Level; | import io.github.malapert.jwcs.proj.exception.*; import java.util.logging.*; | [
"io.github.malapert",
"java.util"
] | io.github.malapert; java.util; | 1,387,857 |
private byte[] serialize(Serializable payload) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(payload);
return baos.toByteArray();
}
| byte[] function(Serializable payload) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(payload); return baos.toByteArray(); } | /**
* Set the body of the packet
* @param body;the body of the packet
* @throws IOException
*/ | Set the body of the packet | serialize | {
"repo_name": "maurocaporuscio/prime-middleware",
"path": "src/org/prime/core/comm/protocol/PrimeMessage.java",
"license": "gpl-3.0",
"size": 2987
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.io.ObjectOutputStream",
"java.io.Serializable"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 2,032,839 |
public T secureXML(String secureTag, boolean secureTagContents, String recipientKeyAlias, String xmlCipherAlgorithm,
String keyCipherAlgorithm, String keyOrTrustStoreParametersId, String keyPassword) {
XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, secureTagContents, recipien... | T function(String secureTag, boolean secureTagContents, String recipientKeyAlias, String xmlCipherAlgorithm, String keyCipherAlgorithm, String keyOrTrustStoreParametersId, String keyPassword) { XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, secureTagContents, recipientKeyAlias, xmlCipherAlgorithm, ke... | /**
* Uses the XML Security data format
*/ | Uses the XML Security data format | secureXML | {
"repo_name": "rmarting/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java",
"license": "apache-2.0",
"size": 42614
} | [
"org.apache.camel.model.dataformat.XMLSecurityDataFormat"
] | import org.apache.camel.model.dataformat.XMLSecurityDataFormat; | import org.apache.camel.model.dataformat.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,066,897 |
private void hideProgressBar()
{
View formView = findViewById(com.capgemini.SalesOrder.R.id.form);
formView.setVisibility(View.VISIBLE);
View loadingView = findViewById(com.capgemini.SalesOrder.R.id.loading_view);
loadingView.setVisibility(View.GONE);
} | void function() { View formView = findViewById(com.capgemini.SalesOrder.R.id.form); formView.setVisibility(View.VISIBLE); View loadingView = findViewById(com.capgemini.SalesOrder.R.id.loading_view); loadingView.setVisibility(View.GONE); } | /**
* Hides the progress bar and displays the form view
*/ | Hides the progress bar and displays the form view | hideProgressBar | {
"repo_name": "liangyaohua/SalesOrder",
"path": "src/com/capgemini/SalesOrder/LoginActivity.java",
"license": "gpl-2.0",
"size": 6486
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,800,070 |
UberPage commit(@Nullable String commitMessage, @Nullable Instant commitTimeStamp);
/**
* Committing a {@link PageTrx}. This method is recursively invoked by all {@link PageReference}s.
*
* @param reference to be commited
* @throws SirixException if the write fails
* @throws NullPointerExcepti... | UberPage commit(@Nullable String commitMessage, @Nullable Instant commitTimeStamp); /** * Committing a {@link PageTrx}. This method is recursively invoked by all {@link PageReference}s. * * @param reference to be commited * @throws SirixException if the write fails * @throws NullPointerException if {@code reference} is... | /**
* Commit the transaction, that is persist changes if any and create a new revision. The commit
* message is going to be persisted as well.
*
* @param commitMessage the commit message
* @param commitTimeStamp the commit timestamp
* @return UberPage the revision after commit
* @throws SirixExcept... | Commit the transaction, that is persist changes if any and create a new revision. The commit message is going to be persisted as well | commit | {
"repo_name": "sirixdb/sirix",
"path": "bundles/sirix-core/src/main/java/org/sirix/api/PageTrx.java",
"license": "bsd-3-clause",
"size": 6216
} | [
"java.time.Instant",
"org.checkerframework.checker.nullness.qual.Nullable",
"org.sirix.exception.SirixException",
"org.sirix.page.PageReference",
"org.sirix.page.UberPage"
] | import java.time.Instant; import org.checkerframework.checker.nullness.qual.Nullable; import org.sirix.exception.SirixException; import org.sirix.page.PageReference; import org.sirix.page.UberPage; | import java.time.*; import org.checkerframework.checker.nullness.qual.*; import org.sirix.exception.*; import org.sirix.page.*; | [
"java.time",
"org.checkerframework.checker",
"org.sirix.exception",
"org.sirix.page"
] | java.time; org.checkerframework.checker; org.sirix.exception; org.sirix.page; | 267,028 |
public BandInfo createBandInfo(String bandName,
int dataType,
int spectralBandIndex,
int sampleModel,
int scalingMethod,
double scalingOffset... | BandInfo function(String bandName, int dataType, int spectralBandIndex, int sampleModel, int scalingMethod, double scalingOffset, double scalingFactor, String validExpression, FlagCoding flagCoding, String physicalUnit, String description, String dataSetName) { return new BandInfo(bandName, dataType, spectralBandIndex,... | /**
* This method just delegates to
* {@link BandInfo#BandInfo(String, int, int, int, int, double, double, String, FlagCoding, String, String, int, int)} to
* create a new <code>BandInfo</code>.
*
* @param bandName the name of the band.
* @param dataType the type of the d... | This method just delegates to <code>BandInfo#BandInfo(String, int, int, int, int, double, double, String, FlagCoding, String, String, int, int)</code> to create a new <code>BandInfo</code> | createBandInfo | {
"repo_name": "arraydev/snap-engine",
"path": "snap-envisat-reader/src/main/java/org/esa/snap/dataio/envisat/ProductFile.java",
"license": "gpl-3.0",
"size": 48176
} | [
"org.esa.snap.framework.datamodel.FlagCoding"
] | import org.esa.snap.framework.datamodel.FlagCoding; | import org.esa.snap.framework.datamodel.*; | [
"org.esa.snap"
] | org.esa.snap; | 171,664 |
public void setFont(Font font) {
getLabeledBorder().setFont(font);
} | void function(Font font) { getLabeledBorder().setFont(font); } | /**
* Sets the font for this border's label.
*
* @param font
* the font
*/ | Sets the font for this border's label | setFont | {
"repo_name": "ghillairet/gef-gwt",
"path": "src/main/java/org/eclipse/draw2d/FrameBorder.java",
"license": "epl-1.0",
"size": 2764
} | [
"org.eclipse.swt.graphics.Font"
] | import org.eclipse.swt.graphics.Font; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,375,926 |
@POST
@Path(RUNS)
@Consumes(URI_LIST)
@RolesAllowed(USER)
@Description("Accepts a URL to a workflow to download and run. The URL "
+ "must be hosted on a publicly-accessible service.")
@Nonnull
Response submitWorkflowByURL(@Nonnull List<URI> referenceList,
@Nonnull @Context UriInfo ui) throws NoCreateExc... | @Path(RUNS) @Consumes(URI_LIST) @RolesAllowed(USER) @Description(STR + STR) Response submitWorkflowByURL(@Nonnull List<URI> referenceList, @Nonnull @Context UriInfo ui) throws NoCreateException, NoUpdateException; | /**
* Accepts (or not) a request to create a new run executing the workflow at
* the given location.
*
* @param workflowReference
* The wrapped URI to workflow document to execute.
* @param ui
* About the URI being POSTed to.
* @return A response to the POST describing what was cr... | Accepts (or not) a request to create a new run executing the workflow at the given location | submitWorkflowByURL | {
"repo_name": "apache/incubator-taverna-server",
"path": "taverna-server-webapp/src/main/java/org/apache/taverna/server/master/rest/TavernaServerREST.java",
"license": "apache-2.0",
"size": 18437
} | [
"java.util.List",
"javax.annotation.Nonnull",
"javax.annotation.security.RolesAllowed",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.core.Context",
"javax.ws.rs.core.Response",
"javax.ws.rs.core.UriInfo",
"org.apache.cxf.jaxrs.model.wadl.Description",
"org.apache.taverna.server.master.... | import java.util.List; import javax.annotation.Nonnull; import javax.annotation.security.RolesAllowed; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; import org.apache.cxf.jaxrs.model.wadl.Description; import org.... | import java.util.*; import javax.annotation.*; import javax.annotation.security.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.cxf.jaxrs.model.wadl.*; import org.apache.taverna.server.master.exceptions.*; | [
"java.util",
"javax.annotation",
"javax.ws",
"org.apache.cxf",
"org.apache.taverna"
] | java.util; javax.annotation; javax.ws; org.apache.cxf; org.apache.taverna; | 2,335,411 |
private static void upload(final Context context, final int retry, final File f) {
if (retry == 0 || !NetworkUtil.isConnected(context)) {
STATE_BUSY = false;
return;
}
| static void function(final Context context, final int retry, final File f) { if (retry == 0 !NetworkUtil.isConnected(context)) { STATE_BUSY = false; return; } | /**
* Starts the image upload to the server
* @param retry the number of times the client should attempt to upload the image on failures
* @param f the image to be uploaded
*/ | Starts the image upload to the server | upload | {
"repo_name": "felina/android-lite",
"path": "src/com/felina/photographer/UploadUtils.java",
"license": "mit",
"size": 4256
} | [
"android.content.Context",
"java.io.File"
] | import android.content.Context; import java.io.File; | import android.content.*; import java.io.*; | [
"android.content",
"java.io"
] | android.content; java.io; | 1,561,173 |
@Test
public void testMassMailRecipientInVOToEntity() {
Assert.fail("Test 'MassMailRecipientDaoTransformTest.testMassMailRecipientInVOToEntity' not implemented!");
} | void function() { Assert.fail(STR); } | /**
* Test for method massMailRecipientInVOToEntity
*
* @see org.phoenixctms.ctsms.domain.MassMailRecipientDao#massMailRecipientInVOToEntity(org.phoenixctms.ctsms.vo.MassMailRecipientInVO source, org.phoenixctms.ctsms.domain.MassMailRecipient target, boolean copyIfNull)
*/ | Test for method massMailRecipientInVOToEntity | testMassMailRecipientInVOToEntity | {
"repo_name": "phoenixctms/ctsms",
"path": "core/src/test/java/org/phoenixctms/ctsms/domain/test/MassMailRecipientDaoTransformTest.java",
"license": "lgpl-2.1",
"size": 3159
} | [
"org.testng.Assert"
] | import org.testng.Assert; | import org.testng.*; | [
"org.testng"
] | org.testng; | 659,067 |
@NonNull
public Purchase getPurchase() {
return purchase;
} | Purchase function() { return purchase; } | /**
* Gets Purchase intended for consumption.
*
* @return Purchase object. Can't be null.
*/ | Gets Purchase intended for consumption | getPurchase | {
"repo_name": "onepf/OPFIab",
"path": "opfiab/src/main/java/org/onepf/opfiab/model/event/billing/ConsumeResponse.java",
"license": "apache-2.0",
"size": 2000
} | [
"org.onepf.opfiab.model.billing.Purchase"
] | import org.onepf.opfiab.model.billing.Purchase; | import org.onepf.opfiab.model.billing.*; | [
"org.onepf.opfiab"
] | org.onepf.opfiab; | 2,372,364 |
public static Rectangle toDraw2D(java.awt.Rectangle r) {
return new Rectangle(r.x, r.y, r.width, r.height);
} | static Rectangle function(java.awt.Rectangle r) { return new Rectangle(r.x, r.y, r.width, r.height); } | /**
* Converts an AWT Rectangle into a draw2d one. Do we really need all those Rectangle definitions? Hopefully,
* coordinate systems are the same.
*
* @param r
* The AWT Rectangle to convert
* @return A draw2d equivalent
*/ | Converts an AWT Rectangle into a draw2d one. Do we really need all those Rectangle definitions? Hopefully, coordinate systems are the same | toDraw2D | {
"repo_name": "OpenSoftwareSolutions/PDFReporter-Studio",
"path": "com.jaspersoft.studio/src/com/jaspersoft/studio/editor/java2d/J2DScaledGraphics.java",
"license": "lgpl-3.0",
"size": 29399
} | [
"org.eclipse.draw2d.geometry.Rectangle"
] | import org.eclipse.draw2d.geometry.Rectangle; | import org.eclipse.draw2d.geometry.*; | [
"org.eclipse.draw2d"
] | org.eclipse.draw2d; | 2,092,820 |
public SiteAuthSettingsInner withAllowedAudiences(List<String> allowedAudiences) {
if (this.innerProperties() == null) {
this.innerProperties = new SiteAuthSettingsProperties();
}
this.innerProperties().withAllowedAudiences(allowedAudiences);
return this;
} | SiteAuthSettingsInner function(List<String> allowedAudiences) { if (this.innerProperties() == null) { this.innerProperties = new SiteAuthSettingsProperties(); } this.innerProperties().withAllowedAudiences(allowedAudiences); return this; } | /**
* Set the allowedAudiences property: Allowed audience values to consider when validating JWTs issued by Azure
* Active Directory. Note that the <code>ClientID</code> value is always considered an allowed audience,
* regardless of this setting.
*
* @param allowedAudiences the all... | Set the allowedAudiences property: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. Note that the <code>ClientID</code> value is always considered an allowed audience, regardless of this setting | withAllowedAudiences | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/SiteAuthSettingsInner.java",
"license": "mit",
"size": 46370
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,844,569 |
public void apply(ComplexBufferD complex) {
apply(complex.real, complex.imag);
}
public int getSize() { return mSize; } | void function(ComplexBufferD complex) { apply(complex.real, complex.imag); } public int getSize() { return mSize; } | /**
* Applies this window to the provided samples.
* <p>
* Buffer must be at least of <code>getSize()</code> length.
*
* @param complex Input samples. Contains windowed samples upon return.
*/ | Applies this window to the provided samples. Buffer must be at least of <code>getSize()</code> length | apply | {
"repo_name": "villoren/FFTConvolution",
"path": "src/com/villoren/java/dsp/window/AbstractWindowD.java",
"license": "mit",
"size": 3139
} | [
"com.villoren.java.dsp.fft.ComplexBufferD"
] | import com.villoren.java.dsp.fft.ComplexBufferD; | import com.villoren.java.dsp.fft.*; | [
"com.villoren.java"
] | com.villoren.java; | 145,368 |
public static boolean createRepository(RepositoryModel repository, String serverUrl,
String account, char[] password) throws IOException {
// ensure repository name ends with .git
if (!repository.name.endsWith(".git")) {
repository.name += ".git";
}
return doAction(RpcRequest.CREATE_REPOSITORY, n... | static boolean function(RepositoryModel repository, String serverUrl, String account, char[] password) throws IOException { if (!repository.name.endsWith(".git")) { repository.name += ".git"; } return doAction(RpcRequest.CREATE_REPOSITORY, null, repository, serverUrl, account, password); } | /**
* Create a repository on the Gitblit server.
*
* @param repository
* @param serverUrl
* @param account
* @param password
* @return true if the action succeeded
* @throws IOException
*/ | Create a repository on the Gitblit server | createRepository | {
"repo_name": "saper/gitblit",
"path": "src/com/gitblit/utils/RpcUtils.java",
"license": "apache-2.0",
"size": 18941
} | [
"com.gitblit.Constants",
"com.gitblit.models.RepositoryModel",
"java.io.IOException"
] | import com.gitblit.Constants; import com.gitblit.models.RepositoryModel; import java.io.IOException; | import com.gitblit.*; import com.gitblit.models.*; import java.io.*; | [
"com.gitblit",
"com.gitblit.models",
"java.io"
] | com.gitblit; com.gitblit.models; java.io; | 2,808,842 |
public static AggregatePlanNode convertToPartialAggregatePlanNode(HashAggregatePlanNode hashAggregateNode,
List<Integer> aggrColumnIdxs) {
AggregatePlanNode partialAggr = new PartialAggregatePlanNode();
partialAggr = setAggregatePlanNode(hashAggregateNode, partialAggr);
partialAg... | static AggregatePlanNode function(HashAggregatePlanNode hashAggregateNode, List<Integer> aggrColumnIdxs) { AggregatePlanNode partialAggr = new PartialAggregatePlanNode(); partialAggr = setAggregatePlanNode(hashAggregateNode, partialAggr); partialAggr.m_partialGroupByColumns = aggrColumnIdxs; return partialAggr; } | /**
* Convert HashAggregate into a Partial Aggregate
*
* @param hashAggregateNode HashAggregatePlanNode
* @param aggrColumnIdxs partial aggregate column indexes
* @return AggregatePlanNode
*/ | Convert HashAggregate into a Partial Aggregate | convertToPartialAggregatePlanNode | {
"repo_name": "deerwalk/voltdb",
"path": "src/frontend/org/voltdb/plannodes/AggregatePlanNode.java",
"license": "agpl-3.0",
"size": 24856
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,477,304 |
public GradientShaderFactory getGradientShaderFactory() {
return this.gradientShaderFactory;
} | GradientShaderFactory function() { return this.gradientShaderFactory; } | /**
* Returns the gradient paint transformer (an object used to transform
* gradient paint objects to fit each bar).
*
* @return A transformer (<code>null</code> possible).
*
* @see #setGradientShaderFactory(GradientPaintTransformer)
*/ | Returns the gradient paint transformer (an object used to transform gradient paint objects to fit each bar) | getGradientShaderFactory | {
"repo_name": "djun100/afreechart",
"path": "src/org/afree/chart/renderer/xy/XYBarRenderer.java",
"license": "lgpl-3.0",
"size": 46829
} | [
"org.afree.ui.GradientShaderFactory"
] | import org.afree.ui.GradientShaderFactory; | import org.afree.ui.*; | [
"org.afree.ui"
] | org.afree.ui; | 2,571,559 |
@Test
public void testForwardEvent() throws Exception {
SyslogEventForwarder forwarder = new SyslogEventForwarder();
forwarder.initialize("localTest1");
OnmsNode node = new OnmsNode();
node.setForeignSource("TestGroup");
node.setForeignId("1");
node.setId(1);
... | void function() throws Exception { SyslogEventForwarder forwarder = new SyslogEventForwarder(); forwarder.initialize(STR); OnmsNode node = new OnmsNode(); node.setForeignSource(STR); node.setForeignId("1"); node.setId(1); node.setLabel(STR); Event event = new Event(); event.setUei(STR); event.setNodeid(1l); event.setDb... | /**
* Test forward event.
*
* @throws Exception the exception
*/ | Test forward event | testForwardEvent | {
"repo_name": "aihua/opennms",
"path": "opennms-alarms/syslog-northbounder/src/test/java/org/opennms/netmgt/scriptd/helper/SyslogEventForwarderTest.java",
"license": "agpl-3.0",
"size": 7010
} | [
"java.io.BufferedReader",
"java.io.StringReader",
"java.util.ArrayList",
"java.util.LinkedList",
"java.util.List",
"org.junit.Assert",
"org.opennms.netmgt.model.OnmsNode",
"org.opennms.netmgt.xml.event.Event",
"org.opennms.netmgt.xml.event.Logmsg",
"org.opennms.netmgt.xml.event.Parm",
"org.openn... | import java.io.BufferedReader; import java.io.StringReader; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import org.junit.Assert; import org.opennms.netmgt.model.OnmsNode; import org.opennms.netmgt.xml.event.Event; import org.opennms.netmgt.xml.event.Logmsg; import org.opennms.netmgt.... | import java.io.*; import java.util.*; import org.junit.*; import org.opennms.netmgt.model.*; import org.opennms.netmgt.xml.event.*; | [
"java.io",
"java.util",
"org.junit",
"org.opennms.netmgt"
] | java.io; java.util; org.junit; org.opennms.netmgt; | 760,435 |
public final boolean validateGet(final JsonObject requestBody,
final boolean opFlag) {
LOG.trace("Start ControllerResourceValidator#isValidGet");
boolean isValid = true;
// validation for key: targetdb
if (isValid) {
setInvalidParameter(VtnServiceJsonConsts.TARGETDB);
isValid = validator.isValidRequ... | final boolean function(final JsonObject requestBody, final boolean opFlag) { LOG.trace(STR); boolean isValid = true; if (isValid) { setInvalidParameter(VtnServiceJsonConsts.TARGETDB); isValid = validator.isValidRequestDB(requestBody); } if (!opFlag) { if (requestBody.has(VtnServiceJsonConsts.OP)) { requestBody.remove(V... | /**
* Validate request json for get method of controller API
*
* @param requestBody
* the request Json object
*
* @return true, if is valid get
*/ | Validate request json for get method of controller API | validateGet | {
"repo_name": "opendaylight/vtn",
"path": "coordinator/java/vtn-javaapi/src/org/opendaylight/vtn/javaapi/validation/physical/ControllerResourceValidator.java",
"license": "epl-1.0",
"size": 13048
} | [
"com.google.gson.JsonObject",
"org.opendaylight.vtn.javaapi.constants.VtnServiceJsonConsts"
] | import com.google.gson.JsonObject; import org.opendaylight.vtn.javaapi.constants.VtnServiceJsonConsts; | import com.google.gson.*; import org.opendaylight.vtn.javaapi.constants.*; | [
"com.google.gson",
"org.opendaylight.vtn"
] | com.google.gson; org.opendaylight.vtn; | 1,346,360 |
Path createStoreDir(final String familyName) throws IOException {
Path storeDir = getStoreDir(familyName);
if(!fs.exists(storeDir) && !createDir(storeDir))
throw new IOException("Failed creating "+storeDir);
return storeDir;
} | Path createStoreDir(final String familyName) throws IOException { Path storeDir = getStoreDir(familyName); if(!fs.exists(storeDir) && !createDir(storeDir)) throw new IOException(STR+storeDir); return storeDir; } | /**
* Create the store directory for the specified family name
* @param familyName Column Family Name
* @return {@link Path} to the directory of the specified family
* @throws IOException if the directory creation fails.
*/ | Create the store directory for the specified family name | createStoreDir | {
"repo_name": "tenggyut/HIndex",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java",
"license": "apache-2.0",
"size": 40886
} | [
"java.io.IOException",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,139,345 |
BlockPos getBestHospital(AbstractEntityCitizen citizen); | BlockPos getBestHospital(AbstractEntityCitizen citizen); | /**
* Calculate a good hospital for a certain citizen.
*
* @param citizen the citizen.
* @return the Position of it.
*/ | Calculate a good hospital for a certain citizen | getBestHospital | {
"repo_name": "Minecolonies/minecolonies",
"path": "src/api/java/com/minecolonies/api/colony/managers/interfaces/IBuildingManager.java",
"license": "gpl-3.0",
"size": 8797
} | [
"com.minecolonies.api.entity.citizen.AbstractEntityCitizen",
"net.minecraft.util.math.BlockPos"
] | import com.minecolonies.api.entity.citizen.AbstractEntityCitizen; import net.minecraft.util.math.BlockPos; | import com.minecolonies.api.entity.citizen.*; import net.minecraft.util.math.*; | [
"com.minecolonies.api",
"net.minecraft.util"
] | com.minecolonies.api; net.minecraft.util; | 2,284,945 |
public void runTest() {
Bundle b1 = null;
ServiceTracker<ConfigurationAdmin, ConfigurationAdmin> cmt = null;
try {
b1 = Util.installBundle(bc, "componentM_test-1.0.0.jar");
b1.start();
final String b1loc = b1.getLocation();
cmt = new ServiceTracker<ConfigurationAdm... | void function() { Bundle b1 = null; ServiceTracker<ConfigurationAdmin, ConfigurationAdmin> cmt = null; try { b1 = Util.installBundle(bc, STR); b1.start(); final String b1loc = b1.getLocation(); cmt = new ServiceTracker<ConfigurationAdmin,ConfigurationAdmin>(bc, ConfigurationAdmin.class.getName(), null); cmt.open(); Thr... | /**
* Test that SCR handles factory CM pids with target filters.
*
*/ | Test that SCR handles factory CM pids with target filters | runTest | {
"repo_name": "knopflerfish/knopflerfish.org",
"path": "osgi/bundles_test/regression_tests/component_test/src/org/knopflerfish/bundle/component_test/ComponentTestSuite.java",
"license": "bsd-3-clause",
"size": 78809
} | [
"java.util.Dictionary",
"java.util.Hashtable",
"org.osgi.framework.Bundle",
"org.osgi.framework.ServiceReference",
"org.osgi.service.cm.Configuration",
"org.osgi.service.cm.ConfigurationAdmin",
"org.osgi.util.tracker.ServiceTracker"
] | import java.util.Dictionary; import java.util.Hashtable; import org.osgi.framework.Bundle; import org.osgi.framework.ServiceReference; import org.osgi.service.cm.Configuration; import org.osgi.service.cm.ConfigurationAdmin; import org.osgi.util.tracker.ServiceTracker; | import java.util.*; import org.osgi.framework.*; import org.osgi.service.cm.*; import org.osgi.util.tracker.*; | [
"java.util",
"org.osgi.framework",
"org.osgi.service",
"org.osgi.util"
] | java.util; org.osgi.framework; org.osgi.service; org.osgi.util; | 2,843,521 |
public static void validateCacheKey(IgniteLogger log, @Nullable Object key) {
if (key == null)
return;
validateExternalizable(log, key);
if (!U.overridesEqualsAndHashCode(key))
throw new IllegalArgumentException("Cache key must override hashCode() and equals() metho... | static void function(IgniteLogger log, @Nullable Object key) { if (key == null) return; validateExternalizable(log, key); if (!U.overridesEqualsAndHashCode(key)) throw new IllegalArgumentException(STR + key.getClass().getName()); } | /**
* Validates that cache key object has overridden equals and hashCode methods and
* implements {@link Externalizable}.
*
* @param log Logger used to log warning message.
* @param key Key.
* @throws IllegalArgumentException If equals or hashCode is not implemented.
*/ | Validates that cache key object has overridden equals and hashCode methods and implements <code>Externalizable</code> | validateCacheKey | {
"repo_name": "dmagda/incubator-ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java",
"license": "apache-2.0",
"size": 62728
} | [
"org.apache.ignite.IgniteLogger",
"org.apache.ignite.internal.util.typedef.internal.U",
"org.jetbrains.annotations.Nullable"
] | import org.apache.ignite.IgniteLogger; import org.apache.ignite.internal.util.typedef.internal.U; import org.jetbrains.annotations.Nullable; | import org.apache.ignite.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 2,405,155 |
public void reset(Player player); | void function(Player player); | /**
* Resets the scoreboard for the player to the default.
*
* @param player
*/ | Resets the scoreboard for the player to the default | reset | {
"repo_name": "cybertiger/Bukkit-ScoreShare",
"path": "src/main/java/org/cyberiantiger/minecraft/scoreshare/api/ScoreShareAPI.java",
"license": "lgpl-3.0",
"size": 1867
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 2,473,207 |
public SubResource defaultBackendAddressPool() {
return this.defaultBackendAddressPool;
} | SubResource function() { return this.defaultBackendAddressPool; } | /**
* Get default backend address pool resource of URL path map.
*
* @return the defaultBackendAddressPool value
*/ | Get default backend address pool resource of URL path map | defaultBackendAddressPool | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/ApplicationGatewayUrlPathMap.java",
"license": "mit",
"size": 6856
} | [
"com.microsoft.azure.SubResource"
] | import com.microsoft.azure.SubResource; | import com.microsoft.azure.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,251,701 |
public boolean hasPKCS7Profile() {
PAdESSignature padesSignature = (PAdESSignature) signature;
PdfSignatureDictionary pdfSignatureDictionary = padesSignature.getPdfSignatureDictionary();
// SubFilter shall take one of the following values: (adbe.pkcs7.detached, adbe.pkcs7.sha1)
if (!... | boolean function() { PAdESSignature padesSignature = (PAdESSignature) signature; PdfSignatureDictionary pdfSignatureDictionary = padesSignature.getPdfSignatureDictionary(); if (!PAdESConstants.SIGNATURE_PKCS7_SUBFILTER.equals(pdfSignatureDictionary.getSubFilter()) && !PAdESConstants.SIGNATURE_PKCS7_SHA1_SUBFILTER.equal... | /**
* Checks if the signature has PKCS#7 profile (according to ISO 32000-1)
*
* @return TRUE if the signature has a PKCS#7 profile, FALSE otherwise
*/ | Checks if the signature has PKCS#7 profile (according to ISO 32000-1) | hasPKCS7Profile | {
"repo_name": "esig/dss",
"path": "dss-pades/src/main/java/eu/europa/esig/dss/pades/validation/PAdESBaselineRequirementsChecker.java",
"license": "lgpl-2.1",
"size": 18173
} | [
"eu.europa.esig.dss.cades.CMSUtils",
"eu.europa.esig.dss.pdf.PAdESConstants",
"eu.europa.esig.dss.spi.DSSUtils",
"eu.europa.esig.dss.utils.Utils",
"org.bouncycastle.cms.CMSTypedData"
] | import eu.europa.esig.dss.cades.CMSUtils; import eu.europa.esig.dss.pdf.PAdESConstants; import eu.europa.esig.dss.spi.DSSUtils; import eu.europa.esig.dss.utils.Utils; import org.bouncycastle.cms.CMSTypedData; | import eu.europa.esig.dss.cades.*; import eu.europa.esig.dss.pdf.*; import eu.europa.esig.dss.spi.*; import eu.europa.esig.dss.utils.*; import org.bouncycastle.cms.*; | [
"eu.europa.esig",
"org.bouncycastle.cms"
] | eu.europa.esig; org.bouncycastle.cms; | 2,404,652 |
private boolean isTrashLocalOnly(Account account) throws MessagingException {
// TODO: Get rid of the tight coupling once we properly support local folders
return (account.getRemoteStore() instanceof Pop3Store);
} | boolean function(Account account) throws MessagingException { return (account.getRemoteStore() instanceof Pop3Store); } | /**
* Find out whether the account type only supports a local Trash folder.
*
* <p>Note: Currently this is only the case for POP3 accounts.</p>
*
* @param account
* The account to check.
*
* @return {@code true} if the account only has a local Trash folder that is not syn... | Find out whether the account type only supports a local Trash folder. Note: Currently this is only the case for POP3 accounts | isTrashLocalOnly | {
"repo_name": "github201407/k-9",
"path": "k9mail/src/main/java/com/fsck/k9/controller/MessagingController.java",
"license": "bsd-3-clause",
"size": 206200
} | [
"com.fsck.k9.Account",
"com.fsck.k9.mail.MessagingException",
"com.fsck.k9.mail.store.pop3.Pop3Store"
] | import com.fsck.k9.Account; import com.fsck.k9.mail.MessagingException; import com.fsck.k9.mail.store.pop3.Pop3Store; | import com.fsck.k9.*; import com.fsck.k9.mail.*; import com.fsck.k9.mail.store.pop3.*; | [
"com.fsck.k9"
] | com.fsck.k9; | 2,335,078 |
@Test(expected = IllegalArgumentException.class)
public void testRemoveNullHost() {
target.removeHost(null);
} | @Test(expected = IllegalArgumentException.class) void function() { target.removeHost(null); } | /**
* Checks if removing null host fails with proper exception.
*/ | Checks if removing null host fails with proper exception | testRemoveNullHost | {
"repo_name": "gkatsikas/onos",
"path": "apps/k8s-node/app/src/test/java/org/onosproject/k8snode/impl/K8sHostManagerTest.java",
"license": "apache-2.0",
"size": 9198
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,830,484 |
@Override
public void setText(String sText)
{
sText = getContext().expandResource(sText);
this.sText = sText;
HasText rWidget = (HasText) getWidget();
rWidget.setText(sText);
if (rWidget instanceof PushButton)
{
// GWT bug: text of other states will not be set sometimes
PushButton rPushButt... | void function(String sText) { sText = getContext().expandResource(sText); this.sText = sText; HasText rWidget = (HasText) getWidget(); rWidget.setText(sText); if (rWidget instanceof PushButton) { PushButton rPushButton = (PushButton) rWidget; rPushButton.getUpFace().setText(sText); rPushButton.getDownFace().setText(sTe... | /***************************************
* Sets the button text.
*
* @param sText The new button text
*/ | Sets the button text | setText | {
"repo_name": "esoco/gewt",
"path": "src/main/java/de/esoco/ewt/component/Button.java",
"license": "apache-2.0",
"size": 6834
} | [
"com.google.gwt.user.client.ui.HasText",
"com.google.gwt.user.client.ui.PushButton"
] | import com.google.gwt.user.client.ui.HasText; import com.google.gwt.user.client.ui.PushButton; | import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 713,716 |
protected DesktopManager createDesktopManager()
{
return new DefaultDesktopManager();
} | DesktopManager function() { return new DefaultDesktopManager(); } | /**
* This method returns a default DesktopManager that can be used with this
* JInternalFrame.
*
* @return A default DesktopManager that can be used with this
* JInternalFrame.
*/ | This method returns a default DesktopManager that can be used with this JInternalFrame | createDesktopManager | {
"repo_name": "aosm/gcc_40",
"path": "libjava/javax/swing/plaf/basic/BasicInternalFrameUI.java",
"license": "gpl-2.0",
"size": 44949
} | [
"javax.swing.DefaultDesktopManager",
"javax.swing.DesktopManager"
] | import javax.swing.DefaultDesktopManager; import javax.swing.DesktopManager; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,098,012 |
private String getTranslatedStorageError(String errorCode) {
String translatedError = errorCode;
VdcBllErrors error = VdcBllErrors.forValue(Integer.parseInt(errorCode));
if (error != null) {
translatedError =
Backend.getInstance()
.... | String function(String errorCode) { String translatedError = errorCode; VdcBllErrors error = VdcBllErrors.forValue(Integer.parseInt(errorCode)); if (error != null) { translatedError = Backend.getInstance() .getVdsErrorsTranslator() .TranslateErrorTextSingle(error.toString()); } return translatedError; } | /**
* Get translated error by error code ,if no enum for the error code (should not happened) , will set the error code
* instead. <BR/>
* When no enum found for the error code, we should check it with the vdsm team.
*
* @param errorCode
* - The error code we want to translate.
... | Get translated error by error code ,if no enum for the error code (should not happened) , will set the error code instead. When no enum found for the error code, we should check it with the vdsm team | getTranslatedStorageError | {
"repo_name": "halober/ovirt-engine",
"path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHelperBase.java",
"license": "apache-2.0",
"size": 8424
} | [
"org.ovirt.engine.core.bll.Backend",
"org.ovirt.engine.core.common.errors.VdcBllErrors"
] | import org.ovirt.engine.core.bll.Backend; import org.ovirt.engine.core.common.errors.VdcBllErrors; | import org.ovirt.engine.core.bll.*; import org.ovirt.engine.core.common.errors.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 373,124 |
public PersonDemographics getPersonDemographics(Candidate demographic); | PersonDemographics function(Candidate demographic); | /**
* Finds person details based on the client ID
*
* @param demographic
* Demographic to find details for
* @return
* Returns the details or null if it's not available
*/ | Finds person details based on the client ID | getPersonDemographics | {
"repo_name": "hexbinary/landing",
"path": "src/main/java/org/oscarehr/integration/nclass/clientRegistry/PersonRegistryQueryPlacer.java",
"license": "gpl-2.0",
"size": 2131
} | [
"org.oscarehr.integration.nclass.clientRegistry.model.Candidate",
"org.oscarehr.integration.nclass.clientRegistry.model.PersonDemographics"
] | import org.oscarehr.integration.nclass.clientRegistry.model.Candidate; import org.oscarehr.integration.nclass.clientRegistry.model.PersonDemographics; | import org.oscarehr.integration.nclass.*; | [
"org.oscarehr.integration"
] | org.oscarehr.integration; | 2,145,114 |
@Override
public void handleCommand(ChannelUID channelUID, Command command)
{
if ( command instanceof RefreshType )
{
switch (channelUID.getId())
{
case IoTKitConstants.CHANNEL_TEMP:
updateState( channelUID, getTemperature() );
... | void function(ChannelUID channelUID, Command command) { if ( command instanceof RefreshType ) { switch (channelUID.getId()) { case IoTKitConstants.CHANNEL_TEMP: updateState( channelUID, getTemperature() ); break; case IoTKitConstants.CHANNEL_POTI: updateState( channelUID, getPoti() ); break; case IoTKitConstants.CHANNE... | /**
* Commands vom UI abhandeln
*/ | Commands vom UI abhandeln | handleCommand | {
"repo_name": "mc-b/IoTKit",
"path": "smarthome/org.openhab.binding.iotkit/src/main/java/org/openhab/binding/iotkit/handler/IoTKitSensorsHandler.java",
"license": "gpl-2.0",
"size": 5609
} | [
"org.eclipse.smarthome.core.thing.ChannelUID",
"org.eclipse.smarthome.core.types.Command",
"org.eclipse.smarthome.core.types.RefreshType",
"org.openhab.binding.iotkit.IoTKitConstants"
] | import org.eclipse.smarthome.core.thing.ChannelUID; import org.eclipse.smarthome.core.types.Command; import org.eclipse.smarthome.core.types.RefreshType; import org.openhab.binding.iotkit.IoTKitConstants; | import org.eclipse.smarthome.core.thing.*; import org.eclipse.smarthome.core.types.*; import org.openhab.binding.iotkit.*; | [
"org.eclipse.smarthome",
"org.openhab.binding"
] | org.eclipse.smarthome; org.openhab.binding; | 157,032 |
protected List<String> getColumnFamilyNamesCQL3() throws Exception {
ConsistencyLevel c = ConsistencyLevel.ONE; // default for CQL
Compression z = Compression.NONE;
List<String> colFamNames = new ArrayList<String>();
String keyspaceName = m_currentKeyspace;
String cqlQ = "select keyspace_name, c... | List<String> function() throws Exception { ConsistencyLevel c = ConsistencyLevel.ONE; Compression z = Compression.NONE; List<String> colFamNames = new ArrayList<String>(); String keyspaceName = m_currentKeyspace; String cqlQ = STR + keyspaceName + "';"; byte[] data = cqlQ.getBytes( Charset.forName( "UTF-8" ) ); CqlResu... | /**
* Queries CQL system.schema_columnfamilies table to retrieve all column families (including CQL tables that are not
* exposed to Thrift)
*
* @return a list of column family (table) names
* @throws Exception
* if a problem occurs
*/ | Queries CQL system.schema_columnfamilies table to retrieve all column families (including CQL tables that are not exposed to Thrift) | getColumnFamilyNamesCQL3 | {
"repo_name": "stepanovdg/pentaho-cassandra-plugin",
"path": "src/org/pentaho/cassandra/legacy/LegacyKeyspace.java",
"license": "apache-2.0",
"size": 21760
} | [
"java.nio.ByteBuffer",
"java.nio.charset.Charset",
"java.util.ArrayList",
"java.util.List",
"org.apache.cassandra.db.marshal.AbstractType",
"org.apache.cassandra.db.marshal.UTF8Type",
"org.apache.cassandra.thrift.Column",
"org.apache.cassandra.thrift.Compression",
"org.apache.cassandra.thrift.Consis... | import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.List; import org.apache.cassandra.db.marshal.AbstractType; import org.apache.cassandra.db.marshal.UTF8Type; import org.apache.cassandra.thrift.Column; import org.apache.cassandra.thrift.Compression; import org.apac... | import java.nio.*; import java.nio.charset.*; import java.util.*; import org.apache.cassandra.db.marshal.*; import org.apache.cassandra.thrift.*; | [
"java.nio",
"java.util",
"org.apache.cassandra"
] | java.nio; java.util; org.apache.cassandra; | 2,494,319 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<DataNetworkInner>> listByMobileNetworkNextSinglePageAsync(String nextLink) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<DataNetworkInner>> function(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accept = STR; ret... | /**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked excepti... | Get the next page of items | listByMobileNetworkNextSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mobilenetwork/azure-resourcemanager-mobilenetwork/src/main/java/com/azure/resourcemanager/mobilenetwork/implementation/DataNetworksClientImpl.java",
"license": "mit",
"size": 68678
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.mobilenetwork.fluent.models.DataNetworkInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.mobilenetwork.fluent.models.DataNetworkInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.mobilenetwork.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 400,375 |
@Test
public void testEmptyState() throws Exception {
CompletedCheckpointStore checkpoints = createCompletedCheckpoints(1);
assertNull(checkpoints.getLatestCheckpoint(false));
assertEquals(0, checkpoints.getAllCheckpoints().size());
assertEquals(0, checkpoints.getNumberOfRetaine... | void function() throws Exception { CompletedCheckpointStore checkpoints = createCompletedCheckpoints(1); assertNull(checkpoints.getLatestCheckpoint(false)); assertEquals(0, checkpoints.getAllCheckpoints().size()); assertEquals(0, checkpoints.getNumberOfRetainedCheckpoints()); } | /**
* Tests that
*
* <ul>
* <li>{@link CompletedCheckpointStore#getLatestCheckpoint(boolean)} returns <code>null</code>
* ,
* <li>{@link CompletedCheckpointStore#getAllCheckpoints()} returns an empty list,
* <li>{@link CompletedCheckpointStore#getNumberOfRetainedCheckpoint... | Tests that <code>CompletedCheckpointStore#getLatestCheckpoint(boolean)</code> returns <code>null</code> , <code>CompletedCheckpointStore#getAllCheckpoints()</code> returns an empty list, <code>CompletedCheckpointStore#getNumberOfRetainedCheckpoints()</code> returns 0. | testEmptyState | {
"repo_name": "clarkyzl/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStoreTest.java",
"license": "apache-2.0",
"size": 14705
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,719,032 |
@Override()
public java.lang.Class<?> getJavaClass(
) {
return com.netxforge.oss2.config.monitoringLocations.Locations.class;
} | @Override() java.lang.Class<?> function( ) { return com.netxforge.oss2.config.monitoringLocations.Locations.class; } | /**
* Method getJavaClass.
*
* @return the Java class represented by this descriptor.
*/ | Method getJavaClass | getJavaClass | {
"repo_name": "dzonekl/oss2nms",
"path": "plugins/com.netxforge.oss2.config.model/src/com/netxforge/oss2/config/monitoringLocations/descriptors/LocationsDescriptor.java",
"license": "gpl-3.0",
"size": 6182
} | [
"com.netxforge.oss2.config.monitoringLocations.Locations"
] | import com.netxforge.oss2.config.monitoringLocations.Locations; | import com.netxforge.oss2.config.*; | [
"com.netxforge.oss2"
] | com.netxforge.oss2; | 2,358,810 |
private boolean validTreeLocation()
{
BlockPos down = this.field_175947_m.down();
net.minecraft.block.state.IBlockState state = this.world.getBlockState(down);
boolean isSoil = state.getBlock().canSustainPlant(this.world, down, net.minecraft.util.EnumFacing.UP, (IPlantable) Symbology.ash... | boolean function() { BlockPos down = this.field_175947_m.down(); net.minecraft.block.state.IBlockState state = this.world.getBlockState(down); boolean isSoil = state.getBlock().canSustainPlant(this.world, down, net.minecraft.util.EnumFacing.UP, (IPlantable) Symbology.ash_sapling); if (!isSoil) { return false; } else { ... | /**
* Returns a boolean indicating whether or not the current location for the tree, spanning basePos to to the height
* limit, is valid.
*/ | Returns a boolean indicating whether or not the current location for the tree, spanning basePos to to the height limit, is valid | validTreeLocation | {
"repo_name": "Landstryder/Symbology",
"path": "src/main/java/com/teamrune/symbology/world/gen/WorldGenBigSymbologyTree.java",
"license": "mit",
"size": 12708
} | [
"com.teamrune.symbology.Symbology",
"net.minecraft.block.state.IBlockState",
"net.minecraft.util.BlockPos",
"net.minecraftforge.common.IPlantable"
] | import com.teamrune.symbology.Symbology; import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockPos; import net.minecraftforge.common.IPlantable; | import com.teamrune.symbology.*; import net.minecraft.block.state.*; import net.minecraft.util.*; import net.minecraftforge.common.*; | [
"com.teamrune.symbology",
"net.minecraft.block",
"net.minecraft.util",
"net.minecraftforge.common"
] | com.teamrune.symbology; net.minecraft.block; net.minecraft.util; net.minecraftforge.common; | 1,100,321 |
public void testL2MultiplePMSameObjectEvictionChange()
{
Properties userProps = new Properties();
userProps.setProperty("datanucleus.cache.level1.type", "soft");
userProps.setProperty("datanucleus.cache.level2.type", "weak");
PersistenceManagerFactory cachePMF = TestHelper.getPMF... | void function() { Properties userProps = new Properties(); userProps.setProperty(STR, "soft"); userProps.setProperty(STR, "weak"); PersistenceManagerFactory cachePMF = TestHelper.getPMF(1, userProps); try { Object id = null; PersistenceManager pm = cachePMF.getPersistenceManager(); Transaction tx = pm.currentTransactio... | /**
* Test to check the access of the same object in 2 PMs, with the first PM changing it then committing
* and by the time the second PM commits (with no change) the object has been evicted.
*/ | Test to check the access of the same object in 2 PMs, with the first PM changing it then committing and by the time the second PM commits (with no change) the object has been evicted | testL2MultiplePMSameObjectEvictionChange | {
"repo_name": "hopecee/texsts",
"path": "jdo/general/src/test/org/datanucleus/tests/CacheTest.java",
"license": "apache-2.0",
"size": 56796
} | [
"java.util.Properties",
"javax.jdo.PersistenceManager",
"javax.jdo.PersistenceManagerFactory",
"javax.jdo.Transaction",
"org.datanucleus.api.jdo.JDODataStoreCache",
"org.datanucleus.cache.Level2Cache",
"org.datanucleus.tests.TestHelper",
"org.jpox.samples.models.company.Person"
] | import java.util.Properties; import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManagerFactory; import javax.jdo.Transaction; import org.datanucleus.api.jdo.JDODataStoreCache; import org.datanucleus.cache.Level2Cache; import org.datanucleus.tests.TestHelper; import org.jpox.samples.models.company.Person; | import java.util.*; import javax.jdo.*; import org.datanucleus.api.jdo.*; import org.datanucleus.cache.*; import org.datanucleus.tests.*; import org.jpox.samples.models.company.*; | [
"java.util",
"javax.jdo",
"org.datanucleus.api",
"org.datanucleus.cache",
"org.datanucleus.tests",
"org.jpox.samples"
] | java.util; javax.jdo; org.datanucleus.api; org.datanucleus.cache; org.datanucleus.tests; org.jpox.samples; | 2,321,209 |
@Override
public void close() {
List<String> connections = new ArrayList<>(channels.keySet());
for (String id : connections)
close(id);
try {
this.nioSelector.close();
} catch (IOException | SecurityException e) {
log.error("Exception closing n... | void function() { List<String> connections = new ArrayList<>(channels.keySet()); for (String id : connections) close(id); try { this.nioSelector.close(); } catch (IOException SecurityException e) { log.error(STR, e); } sensors.close(); channelBuilder.close(); } | /**
* Close this selector and all associated connections
*/ | Close this selector and all associated connections | close | {
"repo_name": "themarkypantz/kafka",
"path": "clients/src/main/java/org/apache/kafka/common/network/Selector.java",
"license": "apache-2.0",
"size": 50504
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,618,718 |
public ClientProtocol getNamenode() {
return namenode;
} | ClientProtocol function() { return namenode; } | /**
* Get the namenode associated with this DFSClient object
* @return the namenode associated with this DFSClient object
*/ | Get the namenode associated with this DFSClient object | getNamenode | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java",
"license": "apache-2.0",
"size": 68830
} | [
"org.apache.hadoop.hdfs.protocol.ClientProtocol"
] | import org.apache.hadoop.hdfs.protocol.ClientProtocol; | import org.apache.hadoop.hdfs.protocol.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,063,570 |
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
boolean hasFocus, int row, int column) {
Nation nation = (Nation) value;
setText(Messages.getName(nation));
setIcon(library.g... | Component function(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Nation nation = (Nation) value; setText(Messages.getName(nation)); setIcon(library.getScaledImageIcon(library.getCoatOfArmsImageIcon(nation), 0.5f)); return this; } } class AvailableCellRenderer extends JLabel im... | /**
* Returns the component used to render the cell's value.
* @param table The table whose cell needs to be rendered.
* @param value The value of the cell being rendered.
* @param hasFocus Indicates whether or not the cell in question has focus.
* @param row The row index o... | Returns the component used to render the cell's value | getTableCellRendererComponent | {
"repo_name": "tectronics/reformationofeurope",
"path": "src/net/sf/freecol/client/gui/panel/PlayersTable.java",
"license": "gpl-2.0",
"size": 21899
} | [
"java.awt.Component",
"javax.swing.JLabel",
"javax.swing.JTable",
"javax.swing.table.TableCellRenderer",
"net.sf.freecol.client.gui.i18n.Messages",
"net.sf.freecol.common.model.Nation"
] | import java.awt.Component; import javax.swing.JLabel; import javax.swing.JTable; import javax.swing.table.TableCellRenderer; import net.sf.freecol.client.gui.i18n.Messages; import net.sf.freecol.common.model.Nation; | import java.awt.*; import javax.swing.*; import javax.swing.table.*; import net.sf.freecol.client.gui.i18n.*; import net.sf.freecol.common.model.*; | [
"java.awt",
"javax.swing",
"net.sf.freecol"
] | java.awt; javax.swing; net.sf.freecol; | 2,014,658 |
protected boolean isJoinable(
final int joinType,
final Set visitedAssociationKeys,
final String lhsTable,
final String[] lhsColumnNames,
final AssociationType type,
final int depth
) {
if (joinType<0) return false;
if (joinType==JoinFragment.INNER_JOIN) return true;
Integer maxFetchDepth =... | boolean function( final int joinType, final Set visitedAssociationKeys, final String lhsTable, final String[] lhsColumnNames, final AssociationType type, final int depth ) { if (joinType<0) return false; if (joinType==JoinFragment.INNER_JOIN) return true; Integer maxFetchDepth = getFactory().getSettings().getMaximumFet... | /**
* Should we join this association?
*/ | Should we join this association | isJoinable | {
"repo_name": "renmeng8875/projects",
"path": "Hibernate-source/源代码及重要说明/Hibernate相关资料/hibernate-3.2.0.ga/hibernate-3.2/src/org/hibernate/loader/JoinWalker.java",
"license": "apache-2.0",
"size": 27789
} | [
"java.util.Set",
"org.hibernate.sql.JoinFragment",
"org.hibernate.type.AssociationType"
] | import java.util.Set; import org.hibernate.sql.JoinFragment; import org.hibernate.type.AssociationType; | import java.util.*; import org.hibernate.sql.*; import org.hibernate.type.*; | [
"java.util",
"org.hibernate.sql",
"org.hibernate.type"
] | java.util; org.hibernate.sql; org.hibernate.type; | 1,380,065 |
private byte[] createErrorImage(int width, int height, Exception e) throws IOException {
String error = e.getMessage();
if (null == error) {
Writer result = new StringWriter();
PrintWriter printWriter = new PrintWriter(result);
e.printStackTrace(printWriter);
error = result.toString();
}
Buffere... | byte[] function(int width, int height, Exception e) throws IOException { String error = e.getMessage(); if (null == error) { Writer result = new StringWriter(); PrintWriter printWriter = new PrintWriter(result); e.printStackTrace(printWriter); error = result.toString(); } BufferedImage image = new BufferedImage(width, ... | /**
* Create an error image should an error occur while fetching a TMS map.
*
* @param width image width
* @param height image height
* @param e exception
* @return error image
* @throws java.io.IOException oops
*/ | Create an error image should an error occur while fetching a TMS map | createErrorImage | {
"repo_name": "olivermay/geomajas",
"path": "plugin/geomajas-layer-tms/tms/src/main/java/org/geomajas/layer/tms/mvc/TmsController.java",
"license": "agpl-3.0",
"size": 8562
} | [
"java.awt.Color",
"java.awt.Graphics2D",
"java.awt.image.BufferedImage",
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.io.PrintWriter",
"java.io.StringWriter",
"java.io.Writer",
"javax.imageio.ImageIO"
] | import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; import java.io.Writer; import javax.imageio.ImageIO; | import java.awt.*; import java.awt.image.*; import java.io.*; import javax.imageio.*; | [
"java.awt",
"java.io",
"javax.imageio"
] | java.awt; java.io; javax.imageio; | 2,239,860 |
public void removeResource(Integer rscId){
Resource theRsc = getResourceByPrimaryKey(rscId);
// Get transaction
UserTransaction trans = getSessionContext().getUserTransaction();
try{
trans.begin(); // Start the transaction
theRsc.removeAllSchoolTypes();
theRsc.removeAllSchoolY... | void function(Integer rscId){ Resource theRsc = getResourceByPrimaryKey(rscId); UserTransaction trans = getSessionContext().getUserTransaction(); try{ trans.begin(); theRsc.removeAllSchoolTypes(); theRsc.removeAllSchoolYears(); deletePermissionsForResource(rscId); theRsc.remove(); trans.commit(); } catch(Exception e){ ... | /**
* Removes a Resource and all related rows from db
* @param rscId
*/ | Removes a Resource and all related rows from db | removeResource | {
"repo_name": "idega/platform2",
"path": "src/se/idega/idegaweb/commune/care/resource/business/ResourceBusinessBean.java",
"license": "gpl-3.0",
"size": 33518
} | [
"javax.transaction.SystemException",
"javax.transaction.UserTransaction",
"se.idega.idegaweb.commune.care.resource.data.Resource"
] | import javax.transaction.SystemException; import javax.transaction.UserTransaction; import se.idega.idegaweb.commune.care.resource.data.Resource; | import javax.transaction.*; import se.idega.idegaweb.commune.care.resource.data.*; | [
"javax.transaction",
"se.idega.idegaweb"
] | javax.transaction; se.idega.idegaweb; | 1,170,823 |
private static synchronized String formatDateAsTime(Date d) {
return formatTimeIn.format(d);
}
| static synchronized String function(Date d) { return formatTimeIn.format(d); } | /**
* Format Date
* <p/>
* Synchronized because SimpleDateFormat is invalid
*
* @param d
* @return
*/ | Format Date Synchronized because SimpleDateFormat is invalid | formatDateAsTime | {
"repo_name": "jacky8hyf/musique",
"path": "dependencies/jaudiotagger/src/main/java/org/jaudiotagger/tag/id3/framebody/FrameBodyTDRC.java",
"license": "lgpl-3.0",
"size": 12966
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 110,979 |
Intent toIntent = new Intent();
WebappIntentUtils.copyWebappLaunchIntentExtras(new Intent(), toIntent);
assertFalse(toIntent.hasExtra(ShortcutHelper.EXTRA_NAME));
assertFalse(toIntent.hasExtra(ShortcutHelper.EXTRA_IS_ICON_ADAPTIVE));
assertFalse(toIntent.hasExtra(ShortcutHelper.EXTRA_DIS... | Intent toIntent = new Intent(); WebappIntentUtils.copyWebappLaunchIntentExtras(new Intent(), toIntent); assertFalse(toIntent.hasExtra(ShortcutHelper.EXTRA_NAME)); assertFalse(toIntent.hasExtra(ShortcutHelper.EXTRA_IS_ICON_ADAPTIVE)); assertFalse(toIntent.hasExtra(ShortcutHelper.EXTRA_DISPLAY_MODE)); assertFalse(toInten... | /**
* Test that {@link WebappIntentUtils#copyWebappLaunchIntentExtras()} does not set intent
* extras on the destination intent if they are not present in the source intent.
*/ | Test that <code>WebappIntentUtils#copyWebappLaunchIntentExtras()</code> does not set intent extras on the destination intent if they are not present in the source intent | testCopyWebappLaunchIntentExtrasMissingKeys | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappIntentUtilsTest.java",
"license": "bsd-3-clause",
"size": 5265
} | [
"android.content.Intent",
"org.chromium.chrome.browser.ShortcutHelper",
"org.junit.Assert"
] | import android.content.Intent; import org.chromium.chrome.browser.ShortcutHelper; import org.junit.Assert; | import android.content.*; import org.chromium.chrome.browser.*; import org.junit.*; | [
"android.content",
"org.chromium.chrome",
"org.junit"
] | android.content; org.chromium.chrome; org.junit; | 2,219,922 |
// ---- AdaptiveTreeComposite type selection widgets ---- //
private Composite createTypeComposite(Composite client) {
// Get the client's background color.
Color backgroundColor = client.getBackground();
// Create the type sub-section Composite that will contain the
// type label and combo (dropdo... | Composite function(Composite client) { Color backgroundColor = client.getBackground(); Composite typeComposite = new Composite(client, SWT.NONE); typeComposite.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, true)); typeComposite.setBackground(backgroundColor); FillLayout typeCompositeLayout = new FillL... | /**
* Creates the {@link #type} selection widget for changing the type of the
* current <code>AdaptiveTreeComposite</code>. These widgets are
*
* @param client
* The client <code>Composite</code> that should contain the type
* selection widgets.
* @return The <code>Composite<... | Creates the <code>#type</code> selection widget for changing the type of the current <code>AdaptiveTreeComposite</code>. These widgets are | createTypeComposite | {
"repo_name": "SmithRWORNL/ice",
"path": "src/org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/TreePropertySection.java",
"license": "epl-1.0",
"size": 34861
} | [
"org.eclipse.swt.graphics.Color",
"org.eclipse.swt.layout.FillLayout",
"org.eclipse.swt.layout.GridData",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Label"
] | import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; | import org.eclipse.swt.graphics.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,112,301 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.