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 EnrichClause<ProcessorDefinition<Type>> pollEnrichWith(@AsEndpointUri String resourceUri, long timeout, boolean aggregateOnException) {
EnrichClause<ProcessorDefinition<Type>> clause = new EnrichClause<>(this);
pollEnrich(resourceUri, timeout, clause, aggregateOnException);
return cla... | EnrichClause<ProcessorDefinition<Type>> function(@AsEndpointUri String resourceUri, long timeout, boolean aggregateOnException) { EnrichClause<ProcessorDefinition<Type>> clause = new EnrichClause<>(this); pollEnrich(resourceUri, timeout, clause, aggregateOnException); return clause; } | /**
* The <a href="http://camel.apache.org/content-enricher.html">Content Enricher EIP</a>
* enriches an exchange with additional data obtained from a <code>resourceUri</code>
* and with an aggregation strategy created using a fluent builder using
* a {@link org.apache.camel.PollingConsumer} to po... | The Content Enricher EIP enriches an exchange with additional data obtained from a <code>resourceUri</code> and with an aggregation strategy created using a fluent builder using a <code>org.apache.camel.PollingConsumer</code> to poll the endpoint | pollEnrichWith | {
"repo_name": "dmvolod/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 177777
} | [
"org.apache.camel.builder.EnrichClause",
"org.apache.camel.spi.AsEndpointUri"
] | import org.apache.camel.builder.EnrichClause; import org.apache.camel.spi.AsEndpointUri; | import org.apache.camel.builder.*; import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,920,277 |
public PrivateKey getPrivateKey(String alias) throws Exception {
return getConfiguration().getPrivateKey(alias);
} | PrivateKey function(String alias) throws Exception { return getConfiguration().getPrivateKey(alias); } | /**
* Get the PrivateKey that should be used to sign the signature in the
* exchange using the supplied alias.
*
* @param alias the alias used to retrieve the Certificate from the keystore.
*/ | Get the PrivateKey that should be used to sign the signature in the exchange using the supplied alias | getPrivateKey | {
"repo_name": "jarst/camel",
"path": "components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureComponent.java",
"license": "apache-2.0",
"size": 14337
} | [
"java.security.PrivateKey"
] | import java.security.PrivateKey; | import java.security.*; | [
"java.security"
] | java.security; | 1,118,729 |
public TransactionConfig getTransactionConfig() {
return config;
} | TransactionConfig function() { return config; } | /**
* Returns the transaction configuration used for calling
* {@link Environment#beginTransaction}.
*
* <p>If this property is null, the default configuration is used. The
* configuration object is not cloned, and any modifications to it will
* impact subsequent transactions.</p>
*
... | Returns the transaction configuration used for calling <code>Environment#beginTransaction</code>. If this property is null, the default configuration is used. The configuration object is not cloned, and any modifications to it will impact subsequent transactions | getTransactionConfig | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/je-3.2.74/src/com/sleepycat/collections/TransactionRunner.java",
"license": "gpl-2.0",
"size": 10671
} | [
"com.sleepycat.je.TransactionConfig"
] | import com.sleepycat.je.TransactionConfig; | import com.sleepycat.je.*; | [
"com.sleepycat.je"
] | com.sleepycat.je; | 684,747 |
@GwtIncompatible("To be supported")
public CacheBuilder<K, V> ticker(Ticker ticker) {
checkState(this.ticker == null);
this.ticker = checkNotNull(ticker);
return this;
} | @GwtIncompatible(STR) CacheBuilder<K, V> function(Ticker ticker) { checkState(this.ticker == null); this.ticker = checkNotNull(ticker); return this; } | /**
* Specifies a nanosecond-precision time source for use in determining when entries should be
* expired. By default, {@link System#nanoTime} is used.
*
* <p>The primary intent of this method is to facilitate testing of caches which have been
* configured with {@link #expireAfterWrite} or {@link #expir... | Specifies a nanosecond-precision time source for use in determining when entries should be expired. By default, <code>System#nanoTime</code> is used. The primary intent of this method is to facilitate testing of caches which have been configured with <code>#expireAfterWrite</code> or <code>#expireAfterAccess</code> | ticker | {
"repo_name": "hceylan/guava",
"path": "guava/src/com/google/common/cache/CacheBuilder.java",
"license": "apache-2.0",
"size": 37542
} | [
"com.google.common.annotations.GwtIncompatible",
"com.google.common.base.Preconditions",
"com.google.common.base.Ticker"
] | import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Preconditions; import com.google.common.base.Ticker; | import com.google.common.annotations.*; import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,639,006 |
viewer = new TableViewer(this);
viewer.setLabelProvider(new FileLabelProvider());
viewer.setContentProvider(new FileContentProvider()); | viewer = new TableViewer(this); viewer.setLabelProvider(new FileLabelProvider()); viewer.setContentProvider(new FileContentProvider()); | /**
* build a new listViewer where the initial root is the second element of
* java.io.File.listRoots() if there is only one root, use this one.
*/ | build a new listViewer where the initial root is the second element of java.io.File.listRoots() if there is only one root, use this one | buildListViewer | {
"repo_name": "schiermike/syncarus",
"path": "src/net/syncarus/gui/DirSelectComposite.java",
"license": "gpl-3.0",
"size": 6577
} | [
"org.eclipse.jface.viewers.TableViewer"
] | import org.eclipse.jface.viewers.TableViewer; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 1,288,375 |
@Override
public void onBackPressed() {
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
} | void function() { Intent intent = new Intent(this, MainActivity.class); startActivity(intent); } | /**
* Enforce return to MainActivity when leaving ViewHabitListActivity.
* <p>
* This fixes the issue where clicking the back button takes a user
* back to the addNewHabitActivity that they were possibly just in.
* <p>
* https://stackoverflow.com/questions/18337536/android-overriding-onbac... | Enforce return to MainActivity when leaving ViewHabitListActivity. This fixes the issue where clicking the back button takes a user back to the addNewHabitActivity that they were possibly just in. HREF | onBackPressed | {
"repo_name": "CMPUT301F17T18/WSFMN",
"path": "app/src/main/java/com/wsfmn/view/ViewHabitListActivity.java",
"license": "mit",
"size": 3782
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 378,910 |
@Deprecated
public void writeUnknownGroup(final int fieldNumber,
final MessageLite value)
throws IOException {
writeGroup(fieldNumber, value);
} | void function(final int fieldNumber, final MessageLite value) throws IOException { writeGroup(fieldNumber, value); } | /**
* Write a group represented by an {@link UnknownFieldSet}.
*
* @deprecated UnknownFieldSet now implements MessageLite, so you can just
* call {@link #writeGroup}.
*/ | Write a group represented by an <code>UnknownFieldSet</code> | writeUnknownGroup | {
"repo_name": "Beirdo/havokmud",
"path": "libs/protobuf/java/src/main/java/com/google/protobuf/CodedOutputStream.java",
"license": "gpl-2.0",
"size": 36757
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,267,103 |
boolean exportFile( EngineMetaInterface meta, String filename ); | boolean exportFile( EngineMetaInterface meta, String filename ); | /**
* Export to a file
*
* @param meta
* the object to export
* @param filename
* the file to write to
*/ | Export to a file | exportFile | {
"repo_name": "kurtwalker/pentaho-kettle",
"path": "ui/src/main/java/org/pentaho/di/ui/spoon/SpoonPerspectiveOpenSaveInterface.java",
"license": "apache-2.0",
"size": 1838
} | [
"org.pentaho.di.core.EngineMetaInterface"
] | import org.pentaho.di.core.EngineMetaInterface; | import org.pentaho.di.core.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,053,964 |
AnimatorProxy proxy = PROXIES.get(view);
// This checks if the proxy already exists and whether it still is the animation of the given view
if (proxy == null || proxy != view.getAnimation()) {
proxy = new AnimatorProxy(view);
PROXIES.put(view, proxy);
}
return pro... | AnimatorProxy proxy = PROXIES.get(view); if (proxy == null proxy != view.getAnimation()) { proxy = new AnimatorProxy(view); PROXIES.put(view, proxy); } return proxy; } private final WeakReference<View> mView; private final Camera mCamera = new Camera(); private boolean mHasPivot; private float mAlpha = 1; private float... | /**
* Create a proxy to allow for modifying post-3.0 view properties on all
* pre-3.0 platforms. <strong>DO NOT</strong> wrap your views if you are
* using {@code ObjectAnimator} as it will handle that itself.
*
* @param view View to wrap.
* @return Proxy to post-3.0 properties.
*/ | Create a proxy to allow for modifying post-3.0 view properties on all pre-3.0 platforms. DO NOT wrap your views if you are using ObjectAnimator as it will handle that itself | wrap | {
"repo_name": "yongjiliu/MusicPlayer",
"path": "quickScroll/src/main/java/com/andraskindler/quickscroll/animation/AnimatorProxy.java",
"license": "gpl-2.0",
"size": 9516
} | [
"android.graphics.Camera",
"android.graphics.Matrix",
"android.graphics.RectF",
"android.view.View",
"java.lang.ref.WeakReference"
] | import android.graphics.Camera; import android.graphics.Matrix; import android.graphics.RectF; import android.view.View; import java.lang.ref.WeakReference; | import android.graphics.*; import android.view.*; import java.lang.ref.*; | [
"android.graphics",
"android.view",
"java.lang"
] | android.graphics; android.view; java.lang; | 1,678,444 |
protected JPanel getStatsPlotPanel()
{
return statsPlotPanel;
} | JPanel function() { return statsPlotPanel; } | /**************************************************************************
* Get the statistics plot panel
*
* @return Statistics plot panel
*************************************************************************/ | Get the statistics plot panel | getStatsPlotPanel | {
"repo_name": "CACTUS-Mission/TRAPSat",
"path": "TRAPSat_cFS/cfs/cfe/tools/perfutils-java/src/CFSPerformanceMonitor/CPMMain.java",
"license": "mit",
"size": 87834
} | [
"javax.swing.JPanel"
] | import javax.swing.JPanel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,197,554 |
public boolean hasEnoughSpaceOnPartition(String target, long size) {
try {
// new File(target).getFreeSpace() (API 9) is not working on data partition
// get directory without file
String directory = new File(target).getParent();
StatFs stat = new StatFs(dir... | boolean function(String target, long size) { try { String directory = new File(target).getParent(); StatFs stat = new StatFs(directory); long blockSize = stat.getBlockSize(); long availableBlocks = stat.getAvailableBlocks(); long availableSpace = availableBlocks * blockSize; Log.i(RootCommands.TAG, STR + target + STR +... | /**
* Check if there is enough space on partition where target is located
*
* @param size size of file to put on partition
* @param target path where to put the file
* @return true if it will fit on partition of target, false if it will not fit.
*/ | Check if there is enough space on partition where target is located | hasEnoughSpaceOnPartition | {
"repo_name": "asyan4ik/Rashr",
"path": "root-commands/src/main/java/org/sufficientlysecure/rootcommands/Toolbox.java",
"license": "gpl-3.0",
"size": 26007
} | [
"android.os.StatFs",
"java.io.File",
"org.sufficientlysecure.rootcommands.util.Log"
] | import android.os.StatFs; import java.io.File; import org.sufficientlysecure.rootcommands.util.Log; | import android.os.*; import java.io.*; import org.sufficientlysecure.rootcommands.util.*; | [
"android.os",
"java.io",
"org.sufficientlysecure.rootcommands"
] | android.os; java.io; org.sufficientlysecure.rootcommands; | 2,307,852 |
@Test
public void testAssignedToPartitionEventTime() throws Exception {
testAssignedToPartition(100000, EventTime);
} | void function() throws Exception { testAssignedToPartition(100000, EventTime); } | /**
* To test data is partitioned to the right partition with time characteristic: EventTime.
*
* <p>Producer Parallelism = 2; Kafka Partition # = 3; Consumer Parallelism = 3.
*/ | To test data is partitioned to the right partition with time characteristic: EventTime. Producer Parallelism = 2; Kafka Partition # = 3; Consumer Parallelism = 3 | testAssignedToPartitionEventTime | {
"repo_name": "tillrohrmann/flink",
"path": "flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/shuffle/KafkaShuffleITCase.java",
"license": "apache-2.0",
"size": 23424
} | [
"org.apache.flink.streaming.api.TimeCharacteristic"
] | import org.apache.flink.streaming.api.TimeCharacteristic; | import org.apache.flink.streaming.api.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,131,099 |
private BigInteger convertByteArrayToInteger(byte[] data) {
return convertByteArrayToInteger(data, 0, data.length);
} | BigInteger function(byte[] data) { return convertByteArrayToInteger(data, 0, data.length); } | /**
* This function converts a raw array of bytes to an integer value. It will
* be converted in the corresponding way to the
* {@link AudioFormat#isBigEndian()} value of the
* {@link MusicVisualizer#line} attribute.
*
* @param data
* is the array of values to be converted
* @return is the i... | This function converts a raw array of bytes to an integer value. It will be converted in the corresponding way to the <code>AudioFormat#isBigEndian()</code> value of the <code>MusicVisualizer#line</code> attribute | convertByteArrayToInteger | {
"repo_name": "stoman/MilightAPI",
"path": "src/de/toman/milight/MusicVisualizer.java",
"license": "mit",
"size": 5363
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,544,654 |
public void previousStep (View view)
{
Button next = (Button) findViewById(R.id.button_nextStep);
markersIndex--;
if (!next.isEnabled() && markersIndex != (markers.size()-1))
next.setEnabled(true);
gMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markers.get(markersIndex).getPosition(), 17));
m... | void function (View view) { Button next = (Button) findViewById(R.id.button_nextStep); markersIndex--; if (!next.isEnabled() && markersIndex != (markers.size()-1)) next.setEnabled(true); gMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markers.get(markersIndex).getPosition(), 17)); markers.get(markersIndex).showInfoWi... | /**
* If not at the first marker, moves to the previous step and shows the info window. If reaches the
* first marker, it disables itself. Also, if the next button is disabled and we're not at the last marker, it
* activates the next button.
*
* @param view button pressed
*/ | If not at the first marker, moves to the previous step and shows the info window. If reaches the first marker, it disables itself. Also, if the next button is disabled and we're not at the last marker, it activates the next button | previousStep | {
"repo_name": "domrpblcj/ToThePATHAndBack",
"path": "ToThePATHAndBack/src/com/shearosario/tothepathandback/DisplayDirectionsActivity.java",
"license": "gpl-3.0",
"size": 8296
} | [
"android.view.View",
"android.widget.Button",
"com.google.android.gms.maps.CameraUpdateFactory"
] | import android.view.View; import android.widget.Button; import com.google.android.gms.maps.CameraUpdateFactory; | import android.view.*; import android.widget.*; import com.google.android.gms.maps.*; | [
"android.view",
"android.widget",
"com.google.android"
] | android.view; android.widget; com.google.android; | 213,428 |
public static void visitPreOrder(Node node,
Visitor visitor,
Predicate<Node> traverseChildrenPred) {
visitor.visit(node);
if (traverseChildrenPred.apply(node)) {
for (Node c = node.getFirstChild(); c != null; c = c.getNext()) {
visitPreOrder(c, visitor,... | static void function(Node node, Visitor visitor, Predicate<Node> traverseChildrenPred) { visitor.visit(node); if (traverseChildrenPred.apply(node)) { for (Node c = node.getFirstChild(); c != null; c = c.getNext()) { visitPreOrder(c, visitor, traverseChildrenPred); } } } | /**
* A pre-order traversal, calling Visitor.visit for each child matching
* the predicate.
*/ | A pre-order traversal, calling Visitor.visit for each child matching the predicate | visitPreOrder | {
"repo_name": "thurday/closure-compiler",
"path": "src/com/google/javascript/jscomp/NodeUtil.java",
"license": "apache-2.0",
"size": 118862
} | [
"com.google.common.base.Predicate",
"com.google.javascript.rhino.Node"
] | import com.google.common.base.Predicate; import com.google.javascript.rhino.Node; | import com.google.common.base.*; import com.google.javascript.rhino.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 2,374,172 |
protected void showCharacter( TextPosition text )
{
boolean showCharacter = true;
if( suppressDuplicateOverlappingText )
{
showCharacter = false;
String textCharacter = text.getCharacter();
float textX = text.getX();
float textY = t... | void function( TextPosition text ) { boolean showCharacter = true; if( suppressDuplicateOverlappingText ) { showCharacter = false; String textCharacter = text.getCharacter(); float textX = text.getX(); float textY = text.getY(); List sameTextCharacters = (List)characterListMapping.get( textCharacter ); if( sameTextChar... | /**
* This will show add a character to the list of characters to be printed to
* the text file.
*
* @param text
* The description of the character to display.
*/ | This will show add a character to the list of characters to be printed to the text file | showCharacter | {
"repo_name": "LowResourceLanguages/InuktitutComputing",
"path": "Inuktitut-Java/documents/pdfboxAddition/NRC_PDFTextStripperWithFonts.java",
"license": "bsd-3-clause",
"size": 43008
} | [
"java.util.ArrayList",
"java.util.List",
"org.pdfbox.pdmodel.common.PDRectangle",
"org.pdfbox.pdmodel.interactive.pagenavigation.PDThreadBead",
"org.pdfbox.util.TextPosition"
] | import java.util.ArrayList; import java.util.List; import org.pdfbox.pdmodel.common.PDRectangle; import org.pdfbox.pdmodel.interactive.pagenavigation.PDThreadBead; import org.pdfbox.util.TextPosition; | import java.util.*; import org.pdfbox.pdmodel.common.*; import org.pdfbox.pdmodel.interactive.pagenavigation.*; import org.pdfbox.util.*; | [
"java.util",
"org.pdfbox.pdmodel",
"org.pdfbox.util"
] | java.util; org.pdfbox.pdmodel; org.pdfbox.util; | 2,077,083 |
public void testIosMultiline() throws IOException, VCardException {
InputStream inputStream = getContext().getResources().openRawResource(R.raw.v30_ios_613_multiline);
try {
VCardParser parser = new VCardParser_V30();
MockVCardInterpreter interpreter = new MockVCardInterprete... | void function() throws IOException, VCardException { InputStream inputStream = getContext().getResources().openRawResource(R.raw.v30_ios_613_multiline); try { VCardParser parser = new VCardParser_V30(); MockVCardInterpreter interpreter = new MockVCardInterpreter(); interpreter.addExpectedOrder(Order.START) .addExpected... | /**
* Test vCard containing v3.0 line continuations and with non-standard
* line terminators \r\r\n coming from iOS 6.1.3. Tests to make sure the
* parser correctly skips the extra line terminators and still
* successfully concatenates the multi-line block.
*/ | Test vCard containing v3.0 line continuations and with non-standard line terminators \r\r\n coming from iOS 6.1.3. Tests to make sure the parser correctly skips the extra line terminators and still successfully concatenates the multi-line block | testIosMultiline | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/com/android/vcard/tests/VCardParserTests.java",
"license": "gpl-3.0",
"size": 10746
} | [
"com.android.vcard.VCardParser",
"com.android.vcard.exception.VCardException",
"java.io.IOException",
"java.io.InputStream"
] | import com.android.vcard.VCardParser; import com.android.vcard.exception.VCardException; import java.io.IOException; import java.io.InputStream; | import com.android.vcard.*; import com.android.vcard.exception.*; import java.io.*; | [
"com.android.vcard",
"java.io"
] | com.android.vcard; java.io; | 688,410 |
private JTextField getTarget() {
if (target == null) {
target = new JTextField();
}
return target;
} | JTextField function() { if (target == null) { target = new JTextField(); } return target; } | /**
* This method initializes target
*
* @return javax.swing.JTextField
*/ | This method initializes target | getTarget | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/gaards-ui/src/org/cagrid/gaards/ui/dorian/federation/FederationAuditPanel.java",
"license": "bsd-3-clause",
"size": 28659
} | [
"javax.swing.JTextField"
] | import javax.swing.JTextField; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,168,451 |
public static CircularString readCircularString(ByteReader reader,
boolean hasZ, boolean hasM) {
CircularString circularString = new CircularString(hasZ, hasM);
int numPoints = reader.readInt();
for (int i = 0; i < numPoints; i++) {
Point point = readPoint(reader, hasZ, hasM);
circularString.addPoi... | static CircularString function(ByteReader reader, boolean hasZ, boolean hasM) { CircularString circularString = new CircularString(hasZ, hasM); int numPoints = reader.readInt(); for (int i = 0; i < numPoints; i++) { Point point = readPoint(reader, hasZ, hasM); circularString.addPoint(point); } return circularString; } | /**
* Read a Circular String
*
* @param reader
* @param hasZ
* @param hasM
* @return
*/ | Read a Circular String | readCircularString | {
"repo_name": "boundlessgeo/geopackage-wkb-java",
"path": "src/main/java/mil/nga/wkb/io/WkbGeometryReader.java",
"license": "mit",
"size": 10580
} | [
"mil.nga.wkb.geom.CircularString",
"mil.nga.wkb.geom.Point"
] | import mil.nga.wkb.geom.CircularString; import mil.nga.wkb.geom.Point; | import mil.nga.wkb.geom.*; | [
"mil.nga.wkb"
] | mil.nga.wkb; | 2,385,514 |
public static synchronized File getSubsonicHome() {
if (subsonicHome != null) {
return subsonicHome;
}
File home;
String overrideHome = System.getProperty("subsonic.home");
if (overrideHome != null) {
home = new File(overrideHome);
... | static synchronized File function() { if (subsonicHome != null) { return subsonicHome; } File home; String overrideHome = System.getProperty(STR); if (overrideHome != null) { home = new File(overrideHome); } else { boolean isWindows = System.getProperty(STR, STR).toLowerCase().startsWith(STR); home = isWindows ? SUBSON... | /**
* Returns the Subsonic home directory.
*
* @return The Subsonic home directory, if it exists.
* @throws RuntimeException If directory doesn't exist.
*/ | Returns the Subsonic home directory | getSubsonicHome | {
"repo_name": "Adi3000/subsonic-main",
"path": "src/main/java/net/sourceforge/subsonic/service/SettingsService.java",
"license": "gpl-3.0",
"size": 45968
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,299,156 |
public void setCommentsReview(Review rd) {
this.commentsReview = rd;
} | void function(Review rd) { this.commentsReview = rd; } | /**
* Set the Review that contains this evaluation instance as a feedback
* comments
*
* @param rd the parent
*/ | Set the Review that contains this evaluation instance as a feedback comments | setCommentsReview | {
"repo_name": "Heigvd/Wegas",
"path": "wegas-core/src/main/java/com/wegas/reviewing/persistence/evaluation/EvaluationInstance.java",
"license": "mit",
"size": 8290
} | [
"com.wegas.reviewing.persistence.Review"
] | import com.wegas.reviewing.persistence.Review; | import com.wegas.reviewing.persistence.*; | [
"com.wegas.reviewing"
] | com.wegas.reviewing; | 1,132,302 |
@Test
public void testEquals() {
UnicodeScalar str1 = new UnicodeScalar("\u0065\u0301");
UnicodeScalar str2 = new UnicodeScalar("\u00e9");
UnicodeScalar str3 = new UnicodeScalar("\u0065\u0301");
assertThat(str1, is(not(str2)));
assertThat(str1, is(str3));
} | void function() { UnicodeScalar str1 = new UnicodeScalar(STR); UnicodeScalar str2 = new UnicodeScalar(STR); UnicodeScalar str3 = new UnicodeScalar(STR); assertThat(str1, is(not(str2))); assertThat(str1, is(str3)); } | /**
* Test of equals method, of class UnicodeScalar.
*/ | Test of equals method, of class UnicodeScalar | testEquals | {
"repo_name": "enlo/jmt-projects",
"path": "jmt-core/src/test/java/info/naiv/lab/java/jmt/text/UnicodeScalarTest.java",
"license": "mit",
"size": 5331
} | [
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import org.hamcrest.Matchers; import org.junit.Assert; | import org.hamcrest.*; import org.junit.*; | [
"org.hamcrest",
"org.junit"
] | org.hamcrest; org.junit; | 374,576 |
public String getSignature(String methodName) {
MethodDeclaration methodDecl= createNewMethodDeclaration();
methodDecl.setBody(null);
String str= ASTNodes.asString(methodDecl);
return str.substring(0, str.indexOf(';'));
} | String function(String methodName) { MethodDeclaration methodDecl= createNewMethodDeclaration(); methodDecl.setBody(null); String str= ASTNodes.asString(methodDecl); return str.substring(0, str.indexOf(';')); } | /**
* Returns the signature of the new method.
*
* @param methodName the method name used for the new method
* @return the signature of the extracted method
*/ | Returns the signature of the new method | getSignature | {
"repo_name": "trylimits/Eclipse-Postfix-Code-Completion-Juno38",
"path": "juno38/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodRefactoring.java",
"license": "epl-1.0",
"size": 49334
} | [
"org.eclipse.jdt.core.dom.MethodDeclaration",
"org.eclipse.jdt.internal.corext.dom.ASTNodes"
] | import org.eclipse.jdt.core.dom.MethodDeclaration; import org.eclipse.jdt.internal.corext.dom.ASTNodes; | import org.eclipse.jdt.core.dom.*; import org.eclipse.jdt.internal.corext.dom.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 439,085 |
protected String getRootName(WFSRoot root) {
if (root instanceof WFSSnapshot) {
return WFSSnapshot.SNAPSHOTS_DIR + "/" + root.getName();
} else {
return WFSRoot.WORLDS_DIR + "/" + root.getName();
}
} | String function(WFSRoot root) { if (root instanceof WFSSnapshot) { return WFSSnapshot.SNAPSHOTS_DIR + "/" + root.getName(); } else { return WFSRoot.WORLDS_DIR + "/" + root.getName(); } } | /**
* Get the name of a root
* @param root the root to get the name of
* @return the root name
*/ | Get the name of a root | getRootName | {
"repo_name": "AsherBond/MondocosmOS",
"path": "wonderland/modules/tools/snapshot-manager/src/classes/org/jdesktop/wonderland/modules/snapshot/web/servlet/SnapshotManagerServlet.java",
"license": "agpl-3.0",
"size": 20169
} | [
"org.jdesktop.wonderland.web.wfs.WFSRoot",
"org.jdesktop.wonderland.web.wfs.WFSSnapshot"
] | import org.jdesktop.wonderland.web.wfs.WFSRoot; import org.jdesktop.wonderland.web.wfs.WFSSnapshot; | import org.jdesktop.wonderland.web.wfs.*; | [
"org.jdesktop.wonderland"
] | org.jdesktop.wonderland; | 2,549,074 |
protected Set sendOutgoingSerialized(DistributionMessage msg) {
try {
return sendOutgoing(msg);
}
catch (NotSerializableException e) {
throw new InternalGemFireException(e);
}
catch (ToDataException e) {
// exception from user code
throw e;
}
} | Set function(DistributionMessage msg) { try { return sendOutgoing(msg); } catch (NotSerializableException e) { throw new InternalGemFireException(e); } catch (ToDataException e) { throw e; } } | /**
* Send a message that is guaranteed to be serialized
* @param msg
* @return the recipients who did not receive the message
*/ | Send a message that is guaranteed to be serialized | sendOutgoingSerialized | {
"repo_name": "fengshao0907/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java",
"license": "apache-2.0",
"size": 176212
} | [
"com.gemstone.gemfire.InternalGemFireException",
"com.gemstone.gemfire.ToDataException",
"java.io.NotSerializableException",
"java.util.Set"
] | import com.gemstone.gemfire.InternalGemFireException; import com.gemstone.gemfire.ToDataException; import java.io.NotSerializableException; import java.util.Set; | import com.gemstone.gemfire.*; import java.io.*; import java.util.*; | [
"com.gemstone.gemfire",
"java.io",
"java.util"
] | com.gemstone.gemfire; java.io; java.util; | 2,508,028 |
public static Response failure(
SessionId sessionId, Throwable reason, Optional<String> screenshot) {
Response response = new Response();
response.setSessionId(sessionId != null ? sessionId.toString() : null);
response.setStatus(ERROR_CODES.toStatusCode(reason));
response.setState(ERROR_CODES.to... | static Response function( SessionId sessionId, Throwable reason, Optional<String> screenshot) { Response response = new Response(); response.setSessionId(sessionId != null ? sessionId.toString() : null); response.setStatus(ERROR_CODES.toStatusCode(reason)); response.setState(ERROR_CODES.toState(response.getStatus())); ... | /**
* Creates a response object for a failed command execution.
*
* @param sessionId ID of the session that executed the command.
* @param reason the failure reason.
* @param screenshot a base64 png screenshot to include with the failure.
* @return the new response object.
*/ | Creates a response object for a failed command execution | failure | {
"repo_name": "SevInf/IEDriver",
"path": "java/client/src/org/openqa/selenium/remote/Responses.java",
"license": "apache-2.0",
"size": 2377
} | [
"com.google.common.base.Optional",
"com.google.gson.JsonObject"
] | import com.google.common.base.Optional; import com.google.gson.JsonObject; | import com.google.common.base.*; import com.google.gson.*; | [
"com.google.common",
"com.google.gson"
] | com.google.common; com.google.gson; | 2,642,439 |
@Override // GemStoneAddition
public void putAll(Map map) {
Iterator it = map.entrySet().iterator();
for (int i = map.size(); i-- > 0;) {
Map.Entry e = (Map.Entry)it.next();
this.put(e.getKey(), e.getValue());
}
} | @Override void function(Map map) { Iterator it = map.entrySet().iterator(); for (int i = map.size(); i-- > 0;) { Map.Entry e = (Map.Entry)it.next(); this.put(e.getKey(), e.getValue()); } } | /**
* Copies the key/value mappings in <tt>map</tt> into this map.
* Note that this will be a <b>deep</b> copy, as storage is by
* primitive value.
*
* @param map a <code>Map</code> value
*/ | Copies the key/value mappings in map into this map. Note that this will be a deep copy, as storage is by primitive value | putAll | {
"repo_name": "papicella/snappy-store",
"path": "lgpl/gemfire-trove/src/main/java/com/gemstone/gnu/trove/decorator/TDoubleFloatHashMapDecorator.java",
"license": "apache-2.0",
"size": 11520
} | [
"java.util.Iterator",
"java.util.Map"
] | import java.util.Iterator; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,599,531 |
public Bundle getApplicationRestrictions() {
try {
if (mService != null) {
return mService.getApplicationRestrictions(mContext.getPackageName());
}
} catch (RemoteException re) {
Log.w(TAG, "Couldn't reach service");
}
return null;
... | Bundle function() { try { if (mService != null) { return mService.getApplicationRestrictions(mContext.getPackageName()); } } catch (RemoteException re) { Log.w(TAG, STR); } return null; } | /**
* Returns any available set of application-specific restrictions applicable
* to this application.
* @return the application restrictions as a Bundle. Returns null if there
* are no restrictions.
*/ | Returns any available set of application-specific restrictions applicable to this application | getApplicationRestrictions | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/content/RestrictionsManager.java",
"license": "gpl-3.0",
"size": 30582
} | [
"android.os.Bundle",
"android.os.RemoteException",
"android.util.Log"
] | import android.os.Bundle; import android.os.RemoteException; import android.util.Log; | import android.os.*; import android.util.*; | [
"android.os",
"android.util"
] | android.os; android.util; | 861,753 |
boolean setDatatypePropertyRange(String modelName, String propertyName,
String xsdRange) throws SessionNotFoundException, InvalidNameException;
| boolean setDatatypePropertyRange(String modelName, String propertyName, String xsdRange) throws SessionNotFoundException, InvalidNameException; | /**
* Call this method to set the range of a datatype property in the named model.
*
* @param modelName Model name
* @param propertyName Property name
* @param xsdRange XSD range fragment: string | boolean | decimal | int | long | float | double | duration | dateTime | time | date | gYearMonth | gYear | gMon... | Call this method to set the range of a datatype property in the named model | setDatatypePropertyRange | {
"repo_name": "svenefftinge/sadlos2",
"path": "com.ge.research.sadl.server/com.ge.research.sadl.server.server-api/src/main/java/com/ge/research/sadl/server/ISadlServerPE.java",
"license": "epl-1.0",
"size": 17423
} | [
"com.ge.research.sadl.reasoner.InvalidNameException",
"com.ge.research.sadl.server.SessionNotFoundException"
] | import com.ge.research.sadl.reasoner.InvalidNameException; import com.ge.research.sadl.server.SessionNotFoundException; | import com.ge.research.sadl.reasoner.*; import com.ge.research.sadl.server.*; | [
"com.ge.research"
] | com.ge.research; | 2,187,251 |
public Calendar getDateAsCalendar()
{
return ISO8601.parseDate(m_date);
}
| Calendar function() { return ISO8601.parseDate(m_date); } | /** Retrieves the entity's date entry.
* @return The date as an {@link Calendar} object.
*/ | Retrieves the entity's date entry | getDateAsCalendar | {
"repo_name": "dfki-iui/libomm",
"path": "src/de/dfki/omm/types/OMMEntity.java",
"license": "gpl-3.0",
"size": 4751
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 2,071,384 |
protected boolean init() {
for (Provider p : children) {
if (!p.init()) {
Logger.log(context.getString(R.string.error,
context.getString(R.string.auth_algorithm_failure)
));
return false;
}
running.su... | boolean function() { for (Provider p : children) { if (!p.init()) { Logger.log(context.getString(R.string.error, context.getString(R.string.auth_algorithm_failure) )); return false; } running.subscribe(p.running); } for (Task task : this) { if (task instanceof InterceptorTask && !client.interceptors.contains(task)) { c... | /**
* Initialize this Provider and it's children.
* Warning: May be called more than once!
* @return true on success, false on error
*/ | Initialize this Provider and it's children. Warning: May be called more than once | init | {
"repo_name": "TheDrHax/mosmetro-android",
"path": "app/src/main/java/pw/thedrhax/mosmetro/authenticator/Provider.java",
"license": "gpl-3.0",
"size": 11778
} | [
"pw.thedrhax.util.Logger"
] | import pw.thedrhax.util.Logger; | import pw.thedrhax.util.*; | [
"pw.thedrhax.util"
] | pw.thedrhax.util; | 1,706,003 |
public int addDisparity( GrayF32 disparity, GrayU8 mask, Se3_F64 world_to_view, DisparityParameters parameters,
Point2Transform2_F64 rectNorm_to_dispPixel,
PixelTransform<Point2D_F64> dispPixel_to_rectNorm ) {
InputSanityCheck.checkSameShape(disparity, mask);
MultiViewStereoOps.maskOutPointsInCl... | int function( GrayF32 disparity, GrayU8 mask, Se3_F64 world_to_view, DisparityParameters parameters, Point2Transform2_F64 rectNorm_to_dispPixel, PixelTransform<Point2D_F64> dispPixel_to_rectNorm ) { InputSanityCheck.checkSameShape(disparity, mask); MultiViewStereoOps.maskOutPointsInCloud(cloud.toList(), disparity, para... | /**
* Add points from the disparity image which have not been masked out.
*
* NOTE: The reason point and pixel transforms are used is that combined disparity images might include lens
* distortion.
*
* @param disparity (Input) Disparity image
* @param mask (Input,Output) Mask that specifies which points i... | Add points from the disparity image which have not been masked out. distortion | addDisparity | {
"repo_name": "lessthanoptimal/BoofCV",
"path": "main/boofcv-ip-multiview/src/main/java/boofcv/alg/mvs/CreateCloudFromDisparityImages.java",
"license": "apache-2.0",
"size": 5910
} | [
"org.ejml.UtilEjml"
] | import org.ejml.UtilEjml; | import org.ejml.*; | [
"org.ejml"
] | org.ejml; | 494,262 |
public I_DirectedLine draw(final Graphics graphic) {
Graphics2D g = (Graphics2D)graphic;
Stroke oldStroke = g.getStroke();
BasicStroke newStroke = new BasicStroke(1.0F, BasicStroke.CAP_SQUARE,
BasicStroke.JOIN_MITER, 10.0F, new float[] { fragmentLength,
intersectionLength }, 0.0F);
g.... | I_DirectedLine function(final Graphics graphic) { Graphics2D g = (Graphics2D)graphic; Stroke oldStroke = g.getStroke(); BasicStroke newStroke = new BasicStroke(1.0F, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER, 10.0F, new float[] { fragmentLength, intersectionLength }, 0.0F); g.setStroke(newStroke); g.drawLine((int)... | /**
* Draws the dashed line into the given graphic
*
* @param graphic to be drawn into
* @return line
*/ | Draws the dashed line into the given graphic | draw | {
"repo_name": "vnu-dse/rtl",
"path": "src/gui/org/tzi/use/gui/views/diagrams/util/DashedDirectedLine.java",
"license": "gpl-2.0",
"size": 4171
} | [
"java.awt.BasicStroke",
"java.awt.Graphics",
"java.awt.Graphics2D",
"java.awt.Stroke"
] | import java.awt.BasicStroke; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Stroke; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,977,480 |
public EntryRep[] nextBatch(Uuid contentsQueryUuid, Uuid entryUuid)
throws RemoteException; | EntryRep[] function(Uuid contentsQueryUuid, Uuid entryUuid) throws RemoteException; | /**
* Return the next batch of entries associated with the specified
* contents query. If the returned array is not full then the
* query is complete.
* @param contentsQueryUuid the id of the contents query
* @param entryUuid the id of the last entry in the last batch.
* If this doe... | Return the next batch of entries associated with the specified contents query. If the returned array is not full then the query is complete | nextBatch | {
"repo_name": "cdegroot/river",
"path": "src/com/sun/jini/outrigger/OutriggerServer.java",
"license": "apache-2.0",
"size": 24585
} | [
"java.rmi.RemoteException",
"net.jini.id.Uuid"
] | import java.rmi.RemoteException; import net.jini.id.Uuid; | import java.rmi.*; import net.jini.id.*; | [
"java.rmi",
"net.jini.id"
] | java.rmi; net.jini.id; | 206,976 |
final Type[] asmTypes = new Type[args.length];
for (int i = 0; i < args.length; i++) {
asmTypes[i] = getASMType(args[i]);
}
return Type.getMethodType(getASMType(type), asmTypes);
} | final Type[] asmTypes = new Type[args.length]; for (int i = 0; i < args.length; i++) { asmTypes[i] = getASMType(args[i]); } return Type.getMethodType(getASMType(type), asmTypes); } | /**
* Returns the ASM method type for the given types.
* @param type The return type of the method.
* @param args The argument types of the method.
* @return The ASM method type.
*/ | Returns the ASM method type for the given types | getASMMethodType | {
"repo_name": "jjkester/transportlanguage",
"path": "Code/src/main/java/otld/otld/jvm/ASM.java",
"license": "mit",
"size": 1841
} | [
"org.objectweb.asm.Type"
] | import org.objectweb.asm.Type; | import org.objectweb.asm.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 1,921,730 |
public DataSource replaceObject()
throws NamingException
{
if (_jndiPath.startsWith("java:"))
return (DataSource) new InitialContext().lookup(_jndiPath);
else
return (DataSource) new InitialContext().lookup("java:comp/env/" +
_jndiPath);
... | DataSource function() throws NamingException { if (_jndiPath.startsWith("java:")) return (DataSource) new InitialContext().lookup(_jndiPath); else return (DataSource) new InitialContext().lookup(STR + _jndiPath); } | /**
* Replace with the real path.
*/ | Replace with the real path | replaceObject | {
"repo_name": "dwango/quercus",
"path": "src/main/java/com/caucho/config/types/DataSourceBuilder.java",
"license": "gpl-2.0",
"size": 1807
} | [
"javax.naming.InitialContext",
"javax.naming.NamingException",
"javax.sql.DataSource"
] | import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.DataSource; | import javax.naming.*; import javax.sql.*; | [
"javax.naming",
"javax.sql"
] | javax.naming; javax.sql; | 2,484,465 |
Iterator<ICompoundNode> outEdgeIncidentNodesIterator();
| Iterator<ICompoundNode> outEdgeIncidentNodesIterator(); | /**
* Gets the incident nodes which are the in nodes to the out edge.
* @return an iterator over all the resulting adjacent out edge nodes.
*/ | Gets the incident nodes which are the in nodes to the out edge | outEdgeIncidentNodesIterator | {
"repo_name": "stumoodie/CompoundGraph",
"path": "src/uk/ac/ed/inf/graph/compound/ICompoundNode.java",
"license": "apache-2.0",
"size": 4450
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,161,155 |
public Collection<URL> getRequiredClasspaths() {
return jobInformation.getRequiredClasspathURLs();
}
// -------------------------------------------------------------------------------------------- | Collection<URL> function() { return jobInformation.getRequiredClasspathURLs(); } | /**
* Returns a list of classpaths referring to the directories/JAR files required to run this job
* @return list of classpaths referring to the directories/JAR files required to run this job
*/ | Returns a list of classpaths referring to the directories/JAR files required to run this job | getRequiredClasspaths | {
"repo_name": "DieBauer/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java",
"license": "apache-2.0",
"size": 51459
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 967,674 |
protected void insertTextBefore(Wom3Node n, String text)
{
Wom3Node prev = n.getPreviousSibling();
if (prev instanceof Wom3Text)
{
prev.setTextContent(
prev.getTextContent() + text);
}
else
{
n.getParentNode().insertBefore(text(text), n);
}
}
| void function(Wom3Node n, String text) { Wom3Node prev = n.getPreviousSibling(); if (prev instanceof Wom3Text) { prev.setTextContent( prev.getTextContent() + text); } else { n.getParentNode().insertBefore(text(text), n); } } | /**
* Inserts a <text> node in front of node {@code n}. If there is already
* a <text> node in front of {@code n}, the text is appended to that
* <text> node.
*/ | Inserts a <text> node in front of node n. If there is already a <text> node in front of n, the text is appended to that <text> node | insertTextBefore | {
"repo_name": "sweble/sweble-wom3",
"path": "sweble-wom3-swc-adapter/src/main/java/org/sweble/wom3/swcadapter/FixWomRtdBase.java",
"license": "agpl-3.0",
"size": 22519
} | [
"org.sweble.wom3.Wom3Node",
"org.sweble.wom3.Wom3Text"
] | import org.sweble.wom3.Wom3Node; import org.sweble.wom3.Wom3Text; | import org.sweble.wom3.*; | [
"org.sweble.wom3"
] | org.sweble.wom3; | 487,359 |
private void notifyConnectCompleted(ConnectionParams cp, DcFailCause cause, boolean sendAll) {
ApnContext alreadySent = null;
if (cp != null && cp.mOnCompletedMsg != null) {
// Get the completed message but only use it once
Message connectionCompletedMsg = cp.mOnCompletedMsg... | void function(ConnectionParams cp, DcFailCause cause, boolean sendAll) { ApnContext alreadySent = null; if (cp != null && cp.mOnCompletedMsg != null) { Message connectionCompletedMsg = cp.mOnCompletedMsg; cp.mOnCompletedMsg = null; if (connectionCompletedMsg.obj instanceof ApnContext) { alreadySent = (ApnContext)connec... | /**
* Send the connectionCompletedMsg.
*
* @param cp is the ConnectionParams
* @param cause and if no error the cause is DcFailCause.NONE
* @param sendAll is true if all contexts are to be notified
*/ | Send the connectionCompletedMsg | notifyConnectCompleted | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/com/android/internal/telephony/dataconnection/DataConnection.java",
"license": "apache-2.0",
"size": 73222
} | [
"android.os.AsyncResult",
"android.os.Message",
"com.android.internal.telephony.DctConstants"
] | import android.os.AsyncResult; import android.os.Message; import com.android.internal.telephony.DctConstants; | import android.os.*; import com.android.internal.telephony.*; | [
"android.os",
"com.android.internal"
] | android.os; com.android.internal; | 2,433,881 |
@Test
public void testDeleteReaderStates() throws Exception
{
ContentStore store = getStore();
ContentWriter writer = getWriter();
String content = "Content for testDeleteReaderStates";
String contentUrl = writer.getContentUrl();
// write some bytes... | void function() throws Exception { ContentStore store = getStore(); ContentWriter writer = getWriter(); String content = STR; String contentUrl = writer.getContentUrl(); OutputStream os = writer.getContentOutputStream(); os.write(content.getBytes()); os.flush(); os.close(); ContentReader reader = store.getReader(conten... | /**
* Tests deletion of content.
* <p>
* Only applies when {@link #getStore()} returns a value.
*/ | Tests deletion of content. Only applies when <code>#getStore()</code> returns a value | testDeleteReaderStates | {
"repo_name": "Alfresco/alfresco-repository",
"path": "src/test/java/org/alfresco/repo/content/AbstractWritableContentStoreTest.java",
"license": "lgpl-3.0",
"size": 28434
} | [
"java.io.InputStream",
"java.io.OutputStream",
"org.alfresco.service.cmr.repository.ContentIOException",
"org.alfresco.service.cmr.repository.ContentReader",
"org.alfresco.service.cmr.repository.ContentWriter",
"org.junit.Assert"
] | import java.io.InputStream; import java.io.OutputStream; import org.alfresco.service.cmr.repository.ContentIOException; import org.alfresco.service.cmr.repository.ContentReader; import org.alfresco.service.cmr.repository.ContentWriter; import org.junit.Assert; | import java.io.*; import org.alfresco.service.cmr.repository.*; import org.junit.*; | [
"java.io",
"org.alfresco.service",
"org.junit"
] | java.io; org.alfresco.service; org.junit; | 592,407 |
static public List<String> findWordDifference(FiniteAutomaton a1, FiniteAutomaton a2) {
return findAcceptedWord(minimize(getDifferenceAutomaton(a1, a2)));
} | static List<String> function(FiniteAutomaton a1, FiniteAutomaton a2) { return findAcceptedWord(minimize(getDifferenceAutomaton(a1, a2))); } | /**
* Find a word that is only accepted by one of the automatons.
* @param a1 The first automaton to test with
* @param a2 The second automaton to test with
* @return A word that is only accepted by one of the automatons
*/ | Find a word that is only accepted by one of the automatons | findWordDifference | {
"repo_name": "CvO-Theory/apt",
"path": "src/lib/uniol/apt/adt/automaton/FiniteAutomatonUtility.java",
"license": "gpl-2.0",
"size": 47021
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,265,870 |
public void writeBasedOnFeatureFile(File featureFile) throws IOException; | void function(File featureFile) throws IOException; | /**
* Write an appropriately named and located Index file based on the name and location of the featureFile.
* If featureFile is not a normal file, the index will silently not be written.
* @param featureFile
*/ | Write an appropriately named and located Index file based on the name and location of the featureFile. If featureFile is not a normal file, the index will silently not be written | writeBasedOnFeatureFile | {
"repo_name": "xubo245/CloudSW",
"path": "src/main/java/htsjdk/tribble/index/Index.java",
"license": "gpl-2.0",
"size": 3387
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,454,791 |
public boolean initialize() {
// For API level 18 and above, get a reference to BluetoothAdapter through
// BluetoothManager.
if (mBluetoothManager == null) {
mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
if (mBluetoothManager == ... | boolean function() { if (mBluetoothManager == null) { mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE); if (mBluetoothManager == null) { Log.e(TAG, STR); return false; } } mBluetoothAdapter = mBluetoothManager.getAdapter(); if (mBluetoothAdapter == null) { Log.e(TAG, STR); return false... | /**
* Initializes a reference to the local Bluetooth adapter.
*
* @return Return true if the initialization is successful.
*/ | Initializes a reference to the local Bluetooth adapter | initialize | {
"repo_name": "yasseraboelsaad/FindMyFriends",
"path": "Find_My_Friends/src/main/java/com/bachelorproject/yasser/findmyfriends/services/BluetoothLeService.java",
"license": "apache-2.0",
"size": 11111
} | [
"android.bluetooth.BluetoothManager",
"android.content.Context",
"android.util.Log"
] | import android.bluetooth.BluetoothManager; import android.content.Context; import android.util.Log; | import android.bluetooth.*; import android.content.*; import android.util.*; | [
"android.bluetooth",
"android.content",
"android.util"
] | android.bluetooth; android.content; android.util; | 408,217 |
public void setRightArrow(Shape arrow) {
ParamChecks.nullNotPermitted(arrow, "arrow");
this.rightArrow = arrow;
fireChangeEvent();
}
| void function(Shape arrow) { ParamChecks.nullNotPermitted(arrow, "arrow"); this.rightArrow = arrow; fireChangeEvent(); } | /**
* Sets the shape that can be displayed as an arrow pointing rightwards at
* the end of an axis line and sends an {@link AxisChangeEvent} to all
* registered listeners.
*
* @param arrow the arrow shape (<code>null</code> not permitted).
*
* @see #getRightArrow()
*/ | Sets the shape that can be displayed as an arrow pointing rightwards at the end of an axis line and sends an <code>AxisChangeEvent</code> to all registered listeners | setRightArrow | {
"repo_name": "Mr-Steve/LTSpice_Library_Manager",
"path": "libs/jfreechart-1.0.16/source/org/jfree/chart/axis/ValueAxis.java",
"license": "gpl-2.0",
"size": 60039
} | [
"java.awt.Shape",
"org.jfree.chart.util.ParamChecks"
] | import java.awt.Shape; import org.jfree.chart.util.ParamChecks; | import java.awt.*; import org.jfree.chart.util.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 2,684,829 |
public CommandLineConfig setLoggingLevel(String loggingLevel) {
this.loggingLevel = loggingLevel;
return this;
}
private final List<String> externs = new ArrayList<>(); | CommandLineConfig function(String loggingLevel) { this.loggingLevel = loggingLevel; return this; } private final List<String> externs = new ArrayList<>(); | /**
* The logging level (standard java.util.logging.Level values) for Compiler progress. Does not
* control errors or warnings for the JavaScript code under compilation
*/ | The logging level (standard java.util.logging.Level values) for Compiler progress. Does not control errors or warnings for the JavaScript code under compilation | setLoggingLevel | {
"repo_name": "monetate/closure-compiler",
"path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java",
"license": "apache-2.0",
"size": 111958
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,393,492 |
public String compile(String input, String name) throws LessException {
File tempFile = null;
try {
tempFile = File.createTempFile("tmp", "less.tmp");
FileUtils.writeStringToFile(tempFile, input, this.encoding);
return compile( tempFile, name);
} catch (I... | String function(String input, String name) throws LessException { File tempFile = null; try { tempFile = File.createTempFile("tmp", STR); FileUtils.writeStringToFile(tempFile, input, this.encoding); return compile( tempFile, name); } catch (IOException e) { throw new LessException(e); } finally { tempFile.delete(); } } | /**
* Compiles the LESS input <code>String</code> to CSS, but specifies the source name <code>String</code>.
*
* @param input The LESS input <code>String</code> to compile
* @param name The source's name <code>String</code> to provide better error messages.
* @return the CSS.
*
* @thr... | Compiles the LESS input <code>String</code> to CSS, but specifies the source name <code>String</code> | compile | {
"repo_name": "jesse-gallagher/xspless",
"path": "less-test/Code/Java/org/lesscss/LessCompiler.java",
"license": "apache-2.0",
"size": 19603
} | [
"java.io.File",
"java.io.IOException",
"org.apache.commons.io.FileUtils"
] | import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; | import java.io.*; import org.apache.commons.io.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 2,664,479 |
protected void logErrors() {
if (LOG.isInfoEnabled()) {
if (GlobalVariables.getMessageMap().hasErrors()) {
for (Iterator<Map.Entry<String, List<ErrorMessage>>> i =
GlobalVariables.getMessageMap().getAllPropertiesAndErrors().iterator(); i.hasNext... | void function() { if (LOG.isInfoEnabled()) { if (GlobalVariables.getMessageMap().hasErrors()) { for (Iterator<Map.Entry<String, List<ErrorMessage>>> i = GlobalVariables.getMessageMap().getAllPropertiesAndErrors().iterator(); i.hasNext(); ) { Map.Entry<String, List<ErrorMessage>> e = i.next(); StringBuffer logMessage = ... | /**
* This method logs errors.
*/ | This method logs errors | logErrors | {
"repo_name": "mztaylor/rice-git",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/document/DocumentBase.java",
"license": "apache-2.0",
"size": 31147
} | [
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"org.kuali.rice.krad.util.ErrorMessage",
"org.kuali.rice.krad.util.GlobalVariables"
] | import java.util.Iterator; import java.util.List; import java.util.Map; import org.kuali.rice.krad.util.ErrorMessage; import org.kuali.rice.krad.util.GlobalVariables; | import java.util.*; import org.kuali.rice.krad.util.*; | [
"java.util",
"org.kuali.rice"
] | java.util; org.kuali.rice; | 572,031 |
public boolean isStable() {
final Map positions = barycentricPlacement();
final Set seen = new HashSet();
for (final Iterator iter = nodes(); iter.hasNext();) {
final Point p = (Point) positions.get(iter.next());
final Real x[] = new Real[p.getDimension()];
... | boolean function() { final Map positions = barycentricPlacement(); final Set seen = new HashSet(); for (final Iterator iter = nodes(); iter.hasNext();) { final Point p = (Point) positions.get(iter.next()); final Real x[] = new Real[p.getDimension()]; for (int i = 0; i < p.getDimension(); ++i) { x[i] = (Real) p.get(i).m... | /**
* Checks if this graph is stable, meaning that no two nodes have the same
* positions in a barycentric placement.
*
* @return true if the graph is stable.
*/ | Checks if this graph is stable, meaning that no two nodes have the same positions in a barycentric placement | isStable | {
"repo_name": "BackupTheBerlios/gavrog",
"path": "src/org/gavrog/joss/pgraphs/basic/PeriodicGraph.java",
"license": "apache-2.0",
"size": 79927
} | [
"java.util.HashSet",
"java.util.Iterator",
"java.util.Map",
"java.util.Set",
"org.gavrog.jane.numbers.Real",
"org.gavrog.jane.numbers.Whole",
"org.gavrog.joss.geometry.Point"
] | import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; import org.gavrog.jane.numbers.Real; import org.gavrog.jane.numbers.Whole; import org.gavrog.joss.geometry.Point; | import java.util.*; import org.gavrog.jane.numbers.*; import org.gavrog.joss.geometry.*; | [
"java.util",
"org.gavrog.jane",
"org.gavrog.joss"
] | java.util; org.gavrog.jane; org.gavrog.joss; | 334,607 |
@Nonnull
public ApiFuture<WriteResult> set(@Nonnull Map<String, Object> fields) {
WriteBatch writeBatch = firestore.batch();
return extractFirst(writeBatch.set(this, fields).commit());
} | ApiFuture<WriteResult> function(@Nonnull Map<String, Object> fields) { WriteBatch writeBatch = firestore.batch(); return extractFirst(writeBatch.set(this, fields).commit()); } | /**
* Overwrites the document referred to by this DocumentReference. If no document exists yet, it
* will be created. If a document already exists, it will be overwritten.
*
* @param fields A map of the fields and values for the document.
* @return An ApiFuture that will be resolved when the write finish... | Overwrites the document referred to by this DocumentReference. If no document exists yet, it will be created. If a document already exists, it will be overwritten | set | {
"repo_name": "mbrukman/gcloud-java",
"path": "google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentReference.java",
"license": "apache-2.0",
"size": 16464
} | [
"com.google.api.core.ApiFuture",
"java.util.Map",
"javax.annotation.Nonnull"
] | import com.google.api.core.ApiFuture; import java.util.Map; import javax.annotation.Nonnull; | import com.google.api.core.*; import java.util.*; import javax.annotation.*; | [
"com.google.api",
"java.util",
"javax.annotation"
] | com.google.api; java.util; javax.annotation; | 2,537,628 |
private static List<String> getOutputLines(final ByteArrayOutputStream os)
throws Exception
{
final ArrayList<String> lines = new ArrayList<String>(10);
final BufferedReader reader = new BufferedReader(new InputStreamReader(
new ByteArrayInputStream(os.toByteArray())));
while (true)... | static List<String> function(final ByteArrayOutputStream os) throws Exception { final ArrayList<String> lines = new ArrayList<String>(10); final BufferedReader reader = new BufferedReader(new InputStreamReader( new ByteArrayInputStream(os.toByteArray()))); while (true) { final String line = reader.readLine(); if (line ... | /**
* Retrieves the lines of output written to the provided output stream.
*
* @param os The output stream to process.
*
* @return The lines of output written to the provided output stream.
*
* @throws Exception If an unexpected problem occurs.
*/ | Retrieves the lines of output written to the provided output stream | getOutputLines | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/tools/TabDelimitedLDAPSearchOutputHandlerTestCase.java",
"license": "gpl-2.0",
"size": 18369
} | [
"java.io.BufferedReader",
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"java.io.InputStreamReader",
"java.util.ArrayList",
"java.util.List"
] | import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,740,153 |
private void stackGraphics(LayoutType stackType, List<Graphics> gs)
{
// first we sort the selected graphics, either horizontally or vertically
switch (stackType)
{
case STACK_CENTERX:
case STACK_LEFT:
case STACK_RIGHT:
Collections.sort(gs, new YComparator());
break;
case STACK_CENTERY:
case S... | void function(LayoutType stackType, List<Graphics> gs) { switch (stackType) { case STACK_CENTERX: case STACK_LEFT: case STACK_RIGHT: Collections.sort(gs, new YComparator()); break; case STACK_CENTERY: case STACK_TOP: case STACK_BOTTOM: Collections.sort(gs, new XComparator()); break; default: throw new IllegalArgumentEx... | /**
* Stacks a set of objects based on user-selected stack type
*/ | Stacks a set of objects based on user-selected stack type | stackGraphics | {
"repo_name": "egonw/pathvisio",
"path": "modules/org.pathvisio.core/src/org/pathvisio/core/view/VPathway.java",
"license": "apache-2.0",
"size": 71730
} | [
"java.awt.geom.Rectangle2D",
"java.util.Collections",
"java.util.List"
] | import java.awt.geom.Rectangle2D; import java.util.Collections; import java.util.List; | import java.awt.geom.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 1,591,782 |
public void assertPathHasBeenCleared(String path) throws Exception {
assertPathHasBeenCleared(PathUtils.get(path));
} | void function(String path) throws Exception { assertPathHasBeenCleared(PathUtils.get(path)); } | /**
* Asserts that there are no files in the specified path
*/ | Asserts that there are no files in the specified path | assertPathHasBeenCleared | {
"repo_name": "davidvgalbraith/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java",
"license": "apache-2.0",
"size": 24483
} | [
"org.elasticsearch.common.io.PathUtils"
] | import org.elasticsearch.common.io.PathUtils; | import org.elasticsearch.common.io.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 184,859 |
@Test
public void testRegionObserverCompactionTimeStacking() throws Exception {
// setup a mini cluster so we can do a real compaction on a region
Configuration conf = UTIL.getConfiguration();
conf.setClass(HConstants.REGION_IMPL, CompactionCompletionNotifyingRegion.class, HRegion.class);
conf.setIn... | void function() throws Exception { Configuration conf = UTIL.getConfiguration(); conf.setClass(HConstants.REGION_IMPL, CompactionCompletionNotifyingRegion.class, HRegion.class); conf.setInt(STR, 2); UTIL.startMiniCluster(); byte[] ROW = Bytes.toBytes(STR); byte[] A = Bytes.toBytes("A"); HTableDescriptor desc = new HTab... | /**
* Unfortunately, the easiest way to test this is to spin up a mini-cluster since we want to do
* the usual compaction mechanism on the region, rather than going through the backdoor to the
* region
*/ | Unfortunately, the easiest way to test this is to spin up a mini-cluster since we want to do the usual compaction mechanism on the region, rather than going through the backdoor to the region | testRegionObserverCompactionTimeStacking | {
"repo_name": "JingchengDu/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverScannerOpenHook.java",
"license": "apache-2.0",
"size": 13931
} | [
"java.util.List",
"java.util.concurrent.CountDownLatch",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.Coprocessor",
"org.apache.hadoop.hbase.HColumnDescriptor",
"org.apache.hadoop.hbase.HConstants",
"org.apache.hadoop.hbase.HTableDescriptor",
"org.apache.hadoop.hbase.TableName",
... | import java.util.List; import java.util.concurrent.CountDownLatch; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.Coprocessor; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hado... | import java.util.*; import java.util.concurrent.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.util.*; import org.junit.*; | [
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.util; org.apache.hadoop; org.junit; | 197,622 |
public void consumeAsync(List<IabPurchase> purchases, OnConsumeMultiFinishedListener listener) {
checkSetupDoneAndThrow("consume");
consumeAsyncInternal(purchases, null, listener);
} | void function(List<IabPurchase> purchases, OnConsumeMultiFinishedListener listener) { checkSetupDoneAndThrow(STR); consumeAsyncInternal(purchases, null, listener); } | /**
* Same as {@link #consumeAsync}, but for multiple items at once.
* @param purchases The list of PurchaseInfo objects representing the purchases to consume.
* @param listener The listener to notify when the consumption operation finishes.
*/ | Same as <code>#consumeAsync</code>, but for multiple items at once | consumeAsync | {
"repo_name": "Marneus68/android-store-nokia-store",
"path": "src/com/soomla/store/billing/nokia/NokiaIabHelper.java",
"license": "mit",
"size": 32501
} | [
"com.soomla.store.billing.IabPurchase",
"java.util.List"
] | import com.soomla.store.billing.IabPurchase; import java.util.List; | import com.soomla.store.billing.*; import java.util.*; | [
"com.soomla.store",
"java.util"
] | com.soomla.store; java.util; | 819,364 |
@Test
public void testErrorMappedProvider() throws Exception {
HttpDelete postMethod = new HttpDelete(mappedUri + "/-99999");
HttpResponse resp = client.execute(postMethod);
assertEquals(453, resp.getStatusLine().getStatusCode());
CommentError c = (CommentError) JAXBContext.new... | void function() throws Exception { HttpDelete postMethod = new HttpDelete(mappedUri + STR); HttpResponse resp = client.execute(postMethod); assertEquals(453, resp.getStatusLine().getStatusCode()); CommentError c = (CommentError) JAXBContext.newInstance(CommentError.class.getPackage().getName()).createUnmarshaller().unm... | /**
* Tests a method that throws an error.
*
* @throws Exception
*/ | Tests a method that throws an error | testErrorMappedProvider | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.jaxrs.2.0_fat/fat/src/com/ibm/ws/jaxrs20/fat/exceptionmappers/ExceptionMappersTest.java",
"license": "epl-1.0",
"size": 28476
} | [
"com.ibm.ws.jaxrs.fat.exceptionmappers.mapped.CommentError",
"javax.xml.bind.JAXBContext",
"org.apache.http.HttpResponse",
"org.apache.http.client.methods.HttpDelete",
"org.junit.Assert"
] | import com.ibm.ws.jaxrs.fat.exceptionmappers.mapped.CommentError; import javax.xml.bind.JAXBContext; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpDelete; import org.junit.Assert; | import com.ibm.ws.jaxrs.fat.exceptionmappers.mapped.*; import javax.xml.bind.*; import org.apache.http.*; import org.apache.http.client.methods.*; import org.junit.*; | [
"com.ibm.ws",
"javax.xml",
"org.apache.http",
"org.junit"
] | com.ibm.ws; javax.xml; org.apache.http; org.junit; | 1,633,358 |
public void addBin(HistogramBin bin) {
// check that the new bin doesn't overlap with any existing bin
for (HistogramBin existingBin : this.bins) {
if (bin.overlapsWith(existingBin)) {
throw new RuntimeException("Overlapping bin");
}
}
t... | void function(HistogramBin bin) { for (HistogramBin existingBin : this.bins) { if (bin.overlapsWith(existingBin)) { throw new RuntimeException(STR); } } this.bins.add(bin); Collections.sort(this.bins); } | /**
* Adds a bin to the dataset. An exception is thrown if the bin overlaps
* with any existing bin in the dataset.
*
* @param bin the bin ({@code null} not permitted).
*
* @see #removeAllBins()
*/ | Adds a bin to the dataset. An exception is thrown if the bin overlaps with any existing bin in the dataset | addBin | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/main/java/org/jfree/data/statistics/HistogramDataset.java",
"license": "lgpl-2.1",
"size": 14647
} | [
"java.util.Collections"
] | import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 1,523,787 |
protected void updateNotification (JSONObject settings) {
boolean isSilent = settings.optBoolean("silent", false);
if (isSilent) {
stopForeground(true);
return;
}
Notification notification = makeNotification(settings);
getNotificationManager().notify... | void function (JSONObject settings) { boolean isSilent = settings.optBoolean(STR, false); if (isSilent) { stopForeground(true); return; } Notification notification = makeNotification(settings); getNotificationManager().notify(NOTIFICATION_ID, notification); } | /**
* Update the notification.
*
* @param settings The config settings
*/ | Update the notification | updateNotification | {
"repo_name": "zoko7677/cordova-plugin-runagain",
"path": "src/android/ForegroundService.java",
"license": "apache-2.0",
"size": 8428
} | [
"android.app.Notification",
"org.json.JSONObject"
] | import android.app.Notification; import org.json.JSONObject; | import android.app.*; import org.json.*; | [
"android.app",
"org.json"
] | android.app; org.json; | 2,170,005 |
public GraphNode set(Color color) {
if (this.color != color && color != null) {
this.color = color;
updown = (-1);
}
return this;
} | GraphNode function(Color color) { if (this.color != color && color != null) { this.color = color; updown = (-1); } return this; } | /**
* Changes the node color, then invalidate the computed bounds.
*/ | Changes the node color, then invalidate the computed bounds | set | {
"repo_name": "AlloyTools/org.alloytools.alloy",
"path": "org.alloytools.alloy.application/src/main/java/edu/mit/csail/sdg/alloy4graph/GraphNode.java",
"license": "apache-2.0",
"size": 35459
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 138,643 |
public void batchUpdateWebData(Set<WebDataSong> songs);
| void function(Set<WebDataSong> songs); | /**
* Updates the web data for all given songs.
*
* @param songs
* The songs whose web data should be updated.
*/ | Updates the web data for all given songs | batchUpdateWebData | {
"repo_name": "kuhnmi/jukefox",
"path": "JukefoxModel/src/ch/ethz/dcg/jukefox/data/db/IDbDataPortal.java",
"license": "gpl-3.0",
"size": 17535
} | [
"ch.ethz.dcg.jukefox.model.libraryimport.WebDataSong",
"java.util.Set"
] | import ch.ethz.dcg.jukefox.model.libraryimport.WebDataSong; import java.util.Set; | import ch.ethz.dcg.jukefox.model.libraryimport.*; import java.util.*; | [
"ch.ethz.dcg",
"java.util"
] | ch.ethz.dcg; java.util; | 112,198 |
@Override
public Adapter createXQueryVariableAdapter() {
if (xQueryVariableItemProvider == null) {
xQueryVariableItemProvider = new XQueryVariableItemProvider(this);
}
return xQueryVariableItemProvider;
}
protected CalloutMediatorItemProvider calloutMediatorIte... | Adapter function() { if (xQueryVariableItemProvider == null) { xQueryVariableItemProvider = new XQueryVariableItemProvider(this); } return xQueryVariableItemProvider; } protected CalloutMediatorItemProvider calloutMediatorItemProvider; | /**
* This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.XQueryVariable}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.XQueryVariable</code>. | createXQueryVariableAdapter | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 339597
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,300,479 |
public static boolean oci_set_prefetch(Env env,
@NotNull OracleStatement stmt,
@Optional("1") int rows)
{
try {
if (stmt == null)
return false;
PreparedStatement pstmt = stmt.getPreparedStatement();
pst... | static boolean function(Env env, @NotNull OracleStatement stmt, @Optional("1") int rows) { try { if (stmt == null) return false; PreparedStatement pstmt = stmt.getPreparedStatement(); pstmt.setFetchSize(rows); return true; } catch (Exception e) { env.warning(e); return false; } } | /**
* Sets number of rows to be prefetched
*/ | Sets number of rows to be prefetched | oci_set_prefetch | {
"repo_name": "smba/oak",
"path": "quercus/src/main/java/com/caucho/quercus/lib/db/OracleModule.java",
"license": "lgpl-3.0",
"size": 62182
} | [
"com.caucho.quercus.annotation.NotNull",
"com.caucho.quercus.annotation.Optional",
"com.caucho.quercus.env.Env",
"java.sql.PreparedStatement"
] | import com.caucho.quercus.annotation.NotNull; import com.caucho.quercus.annotation.Optional; import com.caucho.quercus.env.Env; import java.sql.PreparedStatement; | import com.caucho.quercus.annotation.*; import com.caucho.quercus.env.*; import java.sql.*; | [
"com.caucho.quercus",
"java.sql"
] | com.caucho.quercus; java.sql; | 1,972,741 |
PauseAodOperation buildPauseAodOperation();
| PauseAodOperation buildPauseAodOperation(); | /**
* It creates a pause AOD operation.
* @return the operation created
*/ | It creates a pause AOD operation | buildPauseAodOperation | {
"repo_name": "vikingbrain/thedavidbox-client4j",
"path": "src/main/java/com/vikingbrain/nmt/client/modules/ModulePlayback.java",
"license": "apache-2.0",
"size": 11971
} | [
"com.vikingbrain.nmt.operations.playback.PauseAodOperation"
] | import com.vikingbrain.nmt.operations.playback.PauseAodOperation; | import com.vikingbrain.nmt.operations.playback.*; | [
"com.vikingbrain.nmt"
] | com.vikingbrain.nmt; | 2,506,849 |
public Map<String,List<String>> getInputMap(); | Map<String,List<String>> function(); | /**
* returns a map of all inputs for all response_xxx. response_xxx are keys that
* have corresponding Lists of Strings with the answers for that response_xxx
* @return
*/ | returns a map of all inputs for all response_xxx. response_xxx are keys that have corresponding Lists of Strings with the answers for that response_xxx | getInputMap | {
"repo_name": "stevenhva/InfoLearn_OpenOLAT",
"path": "src/main/java/org/olat/ims/qti/container/ItemInput.java",
"license": "apache-2.0",
"size": 2222
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,585,272 |
public void addFileset(FileSet set) {
filesets.addElement(set);
} | void function(FileSet set) { filesets.addElement(set); } | /**
* Reads <code>fileset</code> elements.
*
* <p><code>fileset</code> elements can be used when there are many files
* to be rasterized.</p>
*
* @param set <code>fileset</code> elements
*/ | Reads <code>fileset</code> elements. <code>fileset</code> elements can be used when there are many files to be rasterized | addFileset | {
"repo_name": "srnsw/xena",
"path": "plugins/image/ext/src/batik-1.7/contrib/rasterizertask/sources/org/apache/tools/ant/taskdefs/optional/RasterizerTask.java",
"license": "gpl-3.0",
"size": 25413
} | [
"org.apache.tools.ant.types.FileSet"
] | import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.*; | [
"org.apache.tools"
] | org.apache.tools; | 885,760 |
public static ByteBuffer concat(
Collection<? extends ByteBuffer> byteBuffers)
{
if (byteBuffers == null || byteBuffers.isEmpty())
{
return ByteBuffer.allocateDirect(0).order(ByteOrder.nativeOrder());
}
int resultCapacity = byteBuffers.stream()
... | static ByteBuffer function( Collection<? extends ByteBuffer> byteBuffers) { if (byteBuffers == null byteBuffers.isEmpty()) { return ByteBuffer.allocateDirect(0).order(ByteOrder.nativeOrder()); } int resultCapacity = byteBuffers.stream() .mapToInt(ByteBuffer::capacity) .reduce(0, (a, b) -> a + b); ByteBuffer newByteBuff... | /**
* Create a direct byte buffer with native byte order whose contents is
* a concatenation of the given byte buffers. If the given collection
* is <code>null</code> or empty, then a 0-byte buffer will be created.
* The given collection may not contain <code>null</code> elements.
*
... | Create a direct byte buffer with native byte order whose contents is a concatenation of the given byte buffers. If the given collection is <code>null</code> or empty, then a 0-byte buffer will be created. The given collection may not contain <code>null</code> elements | concat | {
"repo_name": "javagl/JglTF",
"path": "jgltf-model/src/main/java/de/javagl/jgltf/model/io/Buffers.java",
"license": "mit",
"size": 12558
} | [
"java.nio.ByteBuffer",
"java.nio.ByteOrder",
"java.util.Collection"
] | import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.Collection; | import java.nio.*; import java.util.*; | [
"java.nio",
"java.util"
] | java.nio; java.util; | 1,050,412 |
public void setAppID(String appId) {
this.appId = appId;
if(service == null) {
service = AdsService.createAdsService();
if(isInitialized()) {
initComponent();
}
}
} | void function(String appId) { this.appId = appId; if(service == null) { service = AdsService.createAdsService(); if(isInitialized()) { initComponent(); } } } | /**
* Simple setter of the unique identifier of the app on the ads service
* network, no need to manually use this the createAdsService uses this.
*
* @param appId unique identifier of the app, to gain an appId please refer to
* http://console.inner-active.com/iamp/publisher/register?ref_id=... | Simple setter of the unique identifier of the app on the ads service network, no need to manually use this the createAdsService uses this | setAppID | {
"repo_name": "codenameone/CodenameOne",
"path": "CodenameOne/src/com/codename1/components/Ads.java",
"license": "gpl-2.0",
"size": 16792
} | [
"com.codename1.ads.AdsService"
] | import com.codename1.ads.AdsService; | import com.codename1.ads.*; | [
"com.codename1.ads"
] | com.codename1.ads; | 1,750,156 |
public void testSerialization() throws Exception {
// J2ObjC reflection-stripping change.
if (ReflectionUtil.isJreReflectionStripped()) {
return;
}
AtomicLongArray x = new AtomicLongArray(SIZE);
for (int i = 0; i < SIZE; i++)
x.set(i, -i);
Atom... | void function() throws Exception { if (ReflectionUtil.isJreReflectionStripped()) { return; } AtomicLongArray x = new AtomicLongArray(SIZE); for (int i = 0; i < SIZE; i++) x.set(i, -i); AtomicLongArray y = serialClone(x); assertNotSame(x, y); assertEquals(x.length(), y.length()); for (int i = 0; i < SIZE; i++) { assertE... | /**
* a deserialized serialized array holds same values
*/ | a deserialized serialized array holds same values | testSerialization | {
"repo_name": "life-beam/j2objc",
"path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/AtomicLongArrayTest.java",
"license": "apache-2.0",
"size": 11190
} | [
"com.google.j2objc.util.ReflectionUtil",
"java.util.concurrent.atomic.AtomicLongArray"
] | import com.google.j2objc.util.ReflectionUtil; import java.util.concurrent.atomic.AtomicLongArray; | import com.google.j2objc.util.*; import java.util.concurrent.atomic.*; | [
"com.google.j2objc",
"java.util"
] | com.google.j2objc; java.util; | 327,419 |
public void deleteGuild() throws DiscordException, HTTP429Exception, MissingPermissionsException {
if(client.getOurUser() == null) {
Log.w(TAG, "Trying to delete guild before logging in. Ignoring.");
return;
}
if (!ownerID.equals(client.getOurUser().getID()))
... | void function() throws DiscordException, HTTP429Exception, MissingPermissionsException { if(client.getOurUser() == null) { Log.w(TAG, STR); return; } if (!ownerID.equals(client.getOurUser().getID())) throw new MissingPermissionsException(STR); Requests.DELETE.makeRequest(client.getURL() + Endpoints.GUILDS + id, new Bas... | /**
* This deletes this guild if and only if you are its owner, otherwise it throws a {@link MissingPermissionsException}.
*
* @throws DiscordException
* @throws HTTP429Exception
* @throws MissingPermissionsException
*/ | This deletes this guild if and only if you are its owner, otherwise it throws a <code>MissingPermissionsException</code> | deleteGuild | {
"repo_name": "andwn/discard",
"path": "discord4droid/src/main/java/zone/pumpkinhill/discord4droid/handle/obj/Guild.java",
"license": "gpl-3.0",
"size": 25428
} | [
"android.util.Log",
"zone.pumpkinhill.discord4droid.api.Endpoints",
"zone.pumpkinhill.discord4droid.api.Requests",
"zone.pumpkinhill.discord4droid.util.DiscordException",
"zone.pumpkinhill.discord4droid.util.HTTP429Exception",
"zone.pumpkinhill.discord4droid.util.MissingPermissionsException",
"zone.pump... | import android.util.Log; import zone.pumpkinhill.discord4droid.api.Endpoints; import zone.pumpkinhill.discord4droid.api.Requests; import zone.pumpkinhill.discord4droid.util.DiscordException; import zone.pumpkinhill.discord4droid.util.HTTP429Exception; import zone.pumpkinhill.discord4droid.util.MissingPermissionsExcepti... | import android.util.*; import zone.pumpkinhill.discord4droid.api.*; import zone.pumpkinhill.discord4droid.util.*; import zone.pumpkinhill.http.message.*; | [
"android.util",
"zone.pumpkinhill.discord4droid",
"zone.pumpkinhill.http"
] | android.util; zone.pumpkinhill.discord4droid; zone.pumpkinhill.http; | 7,922 |
public void setPaint(final Paint paint)
{
if (paint instanceof Color)
{
this.setColor((Color) paint);
}
// else
// System.out.println("setPaint");
}
| void function(final Paint paint) { if (paint instanceof Color) { this.setColor((Color) paint); } } | /**
* Sets the <code>Paint</code> attribute for the <code>Graphics2D</code>
* context. Calling this method with a <code>null</code> <code>Paint</code>
* object does not have any effect on the current <code>Paint</code> attribute
* of this <code>Graphics2D</code>.
*
* @param paint
* the <c... | Sets the <code>Paint</code> attribute for the <code>Graphics2D</code> context. Calling this method with a <code>null</code> <code>Paint</code> object does not have any effect on the current <code>Paint</code> attribute of this <code>Graphics2D</code> | setPaint | {
"repo_name": "theanuradha/debrief",
"path": "org.mwc.cmap.legacy/src/MWC/GUI/Canvas/MetafileCanvasGraphics2d.java",
"license": "epl-1.0",
"size": 74979
} | [
"java.awt.Color",
"java.awt.Paint"
] | import java.awt.Color; import java.awt.Paint; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,150,200 |
protected UData getMcData() {
if (mcStatFullName == null) {
mcStatFullName = getChannelPrefix(true) + mcStatName;
}
try {
NotifyServiceData notifyServiceData = parent.getParent();
if (notifyServiceData.isReachable()) {
return notifyServiceData.getMc().get_statistic(mcStatFullName).data_union;
}... | UData function() { if (mcStatFullName == null) { mcStatFullName = getChannelPrefix(true) + mcStatName; } try { NotifyServiceData notifyServiceData = parent.getParent(); if (notifyServiceData.isReachable()) { return notifyServiceData.getMc().get_statistic(mcStatFullName).data_union; } else { throw new RuntimeException(S... | /**
* This should be used by implementations of {@link #getStatistics()}.
*/ | This should be used by implementations of <code>#getStatistics()</code> | getMcData | {
"repo_name": "jbarriosc/ACSUFRO",
"path": "LGPL/CommonSoftware/acsGUIs/eventGUI/src/alma/acs/eventbrowser/model/MCStatistics.java",
"license": "lgpl-2.1",
"size": 4820
} | [
"gov.sandia.CosNotification",
"org.apache.commons.lang.StringUtils"
] | import gov.sandia.CosNotification; import org.apache.commons.lang.StringUtils; | import gov.sandia.*; import org.apache.commons.lang.*; | [
"gov.sandia",
"org.apache.commons"
] | gov.sandia; org.apache.commons; | 2,675,428 |
public static File getFile(URL resourceUrl) throws FileNotFoundException {
return getFile(resourceUrl, "URL");
} | static File function(URL resourceUrl) throws FileNotFoundException { return getFile(resourceUrl, "URL"); } | /**
* Resolve the given resource URL to a {@code java.io.File}, i.e. to a file
* in the file system.
*
* @param resourceUrl
* the resource URL to resolve
* @return a corresponding File object
* @throws FileNotFoundException
* if the URL cannot be resolved to a file in the file sy... | Resolve the given resource URL to a java.io.File, i.e. to a file in the file system | getFile | {
"repo_name": "xuse/ef-orm",
"path": "common-core/src/main/java/jef/tools/ResourceUtils.java",
"license": "apache-2.0",
"size": 27676
} | [
"java.io.File",
"java.io.FileNotFoundException"
] | import java.io.File; import java.io.FileNotFoundException; | import java.io.*; | [
"java.io"
] | java.io; | 1,224,539 |
int[] randomNumbers = new int[numberCount];
List<Integer> list = new ArrayList<Integer>();
for(int i = startNumber; i <= endNumber; i++) list.add(i);
Collections.shuffle(list);
for(int i = 0; i< numberCount; i++){
randomNumbers[i] = list.get(i);
}
... | int[] randomNumbers = new int[numberCount]; List<Integer> list = new ArrayList<Integer>(); for(int i = startNumber; i <= endNumber; i++) list.add(i); Collections.shuffle(list); for(int i = 0; i< numberCount; i++){ randomNumbers[i] = list.get(i); } return randomNumbers; } | /***
* Random numbers generator.
*
* @param startNumber the range start number
* @param endNumber the range end number
* @param numberCount the count of the requested randomnumbers.
* @return an array with random numbers
*/ | Random numbers generator | getRandomNumbers | {
"repo_name": "tamzi/RxAndroidBootstrap",
"path": "commons/src/main/java/com/richardradics/commons/util/RandomUtil.java",
"license": "apache-2.0",
"size": 911
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,959,805 |
private boolean _checkFinalStatesEquals(HashSet<Integer> a, HashSet<Integer> b) {
if (a.size() != b.size()) {
return false;
}
for (Integer i : a) {
if (!b.contains(i)) {
return false;
}
}
return true;
} | boolean function(HashSet<Integer> a, HashSet<Integer> b) { if (a.size() != b.size()) { return false; } for (Integer i : a) { if (!b.contains(i)) { return false; } } return true; } | /**
* Metodo Ausiliario di equivalentTo. verifica se gli stati finali sono
* uguali
*
* @param a
* @param b
* @return
*/ | Metodo Ausiliario di equivalentTo. verifica se gli stati finali sono uguali | _checkFinalStatesEquals | {
"repo_name": "gmammolo/OpenDFA",
"path": "src/main/java/com/opendfa/DFA/DFA.java",
"license": "mit",
"size": 30167
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 397,571 |
public Modifier final0() {
return ast.newModifier(ModifierKeyword.FINAL_KEYWORD);
}
| Modifier function() { return ast.newModifier(ModifierKeyword.FINAL_KEYWORD); } | /**
* Builds a new {@link Modifier} with keyword {@code final}.
*
* @return a {@code final} modifier
*/ | Builds a new <code>Modifier</code> with keyword final | final0 | {
"repo_name": "rpau/AutoRefactor",
"path": "plugin/src/main/java/org/autorefactor/jdt/internal/corext/dom/ASTNodeFactory.java",
"license": "epl-1.0",
"size": 45059
} | [
"org.eclipse.jdt.core.dom.Modifier"
] | import org.eclipse.jdt.core.dom.Modifier; | import org.eclipse.jdt.core.dom.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 987,736 |
public BigDecimal getMeasureTarget ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MeasureTarget);
if (bd == null)
return Env.ZERO;
return bd;
} | BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MeasureTarget); if (bd == null) return Env.ZERO; return bd; } | /** Get Measure Target.
@return Target value for measure
*/ | Get Measure Target | getMeasureTarget | {
"repo_name": "pplatek/adempiere",
"path": "base/src/org/compiere/model/X_PA_Goal.java",
"license": "gpl-2.0",
"size": 14832
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 1,907,626 |
private JPanel initRow() {
JPanel p = new JPanel();
p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
return p;
} | JPanel function() { JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); return p; } | /**
* Creates a row.
*
* @return See above.
*/ | Creates a row | initRow | {
"repo_name": "dpwrussell/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/chooser/ImportDialog.java",
"license": "gpl-2.0",
"size": 52010
} | [
"javax.swing.BoxLayout",
"javax.swing.JPanel"
] | import javax.swing.BoxLayout; import javax.swing.JPanel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 887,832 |
@Nonnull
public CoreMatrix4f load(@Nonnull final FloatBuffer buffer) {
m00 = buffer.get();
m01 = buffer.get();
m02 = buffer.get();
m03 = buffer.get();
m10 = buffer.get();
m11 = buffer.get();
m12 = buffer.get();
m13 = buffer.get();
m20 = buffer.get();
m21 = buffer.get();
m... | CoreMatrix4f function(@Nonnull final FloatBuffer buffer) { m00 = buffer.get(); m01 = buffer.get(); m02 = buffer.get(); m03 = buffer.get(); m10 = buffer.get(); m11 = buffer.get(); m12 = buffer.get(); m13 = buffer.get(); m20 = buffer.get(); m21 = buffer.get(); m22 = buffer.get(); m23 = buffer.get(); m30 = buffer.get(); m... | /**
* Populates this matrix from a {@link java.nio.FloatBuffer}. The buffer stores the matrix in column major (OpenGL)
* order.
*
* @return This matrix.
*/ | Populates this matrix from a <code>java.nio.FloatBuffer</code>. The buffer stores the matrix in column major (OpenGL) order | load | {
"repo_name": "gouessej/nifty-gui",
"path": "nifty-core/src/main/java/de/lessvoid/nifty/batch/spi/core/CoreMatrix4f.java",
"license": "bsd-2-clause",
"size": 24533
} | [
"java.nio.FloatBuffer",
"javax.annotation.Nonnull"
] | import java.nio.FloatBuffer; import javax.annotation.Nonnull; | import java.nio.*; import javax.annotation.*; | [
"java.nio",
"javax.annotation"
] | java.nio; javax.annotation; | 1,248,333 |
@Test(expected = GenieNotFoundException.class)
public void testAddCommandsForClusterCommandDoesntExist() throws GenieException {
final List<Command> commands = new ArrayList<>();
final Command command = Mockito.mock(Command.class);
final String commandId = UUID.randomUUID().toString();
... | @Test(expected = GenieNotFoundException.class) void function() throws GenieException { final List<Command> commands = new ArrayList<>(); final Command command = Mockito.mock(Command.class); final String commandId = UUID.randomUUID().toString(); Mockito.when(command.getId()).thenReturn(commandId); commands.add(command);... | /**
* Test adding commands to the cluster.
*
* @throws GenieException For any problem
*/ | Test adding commands to the cluster | testAddCommandsForClusterCommandDoesntExist | {
"repo_name": "sensaid/genie",
"path": "genie-core/src/test/java/com/netflix/genie/core/services/impl/jpa/TestClusterConfigServiceJPAImpl.java",
"license": "apache-2.0",
"size": 17701
} | [
"com.netflix.genie.common.exceptions.GenieException",
"com.netflix.genie.common.exceptions.GenieNotFoundException",
"com.netflix.genie.common.model.Cluster",
"com.netflix.genie.common.model.Command",
"java.util.ArrayList",
"java.util.List",
"java.util.UUID",
"org.junit.Test",
"org.mockito.Mockito"
] | import com.netflix.genie.common.exceptions.GenieException; import com.netflix.genie.common.exceptions.GenieNotFoundException; import com.netflix.genie.common.model.Cluster; import com.netflix.genie.common.model.Command; import java.util.ArrayList; import java.util.List; import java.util.UUID; import org.junit.Test; imp... | import com.netflix.genie.common.exceptions.*; import com.netflix.genie.common.model.*; import java.util.*; import org.junit.*; import org.mockito.*; | [
"com.netflix.genie",
"java.util",
"org.junit",
"org.mockito"
] | com.netflix.genie; java.util; org.junit; org.mockito; | 1,978,777 |
public Reader asReader(); | Reader function(); | /**
* Provides access to the underlying data as a Reader.
*
* @return The reader.
*/ | Provides access to the underlying data as a Reader | asReader | {
"repo_name": "kevin-chen-hw/LDAE",
"path": "com.huawei.soa.ldae/src/main/java/org/hibernate/engine/jdbc/CharacterStream.java",
"license": "lgpl-2.1",
"size": 1745
} | [
"java.io.Reader"
] | import java.io.Reader; | import java.io.*; | [
"java.io"
] | java.io; | 836,007 |
protected void skipSpaces() throws IOException {
// log( "skipSpaces() " + pdfSource );
int c = pdfSource.read();
// identical to, but faster as: isWhiteSpace(c) || c == 37
while ((c == 0) || (c == 9) || (c == 12) || (c == 10) || (c == 13) || (c == 32) || (c == 37))// 37 is the % character, a comment
... | void function() throws IOException { int c = pdfSource.read(); while ((c == 0) (c == 9) (c == 12) (c == 10) (c == 13) (c == 32) (c == 37)) { if (c == 37) { c = pdfSource.read(); while (!isEOL(c) && (c != -1)) { c = pdfSource.read(); } } else { c = pdfSource.read(); } } if (c != -1) { pdfSource.unread(c); } } | /**
* This will skip all spaces and comments that are present.
*
* @throws IOException If there is an error reading from the stream.
*/ | This will skip all spaces and comments that are present | skipSpaces | {
"repo_name": "sencko/NALB",
"path": "nalb2013/src/org/apache/pdfbox/pdfparser/BaseParser.java",
"license": "gpl-2.0",
"size": 46902
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 159,447 |
public static Collection<Artifact> scanForIncludedInputs(IncludeScannable action,
IncludeScannerSupplier includeScannerSupplier,
ActionExecutionContext actionExecutionContext,
String profilerTaskName)
throws ExecException, InterruptedException, ActionExecutionException {
Set<A... | static Collection<Artifact> function(IncludeScannable action, IncludeScannerSupplier includeScannerSupplier, ActionExecutionContext actionExecutionContext, String profilerTaskName) throws ExecException, InterruptedException, ActionExecutionException { Set<Artifact> includes = Sets.newConcurrentHashSet(); final List<Pat... | /**
* Returns the files transitively included by the source files of the given IncludeScannable.
*
* @param action IncludeScannable whose sources' transitive includes will be returned.
* @param includeScannerSupplier supplies IncludeScanners to actually do the transitive
* ... | Returns the files transitively included by the source files of the given IncludeScannable | scanForIncludedInputs | {
"repo_name": "charlieaustin/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScanner.java",
"license": "apache-2.0",
"size": 8241
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.Iterables",
"com.google.common.collect.Sets",
"com.google.devtools.build.lib.actions.ActionExecutionContext",
"com.google.devtools.build.lib.actions.ActionExecutionException",
"com.google.devtools.build.lib.actions.Artifact",
"com.goo... | import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; import com.google.devtools.build.lib.actions.ActionExecutionContext; import com.google.devtools.build.lib.actions.ActionExecutionException; import com.google.devtools.build.lib.actions.Arti... | import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.profiler.*; import com.google.devtools.build.lib.vfs.*; import java.io.*; import java.util.*; | [
"com.google.common",
"com.google.devtools",
"java.io",
"java.util"
] | com.google.common; com.google.devtools; java.io; java.util; | 2,380,122 |
public void deleteUser(final long id) {
final User user = userDao.findById(id);
user.setDeleted(true);
userDao.update(user);
} | void function(final long id) { final User user = userDao.findById(id); user.setDeleted(true); userDao.update(user); } | /**
* Sets the deleted flag on the given {@link User}.
* @param id the id of the {@link User} to delete.
*/ | Sets the deleted flag on the given <code>User</code> | deleteUser | {
"repo_name": "XMBomb/InComb",
"path": "src/main/java/com/incomb/server/model/dao/UserDao.java",
"license": "apache-2.0",
"size": 7152
} | [
"com.incomb.server.model.User"
] | import com.incomb.server.model.User; | import com.incomb.server.model.*; | [
"com.incomb.server"
] | com.incomb.server; | 981,369 |
@Test
public void testSign() {
ZipLong zl = new ZipLong(new byte[] {(byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF});
assertEquals(0x00000000FFFFFFFFL, zl.getValue());
assertEquals(-1,zl.getIntValue());
zl = new ZipLong(0xFFFF_FFFFL);
assertEquals(0x00000000FFFFFFFFL, z... | void function() { ZipLong zl = new ZipLong(new byte[] {(byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF}); assertEquals(0x00000000FFFFFFFFL, zl.getValue()); assertEquals(-1,zl.getIntValue()); zl = new ZipLong(0xFFFF_FFFFL); assertEquals(0x00000000FFFFFFFFL, zl.getValue()); zl = new ZipLong(0xFFFF_FFFF); assertEquals(0xFF... | /**
* Test sign handling.
*/ | Test sign handling | testSign | {
"repo_name": "apache/commons-compress",
"path": "src/test/java/org/apache/commons/compress/archivers/zip/ZipLongTest.java",
"license": "apache-2.0",
"size": 3679
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,599,507 |
@TimeoutReq(minutes = 100)
public void testContextSwitchOffscreen() throws Exception {
runBenchmark(BenchmarkName.ContextSwitch, true, NUM_FRAMES, NUM_ITERATIONS, TIMEOUT);
} | @TimeoutReq(minutes = 100) void function() throws Exception { runBenchmark(BenchmarkName.ContextSwitch, true, NUM_FRAMES, NUM_ITERATIONS, TIMEOUT); } | /**
* Runs the context switch overhead test offscreen.
*/ | Runs the context switch overhead test offscreen | testContextSwitchOffscreen | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/cts/suite/pts/deviceTests/opengl/src/com/android/pts/opengl/primitive/GLPrimitiveBenchmark.java",
"license": "apache-2.0",
"size": 5399
} | [
"android.cts.util.TimeoutReq"
] | import android.cts.util.TimeoutReq; | import android.cts.util.*; | [
"android.cts"
] | android.cts; | 2,460,111 |
public final OkHttpChannelBuilder negotiationType(NegotiationType type) {
negotiationType = Preconditions.checkNotNull(type, "type");
return this;
} | final OkHttpChannelBuilder function(NegotiationType type) { negotiationType = Preconditions.checkNotNull(type, "type"); return this; } | /**
* Sets the negotiation type for the HTTP/2 connection.
*
* <p>If TLS is enabled a default {@link SSLSocketFactory} is created using the best
* {@link java.security.Provider} available and is NOT based on
* {@link SSLSocketFactory#getDefault}. To more precisely control the TLS configuration call
* ... | Sets the negotiation type for the HTTP/2 connection. If TLS is enabled a default <code>SSLSocketFactory</code> is created using the best <code>java.security.Provider</code> available and is NOT based on <code>SSLSocketFactory#getDefault</code>. To more precisely control the TLS configuration call <code>#sslSocketFactor... | negotiationType | {
"repo_name": "anuraaga/grpc-java",
"path": "okhttp/src/main/java/io/grpc/okhttp/OkHttpChannelBuilder.java",
"license": "bsd-3-clause",
"size": 12314
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,096,699 |
public static void buyPageIntentResponse(PendingIntent pendingIntent, Intent intent) {
Log.d(TAG, "buyPageIntentResponse()");
if (sPurchaseObserver == null) {
if (Consts.DEBUG) {
Log.d(TAG, "UI is not running");
}
return;
}
sPurchaseObser... | static void function(PendingIntent pendingIntent, Intent intent) { Log.d(TAG, STR); if (sPurchaseObserver == null) { if (Consts.DEBUG) { Log.d(TAG, STR); } return; } sPurchaseObserver.startBuyPageActivity(pendingIntent, intent); } | /**
* Starts a new activity for the user to buy an item for sale. This method
* forwards the intent on to the PurchaseObserver (if it exists) because
* we need to start the activity on the activity stack of the application.
*
* @param pendingIntent a PendingIntent that we received from Android ... | Starts a new activity for the user to buy an item for sale. This method forwards the intent on to the PurchaseObserver (if it exists) because we need to start the activity on the activity stack of the application | buyPageIntentResponse | {
"repo_name": "Cheaterman/python-for-android",
"path": "src/src/org/renpy/android/billing/ResponseHandler.java",
"license": "mit",
"size": 7799
} | [
"android.app.PendingIntent",
"android.content.Intent",
"android.util.Log"
] | import android.app.PendingIntent; import android.content.Intent; import android.util.Log; | import android.app.*; import android.content.*; import android.util.*; | [
"android.app",
"android.content",
"android.util"
] | android.app; android.content; android.util; | 1,383,157 |
public void delete(String userUuid) {
getClient().delete(String.format(Routes.USER_DELETE, userUuid));
} | void function(String userUuid) { getClient().delete(String.format(Routes.USER_DELETE, userUuid)); } | /**
* Delete a user
*
* @param userUuid
*/ | Delete a user | delete | {
"repo_name": "raptorbox/raptor",
"path": "raptor-sdk/src/main/java/org/createnet/raptor/sdk/admin/UserClient.java",
"license": "apache-2.0",
"size": 10253
} | [
"org.createnet.raptor.sdk.Routes"
] | import org.createnet.raptor.sdk.Routes; | import org.createnet.raptor.sdk.*; | [
"org.createnet.raptor"
] | org.createnet.raptor; | 1,969,595 |
public Builder groups(final Set<String> groups) {
this.groups = groups;
return this;
} | Builder function(final Set<String> groups) { this.groups = groups; return this; } | /**
* Sets the groups.
*
* @param groups the user groups
* @return the builder
*/ | Sets the groups | groups | {
"repo_name": "MikeThomsen/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-authorization/src/main/java/org/apache/nifi/authorization/user/StandardNiFiUser.java",
"license": "apache-2.0",
"size": 6873
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 160,789 |
@HiveDecimalWritableVersionV2
public byte[] bigIntegerBytesCopy(
long[] scratchLongs, byte[] scratchBuffer) {
if (!isSet()) {
throw new RuntimeException("no value set");
}
int byteLength =
fastBigIntegerBytes(
scratchLongs, scratchBuffer);
if (byteLength == 0) {
... | @HiveDecimalWritableVersionV2 byte[] function( long[] scratchLongs, byte[] scratchBuffer) { if (!isSet()) { throw new RuntimeException(STR); } int byteLength = fastBigIntegerBytes( scratchLongs, scratchBuffer); if (byteLength == 0) { throw new RuntimeException(STR); } return Arrays.copyOf(scratchBuffer, byteLength); } | /**
* Allocate scratchLongs with HiveDecimal.SCRATCH_LONGS_LEN longs.
* And, allocate scratch scratchBuffer with HiveDecimal.SCRATCH_BUFFER_LEN_BIG_INTEGER_BYTES bytes.
*
*/ | Allocate scratchLongs with HiveDecimal.SCRATCH_LONGS_LEN longs. And, allocate scratch scratchBuffer with HiveDecimal.SCRATCH_BUFFER_LEN_BIG_INTEGER_BYTES bytes | bigIntegerBytesCopy | {
"repo_name": "vergilchiu/hive",
"path": "storage-api/src/java/org/apache/hadoop/hive/serde2/io/HiveDecimalWritable.java",
"license": "apache-2.0",
"size": 26923
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,013,089 |
public ModelClass getSourceClass() {
return sourceClass;
} | ModelClass function() { return sourceClass; } | /**
* Get the model class.
* @return The ModelClass object.
*/ | Get the model class | getSourceClass | {
"repo_name": "drhee/toxoMine",
"path": "intermine/MineManager/modelviewer/src/main/java/org/intermine/modelviewer/swing/attributetable/AttributeInfo.java",
"license": "lgpl-2.1",
"size": 2045
} | [
"org.intermine.modelviewer.model.ModelClass"
] | import org.intermine.modelviewer.model.ModelClass; | import org.intermine.modelviewer.model.*; | [
"org.intermine.modelviewer"
] | org.intermine.modelviewer; | 355,645 |
public static JPanel getBrandedTreePanel(final JTree tree) {
class ScrollableDelegatePanelClassThingThatsNotAnonymous extends JPanel implements Scrollable {
Scrollable scrollable = tree; | static JPanel function(final JTree tree) { class ScrollableDelegatePanelClassThingThatsNotAnonymous extends JPanel implements Scrollable { Scrollable scrollable = tree; | /**
* Returns a JPanel containing the given JTree and a JLabel positioned at
* the bottom of the panel containing the SQL Power Logo that when clicked
* on, will open up the SQL Power website in a web browser.
*
* @param tree
* The JTree that will be added to the panel.
* @return A JPanel cont... | Returns a JPanel containing the given JTree and a JLabel positioned at the bottom of the panel containing the SQL Power Logo that when clicked on, will open up the SQL Power website in a web browser | getBrandedTreePanel | {
"repo_name": "malikoski/sqlpower-library",
"path": "src/main/java/ca/sqlpower/swingui/SPSUtils.java",
"license": "gpl-3.0",
"size": 57758
} | [
"javax.swing.JPanel",
"javax.swing.JTree",
"javax.swing.Scrollable"
] | import javax.swing.JPanel; import javax.swing.JTree; import javax.swing.Scrollable; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,258,475 |
ServiceFuture<Void> updateAsync(String resourceGroupName, String accountName, String storageAccountName, final ServiceCallback<Void> serviceCallback); | ServiceFuture<Void> updateAsync(String resourceGroupName, String accountName, String storageAccountName, final ServiceCallback<Void> serviceCallback); | /**
* Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix.
*
* @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.
* @param accountName The name of the Data Lake Analytics... | Updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key and/or suffix | updateAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/StorageAccounts.java",
"license": "mit",
"size": 47488
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,006,597 |
MapTypeEnum getMapType(); | MapTypeEnum getMapType(); | /**
* Returns the type of the Google map. Possible values are:
* <ul>
* <li>{@link net.sf.jasperreports.components.map.type.MapTypeEnum#ROADMAP ROADMAP} (default value)</li>
* <li>{@link net.sf.jasperreports.components.map.type.MapTypeEnum#SATELLITE SATELLITE}</li>
* <li>{@link net.sf.jasperreports.components... | Returns the type of the Google map. Possible values are: <code>net.sf.jasperreports.components.map.type.MapTypeEnum#ROADMAP ROADMAP</code> (default value) <code>net.sf.jasperreports.components.map.type.MapTypeEnum#SATELLITE SATELLITE</code> <code>net.sf.jasperreports.components.map.type.MapTypeEnum#TERRAIN TERRAIN</cod... | getMapType | {
"repo_name": "aleatorio12/ProVentasConnector",
"path": "jasperreports-6.2.1-project/jasperreports-6.2.1/src/net/sf/jasperreports/components/map/MapComponent.java",
"license": "gpl-3.0",
"size": 24066
} | [
"net.sf.jasperreports.components.map.type.MapTypeEnum"
] | import net.sf.jasperreports.components.map.type.MapTypeEnum; | import net.sf.jasperreports.components.map.type.*; | [
"net.sf.jasperreports"
] | net.sf.jasperreports; | 405,397 |
@Nullable public static UUID readUuid(DataInput in) throws IOException {
// If UUID is not null.
if (!in.readBoolean()) {
long most = in.readLong();
long least = in.readLong();
return IgniteUuidCache.onIgniteUuidRead(new UUID(most, least));
}
ret... | @Nullable static UUID function(DataInput in) throws IOException { if (!in.readBoolean()) { long most = in.readLong(); long least = in.readLong(); return IgniteUuidCache.onIgniteUuidRead(new UUID(most, least)); } return null; } | /**
* Reads UUID from input stream. This method is meant to be used by
* implementations of {@link Externalizable} interface.
*
* @param in Input stream.
* @return Read UUID.
* @throws IOException If read failed.
*/ | Reads UUID from input stream. This method is meant to be used by implementations of <code>Externalizable</code> interface | readUuid | {
"repo_name": "murador/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 294985
} | [
"java.io.DataInput",
"java.io.IOException",
"org.jetbrains.annotations.Nullable"
] | import java.io.DataInput; import java.io.IOException; import org.jetbrains.annotations.Nullable; | import java.io.*; import org.jetbrains.annotations.*; | [
"java.io",
"org.jetbrains.annotations"
] | java.io; org.jetbrains.annotations; | 1,945,108 |
public static void w(String tag, String msg) {
if (sDebug)
Log.w(tag, msg);
}
/**
* Output error logs. | static void function(String tag, String msg) { if (sDebug) Log.w(tag, msg); } /** * Output error logs. | /**
* Output warning logs.
*
* @param tag Used to identify the source of a log message. It usually identifies
* the class or activity where the log call occurs.
* @param msg The message you would like logged.
* @see android.util.Log#w
*/ | Output warning logs | w | {
"repo_name": "Coolerfall/Android-EasyUtil",
"path": "app/src/main/java/com/coolerfall/easyutil/Logx.java",
"license": "apache-2.0",
"size": 4263
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 221,135 |
public ServiceFuture<TroubleshootingResultInner> getTroubleshootingResultAsync(String resourceGroupName, String networkWatcherName, String targetResourceId, final ServiceCallback<TroubleshootingResultInner> serviceCallback) {
return ServiceFuture.fromResponse(getTroubleshootingResultWithServiceResponseAsync... | ServiceFuture<TroubleshootingResultInner> function(String resourceGroupName, String networkWatcherName, String targetResourceId, final ServiceCallback<TroubleshootingResultInner> serviceCallback) { return ServiceFuture.fromResponse(getTroubleshootingResultWithServiceResponseAsync(resourceGroupName, networkWatcherName, ... | /**
* Get the last completed troubleshooting result on a specified resource.
*
* @param resourceGroupName The name of the resource group.
* @param networkWatcherName The name of the network watcher resource.
* @param targetResourceId The target resource ID to query the troubleshooting result.
... | Get the last completed troubleshooting result on a specified resource | getTroubleshootingResultAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/NetworkWatchersInner.java",
"license": "mit",
"size": 190989
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,227,880 |
// Needed by UrlValidator
//[PATCH]
public
// end of [PATCH]
static String unicodeToASCII(String input) {
if (isOnlyASCII(input)) { // skip possibly expensive processing
return input;
}
try {
final String ascii = IDN.toASCII(input);
if (Dom... | static String function(String input) { if (isOnlyASCII(input)) { return input; } try { final String ascii = IDN.toASCII(input); if (DomainValidator.IDNBUGHOLDER.IDN_TOASCII_PRESERVES_TRAILING_DOTS) { return ascii; } final int length = input.length(); if (length == 0) { return input; } char lastChar = input.charAt(lengt... | /**
* Converts potentially Unicode input to punycode.
* If conversion fails, returns the original input.
*
* @param input the string to convert, not null
* @return converted input, or original input if conversion fails
*/ | Converts potentially Unicode input to punycode. If conversion fails, returns the original input | unicodeToASCII | {
"repo_name": "oleg-nenashev/jenkins",
"path": "core/src/main/java/jenkins/org/apache/commons/validator/routines/DomainValidator.java",
"license": "mit",
"size": 109104
} | [
"java.net.IDN"
] | import java.net.IDN; | import java.net.*; | [
"java.net"
] | java.net; | 2,558,819 |
protected static List<Class<?>> findTagClasses(String basePackage) throws IOException, ClassNotFoundException {
ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resourcePatter... | static List<Class<?>> function(String basePackage) throws IOException, ClassNotFoundException { ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver(); MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resourcePatternResolver); List<Class<?>> classes = n... | /**
* Finds all the classes which have a BeanTag or BeanTags annotation
*
* @param basePackage the package to start in
* @return classes which have BeanTag or BeanTags annotation
* @throws IOException
* @throws ClassNotFoundException
*/ | Finds all the classes which have a BeanTag or BeanTags annotation | findTagClasses | {
"repo_name": "geothomasp/kualico-rice-kc",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/datadictionary/parse/CustomTagAnnotations.java",
"license": "apache-2.0",
"size": 23257
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.springframework.core.io.Resource",
"org.springframework.core.io.support.PathMatchingResourcePatternResolver",
"org.springframework.core.io.support.ResourcePatternResolver",
"org.springframework.core.type.classreading.CachingMetadataRea... | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver; import org.springframework.core.type.classreadin... | import java.io.*; import java.util.*; import org.springframework.core.io.*; import org.springframework.core.io.support.*; import org.springframework.core.type.classreading.*; import org.springframework.util.*; | [
"java.io",
"java.util",
"org.springframework.core",
"org.springframework.util"
] | java.io; java.util; org.springframework.core; org.springframework.util; | 385,647 |
public void setLineSloaps(PDNumberFormatDictionary[] lineSloaps)
{
COSArray array = new COSArray();
for (PDNumberFormatDictionary lineSloap : lineSloaps)
{
array.add(lineSloap);
}
this.getDictionary().setItem("S", array);
}
| void function(PDNumberFormatDictionary[] lineSloaps) { COSArray array = new COSArray(); for (PDNumberFormatDictionary lineSloap : lineSloaps) { array.add(lineSloap); } this.getDictionary().setItem("S", array); } | /**
* This will set the sloaps of a line.
*
* @param lineSloaps the sloaps of a line
*/ | This will set the sloaps of a line | setLineSloaps | {
"repo_name": "mdamt/PdfBox-Android",
"path": "library/src/main/java/org/apache/pdfbox/pdmodel/interactive/measurement/PDRectlinearMeasureDictionary.java",
"license": "apache-2.0",
"size": 8704
} | [
"org.apache.pdfbox.cos.COSArray"
] | import org.apache.pdfbox.cos.COSArray; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 1,781,937 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.