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 DirectRowSet next() throws Exception {
if (eof) {
return null;
}
while (true) {
QueryEvent event = listener.get();
switch (event.type)
{
case BATCH:
batchCount++;
recordCount += event.batch.getHeader().getRowCount();
loader.load(event.batch.getH... | DirectRowSet function() throws Exception { if (eof) { return null; } while (true) { QueryEvent event = listener.get(); switch (event.type) { case BATCH: batchCount++; recordCount += event.batch.getHeader().getRowCount(); loader.load(event.batch.getHeader().getDef(), event.batch.getData()); event.batch.release(); return... | /**
* Return the next batch of data as a row set. The first batch is usually
* empty as it carries only schema.
*
* @return the next batch as a row set, or null if EOF
* @throws Exception on a server error
*/ | Return the next batch of data as a row set. The first batch is usually empty as it carries only schema | next | {
"repo_name": "apache/drill",
"path": "exec/java-exec/src/test/java/org/apache/drill/test/QueryResultSet.java",
"license": "apache-2.0",
"size": 3357
} | [
"org.apache.drill.exec.physical.rowSet.DirectRowSet",
"org.apache.drill.exec.proto.UserBitShared",
"org.apache.drill.test.BufferingQueryEventListener"
] | import org.apache.drill.exec.physical.rowSet.DirectRowSet; import org.apache.drill.exec.proto.UserBitShared; import org.apache.drill.test.BufferingQueryEventListener; | import org.apache.drill.exec.physical.*; import org.apache.drill.exec.proto.*; import org.apache.drill.test.*; | [
"org.apache.drill"
] | org.apache.drill; | 287,637 |
public void weightMatrixCLUpdateX(OpenCLGrid3D imgCL){//mainly along Y
//this.ComputeGradientCL(imgCL);
TVOpenCLGridOperators.getInstance().computeWeightMatrixUpdateX(imgCL, weightMatrixCL, weps);
}
| void function(OpenCLGrid3D imgCL){ TVOpenCLGridOperators.getInstance().computeWeightMatrixUpdateX(imgCL, weightMatrixCL, weps); } | /**
* update weight matrix for anisotropic weighted TV (AwTV) along X direction
* @param imgCL
*/ | update weight matrix for anisotropic weighted TV (AwTV) along X direction | weightMatrixCLUpdateX | {
"repo_name": "YixingHuang/CONRAD-1",
"path": "src/edu/stanford/rsl/tutorial/weightedtv/TVGradient3D.java",
"license": "gpl-3.0",
"size": 15950
} | [
"edu.stanford.rsl.conrad.data.numeric.opencl.OpenCLGrid3D"
] | import edu.stanford.rsl.conrad.data.numeric.opencl.OpenCLGrid3D; | import edu.stanford.rsl.conrad.data.numeric.opencl.*; | [
"edu.stanford.rsl"
] | edu.stanford.rsl; | 508,650 |
public void notifyAddOnFailedUninstallation(final AddOn addOn) {
if (EventQueue.isDispatchThread()) {
installedAddOnsModel.notifyAddOnFailedUninstallation(addOn);
} else {
EventQueue.invokeLater(new Runnable() {
| void function(final AddOn addOn) { if (EventQueue.isDispatchThread()) { installedAddOnsModel.notifyAddOnFailedUninstallation(addOn); } else { EventQueue.invokeLater(new Runnable() { | /**
* Notifies that the given {@code addOn} as not successfully uninstalled. Add-ons that were not successfully uninstalled are
* not re-selectable.
*
* @param addOn the add-on that was not successfully uninstalled
* @since 2.4.0
*/ | Notifies that the given addOn as not successfully uninstalled. Add-ons that were not successfully uninstalled are not re-selectable | notifyAddOnFailedUninstallation | {
"repo_name": "gsavastano/zaproxy",
"path": "src/org/zaproxy/zap/extension/autoupdate/ManageAddOnsDialog.java",
"license": "apache-2.0",
"size": 45877
} | [
"java.awt.EventQueue",
"org.zaproxy.zap.control.AddOn"
] | import java.awt.EventQueue; import org.zaproxy.zap.control.AddOn; | import java.awt.*; import org.zaproxy.zap.control.*; | [
"java.awt",
"org.zaproxy.zap"
] | java.awt; org.zaproxy.zap; | 1,381,845 |
void createAndAddRepoConfigNpmSection(Form form, RepoDescriptor repoDescriptor, boolean isCreate); | void createAndAddRepoConfigNpmSection(Form form, RepoDescriptor repoDescriptor, boolean isCreate); | /**
* Assemble the repo Npm configuration section and add it to the given form
*
* @param form Repo configuration form
* @param repoDescriptor Configured repo descriptor
* @param isCreate Whether this is a create repository operation or an update repository operation
*/ | Assemble the repo Npm configuration section and add it to the given form | createAndAddRepoConfigNpmSection | {
"repo_name": "alancnet/artifactory",
"path": "web/application/src/main/java/org/artifactory/addon/wicket/NpmWebAddon.java",
"license": "apache-2.0",
"size": 2004
} | [
"org.apache.wicket.markup.html.form.Form",
"org.artifactory.descriptor.repo.RepoDescriptor"
] | import org.apache.wicket.markup.html.form.Form; import org.artifactory.descriptor.repo.RepoDescriptor; | import org.apache.wicket.markup.html.form.*; import org.artifactory.descriptor.repo.*; | [
"org.apache.wicket",
"org.artifactory.descriptor"
] | org.apache.wicket; org.artifactory.descriptor; | 1,947,836 |
//@Override
public boolean
onTouchEvent (
MotionEvent event
) {
synchronized (_xServer) {
if (_rootWindow == null)
return false;
blank (false); // Reset the screen saver.
updatePointerPosition ((int) event.getX (), (int) event.getY (),
0);
}
return true;
} | onTouchEvent ( MotionEvent event ) { synchronized (_xServer) { if (_rootWindow == null) return false; blank (false); updatePointerPosition ((int) event.getX (), (int) event.getY (), 0); } return true; } | /**
* Called when there is a touch event.
*
* @param event The touch event.
* @return True if the event was handled.
*/ | Called when there is a touch event | onTouchEvent | {
"repo_name": "SumiTomohiko/android-nexec-client",
"path": "app/src/main/java/au/com/darkside/XServer/ScreenView.java",
"license": "mit",
"size": 46299
} | [
"android.view.MotionEvent"
] | import android.view.MotionEvent; | import android.view.*; | [
"android.view"
] | android.view; | 2,687,762 |
public List<List<OUT>> processLists(List<List<IN>> lists) {
List<List<OUT>> result = new ArrayList<List<OUT>>(lists.size());
for (List<IN> list : lists) {
List<OUT> outList = process(list);
result.add(outList);
}
return result;
} | List<List<OUT>> function(List<List<IN>> lists) { List<List<OUT>> result = new ArrayList<List<OUT>>(lists.size()); for (List<IN> list : lists) { List<OUT> outList = process(list); result.add(outList); } return result; } | /** Process a list of lists of tokens. For example this might be a
* list of lists of words.
*
* @param lists a List of objects of type List
* @return a List of objects of type List, each of which has been processed.
*/ | Process a list of lists of tokens. For example this might be a list of lists of words | processLists | {
"repo_name": "simplyianm/stanford-corenlp",
"path": "src/main/java/edu/stanford/nlp/process/AbstractListProcessor.java",
"license": "gpl-2.0",
"size": 1364
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,152,591 |
Component getParent();
| Component getParent(); | /**
* Gets the parent component.
*
* @return parent component
*/ | Gets the parent component | getParent | {
"repo_name": "ewestfal/rice-svn2git-test",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/lifecycle/ViewLifecyclePhase.java",
"license": "apache-2.0",
"size": 5228
} | [
"org.kuali.rice.krad.uif.component.Component"
] | import org.kuali.rice.krad.uif.component.Component; | import org.kuali.rice.krad.uif.component.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,249,974 |
public Builder valuationTimeSupplier(Supplier<ZonedDateTime> valuationTimeSupplier) {
this._valuationTimeSupplier = valuationTimeSupplier;
return this;
} | Builder function(Supplier<ZonedDateTime> valuationTimeSupplier) { this._valuationTimeSupplier = valuationTimeSupplier; return this; } | /**
* Sets the {@code valuationTimeSupplier} property in the builder.
* @param valuationTimeSupplier the new value
* @return this, for chaining, not null
*/ | Sets the valuationTimeSupplier property in the builder | valuationTimeSupplier | {
"repo_name": "jeorme/OG-Platform",
"path": "sesame/sesame-engine/src/main/java/com/opengamma/sesame/server/GlobalCycleOptions.java",
"license": "apache-2.0",
"size": 21749
} | [
"com.google.common.base.Supplier",
"org.threeten.bp.ZonedDateTime"
] | import com.google.common.base.Supplier; import org.threeten.bp.ZonedDateTime; | import com.google.common.base.*; import org.threeten.bp.*; | [
"com.google.common",
"org.threeten.bp"
] | com.google.common; org.threeten.bp; | 2,846,463 |
public static RemoteSpannerHelper create(InstanceId instanceId) {
SpannerOptions options =
SpannerOptions.newBuilder()
.setProjectId(instanceId.getProject())
.setAutoThrottleAdministrativeRequests()
.setTrackTransactionStarter()
.build();
Spanner client ... | static RemoteSpannerHelper function(InstanceId instanceId) { SpannerOptions options = SpannerOptions.newBuilder() .setProjectId(instanceId.getProject()) .setAutoThrottleAdministrativeRequests() .setTrackTransactionStarter() .build(); Spanner client = options.getService(); return new RemoteSpannerHelper(options, instanc... | /**
* Creates a {@code RemoteSpannerHelper} bound to the given instance ID. All databases created
* using this will be created in the given instance.
*/ | Creates a RemoteSpannerHelper bound to the given instance ID. All databases created using this will be created in the given instance | create | {
"repo_name": "googleapis/java-spanner",
"path": "google-cloud-spanner/src/main/java/com/google/cloud/spanner/testing/RemoteSpannerHelper.java",
"license": "apache-2.0",
"size": 7133
} | [
"com.google.cloud.spanner.InstanceId",
"com.google.cloud.spanner.Spanner",
"com.google.cloud.spanner.SpannerOptions"
] | import com.google.cloud.spanner.InstanceId; import com.google.cloud.spanner.Spanner; import com.google.cloud.spanner.SpannerOptions; | import com.google.cloud.spanner.*; | [
"com.google.cloud"
] | com.google.cloud; | 2,215,843 |
void deleteAllRelations() throws SQLException; | void deleteAllRelations() throws SQLException; | /**
* Deletes all relations so they can be rebuilt from scratch
*/ | Deletes all relations so they can be rebuilt from scratch | deleteAllRelations | {
"repo_name": "nls-oskari/oskari-server",
"path": "service-map/src/main/java/fi/nls/oskari/ontology/service/KeywordRelationService.java",
"license": "mit",
"size": 1392
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,630,692 |
private Object[] enrichArguments(Method method, Collection<TestEnricher> enrichers) {
Object[] values = new Object[method.getParameterTypes().length];
if (method.getParameterTypes().length == 0) {
return values;
}
for (TestEnricher enricher : enrichers) {
merg... | Object[] function(Method method, Collection<TestEnricher> enrichers) { Object[] values = new Object[method.getParameterTypes().length]; if (method.getParameterTypes().length == 0) { return values; } for (TestEnricher enricher : enrichers) { mergeValues(values, enricher.resolve(method)); } return values; } | /**
* Enrich the method arguments of a method call.<br/>
* The Object[] index will match the method parameterType[] index.
*
* @return the argument values
*/ | Enrich the method arguments of a method call. The Object[] index will match the method parameterType[] index | enrichArguments | {
"repo_name": "rhusar/arquillian-core",
"path": "container/test-impl-base/src/main/java/org/jboss/arquillian/container/test/impl/execution/LocalTestExecuter.java",
"license": "apache-2.0",
"size": 3867
} | [
"java.lang.reflect.Method",
"java.util.Collection",
"org.jboss.arquillian.test.spi.TestEnricher"
] | import java.lang.reflect.Method; import java.util.Collection; import org.jboss.arquillian.test.spi.TestEnricher; | import java.lang.reflect.*; import java.util.*; import org.jboss.arquillian.test.spi.*; | [
"java.lang",
"java.util",
"org.jboss.arquillian"
] | java.lang; java.util; org.jboss.arquillian; | 936,972 |
@RestrictTo(LIBRARY)
public static boolean isMediaTransferEnabled() {
if (sGlobal == null) {
return false;
}
return getGlobalRouter().isMediaTransferEnabled();
} | @RestrictTo(LIBRARY) static boolean function() { if (sGlobal == null) { return false; } return getGlobalRouter().isMediaTransferEnabled(); } | /**
* Returns whether the media transfer feature is enabled.
*
* @see MediaRouter
* @hide
*/ | Returns whether the media transfer feature is enabled | isMediaTransferEnabled | {
"repo_name": "AndroidX/androidx",
"path": "mediarouter/mediarouter/src/main/java/androidx/mediarouter/media/MediaRouter.java",
"license": "apache-2.0",
"size": 169014
} | [
"androidx.annotation.RestrictTo"
] | import androidx.annotation.RestrictTo; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 1,125,190 |
public static void printSystemInfo() {
Properties prop = System.getProperties();
System.out.println("H2 " + Constants.getFullVersion() +
" @ " + new java.sql.Timestamp(System.currentTimeMillis()).toString());
System.out.println("Java " +
prop.getProperty("java... | static void function() { Properties prop = System.getProperties(); System.out.println(STR + Constants.getFullVersion() + STR + new java.sql.Timestamp(System.currentTimeMillis()).toString()); System.out.println(STR + prop.getProperty(STR) + STR + prop.getProperty(STR)+STR + prop.getProperty(STR) + STR + prop.getProperty... | /**
* Print system information.
*/ | Print system information | printSystemInfo | {
"repo_name": "paulnguyen/data",
"path": "sqldbs/h2java/src/test/org/h2/test/TestAll.java",
"license": "apache-2.0",
"size": 33821
} | [
"java.util.Properties",
"org.h2.engine.Constants",
"org.h2.util.StringUtils"
] | import java.util.Properties; import org.h2.engine.Constants; import org.h2.util.StringUtils; | import java.util.*; import org.h2.engine.*; import org.h2.util.*; | [
"java.util",
"org.h2.engine",
"org.h2.util"
] | java.util; org.h2.engine; org.h2.util; | 935,761 |
@Test(groups={"grid"})
public void cleanNodeDoNotPurgeNewVideo() throws UnirestException, IOException {
// create video file
File videoFile = Paths.get(Utils.getRootdir(), NodeTaskServlet.VIDEOS_FOLDER, "video.mp4").toFile();
FileUtils.write(videoFile, "foo");
Files.setAttribute(video... | @Test(groups={"grid"}) void function() throws UnirestException, IOException { File videoFile = Paths.get(Utils.getRootdir(), NodeTaskServlet.VIDEOS_FOLDER, STR).toFile(); FileUtils.write(videoFile, "foo"); Files.setAttribute(videoFile.toPath(), STR, FileTime.fromMillis(videoFile.lastModified() - 7 * 3600000)); try { Po... | /**
* Test videos younger than 8 hours are not deleted
* @throws UnirestException
* @throws IOException
*/ | Test videos younger than 8 hours are not deleted | cleanNodeDoNotPurgeNewVideo | {
"repo_name": "bhecquet/seleniumRobot-grid",
"path": "src/test/java/com/infotel/seleniumrobot/grid/tests/servlets/TestNodeTaskServlet.java",
"license": "apache-2.0",
"size": 56725
} | [
"com.infotel.seleniumrobot.grid.config.LaunchConfig",
"com.infotel.seleniumrobot.grid.servlets.server.NodeTaskServlet",
"com.infotel.seleniumrobot.grid.utils.Utils",
"com.seleniumtests.util.osutility.OSUtilityFactory",
"java.io.File",
"java.io.IOException",
"java.nio.file.Files",
"java.nio.file.Paths"... | import com.infotel.seleniumrobot.grid.config.LaunchConfig; import com.infotel.seleniumrobot.grid.servlets.server.NodeTaskServlet; import com.infotel.seleniumrobot.grid.utils.Utils; import com.seleniumtests.util.osutility.OSUtilityFactory; import java.io.File; import java.io.IOException; import java.nio.file.Files; impo... | import com.infotel.seleniumrobot.grid.config.*; import com.infotel.seleniumrobot.grid.servlets.server.*; import com.infotel.seleniumrobot.grid.utils.*; import com.seleniumtests.util.osutility.*; import java.io.*; import java.nio.file.*; import java.nio.file.attribute.*; import org.apache.commons.io.*; import org.mockit... | [
"com.infotel.seleniumrobot",
"com.seleniumtests.util",
"java.io",
"java.nio",
"org.apache.commons",
"org.mockito",
"org.powermock.api",
"org.testng",
"org.testng.annotations"
] | com.infotel.seleniumrobot; com.seleniumtests.util; java.io; java.nio; org.apache.commons; org.mockito; org.powermock.api; org.testng; org.testng.annotations; | 626,703 |
public static String getFileName(final InetSocketAddress s,
final String poolId, final long blockId) {
return s.toString() + ":" + poolId + ":" + blockId;
} | static String function(final InetSocketAddress s, final String poolId, final long blockId) { return s.toString() + ":" + poolId + ":" + blockId; } | /**
* File name to print when accessing a block directly (from servlets)
*
* @param s
* Address of the block location
* @param poolId
* Block pool ID of the block
* @param blockId
* Block ID of the block
* @return string that has a file name for debug purposes
*/ | File name to print when accessing a block directly (from servlets) | getFileName | {
"repo_name": "srijeyanthan/hops",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/BlockReaderFactory.java",
"license": "apache-2.0",
"size": 4992
} | [
"java.net.InetSocketAddress"
] | import java.net.InetSocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 743,866 |
public void setDescription(String description) {
SvgDescElement descElement = OdfElement.findFirstChildNode(SvgDescElement.class, mElement);
if (descElement == null)
descElement = mElement.newSvgDescElement();
descElement.setTextContent(description);
}
| void function(String description) { SvgDescElement descElement = OdfElement.findFirstChildNode(SvgDescElement.class, mElement); if (descElement == null) descElement = mElement.newSvgDescElement(); descElement.setTextContent(description); } | /**
* Set the description of this text box.
*
* @param description
* - the description of this text box
*/ | Set the description of this text box | setDescription | {
"repo_name": "jbjonesjr/geoproponis",
"path": "external/simple-odf-0.8.1-incubating-sources/org/odftoolkit/simple/draw/Frame.java",
"license": "gpl-2.0",
"size": 10924
} | [
"org.odftoolkit.odfdom.dom.element.svg.SvgDescElement",
"org.odftoolkit.odfdom.pkg.OdfElement"
] | import org.odftoolkit.odfdom.dom.element.svg.SvgDescElement; import org.odftoolkit.odfdom.pkg.OdfElement; | import org.odftoolkit.odfdom.dom.element.svg.*; import org.odftoolkit.odfdom.pkg.*; | [
"org.odftoolkit.odfdom"
] | org.odftoolkit.odfdom; | 1,001,028 |
while (buffer.hasRemaining()) {
int originalPos = buffer.position();
byte b = buffer.get();
if ((b & 0b10000000) != 0) {
//if the first bit is set it is an indexed header field
buffer.position(buffer.position() - 1); //unget the byte
in... | while (buffer.hasRemaining()) { int originalPos = buffer.position(); byte b = buffer.get(); if ((b & 0b10000000) != 0) { buffer.position(buffer.position() - 1); int index = Hpack.decodeInteger(buffer, 7); if (index == -1) { if(!moreData) { throw UndertowMessages.MESSAGES.hpackFailed(); } buffer.position(originalPos); r... | /**
* Decodes the provided frame data. If this method leaves data in the buffer then
* this buffer should be compacted so this data is preserved, unless there is no
* more data in which case this should be considered a protocol error.
*
* @param buffer The buffer
*/ | Decodes the provided frame data. If this method leaves data in the buffer then this buffer should be compacted so this data is preserved, unless there is no more data in which case this should be considered a protocol error | decode | {
"repo_name": "jasonchaffee/undertow",
"path": "core/src/main/java/io/undertow/protocols/http2/HpackDecoder.java",
"license": "apache-2.0",
"size": 13576
} | [
"io.undertow.UndertowMessages",
"io.undertow.protocols.http2.Hpack",
"io.undertow.util.HttpString"
] | import io.undertow.UndertowMessages; import io.undertow.protocols.http2.Hpack; import io.undertow.util.HttpString; | import io.undertow.*; import io.undertow.protocols.http2.*; import io.undertow.util.*; | [
"io.undertow",
"io.undertow.protocols",
"io.undertow.util"
] | io.undertow; io.undertow.protocols; io.undertow.util; | 879,545 |
public DataTypesHelper getDataTypes() {
return DataTypesHelper.getHelper();
}
| DataTypesHelper function() { return DataTypesHelper.getHelper(); } | /** Returns the package helper for the UML
* package Foundation::DataTypes.
*
* @return the DataTypes helper instance.
*/ | Returns the package helper for the UML package Foundation::DataTypes | getDataTypes | {
"repo_name": "argocasegeo/argocasegeo",
"path": "src/org/argouml/model/uml/UmlHelper.java",
"license": "epl-1.0",
"size": 7072
} | [
"org.argouml.model.uml.foundation.datatypes.DataTypesHelper"
] | import org.argouml.model.uml.foundation.datatypes.DataTypesHelper; | import org.argouml.model.uml.foundation.datatypes.*; | [
"org.argouml.model"
] | org.argouml.model; | 2,047,817 |
protected Set<Value> getDomain(final Resource prop) {
// TODO
return null;
} | Set<Value> function(final Resource prop) { return null; } | /**
* Not yet implemented.
*
* @param prop the resource.
* @return domain of a given property.
*/ | Not yet implemented | getDomain | {
"repo_name": "agazzarini/cumulusrdf",
"path": "cumulusrdf-core/src/main/java/edu/kit/aifb/cumulus/store/Schema.java",
"license": "apache-2.0",
"size": 8510
} | [
"java.util.Set",
"org.openrdf.model.Resource",
"org.openrdf.model.Value"
] | import java.util.Set; import org.openrdf.model.Resource; import org.openrdf.model.Value; | import java.util.*; import org.openrdf.model.*; | [
"java.util",
"org.openrdf.model"
] | java.util; org.openrdf.model; | 2,277,169 |
public void test_read() {
final byte[] expected = new byte[1000];
r.nextBytes(expected);
final long addr = manager.allocate(ByteBuffer.wrap(expected));
final byte[] actual = manager.read(addr);
assertEquals(expected,actual);
}
| void function() { final byte[] expected = new byte[1000]; r.nextBytes(expected); final long addr = manager.allocate(ByteBuffer.wrap(expected)); final byte[] actual = manager.read(addr); assertEquals(expected,actual); } | /**
* Unit test for reading a copy of the data from the {@link IMemoryManager}.
*/ | Unit test for reading a copy of the data from the <code>IMemoryManager</code> | test_read | {
"repo_name": "smalyshev/blazegraph",
"path": "bigdata/src/test/com/bigdata/rwstore/sector/TestMemoryManager.java",
"license": "gpl-2.0",
"size": 13282
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 950,952 |
public TreePath getEditingPath(JTree tree)
{
return editingPath;
} | TreePath function(JTree tree) { return editingPath; } | /**
* Returns the path to the element that is being editted.
*
* @param tree is the tree to get the editing path from.
* @return the path that is being edited.
*/ | Returns the path to the element that is being editted | getEditingPath | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/javax/swing/plaf/basic/BasicTreeUI.java",
"license": "gpl-2.0",
"size": 115323
} | [
"javax.swing.JTree",
"javax.swing.tree.TreePath"
] | import javax.swing.JTree; import javax.swing.tree.TreePath; | import javax.swing.*; import javax.swing.tree.*; | [
"javax.swing"
] | javax.swing; | 573,303 |
@SuppressWarnings("deprecation")
public static boolean getServerProperties(String biPath, String dstPath) {
Boolean result = false;
File srcDir = new File(biPath);
File dstDir = new File(dstPath);
IOFileFilter SuffixFilter = FileFilterUtils
.suffixFileFilter(SupportUtilConstant.DOT_PROP);
IOFileFilte... | @SuppressWarnings(STR) static boolean function(String biPath, String dstPath) { Boolean result = false; File srcDir = new File(biPath); File dstDir = new File(dstPath); IOFileFilter SuffixFilter = FileFilterUtils .suffixFileFilter(SupportUtilConstant.DOT_PROP); IOFileFilter hibFilter = FileFilterUtils .nameFileFilter(S... | /**
*
* Get the Server Properties from Server
*
* @param biPath
* @param dstPath
* @return
*/ | Get the Server Properties from Server | getServerProperties | {
"repo_name": "matthewtckr/support-utility",
"path": "PentahoSupportUtility/src/org/pentaho/supportutility/config/retriever/FileExtensionUtil.java",
"license": "apache-2.0",
"size": 7068
} | [
"java.io.File",
"java.io.FileFilter",
"java.io.IOException",
"org.apache.commons.io.FileUtils",
"org.apache.commons.io.filefilter.DirectoryFileFilter",
"org.apache.commons.io.filefilter.FileFileFilter",
"org.apache.commons.io.filefilter.FileFilterUtils",
"org.apache.commons.io.filefilter.IOFileFilter"... | import java.io.File; import java.io.FileFilter; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.apache.commons.io.filefilter.DirectoryFileFilter; import org.apache.commons.io.filefilter.FileFileFilter; import org.apache.commons.io.filefilter.FileFilterUtils; import org.apache.commons.io.f... | import java.io.*; import org.apache.commons.io.*; import org.apache.commons.io.filefilter.*; import org.pentaho.supportutility.config.constant.*; | [
"java.io",
"org.apache.commons",
"org.pentaho.supportutility"
] | java.io; org.apache.commons; org.pentaho.supportutility; | 800,959 |
public final JMenuItem getMenuItemZoneBlockade() {
return blockade;
} | final JMenuItem function() { return blockade; } | /**
* JMenuItem to change an zone to a blockade.
*
* @return The JMenuItem to change an zone to a blockade.
*/ | JMenuItem to change an zone to a blockade | getMenuItemZoneBlockade | {
"repo_name": "eishub/BW4T",
"path": "bw4t-environment-store/src/main/java/nl/tudelft/bw4t/environmentstore/editor/view/ZoneMenu.java",
"license": "gpl-3.0",
"size": 4484
} | [
"javax.swing.JMenuItem"
] | import javax.swing.JMenuItem; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,854,230 |
public SnackBar animationOut(Animation anim){
mOutAnimation = anim;
return this;
} | SnackBar function(Animation anim){ mOutAnimation = anim; return this; } | /**
* Set the animation will be shown when SnackBar exit screen.
* @param anim The animation.
* @return This SnackBar for chaining methods.
*/ | Set the animation will be shown when SnackBar exit screen | animationOut | {
"repo_name": "Bloody-Badboy/material",
"path": "lib/src/main/java/com/rey/material/widget/SnackBar.java",
"license": "apache-2.0",
"size": 31448
} | [
"android.view.animation.Animation"
] | import android.view.animation.Animation; | import android.view.animation.*; | [
"android.view"
] | android.view; | 147,735 |
private List<HdfsCachePool> getAllHdfsCachePools() {
versionLock_.readLock().lock();
try {
return ImmutableList.copyOf(hdfsCachePools_);
} finally {
versionLock_.readLock().unlock();
}
} | List<HdfsCachePool> function() { versionLock_.readLock().lock(); try { return ImmutableList.copyOf(hdfsCachePools_); } finally { versionLock_.readLock().unlock(); } } | /**
* Get a snapshot view of all the Hdfs cache pools in the catalog.
*/ | Get a snapshot view of all the Hdfs cache pools in the catalog | getAllHdfsCachePools | {
"repo_name": "cloudera/Impala",
"path": "fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java",
"license": "apache-2.0",
"size": 115678
} | [
"com.google.common.collect.ImmutableList",
"java.util.List"
] | import com.google.common.collect.ImmutableList; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,844,921 |
public IDiff getDiff(IResource resource) throws CoreException {
Subscriber subscriber = getSubscriber();
return subscriber.getDiff(resource);
} | IDiff function(IResource resource) throws CoreException { Subscriber subscriber = getSubscriber(); return subscriber.getDiff(resource); } | /**
* Return the sync info for the given resource obtained
* from the subscriber.
* @param resource the resource
* @return the sync info for the resource
* @throws CoreException
*/ | Return the sync info for the given resource obtained from the subscriber | getDiff | {
"repo_name": "apicloudcom/APICloud-Studio",
"path": "org.tigris.subversion.subclipse.core/src/org/tigris/subversion/subclipse/core/mapping/SubclipseSubscriberChangeSetManager.java",
"license": "gpl-3.0",
"size": 14880
} | [
"org.eclipse.core.resources.IResource",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.team.core.diff.IDiff",
"org.eclipse.team.core.subscribers.Subscriber"
] | import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.team.core.diff.IDiff; import org.eclipse.team.core.subscribers.Subscriber; | import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.team.core.diff.*; import org.eclipse.team.core.subscribers.*; | [
"org.eclipse.core",
"org.eclipse.team"
] | org.eclipse.core; org.eclipse.team; | 1,328,013 |
private static void storeRow(
long pageAddr,
int off,
IndexItem row
) {
// Index name length.
PageUtils.putUnsignedByte(pageAddr, off, row.idxName.length);
off++;
// Index name.
PageUtils.putBytes(pageAddr, off, row.idxName);
off += row.id... | static void function( long pageAddr, int off, IndexItem row ) { PageUtils.putUnsignedByte(pageAddr, off, row.idxName.length); off++; PageUtils.putBytes(pageAddr, off, row.idxName); off += row.idxName.length; PageUtils.putLong(pageAddr, off, row.pageId); } | /**
* Store row to buffer.
*
* @param pageAddr Page address.
* @param off Offset in buf.
* @param row Row to store.
*/ | Store row to buffer | storeRow | {
"repo_name": "NSAmelchev/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IndexStorageImpl.java",
"license": "apache-2.0",
"size": 18487
} | [
"org.apache.ignite.internal.pagemem.PageUtils"
] | import org.apache.ignite.internal.pagemem.PageUtils; | import org.apache.ignite.internal.pagemem.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,678,869 |
public byte[] getContentDigest()
{
if (resultDigest == null)
{
throw new IllegalStateException("method can only be called after verify.");
}
return Arrays.clone(resultDigest);
} | byte[] function() { if (resultDigest == null) { throw new IllegalStateException(STR); } return Arrays.clone(resultDigest); } | /**
* return the content digest that was calculated during verification.
*/ | return the content digest that was calculated during verification | getContentDigest | {
"repo_name": "iseki-masaya/spongycastle",
"path": "pkix/src/main/java/org/spongycastle/cms/SignerInformation.java",
"license": "mit",
"size": 23455
} | [
"org.spongycastle.util.Arrays"
] | import org.spongycastle.util.Arrays; | import org.spongycastle.util.*; | [
"org.spongycastle.util"
] | org.spongycastle.util; | 1,467,400 |
public static HostAndPort fromString(String hostPortString) {
checkNotNull(hostPortString);
String host;
String portString = null;
boolean hasBracketlessColons = false;
if (hostPortString.startsWith("[")) {
String[] hostAndPort = getHostAndPortFromBracketedHost(hostPortString);
host =... | static HostAndPort function(String hostPortString) { checkNotNull(hostPortString); String host; String portString = null; boolean hasBracketlessColons = false; if (hostPortString.startsWith("[")) { String[] hostAndPort = getHostAndPortFromBracketedHost(hostPortString); host = hostAndPort[0]; portString = hostAndPort[1]... | /**
* Split a freeform string into a host and port, without strict validation.
*
* Note that the host-only formats will leave the port field undefined. You
* can use {@link #withDefaultPort(int)} to patch in a default value.
*
* @param hostPortString the input string to parse.
* @return if parsing... | Split a freeform string into a host and port, without strict validation. Note that the host-only formats will leave the port field undefined. You can use <code>#withDefaultPort(int)</code> to patch in a default value | fromString | {
"repo_name": "Allive1/pinpoint",
"path": "thirdparty/google-guava/src/main/java/com/google/common/net/HostAndPort.java",
"license": "apache-2.0",
"size": 11408
} | [
"com.google.common.base.Preconditions",
"com.google.common.base.Strings"
] | import com.google.common.base.Preconditions; import com.google.common.base.Strings; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 587,490 |
public void intersectPermittedSubtree(ASN1Sequence permitted)
{
Map subtreesMap = new HashMap();
// group in sets in a map ordered by tag no.
for (Enumeration e = permitted.getObjects(); e.hasMoreElements();)
{
GeneralSubtree subtree = GeneralSubtree.getInstance(e.ne... | void function(ASN1Sequence permitted) { Map subtreesMap = new HashMap(); for (Enumeration e = permitted.getObjects(); e.hasMoreElements();) { GeneralSubtree subtree = GeneralSubtree.getInstance(e.nextElement()); Integer tagNo = new Integer(subtree.getBase().getTagNo()); if (subtreesMap.get(tagNo) == null) { subtreesMap... | /**
* Updates the permitted set of these name constraints with the intersection
* with the given subtree.
*
* @param permitted The permitted subtrees
*/ | Updates the permitted set of these name constraints with the intersection with the given subtree | intersectPermittedSubtree | {
"repo_name": "Qingbao/PasswdManagerAndroid",
"path": "src/noconflict/org/bouncycastle/jce/provider/PKIXNameConstraintValidator.java",
"license": "lgpl-2.1",
"size": 55777
} | [
"java.util.Enumeration",
"java.util.HashMap",
"java.util.HashSet",
"java.util.Iterator",
"java.util.Map",
"java.util.Set"
] | import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 15,087 |
private void refreshMarkers() {
removeAll(); // listener is removed in Marker.removeNotify()
Map markerMap = new HashMap();
List notices = textArea.getParserNotices();
for (Iterator i=notices.iterator(); i.hasNext(); ) {
ParserNotice notice = (ParserNotice)i.next();
if (notice.getLevel()<=lev... | void function() { removeAll(); Map markerMap = new HashMap(); List notices = textArea.getParserNotices(); for (Iterator i=notices.iterator(); i.hasNext(); ) { ParserNotice notice = (ParserNotice)i.next(); if (notice.getLevel()<=levelThreshold (notice instanceof TaskNotice)) { Integer key = new Integer(notice.getLine())... | /**
* Refreshes the markers displayed in this error strip.
*/ | Refreshes the markers displayed in this error strip | refreshMarkers | {
"repo_name": "Nanonid/RSyntaxTextArea",
"path": "src/org/fife/ui/rsyntaxtextarea/ErrorStrip.java",
"license": "bsd-3-clause",
"size": 20011
} | [
"java.util.HashMap",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"javax.swing.text.BadLocationException",
"org.fife.ui.rsyntaxtextarea.parser.ParserNotice",
"org.fife.ui.rsyntaxtextarea.parser.TaskTagParser"
] | import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import javax.swing.text.BadLocationException; import org.fife.ui.rsyntaxtextarea.parser.ParserNotice; import org.fife.ui.rsyntaxtextarea.parser.TaskTagParser; | import java.util.*; import javax.swing.text.*; import org.fife.ui.rsyntaxtextarea.parser.*; | [
"java.util",
"javax.swing",
"org.fife.ui"
] | java.util; javax.swing; org.fife.ui; | 2,564,457 |
public Enumeration listMessages(); | Enumeration function(); | /**
* Lists all the error messages.
*/ | Lists all the error messages | listMessages | {
"repo_name": "srnsw/xena",
"path": "xena/ext/src/javahelp/jhMaster/JavaHelp/src/new/javax/help/TreeItemFactory.java",
"license": "gpl-3.0",
"size": 3419
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 2,049,376 |
private boolean canCopy(List<DocumentInfo> files, RootInfo root, DocumentInfo dest) {
if (dest == null || !dest.isDirectory() || !dest.isCreateSupported()) {
return false;
}
// Can't copy folders to downloads, because we don't show folders there.
if (root.isDownloads()) ... | boolean function(List<DocumentInfo> files, RootInfo root, DocumentInfo dest) { if (dest == null !dest.isDirectory() !dest.isCreateSupported()) { return false; } if (root.isDownloads()) { for (DocumentInfo docs : files) { if (docs.isDirectory()) { return false; } } } return true; } | /**
* Returns true if the list of files can be copied to destination. Note that this
* is a policy check only. Currently the method does not attempt to verify
* available space or any other environmental aspects possibly resulting in
* failure to copy.
*
* @return true if the list of files... | Returns true if the list of files can be copied to destination. Note that this is a policy check only. Currently the method does not attempt to verify available space or any other environmental aspects possibly resulting in failure to copy | canCopy | {
"repo_name": "xorware/android_frameworks_base",
"path": "packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java",
"license": "apache-2.0",
"size": 72106
} | [
"com.android.documentsui.model.DocumentInfo",
"com.android.documentsui.model.RootInfo",
"java.util.List"
] | import com.android.documentsui.model.DocumentInfo; import com.android.documentsui.model.RootInfo; import java.util.List; | import com.android.documentsui.model.*; import java.util.*; | [
"com.android.documentsui",
"java.util"
] | com.android.documentsui; java.util; | 24,317 |
private void extendMessageWithFlow(StructuralCodeConstraintException e){
String s = "Execution flow:\n";
e.extendMessage("", s+getExecutionChain());
} | void function(StructuralCodeConstraintException e){ String s = STR; e.extendMessage("", s+getExecutionChain()); } | /**
* Extends the StructuralCodeConstraintException ("e") object with an at-the-end-extended message.
* This extended message will then reflect the execution flow needed to get to the constraint
* violation that triggered the throwing of the "e" object.
*/ | Extends the StructuralCodeConstraintException ("e") object with an at-the-end-extended message. This extended message will then reflect the execution flow needed to get to the constraint violation that triggered the throwing of the "e" object | extendMessageWithFlow | {
"repo_name": "jesusc/eclectic",
"path": "plugins/org.eclectic.javaflow/src-original/org/apache/commons/javaflow/bytecode/transformation/bcel/analyser/ControlFlowGraph.java",
"license": "gpl-3.0",
"size": 13816
} | [
"org.apache.bcel.verifier.exc.StructuralCodeConstraintException"
] | import org.apache.bcel.verifier.exc.StructuralCodeConstraintException; | import org.apache.bcel.verifier.exc.*; | [
"org.apache.bcel"
] | org.apache.bcel; | 1,619,487 |
public void putObject(K key, V value)
{
Validate.notNull(key);
Validate.notNull(value);
this.values = null;
if (this.registryObjects.containsKey(key))
{
LOGGER.debug("Adding duplicate key \'{}\' to registry", new Object[] {key});
}
this.regis... | void function(K key, V value) { Validate.notNull(key); Validate.notNull(value); this.values = null; if (this.registryObjects.containsKey(key)) { LOGGER.debug(STR, new Object[] {key}); } this.registryObjects.put(key, value); } | /**
* Register an object on this registry.
*/ | Register an object on this registry | putObject | {
"repo_name": "SuperUnitato/UnLonely",
"path": "build/tmp/recompileMc/sources/net/minecraft/util/registry/RegistrySimple.java",
"license": "lgpl-2.1",
"size": 2310
} | [
"org.apache.commons.lang3.Validate"
] | import org.apache.commons.lang3.Validate; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 303,129 |
EAttribute getMetadataURLType_About(); | EAttribute getMetadataURLType_About(); | /**
* Returns the meta object for the attribute '{@link net.opengis.wfs20.MetadataURLType#getAbout <em>About</em>}'.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
* @return the meta object for the attribute '<em>About</em>'.
* @see net.opengis.wfs20.MetadataURLType#getAbout()
* @see #getMetadata... | Returns the meta object for the attribute '<code>net.opengis.wfs20.MetadataURLType#getAbout About</code>'. | getMetadataURLType_About | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wfs/src/net/opengis/wfs20/Wfs20Package.java",
"license": "lgpl-2.1",
"size": 404067
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,181,551 |
public boolean isGPSPermissionGranted() {
return locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) &&
ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION)
== PackageManager.PERMISSION_GRANTED;
} | boolean function() { return locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) && ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED; } | /**
* Convenience method to check if the GPS
* @return boolean
*/ | Convenience method to check if the GPS | isGPSPermissionGranted | {
"repo_name": "marcusthebrown/spatialconnect-android-sdk",
"path": "spatialconnect/src/main/java/com/boundlessgeo/spatialconnect/scutilities/LocationHelper.java",
"license": "apache-2.0",
"size": 6232
} | [
"android.content.pm.PackageManager",
"android.location.LocationManager",
"android.support.v4.content.ContextCompat"
] | import android.content.pm.PackageManager; import android.location.LocationManager; import android.support.v4.content.ContextCompat; | import android.content.pm.*; import android.location.*; import android.support.v4.content.*; | [
"android.content",
"android.location",
"android.support"
] | android.content; android.location; android.support; | 2,393,182 |
void setErrorHandler( ErrorHandler handler );
| void setErrorHandler( ErrorHandler handler ); | /**
* sets application-implemented ErrorHandler, which will receive all validation
* errors.
*/ | sets application-implemented ErrorHandler, which will receive all validation errors | setErrorHandler | {
"repo_name": "league/rngzip",
"path": "libs/iso-relax/org/iso_relax/dispatcher/Dispatcher.java",
"license": "gpl-2.0",
"size": 3940
} | [
"org.xml.sax.ErrorHandler"
] | import org.xml.sax.ErrorHandler; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,003,211 |
private void calculateLookupData(Color[] colors) {
Color[] normalizedColors;
if (colorSpace == ColorSpaceType.LINEAR_RGB) {
// create a new colors array
normalizedColors = new Color[colors.length];
// convert the colors using the lookup table
for (int ... | void function(Color[] colors) { Color[] normalizedColors; if (colorSpace == ColorSpaceType.LINEAR_RGB) { normalizedColors = new Color[colors.length]; for (int i = 0; i < colors.length; i++) { int argb = colors[i].getRGB(); int a = argb >>> 24; int r = SRGBtoLinearRGB[(argb >> 16) & 0xff]; int g = SRGBtoLinearRGB[(argb ... | /**
* This function is the meat of this class. It calculates an array of
* gradient colors based on an array of fractions and color values at
* those fractions.
*/ | This function is the meat of this class. It calculates an array of gradient colors based on an array of fractions and color values at those fractions | calculateLookupData | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/java/awt/MultipleGradientPaintContext.java",
"license": "gpl-2.0",
"size": 27048
} | [
"java.awt.MultipleGradientPaint",
"java.awt.image.ColorModel"
] | import java.awt.MultipleGradientPaint; import java.awt.image.ColorModel; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,775,872 |
public void setNeedAfterSpace(boolean afterSpace) {
this.needAfterSpace = afterSpace;
}
private String name;
private String value;
private List<String> invalidChars;
private boolean needBeforeSpace;
private boolean needAfterSpace; | void function(boolean afterSpace) { this.needAfterSpace = afterSpace; } private String name; private String value; private List<String> invalidChars; private boolean needBeforeSpace; private boolean needAfterSpace; | /**
* Set the flag to know the character should have a space.
*
* @param afterSpace the character should have a space after it
*/ | Set the flag to know the character should have a space | setNeedAfterSpace | {
"repo_name": "alcuin/document-validator",
"path": "document-validator-core/src/main/java/org/unigram/docvalidator/util/DVCharacter.java",
"license": "lgpl-3.0",
"size": 4307
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,794,449 |
public static Throwable unwrapCompletionException(Throwable throwable)
{
if (throwable instanceof CompletionException) {
return firstNonNull(throwable.getCause(), throwable);
}
return throwable;
} | static Throwable function(Throwable throwable) { if (throwable instanceof CompletionException) { return firstNonNull(throwable.getCause(), throwable); } return throwable; } | /**
* Attempts to unwrap a throwable that has been wrapped in a {@link CompletionException}.
*/ | Attempts to unwrap a throwable that has been wrapped in a <code>CompletionException</code> | unwrapCompletionException | {
"repo_name": "gwittel/platform",
"path": "concurrent/src/main/java/com/proofpoint/concurrent/MoreFutures.java",
"license": "apache-2.0",
"size": 24528
} | [
"com.google.common.base.MoreObjects",
"java.util.concurrent.CompletionException"
] | import com.google.common.base.MoreObjects; import java.util.concurrent.CompletionException; | import com.google.common.base.*; import java.util.concurrent.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 253,236 |
static int lev(String stringA, String stringB) {
Objects.requireNonNull(stringA);
Objects.requireNonNull(stringB);
// handle degenerate cases
if (stringA.equals(stringB))
return 0;
if (stringA.length() == 0)
return stringB.length();
if (stri... | static int lev(String stringA, String stringB) { Objects.requireNonNull(stringA); Objects.requireNonNull(stringB); if (stringA.equals(stringB)) return 0; if (stringA.length() == 0) return stringB.length(); if (stringB.length() == 0) return stringA.length(); int[] s = stringA.codePoints().toArray(); int[] t = stringB.co... | /**
* Compute the Levenshtein distance between Strings stringA and stringB,
* respecting supplementary characters (i.e., surrogate pairs).
* The algorithm is the two-row technique from:
*
* https://en.wikipedia.org/wiki/Levenshtein_distance
*
* which is derived from Hjelmqvist, Sten (... | Compute the Levenshtein distance between Strings stringA and stringB, respecting supplementary characters (i.e., surrogate pairs). The algorithm is the two-row technique from: HREF which is derived from Hjelmqvist, Sten (26 Mar 2012), Fast, memory efficient Levenshtein algorithm: HREF | lev | {
"repo_name": "irotech/KitchenSink",
"path": "Java/StandardEdition/src/main/java/com/gmail/at/irotech/mooc/oracle/jdk8_lambdas_streams/Levenshtein.java",
"license": "gpl-2.0",
"size": 3359
} | [
"java.util.Arrays",
"java.util.Objects"
] | import java.util.Arrays; import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 591,924 |
private DesignDescriptionList buildUpDesignDescriptionList(DesignOptions options) {
String domainAxisLabel;
if (options.getLanguage() != null && options.getLanguage().equals("de")) {
domainAxisLabel = "Zeit";
} else { // default => "en"
domainAxisLabel = "Time";
... | DesignDescriptionList function(DesignOptions options) { String domainAxisLabel; if (options.getLanguage() != null && options.getLanguage().equals("de")) { domainAxisLabel = "Zeit"; } else { domainAxisLabel = "Time"; } DesignDescriptionList ddList = new DesignDescriptionList(domainAxisLabel); String observedPropertyWith... | /**
* Builds up a DesignDescriptionList object which stores the information
* about the style of each timeseries.
*/ | Builds up a DesignDescriptionList object which stores the information about the style of each timeseries | buildUpDesignDescriptionList | {
"repo_name": "52North/SensorWebClient",
"path": "sensorwebclient-api/src/main/java/org/n52/server/io/DiagramGenerator.java",
"license": "gpl-2.0",
"size": 6477
} | [
"java.awt.Color",
"org.n52.oxf.util.JavaHelper",
"org.n52.server.io.render.DesignDescriptionList",
"org.n52.shared.serializable.pojos.DesignOptions",
"org.n52.shared.serializable.pojos.TimeseriesProperties"
] | import java.awt.Color; import org.n52.oxf.util.JavaHelper; import org.n52.server.io.render.DesignDescriptionList; import org.n52.shared.serializable.pojos.DesignOptions; import org.n52.shared.serializable.pojos.TimeseriesProperties; | import java.awt.*; import org.n52.oxf.util.*; import org.n52.server.io.render.*; import org.n52.shared.serializable.pojos.*; | [
"java.awt",
"org.n52.oxf",
"org.n52.server",
"org.n52.shared"
] | java.awt; org.n52.oxf; org.n52.server; org.n52.shared; | 1,324,073 |
void submit(SimulatorAddress destination, SimulatorOperation operation); | void submit(SimulatorAddress destination, SimulatorOperation operation); | /**
* Submits a {@link SimulatorOperation} to a {@link SimulatorAddress}.
*
* The {@link SimulatorOperation} is put on a queue. The {@link Response} is not returned.
*
* @param operation the {@link SimulatorOperation} to send.
*/ | Submits a <code>SimulatorOperation</code> to a <code>SimulatorAddress</code>. The <code>SimulatorOperation</code> is put on a queue. The <code>Response</code> is not returned | submit | {
"repo_name": "fengshao0907/hazelcast-simulator",
"path": "simulator/src/main/java/com/hazelcast/simulator/protocol/connector/ServerConnector.java",
"license": "apache-2.0",
"size": 3409
} | [
"com.hazelcast.simulator.protocol.core.SimulatorAddress",
"com.hazelcast.simulator.protocol.operation.SimulatorOperation"
] | import com.hazelcast.simulator.protocol.core.SimulatorAddress; import com.hazelcast.simulator.protocol.operation.SimulatorOperation; | import com.hazelcast.simulator.protocol.core.*; import com.hazelcast.simulator.protocol.operation.*; | [
"com.hazelcast.simulator"
] | com.hazelcast.simulator; | 1,445,851 |
private static void writeString(OutputStream output, Serializable string)
{
write_instance(output, string, m_StringValueHelper.get_id(),
m_StringValueHelper);
} | static void function(OutputStream output, Serializable string) { write_instance(output, string, m_StringValueHelper.get_id(), m_StringValueHelper); } | /**
* Write the parameter that is surely a string and not null.
*/ | Write the parameter that is surely a string and not null | writeString | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/CORBA/CDR/Vio.java",
"license": "gpl-2.0",
"size": 45273
} | [
"java.io.Serializable",
"org.omg.CORBA"
] | import java.io.Serializable; import org.omg.CORBA; | import java.io.*; import org.omg.*; | [
"java.io",
"org.omg"
] | java.io; org.omg; | 1,322,134 |
@Message(id = 13, value = "Bad type for '%s'")
InvalidAttributeValueException invalidAttributeType(@Cause Throwable cause, String name); | @Message(id = 13, value = STR) InvalidAttributeValueException invalidAttributeType(@Cause Throwable cause, String name); | /**
* Creates an exception indicating the attribute type is invalid.
*
* @param cause the cause of the error.
* @param name the attribute name.
*
* @return an {@link InvalidAttributeValueException} for the error.
*/ | Creates an exception indicating the attribute type is invalid | invalidAttributeType | {
"repo_name": "JiriOndrusek/wildfly-core",
"path": "jmx/src/main/java/org/jboss/as/jmx/logging/JmxLogger.java",
"license": "lgpl-2.1",
"size": 19789
} | [
"javax.management.InvalidAttributeValueException",
"org.jboss.logging.annotations.Cause",
"org.jboss.logging.annotations.Message"
] | import javax.management.InvalidAttributeValueException; import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.Message; | import javax.management.*; import org.jboss.logging.annotations.*; | [
"javax.management",
"org.jboss.logging"
] | javax.management; org.jboss.logging; | 1,223,606 |
public SVGException createSVGException(short type,
String key,
Object [] args) {
try {
return new SVGOMException
(type, getCurrentDocument().formatMessage(key, args));
} catch (Exception... | SVGException function(short type, String key, Object [] args) { try { return new SVGOMException (type, getCurrentDocument().formatMessage(key, args)); } catch (Exception e) { return new SVGOMException(type, key); } } | /**
* Creates an SVGException with the appropriate error message.
*/ | Creates an SVGException with the appropriate error message | createSVGException | {
"repo_name": "srnsw/xena",
"path": "plugins/image/ext/src/batik-1.7/sources/org/apache/batik/dom/svg/SVGOMElement.java",
"license": "gpl-3.0",
"size": 31547
} | [
"org.w3c.dom.svg.SVGException"
] | import org.w3c.dom.svg.SVGException; | import org.w3c.dom.svg.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,740,374 |
String getFieldNameInVertex(IDataType<?> dataType, AttributeInfo aInfo) throws AtlasException; | String getFieldNameInVertex(IDataType<?> dataType, AttributeInfo aInfo) throws AtlasException; | /**
* Return the property key used to store a given attribute in the repository.
*
* @param dataType data type
* @param aInfo attribute info
* @return property key used to store a given attribute
*/ | Return the property key used to store a given attribute in the repository | getFieldNameInVertex | {
"repo_name": "jnhagelberg/incubator-atlas",
"path": "repository/src/main/java/org/apache/atlas/repository/MetadataRepository.java",
"license": "apache-2.0",
"size": 6292
} | [
"org.apache.atlas.AtlasException",
"org.apache.atlas.typesystem.types.AttributeInfo",
"org.apache.atlas.typesystem.types.IDataType"
] | import org.apache.atlas.AtlasException; import org.apache.atlas.typesystem.types.AttributeInfo; import org.apache.atlas.typesystem.types.IDataType; | import org.apache.atlas.*; import org.apache.atlas.typesystem.types.*; | [
"org.apache.atlas"
] | org.apache.atlas; | 583,636 |
public EntityManager retrieveEntityManagerFromDataGenerator(Class<? extends IDataGenerator> dgClass) {
return retrieveEntityManager(dgClass);
} | EntityManager function(Class<? extends IDataGenerator> dgClass) { return retrieveEntityManager(dgClass); } | /**
* Retrieve an entity manager corresponding to the data generator
*
* @param dgClass The data generator class
* @return The corresponding entity manager
*/ | Retrieve an entity manager corresponding to the data generator | retrieveEntityManagerFromDataGenerator | {
"repo_name": "probedock/junitee-data-utils",
"path": "src/main/java/io/probedock/junitee/utils/EntityManagerHolder.java",
"license": "mit",
"size": 4851
} | [
"io.probedock.junitee.generator.IDataGenerator",
"javax.persistence.EntityManager"
] | import io.probedock.junitee.generator.IDataGenerator; import javax.persistence.EntityManager; | import io.probedock.junitee.generator.*; import javax.persistence.*; | [
"io.probedock.junitee",
"javax.persistence"
] | io.probedock.junitee; javax.persistence; | 1,313,005 |
@Test
public void evictorJobsStartedWrapsFromMaxIntegerToNegativeValue() {
statistics.incInt(evictorJobsStartedId, Integer.MAX_VALUE);
cachePerfStats.incEvictorJobsStarted();
assertThat(cachePerfStats.getEvictorJobsStarted()).isNegative();
} | void function() { statistics.incInt(evictorJobsStartedId, Integer.MAX_VALUE); cachePerfStats.incEvictorJobsStarted(); assertThat(cachePerfStats.getEvictorJobsStarted()).isNegative(); } | /**
* Characterization test: {@code evictorJobsStarted} currently wraps to negative from max integer
* value.
*/ | Characterization test: evictorJobsStarted currently wraps to negative from max integer value | evictorJobsStartedWrapsFromMaxIntegerToNegativeValue | {
"repo_name": "davebarnes97/geode",
"path": "geode-core/src/test/java/org/apache/geode/internal/cache/CachePerfStatsTest.java",
"license": "apache-2.0",
"size": 34945
} | [
"org.assertj.core.api.Assertions"
] | import org.assertj.core.api.Assertions; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 996,711 |
public ParameterValueSet newParameterValueSet(ClassInspector ci, int numParms, boolean hasReturnParam)
{
if (numParms == 0)
return emptySet;
return new GenericParameterValueSet(ci, numParms, hasReturnParam);
} | ParameterValueSet function(ClassInspector ci, int numParms, boolean hasReturnParam) { if (numParms == 0) return emptySet; return new GenericParameterValueSet(ci, numParms, hasReturnParam); } | /**
* Factory method for getting a ParameterValueSet
*
* @see LanguageFactory#newParameterValueSet
*/ | Factory method for getting a ParameterValueSet | newParameterValueSet | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/GenericLanguageFactory.java",
"license": "apache-2.0",
"size": 4948
} | [
"com.pivotal.gemfirexd.internal.iapi.services.loader.ClassInspector",
"com.pivotal.gemfirexd.internal.iapi.sql.ParameterValueSet"
] | import com.pivotal.gemfirexd.internal.iapi.services.loader.ClassInspector; import com.pivotal.gemfirexd.internal.iapi.sql.ParameterValueSet; | import com.pivotal.gemfirexd.internal.iapi.services.loader.*; import com.pivotal.gemfirexd.internal.iapi.sql.*; | [
"com.pivotal.gemfirexd"
] | com.pivotal.gemfirexd; | 627,713 |
private void drawValue(Canvas canvas) {
valuePaint.setColor(VALUE_TEXT_COLOR);
valuePaint.drawableState = getDrawableState();
Rect bounds = new Rect();
itemsLayout.getLineBounds(visibleItems / 2, bounds);
// draw label
if (labelLayout != null) {
... | void function(Canvas canvas) { valuePaint.setColor(VALUE_TEXT_COLOR); valuePaint.drawableState = getDrawableState(); Rect bounds = new Rect(); itemsLayout.getLineBounds(visibleItems / 2, bounds); if (labelLayout != null) { canvas.save(); canvas.translate(itemsLayout.getWidth() + LABEL_OFFSET, bounds.top); labelLayout.d... | /**
* Draws value and label layout.
*
* @param canvas the canvas for drawing
*/ | Draws value and label layout | drawValue | {
"repo_name": "gizwits/Gizwits-WaterPurifier_Android",
"path": "src/com/gizwits/framework/widget/WheelView.java",
"license": "mit",
"size": 31586
} | [
"android.graphics.Canvas",
"android.graphics.Rect"
] | import android.graphics.Canvas; import android.graphics.Rect; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,798,544 |
public double[] getMovementOffsets(int p_70974_1_, float p_70974_2_)
{
if (this.getHealth() <= 0.0F)
{
p_70974_2_ = 0.0F;
}
p_70974_2_ = 1.0F - p_70974_2_;
int i = this.ringBufferIndex - p_70974_1_ * 1 & 63;
int j = this.ringBufferIndex - p_70974_1_ *... | double[] function(int p_70974_1_, float p_70974_2_) { if (this.getHealth() <= 0.0F) { p_70974_2_ = 0.0F; } p_70974_2_ = 1.0F - p_70974_2_; int i = this.ringBufferIndex - p_70974_1_ * 1 & 63; int j = this.ringBufferIndex - p_70974_1_ * 1 - 1 & 63; double[] adouble = new double[3]; double d0 = this.ringBuffer[i][0]; doub... | /**
* Returns a double[3] array with movement offsets, used to calculate trailing tail/neck positions. [0] = yaw
* offset, [1] = y offset, [2] = unused, always 0. Parameters: buffer index offset, partial ticks.
*/ | Returns a double[3] array with movement offsets, used to calculate trailing tail/neck positions. [0] = yaw offset, [1] = y offset, [2] = unused, always 0. Parameters: buffer index offset, partial ticks | getMovementOffsets | {
"repo_name": "TorchPowered/Thallium",
"path": "src/main/java/net/minecraft/entity/boss/EntityDragon.java",
"license": "mit",
"size": 31102
} | [
"net.minecraft.util.MathHelper"
] | import net.minecraft.util.MathHelper; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 1,994,196 |
public static void text(double x, double y, String text) {
if (text == null) throw new IllegalArgumentException();
offscreen.setFont(font);
FontMetrics metrics = offscreen.getFontMetrics();
double xs = scaleX(x);
double ys = scaleY(y);
int ws = metrics.stringWidth(tex... | static void function(double x, double y, String text) { if (text == null) throw new IllegalArgumentException(); offscreen.setFont(font); FontMetrics metrics = offscreen.getFontMetrics(); double xs = scaleX(x); double ys = scaleY(y); int ws = metrics.stringWidth(text); int hs = metrics.getDescent(); offscreen.drawString... | /**
* Write the given text string in the current font, centered at (<em>x</em>, <em>y</em>).
*
* @param x the center <em>x</em>-coordinate of the text
* @param y the center <em>y</em>-coordinate of the text
* @param text the text to write
*/ | Write the given text string in the current font, centered at (x, y) | text | {
"repo_name": "zhouyulian17/Course",
"path": "Java/AdvancedComputerProgramming/src/seqAnalysis/StdDraw.java",
"license": "mit",
"size": 74215
} | [
"java.awt.FontMetrics"
] | import java.awt.FontMetrics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,508,254 |
public DeliverableUserPartnership
saveDeliverableUserPartnership(DeliverableUserPartnership deliverableUserPartnership);
| DeliverableUserPartnership function(DeliverableUserPartnership deliverableUserPartnership); | /**
* This method saves the information of the given deliverableUserPartnership
*
* @param deliverableUserPartnership - is the deliverableUserPartnership object with the new information to be
* added/updated.
* @return a number greater than 0 representing the new ID assigned by the database,... | This method saves the information of the given deliverableUserPartnership | saveDeliverableUserPartnership | {
"repo_name": "CCAFS/MARLO",
"path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/DeliverableUserPartnershipManager.java",
"license": "gpl-3.0",
"size": 4063
} | [
"org.cgiar.ccafs.marlo.data.model.DeliverableUserPartnership"
] | import org.cgiar.ccafs.marlo.data.model.DeliverableUserPartnership; | import org.cgiar.ccafs.marlo.data.model.*; | [
"org.cgiar.ccafs"
] | org.cgiar.ccafs; | 544,654 |
public HashMap<String, String> getMetadata() {
return this.metadata;
} | HashMap<String, String> function() { return this.metadata; } | /**
* Returns the metadata for the container. This value is initialized with the metadata from the queue by a call to
* {@link #downloadAttributes}, and is set on the queue with a call to {@link #uploadMetadata}.
*
* @return A <code>java.util.HashMap</code> object that represents the metadata for t... | Returns the metadata for the container. This value is initialized with the metadata from the queue by a call to <code>#downloadAttributes</code>, and is set on the queue with a call to <code>#uploadMetadata</code> | getMetadata | {
"repo_name": "emgerner-msft/azure-storage-android",
"path": "microsoft-azure-storage/src/com/microsoft/azure/storage/blob/CloudBlobContainer.java",
"license": "apache-2.0",
"size": 103657
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,661,759 |
private void initialize(String message, Icon messageIcon)
{
createComponents();
attachListeners();
buildGUI(message, messageIcon);
pack();
//setResizable(false);
}
public OptionsDialog(JFrame owner, String title, String message,
Icon messageIcon)
{
super(owner, title, true);
... | void function(String message, Icon messageIcon) { createComponents(); attachListeners(); buildGUI(message, messageIcon); pack(); } OptionsDialog(JFrame owner, String title, String message, Icon messageIcon) { super(owner, title, true); function(message, messageIcon); } OptionsDialog(JDialog owner, String title, String ... | /**
* Initializes the components and builds the dialog.
*
* @param message The notification message.
* @param messageIcon An optional icon to display by the message.
*/ | Initializes the components and builds the dialog | initialize | {
"repo_name": "rleigh-dundee/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/util/ui/OptionsDialog.java",
"license": "gpl-2.0",
"size": 11219
} | [
"javax.swing.Icon",
"javax.swing.JDialog",
"javax.swing.JFrame"
] | import javax.swing.Icon; import javax.swing.JDialog; import javax.swing.JFrame; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,845,345 |
protected final void addActiveCache(GridCacheContext cacheCtx, boolean recovery) throws IgniteCheckedException {
txState.addActiveCache(cacheCtx, recovery, this);
} | final void function(GridCacheContext cacheCtx, boolean recovery) throws IgniteCheckedException { txState.addActiveCache(cacheCtx, recovery, this); } | /**
* Adds cache to the list of active caches in transaction.
*
* @param cacheCtx Cache context to add.
* @throws IgniteCheckedException If caches already enlisted in this transaction are not compatible with given
* cache (e.g. they have different stores).
*/ | Adds cache to the list of active caches in transaction | addActiveCache | {
"repo_name": "WilliamDo/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java",
"license": "apache-2.0",
"size": 68152
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.processors.cache.GridCacheContext"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.GridCacheContext; | import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,387,132 |
private JPanel getJPanel1() {
if (jPanel1 == null) {
GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
gridBagConstraints12.insets = new java.awt.Insets(5, 3, 0, 5);
gridBagConstraints12.gridy = 1;
gridBagConstraints12.weightx = 1.0D;
gridBagConstraints12.weighty = 1.0D;
gridBag... | JPanel function() { if (jPanel1 == null) { GridBagConstraints gridBagConstraints12 = new GridBagConstraints(); gridBagConstraints12.insets = new java.awt.Insets(5, 3, 0, 5); gridBagConstraints12.gridy = 1; gridBagConstraints12.weightx = 1.0D; gridBagConstraints12.weighty = 1.0D; gridBagConstraints12.fill = java.awt.Gri... | /**
* This method initializes jPanel1
*
* @return javax.swing.JPanel
*/ | This method initializes jPanel1 | getJPanel1 | {
"repo_name": "NCIP/cagrid-core",
"path": "caGrid/projects/gaards-ui/src/org/cagrid/gaards/ui/common/CredentialPanel.java",
"license": "bsd-3-clause",
"size": 11391
} | [
"java.awt.GridBagConstraints",
"java.awt.GridBagLayout",
"java.awt.Insets",
"javax.swing.JPanel"
] | import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,022,566 |
void onProcessEnd(ProcessEvent event, Job job, OperationResult result) throws SchemaException, ObjectAlreadyExistsException, ObjectNotFoundException;
| void onProcessEnd(ProcessEvent event, Job job, OperationResult result) throws SchemaException, ObjectAlreadyExistsException, ObjectNotFoundException; | /**
* Handles an event from WfMS that indicates finishing of the workflow process instance.
* Usually, at this point we see what was approved (and what was not) and continue with model operation(s).
*
* Should leave the task in saved state (if finishing successfully).
*
* @param even... | Handles an event from WfMS that indicates finishing of the workflow process instance. Usually, at this point we see what was approved (and what was not) and continue with model operation(s). Should leave the task in saved state (if finishing successfully) | onProcessEnd | {
"repo_name": "gureronder/midpoint",
"path": "model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/ChangeProcessor.java",
"license": "apache-2.0",
"size": 7449
} | [
"com.evolveum.midpoint.schema.result.OperationResult",
"com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException",
"com.evolveum.midpoint.util.exception.ObjectNotFoundException",
"com.evolveum.midpoint.util.exception.SchemaException",
"com.evolveum.midpoint.wf.impl.jobs.Job",
"com.evolveum.midpoi... | import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException; import com.evolveum.midpoint.util.exception.ObjectNotFoundException; import com.evolveum.midpoint.util.exception.SchemaException; import com.evolveum.midpoint.wf.impl.jobs.Job; import co... | import com.evolveum.midpoint.schema.result.*; import com.evolveum.midpoint.util.exception.*; import com.evolveum.midpoint.wf.impl.jobs.*; import com.evolveum.midpoint.wf.impl.messages.*; | [
"com.evolveum.midpoint"
] | com.evolveum.midpoint; | 348,648 |
@ObjectiveCName("onPushReceivedWithSeq:")
public void onPushReceived(int seq) {
if (modules.getUpdatesModule() != null) {
modules.getUpdatesModule().onPushReceived(seq);
}
}
//////////////////////////////////////
// Messaging operations
/////////////////////////... | @ObjectiveCName(STR) void function(int seq) { if (modules.getUpdatesModule() != null) { modules.getUpdatesModule().onPushReceived(seq); } } | /**
* MUST be called when external push received
*
* @param seq sequence number of update
*/ | MUST be called when external push received | onPushReceived | {
"repo_name": "luoxiaoshenghustedu/actor-platform",
"path": "actor-apps/core/src/main/java/im/actor/core/Messenger.java",
"license": "mit",
"size": 52564
} | [
"com.google.j2objc.annotations.ObjectiveCName"
] | import com.google.j2objc.annotations.ObjectiveCName; | import com.google.j2objc.annotations.*; | [
"com.google.j2objc"
] | com.google.j2objc; | 48,089 |
@Value.Default
public long getBackgroundScrubFrequencyMillis() {
return AtlasDbConstants.DEFAULT_BACKGROUND_SCRUB_FREQUENCY_MILLIS;
} | @Value.Default long function() { return AtlasDbConstants.DEFAULT_BACKGROUND_SCRUB_FREQUENCY_MILLIS; } | /**
* The frequency with which the background sweeper runs to clean up
* cells that have been non-aggressively scrubbed.
*/ | The frequency with which the background sweeper runs to clean up cells that have been non-aggressively scrubbed | getBackgroundScrubFrequencyMillis | {
"repo_name": "EvilMcJerkface/atlasdb",
"path": "atlasdb-config/src/main/java/com/palantir/atlasdb/config/AtlasDbConfig.java",
"license": "apache-2.0",
"size": 16501
} | [
"com.palantir.atlasdb.AtlasDbConstants",
"org.immutables.value.Value"
] | import com.palantir.atlasdb.AtlasDbConstants; import org.immutables.value.Value; | import com.palantir.atlasdb.*; import org.immutables.value.*; | [
"com.palantir.atlasdb",
"org.immutables.value"
] | com.palantir.atlasdb; org.immutables.value; | 2,519,302 |
public void read(CommandQueue queue, ByteBuffer dest, long size) {
read(queue, dest, size, 0);
} | void function(CommandQueue queue, ByteBuffer dest, long size) { read(queue, dest, size, 0); } | /**
* Alternative version of {@link #read(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer, long, long) },
* sets {@code offset} to zero.
*/ | Alternative version of <code>#read(com.jme3.opencl.CommandQueue, java.nio.ByteBuffer, long, long) </code>, sets offset to zero | read | {
"repo_name": "phr00t/jmonkeyengine",
"path": "jme3-core/src/main/java/com/jme3/opencl/Buffer.java",
"license": "bsd-3-clause",
"size": 18278
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,146,323 |
private void setContainerLayout(
final ContainerLayoutId layoutId )
{
getTableEnvironmentModelLock().lock();
try
{
final ContainerModel containerModel = getFocusedContainerModel();
if( containerModel != null )
{
try
... | void function( final ContainerLayoutId layoutId ) { getTableEnvironmentModelLock().lock(); try { final ContainerModel containerModel = getFocusedContainerModel(); if( containerModel != null ) { try { containerModel.getComponent().setLayout( ContainerLayoutRegistry.getContainerLayout( layoutId ) ); } catch( final NoSuch... | /**
* Sets the layout of the focused container to the specified value.
*
* @param layoutId
* The identifier of the container layout.
*/ | Sets the layout of the focused container to the specified value | setContainerLayout | {
"repo_name": "gamegineer/dev",
"path": "main/table/org.gamegineer.table.ui.impl/src/org/gamegineer/table/internal/ui/impl/view/TableView.java",
"license": "gpl-3.0",
"size": 79375
} | [
"java.util.logging.Level",
"org.gamegineer.table.core.ContainerLayoutId",
"org.gamegineer.table.core.ContainerLayoutRegistry",
"org.gamegineer.table.core.NoSuchContainerLayoutException",
"org.gamegineer.table.internal.ui.impl.Loggers",
"org.gamegineer.table.internal.ui.impl.model.ContainerModel"
] | import java.util.logging.Level; import org.gamegineer.table.core.ContainerLayoutId; import org.gamegineer.table.core.ContainerLayoutRegistry; import org.gamegineer.table.core.NoSuchContainerLayoutException; import org.gamegineer.table.internal.ui.impl.Loggers; import org.gamegineer.table.internal.ui.impl.model.Containe... | import java.util.logging.*; import org.gamegineer.table.core.*; import org.gamegineer.table.internal.ui.impl.*; import org.gamegineer.table.internal.ui.impl.model.*; | [
"java.util",
"org.gamegineer.table"
] | java.util; org.gamegineer.table; | 2,212,198 |
public static Test suite() {
return new TestSuite(PassThroughTest.class);
} | static Test function() { return new TestSuite(PassThroughTest.class); } | /**
* Returns the test suite.
*
* @return the suite
*/ | Returns the test suite | suite | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/test/java/adams/data/outlier/PassThroughTest.java",
"license": "gpl-3.0",
"size": 2122
} | [
"junit.framework.Test",
"junit.framework.TestSuite"
] | import junit.framework.Test; import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 766,242 |
@Override public T visitSreequals(@NotNull PoCoParser.SreequalsContext ctx) { return visitChildren(ctx); } | @Override public T visitSreequals(@NotNull PoCoParser.SreequalsContext ctx) { return visitChildren(ctx); } | /**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/ | The default implementation returns the result of calling <code>#visitChildren</code> on ctx | visitSredisj | {
"repo_name": "Corjuh/PoCoScanner",
"path": "src/main/java/com/coryjuhlin/pocoscanner/antlr/PoCoParserBaseVisitor.java",
"license": "gpl-3.0",
"size": 13743
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,345,091 |
public void invalidate(UserData user) {
// ignored
}
| void function(UserData user) { } | /**
* A user profile has changed.
*/ | A user profile has changed | invalidate | {
"repo_name": "paulnguyen/cmpe279",
"path": "eclipse/Roller/src/org/apache/roller/ui/rendering/util/SiteWideCache.java",
"license": "apache-2.0",
"size": 11946
} | [
"org.apache.roller.pojos.UserData"
] | import org.apache.roller.pojos.UserData; | import org.apache.roller.pojos.*; | [
"org.apache.roller"
] | org.apache.roller; | 2,783,650 |
public EntityListIterator findListIteratorByCondition(Delegator delegator, ModelEntity modelEntity, EntityCondition whereEntityCondition,
EntityCondition havingEntityCondition, Collection<String> fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions)
throws GenericEntityException {
... | EntityListIterator function(Delegator delegator, ModelEntity modelEntity, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Collection<String> fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions) throws GenericEntityException { return genericDAO.selectListIteratorByCondition(d... | /** Finds GenericValues by the conditions specified in the EntityCondition object, the the EntityCondition javadoc for more details.
*@param modelEntity The ModelEntity of the Entity as defined in the entity XML file
*@param whereEntityCondition The EntityCondition object that specifies how to constrain this ... | Finds GenericValues by the conditions specified in the EntityCondition object, the the EntityCondition javadoc for more details | findListIteratorByCondition | {
"repo_name": "yuri0x7c1/ofbiz-explorer",
"path": "src/test/resources/apache-ofbiz-16.11.03/framework/entity/src/main/java/org/apache/ofbiz/entity/datasource/GenericHelperDAO.java",
"license": "apache-2.0",
"size": 10032
} | [
"java.util.Collection",
"java.util.List",
"org.apache.ofbiz.entity.Delegator",
"org.apache.ofbiz.entity.GenericEntityException",
"org.apache.ofbiz.entity.condition.EntityCondition",
"org.apache.ofbiz.entity.model.ModelEntity",
"org.apache.ofbiz.entity.util.EntityFindOptions",
"org.apache.ofbiz.entity.... | import java.util.Collection; import java.util.List; import org.apache.ofbiz.entity.Delegator; import org.apache.ofbiz.entity.GenericEntityException; import org.apache.ofbiz.entity.condition.EntityCondition; import org.apache.ofbiz.entity.model.ModelEntity; import org.apache.ofbiz.entity.util.EntityFindOptions; import o... | import java.util.*; import org.apache.ofbiz.entity.*; import org.apache.ofbiz.entity.condition.*; import org.apache.ofbiz.entity.model.*; import org.apache.ofbiz.entity.util.*; | [
"java.util",
"org.apache.ofbiz"
] | java.util; org.apache.ofbiz; | 1,782,252 |
public TWorkItem getTWorkItem(Connection connection)
throws TorqueException
{
if (aTWorkItem == null && (!ObjectUtils.equals(this.workItemID, null)))
{
aTWorkItem = TWorkItemPeer.retrieveByPK(SimpleKey.keyFor(this.workItemID), connection);
}
return aTWorkItem;... | TWorkItem function(Connection connection) throws TorqueException { if (aTWorkItem == null && (!ObjectUtils.equals(this.workItemID, null))) { aTWorkItem = TWorkItemPeer.retrieveByPK(SimpleKey.keyFor(this.workItemID), connection); } return aTWorkItem; } | /**
* Return the associated TWorkItem object
* If it was not retrieved before, the object is retrieved from
* the database using the passed connection
*
* @param connection the connection used to retrieve the associated object
* from the database, if it was not retrieved before
... | Return the associated TWorkItem object If it was not retrieved before, the object is retrieved from the database using the passed connection | getTWorkItem | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/BaseTBaseLine.java",
"license": "gpl-3.0",
"size": 33977
} | [
"com.aurel.track.persist.TWorkItem",
"com.aurel.track.persist.TWorkItemPeer",
"java.sql.Connection",
"org.apache.commons.lang.ObjectUtils",
"org.apache.torque.TorqueException",
"org.apache.torque.om.SimpleKey"
] | import com.aurel.track.persist.TWorkItem; import com.aurel.track.persist.TWorkItemPeer; import java.sql.Connection; import org.apache.commons.lang.ObjectUtils; import org.apache.torque.TorqueException; import org.apache.torque.om.SimpleKey; | import com.aurel.track.persist.*; import java.sql.*; import org.apache.commons.lang.*; import org.apache.torque.*; import org.apache.torque.om.*; | [
"com.aurel.track",
"java.sql",
"org.apache.commons",
"org.apache.torque"
] | com.aurel.track; java.sql; org.apache.commons; org.apache.torque; | 2,057,055 |
@Override
public List<Machine.Instruction> emit() {
List<Machine.Instruction> InstructionList = new LinkedList<Machine.Instruction>();
InstructionList.add(new Machine.pushConstant(value));
return InstructionList;
}
| List<Machine.Instruction> function() { List<Machine.Instruction> InstructionList = new LinkedList<Machine.Instruction>(); InstructionList.add(new Machine.pushConstant(value)); return InstructionList; } | /**
* Emit an instruction to push the value onto the stack.
* @return a list containing that one instruction
*/ | Emit an instruction to push the value onto the stack | emit | {
"repo_name": "moiseslorap/RIT",
"path": "Computer Science 2/Project1/src/perp/tree/stu/Constant.java",
"license": "mit",
"size": 1472
} | [
"java.util.LinkedList",
"java.util.List"
] | import java.util.LinkedList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 746,485 |
public void setIP(InetAddress address, long ttl) {
this.ip = address;
// Assume that a lookup as occurred by the time
// a caller decides to set this (even to null)
this.ipFetched = System.currentTimeMillis();
this.ipTTL = ttl;
if (logger.isLoggable(Level.FINE)) {
... | void function(InetAddress address, long ttl) { this.ip = address; this.ipFetched = System.currentTimeMillis(); this.ipTTL = ttl; if (logger.isLoggable(Level.FINE)) { logger.fine(hostname + STR + ((address != null)? address.toString(): "null")); } } | /**
* Set the IP address for this host.
*
* @param address
* @param ttl the TTL from the dns record in seconds or -1 if it should live
* forever (is a numeric IP).
*/ | Set the IP address for this host | setIP | {
"repo_name": "gaowangyizu/myHeritrix",
"path": "myHeritrix/src/org/archive/crawler/datamodel/CrawlHost.java",
"license": "apache-2.0",
"size": 6901
} | [
"java.net.InetAddress",
"java.util.logging.Level"
] | import java.net.InetAddress; import java.util.logging.Level; | import java.net.*; import java.util.logging.*; | [
"java.net",
"java.util"
] | java.net; java.util; | 2,877,695 |
public void close(ClientCQ cq) {
pool.getRITracker().removeCq(cq, cq.isDurable());
CloseCQOp.execute(this.pool, cq.getName());
} | void function(ClientCQ cq) { pool.getRITracker().removeCq(cq, cq.isDurable()); CloseCQOp.execute(this.pool, cq.getName()); } | /**
* Does a CQ close on all relevant servers
*
* @param cq the CQ to close on the server
*/ | Does a CQ close on all relevant servers | close | {
"repo_name": "pdxrunner/geode",
"path": "geode-cq/src/main/java/org/apache/geode/cache/client/internal/ServerCQProxyImpl.java",
"license": "apache-2.0",
"size": 3916
} | [
"org.apache.geode.cache.query.internal.cq.ClientCQ"
] | import org.apache.geode.cache.query.internal.cq.ClientCQ; | import org.apache.geode.cache.query.internal.cq.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,328,934 |
@Override
public void doSave(IProgressMonitor progressMonitor) {
// Save only resources that have actually changed.
//
final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); | void function(IProgressMonitor progressMonitor) { saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); | /**
* This is for implementing {@link IEditorPart} and simply saves the model file.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This is for implementing <code>IEditorPart</code> and simply saves the model file. | doSave | {
"repo_name": "ObeoNetwork/EAST-ADL-Designer",
"path": "plugins/org.obeonetwork.dsl.eastadl.editor/src/org/obeonetwork/dsl/east_adl/requirements/presentation/RequirementsEditor.java",
"license": "epl-1.0",
"size": 56816
} | [
"org.eclipse.core.runtime.IProgressMonitor",
"org.eclipse.emf.ecore.resource.Resource"
] | import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.ecore.resource.Resource; | import org.eclipse.core.runtime.*; import org.eclipse.emf.ecore.resource.*; | [
"org.eclipse.core",
"org.eclipse.emf"
] | org.eclipse.core; org.eclipse.emf; | 813,953 |
private synchronized void refreshCachedData() {
IOUtils.closeStream(committedTxnId);
File currentDir = storage.getSingularStorageDir().getCurrentDir();
this.lastPromisedEpoch = new PersistentLongFile(
new File(currentDir, LAST_PROMISED_FILENAME), 0);
this.lastWriterEpoch = new PersistentL... | synchronized void function() { IOUtils.closeStream(committedTxnId); File currentDir = storage.getSingularStorageDir().getCurrentDir(); this.lastPromisedEpoch = new PersistentLongFile( new File(currentDir, LAST_PROMISED_FILENAME), 0); this.lastWriterEpoch = new PersistentLongFile( new File(currentDir, LAST_WRITER_EPOCH)... | /**
* Reload any data that may have been cached. This is necessary
* when we first load the Journal, but also after any formatting
* operation, since the cached data is no longer relevant.
*/ | Reload any data that may have been cached. This is necessary when we first load the Journal, but also after any formatting operation, since the cached data is no longer relevant | refreshCachedData | {
"repo_name": "ict-carch/hadoop-plus",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java",
"license": "apache-2.0",
"size": 35340
} | [
"java.io.File",
"org.apache.hadoop.hdfs.protocol.HdfsConstants",
"org.apache.hadoop.hdfs.util.BestEffortLongFile",
"org.apache.hadoop.hdfs.util.PersistentLongFile",
"org.apache.hadoop.io.IOUtils"
] | import java.io.File; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.apache.hadoop.hdfs.util.BestEffortLongFile; import org.apache.hadoop.hdfs.util.PersistentLongFile; import org.apache.hadoop.io.IOUtils; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.util.*; import org.apache.hadoop.io.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,747,512 |
public boolean redo() {
if (!super.redo()) {
return false;
}
getDrawingView().clearSelection();
// the text figure did exist but was remove
if (!isValidText(getBackupText())) {
FigureEnumeration fe = getAffectedFigures();
while (fe.hasNextFigure()) {
getDrawingView().drawing().... | boolean function() { if (!super.redo()) { return false; } getDrawingView().clearSelection(); if (!isValidText(getBackupText())) { FigureEnumeration fe = getAffectedFigures(); while (fe.hasNextFigure()) { getDrawingView().drawing().orphan(fe.nextFigure()); } } else if (!isValidText(getOriginalText())) { FigureEnumeratio... | /**
* Redo the activity
*
* @return Description of the Return Value
*/ | Redo the activity | redo | {
"repo_name": "samskivert/jhotdraw6",
"path": "src/main/java/org/jhotdraw/contrib/TextAreaTool.java",
"license": "lgpl-2.1",
"size": 11530
} | [
"org.jhotdraw.framework.FigureEnumeration"
] | import org.jhotdraw.framework.FigureEnumeration; | import org.jhotdraw.framework.*; | [
"org.jhotdraw.framework"
] | org.jhotdraw.framework; | 1,883,074 |
public Object createObject(XMLControl control) {
return new BaselineFilter();
} | Object function(XMLControl control) { return new BaselineFilter(); } | /**
* Creates a new filter.
*
* @param control the control
* @return the new filter
*/ | Creates a new filter | createObject | {
"repo_name": "dobrown/tracker-mvn",
"path": "src/main/java/org/opensourcephysics/media/core/BaselineFilter.java",
"license": "gpl-3.0",
"size": 12573
} | [
"org.opensourcephysics.controls.XMLControl"
] | import org.opensourcephysics.controls.XMLControl; | import org.opensourcephysics.controls.*; | [
"org.opensourcephysics.controls"
] | org.opensourcephysics.controls; | 1,254,701 |
private void assertOptionsValid(int options) throws XMPException
{
int invalidOptions = options & ~getValidOptions();
if (invalidOptions == 0)
{
assertConsistency(options);
}
else
{
throw new XMPException("The option bit(s) 0x" + Integer.toHexString(invalidOptions)
+ " are invalid!", XMPError... | void function(int options) throws XMPException { int invalidOptions = options & ~getValidOptions(); if (invalidOptions == 0) { assertConsistency(options); } else { throw new XMPException(STR + Integer.toHexString(invalidOptions) + STR, XMPError.BADOPTIONS); } } | /**
* Checks options before they are set.
* First it is checked if only defined options are used,
* second the additional {@link com.adobe.xmp.options.Options#assertConsistency(int)}-method is called.
*
* @param options the options to check
* @throws XMPException Thrown if the options are invalid.
*/ | Checks options before they are set. First it is checked if only defined options are used, second the additional <code>com.adobe.xmp.options.Options#assertConsistency(int)</code>-method is called | assertOptionsValid | {
"repo_name": "kesenhoo/Camera2",
"path": "src/com/adobe/xmp/options/Options.java",
"license": "apache-2.0",
"size": 6589
} | [
"com.adobe.xmp.XMPError",
"com.adobe.xmp.XMPException"
] | import com.adobe.xmp.XMPError; import com.adobe.xmp.XMPException; | import com.adobe.xmp.*; | [
"com.adobe.xmp"
] | com.adobe.xmp; | 1,721 |
private void readParameters(final OContextConfiguration iServerConfig, final OServerParameterConfiguration[] iParameters) {
configuration = new OContextConfiguration(iServerConfig);
// SET PARAMETERS
if (iParameters != null && iParameters.length > 0) {
// CONVERT PARAMETERS IN MAP TO INTIALIZE... | void function(final OContextConfiguration iServerConfig, final OServerParameterConfiguration[] iParameters) { configuration = new OContextConfiguration(iServerConfig); if (iParameters != null && iParameters.length > 0) { for (OServerParameterConfiguration param : iParameters) configuration.setValue(param.name, param.va... | /**
* Initializes connection parameters by the reading XML configuration. If not specified, get the parameters defined as global
* configuration.
*
* @param iServerConfig
*/ | Initializes connection parameters by the reading XML configuration. If not specified, get the parameters defined as global configuration | readParameters | {
"repo_name": "cstamas/orientdb",
"path": "server/src/main/java/com/orientechnologies/orient/server/network/OServerNetworkListener.java",
"license": "apache-2.0",
"size": 13946
} | [
"com.orientechnologies.orient.core.config.OContextConfiguration",
"com.orientechnologies.orient.core.config.OGlobalConfiguration",
"com.orientechnologies.orient.server.config.OServerParameterConfiguration"
] | import com.orientechnologies.orient.core.config.OContextConfiguration; import com.orientechnologies.orient.core.config.OGlobalConfiguration; import com.orientechnologies.orient.server.config.OServerParameterConfiguration; | import com.orientechnologies.orient.core.config.*; import com.orientechnologies.orient.server.config.*; | [
"com.orientechnologies.orient"
] | com.orientechnologies.orient; | 1,279,584 |
public static java.util.List extractPatientAllergyList(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.PatientAllergyEDischargeVoCollection voCollection)
{
return extractPatientAllergyList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.PatientAllergyEDischargeVoCollection voCollection) { return extractPatientAllergyList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.core.clinical.domain.objects.PatientAllergy list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.core.clinical.domain.objects.PatientAllergy list from the value object collection | extractPatientAllergyList | {
"repo_name": "FreudianNM/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/PatientAllergyEDischargeVoAssembler.java",
"license": "agpl-3.0",
"size": 27622
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 419,945 |
void updateSubscriptions(APIIdentifier identifier, String userId, int applicationId) throws APIManagementException; | void updateSubscriptions(APIIdentifier identifier, String userId, int applicationId) throws APIManagementException; | /**
* This method is to update the subscriber.
*
* @param identifier APIIdentifier
* @param userId user id
* @param applicationId Application Id
* @throws APIManagementException if failed to update subscription
*/ | This method is to update the subscriber | updateSubscriptions | {
"repo_name": "bhathiya/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/APIConsumer.java",
"license": "apache-2.0",
"size": 44201
} | [
"org.wso2.carbon.apimgt.api.model.APIIdentifier"
] | import org.wso2.carbon.apimgt.api.model.APIIdentifier; | import org.wso2.carbon.apimgt.api.model.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 1,751,078 |
public String getCatalogNumber(ElectronicInvoiceItem item);
| String function(ElectronicInvoiceItem item); | /**
* This method defines which field out of the ElectronicInvoiceItem that the
* catalog number is coming in as
*
* @param eii ElectronicInvoiceItem we need to get the catalog number from
* @return catalog number value
*/ | This method defines which field out of the ElectronicInvoiceItem that the catalog number is coming in as | getCatalogNumber | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/purap/service/ElectronicInvoiceMappingService.java",
"license": "agpl-3.0",
"size": 4044
} | [
"org.kuali.kfs.module.purap.businessobject.ElectronicInvoiceItem"
] | import org.kuali.kfs.module.purap.businessobject.ElectronicInvoiceItem; | import org.kuali.kfs.module.purap.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 208,711 |
public void newSource( String sourcename, String filename,
boolean toLoop )
{
newSource( sourcename, filename, toLoop, new SimpleVector(0, 0, 0),
SoundSystemConfig.getDefaultAttenuation() );
} | void function( String sourcename, String filename, boolean toLoop ) { newSource( sourcename, filename, toLoop, new SimpleVector(0, 0, 0), SoundSystemConfig.getDefaultAttenuation() ); } | /**
* Creates a new non-streaming, non-priority source at the origin. Default
* values are used for attenuation.
* @param sourcename A unique identifier for this source. Two sources may not use the same sourcename.
* @param filename The name of the sound file to play at this source.
* @param toLoop Should this s... | Creates a new non-streaming, non-priority source at the origin. Default values are used for attenuation | newSource | {
"repo_name": "rekh127/Catacomb-Snatch-Reloaded",
"path": "paulscodesrc/paulscode/sound/SoundSystemJPCT.java",
"license": "mit",
"size": 154879
} | [
"com.threed.jpct.SimpleVector"
] | import com.threed.jpct.SimpleVector; | import com.threed.jpct.*; | [
"com.threed.jpct"
] | com.threed.jpct; | 2,032,449 |
List<MultifactorAuthenticationProviderBypass> getMultifactorAuthenticationProviderBypassEvaluators(); | List<MultifactorAuthenticationProviderBypass> getMultifactorAuthenticationProviderBypassEvaluators(); | /**
* Gets multifactor authentication provider bypass evaluators.
*
* @return the multifactor authentication provider bypass evaluators
*/ | Gets multifactor authentication provider bypass evaluators | getMultifactorAuthenticationProviderBypassEvaluators | {
"repo_name": "rrenomeron/cas",
"path": "api/cas-server-core-api-mfa/src/main/java/org/apereo/cas/authentication/bypass/ChainingMultifactorAuthenticationProviderBypass.java",
"license": "apache-2.0",
"size": 1386
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 455,423 |
@Deprecated
public static SkipHead skipHead(Map<String, List<Long>> targetObjects, ChildOption childOption, boolean dryRun,
List<String> startFrom, GraphModify2 request) {
return skipHead().target(targetObjects).option(childOption).dryRun(dryRun).startFrom(startFrom).request(request).build()... | static SkipHead function(Map<String, List<Long>> targetObjects, ChildOption childOption, boolean dryRun, List<String> startFrom, GraphModify2 request) { return skipHead().target(targetObjects).option(childOption).dryRun(dryRun).startFrom(startFrom).request(request).build(); } | /**
* Create a new {@link SkipHead} request.
* @param targetObjects the target objects
* @param childOption how to process child objects
* @param dryRun if this request is a dry run
* @param startFrom the classes from which to start the actual processing
* @param request the processor to u... | Create a new <code>SkipHead</code> request | skipHead | {
"repo_name": "dpwrussell/openmicroscopy",
"path": "components/blitz/src/omero/gateway/util/Requests.java",
"license": "gpl-2.0",
"size": 113616
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 532,266 |
public RowSet findRowSet( String from, int fromcopy, String to, int tocopy ) {
// Start with the transformation.
for ( int i = 0; i < rowsets.size(); i++ ) {
RowSet rs = rowsets.get( i );
if ( rs.getOriginStepName().equalsIgnoreCase( from ) && rs.getDestinationStepName().equalsIgnoreCase( to ) && ... | RowSet function( String from, int fromcopy, String to, int tocopy ) { for ( int i = 0; i < rowsets.size(); i++ ) { RowSet rs = rowsets.get( i ); if ( rs.getOriginStepName().equalsIgnoreCase( from ) && rs.getDestinationStepName().equalsIgnoreCase( to ) && rs .getOriginStepCopy() == fromcopy && rs.getDestinationStepCopy(... | /**
* Finds the RowSet between two steps (or copies of steps).
*
* @param from
* the name of the "from" step
* @param fromcopy
* the copy number of the "from" step
* @param to
* the name of the "to" step
* @param tocopy
* the copy number of the "to" step... | Finds the RowSet between two steps (or copies of steps) | findRowSet | {
"repo_name": "mdamour1976/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 199226
} | [
"org.pentaho.di.core.RowSet"
] | import org.pentaho.di.core.RowSet; | import org.pentaho.di.core.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 384,245 |
private Map<String, String> evaluateMacros(ConnectionMeta connection, SystemHttpServiceContext context,
String namespaceName) {
Map<String, String> toEvaluate = new HashMap<>();
for (String field : MACRO_FIELDS) {
toEvaluate.put(field, connection.getPropertie... | Map<String, String> function(ConnectionMeta connection, SystemHttpServiceContext context, String namespaceName) { Map<String, String> toEvaluate = new HashMap<>(); for (String field : MACRO_FIELDS) { toEvaluate.put(field, connection.getProperties().get(field)); } macroEvaluators.putIfAbsent(namespaceName, new ServiceMa... | /**
* Evaluates all the MACRO_FIELDS.
*/ | Evaluates all the MACRO_FIELDS | evaluateMacros | {
"repo_name": "data-integrations/wrangler",
"path": "wrangler-service/src/main/java/io/cdap/wrangler/service/database/DatabaseHandler.java",
"license": "apache-2.0",
"size": 25447
} | [
"io.cdap.cdap.api.service.http.SystemHttpServiceContext",
"io.cdap.wrangler.proto.connection.ConnectionMeta",
"io.cdap.wrangler.service.macro.ServiceMacroEvaluator",
"java.util.HashMap",
"java.util.Map"
] | import io.cdap.cdap.api.service.http.SystemHttpServiceContext; import io.cdap.wrangler.proto.connection.ConnectionMeta; import io.cdap.wrangler.service.macro.ServiceMacroEvaluator; import java.util.HashMap; import java.util.Map; | import io.cdap.cdap.api.service.http.*; import io.cdap.wrangler.proto.connection.*; import io.cdap.wrangler.service.macro.*; import java.util.*; | [
"io.cdap.cdap",
"io.cdap.wrangler",
"java.util"
] | io.cdap.cdap; io.cdap.wrangler; java.util; | 615,594 |
private static byte[] encodeTxxxId3Frame(String description, String value) {
byte[] id3FrameData =
TestUtil.joinByteArrays(
"TXXX".getBytes(ISO_8859_1), // ID for a 'user defined text information frame'
TestUtil.createByteArray(0, 0, 0, 0), // Frame size (set later)
Tes... | static byte[] function(String description, String value) { byte[] id3FrameData = TestUtil.joinByteArrays( "TXXX".getBytes(ISO_8859_1), TestUtil.createByteArray(0, 0, 0, 0), TestUtil.createByteArray(0, 0), TestUtil.createByteArray(0), description.getBytes(ISO_8859_1), TestUtil.createByteArray(0), value.getBytes(ISO_8859... | /**
* Builds an ID3v2 tag containing a single 'user defined text information frame' (id='TXXX') with
* {@code description} and {@code value}.
*
* <ul>
* <li><a href="http://id3.org/id3v2.4.0-structure">ID3v2 overall structure</a>
* <li><a href="http://id3.org/id3v2.4.0-frames">'user defined text i... | Builds an ID3v2 tag containing a single 'user defined text information frame' (id='TXXX') with description and value. ID3v2 overall structure 'user defined text information frame' spec (item 4.2.6) | encodeTxxxId3Frame | {
"repo_name": "superbderrick/ExoPlayer",
"path": "library/core/src/test/java/com/google/android/exoplayer2/metadata/MetadataRendererTest.java",
"license": "apache-2.0",
"size": 7859
} | [
"com.google.android.exoplayer2.testutil.TestUtil",
"com.google.android.exoplayer2.util.Assertions"
] | import com.google.android.exoplayer2.testutil.TestUtil; import com.google.android.exoplayer2.util.Assertions; | import com.google.android.exoplayer2.testutil.*; import com.google.android.exoplayer2.util.*; | [
"com.google.android"
] | com.google.android; | 1,351,452 |
public void testQuery()
{
List<Person> results = em.createNativeQuery("select * from spark_person").getResultList();
Assert.assertNotNull(results);
Assert.assertEquals(1, results.size());
validatePerson1(results.get(0));
} | void function() { List<Person> results = em.createNativeQuery(STR).getResultList(); Assert.assertNotNull(results); Assert.assertEquals(1, results.size()); validatePerson1(results.get(0)); } | /**
* Test query.
*/ | Test query | testQuery | {
"repo_name": "impetus-opensource/Kundera",
"path": "src/kundera-spark/spark-core/src/test/java/com/impetus/client/spark/tests/SparkHDFSClientTest.java",
"license": "apache-2.0",
"size": 4264
} | [
"com.impetus.client.spark.entities.Person",
"java.util.List",
"junit.framework.Assert"
] | import com.impetus.client.spark.entities.Person; import java.util.List; import junit.framework.Assert; | import com.impetus.client.spark.entities.*; import java.util.*; import junit.framework.*; | [
"com.impetus.client",
"java.util",
"junit.framework"
] | com.impetus.client; java.util; junit.framework; | 1,444,284 |
public int getPosition(View view) {
return ((RecyclerView.LayoutParams) view.getLayoutParams()).getViewPosition();
} | int function(View view) { return ((RecyclerView.LayoutParams) view.getLayoutParams()).getViewPosition(); } | /**
* Returns the adapter position of the item represented by the given View.
*
* @param view The view to query
* @return The adapter position of the item which is rendered by this View.
*/ | Returns the adapter position of the item represented by the given View | getPosition | {
"repo_name": "tasrs/XDA-One-master",
"path": "libraries/recyclerview-v7/src/main/java/android/support/v7/widget/RecyclerView.java",
"license": "gpl-3.0",
"size": 245154
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,335,579 |
private void initGui() {
this.wsdlTextField = new XBayaTextField();
this.wsdlLabel = new XBayaLabel("The EPR of the Stream Source", this.wsdlTextField);
this.descriptionTextField = new XBayaTextField();
this.descriptionLabel = new XBayaLabel("Description", this.descriptionTextField)... | void function() { this.wsdlTextField = new XBayaTextField(); this.wsdlLabel = new XBayaLabel(STR, this.wsdlTextField); this.descriptionTextField = new XBayaTextField(); this.descriptionLabel = new XBayaLabel(STR, this.descriptionTextField); this.gridPanel = new GridPanel(); this.gridPanel.add(wsdlLabel); this.gridPanel... | /**
* Initializes the GUI.
*/ | Initializes the GUI | initGui | {
"repo_name": "glahiru/airavata",
"path": "modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/graph/system/StreamSourceConfigurationDialog.java",
"license": "apache-2.0",
"size": 3845
} | [
"org.apache.airavata.xbaya.ui.widgets.GridPanel",
"org.apache.airavata.xbaya.ui.widgets.XBayaLabel",
"org.apache.airavata.xbaya.ui.widgets.XBayaTextField"
] | import org.apache.airavata.xbaya.ui.widgets.GridPanel; import org.apache.airavata.xbaya.ui.widgets.XBayaLabel; import org.apache.airavata.xbaya.ui.widgets.XBayaTextField; | import org.apache.airavata.xbaya.ui.widgets.*; | [
"org.apache.airavata"
] | org.apache.airavata; | 1,083,414 |
public void set(int i, Type type){
if (type == Type.BYTE || type == Type.SHORT || type == Type.BOOLEAN || type == Type.CHAR){
throw new AssertionViolatedException("LocalVariables do not know about '"+type+"'. Use Type.INT instead.");
}
locals[i] = type;
}
public int hashCode() { return locals.length; } | void function(int i, Type type){ if (type == Type.BYTE type == Type.SHORT type == Type.BOOLEAN type == Type.CHAR){ throw new AssertionViolatedException(STR+type+STR); } locals[i] = type; } public int hashCode() { return locals.length; } | /**
* Sets a new Type for the given local variable slot.
*/ | Sets a new Type for the given local variable slot | set | {
"repo_name": "treejames/JMD",
"path": "src/org/apache/bcel/verifier/structurals/LocalVariables.java",
"license": "mit",
"size": 6446
} | [
"org.apache.bcel.generic.Type",
"org.apache.bcel.verifier.exc.AssertionViolatedException"
] | import org.apache.bcel.generic.Type; import org.apache.bcel.verifier.exc.AssertionViolatedException; | import org.apache.bcel.generic.*; import org.apache.bcel.verifier.exc.*; | [
"org.apache.bcel"
] | org.apache.bcel; | 284,791 |
public List<SegTokenPair> getToList(int to) {
return tokenPairListTable.get(to);
}
/**
* Add a {@link SegTokenPair}
*
* @param tokenPair {@link SegTokenPair} | List<SegTokenPair> function(int to) { return tokenPairListTable.get(to); } /** * Add a {@link SegTokenPair} * * @param tokenPair {@link SegTokenPair} | /**
* Return a {@link List} of all token pairs at this offset (index of the second token)
*
* @param to index of the second token in the token pair
* @return {@link List} of token pairs.
*/ | Return a <code>List</code> of all token pairs at this offset (index of the second token) | getToList | {
"repo_name": "tokee/lucene",
"path": "contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/BiSegGraph.java",
"license": "apache-2.0",
"size": 7525
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,527,240 |
private void onObjectPropertyModified(XWikiDocument doc, ObjectDiff diff, XWikiContext context)
{
if (ObjectDiff.ACTION_PROPERTYREMOVED.equals(diff.getAction())) {
BaseObject object = doc.getOriginalDocument().getXObject(diff.getXClassReference(), diff.getNumber());
PropertyInter... | void function(XWikiDocument doc, ObjectDiff diff, XWikiContext context) { if (ObjectDiff.ACTION_PROPERTYREMOVED.equals(diff.getAction())) { BaseObject object = doc.getOriginalDocument().getXObject(diff.getXClassReference(), diff.getNumber()); PropertyInterface property = object.getField(diff.getPropName()); this.observ... | /**
* Generate object property related events.
*
* @param doc the new version of the document
* @param diff the diff entry
* @param context the XWiki context
*/ | Generate object property related events | onObjectPropertyModified | {
"repo_name": "pbondoer/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/event/XObjectEventGeneratorListener.java",
"license": "lgpl-2.1",
"size": 7494
} | [
"com.xpn.xwiki.XWikiContext",
"com.xpn.xwiki.doc.XWikiDocument",
"com.xpn.xwiki.objects.BaseObject",
"com.xpn.xwiki.objects.ObjectDiff",
"com.xpn.xwiki.objects.PropertyInterface"
] | import com.xpn.xwiki.XWikiContext; import com.xpn.xwiki.doc.XWikiDocument; import com.xpn.xwiki.objects.BaseObject; import com.xpn.xwiki.objects.ObjectDiff; import com.xpn.xwiki.objects.PropertyInterface; | import com.xpn.xwiki.*; import com.xpn.xwiki.doc.*; import com.xpn.xwiki.objects.*; | [
"com.xpn.xwiki"
] | com.xpn.xwiki; | 244,295 |
public static void resetTemplates( JSnippetFrame frame ) {
JSnippet.TEMPLATES.delete();
JSnippet.copyText( "/res/templates.txt", JSnippet.TEMPLATES );
JOptionPane.showMessageDialog( frame, "Templates reset" );
} | static void function( JSnippetFrame frame ) { JSnippet.TEMPLATES.delete(); JSnippet.copyText( STR, JSnippet.TEMPLATES ); JOptionPane.showMessageDialog( frame, STR ); } | /**
* Resets the default templates to the program's original.
*
* @param frame
* The frame.
*/ | Resets the default templates to the program's original | resetTemplates | {
"repo_name": "donofanne/jsnippet",
"path": "src/com/github/obsidianarch/jsnippet/MenuItemActions.java",
"license": "mit",
"size": 5323
} | [
"javax.swing.JOptionPane"
] | import javax.swing.JOptionPane; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 285,645 |
public RuleKeyCacheScope<V> withRecycledCache(
BuckEventBus buckEventBus, SettingsAffectingCache currentSettings) {
return new EventPostingRuleKeyCacheScope<V>(
buckEventBus, new TrackedRuleKeyCache<>(cache, new InstrumentingCacheStatsTracker())) { | RuleKeyCacheScope<V> function( BuckEventBus buckEventBus, SettingsAffectingCache currentSettings) { return new EventPostingRuleKeyCacheScope<V>( buckEventBus, new TrackedRuleKeyCache<>(cache, new InstrumentingCacheStatsTracker())) { | /**
* Provides access to a {@link RuleKeyCache} via a {@link RuleKeyCacheScope}. The {@link
* RuleKeyCacheScope} must be used with a try-resource block and does logging and cache
* invalidation both before and after being used.
*
* @return a {@link RuleKeyCacheScope} managing access to enclosed {@link Ru... | Provides access to a <code>RuleKeyCache</code> via a <code>RuleKeyCacheScope</code>. The <code>RuleKeyCacheScope</code> must be used with a try-resource block and does logging and cache invalidation both before and after being used | withRecycledCache | {
"repo_name": "zpao/buck",
"path": "src/com/facebook/buck/rules/keys/RuleKeyCacheRecycler.java",
"license": "apache-2.0",
"size": 8266
} | [
"com.facebook.buck.event.BuckEventBus",
"com.facebook.buck.util.cache.InstrumentingCacheStatsTracker"
] | import com.facebook.buck.event.BuckEventBus; import com.facebook.buck.util.cache.InstrumentingCacheStatsTracker; | import com.facebook.buck.event.*; import com.facebook.buck.util.cache.*; | [
"com.facebook.buck"
] | com.facebook.buck; | 23,942 |
public static void refreshOperatorDescriptions() {
for (OperatorDescription desc : KEYS_TO_DESCRIPTIONS.values()) {
desc.refresh();
}
} | static void function() { for (OperatorDescription desc : KEYS_TO_DESCRIPTIONS.values()) { desc.refresh(); } } | /**
* Refreshes all operator descriptions including the reloading of operator icons.
*/ | Refreshes all operator descriptions including the reloading of operator icons | refreshOperatorDescriptions | {
"repo_name": "aborg0/rapidminer-studio",
"path": "src/main/java/com/rapidminer/tools/OperatorService.java",
"license": "agpl-3.0",
"size": 36825
} | [
"com.rapidminer.operator.OperatorDescription"
] | import com.rapidminer.operator.OperatorDescription; | import com.rapidminer.operator.*; | [
"com.rapidminer.operator"
] | com.rapidminer.operator; | 2,679,707 |
private RecordReader createReader(final Schema schema, final List<GenericRow> data) {
return new RecordReader() {
int counter = 0; | RecordReader function(final Schema schema, final List<GenericRow> data) { return new RecordReader() { int counter = 0; | /**
* Record reader to generate the index segment.
*
* @param schema
* @param data
* @return
*/ | Record reader to generate the index segment | createReader | {
"repo_name": "tkao1000/pinot",
"path": "pinot-core/src/test/java/com/linkedin/pinot/query/aggregation/DefaultAggregationExecutorTest.java",
"license": "apache-2.0",
"size": 9835
} | [
"com.linkedin.pinot.common.data.Schema",
"com.linkedin.pinot.core.data.GenericRow",
"com.linkedin.pinot.core.data.readers.RecordReader",
"java.util.List"
] | import com.linkedin.pinot.common.data.Schema; import com.linkedin.pinot.core.data.GenericRow; import com.linkedin.pinot.core.data.readers.RecordReader; import java.util.List; | import com.linkedin.pinot.common.data.*; import com.linkedin.pinot.core.data.*; import com.linkedin.pinot.core.data.readers.*; import java.util.*; | [
"com.linkedin.pinot",
"java.util"
] | com.linkedin.pinot; java.util; | 67,254 |
private void writeDataToBuffer(String content) {
// If we are past the buffer threshold then we transfer the contents of the buffer to the file and start writing to the file
if ((this.responseHolder.getBuffer().length() + content.length()) > this.responseHolder.getBufferThresholdSize()) {
try {
... | void function(String content) { if ((this.responseHolder.getBuffer().length() + content.length()) > this.responseHolder.getBufferThresholdSize()) { try { File tempFile = File.createTempFile(BufferOrFileResponseHolder.TEMP_FILE_PREFIX, null, this.getDirectoryLocation()); tempFile.deleteOnExit(); this.responseHolder.setR... | /**
* Write data to buffer.
*
* @param content the content
*/ | Write data to buffer | writeDataToBuffer | {
"repo_name": "delkyd/oreva",
"path": "odata-core/src/main/java/org/odata4j/format/writer/BufferOrFileResponseWriter.java",
"license": "apache-2.0",
"size": 8396
} | [
"com.sun.jersey.core.util.ReaderWriter",
"java.io.BufferedWriter",
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStreamWriter"
] | import com.sun.jersey.core.util.ReaderWriter; import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; | import com.sun.jersey.core.util.*; import java.io.*; | [
"com.sun.jersey",
"java.io"
] | com.sun.jersey; java.io; | 1,816,502 |
public ConfigurationBuilder setUrls(@Nonnull final Collection<URL> urls) {
this.urls = Sets.newHashSet(urls);
return this;
} | ConfigurationBuilder function(@Nonnull final Collection<URL> urls) { this.urls = Sets.newHashSet(urls); return this; } | /** set the urls to be scanned
* <p>use {@link ClasspathHelper} convenient methods to get the relevant urls
* */ | set the urls to be scanned use <code>ClasspathHelper</code> convenient methods to get the relevant urls | setUrls | {
"repo_name": "mhradek/aurkitu",
"path": "aurkitu-reflections/src/main/java/com/michaelhradek/aurkitu/reflections/util/ConfigurationBuilder.java",
"license": "mit",
"size": 13537
} | [
"com.google.common.collect.Sets",
"java.util.Collection",
"javax.annotation.Nonnull"
] | import com.google.common.collect.Sets; import java.util.Collection; import javax.annotation.Nonnull; | import com.google.common.collect.*; import java.util.*; import javax.annotation.*; | [
"com.google.common",
"java.util",
"javax.annotation"
] | com.google.common; java.util; javax.annotation; | 665,598 |
EClass getRightPart(); | EClass getRightPart(); | /**
* Returns the meta object for class '{@link fr.unice.spinefm.restfuncDSL.RightPart <em>Right Part</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Right Part</em>'.
* @see fr.unice.spinefm.restfuncDSL.RightPart
* @generated
*/ | Returns the meta object for class '<code>fr.unice.spinefm.restfuncDSL.RightPart Right Part</code>'. | getRightPart | {
"repo_name": "surli/spinefm",
"path": "spinefm-restfuncDSL-root/restfuncDSL/src-gen/fr/unice/spinefm/restfuncDSL/RestfuncDSLPackage.java",
"license": "mit",
"size": 35086
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 194,883 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.