query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Method that reads the file and produces the BarChart from data in the file if format is good. Supposed format is next: First line should be name of the x axis Second should be name of the y axis Third should be values for the chart Fourth should be min value of y Fifth should be max value of y Sixth should be distance between two y values | private static BarChart readFile(String path) throws IOException {
BufferedReader reader = new BufferedReader(new FileReader(path));
String xLabel = reader.readLine();
String yLabel = reader.readLine();
String unparsedValues = reader.readLine();
String minY = reader.readLine();
String maxY = reader.readLine();
String density = reader.readLine();
unparsedValues.replace("\\s+", " ");
String[] values = unparsedValues.split(" ");
List<XYValue> chartValues = new LinkedList<>();
for(String value : values) {
if(value.contains("\\s+")) {
reader.close();
throw new IllegalArgumentException("The value must be written in next format: x,y!\n"
+ "No spaces needed.");
}
String[] xy = value.split(",");
try {
chartValues.add(new XYValue(Integer.parseInt(xy[0]), Integer.parseInt(xy[1])));
} catch (NumberFormatException e) {
System.out.println("Format of the file is not good. For values is not provided\n"
+ "value parsable to integer.");
System.exit(0);
}
}
reader.close();
return new BarChart(chartValues, xLabel, yLabel, Integer.parseInt(minY),
Integer.parseInt(maxY), Integer.parseInt(density));
} | [
"public static void main(String[] args) {\r\n\t\tif(args.length != 1) {\r\n\t\t\tSystem.err.println(\"Please provide file path to a file with the chart definition.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tBarChart chart;\r\n\t\tString filePath = args[0];\r\n\t\t\r\n\t\ttry(BufferedReader br = Files.newBufferedR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load caloric table entry by id | public CaloricTableEntry loadCaloricTableEntryById(long id); | [
"@Override\n @Transactional\n public CalendarEntry getById(final Long id) {\n return getCalendarEntryRepository().getById(id);\n }",
"public Entry getEntry(Integer id);",
"public void loadDataByTechId(TechId id);",
"@Override\n public CreditLine loadCreditLine(int id) {\n return getC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get message at head. | public Message peek()
{
return elements[head];
} | [
"com.wookler.server.river.MessageBuf.HeaderProto getHeader();",
"public final String getHead() {\n \t\treturn head;\n \t}",
"BaseProtocol.BaseMessage.Header getHeader();",
"public char first_message_offset_GET()\n { return (char)((char) get_bytes(data, 5, 1)); }",
"public Header getHeaderMessage() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test for method StockTotalIm1ServiceImpl.getStockTotalForProcessStock | @Test
public void testGetStockTotalForProcessStock_1() throws Exception {
StockTotalIm1DTO stockTotalIm1DTO = new StockTotalIm1DTO();
List<StockTotalIm1DTO> stockTotalIm1DTOList = Lists.newArrayList(stockTotalIm1DTO);
when(repository.findOneStockTotal(any())).thenReturn(null);
stockTotalIm1Service.getStockTotalForProcessStock(1L,1L,1L,1L);
} | [
"@Test(expected = Exception.class)\n public void testFindStockTotal_1() throws Exception {\n StockTotalIm1DTO stockTotalDTO = null;\n\n stockTotalIm1Service.findStockTotal(stockTotalDTO);\n }",
"@Test\n public void testFindStockTotal_3() throws Exception {\n StockTotalIm1DTO stockT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if (isMonotonic(password)) System.out.println("HasPartTwoDouble "+Arrays.toString(password)+": "+hasPartTwoDouble(password)); | public static boolean matchesPartTwo(int[] password) {
return isMonotonic(password) && hasPartTwoDouble(password);
} | [
"public static boolean hasPartTwoDouble(int[] password) {\n\t\tint doubleCount = 0;\n\t\tint curDouble = -1;\n\t\tfor(int i=0; i<password.length; i++) {\n\t\t\tif (password[i]!=curDouble) {\n\t\t\t\tif (doubleCount==2) return true;\n\t\t\t\t\n\t\t\t\tdoubleCount = 1;\n\t\t\t\tcurDouble = password[i];\n\t\t\t} else ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This first method asks the user to enter the number of batters. | int askNumberOfBatters(Scanner input) {
System.out.println("Please enter the number of batters: ");
int batterNumber;
batterNumber = getValidInteger(input);
return batterNumber;
} | [
"private void promptForTotalNumberPlayers(){\n theView.printToUser(\"How many players will be playing?\");\n try {\n //get the number of players from the user\n int tempTotalPlayers = Integer.parseInt(theModel.getUserInput());\n if(tempTotalPlayers > 1) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scrape all relevant information for this chapter. | public void generate() throws IOException {
Document document = scraper.parseHTMLDocument(url);
this.chapterTitle = scraper.parseChapterTitle(document);
this.text = scraper.parseChapterText(document);
this.chapterNumber = scraper.parseChapterNumber(document);
} | [
"@Override\n protected void extractChapText(Chapter chapter) {\n StringBuilder chapterText = new StringBuilder();\n\n Elements content = chapter.rawHtml.select(chapTextSelector);\n Iterator<Element> iterator = content.iterator();\n while (iterator.hasNext()) {\n chapterText... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Cable'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseCable(Cable object) {
return null;
} | [
"public T caseEtherCATCable(EtherCATCable object) {\r\n\t\treturn null;\r\n\t}",
"public T caseBusCable(BusCable object) {\r\n\t\treturn null;\r\n\t}",
"public T caseCancion(Cancion object) {\n\t\treturn null;\n\t}",
"public T caseCompositeSwitchInfo(CompositeSwitchInfo object) {\n\t\treturn null;\n\t}",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column x$statement_analysis.rows_sent_avg | public void setRows_sent_avg(BigDecimal rows_sent_avg) {
this.rows_sent_avg = rows_sent_avg;
} | [
"public BigDecimal getRows_sent_avg() {\n return rows_sent_avg;\n }",
"public void setRows_examined_avg(BigDecimal rows_examined_avg) {\n this.rows_examined_avg = rows_examined_avg;\n }",
"public void setRows_affected_avg(BigDecimal rows_affected_avg) {\n this.rows_affected_avg = rows... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the state of the entry. Caller must hold the mutex of this object. | void setState(EntryState state); | [
"public synchronized void set() {\n this.currentState = EventState.UP;\n notify();\n }",
"void setEntry (final Entry entry) {\n if (this.entry != null) {\n stopListening ();\n }\n\n final Entry old_entry = this.entry;\n\n this.entry = entry;\n\n if (old_entry == entry) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the Location of Node at index | int getLoc(int index) {
boundsCheck(index);
index *= SIZEOF_NODE;
return little2Big(tree.getInt(index));
} | [
"public long getNodeIndex();",
"Location(int index, BTreeNode node) {\n this.index = index;\n this.node = node;\n }",
"private static String findNode(int index){\n return indexTable.get(index);\n }",
"public long getNodeIndex(){\n return nodeIndex;\n }",
"public final in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__JsMethod__Group__0__Impl" $ANTLR start "rule__JsMethod__Group__1" InternalMyDsl.g:12243:1: rule__JsMethod__Group__1 : rule__JsMethod__Group__1__Impl rule__JsMethod__Group__2 ; | public final void rule__JsMethod__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:12247:1: ( rule__JsMethod__Group__1__Impl rule__JsMethod__Group__2 )
// InternalMyDsl.g:12248:2: rule__JsMethod__Group__1__Impl rule__JsMethod__Group__2
{
pushFollow(FOLLOW_3);
rule__JsMethod__Group__1__Impl();
state._fsp--;
pushFollow(FOLLOW_2);
rule__JsMethod__Group__2();
state._fsp--;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__JsMethod__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12220:1: ( rule__JsMethod__Group__0__Impl rule__JsMethod__Group__1 )\n // InternalMyDsl.g:12221:2: rule__JsMethod__Group__... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XSetLiteral__Group__4" $ANTLR start "rule__XSetLiteral__Group__4__Impl" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7254:1: rule__XSetLiteral__Group__4__Impl : ( '}' ) ; | public final void rule__XSetLiteral__Group__4__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7258:1: ( ( '}' ) )
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7259:1: ( '}' )
{
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7259:1: ( '}' )
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:7260:1: '}'
{
if ( state.backtracking==0 ) {
before(grammarAccess.getXSetLiteralAccess().getRightCurlyBracketKeyword_4());
}
match(input,56,FOLLOW_56_in_rule__XSetLiteral__Group__4__Impl14967); if (state.failed) return ;
if ( state.backtracking==0 ) {
after(grammarAccess.getXSetLiteralAccess().getRightCurlyBracketKeyword_4());
}
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
restoreStackSize(stackSize);
}
return ;
} | [
"public final void rule__XSetLiteral__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:8864:1: ( ( '}' ) )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getOrderedTestNamesByOrderingFacilityAndTest for a given Reporting facility and Ordered Test, sends a collection of SRTLabTestDT This collection will have one DT | private Collection<Object> getOrderedTestNamesByOrderingFacilityAndTest(String
orderingFacility, String orderedTest) {
ArrayList<Object> dtList = null;
ArrayList<Object> returnList = null;
if(cachedFacilityList != null)
{
dtList = (ArrayList<Object> ) cachedFacilityList.get(orderingFacility);
if(dtList != null)
{
Iterator<Object> it = dtList.iterator();
SRTLabTestDT srtLabTestDT = null;
while (it.hasNext()) {
srtLabTestDT = (SRTLabTestDT) it.next();
if ( (srtLabTestDT.getLabTestCd()).equalsIgnoreCase(orderedTest)) {
returnList = new ArrayList<Object> ();
returnList.add(srtLabTestDT);
break;
}
}
}
}
return returnList;
} | [
"private Collection<Object> getOrderedTestNamesByOrderingFacility(String labCLIAid)\n{\n ArrayList<Object> dtList = null;\n if(cachedFacilityList != null)\n dtList = (ArrayList<Object> )cachedFacilityList.get(labCLIAid);\n return dtList;\n\n }",
"public Collection<Object> getOrderedTestNames(Map... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check that video capture file is not present in result if not requested | @Test(groups={"it"})
public void testReportContainsNoVideoCapture() throws Exception {
try {
System.setProperty(SeleniumTestsContext.VIDEO_CAPTURE, "false");
executeSubTest(1, new String[] {"com.seleniumtests.it.stubclasses.StubTestClassForDriverTest"}, ParallelMode.METHODS, new String[] {"testDriver"});
// read 'testDriver' report. This contains calls to HtmlElement actions
String detailedReportContent1 = readTestMethodResultFile("testDriver");
Assert.assertFalse(detailedReportContent1.contains("Video capture: <a href='videoCapture.avi'>file</a>"));
// check shortcut to video is NOT present in detailed report
Assert.assertFalse(detailedReportContent1.matches(".*<th>Last State</th><td><a href=\"screenshots/testDriver_8-1_Test_end--\\w+.png\"><i class=\"fas fa-file-image\" aria-hidden=\"true\"></i></a><a href=\"videoCapture.avi\"><i class=\"fas fa-video\" aria-hidden=\"true\"></i></a></td>.*"));
// check shortcut to video is NOT present in summary report
String mainReportContent = readSummaryFile();
Assert.assertFalse(mainReportContent.matches(".*<td class=\"info\"><a href=\"testDriver/screenshots/testDriver_8-1_Test_end--\\w+.png\"><i class=\"fas fa-file-image\" aria-hidden=\"true\"></i></a><a href=\"testDriver/videoCapture.avi\"><i class=\"fas fa-video\" aria-hidden=\"true\"></i></a></td>.*"));
} finally {
System.clearProperty(SeleniumTestsContext.VIDEO_CAPTURE);
}
} | [
"public boolean hasVideo();",
"boolean isVideoSupported();",
"public boolean isVideo()\n {return false;\n }",
"public boolean hasVideo() {\n\t\treturn this.recordingProperties.hasVideo();\n\t}",
"public boolean hasVideo() {\n\treturn video != null;\n }",
"@OnClick(R.id.iv_video)\n void pickVid... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reprint Bill Button Click event, calls reprint bill function | public void reprintBill() {
//ReprintVoid(Byte.parseByte("1"));
tblOrderItems.removeAllViews();
AlertDialog.Builder DineInTenderDialog = new AlertDialog.Builder(this);
LayoutInflater UserAuthorization = (LayoutInflater) this
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View vwAuthorization = UserAuthorization.inflate(R.layout.dinein_reprint, null);
final ImageButton btnCal_reprint = (ImageButton) vwAuthorization.findViewById(R.id.btnCal_reprint);
final EditText txtReprintBillNo = (EditText) vwAuthorization.findViewById(R.id.txtDineInReprintBillNumber);
final TextView tv_inv_date = (TextView) vwAuthorization.findViewById(R.id.tv_inv_date);
tv_inv_date.setText(tvDate.getText().toString());
btnCal_reprint.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
DateSelection(tv_inv_date);
}
});
DineInTenderDialog.setIcon(R.drawable.ic_launcher).setTitle("RePrint Bill")
.setView(vwAuthorization).setNegativeButton("Cancel", null)
.setPositiveButton("RePrint", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
if (txtReprintBillNo.getText().toString().equalsIgnoreCase("")) {
messageDialog.Show("Warning", "Please enter Bill Number");
setInvoiceDate();
return;
} else if (tv_inv_date.getText().toString().equalsIgnoreCase("")) {
messageDialog.Show("Warning", "Please enter Bill Date");
setInvoiceDate();
return;
} else {
try {
int billStatus =0;
int billNo = Integer.valueOf(txtReprintBillNo.getText().toString());
String date_reprint = tv_inv_date.getText().toString();
tvDate.setText(date_reprint);
Date date = new SimpleDateFormat("dd-MM-yyyy").parse(date_reprint);
Cursor LoadItemForReprint = db.getItemsFromBillItem_new(
billNo, String.valueOf(date.getTime()));
if (LoadItemForReprint.moveToFirst()) {
Cursor cursor = db.getBillDetail_counter(billNo, String.valueOf(date.getTime()));
if (cursor != null && cursor.moveToFirst()) {
billStatus = cursor.getInt(cursor.getColumnIndex("BillStatus"));
if (billStatus == 0) {
messageDialog.Show("Warning", "This bill has been deleted");
setInvoiceDate();
return;
}
String pos = cursor.getString(cursor.getColumnIndex("POS"));
String custStateCode = cursor.getString(cursor.getColumnIndex("CustStateCode"));
if (pos != null && !pos.equals("") && custStateCode != null && !custStateCode.equals("") && !custStateCode.equalsIgnoreCase(pos)) {
chk_interstate.setChecked(true);
int index = getIndex_pos(custStateCode);
spnr_pos.setSelection(index);
//System.out.println("reprint : InterState");
} else {
chk_interstate.setChecked(false);
spnr_pos.setSelection(0);
//System.out.println("reprint : IntraState");
}
fTotalDiscount = cursor.getFloat(cursor.getColumnIndex("TotalDiscountAmount"));
float discper = cursor.getFloat(cursor.getColumnIndex("DiscPercentage"));
reprintBillingMode = cursor.getInt(cursor.getColumnIndex("BillingMode"));
tvDiscountPercentage.setText(String.format("%.2f", discper));
tvDiscountAmount.setText(String.format("%.2f", fTotalDiscount));
tvBillNumber.setText(txtReprintBillNo.getText().toString());
tvIGSTValue.setText(String.format("%.2f", cursor.getDouble(cursor.getColumnIndex("IGSTAmount"))));
tvTaxTotal.setText(String.format("%.2f", cursor.getDouble(cursor.getColumnIndex("CGSTAmount"))));
tvServiceTaxTotal.setText(String.format("%.2f", cursor.getDouble(cursor.getColumnIndex("SGSTAmount"))));
tvSubTotal.setText(String.format("%.2f", cursor.getDouble(cursor.getColumnIndex("TaxableValue"))));
tvBillAmount.setText(String.format("%.2f", cursor.getDouble(cursor.getColumnIndex("BillAmount"))));
LoadItemsForReprintBill(LoadItemForReprint);
Cursor crsrBillDetail = db.getBillDetail_counter(Integer.valueOf(txtReprintBillNo.getText().toString()));
if (crsrBillDetail.moveToFirst()) {
customerId = (crsrBillDetail.getString(crsrBillDetail.getColumnIndex("CustId")));
}
}
} else {
messageDialog.Show("Warning",
"No Item is present for the Bill Number " + txtReprintBillNo.getText().toString() +", Dated :"+tv_inv_date.getText().toString());
setInvoiceDate();
return;
}
if(reprintBillingMode ==4 && billStatus ==2)
{
strPaymentStatus = "Cash On Delivery";
}
else
strPaymentStatus = "Paid";
isReprint = true;
PrintNewBill();
// update bill reprint count
int Result = db
.updateBillRepintCounts(Integer.parseInt(txtReprintBillNo.getText().toString()));
ClearAll();
if (!(crsrSettings.getInt(crsrSettings.getColumnIndex("Tax")) == 1)) { // reverse tax
REVERSETAX = true;
}else
{
REVERSETAX = false;
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}).show();
} | [
"public void RePrintData(ActionEvent actionEvent) {\n try {\n BindingContext bCtx = BindingContext.getCurrent();\n DCBindingContainer bindings = (DCBindingContainer) bCtx.getCurrentBindingsEntry();\n DCIteratorBinding iter = (DCIteratorBinding) bindings.findIteratorBinding(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates the connection context. | boolean isConnectionContextValid(); | [
"boolean isConnectionContextValidForLogin();",
"public abstract boolean validateConnection();",
"public void validateContext(EvaluationContext context) {\n if (null == this.context) {\n this.context = context;\n }\n }",
"void validateConnection() throws DatabaseException;",
"priv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for top spacings. | public List<Integer> getTopSpacings() {
return topSpacings;
} | [
"public List<Integer> getTopVerticalSpacings() {\n return topVerticalSpacings;\n }",
"public int getTopN() {\n return topN_;\n }",
"public int getTopN() {\n return topN_;\n }",
"public Integer getTopbs() {\n return topbs;\n }",
"@VTID(35)\r\n double getTop();",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overwrite displayed project records in the ViewerFrame. The reason behind overwriting is changes to the EphrinSummaryFile.tsv file. | public void notifyOverwriteProjectRecords(ArrayList<ProjectRecordUnit> projectRecordUnits) {
System.out.println("Main::notifyOverwriteProjectRecords " + projectRecordUnits.size() + " records");
summaryFileWriter = SummaryFileWriter.getInstance();
if (summaryFileWriter.OverwriteProjectRecords(projectRecordUnits)) {
viewerFrame.overwriteRecordUnits(retrieveRecordUnits());
viewerFrame.updateEphrinStatus(projectRecordUnits.size() + " records successfully saved to "
+ Constants.PROPERTY_SUMMARY_FILE_FULLPATH, false);
} else {
viewerFrame.updateEphrinStatus("Alert!! Something went wrong while saving project records!!", true);
}
} | [
"private void resetProjectDataPanel() {\r\n this.listProjectsViewController.setProjectTagsText(\"\");\r\n this.listProjectsViewController.setProjectTagsDescription(\"\");\r\n this.listProjectsViewController.setProjectEndTime(\"\");\r\n this.listProjectsViewController.setProjectAuthorText(\"\");\r\n t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method: createWindow purpose: This method creates a window with openGL and setup the display area. | private void createWindow() throws Exception
{
Display.setFullscreen(false);
DisplayMode d[] = Display.getAvailableDisplayModes();
for (int i = 0; i < d.length; i++)
{
if (d[i].getWidth() == 640 && d[i].getHeight() == 480
&& d[i].getBitsPerPixel() == 32)
{
displayMode = d[i];
break;
}
}
Display.setDisplayMode(displayMode);
Display.setTitle("Final Project");
Display.create();
} | [
"public void createWindow ()\n {\n this.setResizable(false);\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\n this.setPreferredSize(new Dimension(game.getWIDTH(), game.getHEIGHT()));\n this.setMinimumSize(new Dimension(game.getWIDTH(), game.getHEIGHT()));\n this.setMaximumSize... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Move through the string looking for negations | private String MoveNegationsInward(String string) {
for ( int i = 0; i < string.length(); i++){
// Remove double negation
if (string.charAt(i) == '~' && string.charAt(i+1) == '~'){
string = string.substring(0,i) + string.substring(i+2);
}
// Distribute negations
if (string.charAt(i) == '~' && string.charAt(i+1) == '('){
//Remove the negation
string = string.substring(0,i) + "(~"+string.substring(i+2);
int right = 1;
int rightIndex = i+2;
//Distribute the negation over the next expression according to DeMorgan's laws
int j = 0;
for ( j = 1; i+j < string.length() && right != 0; j++){
if (string.charAt(i+j) == '('){
right++;
continue;
}
if (right == 1){
//Move within the brackets and change | to & and vice versa. Also add ~
if (string.charAt(i+j) == '|' || string.charAt(i+j) == '&'){
//string = string.substring(0,rightIndex)+MoveNegationsInward(string.substring(rightIndex,i+j))+string.substring(i+j);
if (string.charAt(i+j) == '|'){
string = string.substring(0,i+j)+"&"+string.substring(i+j+1);
} else if (string.charAt(i+j) == '&'){
string = string.substring(0,i+j)+"|"+string.substring(i+j+1);
}
string = string.substring(0, i+j+1)+"~"+string.substring(i+j+1);
string = string.substring(0,rightIndex)+MoveNegationsInward(string.substring(rightIndex,i+j+1))+string.substring(i+j+1);
}
}
if (string.charAt(i+j) == ')'){
right--;
continue;
}
}
}
}
//System.out.println("Returning: "+string);
return string;
} | [
"public static String negation(String s) {\r\n \tif(s.charAt(0) == '~') s = s.substring(1);\r\n\t\telse s = \"~\"+ s;\r\n \treturn s;\r\n }",
"@Override\n public CharMatcher negate() {\n return new Negated(this);\n }",
"private boolean isNegative(String sentence) {\n if (sentence.contains(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
stampa l'indirizzo IP e la porta del client, il messaggio di PING e l'azione intrapresa dal server in seguito alla sua ricezione (PING non inviato,oppure PING ritardato di x ms). | public void stampaOK(){
System.out.println("IP: " + client_ip + " Port: " + client_port + " " + messaggio);
System.out.println("PING inviato dopo: " + latency);
} | [
"private void ping()\n {\n pinged = false;\n if(client != null){client.send_message(\"{\\\"type\\\": \\\"PING\\\"}\");}\n }",
"private void startPingTimer() {\n\n Timer timer = new Timer();\n TimerTask task = new TimerTask() {\n @Override\n public void run()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the material folder control. | @FxThread
private @NotNull ChooseFolderControl getMaterialFolderControl() {
return notNull(materialFolderControl);
} | [
"public static String getMediaFolderName() {\n\treturn ResourceLoader.getString(\"NAME_MEDIA_FOLDER\");\n }",
"public Composite getCurrentFolderComposite(){\r\n\t\tif(compositeMap.get(compositeIndex) == null){\r\n\t\t\tComposite composite = new Composite(folderReference, SWT.NONE);\r\n\t\t\tGridLayout fillLayo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Function to call Vacation_grant scenarios sheet Created by Gandhi Date Created: 03/18/19 Usage:NVacation_grant changes | public void Vacation_grant() throws Throwable {
String pass = "Vacation_grant";
Vacation_grnt(pass);
} | [
"public void Vacation_grnt(String Grant) throws Throwable\r\n\r\n\t{\r\n\t\tString supid = \"\";\r\n\t\tString tempsupid = \"\";\r\n\t\tString Emp = \"\";\r\n\r\n\t\tString exp = \"\";\r\n\t\tString TCN =\"\";\r\n\t\tString SeniorityDate =\"\";\r\n\t\tString Benefit = \"\";\r\n\r\n\t\t// String employee = \"\";\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is a very different cancel because of the possibility that an original configuration actually changed due to a save, in which case the state in the caller's context has to reflect the assaved object even if the user says cancel. Look up the old configs by name and return new objects. If the name no longer exists due to a delete just return the original object; that can still be used by the caller as it is now standalone. The caller must apply the new objects regardless, so there is no cancelled property. Null or unsaved objects in the original state are always just returned. | private void doCancel(boolean doHide) {
ArrayList<OutputConfig> oldConfigs = configs;
configs = new ArrayList<OutputConfig>();
OutputConfig newConfig;
for (OutputConfig oldConfig : oldConfigs) {
if (oldConfig.isUnsaved() || oldConfig.isNull()) {
newConfig = oldConfig;
} else {
newConfig = OutputConfig.getConfig(getDbID(), oldConfig.type, oldConfig.name);
if (null == newConfig) {
newConfig = oldConfig;
}
}
configs.add(newConfig);
}
blockActionsSet();
if (doHide) {
AppController.hideWindow(this);
}
} | [
"com.google.protobuf.Any getOldConfig();",
"public CursorConfig getConfig() {\n try {\n return config.clone();\n } catch (Error E) {\n dbImpl.getDbEnvironment().invalidate(E);\n throw E;\n }\n }",
"com.google.protobuf.AnyOrBuilder getOldConfigOrBuilder();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all users in this channel | public Set<User> getUsers() {
return bot.getUsers(name);
} | [
"Collection<GroupChatUser> getUsers();",
"public List<User> getAllUsers(){\n Controller controller= Controller.getInstance();\n List<User> users= new LinkedList<>();\n for(Map.Entry user: controller.getUsers().entrySet()){\n users.add((User)user.getValue());\n }\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets current ratings manager. | RatingsManager getRatingsManager(DocumentReference documentRef); | [
"public RatingService getRatingService()\r\n {\r\n if (ratingsService == null && RepositoryVersionHelper.isAlfrescoProduct(session))\r\n {\r\n this.ratingsService = new CustomRatingsServiceImpl((RepositorySession) session);\r\n }\r\n return ratingsService;\r\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parsing JSON with all movie data from Service and updating UI | private void getMoviesFromJson(String moviesJsonStr) throws JSONException {
// These are the names of the JSON objects that need to be extracted.
final String OWM_LIST = "results";
final String OWM_MOVIE_ID = "id";
final String OWM_OVERVIEW = "overview";
final String OWM_TITLE = "title";
final String OWM_POPULARITY = "popularity";
final String OWM_POSTER = "poster_path";
final String OWM_VOTE_AVERAGE = "vote_average";
final String OWM_RELEASE_DATE = "release_date";
try {
JSONObject moviesJSON = new JSONObject(moviesJsonStr);
JSONArray moviesArray = moviesJSON.getJSONArray(OWM_LIST);
// Insert the new movie information into the database
Vector<ContentValues> cVVector = new Vector<ContentValues>(moviesArray.length());
for(int i = 0; i < moviesArray.length(); i++) {
// Get the JSON object representing a movie
JSONObject movie = moviesArray.getJSONObject(i);
int movieId = movie.getInt(OWM_MOVIE_ID);
String title = movie.getString(OWM_TITLE);
String overview = movie.getString(OWM_OVERVIEW);
double popularity = movie.getDouble(OWM_POPULARITY);
double voteAverage = movie.getDouble(OWM_VOTE_AVERAGE);
String poster = movie.getString(OWM_POSTER);
String date = movie.getString(OWM_RELEASE_DATE);
// Get millis from date
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Calendar cal = Calendar.getInstance();
cal.setTime(formatter.parse(date));
long dateMillis = cal.getTimeInMillis();
ContentValues movieValues = new ContentValues();
movieValues.put(MoviesContract.MovieEntry._ID, movieId);
movieValues.put(MoviesContract.MovieEntry.COLUMN_TITLE, title);
movieValues.put(MoviesContract.MovieEntry.COLUMN_DESCRIPTION, overview);
movieValues.put(MoviesContract.MovieEntry.COLUMN_POPULARITY, popularity);
movieValues.put(MoviesContract.MovieEntry.COLUMN_VOTE, voteAverage);
movieValues.put(MoviesContract.MovieEntry.COLUMN_POSTER, poster);
movieValues.put(MoviesContract.MovieEntry.COLUMN_DATE, dateMillis);
cVVector.add(movieValues);
}
// add to database
int inserted = 0;
if ( cVVector.size() > 0 ) {
// delete old data so we don't build up an endless history
mContext.getContentResolver().delete(MoviesContract.MovieEntry.CONTENT_URI, null, null);
// Insert movies with bulkInsert
ContentValues[] cvArray = new ContentValues[cVVector.size()];
cVVector.toArray(cvArray);
mContext.getContentResolver().bulkInsert(MoviesContract.MovieEntry.CONTENT_URI, cvArray);
}
} catch (JSONException e) {
Log.e(LOG_TAG, e.getMessage(), e);
e.printStackTrace();
} catch (ParseException e) {
e.printStackTrace();
}
} | [
"public void fetchMovies(){\n MovieDBClient.makeNowPlayingReqest(new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int i, Headers headers, JSON json) {\n Log.i(TAG, \"successful request for movies\");\n\n //1.) Get the \"results\" array fr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Insert a new edge into the graph. | public void insert(Edge edge) {
edges[edge.getSource()].add(edge);
if (!isDirected()) {
edges[edge.getDest()].add(new Edge(edge.getDest(),
edge.getSource(),
edge.getWeight()));
}
} | [
"public void insert(Edge edge);",
"public void insert(Edge e){\n\t\t\n\t\tedges.add(e); \n\t\t\n\t}",
"public void insert(Edge edge){\n edges[edge.getSource()].add(edge);\n if (isDirected()){\n edges[edge.getDest()].add(new Edge(edge.getDest(), edge.getSource(),edge.getWeight()));\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'SSL Configuration'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseSSLConfiguration(SSLConfiguration object) {
return null;
} | [
"public T caseClientSSLConfiguration(ClientSSLConfiguration object) {\r\n\t\treturn null;\r\n\t}",
"public T caseServerSSLConfiguration(ServerSSLConfiguration object) {\r\n\t\treturn null;\r\n\t}",
"public <C extends SSLConfiguration> T caseSecureEndpointConfiguration(SecureEndpointConfiguration<C> object) {\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates bash command. The command returns 0 if the command exists and is a file | private static String mkCheckCommandExistsCommand(final String commandName)
{
return "type -p " + commandName;
} | [
"Command createCommand();",
"private Command createCommand(String command) {\n\t\tString[] tokens = command.split(\" \");\n\t\tswitch(tokens[0].toLowerCase()) {\n\t\tcase DRAW:\n\t\t\treturn createDrawCommand(command);\n\t\t\n\t\tcase SKIP:\n\t\t\treturn createSkipCommmand(command);\n\t\t\t\n\t\tcase SCALE:\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the tempblock (barrier or bedrock) with the opacity closest to state (tries to minimize the load on the lightning engine) | public static IBlockState getTempState(final IBlockState state)
{
return (state.getBlock().getLightOpacity() < 8 ? Blocks.barrier : Blocks.bedrock).getDefaultState();
} | [
"public static IBlockState getTempState(final IBlockState state1, final IBlockState state2)\n\t{\n\t\treturn (state1.getBlock().getLightOpacity() + state2.getBlock().getLightOpacity() < 15 ? Blocks.barrier : Blocks.bedrock).getDefaultState();\n\t}",
"@Override\n public int getLightOpacity(IBlockState state)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a copy of the value of the Volume property | public long getPropertyVolume(); | [
"@Override\n public double getVolume() {\n return l.getVolume();\n }",
"java.lang.String getVolume();",
"public int getVolume(){\n return volume;\n }",
"long getVolume();",
"public int getCurrentVolume() {\n return mCurrentVolume;\n }",
"public long getCurrentVolum... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field permission is set (has been assigned a value) and false otherwise | public boolean isSetPermission() {
return this.permission != null;
} | [
"public boolean hasPermission() {\n return fieldSetFlags()[1];\n }",
"public boolean isSetPermission() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PERMISSION_ISSET_ID);\n }",
"boolean getHasPermission();",
"public boolean isSetPermissionGroup() {\n return this.per... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets overload matching the specified list of parameter expressions from the registered overload in this descriptor. | @Override
public SubroutineDescriptor getOverload(List<ExpressionNode> actualParameters) throws LexicalException {
for (SubroutineDescriptor descriptor : this.overloads) {
if (this.compareActualWithFormatParameters(descriptor.getFormalParameters(), actualParameters)) {
return descriptor;
}
}
throw new LexicalException("Not existing overload for this subroutine");
} | [
"private void findConstantParameter(List<Method> methods, InstructionContext invokeCtx)\n\t{\n\t\tcheckMethodsAreConsistent(methods);\n\n\t\tMethod method = methods.get(0); // all methods must have the same signature etc\n\t\tint offset = method.isStatic() ? 0 : 1;\n\n\t\tList<StackContext> pops = invokeCtx.getPops... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a redundancy copy of a bucket on a given node. This call may be asynchronous, it will notify the completion when the the operation is done. Note that the completion is not required to be threadsafe, so implementors should ensure the completion is invoked by the calling thread of createRedundantBucket, usually by invoking the completions in waitForOperations. | void createRedundantBucket(InternalDistributedMember targetMember,
int bucketId, Map<String, Long> colocatedRegionBytes, Completion completion); | [
"public interface BucketOperator {\n\n /**\n * Create a redundancy copy of a bucket on a given node. This call may be\n * asynchronous, it will notify the completion when the the operation is done.\n * \n * Note that the completion is not required to be threadsafe, so implementors\n * should ensure the c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: load previous table this.scopeAlias.clear(); | protected void clearTableAlias(int pushCounter) {
this.tablesInScope = this.tablesInScope.clearAndGetPrevious();
se.resetConstraints(pushCounter);
} | [
"public void resetScope() {\n\t // TODO Auto-generated method stub\n\t _scope = _oldScope;\n }",
"private void eraseParentAlias(Scope scope) {\n if (isStartWithParentAlias(scope)) {\n expr.setName(name());\n }\n }",
"public void clearAliases() {\n // Override in proxy if lazily... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates unique ids to create secret keys. | public String generateNewKey(); | [
"private String generateId() {\n byte[] id = new byte[BACKUP_KEY_SUFFIX_LENGTH_BITS / BITS_PER_BYTE];\n mSecureRandom.nextBytes(id);\n return BACKUP_KEY_ALIAS_PREFIX + ByteStringUtils.toHexString(id);\n }",
"private String generateId() {\n\t\tStringBuilder finalString = new StringBuilder(2... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getRota method, of class Mapa. | @Test
public void testGetRotaDistancia() {
System.out.println("getRotaDistancia");
mapa.adicionarLigacoes(ligacoes);
mapa.criarGrafoTipo(TipoPesoEnum.DISTANCIA, veiculos.get(0));
List<LigacaoLocais> result = mapa.getRota(locais.get(3), locais.get(0));
assertTrue(result.size() == 2, "O tamanho da rota รฉ de 2");
} | [
"@Test\n public void testGetRotaTempo() {\n System.out.println(\"getRotaEnergia\");\n\n mapa.adicionarLigacoes(ligacoes);\n mapa.criarGrafoTipo(TipoPesoEnum.TEMPO, veiculos.get(0));\n List<LigacaoLocais> result = mapa.getRota(locais.get(3), locais.get(0));\n\n assertTrue(result... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks to see if a Card is face up | public boolean isFaceUp(){
if(faceUpValue==false){
return false;
}
else
return true;
} | [
"public boolean isFaceUp(){\r\n return(getImage() == CardFaceUp);\r\n }",
"boolean isTurnedFaceUp();",
"public boolean isFaceUp(){return faceUp;}",
"public boolean isfaceup(){\n\t\treturn faceup;\n\t}",
"public boolean isFaceUp() {\n\treturn faceUp;\n}",
"public boolean isFaceUp()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specifies if the spectrum id values were obtained from the spectrum order numbers. | public boolean isSpectrumIdObtainedFromSpectrumOrderNumber()
{
return true;
} | [
"private void setSpectrumIdsFound(List<String> spectrumIdsFound)\r\n\t{\r\n\t\tthis.spectrumIdsFound = spectrumIdsFound;\r\n\t}",
"private List<String> getSpectrumIdsFound()\r\n\t{\r\n\t\treturn this.spectrumIdsFound;\r\n\t}",
"private void setSpectrumIdsTarget(List<String> spectrumIdsTarget)\r\n\t{\r\n\t\tthis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Binds a property value to the mock context. | private void bind(final Context mockCtx, final String name, final String value) throws NamingException {
when(mockCtx.lookup(name)).thenReturn(value);
bindError(mockCtx, name + MISSING_PROP);
} | [
"protected void bind(EvaluationContext context) {\n this.context = context;\n }",
"public IProperty recontextualizeProperty(IProperty value);",
"public abstract void setValue(ELContext context,\n Object base,\n Object property,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to create the TSPSimulatedAnnealing object, receive TSPProblem object and | public TSPSimulatedAnnealing(TSPProblem tspProblem){
super();
this.tspProblem = tspProblem;
this.random = new Random();
this.initialSolution = generateInitialSolution();
calculateInitialAndFinalTemperature();
} | [
"public TSPSolution(){\n\t\tthis.route=(IRoute) new ArrayRoute();\n\t}",
"private void useInstance(){\n int[] tour = Optimisation.linkernTour(ttp);\n TSPSolution = new Individual(tour.length-1);\n\n //matches the city number with the CITY object supplied in the cities array\n for(int i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Translate Java Swing user interface. | public static void translate() {
UIManager.put("OptionPane.yesButtonText", Messages.getString("Translator.1")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("OptionPane.cancelButtonText", Messages.getString("Translator.3")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("OptionPane.noButtonText", Messages.getString("Translator.5")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("OptionPane.okButtonText", Messages.getString("Translator.7")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.cancelButtonText", Messages.getString("Translator.9")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.cancelButtonToolTipText", Messages.getString("Translator.11")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.detailsViewButtonToolTipText", Messages.getString("Translator.44")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.detailsViewButtonAccessibleName", Messages.getString("Translator.46")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.fileAttrHeaderText", Messages.getString("Translator.56")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.fileDateHeaderText", Messages.getString("Translator.54")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.fileNameHeaderText", Messages.getString("Translator.48")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.fileNameLabelMnemonic", Integer.valueOf('N')); // N //$NON-NLS-1$
UIManager.put("FileChooser.fileNameLabelText", Messages.getString("Translator.23")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.fileSizeHeaderText", Messages.getString("Translator.50")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.filesOfTypeLabelMnemonic", Integer.valueOf('T')); // T //$NON-NLS-1$
UIManager.put("FileChooser.filesOfTypeLabelText", Messages.getString("Translator.26")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.fileTypeHeaderText", Messages.getString("Translator.52")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.homeFolderToolTipText", "Desktop"); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.homeFolderAccessibleName", "Desktop"); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.listViewButtonToolTipText", Messages.getString("Translator.40")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.listViewButtonAccessibleName", Messages.getString("Translator.42")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.lookInLabelMnemonic", Integer.valueOf('E')); //$NON-NLS-1$
UIManager.put("FileChooser.lookInLabelText", Messages.getString("Translator.18")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.newFolderToolTipText", Messages.getString("Translator.36")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.newFolderAccessibleName", Messages.getString("Translator.38")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.openButtonToolTipText", Messages.getString("Translator.0")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.openButtonAccessibleName", Messages.getString("Translator.0")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.openButtonText", Messages.getString("Translator.0")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.saveButtonText", Messages.getString("Translator.13")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.saveButtonToolTipText", Messages.getString("Translator.15")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.saveInLabelText", Messages.getString("Translator.20")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.upFolderToolTipText", Messages.getString("Translator.28")); //$NON-NLS-1$ //$NON-NLS-2$
UIManager.put("FileChooser.upFolderAccessibleName", Messages.getString("Translator.30")); //$NON-NLS-1$ //$NON-NLS-2$
} | [
"public static String _translategui() throws Exception{\nif ((mostCurrent._main._lang /*String*/ ).equals(\"es\")) { \r\n //BA.debugLineNum = 83;BA.debugLine=\"lblTeam.Text = \\\"El equipo GeoVin\\\"\";\r\nmostCurrent._lblteam.setText(BA.ObjectToCharSequence(\"El equipo GeoVin\"));\r\n //BA.debugLineNum = 84;BA.de... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draws the boad lines and the pieces as per their locations. Drawing of lines is provided, students to implement drawing of pieces and number of goats. | private void drawBoard()
{
sc.drawRectangle(0,0,brdSize,brdSize,Color.BLUE); //wipe the canvas
//draw shadows of Goats and Tigers - not compulsory //////////////////////
// Draw the lines
for(int i=1; i<9; i++)
{
//diagonal and middle line
sc.drawLine(locs[i-1][0]*bkSize, locs[i-1][1]*bkSize,
locs[i+15][0]*bkSize, locs[i+15][1]*bkSize, Color.red);
if(i==4 || i==8) continue; //no more to draw at i=4,8
// vertical line
sc.drawLine(i*bkSize, i*bkSize,
i*bkSize, brdSize-i*bkSize,Color.white);
// horizontal line
sc.drawLine(i*bkSize, i*bkSize,
brdSize-i*bkSize, i*bkSize, Color.white);
}
// TODO 10
// Draw the goats and tigers. (Drawing the shadows is not compulsory)
// Display the number of goats
sc.drawString("Number of Goats: "+rules.getNumGoats(), brdSize/2-60, brdSize-20, Color.GREEN);
for (int i = 0; i < 24; i++) {
if (bd.isGoat(i)) {
sc.drawDisc(locs[i][0]*bkSize,locs[i][1]*bkSize ,bkSize/2, Color.RED);
}
else if (!bd.isVacant(i)) {
sc.drawDisc(locs[i][0]*bkSize,locs[i][1]*bkSize ,bkSize/2, Color.YELLOW);
}
}
} | [
"public void drawLocations()\r\n {\r\n WGraphics wg;\r\n //VisFrame Vz2 = new VisFrame();\r\n wg = new WGraphics(500, 500, minx, miny, maxx, maxy);\r\n\r\n wg.clear();\r\n\r\n for (int i = 1; i <= nClients; i++)\r\n {\r\n wg.drawMark(coordClient[i][0], coordCl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make all aliases longer than max (256) | @Test
public void testUpdateCreativeVersionsWithLargeAliasShouldFail() {
for(CreativeVersion cv : creative.getVersions()) {
cv.setAlias(EntityFactory.faker.lorem().fixedString(257));
}
Either<Errors, Creative> result = creativeManager.updateCreative(creative.getId(),
creative,
key);
String message = "Invalid alias, it supports characters up to 256.";
assertCreativeVersionError(numberOfVersions, result, message);
} | [
"public int getMaxAliasLength() {\n \t\treturn 10;\n \t}",
"private void adjustMaxPrefixCharacterLenghtAfterRemoval(){\n int prefixFullNameMaxLength = !getAllPrefixFullNames().isEmpty() ? Collections.max(getAllPrefixFullNames(), stringCharacterLengthComparator).length() : 0;\n int prefixAbbreviation... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To use the GoogleCalendarClientFactory as factory for creating the client. Will by default use BatchGoogleCalendarClientFactory. The option is a: org.apache.camel.component.google.calendar.GoogleCalendarClientFactory type. Group: advanced | default GoogleCalendarComponentBuilder clientFactory(
org.apache.camel.component.google.calendar.GoogleCalendarClientFactory clientFactory) {
doSetProperty("clientFactory", clientFactory);
return this;
} | [
"static GoogleCalendarComponentBuilder googleCalendar() {\n return new GoogleCalendarComponentBuilderImpl();\n }",
"interface GoogleCalendarComponentBuilder\n extends\n ComponentBuilder<GoogleCalendarComponent> {\n /**\n * Google calendar application name. Exampl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
// getEvaluation // // | @Override
public Evaluation getEvaluation ()
{
return evaluation;
} | [
"public String getEvaluation() {\n return evaluation;\n }",
"public EvaluationStrategy getEvaluationStrategy();",
"public ASEvaluation getEvaluator();",
"public String getEvaluationResult() {\n return evaluationResult;\n }",
"public com.google.cloud.datalabeling.v1beta1.Evaluation getEva... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'field53' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField53() {
field53 = null;
fieldSetFlags()[53] = false;
return this;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField1053() {\n field1053 = null;\n fieldSetFlags()[1053] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField123() {\n field123 = null;\n fieldSetFlags()[123] = false;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If current capacity enough to add just add. Else extending existing array and adding the value | public void add(E value){
if (maxIndex != array.length-1){
array[++maxIndex] = value;
}else {
Object[] tmpArray = new Object[array.length+ capacity];
for (int i = 0; i < array.length; i++) {
tmpArray[i] = array[i];
}
array = tmpArray;
array[++maxIndex] = value;
}
} | [
"public void add(T x){\n\t\t//check whether capacity has reached\n\t\tif (size == data.length){\n\t\t\t//if yes: expand array \n\t\t\t\n\t\t\t// create a new array, double the size\n\t\t\tT [] data2 = (T []) new Object[size*2];\n\t\t\t\n\t\t\t// copy over from old array\n\t\t\tfor (int i = 0; i<size; i++){\n\t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets how many fields are occupied by a stone | public int getNumberOfOccupiedFields() {
this.numberOfOccupiedFields = numberOfFieldsOccupiedByStoneColor(Color.WHITE) + numberOfFieldsOccupiedByStoneColor(Color.BLACK);
return numberOfOccupiedFields;
} | [
"public int getNumberOfFieldsOccupiedByStone(Color stoneColor) {\n return numberOfFieldsOccupiedByStoneColor(stoneColor);\n }",
"private int numberOfFieldsOccupiedByStoneColor(Color colorOfStonesToCount) {\n int counterOccupiedByStoneColor = 0;\n for (int i = 0; i < fields.length; i++) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The URL to the event page | @ApiModelProperty(value = "The URL to the event page")
public String getUrl() {
return url;
} | [
"public String getURLUpdateEvent(Event event){\n String url = String.format(getPath() + \"users('%s')/events/%s\", location.getDisplayName(), event.getId());\n logger.info(\"Getting URL update event : \"+ url );\n return url;\n }",
"public String getURLDeleteEvent(Event event){\n S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/add two Jumble sequences | public static Seq plus(Jumble j1, Jumble j2){
int new_size = (j1.count < j2.count) ? j1.count : j2.count;
int new_arr[] = new int[new_size];
for(int i = 0; i < new_size; i++) {
new_arr[i] = j1.values[i] + j2.values[i]; //add each corresponding element
}
return new Jumble(new_arr); // the Jumble constructor does copy
} | [
"public static Seq plus (Constant c1, Jumble j1)\t{\n\t\t\n\t\tint size, \t// shorter length of the two sequences\n\t\t walker = 0;\t// index walker for array\n\n\t\t// find short length\n\t\tif(c1.num <= j1.values.length)\n\t\t\tsize = c1.num;\n\t\telse\n\t\t\tsize = j1.values.length;\n\n\t\t// add correspondin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new twistlock with no owner and an empty | public Twistlock ()
{
this.owner = -1;
this.containers = new Container[0];
} | [
"public BookingLockResponse createLock(String bookingNo);",
"BlockActivity createBlockActivity();",
"public void createLockNullResource() throws WebDAVException;",
"public abstract Locker newNonTxnLocker() throws DatabaseException;",
"LockManager() {\n }",
"static Lock createLock() {\n return new /*... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates a error matrix sampled from the distribution in the lwebgn paper. | public BigInteger[][] generateErrorMatrix(){
return null;
} | [
"public double getError(double[] weights);",
"private static double[][] generateRandomMatrix (int numRows, int numCols) {\r\n double matrix[][] = new double[numRows][numCols];\r\n for (int row = 0 ; row < numRows ; row++ ) {\r\n for (int col = 0 ; col < numCols ; col++ ) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the "PeriodoDevengo" element | public java.util.Calendar getPeriodoDevengo()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERIODODEVENGO$2, 0);
if (target == null)
{
return null;
}
return target.getCalendarValue();
}
} | [
"public org.apache.xmlbeans.XmlGYearMonth xgetPeriodoDevengo()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlGYearMonth target = null;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface that defines requirements for receipts when they need to be displayed | public interface Receipt
{
/**
* The header for the receipt
* @return a string for the very top part of the receipt, with the user's name and other relevant information displayed
*/
String header();
/**
* The list of all the reservations that should be included in the receipt, including a total cost at the bottom
* @return a string representation of all reservations with a total cost
*/
String receiptList();
} | [
"public abstract String getRequirements();",
"public interface ReceiptStrategy {\r\n public abstract void printReceipt();\r\n public abstract void addLineItem(String productID, int quantity);\r\n public abstract void addToLineItemArray(LineItem item);\r\n \r\n}",
"ReceiptCreator createReceiptCreator... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field taxCertUrl is set (has been assigned a value) and false otherwise | public boolean isSetTaxCertUrl() {
return this.taxCertUrl != null;
} | [
"public boolean isSetBusLicCertUrl() {\n return this.busLicCertUrl != null;\n }",
"public boolean isSetNatCert() {\n return this.natCert != null;\n }",
"public boolean isSetOrgCodeCertUrl() {\n return this.orgCodeCertUrl != null;\n }",
"public boolean isSetUrlValue()\r\n {\r\n sy... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the portal pages. | Pages getPages(); | [
"List<PageAgent> getPages();",
"PortalPage getPortalPage();",
"java.lang.String getPages();",
"public List<Page> getPageList() {\n return conf.getPages().getPage();\n }",
"public String getPages() {\n return pages;\n }",
"public List getTargetPages();",
"public ArrayList<DiscoveryPage> get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get transactions list for multiple minter addresses with given page number | public Observable<ExpResult<List<HistoryTransaction>>> getTransactions(List<MinterAddress> addresses, int page, int limit) {
checkArgument(addresses != null, "Address list can't be null");
checkArgument(addresses.size() > 0, "Address list can't be empty");
List<String> out = new ArrayList<>(addresses.size());
for (MinterAddress address : addresses) {
out.add(address.toString());
}
return getInstantService().getTransactions(out, page, limit);
} | [
"public Observable<ExpResult<List<HistoryTransaction>>> getTransactions(List<MinterAddress> addresses, int page) {\n checkArgument(addresses != null, \"Address list can't be null\");\n checkArgument(addresses.size() > 0, \"Address list can't be empty\");\n\n List<String> out = new ArrayList<>(a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The list of glue records for this `Registration`. Commonly empty. repeated .google.cloud.domains.v1alpha2.DnsSettings.GlueRecord glue_records = 4; | java.util.List<? extends com.google.cloud.domains.v1alpha2.DnsSettings.GlueRecordOrBuilder>
getGlueRecordsOrBuilderList(); | [
"java.util.List<com.google.cloud.domains.v1alpha2.DnsSettings.GlueRecord> \n getGlueRecordsList();",
"com.google.cloud.domains.v1alpha2.DnsSettings.GlueRecord getGlueRecords(int index);",
"public List<String> getRecordings(){\n findRecordings();\n return _records;\n }",
"@java.lang.Overr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create the tasks for this job. | protected abstract void createTasks(); | [
"@PostConstruct\n private void instantiateTasks()\n {\n defineSubstitutionsForDeployPackages();\n int position = 1;\n List<Task> tasks = new ArrayList<Task>();\n tasks.add(applicationContext.getBean(FreezeTask.class).assignTransition(position++, liveEnvName));\n tasks.add(applicationContext.getBean... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new world factory. | public WorldFactory() {
} | [
"private void createWorld() {\n\t\tworld = new World();\n\t}",
"public World createNewWorld() {\n\t\tSpecieInfo[] speciesInfo = new SpecieInfo[defaultSpeciesCount];\n\t\tfor (int i = 0; i < speciesInfo.length; i++) {\n\t\t\tlong specieId = (long) i;\n\t\t\tboolean isPrey = i % 2 == 0;\n\t\t\tspeciesInfo[i] = new ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return a clone of productiveRules | public List<Alteration> getProductiveRulesClone() {
return new ArrayList<Alteration>(productiveRules);
} | [
"public Algorithm makeCopy()\n {\n PrecedenceAlgorithm algorithm = new PrecedenceAlgorithm();\n algorithm.pluginName = pluginName;\n algorithm.mode = mode;\n algorithm.thesaurus = thesaurus;\n algorithm.termPreprocessor = termPreprocessor;\n algorithm.threshold = thresho... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Searches for ScheduleRequests based on the criteria and returns a list of ScheduleRequest identifiers which match the search criteria. | public List<String> searchForScheduleRequestIds(@WebParam(name = "criteria") QueryByCriteria criteria,
@WebParam(name = "contextInfo") ContextInfo contextInfo)
throws InvalidParameterException,
MissingParameterException,
OperationFailedException,
PermissionDeniedException; | [
"public List<ScheduleRequestInfo> searchForScheduleRequests(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of dateFromString method, of class TimeUtils. | @Test
public void testDateFromString() throws Exception
{
System.out.println("TimeUtilsTest:testDateFromString");
Calendar c = Calendar.getInstance(Locale.ENGLISH);
c.clear();
c.set(2018, 1, 2, 12, 45, 0);
assertEquals(c.getTime(), tu.dateFromString("2018-02-02 12:45"));
c.clear();
c.set(2010, 11, 24, 23, 59, 0);
assertEquals(c.getTime(), tu.dateFromString("2010-12-24 23:59"));
c.set(0, 0, 0, 0, 0, 0);
assertEquals(c.getTime(), tu.dateFromString("0000-01-00 00:00"));
} | [
"@Test\n public void testInputDateString() {\n\n // use this as the expected calendar instance\n Calendar expCalDate = Calendar.getInstance(TZ);\n\n expCalDate.clear();\n expCalDate.set(1999, 9 - 1, 11);\n assertValidDate(\"1999-09-11\", expCalDate, false);\n }",
"@Test\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Distributes points when the game type is TP_NORMAL. | public abstract void distributeTeamsPointsNormalGame(Announce normalAnnounce); | [
"public void distributeTeamsPointsNormalGame(Announce normalAnnounce) {\n distributeTeamsPointsRedoubleGame(normalAnnounce, 1);\n }",
"public void distributeTeamsPointsRedoubleGame(Announce normalAnnounce) {\n distributeTeamsPointsRedoubleGame(normalAnnounce, 4);\n }",
"public void distribut... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to validate the request coming for search airport API. Method will perform below validations: 1. It will validate sortOrder's value if present in request. If invalid, then method will throw BadRequestException. 2. It will validate the value for sortBy field. If the value is not one of the allowed values, then method will throw BadRequestException | public static void validateSearchAirport(String sortBy, String sortOrder) throws BadRequestException {
validateValuesForParameter(sortOrder, Constants.SORT_ORDER, Constants.ASC, Constants.DESC);
if(!StringUtils.equalsAnyIgnoreCase(sortBy, Constants.COUNTRY_COUNTRY_CODE,
Constants.COUNTRY_NAME)) {
throw new BadRequestException(StatusCodes.INVALID_VALUE_FOR_PARAM.getCode(), StatusCodes
.INVALID_VALUE_FOR_PARAM.getReason(), Constants.SORT_BY);
}
} | [
"private void validate(RequestDto request) throws Exception {\r\n\t\tString error = null;\r\n\t\t\r\n\t\tif(null == request.getRoomSize() \r\n\t\t\t\t|| request.getRoomSize().size() != 2\r\n\t\t\t\t|| null == request.getCoords()\r\n\t\t\t\t|| request.getCoords().size() != 2){\r\n\t\t\terror = \"Invalid room size an... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implemented method that takes no parameters and returns a short. | public short ShortVoidMethod()
{
return Short.MAX_VALUE;
} | [
"public native short __shortMethod( long __swiftObject, short arg );",
"short getShortNext();",
"public short getShort() throws MdsException\n\t{\n\t\tfinal Data data = executeWithContext(\"WORD(DATA($1))\", this);\n\t\tif (!(data instanceof Scalar))\n\t\t\tthrow new MdsException(\"Cannot convert Data to byte\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Since time window end timestamp is exclusive, we set the inclusive lower bound plus 1; Set lower bound to 0L for the first time emit so that when we fetchAll, we fetch from 0L | @Override
protected long emitRangeLowerBound(final long windowCloseTime) {
return lastEmitWindowCloseTime == ConsumerRecord.NO_TIMESTAMP ?
0L : Math.max(0L, lastEmitWindowCloseTime - windows.size()) + 1;
} | [
"@Override\n protected boolean shouldRangeFetch(final long emitRangeLowerBound, final long emitRangeUpperBound) {\n if (lastEmitWindowCloseTime != ConsumerRecord.NO_TIMESTAMP) {\n final Map<Long, W> matchedCloseWindows = windows.windowsFor(emitRangeUpperBound);\n fina... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form Scientific_cal | public Scientific_cal()
{
initComponents();
} | [
"public Scientific() {\n initComponents();\n }",
"Calcul createCalcul();",
"public VentanaCrearCalificacion() {\n controlador = new ControladorVentanaCrearCalificacion();\n curso = null;\n evaluaciones = null;\n initComponents();\n setVisible(true);\n setMaxim... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Closes the workflow if the step returns a specific code. Equivalent to custom(step.getClass(), resultCode); | public WorkflowGraphBuilder closeOnCustom(WorkflowStep step, String resultCode) {
return customTransition(step.getClass(), resultCode, CloseWorkflow.class);
} | [
"public WorkflowGraphBuilder closeOnFailure(WorkflowStep step) {\n return customTransition(step.getClass(), StepResult.FAIL_RESULT_CODE, CloseWorkflow.class);\n }",
"public WorkflowGraphBuilder closeOnSuccess(WorkflowStep step) {\n return customTransition(step.getClass(), StepResult.SUCCEED_RESUL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the cardNumber of this card; | public int getCardNumber() {
return cardNumber;
} | [
"public Integer getCardNo() {\n\t\treturn cardNo;\n\t}",
"java.lang.String getCardNumber();",
"public String getCardNumber()\r\n {\r\n return cardNumber;\r\n }",
"public String getCardNo() {\r\n return cardNo;\r\n }",
"public java.lang.Integer getCard() {\n return card;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column TRSDEAL_PROMISSORY_FX.MAT_REC_INS_NBR | public void setMAT_REC_INS_NBR(BigDecimal MAT_REC_INS_NBR)
{
this.MAT_REC_INS_NBR = MAT_REC_INS_NBR;
} | [
"public BigDecimal getMAT_REC_INS_NBR()\r\n {\r\n\treturn MAT_REC_INS_NBR;\r\n }",
"public void setMAT_PAYMENT_INS_NBR(BigDecimal MAT_PAYMENT_INS_NBR)\r\n {\r\n\tthis.MAT_PAYMENT_INS_NBR = MAT_PAYMENT_INS_NBR;\r\n }",
"public void setREC_ID(Integer REC_ID) {\n this.REC_ID = REC_ID;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the up level ID of this code dto. | @Override
public java.lang.Long getUpLevelId() {
return _codeDto.getUpLevelId();
} | [
"public int getLevelUpItemId() {\n return levelUpItemId_;\n }",
"public String getUpDownId() {\n return upDownId;\n }",
"public long getUpguid() {\n return upguid_;\n }",
"@Override\n\tpublic void setUpLevelId(java.lang.Long upLevelId) {\n\t\t_codeDto.setUpLevelId(upLevelId);\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setEbXmlEventListener method, of class ConnectionManager. | @Test
public void testSetEbXmlEventListener() {
System.out.println("setEbXmlEventListener");
instance.setEbXmlEventListener(ebXmlEventListener);
} | [
"@Test\n public void TestConnectionEvent() {\n ConnectionEvent connectionEvent = new ConnectionEvent(ConnectionEvent.ConnectionEventType.Close, new byte[0][0]); // Initialize connection event\n\n assertTrue(\"connection event must not be null\", connectionEvent != null); // Ensure event is not null... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convierte jsonMenu, proveniente del server socket, de json a un objeto Menu | private Menu jsonToMenu(String jsonMenu) {
Gson gson = new Gson();
Menu varMenu = gson.fromJson(jsonMenu, Menu.class);
return varMenu;
} | [
"public static Menu creerMenuDepuisJson(final String nom, final Menu menuParent) {\n\t\tfinal JSONObject jsonObject;\n\t\ttry {\n\t\t\tjsonObject = InterpreteurDeJson.ouvrirJson(nom, \"./ressources/Data/Menus/\");\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Impossible d'ouvrir ke fichier JSON du menu \"+nom, e)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Multicast TCP packet to all name servers in nameServerIds. This method excludes name server id in excludeNameServers | public static void multicastTCP(GNSNodeConfig gnsNodeConfig, Set nameServerIds, JSONObject json, int numRetry,
GNS.PortType portType, Set excludeNameServers) {
int tries;
for (Object id : nameServerIds) {
if (excludeNameServers != null && excludeNameServers.contains(id)) {
continue;
}
tries = 0;
do {
tries += 1;
try {
Socket socket = Packet.sendTCPPacket(gnsNodeConfig, json, (String) id, portType);
if (socket != null) {
socket.close();
}
break;
} catch (IOException e) {
GNS.getLogger().severe("Exception: socket closed by nameserver " + id);
e.printStackTrace();
}
} while (tries < numRetry);
}
} | [
"private void refreshServerList() {\n\t\tcurrentRequestId++;\n\t\tserverNames.clear();\n\t\tserverTable.clear();\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\taddresses = client.discoverHosts(WifiHelper.UDP_PORT, 1000);\n\t\t\t\tint removed = 0;\n\t\t\t\tfor(int i = 0; i + re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metadata attached to the incident. Top level values must be objects. | @javax.annotation.Nullable
@ApiModelProperty(example = "{\"jira\":{\"issue_id\":\"value\"}}", value = "Metadata attached to the incident. Top level values must be objects.")
public Object getMetadata() {
return metadata;
} | [
"Map<String, Object> getMetadata();",
"public String getMetaDataString() {\n\t\treturn this.metadata;\n\t}",
"ResourcePropertyMetaData<T> getMetaData();",
"@ApiModelProperty(required = true, value = \"List of metadata key-value pairs used by the consumer to associate meaningful metadata to the related virtual... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to get the length of the Thumbnail. | public int getThumbnailLength() {
int retVal = 0;
Entry e = getTagValue(JPEGINTERCHANGEFORMATLENGTH, false);
if (e == null)
e = getTagValue(STRIPBYTECOUNTS, false);
if (e != null)
retVal = ((Integer) e.getValue(0)).intValue();
return retVal;
} | [
"public Integer getThumbnailWidth() {\n return this.thumbnailWidth;\n }",
"public int length() { return picture.length(); }",
"public int getThumbnailHeight ()\n {\n return ((SpinnerNumberModel) thumbnailHeight.getModel ()).getNumber ().intValue ();\n }",
"public long getArtworkSize();",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of previousTrack method, of class MyStereo. | @Test
public void testPreviousTrack_StraightPlay(){
this.stereo.loadUSB();
assertEquals(this.stereo.currentTrackNumber(),1);
assertTrue("There should be 1000 or fewer tracks",this.stereo.totalTrackCount() <= 1000);
this.stereo.previousTrack();
assertEquals(this.stereo.currentTrackNumber(),this.stereo.totalTrackCount());
} | [
"@Override\r\n public void previousTrack() {\r\n if (isUSBLoaded && isPlaying) {\r\n if (enableStraightPlayMode) {\r\n this.current_track--;\r\n if (this.current_track < number_of_tracks) {\r\n this.current_track = number_of_tracks;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses given string representation of date. Allows for 2 formats, one for parsing user input in the format "d/M/yyyy" or "today". The second format is for parsing dates in the default LocalDate pattern from file. | static LocalDate parseDate(String date) throws DateTimeParseException {
if (date.equals("today")) {
return LocalDate.now();
} else if (date.equals("tomorrow")) {
return LocalDate.now().plus(1, ChronoUnit.DAYS);
} else {
try {
return LocalDate.parse(date, DateTimeFormatter.ofPattern("d/M/yyyy"));
} catch (DateTimeParseException e) {
return LocalDate.parse(date);
}
}
} | [
"static LocalDate dateCheck(){\n\t\tLocalDate formattedDate;\n\t\tformattedDate = null;\n\t\t\n\t\twhile (formattedDate==null) {\n\t\t\tScanner input = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Please enter a date(ie:2016/08/23)\");\n\t\t\tString userDate = input.nextLine();\n\t\t\tDateTimeFormatter dateF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use RetrieveFileResponse.newBuilder() to construct. | private RetrieveFileResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileResponseOrBuilder getRetrieveFileResponseOrBuilder();",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileResponseOrBuilder getRetriveFileResponseOrBuilder();",
"edu.usfca.cs.dfs.StorageMessages.RetrieveFileResponse getRetrieveFileResponse();",
"edu.usfca.cs.dfs.Stora... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional double hfov = 9; &47; &92;brief Horizontal field of view in radians. | public Builder setHfov(double value) {
bitField0_ |= 0x00000100;
hfov_ = value;
onChanged();
return this;
} | [
"double getHfov();",
"public double getHfov() {\n return hfov_;\n }",
"public double getHfov() {\n return hfov_;\n }",
"public double getHorizontalFieldOfView ( ) {\r\n\t\tdouble fov = Double.valueOf(text_fov_width.getText()).doubleValue();\r\n\t\tif (((String)combo_unit.getSelectedItem())... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method sets computerTry drawn by computer. | public void setComputerTry(ArrayList<Integer> computerTry) {
this.computerTry = computerTry;
} | [
"private void setComputerChoice() {\n\t\tcomputerChoice = POSSIBLE_CHOICE[randomNumber];\n\t}",
"public void rpsLogic(int player, int computer)\n {\n outcome.setForeground(Color.black);\n if(player==computer) {\n outcome.setText(\"Tie\");\n //tie\n }\n else\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'respp' field. | public java.lang.CharSequence getRespp() {
return respp;
} | [
"public java.lang.CharSequence getRespp() {\n return respp;\n }",
"public com.example.DNSLog.Builder setRespp(java.lang.CharSequence value) {\n validate(fields()[4], value);\n this.respp = value;\n fieldSetFlags()[4] = true;\n return this;\n }",
"public void setRespp(java.lang.Cha... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field317' field. | public void setField317(java.lang.CharSequence value) {
this.field317 = value;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField317(java.lang.CharSequence value) {\n validate(fields()[317], value);\n this.field317 = value;\n fieldSetFlags()[317] = true;\n return this; \n }",
"public void setField319(java.lang.CharSequence value) {\n this.field319 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
drawImageFill draws the specified image into the specified graphics in the container | public static boolean drawImageFill(Image displayImage, Graphics g, Container container)
{
//calculate position and size to draw image with proper aspect ratio
int[] drawCoords = getLetterBoxCoords(displayImage, container);
//draw image
return g.drawImage(displayImage, drawCoords[0], drawCoords[1], drawCoords[2], drawCoords[3], SliderColor.clear, container);
} | [
"public boolean drawFill(Graphics g, Container container)\n {\n \treturn drawImageFill(imageRaw, g, container);\n }",
"public void fillImageWithColor(Color color);",
"public static boolean drawImageFillImage(Image displayImage, BufferedImage canvasImage)\n {\t \n\t return drawImageFillImage(displa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field1030' field. doc for field1030 | public java.lang.CharSequence getField1030() {
return field1030;
} | [
"public java.lang.CharSequence getField1030() {\n return field1030;\n }",
"public java.lang.CharSequence getField30() {\n return field30;\n }",
"public java.lang.CharSequence getField30() {\n return field30;\n }",
"java.lang.String getField1030();",
"java.lang.String getField1530();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the prefernces service. | public void setPreferncesService(IPreferencesService preferncesService) {
this.preferncesService = preferncesService;
} | [
"private void setService(Service service) {\n this.service = service;\n }",
"public void setService(Service service)\n {\n this.service = service;\n }",
"void setService(java.lang.String service);",
"public IPreferencesService getPreferncesService() {\n\n return preferncesService... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
allow result whose title is empty. | public BaiduEngine allowEmptyTitle(boolean allowEmptyTitle) {
this.allowEmptyTitle = allowEmptyTitle;
return this;
} | [
"public void testInvalidTitleEmpty() {\n\t\tassertFalse(Item.isTitleValid(\"\"));\n\t\tSystem.out.println(\"Title failure. No title entered. testInvalidTitleEmpty()\\n\");\n\t\t\n\t}",
"public void verifySearchResultIsEmpty() {\r\n\r\n if (title_list.size() == 0) {\r\n System.out.println(\"Verif... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of the user's saved schools, along with the date it was saved | public ArrayList<String> viewSavedSchools(String username)
{
return this.userCtrl.viewSavedSchools(username);
} | [
"public ArrayList<UserSavedSchool> viewSavedSchools() {\n\t\tthis.sfCon.viewSavedSchools();\n\t\tsuper.UFCon = UFCon;\n\t\treturn this.sfCon.viewSavedSchools();\n\t}",
"public static ArrayList<String> viewSavedSchools(String username){\r\n\t\tArrayList<String> schools = dBCont.viewSavedSchools(username);\r\n\t\tr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load an AnyMoteDevice object from disk based on its unique MAC address. Returns null if this object did not exist. | public AnyMoteDevice get(String macAddress) {
SharedPreferences prefs = getPrefs();
String raw = prefs.getString(macAddress, "");
if (raw.equals("")) {
return null;
}
return AnyMoteDevice.fromString(raw);
} | [
"public synchronized MonitoringDevice getByMacAddress(String macAddress)\n\t{\n\t\tInteger id = this.indexByMac.get(macAddress);\n\t\tif (id != null)\n\t\t\treturn (MonitoringDevice) super.getObject(id);\n\t\telse\n\t\t\treturn null;\n\t\t\n\t}",
"private Device loadDevice() {\n //Initialise object with th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Results of the domain name search. repeated .google.cloud.domains.v1alpha2.RegisterParameters register_parameters = 1; | java.util.List<com.google.cloud.domains.v1alpha2.RegisterParameters>
getRegisterParametersList(); | [
"com.google.cloud.domains.v1beta1.RegisterParameters getRegisterParameters();",
"com.google.cloud.domains.v1beta1.RegisterParametersOrBuilder getRegisterParametersOrBuilder();",
"com.google.cloud.domains.v1alpha2.RegisterParameters getRegisterParameters(int index);",
"java.util.List<? extends com.google.cloud... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column INNODB_FOREIGN_COLS.REF_COL_NAME | public void setREF_COL_NAME(String REF_COL_NAME) {
this.REF_COL_NAME = REF_COL_NAME == null ? null : REF_COL_NAME.trim();
} | [
"com.blackntan.dbmssync.xsd.dbSchemaV1.CtFkColumnRef addNewColumnReference();",
"public String getREF_COL_NAME() {\n return REF_COL_NAME;\n }",
"public void setRefName(java.lang.String refName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.x... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for previously generated word collection. | public String getCurrentWordCollection() {
if ( wordVector.isEmpty() ) {
return getRandomWordCollection();
}
return wordVectorToString();
} | [
"public String getRandomWordCollection() {\n\n if ( wordVector.isEmpty() == false ) {\n wordVector.clear();\n }\n\n for (int i=0; i<collectionLength; i++) {\n wordVector.addElement(getRandomWord());\n }\n\n return wordVectorToString();\n }",
"public List... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
private void rotateRight(IAVLNode root) receive current node rotate tree to right side, according to algorithm learned in class return nothing | private void rotateRight(IAVLNode root) {
IAVLNode tmpRoot = root;
IAVLNode tmpLeft = root.getLeft();
tmpLeft.setParent(tmpRoot.getParent());
if(!this.getRoot().equals(tmpRoot)){ // if input node isn't root update his parent
IAVLNode parent = tmpRoot.getParent();
if(tmpRoot.equals(parent.getLeft())) {
parent.setLeft(tmpLeft);
}else {
parent.setRight(tmpLeft);
}
tmpRoot.setParent(tmpLeft);
}else {this.root = tmpLeft;} // if input node is root update the tree root
tmpRoot.setLeft(tmpLeft.getRight());
tmpLeft.getRight().setParent(root);
tmpLeft.setRight(tmpRoot);
tmpRoot.setParent(tmpLeft);
demote(root);
root.setSize(root.getLeft().getSize() + root.getRight().getSize() + 1);
} | [
"private void RRRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode rightChild = node.getRight() ; \r\n\t\tIAVLNode leftGrandChild = node.getRight().getLeft(); \r\n\t\t\r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft())\r\n\t\t\t\tparent.setLeft(rightChild... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use IntervalOfInteger.newBuilder() to construct. | private IntervalOfInteger(Builder builder) {
super(builder);
} | [
"public abstract IntegerInterval getInterval(int[] interval);",
"IntervalExpression createIntervalExpression();",
"public IntegerInterval getInterval(int value) {\n\t\n\treturn this.getInterval(new int[]{value, value});\n }",
"IntervalType createIntervalType();",
"public Interval() { }",
"private Inter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the ship of the cruise | public Ship getShip() {
return ship;
} | [
"public Ship getShip() {\r\n\t\treturn ship;\r\n\t}",
"public String getShip() {\n return ship.toString();\n }",
"public Ship getShip() {\n\t\treturn mShip;\n\t}",
"public Ship getMainShip() { return interactor.getMainShip();}",
"public Ship getShip ()\n {\n return playerShip;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Container's getter for LatinSeeProvider. | public SeeProviderImpl getLatinSeeProvider() {
return (SeeProviderImpl)findViewObject("LatinSeeProvider");
} | [
"public MainSeeProviderImpl getLatinMainSeeProvider() {\n return (MainSeeProviderImpl)findViewObject(\"LatinMainSeeProvider\");\n }",
"public ViewObjectImpl getLatinMainSeeAlsoProvider() {\n return (ViewObjectImpl)findViewObject(\"LatinMainSeeAlsoProvider\");\n }",
"public ViewObjectImpl get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |