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
static public int computePasswordQuality(String password) { boolean hasDigit = false; boolean hasNonDigit = false; final int len = password.length(); for (int i = 0; i < len; i++) { if (Character.isDigit(password.charAt(i))) { hasDigit = true; ...
static int function(String password) { boolean hasDigit = false; boolean hasNonDigit = false; final int len = password.length(); for (int i = 0; i < len; i++) { if (Character.isDigit(password.charAt(i))) { hasDigit = true; } else { hasNonDigit = true; } } if (hasNonDigit && hasDigit) { return DevicePolicyManager.PASSWO...
/** * Compute the password quality from the given password string. */
Compute the password quality from the given password string
computePasswordQuality
{ "repo_name": "tenfar/baidurom-reference", "path": "aosp/frameworks/base/core/java/com/android/internal/widget/LockPatternUtils.java", "license": "apache-2.0", "size": 51466 }
[ "android.app.admin.DevicePolicyManager" ]
import android.app.admin.DevicePolicyManager;
import android.app.admin.*;
[ "android.app" ]
android.app;
2,680,192
private void execAsynchronously(String[] command) throws RunnerException { // eliminate any empty array entries List<String> stringList = new ArrayList<String>(); for (String string : command) { string = string.trim(); if (string.length() != 0) stringList.add(string); } comman...
void function(String[] command) throws RunnerException { List<String> stringList = new ArrayList<String>(); for (String string : command) { string = string.trim(); if (string.length() != 0) stringList.add(string); } command = stringList.toArray(new String[stringList.size()]); if (command.length == 0) return; int result...
/** * Either succeeds or throws a RunnerException fit for public consumption. */
Either succeeds or throws a RunnerException fit for public consumption
execAsynchronously
{ "repo_name": "flutterwireless/ArduinoCodebase", "path": "app/src/processing/app/debug/Compiler.java", "license": "lgpl-2.1", "size": 28538 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,042,391
void deferredUpdate(boolean bNewData) { if (!bUpdateInProgress && !isBusy()) { boolean bWaitForRemoteData = false; bUpdateInProgress = true; try { if (bColumnsChanged) { resetColumns(); } calcTableSize(); if (nTableRows > 0) { checkBounds(); initDataRows();...
void deferredUpdate(boolean bNewData) { if (!bUpdateInProgress && !isBusy()) { boolean bWaitForRemoteData = false; bUpdateInProgress = true; try { if (bColumnsChanged) { resetColumns(); } calcTableSize(); if (nTableRows > 0) { checkBounds(); initDataRows(); if (rData instanceof RemoteDataModel) { @SuppressWarnings(STR)...
/*************************************** * Executes a display update when invoked from a scheduled command. Invoked * indirectly by {@link #update()}. * * @param bNewData TRUE to indicate that new data needs to be retrieved from * the data model */
Executes a display update when invoked from a scheduled command. Invoked indirectly by <code>#update()</code>
deferredUpdate
{ "repo_name": "esoco/gewt", "path": "src/main/java/de/esoco/ewt/impl/gwt/table/GwtTable.java", "license": "apache-2.0", "size": 48655 }
[ "de.esoco.lib.model.DataModel", "de.esoco.lib.model.RemoteDataModel" ]
import de.esoco.lib.model.DataModel; import de.esoco.lib.model.RemoteDataModel;
import de.esoco.lib.model.*;
[ "de.esoco.lib" ]
de.esoco.lib;
1,202,832
@Test public void testMatchSctpDstMethod() { Criterion matchSctpDst = Criteria.matchSctpDst(tpPort1); SctpPortCriterion sctpPortCriterion = checkAndConvert(matchSctpDst, Criterion.Type.SCTP_DST, SctpPortCriterion.cla...
void function() { Criterion matchSctpDst = Criteria.matchSctpDst(tpPort1); SctpPortCriterion sctpPortCriterion = checkAndConvert(matchSctpDst, Criterion.Type.SCTP_DST, SctpPortCriterion.class); assertThat(sctpPortCriterion.sctpPort(), is(equalTo(tpPort1))); }
/** * Test the matchSctpDst method. */
Test the matchSctpDst method
testMatchSctpDstMethod
{ "repo_name": "sonu283304/onos", "path": "core/api/src/test/java/org/onosproject/net/flow/criteria/CriteriaTest.java", "license": "apache-2.0", "size": 44713 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers;
import org.hamcrest.*;
[ "org.hamcrest" ]
org.hamcrest;
2,223,881
public BufferedImage getImage() { return getImage(0); }
BufferedImage function() { return getImage(0); }
/** * Gets the image from the camera * * @return a bufferedImage of the image */
Gets the image from the camera
getImage
{ "repo_name": "npw3202/ASL-recognition", "path": "src/imaging/Imager.java", "license": "mit", "size": 3340 }
[ "java.awt.image.BufferedImage" ]
import java.awt.image.BufferedImage;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
672,914
private static void checkSpellingDirectly(IDocument document, IFile file, IProgressMonitor monitor) { if (instance.checkProgram(file)) { instance.checkDocumentSpelling(document, file, monitor); } }
static void function(IDocument document, IFile file, IProgressMonitor monitor) { if (instance.checkProgram(file)) { instance.checkDocumentSpelling(document, file, monitor); } }
/** * Check spelling of the entire document. * This method actually checks the spelling. * @param document document from the editor */
Check spelling of the entire document. This method actually checks the spelling
checkSpellingDirectly
{ "repo_name": "rondiplomatico/texlipse", "path": "source/net/sourceforge/texlipse/spelling/SpellChecker.java", "license": "epl-1.0", "size": 27857 }
[ "org.eclipse.core.resources.IFile", "org.eclipse.core.runtime.IProgressMonitor", "org.eclipse.jface.text.IDocument" ]
import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.text.IDocument;
import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jface.text.*;
[ "org.eclipse.core", "org.eclipse.jface" ]
org.eclipse.core; org.eclipse.jface;
369,617
public static void setScheme(HttpMessage message, String scheme) { message.headers().set(Names.SCHEME, scheme); }
static void function(HttpMessage message, String scheme) { message.headers().set(Names.SCHEME, scheme); }
/** * Sets the {@code "X-SPDY-Scheme"} header. */
Sets the "X-SPDY-Scheme" header
setScheme
{ "repo_name": "purplefox/netty-4.0.2.8-hacked", "path": "codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyHttpHeaders.java", "license": "apache-2.0", "size": 4510 }
[ "io.netty.handler.codec.http.HttpMessage" ]
import io.netty.handler.codec.http.HttpMessage;
import io.netty.handler.codec.http.*;
[ "io.netty.handler" ]
io.netty.handler;
643,892
private void processReplaceEvent( ListChangeListener.Change<? extends SourceType> listEvent, List<TargetType> deletedStaging) { processRemoveEvent(listEvent, deletedStaging); processStagingLists(deletedStaging); processAddEvent(listEvent); }
void function( ListChangeListener.Change<? extends SourceType> listEvent, List<TargetType> deletedStaging) { processRemoveEvent(listEvent, deletedStaging); processStagingLists(deletedStaging); processAddEvent(listEvent); }
/** * Maps an replace event of the model list to new elements of the {@link #viewModelList}. * * @param listEvent * to process */
Maps an replace event of the model list to new elements of the <code>#viewModelList</code>
processReplaceEvent
{ "repo_name": "sialcasa/mvvmFX", "path": "mvvmfx/src/main/java/de/saxsys/mvvmfx/utils/itemlist/ListTransformation.java", "license": "apache-2.0", "size": 8001 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
879,348
public static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable) { ExtensionDescription desc = ExtensionDescription.getDefaultDescription(MaxUploadSize.class); desc.setRequired(required); desc.setRepeatable(repeatable); return desc; }
static ExtensionDescription function(boolean required, boolean repeatable) { ExtensionDescription desc = ExtensionDescription.getDefaultDescription(MaxUploadSize.class); desc.setRequired(required); desc.setRepeatable(repeatable); return desc; }
/** * Returns the extension description, specifying whether it is required, and * whether it is repeatable. * * @param required whether it is required * @param repeatable whether it is repeatable * @return extension description */
Returns the extension description, specifying whether it is required, and whether it is repeatable
getDefaultDescription
{ "repo_name": "noushadali/red-piranha", "path": "src/com/google/gdata/data/docs/MaxUploadSize.java", "license": "gpl-2.0", "size": 4480 }
[ "com.google.gdata.data.ExtensionDescription" ]
import com.google.gdata.data.ExtensionDescription;
import com.google.gdata.data.*;
[ "com.google.gdata" ]
com.google.gdata;
2,173,095
@JsonProperty("collection_content") public String getCollectionContent() { return collectionContent; }
@JsonProperty(STR) String function() { return collectionContent; }
/** * Collection content (water or gas TDB) {String; Set by Reporter) * (Required) * */
Collection content (water or gas TDB) {String; Set by Reporter) (Required)
getCollectionContent
{ "repo_name": "clarkjohnm/water-collection-service", "path": "water-collection-service-api/src/main/java/org/cybersapien/watercollection/service/v1/model/WaterCollection.java", "license": "mit", "size": 15477 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
1,642,352
@Test() public void testConstructorNoValues() throws Exception { final Entry e = new Entry( "dn: cn=Test Gauge,cn=monitor", "objectClass: top", "objectClass: ds-monitor-entry", "objectClass: ds-gauge-monitor-entry", "objectClass: extensibleObject", ...
@Test() void function() throws Exception { final Entry e = new Entry( STR, STR, STR, STR, STR, STR); final GaugeMonitorEntry me = new GaugeMonitorEntry(e); assertNotNull(me.toString()); assertEquals(me.getMonitorClass(), STR); assertEquals(MonitorEntry.decode(e).getClass().getName(), GaugeMonitorEntry.class.getName());...
/** * Provides test coverage for the constructor with a valid entry with no * values present. * * @throws Exception If an unexpected problem occurs. */
Provides test coverage for the constructor with a valid entry with no values present
testConstructorNoValues
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/monitors/GaugeMonitorEntryTestCase.java", "license": "gpl-2.0", "size": 23975 }
[ "com.unboundid.ldap.sdk.Entry", "java.util.Map", "org.testng.annotations.Test" ]
import com.unboundid.ldap.sdk.Entry; import java.util.Map; import org.testng.annotations.Test;
import com.unboundid.ldap.sdk.*; import java.util.*; import org.testng.annotations.*;
[ "com.unboundid.ldap", "java.util", "org.testng.annotations" ]
com.unboundid.ldap; java.util; org.testng.annotations;
1,908,107
@Override public void mouseExited(final MouseEvent e) { Visualization.frame.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); final Object annotation = Visualization.viewer.alloyGetAnnotationAtXY(e.getX(), e.getY()); if (annotation == null) { final JMenu modelWriterMenu = (JMen...
void function(final MouseEvent e) { Visualization.frame.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); final Object annotation = Visualization.viewer.alloyGetAnnotationAtXY(e.getX(), e.getY()); if (annotation == null) { final JMenu modelWriterMenu = (JMenu) Visualization.viewer.pop.getComponent(0); if (!Visualization.vi...
/** * when mouse exited from graph<br> * (not from AlloyAtom or not from AlloyTuple) */
when mouse exited from graph (not from AlloyAtom or not from AlloyTuple)
mouseExited
{ "repo_name": "ModelWriter/Tarski", "path": "Source/eu.modelwriter.marker.ui/src/eu/modelwriter/marker/ui/internal/views/visualizationview/Visualization.java", "license": "epl-1.0", "size": 21183 }
[ "java.awt.Cursor", "java.awt.event.MouseEvent", "javax.swing.JMenu" ]
import java.awt.Cursor; import java.awt.event.MouseEvent; import javax.swing.JMenu;
import java.awt.*; import java.awt.event.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
501,197
public static boolean isNativeCodeLoaded() { return LoadSnappy.isLoaded() && NativeCodeLoader.isNativeCodeLoaded(); }
static boolean function() { return LoadSnappy.isLoaded() && NativeCodeLoader.isNativeCodeLoaded(); }
/** * Are the native snappy libraries loaded & initialized? * * @return true if loaded & initialized, otherwise false */
Are the native snappy libraries loaded & initialized
isNativeCodeLoaded
{ "repo_name": "linpawslitap/mds_scaling", "path": "hadoop/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/SnappyCodec.java", "license": "bsd-3-clause", "size": 6993 }
[ "org.apache.hadoop.io.compress.snappy.LoadSnappy", "org.apache.hadoop.util.NativeCodeLoader" ]
import org.apache.hadoop.io.compress.snappy.LoadSnappy; import org.apache.hadoop.util.NativeCodeLoader;
import org.apache.hadoop.io.compress.snappy.*; import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,525,878
@Test @Ignore public void testNonDeterministicAllocation_trackAllocations() throws Exception { try { runner.forBenchmark(NonDeterministicAllocationBenchmark.class) .instrument("allocation") .options("-Cinstrument.allocation.options.trackAllocations=" + true) .run(); f...
void function() throws Exception { try { runner.forBenchmark(NonDeterministicAllocationBenchmark.class) .instrument(STR) .options(STR + true) .run(); fail(); } catch (ProxyWorkerException expected) { String message = STR; assertTrue(STR + expected.getMessage() + STR + message, expected.getMessage().contains(message)); ...
/** * This test requires a lot of memory and will fail tests when the build * machine does not have enough memory. * * @throws Exception */
This test requires a lot of memory and will fail tests when the build machine does not have enough memory
testNonDeterministicAllocation_trackAllocations
{ "repo_name": "trajano/caliper", "path": "caliper/src/test/java/com/google/caliper/runner/BadUserCodeTest.java", "license": "apache-2.0", "size": 6486 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
627,201
public static void updateRRD(String owner, String repositoryDir, String rrdName, long timestamp, String val) throws RrdException { // Issue the RRD update String rrdFile = repositoryDir + File.separator + rrdName + getExtension(); long time = (timestamp + 500L) / 1000L; String updat...
static void function(String owner, String repositoryDir, String rrdName, long timestamp, String val) throws RrdException { String rrdFile = repositoryDir + File.separator + rrdName + getExtension(); long time = (timestamp + 500L) / 1000L; String updateVal = Long.toString(time) + ":" + val; log().info(STR + rrdFile + ST...
/** * Add datapoints to a round robin database. * * @param owner the owner of the file. This is used in log messages * @param repositoryDir the directory the file resides in * @param rrdName the name for the rrd file. * @param timestamp the timestamp in millis to use for the rrd update (th...
Add datapoints to a round robin database
updateRRD
{ "repo_name": "qoswork/opennmszh", "path": "opennms-rrd/opennms-rrd-api/src/main/java/org/opennms/netmgt/rrd/RrdUtils.java", "license": "gpl-2.0", "size": 18232 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,329,528
protected CommitTraverser getFetchTraverser(Optional<Integer> fetchLimit) { RepositoryWrapper localWrapper = new LocalRepositoryWrapper(localRepository); RepositoryWrapper remoteWrapper = getRemoteWrapper(); CommitTraverser traverser; if (localWrapper.getRepoDepth().isPresent()) { ...
CommitTraverser function(Optional<Integer> fetchLimit) { RepositoryWrapper localWrapper = new LocalRepositoryWrapper(localRepository); RepositoryWrapper remoteWrapper = getRemoteWrapper(); CommitTraverser traverser; if (localWrapper.getRepoDepth().isPresent()) { traverser = new ShallowCommitTraverser(remoteWrapper, loc...
/** * Returns the appropriate commit traverser to use for the fetch operation. * * @param fetchLimit the fetch limit to use * @return the {@link CommitTraverser} to use. */
Returns the appropriate commit traverser to use for the fetch operation
getFetchTraverser
{ "repo_name": "rouault/GeoGit", "path": "src/core/src/main/java/org/geogit/remote/AbstractRemoteRepo.java", "license": "bsd-3-clause", "size": 9857 }
[ "com.google.common.base.Optional" ]
import com.google.common.base.Optional;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
692,496
private TopsoilTab createTopsoilTab(TopsoilTabContent tabContent, TopsoilTableController tableController) { String title = tableController.getTable().getTitle(); // If the table has just been generated. if (title.equals("Untitled Table")) { return newUntitledTab(tabContent, tabl...
TopsoilTab function(TopsoilTabContent tabContent, TopsoilTableController tableController) { String title = tableController.getTable().getTitle(); if (title.equals(STR)) { return newUntitledTab(tabContent, tableController); } if (title.length() > 5) { if (title.substring(0, 5).equals("Table")) { try { int number = Integ...
/** * Creates a new {@code TopsoilTab}. for the specified {@code TopsoilTabContent} and {@code TopsoilTableController}. * * @param tabContent TopsoilTabContent to display * @param tableController TopsoilTableController * @return a new TopsoilTab */
Creates a new TopsoilTab. for the specified TopsoilTabContent and TopsoilTableController
createTopsoilTab
{ "repo_name": "emilycoleman/Topsoil", "path": "app/src/main/java/org/cirdles/topsoil/app/tab/TopsoilTabPane.java", "license": "apache-2.0", "size": 7587 }
[ "org.cirdles.topsoil.app.table.TopsoilTableController" ]
import org.cirdles.topsoil.app.table.TopsoilTableController;
import org.cirdles.topsoil.app.table.*;
[ "org.cirdles.topsoil" ]
org.cirdles.topsoil;
2,169,905
@SmallTest public void testActionButtonBadRatio() throws InterruptedException { final int iconHeightDp = 20; final int iconWidthDp = 60; Resources testRes = getInstrumentation().getTargetContext().getResources(); float density = testRes.getDisplayMetrics().density; Bitmap...
void function() throws InterruptedException { final int iconHeightDp = 20; final int iconWidthDp = 60; Resources testRes = getInstrumentation().getTargetContext().getResources(); float density = testRes.getDisplayMetrics().density; Bitmap expectedIcon = Bitmap.createBitmap((int) (iconWidthDp * density), (int) (iconHeig...
/** * Test the case that the action button should not be shown, given a bitmap with unacceptable * height/width ratio. */
Test the case that the action button should not be shown, given a bitmap with unacceptable height/width ratio
testActionButtonBadRatio
{ "repo_name": "SaschaMester/delicium", "path": "chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java", "license": "bsd-3-clause", "size": 17025 }
[ "android.app.PendingIntent", "android.content.Intent", "android.content.res.Resources", "android.graphics.Bitmap", "android.view.View", "android.widget.ImageButton", "java.util.concurrent.atomic.AtomicBoolean", "org.chromium.chrome.browser.toolbar.CustomTabToolbar" ]
import android.app.PendingIntent; import android.content.Intent; import android.content.res.Resources; import android.graphics.Bitmap; import android.view.View; import android.widget.ImageButton; import java.util.concurrent.atomic.AtomicBoolean; import org.chromium.chrome.browser.toolbar.CustomTabToolbar;
import android.app.*; import android.content.*; import android.content.res.*; import android.graphics.*; import android.view.*; import android.widget.*; import java.util.concurrent.atomic.*; import org.chromium.chrome.browser.toolbar.*;
[ "android.app", "android.content", "android.graphics", "android.view", "android.widget", "java.util", "org.chromium.chrome" ]
android.app; android.content; android.graphics; android.view; android.widget; java.util; org.chromium.chrome;
2,573,725
try { ContextHolder.init(); ContextHolder.get().initClassSum(names.getTargetClassSize()); checkData(dataes); List<Case> caseList = convert2Case(dataes); int resultClassIndex = trees.length > 1 ? boostClassify(caseList) : treeClassify(caseList, trees[0]); Result result = new Resul...
try { ContextHolder.init(); ContextHolder.get().initClassSum(names.getTargetClassSize()); checkData(dataes); List<Case> caseList = convert2Case(dataes); int resultClassIndex = trees.length > 1 ? boostClassify(caseList) : treeClassify(caseList, trees[0]); Result result = new Result(ContextHolder.get().getLabel(), Contex...
/** * c5 score function. * * @param dataes * input variables. * @return scoring result. */
c5 score function
score
{ "repo_name": "arging/c5", "path": "src/main/java/c5/Scoring.java", "license": "gpl-2.0", "size": 8469 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
906,776
private JTextField getValueTextField() { if (valueTextField == null) { valueTextField = new JTextField(); valueTextField.setFont(new Font("Monospaced", Font.PLAIN, 12)); valueTextField.setPreferredSize(new Dimension(180, 25)); } return valueTextField; }
JTextField function() { if (valueTextField == null) { valueTextField = new JTextField(); valueTextField.setFont(new Font(STR, Font.PLAIN, 12)); valueTextField.setPreferredSize(new Dimension(180, 25)); } return valueTextField; }
/** * This method initializes valueTextField * * @return javax.swing.JTextField */
This method initializes valueTextField
getValueTextField
{ "repo_name": "gilles-fabre/ezRPC", "path": "LogReporter/LogReporterTool/com/reporter/ModIdDefinitionDialogVE.java", "license": "lgpl-3.0", "size": 7240 }
[ "java.awt.Dimension", "java.awt.Font", "javax.swing.JTextField" ]
import java.awt.Dimension; import java.awt.Font; import javax.swing.JTextField;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,623,015
ServiceResponse<Void> arrayStringCsvValid() throws ErrorException, IOException;
ServiceResponse<Void> arrayStringCsvValid() throws ErrorException, IOException;
/** * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &amp;=+$,/?#[]end' , null, ''] using the csv-array format. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the {@link ServiceResponse} objec...
Get an array of string ['ArrayQuery1', 'begin!*'();:@ &amp;=+$,/?#[]end' , null, ''] using the csv-array format
arrayStringCsvValid
{ "repo_name": "sharadagarwal/autorest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/url/QueriesOperations.java", "license": "mit", "size": 45468 }
[ "com.microsoft.rest.ServiceResponse", "java.io.IOException" ]
import com.microsoft.rest.ServiceResponse; import java.io.IOException;
import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.rest", "java.io" ]
com.microsoft.rest; java.io;
2,899,675
private ReplicationJob restoreReplicationJob(PersistedJobInfo persistedJobInfo) { ReplicationTask replicationTask = null; HiveObjectSpec tableSpec = new HiveObjectSpec(persistedJobInfo.getSrcDbName(), persistedJobInfo.getSrcTableName()); HiveObjectSpec partitionSpec = null; if (persistedJobI...
ReplicationJob function(PersistedJobInfo persistedJobInfo) { ReplicationTask replicationTask = null; HiveObjectSpec tableSpec = new HiveObjectSpec(persistedJobInfo.getSrcDbName(), persistedJobInfo.getSrcTableName()); HiveObjectSpec partitionSpec = null; if (persistedJobInfo.getSrcPartitionNames().size() > 0) { partitio...
/** * Creates a replication job from the parameters that were persisted to the DB. * * @param persistedJobInfo information about the job persisted on the DB * @return a ReplicationJob made from the persisted information */
Creates a replication job from the parameters that were persisted to the DB
restoreReplicationJob
{ "repo_name": "airbnb/reair", "path": "main/src/main/java/com/airbnb/reair/incremental/ReplicationServer.java", "license": "apache-2.0", "size": 25514 }
[ "com.airbnb.reair.common.HiveObjectSpec", "com.airbnb.reair.incremental.db.PersistedJobInfo", "com.airbnb.reair.incremental.primitives.CopyPartitionTask", "com.airbnb.reair.incremental.primitives.CopyPartitionedTableTask", "com.airbnb.reair.incremental.primitives.CopyPartitionsTask", "com.airbnb.reair.inc...
import com.airbnb.reair.common.HiveObjectSpec; import com.airbnb.reair.incremental.db.PersistedJobInfo; import com.airbnb.reair.incremental.primitives.CopyPartitionTask; import com.airbnb.reair.incremental.primitives.CopyPartitionedTableTask; import com.airbnb.reair.incremental.primitives.CopyPartitionsTask; import com...
import com.airbnb.reair.common.*; import com.airbnb.reair.incremental.db.*; import com.airbnb.reair.incremental.primitives.*; import java.util.*;
[ "com.airbnb.reair", "java.util" ]
com.airbnb.reair; java.util;
1,116,066
@Test public void testMultipleFilesInSameDirectory() throws IOException, InterruptedException { runner.setProperty(TailFile.ROLLING_FILENAME_PATTERN, "${filename}.?"); runner.setProperty(TailFile.START_POSITION, TailFile.START_CURRENT_FILE); runner.setProperty(TailFile.BASE_DIRECTORY, "t...
void function() throws IOException, InterruptedException { runner.setProperty(TailFile.ROLLING_FILENAME_PATTERN, STR); runner.setProperty(TailFile.START_POSITION, TailFile.START_CURRENT_FILE); runner.setProperty(TailFile.BASE_DIRECTORY, STR); runner.setProperty(TailFile.FILENAME, STR); runner.setProperty(TailFile.MODE,...
/** * This test is used to check the case where we have multiple files in the same directory * and where it is not possible to specify a single rolling pattern for all files. */
This test is used to check the case where we have multiple files in the same directory and where it is not possible to specify a single rolling pattern for all files
testMultipleFilesInSameDirectory
{ "repo_name": "mcgilman/nifi", "path": "nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestTailFile.java", "license": "apache-2.0", "size": 46630 }
[ "java.io.File", "java.io.IOException", "java.io.RandomAccessFile", "java.util.Optional", "org.apache.nifi.util.MockFlowFile", "org.junit.Assert" ]
import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; import java.util.Optional; import org.apache.nifi.util.MockFlowFile; import org.junit.Assert;
import java.io.*; import java.util.*; import org.apache.nifi.util.*; import org.junit.*;
[ "java.io", "java.util", "org.apache.nifi", "org.junit" ]
java.io; java.util; org.apache.nifi; org.junit;
2,812,690
V waitForValue() throws ExecutionException;
V waitForValue() throws ExecutionException;
/** * Waits for a value that may still be loading. Unlike get(), this method can block (in the * case of FutureValueReference). * * @throws ExecutionException if the loading thread throws an exception * @throws ExecutionError if the loading thread throws an error */
Waits for a value that may still be loading. Unlike get(), this method can block (in the case of FutureValueReference)
waitForValue
{ "repo_name": "lshain-android-source/external-guava", "path": "guava/src/com/google/common/cache/LocalCache.java", "license": "apache-2.0", "size": 144589 }
[ "java.util.concurrent.ExecutionException" ]
import java.util.concurrent.ExecutionException;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,303,452
public void checkPermission(CachePool pool, FsAction access) throws AccessControlException { FsPermission mode = pool.getMode(); if (isSuperUser()) { return; } if (getUser().equals(pool.getOwnerName()) && mode.getUserAction().implies(access)) { return; } if (isMemberO...
void function(CachePool pool, FsAction access) throws AccessControlException { FsPermission mode = pool.getMode(); if (isSuperUser()) { return; } if (getUser().equals(pool.getOwnerName()) && mode.getUserAction().implies(access)) { return; } if (isMemberOfGroup(pool.getGroupName()) && mode.getGroupAction().implies(acces...
/** * Whether a cache pool can be accessed by the current context * * @param pool CachePool being accessed * @param access type of action being performed on the cache pool * @throws AccessControlException if pool cannot be accessed */
Whether a cache pool can be accessed by the current context
checkPermission
{ "repo_name": "leechoongyon/HadoopSourceAnalyze", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java", "license": "apache-2.0", "size": 22747 }
[ "org.apache.hadoop.fs.permission.FsAction", "org.apache.hadoop.fs.permission.FsPermission", "org.apache.hadoop.security.AccessControlException" ]
import org.apache.hadoop.fs.permission.FsAction; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.security.AccessControlException;
import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.security.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,370,370
private List<AlignerStatement> cacheStatementsAndUpdateUnits( String uniformPath) throws ConQATException { ITokenElement element = uniformPathToElement.get(uniformPath); if (element == null) { throw new ConQATException("No token element found for path " + uniformPath); } List<AlignerStatement> st...
List<AlignerStatement> function( String uniformPath) throws ConQATException { ITokenElement element = uniformPathToElement.get(uniformPath); if (element == null) { throw new ConQATException(STR + uniformPath); } List<AlignerStatement> statements = new ArrayList<AlignerStatement>(); if (ShallowParserFactory.supportsLang...
/** * Caches the statements of the element identified by the given uniform path * and updates the units key for this element to reflect the number of * statements. */
Caches the statements of the element identified by the given uniform path and updates the units key for this element to reflect the number of statements
cacheStatementsAndUpdateUnits
{ "repo_name": "vimaier/conqat", "path": "org.conqat.engine.code_clones/src/org/conqat/engine/code_clones/result/align/CloneAstAligner.java", "license": "apache-2.0", "size": 19027 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List", "org.conqat.engine.code_clones.detection.UnitProcessorBase", "org.conqat.engine.core.core.ConQATException", "org.conqat.engine.sourcecode.resource.ITokenElement", "org.conqat.engine.sourcecode.shallowparser.ShallowParserFactory", "org.c...
import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.conqat.engine.code_clones.detection.UnitProcessorBase; import org.conqat.engine.core.core.ConQATException; import org.conqat.engine.sourcecode.resource.ITokenElement; import org.conqat.engine.sourcecode.shallowparser.ShallowPars...
import java.util.*; import org.conqat.engine.code_clones.detection.*; import org.conqat.engine.core.core.*; import org.conqat.engine.sourcecode.resource.*; import org.conqat.engine.sourcecode.shallowparser.*; import org.conqat.engine.sourcecode.shallowparser.framework.*; import org.conqat.lib.scanner.*;
[ "java.util", "org.conqat.engine", "org.conqat.lib" ]
java.util; org.conqat.engine; org.conqat.lib;
2,584,812
public void testNoMatchingAllocationIdFound() { RoutingAllocation allocation = routingAllocationWithOnePrimaryNoReplicas(yesAllocationDeciders(), CLUSTER_RECOVERED, "id2"); testAllocator.addData(node1, "id1", randomBoolean()); testAllocator.allocateUnassigned(allocation); assertThat(...
void function() { RoutingAllocation allocation = routingAllocationWithOnePrimaryNoReplicas(yesAllocationDeciders(), CLUSTER_RECOVERED, "id2"); testAllocator.addData(node1, "id1", randomBoolean()); testAllocator.allocateUnassigned(allocation); assertThat(allocation.routingNodesChanged(), equalTo(true)); assertThat(alloc...
/** * Tests when the node returns data with a shard allocation id that does not match active allocation ids, it will be moved to ignore unassigned. */
Tests when the node returns data with a shard allocation id that does not match active allocation ids, it will be moved to ignore unassigned
testNoMatchingAllocationIdFound
{ "repo_name": "winstonewert/elasticsearch", "path": "core/src/test/java/org/elasticsearch/gateway/PrimaryShardAllocatorTests.java", "license": "apache-2.0", "size": 28437 }
[ "org.elasticsearch.cluster.health.ClusterHealthStatus", "org.elasticsearch.cluster.routing.allocation.RoutingAllocation", "org.hamcrest.Matchers" ]
import org.elasticsearch.cluster.health.ClusterHealthStatus; import org.elasticsearch.cluster.routing.allocation.RoutingAllocation; import org.hamcrest.Matchers;
import org.elasticsearch.cluster.health.*; import org.elasticsearch.cluster.routing.allocation.*; import org.hamcrest.*;
[ "org.elasticsearch.cluster", "org.hamcrest" ]
org.elasticsearch.cluster; org.hamcrest;
980,077
public void storeClass(JavaClass clazz);
void function(JavaClass clazz);
/** * Store the provided class under "clazz.getClassName()" */
Store the provided class under "clazz.getClassName()"
storeClass
{ "repo_name": "dubenju/javay", "path": "src/java/org/apache/bcel/util/Repository.java", "license": "apache-2.0", "size": 4092 }
[ "org.apache.bcel.classfile.JavaClass" ]
import org.apache.bcel.classfile.JavaClass;
import org.apache.bcel.classfile.*;
[ "org.apache.bcel" ]
org.apache.bcel;
2,782,018
@Test public void testT1RV4D4_T1LV9D1() { test_id = getTestId("T1RV4D4", "T1LV9D1", "221"); String src = selectTRVD("T1RV4D4"); String dest = selectTLVD("T1LV9D1"); String result = "."; try { result = TRVD_TLVD_Action(src, dest); } catch (RecognitionException e) { e.printStackTrace()...
void function() { test_id = getTestId(STR, STR, "221"); String src = selectTRVD(STR); String dest = selectTLVD(STR); String result = "."; try { result = TRVD_TLVD_Action(src, dest); } catch (RecognitionException e) { e.printStackTrace(); } catch (TokenStreamException e) { e.printStackTrace(); } assertTrue(ReturnFailure...
/** * Perform the test for the given matrix column (T1RV4D4) and row (T1LV9D1). * */
Perform the test for the given matrix column (T1RV4D4) and row (T1LV9D1)
testT1RV4D4_T1LV9D1
{ "repo_name": "rmulvey/bptest", "path": "src/org.xtuml.bp.als.oal.test/src/org/xtuml/bp/als/oal/test/SingleDimensionFixedArrayAssigmentTest_8_Generics.java", "license": "apache-2.0", "size": 153074 }
[ "org.xtuml.bp.ui.graphics.editor.GraphicalEditor" ]
import org.xtuml.bp.ui.graphics.editor.GraphicalEditor;
import org.xtuml.bp.ui.graphics.editor.*;
[ "org.xtuml.bp" ]
org.xtuml.bp;
2,761,133
@Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(EsbPackage.Literals.TASK__TASK_IMPLEMENTATION_CLASS); } return childrenFeatures; }
Collection<? extends EStructuralFeature> function(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(EsbPackage.Literals.TASK__TASK_IMPLEMENTATION_CLASS); } return childrenFeatures; }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-...
This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>.
getChildrenFeatures
{ "repo_name": "chanakaudaya/developer-studio", "path": "esb/org.wso2.developerstudio.eclipse.esb.edit/src/org/wso2/developerstudio/eclipse/esb/provider/TaskItemProvider.java", "license": "apache-2.0", "size": 11372 }
[ "java.util.Collection", "org.eclipse.emf.ecore.EStructuralFeature", "org.wso2.developerstudio.eclipse.esb.EsbPackage" ]
import java.util.Collection; import org.eclipse.emf.ecore.EStructuralFeature; import org.wso2.developerstudio.eclipse.esb.EsbPackage;
import java.util.*; import org.eclipse.emf.ecore.*; import org.wso2.developerstudio.eclipse.esb.*;
[ "java.util", "org.eclipse.emf", "org.wso2.developerstudio" ]
java.util; org.eclipse.emf; org.wso2.developerstudio;
1,265,866
public OffsetDateTime getStartTime() { return this.startTime; }
OffsetDateTime function() { return this.startTime; }
/** * Get the startTime property: incident start time. * * @return the startTime value. */
Get the startTime property: incident start time
getStartTime
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResult.java", "license": "mit", "size": 5128 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
1,905,577
protected CloseableHttpAsyncClient createHttpAsyncClient(NHttpClientConnectionManager connectionManager) { if (asyncClientMap.containsKey(config.getEndpoint())) { return asyncClientMap.get(config.getEndpoint()); } HttpAsyncClientBuilder builder = HttpAsyncClients.custom().setConn...
CloseableHttpAsyncClient function(NHttpClientConnectionManager connectionManager) { if (asyncClientMap.containsKey(config.getEndpoint())) { return asyncClientMap.get(config.getEndpoint()); } HttpAsyncClientBuilder builder = HttpAsyncClients.custom().setConnectionManager(connectionManager); int socketBufferSizeInBytes =...
/** * Create asynchronous http client based on connection manager. * * @param connectionManager Asynchronous http client connection manager. * @return Asynchronous http client based on connection manager. */
Create asynchronous http client based on connection manager
createHttpAsyncClient
{ "repo_name": "baidubce/bce-sdk-java", "path": "src/main/java/com/baidubce/http/BceHttpClient.java", "license": "apache-2.0", "size": 24497 }
[ "org.apache.http.config.ConnectionConfig", "org.apache.http.impl.nio.client.CloseableHttpAsyncClient", "org.apache.http.impl.nio.client.HttpAsyncClientBuilder", "org.apache.http.impl.nio.client.HttpAsyncClients", "org.apache.http.nio.conn.NHttpClientConnectionManager" ]
import org.apache.http.config.ConnectionConfig; import org.apache.http.impl.nio.client.CloseableHttpAsyncClient; import org.apache.http.impl.nio.client.HttpAsyncClientBuilder; import org.apache.http.impl.nio.client.HttpAsyncClients; import org.apache.http.nio.conn.NHttpClientConnectionManager;
import org.apache.http.config.*; import org.apache.http.impl.nio.client.*; import org.apache.http.nio.conn.*;
[ "org.apache.http" ]
org.apache.http;
12,317
private void applyStep(Step nextStep, DiskBalancerVolumeSet currentSet, DiskBalancerVolume lowVolume, DiskBalancerVolume highVolume) throws Exception { long used; if (nextStep != null) { used = lowVolume.getUsed() + nextStep.getBytesToMove(); lowV...
void function(Step nextStep, DiskBalancerVolumeSet currentSet, DiskBalancerVolume lowVolume, DiskBalancerVolume highVolume) throws Exception { long used; if (nextStep != null) { used = lowVolume.getUsed() + nextStep.getBytesToMove(); lowVolume.setUsed(used); used = highVolume.getUsed() - nextStep.getBytesToMove(); high...
/** * Apply steps applies the current step on to a volumeSet so that we can * compute next steps until we reach the desired goals. * * @param nextStep - nextStep or Null * @param currentSet - Current Disk BalancerVolume Set we are operating upon * @param lowVolume - volume * @param highVolume - ...
Apply steps applies the current step on to a volumeSet so that we can compute next steps until we reach the desired goals
applyStep
{ "repo_name": "mapr/hadoop-common", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/planner/GreedyPlanner.java", "license": "apache-2.0", "size": 9513 }
[ "org.apache.hadoop.hdfs.server.diskbalancer.datamodel.DiskBalancerVolume" ]
import org.apache.hadoop.hdfs.server.diskbalancer.datamodel.DiskBalancerVolume;
import org.apache.hadoop.hdfs.server.diskbalancer.datamodel.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,898,299
public String createPLUT(String shape) throws InterruptedException, IOException, DcmServiceException { Dataset plut = dcmFact.newDataset(); plut.putCS(Tags.PresentationLUTShape, shape); return createPLUT(plut); }
String function(String shape) throws InterruptedException, IOException, DcmServiceException { Dataset plut = dcmFact.newDataset(); plut.putCS(Tags.PresentationLUTShape, shape); return createPLUT(plut); }
/** * Creates a P-LUT (Presentation Look-up Table) using a given predfined * shape. * @param shape The P-LUT shape. See <i>DICOM ps 3.3, appendix B.18: * Presentation LUT Information Object Definition</i> for more information. * @return the UID of the created P-LUT * @throws InterruptedEx...
Creates a P-LUT (Presentation Look-up Table) using a given predfined shape
createPLUT
{ "repo_name": "medicayun/medicayundicom", "path": "dcm4che14/tags/DCM4JBOSS_2_5_3/src/java/org/dcm4che/client/PrintSCU.java", "license": "apache-2.0", "size": 29073 }
[ "java.io.IOException", "org.dcm4che.data.Dataset", "org.dcm4che.dict.Tags", "org.dcm4che.net.DcmServiceException" ]
import java.io.IOException; import org.dcm4che.data.Dataset; import org.dcm4che.dict.Tags; import org.dcm4che.net.DcmServiceException;
import java.io.*; import org.dcm4che.data.*; import org.dcm4che.dict.*; import org.dcm4che.net.*;
[ "java.io", "org.dcm4che.data", "org.dcm4che.dict", "org.dcm4che.net" ]
java.io; org.dcm4che.data; org.dcm4che.dict; org.dcm4che.net;
1,192,634
public Monomial divideBy(BigInteger number) { Monomial result = this; result.setCoefficient(Coefficient.valueOf(this.getCoefficient() .divide(number))); return result; } // divideBy(number)
Monomial function(BigInteger number) { Monomial result = this; result.setCoefficient(Coefficient.valueOf(this.getCoefficient() .divide(number))); return result; }
/** Divides <em>this</em> Monomial <em>in place</em> by a BigInteger. * This method can only be used internally since it does not clone. * @param number a constant number * @return this object, now containing the quotient */
Divides this Monomial in place by a BigInteger. This method can only be used internally since it does not clone
divideBy
{ "repo_name": "gfis/ramath", "path": "src/main/java/org/teherba/ramath/symbolic/Monomial.java", "license": "apache-2.0", "size": 45485 }
[ "java.math.BigInteger", "org.teherba.ramath.Coefficient" ]
import java.math.BigInteger; import org.teherba.ramath.Coefficient;
import java.math.*; import org.teherba.ramath.*;
[ "java.math", "org.teherba.ramath" ]
java.math; org.teherba.ramath;
1,536,594
public boolean index(GenericRow row);
boolean function(GenericRow row);
/** * expects a generic row that has all the columns * specified in the schema which was used to * initialize the realtime segment * @param row */
expects a generic row that has all the columns specified in the schema which was used to initialize the realtime segment
index
{ "repo_name": "izzizz/pinot", "path": "pinot-core/src/main/java/com/linkedin/pinot/core/realtime/MutableIndexSegment.java", "license": "apache-2.0", "size": 1458 }
[ "com.linkedin.pinot.core.data.GenericRow" ]
import com.linkedin.pinot.core.data.GenericRow;
import com.linkedin.pinot.core.data.*;
[ "com.linkedin.pinot" ]
com.linkedin.pinot;
1,399,164
private void readHeader() throws IOException { byte[] header = new byte[LZ4_MAX_HEADER_LENGTH]; // read first 6 bytes into buffer to check magic and FLG/BD descriptor flags bufferOffset = 6; if (in.read(header, 0, bufferOffset) != bufferOffset) { throw new IOException(PR...
void function() throws IOException { byte[] header = new byte[LZ4_MAX_HEADER_LENGTH]; bufferOffset = 6; if (in.read(header, 0, bufferOffset) != bufferOffset) { throw new IOException(PREMATURE_EOS); } if (MAGIC != Utils.readUnsignedIntLE(header, bufferOffset - 6)) { throw new IOException(NOT_SUPPORTED); } flg = FLG.from...
/** * Reads the magic number and frame descriptor from the underlying {@link InputStream}. * * @throws IOException */
Reads the magic number and frame descriptor from the underlying <code>InputStream</code>
readHeader
{ "repo_name": "WillCh/cs286A", "path": "dataMover/kafka/clients/src/main/java/org/apache/kafka/common/record/KafkaLZ4BlockInputStream.java", "license": "bsd-2-clause", "size": 7628 }
[ "java.io.IOException", "org.apache.kafka.common.record.KafkaLZ4BlockOutputStream", "org.apache.kafka.common.utils.Utils" ]
import java.io.IOException; import org.apache.kafka.common.record.KafkaLZ4BlockOutputStream; import org.apache.kafka.common.utils.Utils;
import java.io.*; import org.apache.kafka.common.record.*; import org.apache.kafka.common.utils.*;
[ "java.io", "org.apache.kafka" ]
java.io; org.apache.kafka;
1,308,219
@Override public void setPriceDifference (java.math.BigDecimal PriceDifference) { throw new IllegalArgumentException ("PriceDifference is virtual column"); }
void function (java.math.BigDecimal PriceDifference) { throw new IllegalArgumentException (STR); }
/** Set Preisdifferenz (imp. - int.). @param PriceDifference Preisdifferenz (imp. - int.) */
Set Preisdifferenz (imp. - int.)
setPriceDifference
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.swat/de.metas.swat.base/src/main/java-gen/de/metas/ordercandidate/model/X_C_OLCand.java", "license": "gpl-2.0", "size": 53872 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
831,046
@Test public void checkRealtimeUpdates() { // Local Declarations FakeGeometryBuilder fakeGeometryBuilder = new FakeGeometryBuilder(); // Register the ItemBuilders iCECore.registerItem(fakeGeometryBuilder); // Create an Item int id = Integer.parseInt(iCECore.createItem(fakeGeometryBuilder.getItemName(...
void function() { FakeGeometryBuilder fakeGeometryBuilder = new FakeGeometryBuilder(); iCECore.registerItem(fakeGeometryBuilder); int id = Integer.parseInt(iCECore.createItem(fakeGeometryBuilder.getItemName())); String msg = STRitem_id\":\"STR\STR + "\"client_key\":\"1234567890ABCDEFGHIJ1234567890ABCDEFGHIJ\STR + "\"po...
/** * This operation is responsible for testing the ability of the Core to post * updates from the ICEUpdater. */
This operation is responsible for testing the ability of the Core to post updates from the ICEUpdater
checkRealtimeUpdates
{ "repo_name": "wo-amlangwang/ice", "path": "org.eclipse.ice.core.test/src/org/eclipse/ice/core/test/CoreTester.java", "license": "epl-1.0", "size": 23947 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,446,939
if (locale == null) { locale = Locale.getDefault(); } return NumberFormat.getIntegerInstance(locale); }
if (locale == null) { locale = Locale.getDefault(); } return NumberFormat.getIntegerInstance(locale); }
/** * Returns the format used by * {@link #convertToPresentation(Integer, Class, Locale)} and * {@link #convertToModel(String, Class, Locale)} * * @param locale * The locale to use * @return A NumberFormat instance */
Returns the format used by <code>#convertToPresentation(Integer, Class, Locale)</code> and <code>#convertToModel(String, Class, Locale)</code>
getFormat
{ "repo_name": "peterl1084/framework", "path": "compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToIntegerConverter.java", "license": "apache-2.0", "size": 2830 }
[ "java.text.NumberFormat", "java.util.Locale" ]
import java.text.NumberFormat; import java.util.Locale;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
2,126,568
//----------------------------------------------------------------------- public Builder values(Map<CalculationResultKey, CalculatedValue> values) { JodaBeanUtils.notNull(values, "values"); this._values = values; return this; }
Builder function(Map<CalculationResultKey, CalculatedValue> values) { JodaBeanUtils.notNull(values, STR); this._values = values; return this; }
/** * Sets the values. * @param values the new value, not null * @return this, for chaining, not null */
Sets the values
values
{ "repo_name": "McLeodMoores/starling", "path": "projects/integration/src/main/java/com/opengamma/integration/regression/CalculationResults.java", "license": "apache-2.0", "size": 27759 }
[ "java.util.Map", "org.joda.beans.JodaBeanUtils" ]
import java.util.Map; import org.joda.beans.JodaBeanUtils;
import java.util.*; import org.joda.beans.*;
[ "java.util", "org.joda.beans" ]
java.util; org.joda.beans;
650,002
public final Property<ManageableHistoricalTimeSeries> timeSeries() { return metaBean().timeSeries().createProperty(this); }
final Property<ManageableHistoricalTimeSeries> function() { return metaBean().timeSeries().createProperty(this); }
/** * Gets the the {@code timeSeries} property. * @return the property, not null */
Gets the the timeSeries property
timeSeries
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Web/src/main/java/com/opengamma/web/historicaltimeseries/WebHistoricalTimeSeriesData.java", "license": "apache-2.0", "size": 17835 }
[ "com.opengamma.master.historicaltimeseries.ManageableHistoricalTimeSeries", "org.joda.beans.Property" ]
import com.opengamma.master.historicaltimeseries.ManageableHistoricalTimeSeries; import org.joda.beans.Property;
import com.opengamma.master.historicaltimeseries.*; import org.joda.beans.*;
[ "com.opengamma.master", "org.joda.beans" ]
com.opengamma.master; org.joda.beans;
920,989
EClass getGeometryInfo();
EClass getGeometryInfo();
/** * Returns the meta object for class '{@link org.bimserver.models.geometry.GeometryInfo <em>Info</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Info</em>'. * @see org.bimserver.models.geometry.GeometryInfo * @generated */
Returns the meta object for class '<code>org.bimserver.models.geometry.GeometryInfo Info</code>'.
getGeometryInfo
{ "repo_name": "opensourceBIM/BIMserver", "path": "PluginBase/generated/org/bimserver/models/geometry/GeometryPackage.java", "license": "agpl-3.0", "size": 57596 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,093,739
@FixFor( "MODE-1734" ) @Test public void shouldAllowMultipleThreadsToConcurrentlyCreateSmallNumberOfTopLevelNodes() throws Exception { final int totalOperations = 2; final int threads = 2; runConcurrently(totalOperations, threads, new CreateChildren("/", "nodeX", 1)); verify(...
@FixFor( STR ) void function() throws Exception { final int totalOperations = 2; final int threads = 2; runConcurrently(totalOperations, threads, new CreateChildren("/", "nodeX", 1)); verify(new NumberOfChildren(totalOperations, "/")); }
/** * Create a session, add a single node under the root, and close the session. Do this twice using 2 threads. Then verify that * there are 2 children under the root (except for the "/jcr:system" node). * * @throws Exception */
Create a session, add a single node under the root, and close the session. Do this twice using 2 threads. Then verify that there are 2 children under the root (except for the "/jcr:system" node)
shouldAllowMultipleThreadsToConcurrentlyCreateSmallNumberOfTopLevelNodes
{ "repo_name": "vhalbert/modeshape", "path": "modeshape-jcr/src/test/java/org/modeshape/jcr/ConcurrentWriteTest.java", "license": "apache-2.0", "size": 30492 }
[ "org.modeshape.common.FixFor" ]
import org.modeshape.common.FixFor;
import org.modeshape.common.*;
[ "org.modeshape.common" ]
org.modeshape.common;
2,044,960
public void startTutorial() { Dungeon dungeon = plugin.getMainConfig().getTutorialDungeon(); if (dungeon == null) { MessageUtil.sendMessage(player, DMessage.ERROR_TUTORIAL_DOES_NOT_EXIST.getMessage()); return; } if (plugin.getPermissionProvider() != null && p...
void function() { Dungeon dungeon = plugin.getMainConfig().getTutorialDungeon(); if (dungeon == null) { MessageUtil.sendMessage(player, DMessage.ERROR_TUTORIAL_DOES_NOT_EXIST.getMessage()); return; } if (plugin.getPermissionProvider() != null && plugin.getPermissionProvider().hasGroupSupport()) { String startGroup = pl...
/** * Starts the tutorial */
Starts the tutorial
startTutorial
{ "repo_name": "DRE2N/DungeonsXL", "path": "core/src/main/java/de/erethon/dungeonsxl/player/DGlobalPlayer.java", "license": "gpl-3.0", "size": 15305 }
[ "de.erethon.dungeonsxl.api.dungeon.Dungeon", "de.erethon.dungeonsxl.api.dungeon.Game", "de.erethon.dungeonsxl.api.event.group.GroupCreateEvent", "de.erethon.dungeonsxl.api.world.GameWorld", "de.erethon.dungeonsxl.config.DMessage", "de.erethon.dungeonsxl.dungeon.DGame", "de.erethon.dungeonsxl.util.common...
import de.erethon.dungeonsxl.api.dungeon.Dungeon; import de.erethon.dungeonsxl.api.dungeon.Game; import de.erethon.dungeonsxl.api.event.group.GroupCreateEvent; import de.erethon.dungeonsxl.api.world.GameWorld; import de.erethon.dungeonsxl.config.DMessage; import de.erethon.dungeonsxl.dungeon.DGame; import de.erethon.du...
import de.erethon.dungeonsxl.api.dungeon.*; import de.erethon.dungeonsxl.api.event.group.*; import de.erethon.dungeonsxl.api.world.*; import de.erethon.dungeonsxl.config.*; import de.erethon.dungeonsxl.dungeon.*; import de.erethon.dungeonsxl.util.commons.chat.*;
[ "de.erethon.dungeonsxl" ]
de.erethon.dungeonsxl;
1,374,376
public synchronized Object getSingleModelTarget() { int i = 0; Iterator iter = getTargets().iterator(); while (iter.hasNext()) { if(determineModelTarget(iter.next()) != null) { i++; } if (i > 1) { break; } ...
synchronized Object function() { int i = 0; Iterator iter = getTargets().iterator(); while (iter.hasNext()) { if(determineModelTarget(iter.next()) != null) { i++; } if (i > 1) { break; } } if (i == 1) { return modelTarget; } return null; }
/** * If there is only one model target, then it is returned. * Otherwise null. * * @return the single model target */
If there is only one model target, then it is returned. Otherwise null
getSingleModelTarget
{ "repo_name": "carvalhomb/tsmells", "path": "sample/argouml/argouml/org/argouml/ui/targetmanager/TargetManager.java", "license": "gpl-2.0", "size": 34904 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,388,202
public static String renderParameterInfoDataAsTable( Map<String, String> parameters) { return renderParameterInfoDataAsTable(parameters, true, -1); }
static String function( Map<String, String> parameters) { return renderParameterInfoDataAsTable(parameters, true, -1); }
/** * Renders a textual representation of provided parameter map. * * @param parameters * Map of parameters (key, value) * @return The rendered table representation as String * */
Renders a textual representation of provided parameter map
renderParameterInfoDataAsTable
{ "repo_name": "danimaniarqsoft/asterix-gen", "path": "asterix-modules/asterix-shell-core/src/main/java/org/springframework/shell/support/table/TableRenderer.java", "license": "mit", "size": 7490 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,446,876
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Group group) throws ServiceNotExistsException, GroupNotExistsException;
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Group group) throws ServiceNotExistsException, GroupNotExistsException;
/** * Get group required attributes for the service * <p> * PRIVILEGE: Get only those required attributes principal has access to. */
Get group required attributes for the service
getRequiredAttributes
{ "repo_name": "zoraseb/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/AttributesManager.java", "license": "bsd-2-clause", "size": 265364 }
[ "cz.metacentrum.perun.core.api.exceptions.GroupNotExistsException", "cz.metacentrum.perun.core.api.exceptions.ServiceNotExistsException", "java.util.List" ]
import cz.metacentrum.perun.core.api.exceptions.GroupNotExistsException; import cz.metacentrum.perun.core.api.exceptions.ServiceNotExistsException; import java.util.List;
import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
1,122,843
private void displayError(String errorMsg) { if (shell != null) { MessageDialog.openWarning(shell, "Warning", errorMsg); } }
void function(String errorMsg) { if (shell != null) { MessageDialog.openWarning(shell, STR, errorMsg); } }
/** * Display error. * * @param errorMsg * the error msg */
Display error
displayError
{ "repo_name": "knadikari/developer-studio", "path": "data-services/org.wso2.developerstudio.eclipse.ds.editor/src/org/wso2/developerstudio/eclipse/ds/presentation/DsActionBarContributor.java", "license": "apache-2.0", "size": 51874 }
[ "org.eclipse.jface.dialogs.MessageDialog" ]
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
950,183
public void removeTags(String[] tags) { this.services.getTaggingService().removeTags(this.nodeRef, Arrays.asList(tags)); updateTagProperty(); }
void function(String[] tags) { this.services.getTaggingService().removeTags(this.nodeRef, Arrays.asList(tags)); updateTagProperty(); }
/** * Removes all the tags from the node * * @param tags array of tag names */
Removes all the tags from the node
removeTags
{ "repo_name": "loftuxab/alfresco-community-loftux", "path": "projects/repository/source/java/org/alfresco/repo/jscript/ScriptNode.java", "license": "lgpl-3.0", "size": 164696 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,460,779
@SmallTest public void testResetDetach() throws Exception { TimeBase timeBase = new TimeBase(); MockClocks clocks = new MockClocks(); TestTimer timer = new TestTimer(clocks, 0, timeBase); timer.setCount(1); timer.setLoadedCount(2); timer.setLastCount(3); ...
void function() throws Exception { TimeBase timeBase = new TimeBase(); MockClocks clocks = new MockClocks(); TestTimer timer = new TestTimer(clocks, 0, timeBase); timer.setCount(1); timer.setLoadedCount(2); timer.setLastCount(3); timer.setUnpluggedCount(4); timer.setTotalTime(9223372036854775807L); timer.setLoadedTime(...
/** * Tests that reset() clears the correct times. */
Tests that reset() clears the correct times
testResetDetach
{ "repo_name": "xorware/android_frameworks_base", "path": "core/tests/coretests/src/com/android/internal/os/BatteryStatsTimerTest.java", "license": "apache-2.0", "size": 16728 }
[ "com.android.internal.os.BatteryStatsImpl", "junit.framework.Assert" ]
import com.android.internal.os.BatteryStatsImpl; import junit.framework.Assert;
import com.android.internal.os.*; import junit.framework.*;
[ "com.android.internal", "junit.framework" ]
com.android.internal; junit.framework;
144,031
@Override public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException { TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "STREX"); long baseOffset = Re...
void function(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException { TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "STREX"); long baseOffset = ReilHelpers.nextReilAddress(instructio...
/** * STREX{<cond>} <Rd>, <Rm>, [<Rn>] */
STREX{} , , []
translate
{ "repo_name": "chubbymaggie/binnavi", "path": "src/main/java/com/google/security/zynamics/reil/translators/arm/ARMStrexTranslator.java", "license": "apache-2.0", "size": 1723 }
[ "com.google.security.zynamics.reil.ReilHelpers", "com.google.security.zynamics.reil.ReilInstruction", "com.google.security.zynamics.reil.translators.ITranslationEnvironment", "com.google.security.zynamics.reil.translators.InternalTranslationException", "com.google.security.zynamics.reil.translators.Translat...
import com.google.security.zynamics.reil.ReilHelpers; import com.google.security.zynamics.reil.ReilInstruction; import com.google.security.zynamics.reil.translators.ITranslationEnvironment; import com.google.security.zynamics.reil.translators.InternalTranslationException; import com.google.security.zynamics.reil.transl...
import com.google.security.zynamics.reil.*; import com.google.security.zynamics.reil.translators.*; import com.google.security.zynamics.zylib.disassembly.*; import java.util.*;
[ "com.google.security", "java.util" ]
com.google.security; java.util;
2,248,775
private Set<TreeNode<T>> getRuleEndPointsInTree(final TreeNode<T> rule, final TreeNode<T> tree) { final Set<TreeNode<T>> endpoints = Sets.newIdentityHashSet(); final Deque<TreeNode<T>> ruleStack = new ArrayDeque<TreeNode<T>>(); final Deque<TreeNode<T>> treeStack = new ArrayDeque<TreeNode<T>>(); ruleStac...
Set<TreeNode<T>> function(final TreeNode<T> rule, final TreeNode<T> tree) { final Set<TreeNode<T>> endpoints = Sets.newIdentityHashSet(); final Deque<TreeNode<T>> ruleStack = new ArrayDeque<TreeNode<T>>(); final Deque<TreeNode<T>> treeStack = new ArrayDeque<TreeNode<T>>(); ruleStack.push(rule); treeStack.push(tree); wh...
/** * Returns a set of endpoint of this rule, given the tree. * * @param rule * @param tree * @return */
Returns a set of endpoint of this rule, given the tree
getRuleEndPointsInTree
{ "repo_name": "sachintyagi22/codemining-treelm", "path": "src/main/java/codemining/lm/tsg/TreeProbabilityComputer.java", "license": "bsd-3-clause", "size": 8494 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.Sets", "java.util.ArrayDeque", "java.util.Deque", "java.util.List", "java.util.Set" ]
import com.google.common.base.Preconditions; import com.google.common.collect.Sets; import java.util.ArrayDeque; import java.util.Deque; import java.util.List; import java.util.Set;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,930,098
@Override public void onSurfaceCreated(GL10 unused, EGLConfig config) { if (EXTRA_CHECK) Util.checkGlError("onSurfaceCreated start"); mEGLConfig = config; // Generate programs and data. BasicAlignedRect.createProgram(); TexturedAlignedRect.createProgram(); // Al...
void function(GL10 unused, EGLConfig config) { if (EXTRA_CHECK) Util.checkGlError(STR); mEGLConfig = config; BasicAlignedRect.createProgram(); TexturedAlignedRect.createProgram(); GameState gameState = mGameState; gameState.setTextResources(new TextResources(mTextConfig)); gameState.allocBorders(); gameState.allocBrick...
/** * Handles initialization when the surface is created. This generally happens when the * activity is started or resumed. In particular, this is called whenever the device * is rotated. * <p> * All OpenGL state, including programs, must be (re-)generated here. */
Handles initialization when the surface is created. This generally happens when the activity is started or resumed. In particular, this is called whenever the device is rotated. All OpenGL state, including programs, must be (re-)generated here
onSurfaceCreated
{ "repo_name": "singerli/android_breakout", "path": "src/com/faddensoft/breakout/GameSurfaceRenderer.java", "license": "apache-2.0", "size": 14102 }
[ "javax.microedition.khronos.egl.EGLConfig" ]
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.*;
[ "javax.microedition" ]
javax.microedition;
2,507,560
public LocationOccurrence getLocation() { return location; }
LocationOccurrence function() { return location; }
/** * Get the original location name extracted from the text. * @return the original occurrence of the location name */
Get the original location name extracted from the text
getLocation
{ "repo_name": "MadBomber/CLAVIN", "path": "src/main/java/com/bericotech/clavin/resolver/ResolvedLocation.java", "license": "apache-2.0", "size": 5073 }
[ "com.bericotech.clavin.extractor.LocationOccurrence" ]
import com.bericotech.clavin.extractor.LocationOccurrence;
import com.bericotech.clavin.extractor.*;
[ "com.bericotech.clavin" ]
com.bericotech.clavin;
2,354,672
@Test public void testGetModified_1() throws Exception { DataFileDescriptor fixture = new DataFileDescriptor(); fixture.setComments(""); fixture.setCreator(""); fixture.setName(""); fixture.setDataUrl(""); fixture.setId(new Integer(1)); fixture.set...
void function() throws Exception { DataFileDescriptor fixture = new DataFileDescriptor(); fixture.setComments(STRSTRSTR"); fixture.setId(new Integer(1)); fixture.setCreated(new Date()); fixture.setModified(new Date()); Date result = fixture.getModified(); assertNotNull(result); }
/** * Run the Date getModified() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 3:00 PM */
Run the Date getModified() method test
testGetModified_1
{ "repo_name": "kevinmcgoldrick/Tank", "path": "rest/api/datafile/src/test/java/com/intuit/tank/api/model/v1/datafile/DataFileDescriptorTest.java", "license": "epl-1.0", "size": 11697 }
[ "com.intuit.tank.api.model.v1.datafile.DataFileDescriptor", "java.util.Date", "org.junit.Assert" ]
import com.intuit.tank.api.model.v1.datafile.DataFileDescriptor; import java.util.Date; import org.junit.Assert;
import com.intuit.tank.api.model.v1.datafile.*; import java.util.*; import org.junit.*;
[ "com.intuit.tank", "java.util", "org.junit" ]
com.intuit.tank; java.util; org.junit;
621,430
private static List<InitializableField> extensions() { // only MULTIMEDIA is supported, but coded for future use Set<Extension> extensions = ImmutableSet.of(Extension.MULTIMEDIA); ImmutableList.Builder<InitializableField> builder = ImmutableList.builder(); for (Extension e : extensions) { builde...
static List<InitializableField> function() { Set<Extension> extensions = ImmutableSet.of(Extension.MULTIMEDIA); ImmutableList.Builder<InitializableField> builder = ImmutableList.builder(); for (Extension e : extensions) { builder.add(new InitializableField(GbifTerm.Multimedia, HiveColumns.columnFor(e), HiveDataTypes.TY...
/** * The fields stored in Avro which represent an extension. * * @return the list of fields that are exposed through Hive */
The fields stored in Avro which represent an extension
extensions
{ "repo_name": "gbif/occurrence", "path": "occurrence-hdfs-table/src/main/java/org/gbif/occurrence/download/hive/OccurrenceHDFSTableDefinition.java", "license": "apache-2.0", "size": 11911 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.ImmutableSet", "java.util.List", "java.util.Set", "org.gbif.api.vocabulary.Extension", "org.gbif.dwc.terms.GbifTerm" ]
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import java.util.List; import java.util.Set; import org.gbif.api.vocabulary.Extension; import org.gbif.dwc.terms.GbifTerm;
import com.google.common.collect.*; import java.util.*; import org.gbif.api.vocabulary.*; import org.gbif.dwc.terms.*;
[ "com.google.common", "java.util", "org.gbif.api", "org.gbif.dwc" ]
com.google.common; java.util; org.gbif.api; org.gbif.dwc;
798,594
@Override public void customizePopupMenu(TextEditorPanel source, JPopupMenu menu) { List<String> paths; BaseMenu submenu; JMenuItem menuitem; FlowPanel flowpanel; if (getOwner() instanceof FlowPanel) { flowpanel = (FlowPanel) getOwner(); paths = ActorUtils.extractActorNames(fl...
void function(TextEditorPanel source, JPopupMenu menu) { List<String> paths; BaseMenu submenu; JMenuItem menuitem; FlowPanel flowpanel; if (getOwner() instanceof FlowPanel) { flowpanel = (FlowPanel) getOwner(); paths = ActorUtils.extractActorNames(flowpanel.getCurrentFlow(), source.getContent()); if (paths.size() > 0) ...
/** * For customizing the popup menu. * * @param source the source, e.g., event * @param menu the menu to customize */
For customizing the popup menu
customizePopupMenu
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/gui/flow/FlowPanelNotificationArea.java", "license": "gpl-3.0", "size": 9945 }
[ "com.github.fracpete.jclipboardhelper.ClipboardHelper", "java.awt.event.ActionEvent", "java.util.List", "javax.swing.JMenuItem", "javax.swing.JPopupMenu" ]
import com.github.fracpete.jclipboardhelper.ClipboardHelper; import java.awt.event.ActionEvent; import java.util.List; import javax.swing.JMenuItem; import javax.swing.JPopupMenu;
import com.github.fracpete.jclipboardhelper.*; import java.awt.event.*; import java.util.*; import javax.swing.*;
[ "com.github.fracpete", "java.awt", "java.util", "javax.swing" ]
com.github.fracpete; java.awt; java.util; javax.swing;
195,092
private void drawTranslatedRenderedImage(RenderedImage img, Rectangle region, int i2uTransX, int i2uTransY) { // Cache tile grid info int tileGridXOffset = img.getTi...
void function(RenderedImage img, Rectangle region, int i2uTransX, int i2uTransY) { int tileGridXOffset = img.getTileGridXOffset(); int tileGridYOffset = img.getTileGridYOffset(); int tileWidth = img.getTileWidth(); int tileHeight = img.getTileHeight(); int minTileX = getTileIndex(region.x, tileGridXOffset, tileWidth); ...
/** * Draw a portion of a RenderedImage tile-by-tile with a given * integer image to user space translation. The user to * device transform must also be an integer translation. */
Draw a portion of a RenderedImage tile-by-tile with a given integer image to user space translation. The user to device transform must also be an integer translation
drawTranslatedRenderedImage
{ "repo_name": "greghaskins/openjdk-jdk7u-jdk", "path": "src/share/classes/sun/java2d/SunGraphics2D.java", "license": "gpl-2.0", "size": 129486 }
[ "java.awt.Rectangle", "java.awt.image.BufferedImage", "java.awt.image.ColorModel", "java.awt.image.Raster", "java.awt.image.RenderedImage", "java.awt.image.WritableRaster" ]
import java.awt.Rectangle; import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.Raster; import java.awt.image.RenderedImage; import java.awt.image.WritableRaster;
import java.awt.*; import java.awt.image.*;
[ "java.awt" ]
java.awt;
139,515
@Test public void testManualInstantiation() { this.tester.startPage(ManualInstantiationPage.class); this.tester.assertLabel("test1", "test1"); this.tester.assertLabel("test2", "test2"); assertTrue(getAutoWire().hasAutoComponentAnnotatedFields(ManualInstantiationPage.class)); }
void function() { this.tester.startPage(ManualInstantiationPage.class); this.tester.assertLabel("test1", "test1"); this.tester.assertLabel("test2", "test2"); assertTrue(getAutoWire().hasAutoComponentAnnotatedFields(ManualInstantiationPage.class)); }
/** * Assert that it is possible to overwrite the automatically created component * with a custom one. */
Assert that it is possible to overwrite the automatically created component with a custom one
testManualInstantiation
{ "repo_name": "wicket-acc/wicket-autowire", "path": "src/test/java/com/github/wicket/autowire/AutoWireTest.java", "license": "apache-2.0", "size": 6682 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,340,879
public void createConnectors(List<String> listeners) { List<Connector> connectors = new ArrayList<>(); for (String listener : listeners) { if (!listener.isEmpty()) { Connector connector = createConnector(listener); connectors.add(connector); ...
void function(List<String> listeners) { List<Connector> connectors = new ArrayList<>(); for (String listener : listeners) { if (!listener.isEmpty()) { Connector connector = createConnector(listener); connectors.add(connector); log.info(STR + listener); } } jettyServer.setConnectors(connectors.toArray(new Connector[conn...
/** * Adds Jetty connector for each configured listener */
Adds Jetty connector for each configured listener
createConnectors
{ "repo_name": "KevinLiLu/kafka", "path": "connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestServer.java", "license": "apache-2.0", "size": 14688 }
[ "java.util.ArrayList", "java.util.List", "org.eclipse.jetty.server.Connector" ]
import java.util.ArrayList; import java.util.List; import org.eclipse.jetty.server.Connector;
import java.util.*; import org.eclipse.jetty.server.*;
[ "java.util", "org.eclipse.jetty" ]
java.util; org.eclipse.jetty;
1,300,278
public void setGrandTotal (BigDecimal GrandTotal) { set_Value (COLUMNNAME_GrandTotal, GrandTotal); }
void function (BigDecimal GrandTotal) { set_Value (COLUMNNAME_GrandTotal, GrandTotal); }
/** Set Grand Total. @param GrandTotal Total amount of document */
Set Grand Total
setGrandTotal
{ "repo_name": "armenrz/adempiere", "path": "base/src/org/compiere/model/X_T_InvoiceGL.java", "license": "gpl-2.0", "size": 12251 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
158,682
public void encryptKey(EncryptedData encData) throws DigiDocException { // check key status first - nothing to encrypt? if(encData.getTransportKey() == null) throw new DigiDocException(DigiDocException.ERR_XMLENC_KEY_STATUS, "Transport key has not been initialized!", null); // check recipien...
void function(EncryptedData encData) throws DigiDocException { if(encData.getTransportKey() == null) throw new DigiDocException(DigiDocException.ERR_XMLENC_KEY_STATUS, STR, null); if(m_recipientsCert == null) throw new DigiDocException(DigiDocException.ERR_XMLENC_KEY_STATUS, STR, null); try { Cipher alg = Cipher.getIns...
/** * Encrypts the transport key * @param encData EncryptedData object containing the transport key * @throws DigiDocException for encryption errors */
Encrypts the transport key
encryptKey
{ "repo_name": "varh1i/jdigidoc", "path": "src/main/java/ee/sk/xmlenc/EncryptedKey.java", "license": "lgpl-2.1", "size": 14009 }
[ "ee.sk.digidoc.DigiDocException", "javax.crypto.Cipher" ]
import ee.sk.digidoc.DigiDocException; import javax.crypto.Cipher;
import ee.sk.digidoc.*; import javax.crypto.*;
[ "ee.sk.digidoc", "javax.crypto" ]
ee.sk.digidoc; javax.crypto;
1,420,877
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync( String resourceGroupName, String virtualNetworkGatewayName);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync( String resourceGroupName, String virtualNetworkGatewayName);
/** * Deletes the specified virtual network gateway. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.cor...
Deletes the specified virtual network gateway
deleteWithResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewaysClient.java", "license": "mit", "size": 135947 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import java.nio.*;
[ "com.azure.core", "java.nio" ]
com.azure.core; java.nio;
1,644,676
protected byte[] sign(final byte[] value) { if (this.signingKey == null) { return value; } if ("RSA".equalsIgnoreCase(this.signingKey.getAlgorithm())) { return EncodingUtils.signJwsRSASha512(this.signingKey, value); } return EncodingUtils.signJwsHMACSh...
byte[] function(final byte[] value) { if (this.signingKey == null) { return value; } if ("RSA".equalsIgnoreCase(this.signingKey.getAlgorithm())) { return EncodingUtils.signJwsRSASha512(this.signingKey, value); } return EncodingUtils.signJwsHMACSha512(this.signingKey, value); }
/** * Sign the array by first turning it into a base64 encoded string. * * @param value the value * @return the byte [ ] */
Sign the array by first turning it into a base64 encoded string
sign
{ "repo_name": "rrenomeron/cas", "path": "core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/cipher/AbstractCipherExecutor.java", "license": "apache-2.0", "size": 4588 }
[ "org.apereo.cas.util.EncodingUtils" ]
import org.apereo.cas.util.EncodingUtils;
import org.apereo.cas.util.*;
[ "org.apereo.cas" ]
org.apereo.cas;
692,668
public void storeGrades(AssessmentGradingData data, PublishedAssessmentIfc pub, HashMap publishedItemHash, HashMap publishedItemTextHash, HashMap publishedAnswerHash, boolean persistToDB, HashMap invalidFINMap, ArrayList invalidSALengthList) throws GradebookServiceE...
void function(AssessmentGradingData data, PublishedAssessmentIfc pub, HashMap publishedItemHash, HashMap publishedItemTextHash, HashMap publishedAnswerHash, boolean persistToDB, HashMap invalidFINMap, ArrayList invalidSALengthList) throws GradebookServiceException, FinFormatException { log.debug(STR + data.getSubmitted...
/** * Assume this is a new item. */
Assume this is a new item
storeGrades
{ "repo_name": "zqian/sakai", "path": "samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/services/GradingService.java", "license": "apache-2.0", "size": 143447 }
[ "java.util.ArrayList", "java.util.HashMap", "org.sakaiproject.tool.assessment.data.dao.grading.AssessmentGradingData", "org.sakaiproject.tool.assessment.data.ifc.assessment.PublishedAssessmentIfc" ]
import java.util.ArrayList; import java.util.HashMap; import org.sakaiproject.tool.assessment.data.dao.grading.AssessmentGradingData; import org.sakaiproject.tool.assessment.data.ifc.assessment.PublishedAssessmentIfc;
import java.util.*; import org.sakaiproject.tool.assessment.data.dao.grading.*; import org.sakaiproject.tool.assessment.data.ifc.assessment.*;
[ "java.util", "org.sakaiproject.tool" ]
java.util; org.sakaiproject.tool;
1,843,169
if (status.equals(HttpResponseStatus.FOUND) || status.equals(HttpResponseStatus.MOVED_PERMANENTLY) || status.equals(HttpResponseStatus.TEMPORARY_REDIRECT)) { return true; } else { return false; } } /** * Tells if HTTP response server is not found. * * @param status i...
if (status.equals(HttpResponseStatus.FOUND) status.equals(HttpResponseStatus.MOVED_PERMANENTLY) status.equals(HttpResponseStatus.TEMPORARY_REDIRECT)) { return true; } else { return false; } } /** * Tells if HTTP response server is not found. * * @param status instance of {@code HttpResponseStatus} * @return {@code true...
/** * Tells if HTTP response server has moved its {@code URL}. * * @param status instance of {@code HttpResponseStatus} * @return {@code true} if {@code URL} is moved; otherwise, * {@code false} */
Tells if HTTP response server has moved its URL
isMoved
{ "repo_name": "didclab/stork", "path": "stork/module/http/HTTPResponseCode.java", "license": "mit", "size": 1938 }
[ "io.netty.handler.codec.http.HttpResponseStatus" ]
import io.netty.handler.codec.http.HttpResponseStatus;
import io.netty.handler.codec.http.*;
[ "io.netty.handler" ]
io.netty.handler;
2,380,302
@SuppressWarnings("rawtypes") List<ProcessorAdapter> getAllProcessorAdapters();
@SuppressWarnings(STR) List<ProcessorAdapter> getAllProcessorAdapters();
/** * Returns all processor adapters. * * @return all processor adapters. */
Returns all processor adapters
getAllProcessorAdapters
{ "repo_name": "softelnet/sponge", "path": "sponge-api/src/main/java/org/openksavi/sponge/engine/ProcessorManager.java", "license": "apache-2.0", "size": 4590 }
[ "java.util.List", "org.openksavi.sponge.ProcessorAdapter" ]
import java.util.List; import org.openksavi.sponge.ProcessorAdapter;
import java.util.*; import org.openksavi.sponge.*;
[ "java.util", "org.openksavi.sponge" ]
java.util; org.openksavi.sponge;
322,859
public static ArrayList<ValuedHistoryRecord> getPreviousResultsForQuery(Context context, String query) { ArrayList<ValuedHistoryRecord> records; SQLiteDatabase db = getDatabase(context); // Cursor query (String tabl...
static ArrayList<ValuedHistoryRecord> function(Context context, String query) { ArrayList<ValuedHistoryRecord> records; SQLiteDatabase db = getDatabase(context); Cursor cursor = db.query(STR, new String[]{STR, STR}, STR, new String[]{query + "%"}, STR, null, STR, "10"); records = readCursor(cursor); cursor.close(); ret...
/** * Retrieve previously selected items for the query * * @param context android context * @param query query to run * @return records with number of use */
Retrieve previously selected items for the query
getPreviousResultsForQuery
{ "repo_name": "nmitsou/KISS", "path": "app/src/main/java/fr/neamar/kiss/db/DBHelper.java", "license": "gpl-3.0", "size": 14039 }
[ "android.content.Context", "android.database.Cursor", "android.database.sqlite.SQLiteDatabase", "java.util.ArrayList" ]
import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.util.ArrayList;
import android.content.*; import android.database.*; import android.database.sqlite.*; import java.util.*;
[ "android.content", "android.database", "java.util" ]
android.content; android.database; java.util;
2,826,932
public void updateCurrentFundsByPendingLedgerEntry(Collection<AccountStatusCurrentFunds> balanceCollection, Map fieldValues, String pendingEntryOption, boolean isConsolidated);
void function(Collection<AccountStatusCurrentFunds> balanceCollection, Map fieldValues, String pendingEntryOption, boolean isConsolidated);
/** * update a given balance collection with the pending entry obtained from the given field values and pending entry option * * @param balanceCollection the given ledger balance collection * @param fieldValues the given field values * @param pendingEntryOption the given pending entry opti...
update a given balance collection with the pending entry obtained from the given field values and pending entry option
updateCurrentFundsByPendingLedgerEntry
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/ld/service/LaborInquiryOptionsService.java", "license": "agpl-3.0", "size": 5069 }
[ "java.util.Collection", "java.util.Map", "org.kuali.kfs.module.ld.businessobject.AccountStatusCurrentFunds" ]
import java.util.Collection; import java.util.Map; import org.kuali.kfs.module.ld.businessobject.AccountStatusCurrentFunds;
import java.util.*; import org.kuali.kfs.module.ld.businessobject.*;
[ "java.util", "org.kuali.kfs" ]
java.util; org.kuali.kfs;
2,151,955
public LogEntryBuilder requestTime(final Date requestTime) { if (requestTime == null) { throw new IllegalArgumentException("Argument 'requestTime' can not be null."); } this.requestTime = requestTime; return this; }
LogEntryBuilder function(final Date requestTime) { if (requestTime == null) { throw new IllegalArgumentException(STR); } this.requestTime = requestTime; return this; }
/** * Sets the time the request was received. * * @param requestTime * the request time * @throws IllegalArgumentException * if the given argument is <code>null</code> * @return itself, for chaining */
Sets the time the request was received
requestTime
{ "repo_name": "before/jacclog", "path": "net.sf.jacclog.api/src/main/java/net/sf/jacclog/api/domain/LogEntryBuilder.java", "license": "apache-2.0", "size": 20347 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,323,174
List<AuditEvent> find(String principal, Instant after, String type);
List<AuditEvent> find(String principal, Instant after, String type);
/** * Find audit events of specified type relating to the specified principal that * occurred {@link Instant#isAfter(Instant) after} the time provided. * @param principal the principal name to search for (or {@code null} if unrestricted) * @param after time after which an event must have occurred (or {@code nul...
Find audit events of specified type relating to the specified principal that occurred <code>Instant#isAfter(Instant) after</code> the time provided
find
{ "repo_name": "yangdd1205/spring-boot", "path": "spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/audit/AuditEventRepository.java", "license": "mit", "size": 1560 }
[ "java.time.Instant", "java.util.List" ]
import java.time.Instant; import java.util.List;
import java.time.*; import java.util.*;
[ "java.time", "java.util" ]
java.time; java.util;
1,324,850
protected boolean versionMeetsMinimum(int major, int minor) throws SQLException { return versionMeetsMinimum(major, minor, 0); }
boolean function(int major, int minor) throws SQLException { return versionMeetsMinimum(major, minor, 0); }
/** * Checks whether the database we're connected to meets the given version * minimum * * @param major the major version to meet * @param minor the minor version to meet * * @return boolean if the major/minor is met * * @throws SQLException if an error occurs. */
Checks whether the database we're connected to meets the given version minimum
versionMeetsMinimum
{ "repo_name": "devoof/jPrinterAdmin", "path": "mysql-connector-java-5.1.23/src/testsuite/BaseTestCase.java", "license": "gpl-2.0", "size": 34187 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,938,530
public List<Organization> search(SearchCriteria search, SortCriteria sort) throws DataAccException { return super.search(Organization.class,search,sort); }
List<Organization> function(SearchCriteria search, SortCriteria sort) throws DataAccException { return super.search(Organization.class,search,sort); }
/** * Get specified Organization objects from database sorted by the given criteria * @param search search criteria * @param sort the sorting criteria * @return a list with Organization objects matching the search criteria * @throws DataAccException on error */
Get specified Organization objects from database sorted by the given criteria
search
{ "repo_name": "autentia/TNTConcept", "path": "tntconcept-core/src/main/java/com/autentia/tnt/dao/hibernate/OrganizationDAO.java", "license": "gpl-3.0", "size": 4875 }
[ "com.autentia.tnt.businessobject.Organization", "com.autentia.tnt.dao.DataAccException", "com.autentia.tnt.dao.SearchCriteria", "com.autentia.tnt.dao.SortCriteria", "java.util.List" ]
import com.autentia.tnt.businessobject.Organization; import com.autentia.tnt.dao.DataAccException; import com.autentia.tnt.dao.SearchCriteria; import com.autentia.tnt.dao.SortCriteria; import java.util.List;
import com.autentia.tnt.businessobject.*; import com.autentia.tnt.dao.*; import java.util.*;
[ "com.autentia.tnt", "java.util" ]
com.autentia.tnt; java.util;
345,322
public ExtensionResultStatusType getSolrDocumentId(SolrInputDocument document, Product product, String[] returnContainer);
ExtensionResultStatusType function(SolrInputDocument document, Product product, String[] returnContainer);
/** * In certain scenarios, we may want to produce a different Solr document id than the default. * If this method returns {@link ExtensionResultStatusType#HANDLED}, the value placed in the 0th element * in the returnContainer should be used. * * @param document * @param product * @r...
In certain scenarios, we may want to produce a different Solr document id than the default. If this method returns <code>ExtensionResultStatusType#HANDLED</code>, the value placed in the 0th element in the returnContainer should be used
getSolrDocumentId
{ "repo_name": "sanlingdd/broadleaf", "path": "core/broadleaf-framework/src/main/java/org/broadleafcommerce/core/search/service/solr/SolrSearchServiceExtensionHandler.java", "license": "apache-2.0", "size": 5306 }
[ "org.apache.solr.common.SolrInputDocument", "org.broadleafcommerce.common.extension.ExtensionResultStatusType", "org.broadleafcommerce.core.catalog.domain.Product" ]
import org.apache.solr.common.SolrInputDocument; import org.broadleafcommerce.common.extension.ExtensionResultStatusType; import org.broadleafcommerce.core.catalog.domain.Product;
import org.apache.solr.common.*; import org.broadleafcommerce.common.extension.*; import org.broadleafcommerce.core.catalog.domain.*;
[ "org.apache.solr", "org.broadleafcommerce.common", "org.broadleafcommerce.core" ]
org.apache.solr; org.broadleafcommerce.common; org.broadleafcommerce.core;
1,639,646
public boolean stopEditing(FLyrVect layer, MapControl mapControl) { VectorialEditableAdapter vea = (VectorialEditableAdapter) layer .getSource(); int resp = JOptionPane.NO_OPTION; try { if (layer.isWritable()) { resp = JOptionPane.showConfirmDialog( (Component) PluginServices.getMainFrame(), Plug...
boolean function(FLyrVect layer, MapControl mapControl) { VectorialEditableAdapter vea = (VectorialEditableAdapter) layer .getSource(); int resp = JOptionPane.NO_OPTION; try { if (layer.isWritable()) { resp = JOptionPane.showConfirmDialog( (Component) PluginServices.getMainFrame(), PluginServices.getText(this, STR) + S...
/** * DOCUMENT ME! */
DOCUMENT ME
stopEditing
{ "repo_name": "iCarto/siga", "path": "extCAD/src/com/iver/cit/gvsig/StopEditing.java", "license": "gpl-3.0", "size": 17610 }
[ "com.hardcode.gdbms.driver.exceptions.InitializeWriterException", "com.hardcode.gdbms.driver.exceptions.ReadDriverException", "com.iver.andami.PluginServices", "com.iver.andami.messages.NotificationManager", "com.iver.cit.gvsig.exceptions.layers.CancelEditingLayerException", "com.iver.cit.gvsig.exceptions...
import com.hardcode.gdbms.driver.exceptions.InitializeWriterException; import com.hardcode.gdbms.driver.exceptions.ReadDriverException; import com.iver.andami.PluginServices; import com.iver.andami.messages.NotificationManager; import com.iver.cit.gvsig.exceptions.layers.CancelEditingLayerException; import com.iver.cit...
import com.hardcode.gdbms.driver.exceptions.*; import com.iver.andami.*; import com.iver.andami.messages.*; import com.iver.cit.gvsig.exceptions.layers.*; import com.iver.cit.gvsig.exceptions.table.*; import com.iver.cit.gvsig.exceptions.visitors.*; import com.iver.cit.gvsig.fmap.*; import com.iver.cit.gvsig.fmap.editi...
[ "com.hardcode.gdbms", "com.iver.andami", "com.iver.cit", "java.awt", "javax.swing" ]
com.hardcode.gdbms; com.iver.andami; com.iver.cit; java.awt; javax.swing;
1,474,891
@Test public void testIsEntryWithinCategory_notFound() { List entriesList = new ArrayList(); entriesList.add(createParentCatalogEntryWithChildren()); CatalogEntry toBeCheckedEntry = mock(CatalogEntry.class); when(toBeCheckedEntry.getKey()).thenReturn(new Long(catalogEntryKey3))...
void function() { List entriesList = new ArrayList(); entriesList.add(createParentCatalogEntryWithChildren()); CatalogEntry toBeCheckedEntry = mock(CatalogEntry.class); when(toBeCheckedEntry.getKey()).thenReturn(new Long(catalogEntryKey3)); assertFalse(catalogService.isEntryWithinCategory(toBeCheckedEntry, entriesList)...
/** * Test method 'isEntryWithinCategory', catalog-entry has other category. CatalogEntry 1 (root) => CatalogEntry 2 CatalogEntry 3 */
Test method 'isEntryWithinCategory', catalog-entry has other category. CatalogEntry 1 (root) => CatalogEntry 2 CatalogEntry 3
testIsEntryWithinCategory_notFound
{ "repo_name": "huihoo/olat", "path": "olat7.8/src/test/java/org/olat/lms/catalog/CatalogServiceImplTest.java", "license": "apache-2.0", "size": 19336 }
[ "java.util.ArrayList", "java.util.List", "org.junit.Assert", "org.mockito.Mockito", "org.olat.data.catalog.CatalogEntry" ]
import java.util.ArrayList; import java.util.List; import org.junit.Assert; import org.mockito.Mockito; import org.olat.data.catalog.CatalogEntry;
import java.util.*; import org.junit.*; import org.mockito.*; import org.olat.data.catalog.*;
[ "java.util", "org.junit", "org.mockito", "org.olat.data" ]
java.util; org.junit; org.mockito; org.olat.data;
160,318
public void applicationFinished(ApplicationId applicationId) { processDelegationTokenRenewerEvent(new DelegationTokenRenewerEvent( applicationId, DelegationTokenRenewerEventType.FINISH_APPLICATION)); }
void function(ApplicationId applicationId) { processDelegationTokenRenewerEvent(new DelegationTokenRenewerEvent( applicationId, DelegationTokenRenewerEventType.FINISH_APPLICATION)); }
/** * Removing delegation token for completed applications. * @param applicationId completed application */
Removing delegation token for completed applications
applicationFinished
{ "repo_name": "vesense/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java", "license": "apache-2.0", "size": 30187 }
[ "org.apache.hadoop.yarn.api.records.ApplicationId" ]
import org.apache.hadoop.yarn.api.records.ApplicationId;
import org.apache.hadoop.yarn.api.records.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,268,234
@SuppressWarnings("unchecked") static <E, T extends Collection<E>> T newInstance(Class<T> collectionClass) { if (List.class.isAssignableFrom(collectionClass)) { return (T) new ArrayList<E>(); } else if (Set.class.isAssignableFrom(collectionClass)) { return (T) new HashSet<E>(); ...
@SuppressWarnings(STR) static <E, T extends Collection<E>> T newInstance(Class<T> collectionClass) { if (List.class.isAssignableFrom(collectionClass)) { return (T) new ArrayList<E>(); } else if (Set.class.isAssignableFrom(collectionClass)) { return (T) new HashSet<E>(); } else { throw new IllegalArgumentException(STR +...
/** * Creates a new collection instance. The runtime collection subtype of the * returned * instance matches that of the input collection, but the actual class may * differ. * <p> * So for a {@link LinkedList} argument, the result is guaranteed to be a * {@link List}. It may, however,...
Creates a new collection instance. The runtime collection subtype of the returned instance matches that of the input collection, but the actual class may differ. So for a <code>LinkedList</code> argument, the result is guaranteed to be a <code>List</code>. It may, however, be an <code>ArrayList</code> rather than a Lin...
newInstance
{ "repo_name": "pires/hibernate-postgres-jsonb", "path": "src/main/java/com/github/pires/example/hibernate/user/types/CollectionUserType.java", "license": "apache-2.0", "size": 3904 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,344,586
public String getFileName() { return this.item.getName() != null ? FilenameUtils.getName(this.item.getName()) : null; }
String function() { return this.item.getName() != null ? FilenameUtils.getName(this.item.getName()) : null; }
/** * Returns only the file name (without path). Usually it is the same result as in {@link #getOriginalFilename()}, * except in IE, where path is generally also included. * * @return the filename without path info. * @since 1.2.2 */
Returns only the file name (without path). Usually it is the same result as in <code>#getOriginalFilename()</code>, except in IE, where path is generally also included
getFileName
{ "repo_name": "nortal/araneaframework", "path": "src/org/araneaframework/uilib/support/FileInfo.java", "license": "apache-2.0", "size": 3608 }
[ "org.apache.commons.io.FilenameUtils" ]
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.*;
[ "org.apache.commons" ]
org.apache.commons;
191,011
public static Type fromString(String s) { for (Type type : Type.values()) { if (type.toString().equals(s.toLowerCase())) { return type; } } return null; } } // String constants static final String PEOPLE...
static Type function(String s) { for (Type type : Type.values()) { if (type.toString().equals(s.toLowerCase())) { return type; } } return null; } } static final String PEOPLE_FLOWS_SELECTED_ATTRIBUTE = STR; public static final String ATTRIBUTE_FIELD_NAME = STR; public static final String NAME_ATTRIBUTE_FIELD = STR; pri...
/** * for each type, check the input with the lowercase version of the type name, and returns any match. * @param s the type to retrieve * @return the type, or null if a match is not found. */
for each type, check the input with the lowercase version of the type name, and returns any match
fromString
{ "repo_name": "ewestfal/rice", "path": "rice-middleware/krms/impl/src/main/java/org/kuali/rice/krms/impl/peopleflow/PeopleFlowActionTypeService.java", "license": "apache-2.0", "size": 17456 }
[ "org.kuali.rice.core.api.config.property.ConfigurationService", "org.kuali.rice.kew.api.peopleflow.PeopleFlowService" ]
import org.kuali.rice.core.api.config.property.ConfigurationService; import org.kuali.rice.kew.api.peopleflow.PeopleFlowService;
import org.kuali.rice.core.api.config.property.*; import org.kuali.rice.kew.api.peopleflow.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,606,741
public static boolean isSessionTransactional(Session session, SessionFactory sessionFactory) { if (sessionFactory == null) { return false; } SessionHolder sessionHolder = (SessionHolder) TransactionSynchronizationManager.getResource(sessionFactory); return (sessionHolder != null && session == se...
static boolean function(Session session, SessionFactory sessionFactory) { if (sessionFactory == null) { return false; } SessionHolder sessionHolder = (SessionHolder) TransactionSynchronizationManager.getResource(sessionFactory); return (sessionHolder != null && session == sessionHolder.getSession()); }
/** * Return whether the given TopLink Session is transactional, that is, * bound to the current thread by Spring's transaction facilities. * @param session the TopLink Session to check * @param sessionFactory TopLink SessionFactory that the Session was created with * (can be <code>null</code>) * @ret...
Return whether the given TopLink Session is transactional, that is, bound to the current thread by Spring's transaction facilities
isSessionTransactional
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/orm/toplink/SessionFactoryUtils.java", "license": "unlicense", "size": 9605 }
[ "oracle.toplink.sessions.Session", "org.springframework.transaction.support.TransactionSynchronizationManager" ]
import oracle.toplink.sessions.Session; import org.springframework.transaction.support.TransactionSynchronizationManager;
import oracle.toplink.sessions.*; import org.springframework.transaction.support.*;
[ "oracle.toplink.sessions", "org.springframework.transaction" ]
oracle.toplink.sessions; org.springframework.transaction;
1,207,270
public Link getLink(String activityRef, String tagCriteriaRef) throws PermissionException;
Link function(String activityRef, String tagCriteriaRef) throws PermissionException;
/** * Method to get the link between the activity identified by the given * reference and the given tagCriteria. * * @param activityRef * A reference for the activity to which this link is being * created. * @param tagCriteriaRef * The tagCriteriaRef to search for. * ...
Method to get the link between the activity identified by the given reference and the given tagCriteria
getLink
{ "repo_name": "harfalm/Sakai-10.1", "path": "taggable/taggable-api/api/src/java/org/sakaiproject/taggable/api/LinkManager.java", "license": "apache-2.0", "size": 4901 }
[ "org.sakaiproject.exception.PermissionException", "org.sakaiproject.taggable.api.Link" ]
import org.sakaiproject.exception.PermissionException; import org.sakaiproject.taggable.api.Link;
import org.sakaiproject.exception.*; import org.sakaiproject.taggable.api.*;
[ "org.sakaiproject.exception", "org.sakaiproject.taggable" ]
org.sakaiproject.exception; org.sakaiproject.taggable;
2,657,017
public void start() throws LifecycleException { // Validate and update our current component state if (started) { throw new LifecycleException( sm.getString("requestFilterValve.alreadyStarted")); } if (!allowValid || !denyValid) { throw ne...
void function() throws LifecycleException { if (started) { throw new LifecycleException( sm.getString(STR)); } if (!allowValid !denyValid) { throw new LifecycleException( sm.getString(STR)); } lifecycle.fireLifecycleEvent(START_EVENT, null); started = true; }
/** * Prepare for the beginning of active use of the public methods of this * component. This method should be called after <code>configure()</code>, * and before any of the public methods of the component are utilized. * * @exception LifecycleException if this component detects a fatal error ...
Prepare for the beginning of active use of the public methods of this component. This method should be called after <code>configure()</code>, and before any of the public methods of the component are utilized
start
{ "repo_name": "plumer/codana", "path": "tomcat_files/6.0.43/RequestFilterValve.java", "license": "mit", "size": 14668 }
[ "org.apache.catalina.LifecycleException" ]
import org.apache.catalina.LifecycleException;
import org.apache.catalina.*;
[ "org.apache.catalina" ]
org.apache.catalina;
379,076
@Override public ShoppingCartItemEntity addItem(Long clientid, ShoppingCartItemEntity entity) { ShoppingCartItemEntity currentItem = this.getCurrentItem(clientid, entity.getArtwork().getId()); if (currentItem != null) { currentItem.setQty(currentItem.getQty() + 1); ...
ShoppingCartItemEntity function(Long clientid, ShoppingCartItemEntity entity) { ShoppingCartItemEntity currentItem = this.getCurrentItem(clientid, entity.getArtwork().getId()); if (currentItem != null) { currentItem.setQty(currentItem.getQty() + 1); persistence.update(currentItem); return currentItem; } ClientEntity cl...
/** * Se encarga de crear un Item en la base de datos. * * @param entity Objeto de ItemEntity con los datos nuevos * @param clientid id del Client el cual sera padre del nuevo Item. * @return Objeto de ItemEntity con los datos nuevos y su ID. * @generated */
Se encarga de crear un Item en la base de datos
addItem
{ "repo_name": "Uniandes-MISO4203/artwork-201620-2", "path": "artwork-logic/src/main/java/co/edu/uniandes/csw/artwork/ejbs/ShoppingCartItemLogic.java", "license": "mit", "size": 4751 }
[ "co.edu.uniandes.csw.artwork.entities.ArtworkEntity", "co.edu.uniandes.csw.artwork.entities.ClientEntity", "co.edu.uniandes.csw.artwork.entities.ShoppingCartItemEntity" ]
import co.edu.uniandes.csw.artwork.entities.ArtworkEntity; import co.edu.uniandes.csw.artwork.entities.ClientEntity; import co.edu.uniandes.csw.artwork.entities.ShoppingCartItemEntity;
import co.edu.uniandes.csw.artwork.entities.*;
[ "co.edu.uniandes" ]
co.edu.uniandes;
815,950
@Test public void testGetChildren() throws Throwable { AtomixDocumentTree tree = createAtomixClient().getResource(UUID.randomUUID().toString(), AtomixDocumentTree.class).join(); tree.create(path("root.a"), "a".getBytes()).join(); tree.create(path("root.a.b"), "ab".getByte...
void function() throws Throwable { AtomixDocumentTree tree = createAtomixClient().getResource(UUID.randomUUID().toString(), AtomixDocumentTree.class).join(); tree.create(path(STR), "a".getBytes()).join(); tree.create(path(STR), "ab".getBytes()).join(); tree.create(path(STR), "ac".getBytes()).join(); Map<String, Version...
/** * Tests getChildren. */
Tests getChildren
testGetChildren
{ "repo_name": "sdnwiselab/onos", "path": "core/store/primitives/src/test/java/org/onosproject/store/primitives/resources/impl/AtomixDocumentTreeTest.java", "license": "apache-2.0", "size": 16775 }
[ "java.util.Map", "java.util.UUID", "org.junit.Assert", "org.onosproject.store.service.Versioned" ]
import java.util.Map; import java.util.UUID; import org.junit.Assert; import org.onosproject.store.service.Versioned;
import java.util.*; import org.junit.*; import org.onosproject.store.service.*;
[ "java.util", "org.junit", "org.onosproject.store" ]
java.util; org.junit; org.onosproject.store;
2,715,840
public Map<String, Object> getObjects() { return objects; }
Map<String, Object> function() { return objects; }
/** * Returns the object lookup table. */
Returns the object lookup table
getObjects
{ "repo_name": "dpisarewski/gka_wise12", "path": "src/com/mxgraph/io/mxCodec.java", "license": "lgpl-2.1", "size": 11459 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,428,411
Scene getScene() throws IOException; default StageStyle getPreferredStageStyle() { return StageStyle.DECORATED; }
Scene getScene() throws IOException; default StageStyle getPreferredStageStyle() { return StageStyle.DECORATED; }
/** * Returns the root node to be used within the Stage. This method can be called when the bundle is registered and * unregistered. The same object must be returned whenever this method is called. * @return the root node. * @throws IOException can be thrown if inflating an FXML file as part of the ...
Returns the root node to be used within the Stage. This method can be called when the bundle is registered and unregistered. The same object must be returned whenever this method is called
getScene
{ "repo_name": "jtkb/osgifx", "path": "boot/src/main/java/com/javatechnics/flexfx/scene/SceneService.java", "license": "apache-2.0", "size": 1667 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,432,478
void flush() throws IOException;
void flush() throws IOException;
/** * Executes all the buffered, asynchronous {@link Mutation} operations and waits until they * are done. * * @throws IOException if a remote or network exception occurs. */
Executes all the buffered, asynchronous <code>Mutation</code> operations and waits until they are done
flush
{ "repo_name": "juwi/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutator.java", "license": "apache-2.0", "size": 5284 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
61,048
public static List<ExtensionElementProvider<ExtensionElement>> getExtensionProviders() { List<ExtensionElementProvider<ExtensionElement>> providers = new ArrayList<>(extensionProviders.size()); providers.addAll(extensionProviders.values()); return providers; }
static List<ExtensionElementProvider<ExtensionElement>> function() { List<ExtensionElementProvider<ExtensionElement>> providers = new ArrayList<>(extensionProviders.size()); providers.addAll(extensionProviders.values()); return providers; }
/** * Returns an unmodifiable collection of all PacketExtensionProvider instances. Each object * in the collection will either be a PacketExtensionProvider instance, or a Class object * that implements the PacketExtensionProvider interface. * * @return all PacketExtensionProvider instances. ...
Returns an unmodifiable collection of all PacketExtensionProvider instances. Each object in the collection will either be a PacketExtensionProvider instance, or a Class object that implements the PacketExtensionProvider interface
getExtensionProviders
{ "repo_name": "Tibo-lg/Smack", "path": "smack-core/src/main/java/org/jivesoftware/smack/provider/ProviderManager.java", "license": "apache-2.0", "size": 14726 }
[ "java.util.ArrayList", "java.util.List", "org.jivesoftware.smack.packet.ExtensionElement" ]
import java.util.ArrayList; import java.util.List; import org.jivesoftware.smack.packet.ExtensionElement;
import java.util.*; import org.jivesoftware.smack.packet.*;
[ "java.util", "org.jivesoftware.smack" ]
java.util; org.jivesoftware.smack;
2,053,928
public void init(String endpoint, DateTime date) { this.endpoint = endpoint; this.date = date; }
void function(String endpoint, DateTime date) { this.endpoint = endpoint; this.date = date; }
/** * class initialisation with following arguments * @param endpoint the endpoint or cgate serial to send to ex (MZ29EBX000) * @param date the day and time this task will be executed * */
class initialisation with following arguments
init
{ "repo_name": "USEF-Foundation/ri.usef.energy", "path": "usef-build/usef-hoogdalem/usef-workflow-hd/usef-hd-agr1/src/main/java/nl/energieprojecthoogdalem/messageservice/scheduleservice/tasks/PrepareTask.java", "license": "apache-2.0", "size": 2555 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,302,906
public View findTopChildUnder(int x, int y) { final int childCount = mParentView.getChildCount(); for (int i = childCount - 1; i >= 0; i--) { final View child = mParentView.getChildAt(mCallback.getOrderedChildIndex(i)); if (x >= child.getLeft() && x < child.getRight() && ...
View function(int x, int y) { final int childCount = mParentView.getChildCount(); for (int i = childCount - 1; i >= 0; i--) { final View child = mParentView.getChildAt(mCallback.getOrderedChildIndex(i)); if (x >= child.getLeft() && x < child.getRight() && y >= child.getTop() && y < child.getBottom()) { return child; } ...
/** * Find the topmost child under the given point within the parent view's coordinate system. * The child order is determined using {@link Callback#getOrderedChildIndex(int)}. * * @param x X position to test in the parent's coordinate system * @param y Y position to test in the parent's coordi...
Find the topmost child under the given point within the parent view's coordinate system. The child order is determined using <code>Callback#getOrderedChildIndex(int)</code>
findTopChildUnder
{ "repo_name": "haoxiongqin/HealthNews", "path": "app/src/main/java/com/keephealth/app/widget/ViewDragHelper.java", "license": "apache-2.0", "size": 61529 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,074,693
public Object apply(String source, int lineNo, int columnNo, Object funcBody, Vector paramNames, Vector arguments) throws BSFException { Object object = eval(source, lineNo, columnNo, funcBody); if (object instanceof Closure) { // lets call the function ...
Object function(String source, int lineNo, int columnNo, Object funcBody, Vector paramNames, Vector arguments) throws BSFException { Object object = eval(source, lineNo, columnNo, funcBody); if (object instanceof Closure) { Closure closure = (Closure) object; return closure.call(arguments.toArray()); } return object; }
/** * Allow an anonymous function to be declared and invoked */
Allow an anonymous function to be declared and invoked
apply
{ "repo_name": "paulk-asert/groovy", "path": "subprojects/groovy-bsf/src/main/java/org/codehaus/groovy/bsf/GroovyEngine.java", "license": "apache-2.0", "size": 5316 }
[ "groovy.lang.Closure", "java.util.Vector", "org.apache.bsf.BSFException" ]
import groovy.lang.Closure; import java.util.Vector; import org.apache.bsf.BSFException;
import groovy.lang.*; import java.util.*; import org.apache.bsf.*;
[ "groovy.lang", "java.util", "org.apache.bsf" ]
groovy.lang; java.util; org.apache.bsf;
217,174
public void addDevice(String localId, HueDriverInstance driverInstance) { this.knownDevices.put(localId, driverInstance); }
void function(String localId, HueDriverInstance driverInstance) { this.knownDevices.put(localId, driverInstance); }
/** * Adds the device with the given local Id to the set of devices already * "known" by the gateway instance. This avoids duplication of devices * during the discovery process * * @param localId */
Adds the device with the given local Id to the set of devices already "known" by the gateway instance. This avoids duplication of devices during the discovery process
addDevice
{ "repo_name": "dog-gateway/hue-drivers", "path": "it.polito.elite.dog.drivers.hue.gateway/src/it/polito/elite/dog/drivers/hue/gateway/HueGatewayDriverInstance.java", "license": "apache-2.0", "size": 15100 }
[ "it.polito.elite.dog.drivers.hue.network.HueDriverInstance" ]
import it.polito.elite.dog.drivers.hue.network.HueDriverInstance;
import it.polito.elite.dog.drivers.hue.network.*;
[ "it.polito.elite" ]
it.polito.elite;
1,398,033
private TransMeta getSlaveTransformation( ClusterSchema clusterSchema, SlaveServer slaveServer ) throws KettleException { TransMeta slave = slaveTransMap.get( slaveServer ); if ( slave == null ) { slave = getOriginalCopy( true, clusterSchema, slaveServer ); slaveTransMap.put( slaveServer, sl...
TransMeta function( ClusterSchema clusterSchema, SlaveServer slaveServer ) throws KettleException { TransMeta slave = slaveTransMap.get( slaveServer ); if ( slave == null ) { slave = getOriginalCopy( true, clusterSchema, slaveServer ); slaveTransMap.put( slaveServer, slave ); } return slave; }
/** * Create or get a slave transformation for the specified cluster & slave server * * @param clusterSchema * the cluster schema to reference * @param slaveServer * the slave server to reference * @return */
Create or get a slave transformation for the specified cluster & slave server
getSlaveTransformation
{ "repo_name": "wseyler/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/trans/cluster/TransSplitter.java", "license": "apache-2.0", "size": 78302 }
[ "org.pentaho.di.cluster.ClusterSchema", "org.pentaho.di.cluster.SlaveServer", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.trans.TransMeta" ]
import org.pentaho.di.cluster.ClusterSchema; import org.pentaho.di.cluster.SlaveServer; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.trans.TransMeta;
import org.pentaho.di.cluster.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.trans.*;
[ "org.pentaho.di" ]
org.pentaho.di;
835,044
public static String generateResourceConfig(CommandSpec[] specs, String[] bundles, String[] resourceRegex) { Visitor visitor = new Visitor(); visitor.bundles.addAll(Arrays.asList(bundles)); visitor.resources.addAll(Arrays.asList(resourceRegex)); for (CommandSpec spec : specs) { ...
static String function(CommandSpec[] specs, String[] bundles, String[] resourceRegex) { Visitor visitor = new Visitor(); visitor.bundles.addAll(Arrays.asList(bundles)); visitor.resources.addAll(Arrays.asList(resourceRegex)); for (CommandSpec spec : specs) { visitor.visitCommandSpec(spec); } return visitor.toString(); }...
/** * Returns a JSON String with the resources and resource bundles to include for the specified * {@code CommandSpec} objects. * * @param specs one or more {@code CommandSpec} objects to inspect for resource bundles * @param bundles base names of additional resource bundles to be included in t...
Returns a JSON String with the resources and resource bundles to include for the specified CommandSpec objects
generateResourceConfig
{ "repo_name": "remkop/picocli", "path": "picocli-codegen/src/main/java/picocli/codegen/aot/graalvm/ResourceConfigGenerator.java", "license": "apache-2.0", "size": 8442 }
[ "java.util.Arrays", "java.util.LinkedHashSet", "java.util.Set" ]
import java.util.Arrays; import java.util.LinkedHashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
459,350
@Override public World rename(Name name) { return new World(name, null); }
World function(Name name) { return new World(name, null); }
/** * Rename this table */
Rename this table
rename
{ "repo_name": "martin-g/FrameworkBenchmarks", "path": "frameworks/Java/play2-java/play2-java-jooq-hikaricp/app/models/tables/World.java", "license": "bsd-3-clause", "size": 3799 }
[ "org.jooq.Name" ]
import org.jooq.Name;
import org.jooq.*;
[ "org.jooq" ]
org.jooq;
2,667,850
public static <T> HttpResponse fromStream(ResponseHeaders headers, Stream<T> contentStream, HttpHeaders trailers, Executor executor, Function<? super T, ? extends ServerSentEvent> converter) { requireNonNull(headers,...
static <T> HttpResponse function(ResponseHeaders headers, Stream<T> contentStream, HttpHeaders trailers, Executor executor, Function<? super T, ? extends ServerSentEvent> converter) { requireNonNull(headers, STR); requireNonNull(contentStream, STR); requireNonNull(trailers, STR); requireNonNull(executor, STR); requireN...
/** * Creates a new Server-Sent Events stream from the specified {@link Stream} and {@code converter}. * * @param headers the HTTP headers supposed to send * @param contentStream the {@link Stream} which publishes the objects supposed to send as contents * @param trailers the HTTP trailers ...
Creates a new Server-Sent Events stream from the specified <code>Stream</code> and converter
fromStream
{ "repo_name": "line/armeria", "path": "core/src/main/java/com/linecorp/armeria/server/streaming/ServerSentEvents.java", "license": "apache-2.0", "size": 18326 }
[ "com.linecorp.armeria.common.HttpHeaders", "com.linecorp.armeria.common.HttpResponse", "com.linecorp.armeria.common.ResponseHeaders", "com.linecorp.armeria.common.sse.ServerSentEvent", "com.linecorp.armeria.internal.server.ResponseConversionUtil", "java.util.Objects", "java.util.concurrent.Executor", ...
import com.linecorp.armeria.common.HttpHeaders; import com.linecorp.armeria.common.HttpResponse; import com.linecorp.armeria.common.ResponseHeaders; import com.linecorp.armeria.common.sse.ServerSentEvent; import com.linecorp.armeria.internal.server.ResponseConversionUtil; import java.util.Objects; import java.util.conc...
import com.linecorp.armeria.common.*; import com.linecorp.armeria.common.sse.*; import com.linecorp.armeria.internal.server.*; import java.util.*; import java.util.concurrent.*; import java.util.function.*; import java.util.stream.*;
[ "com.linecorp.armeria", "java.util" ]
com.linecorp.armeria; java.util;
1,969,898
protected void openNewResourceTemplateDialog() { hide(); try { NewResourceTemplateDialog newResourceTemplateDialog = new NewResourceTemplateDialog( getParentShell(), null); newResourceTemplateDialog.create(); newResourceTemplateDialog.getShell().setText(NEW_RESOURCE); newResourceTemplateDialog.o...
void function() { hide(); try { NewResourceTemplateDialog newResourceTemplateDialog = new NewResourceTemplateDialog( getParentShell(), null); newResourceTemplateDialog.create(); newResourceTemplateDialog.getShell().setText(NEW_RESOURCE); newResourceTemplateDialog.open(); if (newResourceTemplateDialog.getReturnCode() ==...
/** * Create new resource dialog */
Create new resource dialog
openNewResourceTemplateDialog
{ "repo_name": "splinter/developer-studio", "path": "data-mapper/org.wso2.developerstudio.visualdatamapper.diagram/src/dataMapper/diagram/custom/util/SchemaKeyEditorDialog.java", "license": "apache-2.0", "size": 15499 }
[ "org.eclipse.jface.window.Window", "org.wso2.developerstudio.eclipse.esb.presentation.ui.NewResourceTemplateDialog" ]
import org.eclipse.jface.window.Window; import org.wso2.developerstudio.eclipse.esb.presentation.ui.NewResourceTemplateDialog;
import org.eclipse.jface.window.*; import org.wso2.developerstudio.eclipse.esb.presentation.ui.*;
[ "org.eclipse.jface", "org.wso2.developerstudio" ]
org.eclipse.jface; org.wso2.developerstudio;
136,229
protected void addPhenomenonTimeToObservation(AbstractObservation observation, Time phenomenonTime) { if (phenomenonTime instanceof TimeInstant) { TimeInstant time = (TimeInstant) phenomenonTime; observation.setPhenomenonTimeStart(time.getValue().toDate()); observation.se...
void function(AbstractObservation observation, Time phenomenonTime) { if (phenomenonTime instanceof TimeInstant) { TimeInstant time = (TimeInstant) phenomenonTime; observation.setPhenomenonTimeStart(time.getValue().toDate()); observation.setPhenomenonTimeEnd(time.getValue().toDate()); } else if (phenomenonTime instance...
/** * Add phenomenon time to observation object * * @param observation * Observation object * @param phenomenonTime * SOS phenomenon time */
Add phenomenon time to observation object
addPhenomenonTimeToObservation
{ "repo_name": "johnjohndoe/SOS", "path": "hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/AbstractObservationDAO.java", "license": "gpl-2.0", "size": 54579 }
[ "org.n52.sos.ds.hibernate.entities.AbstractObservation", "org.n52.sos.ogc.gml.time.Time", "org.n52.sos.ogc.gml.time.TimeInstant", "org.n52.sos.ogc.gml.time.TimePeriod" ]
import org.n52.sos.ds.hibernate.entities.AbstractObservation; import org.n52.sos.ogc.gml.time.Time; import org.n52.sos.ogc.gml.time.TimeInstant; import org.n52.sos.ogc.gml.time.TimePeriod;
import org.n52.sos.ds.hibernate.entities.*; import org.n52.sos.ogc.gml.time.*;
[ "org.n52.sos" ]
org.n52.sos;
104,536