query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
The cost estimate that the query planner calculated for this node. Value has no meaning outside of this explanation and is only used to compare and order the nodes in the query plan. | public Double getCostEstimate() {
return costEstimate;
} | [
"public double getCost() {\n\t\treturn tree.getCost() + 2;\r\n\t}",
"public float getEstCost() {\n\t\treturn estCost;\n\t}",
"float getCost();",
"double getCost();",
"public double getTotalCost() {\r\n return totalCost;\r\n }",
"public double costPerUnit() {\n\t\treturn cost;\n\t}",
"@Override\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert field index to field number | protected Integer getFieldNumber() {
if (this.getFieldIndex() == null) {
return null;
}
return this.isProxyOperation() ? this.getFieldIndex() : this.getFieldIndex() + 1;
} | [
"public int getFieldIndex() { return _fldIndex; }",
"int[] getFieldIndex();",
"private int convertFieldIdToColumn(int fieldId) {\n return fieldId % 3 + 1; // First column has Id 1\n }",
"private int getOrdinalPosition(List<Field> mappedFields, int fieldIndex) {\n int ordinalPosition = 0;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A constructor. Gets JdbcOperations object to work with database. | public DatabaseUsersRepository(final JdbcOperations jdbcOperations) {
this.jdbcOperations = jdbcOperations;
} | [
"JdbcOperations getJdbcOperations();",
"JdbcOperation operation();",
"public JdbcOperations getJdbcOperations() {\n return _jdbcTemplate.getJdbcOperations();\n }",
"public JdbcUtil() {\n\n\t}",
"public OBOFileDAOJDBC() {\n \t\n }",
"public PsvDaoImplJDBC() {\r\n }",
"protected JdbcTemplate ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the stageDescription property for this object. Returns a reference to this object so that method calls can be chained together. | public CreateDeploymentInput withStageDescription(String stageDescription) {
this.stageDescription = stageDescription;
return this;
} | [
"public void setStageDescription(String stageDescription) {\n this.stageDescription = stageDescription;\n }",
"public String getStageDescription() {\n return stageDescription;\n }",
"public FunctionMetadata withStage(String stage) {\n setStage(stage);\n return this;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if this offer can be combined with other offers in the order. | @Override
public boolean isCombinableWithOtherOffers() {
return combinableWithOtherOffers;
} | [
"public boolean canMerge(Item other);",
"public boolean isCombine()\n {\n return combine;\n }",
"public boolean isCombinable(){\r\n\t\tfor (int i=0; i<numItems; i++)\r\n\t\t\tif (MesquiteDouble.isCombinable(values[i]))\r\n\t\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public boolean combinab... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Saves each element to file on its own line, and removes the css highlight from the modified fields. | public void saveObjects() {
//Save to file
try {
jsonManip.saveData(filePath);
} catch (IOException e) {
setNotification("Failed to save file: " + e);
return;
}
//Remove css highlight
textFields.values().parallelStream().
forEach(field -> field.getStyleClass().remove("modified"));
validateA... | [
"public void finishEdit(){\n\t\tList<String> lines = getAllLines();\n\t\ttry {\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(f));\n\t\t\tbw.append(\"@doc type:\" + type + \", name:\" + name);\n\t\t\tbw.newLine();\n\t\t\tbw.flush();\n\t\t\tfor(String s : lines){\n\t\t\t\tbw.append(s);\n\t\t\t\tbw.newL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
toString() method neatly returning all Pizza information as a String. | public String toString() {
return ("A " + pizzaSize + " pizza with " + cheeseToppings + " cheese topping(s), " + pepperoniToppings +
" pepperoni topping(s), and " + veggieToppings + " veggie topping(s) costs $" + calcCost());
} | [
"public String toString()\r\n {\r\n return super.toString() + \"\\nPrice: $\" + this.pizzaPrice();\r\n }",
"@Override\n public String toString() {\n return super.toString() + pizzaPrice() + \".00\\n\";\n }",
"public String toString() {\n\t\tNumberFormat nf = NumberFormat.getCurrencyIns... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Rep Invariant: NegationOperator must not be null Abstract Function: Represents the negation of the argument Creates a new Negation Operator | public NegationOperator(){
} | [
"public Expression negate() {\n switch (operation) {\n case BOOLEAN:\n return SystemFunction.makeSystemFunction(\"not\", getArguments());\n case NOT:\n return SystemFunction.makeSystemFunction(\"boolean\", getArguments());\n case TRUE:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Map Keras to DL4J weight initialization functions. | public static WeightInit mapWeightInitialization(String kerasInit) {
/* WEIGHT INITIALIZATION
* TODO: finish mapping keras-to-dl4j weight distributions.
* Low priority since our focus is on loading trained models.
*
* Remaining dl4j distributions: DISTRIBUTION, SIZE, NORMALIZ... | [
"@Override\n public void initWeight(MultiTaskModel updateModel) {\n AssertUtils.assertListNotNullAndSizeEqual(this.hiddenLayers, updateModel.getHiddenLayers());\n for(int i = 0; i < this.hiddenLayers.size(); i++) {\n // There are two type of layer: DenseLayer, Activation. We only need to... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
UnnamedUnitsType returns aadl2::UnitsType: "units" "(" ownedLiteral+=UnitLiteral ("," ownedLiteral+=UnitLiteralConversion) ")"; | public UnnamedUnitsTypeElements getUnnamedUnitsTypeAccess() {
return pUnnamedUnitsType;
} | [
"uk.me.uohiro.protobuf.model.extras.ex1.Temperature.Units getUnits();",
"public Units()\n\t{\n\t\t// empty for empty unitset\n\t}",
"public String getUnitsString() {\n return units;\n }",
"public UnitsTypeTest(String name) {\n\t\tsuper(name);\n\t}",
"public String getUnits() {\n return units;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test reading prospect by id. | public void prospectReadTest() {
final long prospectId = 59164595L;
final Optional<Prospect> response = client.prospectRead(new ProspectReadRequest()
.selectById(prospectId)
);
assertNotNull("Should not be null", response);
logger.info("Response: {}", response);
... | [
"@Test\r\n public void testReadById() {\r\n \r\n // already being tested above\r\n }",
"@Test\n void getNoteByIdSuccess() {\n Note retrievedNote = (Note) noteDao.getById(1);\n assertEquals(1, retrievedNote.getId());\n assertEquals(\"Amari Rodgers\", retrievedNote.getPro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleKonto" $ANTLR start "entryRuleIntervall" ../de.nie.fin.ui/srcgen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:173:1: entryRuleIntervall : ruleIntervall EOF ; | public final void entryRuleIntervall() throws RecognitionException {
try {
// ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:174:1: ( ruleIntervall EOF )
// ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:175:1: rule... | [
"public final void entryRuleKonto() throws RecognitionException {\r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:146:1: ( ruleKonto EOF )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:147:1: r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the processStep of the given index. | public void removeProcessstep(int index) throws java.lang.IndexOutOfBoundsException {
_Processstep =null;
try{
getItem().removeChild(SCHEMA_ELEMENT_NAME + "/processStep",index);
} catch (FieldNotFoundException e1) {logger.error(e1);}
} | [
"public void deleteStep(int index) {\n RxToolkit.trace(\"RxSection::deleteStep(\"+index+\")\");\n steps.remove(index);\n }",
"public void removeStep() {\n\t\tif(testSequence.size() > 0) {\n\t\t\ttestSequence.remove(testSequence.size()-1);\n\t\t}\n\t}",
"public void removeStep(int step) {\n\t\tif(step < t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Expose the LiveData ProductRankings query so the UI can observe it. | public LiveData<List<ProductRanking>> getRankingWithCount(String ranking) {
LiveData<List<ProductRanking>> products = ((MyApplication) application).getRepository()
.getRankingWithCount(ranking);
// observe the changes of the products from the database and forward them
mObservable... | [
"public LiveData<List<ProductRanking>> getRankingByProduct(long product_id) {\n LiveData<List<ProductRanking>> products = ((MyApplication) application).getRepository()\n .getRankingByProduct(product_id);\n // observe the changes of the products from the database and forward them\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Attemps to load the given URL in a local memory repository. | public static Repository fromURL(URL url) {
RepositoryBuilder builder = new RepositoryBuilder(
new LocalMemoryRepositorySupplier(),
// true : use default fallback
new LoadFromUrl(url, false, url.getFile().substring(1))
);
return builder.get();
} | [
"public void load(String url);",
"public void loadURL(String url);",
"private void loadFromURL(String url) throws IOException {\n URL destination = new URL(url);\r\n URLConnection conn = destination.openConnection();\r\n Reader r = new InputStreamReader(conn.getInputStream());\r\n lo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Zoom camera to marker & show InfoWindow | private void zoomToMarker(Marker marker) {
currentMarkerID = markerHashMap.get(marker).getId() - 1;
marker.showInfoWindow();
googleMap.animateCamera(CameraUpdateFactory.newLatLng(marker.getPosition()));
openBottomSheet();
} | [
"private void showMarkersAndZoom() {\n mMap.clear();\n if (mLastLocation != null) {\n myMarker = mMap.addMarker(new MarkerOptions().position(new LatLng(mLastLocation.getLatitude(), mLastLocation.getLongitude())).icon(BitmapDescriptorFactory.fromResource(R.drawable.guidemarker)));\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Start sound for thing at using from sounds.h Convenience method using sfxenum_t instead. Delegated to int version. | public void StartSound(ISoundOrigin origin, sfxenum_t sound_id); | [
"public void StartSound(ISoundOrigin origin, int sound_id);",
"int astrob_speech_sh_start(const struct MachineSound *msound);",
"public abstract void startSound();",
"public void StartSoundAtVolume(ISoundOrigin origin, int sound_id, int volume);",
"public static void playSound()\n {\n // A sequenc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Basic method to get the worst possible score. | public int getWorstScore()
{
return -1;
} | [
"public double getBestScore();",
"public int getBestScore() {\n\t\tInteger score = this.hand.countValue().lower(22);\n\t\tif(score!=null) {\n\t\t\treturn score;\n\t\t}\n\t\telse {\n\t\t\treturn this.hand.countValue().higher(21);\n\t\t}\n\t}",
"static int getMaxScore() {\n return 2 * 3 * 2 * 4 + 2;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For multiple beans map tests, return the List of beans maps, which map bean names to bean values for each corresponding sheet. | @Override
protected List<Map<String, Object>> getListOfBeansMaps()
{
Map<String, Object> letters = new HashMap<>();
letters.put("letters", Arrays.asList("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
"N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z... | [
"public abstract List<ExperimentBean> mapToBeans(List<Experiment> experiments);",
"@Test\n public void testMapToBean() throws Exception {\n// String filePath = \"E://HONG/1.xlsx\";\n// String path = \"E://HONG/1.xml\"; //从配置文件中加载挡板组装配置数据\n// EasyExcelMask load=new EasyExcelMask();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a value to property advanceBookingRequirement. | Builder addAdvanceBookingRequirement(QuantitativeValue value); | [
"Builder addAdvanceBookingRequirement(QuantitativeValue.Builder value);",
"Builder addWarranty(String value);",
"Builder addEligibleQuantity(String value);",
"@Test\n public void shouldAddValuedStepWithRequirement() {\n osmoTester.addModelObject(new ValuedStepWithRequirement(requirements));\n\n // WHEN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ This method is used to hit alt plus d hotkeys | @When("^User hits ALT plus D hotkey$")
public void user_hits_ALT_plus_D_hotkey() throws Throwable {
methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
try {
SmokeTestLibrary.hotkeyAction(Keys.ALT, "d", chromeDriver);
if (captureScreenshot) {
... | [
"@Then(\"^user hits Alt plus left hot key$\")\n public void user_hits_Alt_plus_left_hot_key() throws Exception {\n methodName = Thread.currentThread().getStackTrace()[1].getMethodName();\n\n try {\n Thread.sleep(3000);\n Robot robot = new Robot();\n robot.keyPress(K... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
1. Write a static method called intArraySorted. This method takes in an array of integers and it returns a boolean. The method returns true if the integer array is in ascending order and false otherwise | static boolean intArraySorted(int[] intArray) {
for (int i = 0; i < intArray.length-1; i++) {
p=intArray[i];
if(intArray[i+1]<p) {
return false;
}
}
return true;
} | [
"static boolean intArraySorted(int[] iarray) {\n\t\tfor (int i = 0; i + 1< iarray.length; i++) {\n\t\t\tif (iarray[i] > iarray[i + 1]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"static boolean intArraySorted(int[] nums) {\n\t\tboolean ascending = true;\n\t\tfor(int i = 0;i<nums.length-1;i+... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleProject" $ANTLR start "entryRuleFolder" InternalData.g:128:1: entryRuleFolder : ruleFolder EOF ; | public final void entryRuleFolder() throws RecognitionException {
try {
// InternalData.g:129:1: ( ruleFolder EOF )
// InternalData.g:130:1: ruleFolder EOF
{
before(grammarAccess.getFolderRule());
pushFollow(FOLLOW_1);
ruleFolder();
... | [
"public final void rule__Project__FoldersAssignment_6_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalData.g:1738:1: ( ( ruleFolder ) )\n // InternalData.g:1739:2: ( ruleFolder )\n {\n // InternalDa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tear down the sample contact | @After public void tearDown()
{
contact = null;
} | [
"private void shutdown() {\n mMediaRecorder.reset();\n mMediaRecorder.release();\n mCamera.release();\n\n // once the objects have been released they can't be reused\n mMediaRecorder = null;\n mCamera = null;\n }",
"public void teardown()\n {\n dgramSocket.cl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new SObservation RecordBuilder. | public static org.mhealth.open.data.avro.SObservation.Builder newBuilder() {
return new org.mhealth.open.data.avro.SObservation.Builder();
} | [
"public static org.mhealth.open.data.avro.SObservation.Builder newBuilder(org.mhealth.open.data.avro.SObservation.Builder other) {\n return new org.mhealth.open.data.avro.SObservation.Builder(other);\n }",
"private Builder(org.mhealth.open.data.avro.SObservation other) {\n super(SCHEMA$);\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column AD_CONTENT.PLAY_TIME | public void setPlayTime(BigDecimal playTime) {
this.playTime = playTime;
} | [
"public void setPlayingTime(String playingTime) {\n this.playingTime = playingTime;\n }",
"@Override\n protected void doSetMediaTime(Time now)\n {\n }",
"public int getPlayTime() {\n return playTime_;\n }",
"public int getPlayTime() {\n return playTime_;\n }",
"public int getP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compiles; produces ClassCastException: ! gia = (Generic[])new Object[SIZE]; Runtime type is the raw (erased) type: | @SuppressWarnings("unchecked")
public static void main(String[] args) {
gia = (Generic<Integer>[])new Generic[SIZE];
System.out.println(gia.getClass().getSimpleName());
gia[0] = new Generic<Integer>();
//! gia[1] = new Object(); // Compile-time error
// Discovers type mismatch at compile time:
... | [
"@SuppressWarnings(\"unchecked\")\n public static void main(String[] args){\n gia = (Generics<Integer>[])new Generics[SIZE];\n System.out.println(gia.getClass().getSimpleName());\n gia[0] = new Generics<Integer>();\n //! gia[1] = new Object(); //Compile -time error\n //! gia = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests that a Cell changed from dead to alive returns "X" (alive) | @Test
public void testCellSetAlive() {
Cell cell = new Cell(false);
cell.setAlive(true);
String string = cell.toString();
assertEquals(string, "X");
} | [
"@Test\n\tpublic void testCellSetDead() {\n\t\t\n\t\tCell cell = new Cell(true);\n\t\tcell.setAlive(false);\n\t\tString string = cell.toString();\n\t\t\n\t\tassertEquals(string, \".\");\n\t}",
"@Test\n\tpublic void iterateCellSameAliveTest() {\n\t\tBoolean result = panel.iterateCell(2, 2);\n\t\tassertTrue(\"Cell ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes xmlOutputCheckbox | private JCheckBox getXmlOutputCheckbox() {
if (xmlOutputCheckbox == null) {
xmlOutputCheckbox = new JCheckBox();
xmlOutputCheckbox.setBounds(new Rectangle(21, 118, 152, 21));
xmlOutputCheckbox.setMnemonic(KeyEvent.VK_X);
xmlOutputCheckbox.setText("XML Output");
... | [
"private void setupCheckbox() {\n\t\tcheckboxView = View.inflate(this, R.layout.checkbox, null);\n\t\tCheckBox checkBox = (CheckBox) checkboxView.findViewById(R.id.checkbox);\n\t\tcheckBox.setChecked(false);\n\t\tcheckBox.setOnCheckedChangeListener(new CheckBox.OnCheckedChangeListener() {\n\t\t @Override\n\t\t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column USER_PROFILE_VIEW.TAGGED_PM_FLAG | public void setTaggedPmFlag(Boolean taggedPmFlag) {
this.taggedPmFlag = taggedPmFlag;
} | [
"public void setVipflag(Integer vipflag) {\r\n\t\tthis.vipflag = vipflag;\r\n\t}",
"public Boolean getTaggedPmFlag() {\n\t\treturn taggedPmFlag;\n\t}",
"public void setIsLocallyAssignedMpiPid(boolean value) {\r\n this.isLocallyAssignedMpiPid = value;\r\n }",
"public void setFLAG(Integer FLAG) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the counter metric with the given name. | private void updateCounterMetric(final String metricName, final int value)
{
Metric metric = metricsRegistry.get(metricName);
if (metric == null)
{
metric = getExistingOrAddNewMetric(metricName, new CounterMetric());
}
metric.update(value);
} | [
"public void renameCounter(Counter aCounter, String name) \n\t{\n\t\taCounter.setName(name);\n\t}",
"public void updateCount(String name, int newCount, PrintWriter out){\n out.println(\"Count Changed for stock \" + name + \"\\nNew Count : \" + newCount);\n }",
"public void setName(String name, int ind... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo di appoggio che controlla che il giorno di nascita all'interno del codice fiscale sia corretto | private static boolean controlloGiornoNascita(String codice) {
boolean ritorno=true;
int giornoNascita=Integer.parseInt(codice.substring(9,11));
if(giornoNascita>31&&giornoNascita<1+Constants.GENDER_NUMBER_TO_ADD || giornoNascita>31+Constants.GENDER_NUMBER_TO_ADD) {
ritorno=false;
}
return ritorn... | [
"private void rimuovi() {\n out.println(\"Non ancora implementato\"); // Lasciato come esercizio\n }",
"private void ispisiOrdinirano()\r\n\t\t{\r\n\t\t\tPregledVO pvo=this.oznaceniPregled;\r\n\t\t\t//\tjust in case\r\n\t\t\tspremiPregledUBazu();\r\n\t\t\tgetJtbPregledi().clearSelection();\r\n\t\t\tP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this moves a CommondMultipartFile to somewhere on disk | public static String fileToDisk(CommonsMultipartFile commonsMultipartFile, Integer id, String storeLoc){
String origName = removeSpaces(commonsMultipartFile.getOriginalFilename());
String newLoc = storeLoc +id + "_"+ origName;
try {
commonsMultipartFile.transferTo(new File(newLoc));
return newLoc... | [
"private File moveTempFile(final CommonsMultipartFile fileData, final String originalFileName) throws IOException {\n String deployFileName = buildDeployFileName(originalFileName);\n logger.info(\"Moving to {}\", deployFileName);\n final File tempFile = new File(deployFileName);\n fileDa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the time is before the current time with the format string "yyyyMMdd HH:mm:ss". | public static boolean isTimeBefore(String time)
{
return isTimeBefore(time, getDateTimeFormat());
} | [
"public static boolean beforeCurrentTime(String t)\n {\n StringBuilder sb = new StringBuilder();\n Time time = new Time();\n time.setToNow();\n sb.append(time.year);\n sb.append(((time.month + 1) < 10) ? (\"0\" + (time.month + 1)) : (time.month + 1));\n sb.append((time.m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find and return a Pin by it's ID number. | default Pin getPinByID(int id) {
return GenericDAO.getEntityByID(Pin.class, id);
} | [
"public static DependencyPin findById(String _id)\n\t{\n\t\tDependencyPin result = null;\n\t\tSaveStatement stmt;\n\n\t\ttry\n\t\t{\n\t\t\tstmt = ConnectionManager.getValid().createStatement(\"_dbDependencyPin.findById\");\n\t\t\ttry\n\t\t\t{\n\t\t\t\tResultSet s = stmt.executeQuery( \"SELECT casePin_id, caseDepe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the first of this e s f match result. | @Override
public int getFirst() {
return _esfMatchResult.getFirst();
} | [
"public Integer getFirstResult() {\n\t\treturn firstResult;\n\t}",
"public Result getResultOfFirstPlayer() {\r\n\t\treturn this.resultOfFirstPlayer;\r\n\t}",
"public Score getFirst() {\n\t\t\t\treturn first;\n\t\t\t}",
"public java.lang.Integer getFirstResult()\r\n {\r\n return this.firstResult;\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XAssignment__Group_1_1__1__Impl" $ANTLR start "rule__XAssignment__Group_1_1_0__0" ../org.xtext.guicemodules.ui/srcgen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5349:1: rule__XAssignment__Group_1_1_0__0 : rule__XAssignment__Group_1_1_0__0__Impl ; | public final void rule__XAssignment__Group_1_1_0__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5353:1: ( rule__XAssignment__Group_... | [
"public final void rule__XAssignment__Group_1_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3747:1: ( rul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the rounded minutes between. | public static int getRoundedMinutesBetween(long startMillis, long endMillis) {
return TimeUtil.getMinutesBetween(startMillis, endMillis) % 60 > 29 ? TimeUtil.getMinutesBetween(startMillis, endMillis) + 60 - TimeUtil.getMinutesBetween(startMillis, endMillis) % 60 : TimeUtil.getMinutesBetween(startMillis, endMillis) -... | [
"public double getMinutes() {\n\t\tdouble v = value * (180.0d / Math.PI);\n\t\tv -= getDegrees();\n\t\treturn 60 * v; // 60 minutes in one degree.\n\t}",
"public double asMinutes() {\n\t\treturn asNanoseconds() / MINUTE;\n\t}",
"public String getMinutes();",
"public Integer getMinutesSum() {\n return m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check whether this VNode implements the VComposite interface. | public boolean isComposite()
{
return (this instanceof VComposite);
} | [
"public boolean isComposite()\r\n {\r\n return getChildren().length>0;\r\n }",
"boolean isComposite();",
"Boolean getIsComposite();",
"protected void checkCustomComposite() {\n return;\n }",
"public boolean getIsVisualElementContainer()\n {\n return root.getType().isAssignableTo(sta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicates whether the GridStart implementation can generate checksums of generated output files or not | public boolean canGenerateChecksumsOfOutputs(){
return this.mPegasusLite.canGenerateChecksumsOfOutputs();
} | [
"boolean hasVmChecksum();",
"public boolean isChecksum() {\n return checksum;\n }",
"boolean hasSkipChecksum();",
"public boolean hasObjectChecksums() {\n return objectChecksumsBuilder_ != null || objectChecksums_ != null;\n }",
"public boolean hasBeenBinaryPatched() {\n //boolean r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 chunkSize = 3; | int getChunkSize(); | [
"int getChunks();",
"int getChunksAmount();",
"long getChunkSize();",
"int getNumOfChunks();",
"public void setChunkSize(int chunkSize) {\n this.chunkSize = chunkSize;\n }",
"long getChunkNum();",
"int getChunkSizesCount();",
"Builder spikesPerChunk(VariableAmount count);",
"int batchSize(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets Allow Location Enabled to be false and make sure it is set correctly. | @Test
@SmallTest
@Feature({"Preferences"})
public void testSetAllowLocationNotEnabled() throws Exception {
LocationSettingsTestUtil.setSystemLocationSettingEnabled(true);
LocationProviderOverrider.setLocationProviderImpl(new MockLocationProvider());
new TwoStatePermissionTestCase("Lo... | [
"void setMyLocationEnabled(boolean enabled);",
"@SuppressWarnings({\"SameParameterValue\", \"unused\"})\n public static void allowAccessToLocation(final Boolean value) {\n sAccessToLocation = value;\n }",
"@Test\n @SmallTest\n @Feature({\"Preferences\"})\n public void testSetAllowLocationE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the terms of service from the entry | private String findTermsOfServiceFromEntry( HttpServletRequest request ) throws SiteMessageException
{
int nIdEntry = NumberUtils.toInt( request.getParameter( PARAMETER_ENTRY_ID ), FormsConstants.DEFAULT_ID_VALUE );
if ( nIdEntry == FormsConstants.DEFAULT_ID_VALUE )
{
SiteMessag... | [
"public abstract Collection<OntologyTerm> findTerms( String search );",
"public abstract Collection<Characteristic> findExactTerm( String givenQueryString, String categoryUri, Taxon taxon );",
"private String findTermsOfServiceFromResponse( HttpServletRequest request ) throws SiteMessageException\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create and populate the end game panel; a panel owned by the interactive panel which displays the result of a concluded, nondrawn game. | private void addEndGamePanel() {
endGamePanel = new JPanel();
endGamePanel.setLayout(null);
interactivePanel.add(endGamePanel, END_GAME_PANEL_STRING);
} | [
"public EndPanel(StartGamePanel panelController) {\n super(panelController);\n\n setLayout(new GridLayout(2, 1, 6, 6));\n generateAndAddEndMessage();\n generateAndAddEndButton();\n }",
"private void addInteractivePanel() {\r\n\t\tinteractivePanel = new JPanel();\r\n\t\tinteractivePa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface from Shopping Cart service | public interface IShoppingCart {
/**
* add a simple product to the cart
*
* @param product
*/
public Product addProduct(String name, String category, float price, int quantity);
/**
* change the amount of one product in the cart
*
* @param product
* @param quantity
*/
public Product changeAmoun... | [
"public interface CartService {\n\n\t/**\n\t * Returns all carts present in the system.\n\t * \n\t * @return list of carts\n\t */\n\tList<Cart> getAllCarts();\n\n\t/**\n\t * Returns cart for User Id\n\t * \n\t * @param userId the User Id\n\t * @return cart\n\t */\n\tCart getCartForUser(String userId);\n\n\t/**\n\t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetches the LoopStatement at the top of the statement stack. Casts the statement on the top of the statement stack or throws an IllegalStateException if this is not possible. | protected LoopStatement topLoopStatement(String msg) {
if ((topStatement() instanceof LoopStatement))
return (LoopStatement) topStatement();
throw createException(msg);
} | [
"private Loop whileStatement () {\n \tStatement s;\n \tExpression e;\n \t\n \t// WhileStatement의 정의에 따라 Token이 오는지 검사\n \tmatch(TokenType.While);\n \tmatch(TokenType.LeftParen);\n \te = expression();\n \tmatch(TokenType.RightParen);\n \ts = statement();\n \t\n return new Loop(e,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ExStart ExFor:DocumentBuilder.StartColumnBookmark ExFor:DocumentBuilder.EndColumnBookmark ExSummary:Shows how to create a column bookmark. | @Test
public void createColumnBookmark() throws Exception
{
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.startTable();
builder.insertCell();
// Cells 1,2,4,5 will be bookmarked.
builder.startColumnBookmark("MyBookmar... | [
"@Test\n public void fieldIndexPageRangeBookmark() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // Create an INDEX field which will display an entry for each XE field found in the document.\n // Each entry will display t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adding a new website in websites table Function will check if a site already existed in database. If existed will update the old one else creates a new row | public void addSite(WebSite site) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(KEY_TITLE, site.getTitle());
values.put(KEY_LINK, site.getLink());
values.put(KEY_RSS_LINK, site.getRSSLink());
values.put(KEY_DESCRIPTION, site.getDescription());
if ... | [
"private void addNewSiteToDatabase() {\n Map<String, Object> siteData = new HashMap<>();\n siteData.put(Constants.FSSite.adminIdField, currentUserDocId);\n siteData.put(Constants.FSSite.siteNameField, siteNameEditText.getText().toString());\n siteData.put(Constants.FSSite.participantsIdF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates all twins specified in the DTDL>DigitalTwins directory. | public static void createAllTwins() throws IOException, InterruptedException {
ConsoleLogger.printHeader("Create digital twins");
Map<String, String> twins = FileHelper.loadAllFilesInPath(TWINS_PATH);
final CountDownLatch createTwinsLatch = new CountDownLatch(twins.size());
// Call APIs... | [
"public static void deleteTwins() throws IOException, InterruptedException {\n ConsoleLogger.printHeader(\"Delete digital twins\");\n Map<String, String> twins = FileHelper.loadAllFilesInPath(TWINS_PATH);\n\n // Call APIs to clean up any pre-existing resources that might be referenced by this s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the URL resource to be shared. and opens the dialog | public void gppShare_setURLToShareAndOpen (String urlToShare) {
GPPShare.sharedInstance().shareDialog().setURLToShare(new NSURL(urlToShare)).open();
} | [
"private void share(){\n shareDialog = new ShareDialog(this);\n List<String> taggedUserIds= new ArrayList<String>();\n taggedUserIds.add(\"{USER_ID}\");\n taggedUserIds.add(\"{USER_ID}\");\n taggedUserIds.add(\"{USER_ID}\");\n\n ShareLinkContent content = new ShareLinkConte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when text has been fully scrolled through the board. | void onTextScrolled(long timestamp); | [
"public void scrollDown()\n{\n\tif (_texts.size() > _visibleRows && _scroll < _texts.size() - _visibleRows)\n\t{\n\t\t_scroll++;\n\t\tdraw();\n\t}\n\tupdateArrows();\n}",
"void onScrolledToEnd();",
"private void updateScroll() {\n incoming_text_jTextArea.setCaretPosition(incoming_text_jTextArea.getText()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets value as the attribute value for XpeProductUom. | public void setXpeProductUom(String value) {
setAttributeInternal(XPEPRODUCTUOM, value);
} | [
"public void setPriceUom(String value) {\n setAttributeInternal(PRICEUOM, value);\n }",
"public void setUom(String value) {\n setAttributeInternal(UOM, value);\n }",
"public void setProduct(entity.APDProduct value);",
"public String getXpeProductUom() {\n return (String) getAttribut... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the pitch shift. | public float getPitchShift() {
return pitchShift;
} | [
"public int getShift() {\n\n return shift;\n\n }",
"public Shift getShift() {\n return shift;\n }",
"public Pitch getPitch() {\n return pitch;\n }",
"public double getPitch()\n\t{\n\t\treturn this.pitch;\n\t}",
"float getPitch();",
"public int getPitch() {\n return pitch;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the dst UDP port. | Builder setUdpDst(TpPort port); | [
"public void setDstPort(final int dstPort) {\n this.dstPort = dstPort;\n }",
"public void setDstPort(int dstPort) {\n\t\tlog.trace(\"Set dstPort to [{}]\", dstPort);\n\t\tthis.dstPort = dstPort;\n\t}",
"Builder setUdpSrc(TpPort port);",
"public int getDstPort() {\n return dstPort;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remove 'a' asset from building | public boolean removeAsset(Asset a) {
if(!this.containedAssets.containsKey(a.getID())) {
Machinetta.Debugger.debug(1, "Remove Error: " + getID() + " isn't containing given asset " + a.getID());
return false;
} else {
Machinetta.Debugger.debug(1, getID()+ " removing as... | [
"void clearAssets();",
"void removeAsset(StorageAsset asset) throws IOException;",
"public void removeOaAssets(final String id);",
"public void deleteAssetClass(String name_);",
"public void removeArtifact() {\r\n\t\tRandom r = new Random();\r\n\t\tint num;\r\n\t\tString artifact;\r\n\t\t// Pick random arti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Processing the from to data | public List<FromTo> processFormToData(List<Long> lst_data) {
ArrayList<FromTo> from_to_List =new ArrayList<FromTo>();
/**
* Test data
from_to.setFrom(0);
from_to.setTo(10);
from_to_opList.add(from_to);
from_to_opList.add(from_to);
from_to_opList.add(from_to);
*/
if(lst_da... | [
"public void setDataFrom(Integer dataFrom) {\n this.dataFrom = dataFrom;\n }",
"public void readData() {\r\n\t\tString[] data = instructions.split(\",\");\r\n\t\tString[]timeTemp = data[0].split(\"[:\\\\.]\");\r\n\t\tinputTime=Integer.parseInt(timeTemp[0])*3600000+Integer.parseInt(timeTemp[1])*60000+Int... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Factory method for "JvmCompilation" group metadata class. You can redefine this method if you need to replace the default generated metadata class with your own customized class. | protected JvmCompilationMeta createJvmCompilationMetaNode(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server) {
return new JvmCompilationMeta(this, objectserver);
} | [
"protected abstract Object createJvmCompilationMBean(String groupName,\n String groupOid, ObjectName groupObjname, MBeanServer server);",
"protected JvmClassLoadingMeta createJvmClassLoadingMetaNode(String groupName,\n String groupOid, ObjectName groupObjname, MBeanServer server) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets whether the attribute editor dialog is shown when a feature is created. | public void setShowAttributeEditor(boolean showAttributeEditor) {
_showAttributeEditor = showAttributeEditor;
} | [
"public boolean isShowAttributeEditor() {\n return _showAttributeEditor;\n }",
"private void addEditAttributesMenu() {\n JMenuItem editAttributesMenu = new JMenuItem(\"Edit attributes\");\n final ProcessEditor thisEditor = this;\n editAttributesMenu.addActionListener(new ActionListener() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the title text | protected void setTitleText(String title) {
titleText.setText(title);
} | [
"public void setTitle(String title) {\n \n this.title = title;\n }",
"public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\r\n\t\trepaint();\r\n\t}",
"public void setTitle(String title) {\n mTitle = title;\n }",
"public void setTitle() {\n setT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
deals card to player p | public void deal(Player p){
System.out.println("dealing...");
cardDelt= deck.dealCard();
//cardDelt.showCard();
p.setHand(cardDelt);
} | [
"public void doCard(Card c, Player p) {\n String m = c.getMessage();\n if (!p.isAI())\n board.showMessageDialog(c.getMessage());\n if (m.equals(\"Take a ride on the Reading Railroad. If you pass go collect $200.\")) {\n if (p.getLocation() > 5)\n p.addMoney(200);\n moveToLocation(p, 5... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Query for Features within the bounding box in the provided projection | public FeatureCursor queryFeatures(BoundingBox boundingBox,
Projection projection, String where) {
return queryFeatures(false, boundingBox, projection, where);
} | [
"public FeatureCursor queryFeatures(BoundingBox boundingBox,\n Projection projection) {\n return queryFeatures(false, boundingBox, projection);\n }",
"public FeatureCursor queryFeatures(String[] columns,\n BoundingBox boundingBo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Walk along the entire tree and add subspells Add all spells cast by this node | private void addSubSpellsToSubtree(Node root)
{
for(int spellInd = 0; spellInd < SpellLibrary.spellList.length; spellInd++)
{
if (root.name.length() >= SpellLibrary.spellList[spellInd].length())
{
if(root.name.substring(root.name.length() - SpellLibrary.spellL... | [
"private void initTree()\n {\n String currSpell;\n Node tempNode;\n String currString;\n Gestures currGest;\n for(int spellInd = 0; spellInd < SpellLibrary.spellList.length; spellInd++)\n {\n //Start casting a new spell from the root node\n tempNode... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Try to find provider using Jar Service Provider Mechanism | private static Object findJarServiceProvider(final String factoryId) throws ConfigurationError {
final String serviceId = "META-INF/services/" + factoryId;
InputStream is = null;
// First try the Context ClassLoader
ClassLoader cl = ss.getContextClassLoader();
if (cl != null) {... | [
"public static Provider provider() {\n try {\n Object provider = getProviderUsingServiceLoader();\n if (provider == null) {\n provider = FactoryFinder.find(JAXWSPROVIDER_PROPERTY, DEFAULT_JAXWSPROVIDER);\n }\n if (!(provider instanceof Provider)) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for the course credits | public int getCredits() {
return credits;
} | [
"public final String getCredits() {\n return this.credits;\n }",
"public Float getCourseCredit() {\n return courseCredit;\n }",
"public int getCredits() {\n return credits;\n }",
"public int getCredits() {\n\t\treturn credits;\n\t}",
"public Map<String, Integer> getCredits() {\n\t\tr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Write your algorithm for the Substitution cipher here | private String encryptSubstitution(String message, Integer key) {
for (int i = 0; i<message.length(); i++){
int temp = (int)message.charAt(i)+key;
if(temp>126){
temp = temp-94;
}
char fin = (char) temp;
... | [
"public Substitute(){\n key = new byte[256];\n inverse = new byte[256];\n int[] intermediate = new int[256];\n for(int i = 1; i < 257; i++){\n int index = (int) (Math.random() * 256); //Generate random index between 0 and 255\n while(intermediate[index] != 0) //If t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table hf_stone_concern | List<HfStoneConcern> selectByExample(HfStoneConcernExample example); | [
"public void setConcern(long concern);",
"public long getConcern();",
"public interface ICriteriaWhen {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table sale_classify_good\n *\n * @mbg.generated\n * @projec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string replaceIp = 5; | public Builder setReplaceIp(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
replaceIp_ = value;
onChanged();
return this;
} | [
"java.lang.String getReplaceIp();",
"boolean hasReplaceIp();",
"public abstract void setIp(java.lang.String newIp);",
"java.lang.String getIpOverride();",
"public void markIpAddressReplace() throws JNCException {\n markLeafReplace(\"ipAddress\");\n }",
"public void markIpAddress1Replace() throws... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Query the user with a custom dialog and return user selected options. | static public @Nullable
ColorTextOptions query(Frame owner, boolean modal) {
JDialog dialog = new JDialog(owner, modal);
ColorTextOptionsJPanel panel = new ColorTextOptionsJPanel();
panel.dialog = dialog;
dialog.add(panel);
dialog.pack();
dialog.setVisible(true);
... | [
"String dialogQuery(String msg, String defaultValue, String optionValues[],\n int nOptions)\n { /* dialogQuery */\n this.sleepFlag= true;\t/* flag for waiting */\n this.data= defaultValue;\t/* save default */\n \n /* save the new list */\n this.optionValues= optionValues;\n th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds a step for deleting the local working directory. | private Step deleteLocalWorkingDir() {
return stepBuilderFactory.get(STEP_DELETE_LOCAL_WORK_DIR)
.tasklet(deleteLocalWorkingDir)
.build();
} | [
"private Step deleteHdfsWorkingDir() {\n return stepBuilderFactory.get(STEP_DELETE_HDFS_WORK_DIR)\n .tasklet(deleteHdfsWorkingDir)\n .build();\n }",
"private Step createLocalWorkingDir() {\n return stepBuilderFactory.get(STEP_CREATE_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This step verifies that story have all data provided in create step. | @Then("verifies the story is created:")
public void verifiesTheStoryIsCreatedInStory(final Map<String, String> attributes) {
final Map<String, ISteps> strategy = new HashMap<>();
strategy.put(FormsElements.NAME.key(), () ->
Assert.assertEquals(this.story.getStoryNameText(),
... | [
"@Then(\"verifies the story is created in panel\")\n public void verifiesTheStoryIsCreatedInPanel() {\n final String storyName = ScenarioContext.getInstance().getContextInMapAsString(ALL_STORY_FIELDS, \"name\");\n Assert.assertTrue(this.panel.existStory(storyName));\n }",
"@Test(groups = { \"w... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
~ Methods Searches for the value of a certain key in this record. This method searches for a line that starts with the given key and returns the remaining part of that line. The key string must therefore also contain any characters that separate the key from the value in the record (e.g. ':' or '='). | public String findValue(String sKey)
{
String sValue = null;
for (String sLine : rLines)
{
int nKeyPosition = sLine.indexOf(sKey);
if (nKeyPosition >= 0)
{
sValue =
sLine.substring(nKeyPosition + sKey.length()).trim();
}
}
return sValue;
} | [
"public String get(String key) {\n\t\t//get this file's text\n\t\tString text = FileIO.read(this.getPath());\n\t\tString value = null;\n\t\ttry {\n\t\t\t//try matching the pattern: key : value\\n \n\t\t\tPattern pattern = Pattern.compile(key+\" : (.*?)\\n\");\n\t\t\t\n\t\t\tMatcher matcher = pattern.matcher(text);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets Site Code from specified record. | public String getSiteId(final DataRecord record) {
return record.getString(BL_TABLE + '.' + SITE_ID);
} | [
"public String getSiteName(final DataRecord record) {\n return record.getString(SITE_TABLE + '.' + NAME);\n }",
"public String getSitecode() {\r\n\t\treturn sitecode;\r\n\t}",
"public String getRuleSourceCode(Record record) {\r\n if (l.isLoggable(Level.FINER)) {\r\n l.entering(getCla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
int64 FactoryId = 4; | long getFactoryId(); | [
"long getInstanceid();",
"long getInstanceID();",
"public long getFactoryId() {\n return factoryId_;\n }",
"protected String getFactoryID( String id ){\n return id;\n }",
"private IDGen()\r\n {\r\n idCount = 1;\r\n }",
"Id createId();",
"public Integer getFactoryId() {\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the sms package list. | List<SmsAlertRuleValue> getSmsPackageList()throws EOTException; | [
"public List<SmsMessage> getAllSmsMessages();",
"@Override\n\tpublic List<String> getListPackages() {\n\t\tlogger.log(Level.INFO, \"PackMan-CVMFS: Getting list of packages \");\n\n\t\tif (this.getHavePath()) {\n\t\t\tfinal String listPackages = SystemCommand.bash(alienv_bin + \" q --packman\").stdout;\n\t\t\tretu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end synpred178_InternalTupi $ANTLR start synpred180_InternalTupi | public final void synpred180_InternalTupi_fragment() throws RecognitionException {
Token otherlv_10=null;
EObject lv_featureCallArguments_9_0 = null;
EObject lv_featureCallArguments_11_0 = null;
// ../br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/parser/antlr/internal/InternalTupi.g:5763:6:... | [
"public final void synpred190_InternalTupi_fragment() throws RecognitionException { \n Token otherlv_3=null;\n Token otherlv_5=null;\n Token otherlv_7=null;\n EObject lv_typeArguments_4_0 = null;\n\n EObject lv_typeArguments_6_0 = null;\n\n\n // ../br.ufpe.cin.Tupi/src-ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new PersistenceException with the specified detail message. | public PersistenceException(String sMessage)
{
super(sMessage);
} | [
"public void testPersistenceExceptionAccuracy1() throws Exception {\n PersistenceException pe = new PersistenceException(\"test\");\n assertEquals(\"message is incorrect.\", \"test\", pe.getMessage());\n }",
"public PersistenceException()\n {\n super();\n }",
"public Persis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates if app is displayed as small card | public boolean isAppDisplayed(String title) {
log("Validating that app is displayed as small card");
By criteria = By
.cssSelector("div.card.apps > .card-content > .details > h2 > a[title='"
+ title + "']");
WebDriverWait wait = new WebDriverWait(driver, 20);
wait.until(ExpectedConditions.presenceOfEl... | [
"boolean hasAlreadShowCard();",
"public abstract boolean canFitInSmallSlot();",
"private boolean isSmallTablet(DisplayMetrics metrics) {\n float dpWidth = metrics.widthPixels / metrics.density;\n return (dpWidth >= 600 && dpWidth < 720);\n }",
"void validCardDetails(Card card);",
"public bo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
constructor The method is to return the numPieces to the Game.java | public static int getNumPieces()
{
return numPieces;
} | [
"public static void setNumPieces(int pieces)\r\n {\r\n numPieces = pieces;\r\n }",
"public int getNumPieces() {\n return ti.num_pieces();\n }",
"public int getPieceCount() {\n return pieceCount;\n }",
"public int getPieceCount () {\n return m_PieceCount;\n\t}",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the upper property. | public void setUpper(int value) {
this.upper = value;
} | [
"public void setUpperPoint(Point upper) {\n this.upper = upper;\n }",
"public void setUpperRange(double upper);",
"public void setUpperValue(int value) {\n // Compute new extent.\n int lowerValue = getValue();\n int newExtent = Math.min(Math.max(0, value - lowerValue), getMaximum(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for the ok button of the themeView. | public JButton getOkButton(){
return okButton;
} | [
"protected Button getOkButton() {\r\n return okButton;\r\n }",
"protected Button getOkButton()\r\n\t{\r\n\t\treturn okButton;\r\n\t}",
"private RButton getOkButton() {\n if (okButton == null) {\n okButton = new RButton();\n okButton.setText(\"<%= ivy.cms.co(\\\"/Buttons/ok\\\") %>\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Accessor to L2Character stopMove() method. | public void stopMove(L2CharPosition pos)
{
L2Character.this.stopMove(pos);
} | [
"public void stopMove(int duration);",
"public void stopMoving() {}",
"public void stopMovement() {\r\n this.canMove = false;\r\n }",
"public void stopMovement() {\n this.movementComposer.stopMovement();\n }",
"void stop() {\n movingStatus = STOP;\n }",
"public int getSTOP() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return root layout of header | public LinearLayout getHeaderLayout() {
return mHeaderLayout;
} | [
"protected Component constructHeaderLayout() {\n\t\treturn null;\n\t}",
"protected abstract int getRootLayoutId();",
"public VerticalLayout getRootLayout() {\n return rootLayout;\n }",
"private Component createHeaderContent() {\n HorizontalLayout layout = new HorizontalLayout();\n layo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleModel" $ANTLR start "entryRuleOperacao" InternalMyDsl.g:100:1: entryRuleOperacao returns [String current=null] : iv_ruleOperacao= ruleOperacao EOF ; | public final String entryRuleOperacao() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleOperacao = null;
try {
// InternalMyDsl.g:100:48: (iv_ruleOperacao= ruleOperacao EOF )
// InternalMyDsl.g:101:2: iv_ruleOperacao= ruleOper... | [
"public final EObject ruleModel() throws RecognitionException {\r\n EObject current = null;\r\n\r\n AntlrDatatypeRuleToken lv_greetings_0_0 = null;\r\n\r\n\r\n\r\n \tenterRule();\r\n\r\n try {\r\n // InternalMyDsl.g:77:2: ( ( (lv_greetings_0_0= ruleOperacao ) )* )\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a map of queueToLabels. | private Map<String, Set<String>> getQueueToLabels() {
Map<String, Set<String>> queueToLabels = new HashMap<>();
for (CSQueue queue : getQueues().values()) {
queueToLabels.put(queue.getQueuePath(), queue.getAccessibleNodeLabels());
}
return queueToLabels;
} | [
"java.util.Map<java.lang.String, java.lang.String> getLabelsMap();",
"java.util.Map<java.lang.String, java.lang.String> getUserLabelsMap();",
"public Map<String,List<Label>> getLabels() {\n return this.labels;\n }",
"public Map<String, String> labels() {\n return metadata.get(\"Config\", \"Labels\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks the right radio button. | public void checkRadioButton() {
LOGGER.debug("checkRadioButtons");
columnsButton.setSelection(true);
rowsButton.setSelection(false);
wrapButton.setSelection(false);
} | [
"private boolean checkRadioButton() throws UiException {\n boolean in = incoming.isSelected();\n boolean out = outgoing.isSelected();\n\n if (!(in ^ out)) {\n throw new UiException();\n }\n\n return out;\n }",
"private model.Type checkRadioButton() throws UiExcepti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public interface field status & manipulation functions Adds a step to the route list. | public void addToRoute(BoardPos step) {
// avoid null pointer exception
if (route == null)
route = new ArrayList<>();
route.add(step);
} | [
"public void addStep(Step step)\r\r\n {\r\r\n this.stepList.add(step);\r\r\n }",
"public void addStep(String step) throws IllegalArgumentException, IllegalStateException {\n if (!this.complete) {\n if (step.equals(\"Left\") || step.equals(\"Right\") || step.equals(\"Forward\") || ste... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicates whether to recalculate the peripheral address blocks from registers | public static boolean isRegenerateAddressBlocks() {
return regenerateAddressBlocks;
} | [
"public static void setRegenerateAddressBlocks(boolean regenerateAddressBlocks) {\n ModeControl.regenerateAddressBlocks = regenerateAddressBlocks;\n }",
"public boolean hasADDRESSIND() {\n return fieldSetFlags()[8];\n }",
"public boolean isSetRegAddr() {\n return this.regAddr != null;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'var216' field has been set. | public boolean hasVar216() {
return fieldSetFlags()[217];
} | [
"public boolean hasVar212() {\n return fieldSetFlags()[213];\n }",
"public boolean hasVar213() {\n return fieldSetFlags()[214];\n }",
"public boolean hasVar217() {\n return fieldSetFlags()[218];\n }",
"public boolean hasVar211() {\n return fieldSetFlags()[212];\n }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .protobuf.blockRank_rep reps = 1; | public protobuf.Protobuf.blockRank_repOrBuilder getRepsOrBuilder(
int index) {
if (repsBuilder_ == null) {
return reps_.get(index); } else {
return repsBuilder_.getMessageOrBuilder(index);
}
} | [
"protobuf.Protobuf.blockRank_rep getReps(int index);",
"protobuf.Protobuf.blockRank_repOrBuilder getRepsOrBuilder(\n int index);",
"private blockRank_rep(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"private multi_blockRank_rep(com.google.protobuf.Generated... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a TreeNode object representing the root of a binary tree, return an ArrayList holding the keys in order from a preorder traversal. Done iteratively using a stack. | public static ArrayList<Integer> preOrder(TreeNode<Integer, Integer> root) {
ArrayList<Integer> list = new ArrayList<Integer>();
if (root == null) {
return list;
}
Stack<TreeNode<Integer, Integer>> stack = new Stack<TreeNode<Integer, Integer>>();
stack.push(root);
... | [
"public static ArrayList<Integer> preOrder(TreeNode<Integer, Integer> root) {\n\t\tArrayList<Integer> keys = new ArrayList<Integer>();\n\t\tLinkedList<TreeNode<Integer, Integer>> stack = new LinkedList<> ();\n\t\tif (root != null) {\n\t\t\tstack.push_back(root);\n\t\t}\n\t\twhile (!stack.isEmpty()) {\n\t\t\tTreeNod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new ShippingTemplate | @JsonIgnore
public ArrayList<ShippingTemplate> createShippingTemplate() {
String results = EtsyService.getService("/shipping/templates");
return readResults(results);
} | [
"@JsonIgnore\r\n\tpublic void createShippingTemplateEntry() throws EtsyException {\r\n\t\tif(this.shippingTemplateId>0){\r\n\t\t\tthrow new EtsyException(\"A shipping_template_id is required when creating template.\");\r\n\t\t}\r\n\t\tif(this.destinationCountryId>0 || this.primaryCost>0 || this.secondaryCost>0 || t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column hb_patrolplan.patroltype | public String getPatroltype() {
return patroltype;
} | [
"public String getPlanType()\n\t{\n\t\treturn planType;\n\t}",
"public void setPatroltype(String patroltype) {\n this.patroltype = patroltype == null ? null : patroltype.trim();\n }",
"private String lookupPatrolType(Integer patrolType)\n {\n switch(patrolType)\n {\n case P... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field street is set (has been assigned a value) and false otherwise | public boolean isSetStreet() {
return this.street != null;
} | [
"boolean isSetStreet();",
"public boolean isSetStreet()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(STREET$26) != 0;\n }\n }",
"public boolean isSetStreetNo() {\n return this.streetNo != null;\n }",
"public boo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__S_Solve__KeyAssignment_0" $ANTLR start "rule__S_Solve__FirstFacetAssignment_1" InternalGaml.g:17987:1: rule__S_Solve__FirstFacetAssignment_1 : ( ( 'equation:' ) ) ; | public final void rule__S_Solve__FirstFacetAssignment_1() throws RecognitionException {
int rule__S_Solve__FirstFacetAssignment_1_StartIndex = input.index();
int stackSize = keepStackSize();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 1076) ) { return ... | [
"public final void rule__S_1Expr_Facets_BlockOrEnd__FirstFacetAssignment_1() throws RecognitionException {\n int rule__S_1Expr_Facets_BlockOrEnd__FirstFacetAssignment_1_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtrackin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the cppHeaderBorderColor value for this SetAuthFlowParamRequestDetailsType. | public void setCppHeaderBorderColor(java.lang.String cppHeaderBorderColor) {
this.cppHeaderBorderColor = cppHeaderBorderColor;
} | [
"public void setBorderColor(Color borderColor)\r\n {\r\n this.borderColor = borderColor;\r\n }",
"public native void setBorderColor(PixelPacket color) throws MagickException;",
"public void setBorderColor(Color newColor) { borderColor = newColor; redrawSelf(); }",
"int BoxSetBorderColor(int id, Nativ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given an IConfigurationElement from plugin.xml, return the types of validation passes, as defined in IRuleGroup, that the validator performs. If no pass attribute is specified, the default, IRuleGroup.PASS_FULL, is returned. | private int getRuleGroup(IConfigurationElement element) {
IConfigurationElement[] runChildren = element.getChildren(TAG_RUN_CLASS);
// Don't need to check if runChildren is null or empty, because that was checked in the
// initializeValidator method.
String pass = runChildren[0].getAttribute(ATT_RULE_GROU... | [
"public abstract ElementRule getElementRule();",
"public static int getRulesPassed(){\r\n\t\treturn rulesPassed;\r\n\t}",
"public TypeCheckerProofRule getRule ( ) ;",
"private boolean getEnabledByDefault(IConfigurationElement element) {\n \t\tIConfigurationElement[] runChildren = element.getChildren(TAG_RUN_C... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XExpressionInClosure__ExpressionsAssignment_1_0" $ANTLR start "rule__XShortClosure__DeclaredFormalParametersAssignment_0_0_1_0" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:15896:1: rule__XShortClosure__DeclaredFormalParame... | public final void rule__XShortClosure__DeclaredFormalParametersAssignment_0_0_1_0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXco... | [
"public final void rule__XShortClosure__DeclaredFormalParametersAssignment_0_0_1_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/In... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column twshop_goods.qrcode_url | public void setQrcodeUrl(String qrcodeUrl) {
this.qrcodeUrl = qrcodeUrl == null ? null : qrcodeUrl.trim();
} | [
"public void setLBR_NFCeQRCodeURL (String LBR_NFCeQRCodeURL);",
"public void setMemqrcode(String memqrcode) {\r\n\t\tthis.memqrcode = memqrcode;\r\n\t}",
"public String getQrcodeUrl() {\n return qrcodeUrl;\n }",
"public void setlbr_Barcode2 (String lbr_Barcode2);",
"public String getLBR_NFCeQRCode... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
toString method that calls preOrderTraverse | @Override
public String toString() {
StringBuilder sb = new StringBuilder();
preOrderTraverse(expression.root, 1, sb);
return sb.toString();
} | [
"public String toStringPreOrder()\r\n\t{\r\n\t\tString output = \"\";\r\n\t\t\r\n\t\toutput = buildStringPreOrder(root);\r\n\t\t\r\n\t\treturn output;\r\n\t}",
"@Override\n public String toString () {\n StringBuilder sb = new StringBuilder ();\n traversePreOrder (root,sb);\n return sb.toSt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the token list feature is used. The token list feature makes all tokens (including ignored tokens) link to each other in a linked list. By default the token list feature is not used. | public boolean getUseTokenList() {
return useTokenList;
} | [
"public void setUseTokenList(boolean useTokenList) {\n this.useTokenList = useTokenList;\n }",
"public boolean usesToken() {\n return this instanceof Token;\n }",
"public void setTokenList(List<Token> tokenList) {\n\t\tthis.tokenList = tokenList;\n\t}",
"public static boolean containsToken... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |