query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Initialize LocationProvider +Initialize ShareHelper | private void initShare() {
// Create ShareHelper
mShareHelper = new ShareHelper(mContext);
} | [
"private void initializeLocation() {\n location = new RCLocation();\n location.setActivity(this);\n location.setCallback(this);\n location.startLocation();\n }",
"private synchronized void initLocation() {\n if (locationManager == null) {\n LocationManager manager =\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sorts the appliances ArrayList in ascending order and prints the ArrayList | public void printAppliances() {
Collections.sort(appliances, new Comparator<Appliance>() {
@Override
public int compare(Appliance o1, Appliance o2) {
return o1.getIdNumber().compareTo(o2.getIdNumber());
}
});
System.out.println("APPLIA... | [
"List<Appliance> getSorted(Comparator<Appliance> comparator);",
"public void printAlphabetically() {\n if (getAnimals().size() > 0) {\n System.out.println(\"======== Animals sorted alphabetically ========\");\n getAnimals().stream()\n .sorted(Comparator.comparing(An... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decorate a matrix to a Copyonwrite matrix | public static CopyOnWriteMatrix of(Matrix matrix) {
return matrix instanceof CopyOnWriteMatrix
? (CopyOnWriteMatrix) matrix
: new CopyOnWriteMatrix( ImmutableMatrix.of(matrix) );
} | [
"public Matrix<X> copy();",
"Matrix copy(){ // returns a new Matrix having the same entries as this Matrix\n Matrix C = new Matrix(size);\n for(int i = 1; i <= this.size; i++){\n row[i].moveFront();\n while(row[i].index() >= 0){\n Entry temp = (Entry) row[i].get();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test http connection, given URL | private boolean testConn(String URL)
{
if(TestHTTP.test(URL))
return true;
else
{
logfile.severe(URL+" DOWN");
return false;
}
} | [
"@Test\n public void verifyConnectionToBackendSerivec(){\n try {\n URL url = new URL(uri);\n HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n urlConn.connect();\n // assertEquals(HttpURLConnection.HTTP_OK, urlConn.getResponseCode());\n } catch (IOExcept... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/This constructor is for rebuilding an enrollment object when a Student object, Course object, and Instructor object is unavailable. | public Enrollment(String sln, String iln, String cnum, String sem,
int eid, int sid, int cid, int iID, String y) {
this.studentID = new SimpleIntegerProperty(sid);
this.sLastName = sln;;
this.sectionNumber = new SimpleIntegerProperty(cid);
this.semester = sem;
this.year = y;
this.cours... | [
"public EnrollmentRecord()\r\n {\r\n\t\tthis.gradeName = \"\";\r\n\t\tthis.seed = \"\";\r\n\t\tthis.enrollment = \"\";\r\n }",
"public StudentEnrollment(int studentID, int courseID, boolean Enrolling) {\n this.studentID = studentID;\n this.courseID = courseID;\n this.enrolling = Enrolli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getMesLetras. Funcion que retorna el mes en letras de la fecha dada | public static String getMesLetras(Date fecha) {
String retorno;
int mes = getMes(fecha);
switch(mes) {
case Valores.ENERO:
retorno = "enero";
break;
case Valores.FEBRERO:
retorno = "febrero";
break... | [
"public static int getMes(Date fecha) {\r\n String fechaS = dateToString(fecha, formatoNormal);\r\n return getMes(fechaS, formatoNormal);\r\n }",
"public void siguienteMes(){\r\n\t\t//si la fecha es valida avanzando un mes\r\n\t\tif(esFechaValida(anio, mes+1, dia)){\r\n\t\t\tthis.setFecha(anio, m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the enable ordering. | public void setEnableOrdering(boolean enableOrdering) {
this.enableOrdering = enableOrdering;
} | [
"protected boolean isEnabledOrdering() {\n\t\treturn enableOrdering;\n\t}",
"public void enableOrdered(Binding b, boolean enable) {\n if (configVersion.equals(ConfigVersion.CONFIG_1_0)) {\n if (enable) {\n PolicyModelHelper pmh = PolicyModelHelper.getInstance(configVersion);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implementation of BOGO SORT array is shuffled until it is sorted | public static void bogoSort(int[] array)
{
while (isSorted(array) == false)
shuffle(array);
} | [
"public static void Shuffle(int[] arr)\n {\n for (int i = 0;i<arr.length;i++)\n {\n int rdIndex = GetRandomInRange(i, arr.length-1);\n Swap(arr,i,rdIndex);\n }\n }",
"private static void shuffle(Comparable[] a) {\n int N = a.length;\n for (int i = 0; ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the input is valid close the dialog by confirming. | @FXML
public void handleConfirm() {
if (isInputValid()) {
confirmClick = true;
splitDialogStage.close();
}
} | [
"private void confirmClosing(){\r\n try{\r\n int option = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,CoeusOptionPane.DEFAULT_CANCEL);\r\n if(option == CoeusOption... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registers us as an Observer over the static data segment (starting address 0x10010000) only. When user enters keystroke, set RECEIVER_CONTROL and RECEIVER_DATA using the action listener. When user loads word (lw) from RECEIVER_DATA (we are notified of the read), then clear RECEIVER_CONTROL. | void addAsObserver() {
try {
// We want to be an observer only of MIPS reads from RECEIVER_DATA
Globals.memory.addObserver(this, RECEIVER_DATA, RECEIVER_DATA);
} catch (Exception aee) {
SystemIO.printString("\nMMIO error: adding observer of incorrect MMIO address!\n");
}
} | [
"public void update(Observable memory, Object arg) {\r\n\r\n\t\tAccessNotice accessNotice = (AccessNotice) arg;\r\n\t\tMemoryAccessNotice notice = (MemoryAccessNotice) accessNotice;\r\n\t\t// If MIPS program has just read (loaded) the receiver (keyboard) data\r\n\t\t// register, then clear the Ready bit to indicate... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value of attributeSetName field. | public final void setAttributeSetName(String attributeSetName)
{
_attributeSetName = attributeSetName;
setField(ATTRIBUTE_SET, new SimpleString(attributeSetName));
} | [
"public void setAttributeName(java.lang.String attributeName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ATTRIBUTENAME$2, 0);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate a Bitmap from an Android SDK View. | static Bitmap generate(@NonNull View view) {
int measureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
view.measure(measureSpec, measureSpec);
int measuredWidth = view.getMeasuredWidth();
int measuredHeight = view.getMeasuredHeight();
view.layout(0, 0, measured... | [
"static Bitmap generate(@NonNull View view) {\n int measureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);\n view.measure(measureSpec, measureSpec);\n\n int measuredWidth = view.getMeasuredWidth();\n int measuredHeight = view.getMeasuredHeight();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the com entity by customer code. | public Acc_com_entity getComEntityByCustomerCode(final String customerCode) {
return this.acc_com_entityRepository.getComEntityByCustomerCode(customerCode).getAnyResult();
} | [
"Customer getCustomerByMobileNumber(String mobileNumber) throws EOTException;",
"DepAcctDO selectByPrimaryKey(String depCode);",
"public String getCustomerCode()\n\t{\n\t\treturn getColumn(OFF_CUSTOMER_CODE, LEN_CUSTOMER_CODE) ;\n\t}",
"public String getCustomerCode()\n\t{\n\t\treturn wCustomerCode;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the complete content of an IO by concatenating Identifier, Type of IO and all the data of Attributes | private String getContentString(InformationObject io) {
StringBuilder contentString = new StringBuilder();
// add Identifier and type of IO to contentString
contentString.append(io.getIdentifier().toString());
// add type of IO
Attribute ioType = io.getSingleAttribute(DefinedAttribu... | [
"public String getIOType() {\n return this.iOType;\n }",
"public String getIOType() {\n return this.iOType;\n }",
"public Io getIo() {\n return io;\n }",
"public <T> T get(final IO<T> io) throws IOException {\n\t\ttry (final InputStream inputStream = getInputStream()) { /... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checkEmptyFields() validates whether username and password are empty | void checkEmptyFields(); | [
"private boolean isValidLoginFields() {\r\n\t\treturn !(loginIdField.getText().isEmpty() && passField.getText().isEmpty());\r\n\t}",
"private void checkFieldsForEmptyValues() {\n String s1 = edtEmail.getText().toString();\n String s2 = edtPaswd.getText().toString();\n\n if (s1.equals(\"\") ||... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the full method path as String | public static String getFullMethodPath () {
return Thread.currentThread().getStackTrace()[2].toString();
} | [
"public String getPath() {\n\t\treturn getMethod();\n\t}",
"public abstract String getResourcePath(Method method);",
"public String getFullPath();",
"public String getPathString() {\n return Utils.getPathAsString(getPath());\n }",
"private static String getFullMethodName(Method method) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set barren regions and update farm points | public void setBarrenRegions(String[] barrenRects) {
if (barrenRects.length == 0) {
gracefulExit();
}
// Set barren areas to -1
for (String barrenRect : barrenRects) {
String[] coords = barrenRect.trim().split(" ");
if (coords.length != 4) {
gracefulExit();
}
int bl... | [
"public void updatePlotRegion() {\n\t\tplotter.updatePlotRegionFrom(scanRegionShape);\n\t}",
"public void updateBands() {\n if (this.isFull()) {\n calcInboundBand();\n calcOutboudBand();\n calcVisible();\n }\n }",
"public void initIndividualBars() {\n\t\ttop = n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column tax.ccs | public void setCcs(BigDecimal ccs) {
this.ccs = ccs;
} | [
"public org.LNDCDC_NCS_TCS.SPORT_CATEGORIES.apache.nifi.LNDCDC_NCS_TCS_SPORT_CATEGORIES.Builder setSPCACAT(java.lang.CharSequence value) {\n validate(fields()[0], value);\n this.SPCA_CAT = value;\n fieldSetFlags()[0] = true;\n return this;\n }",
"public org.LNDCDC_NCS_TCS.SHOWS.apache.nifi.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the resubmitFlag property. | public short getResubmitFlag() {
return resubmitFlag;
} | [
"public void setResubmitFlag(short value) {\r\n this.resubmitFlag = value;\r\n }",
"int getResubmitAttempt();",
"org.apache.xmlbeans.XmlInt xgetResubmitAttempt();",
"void setResubmitAttempt(int resubmitAttempt);",
"public ReadOnlyBooleanProperty getReadyToSubmitProperty()\n {\n return re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To click on the "Inquire Now" button in Rollover Larger image. (Product List tab) | public static WebElement btn_clickInqNowOnRolloverImagePdtListTab() throws Exception{
try{
// Locate the Image
WebElement imgHover = driver.findElement(
By.xpath("(//*[contains(@class, 'detail_ppImg')])[position()=1]"));
// Hover mouse above the image but DONT click
Ac... | [
"public static WebElement btn_clickInqNowOnRolloverImage() throws Exception{\r\n \ttry{\r\n \t\t// Locate the Image\r\n \t\tWebElement imgHover = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//*[contains(@class, 'supplierPP_img')])[position()=1]\"));\r\n\t\t\t\r\n \t\t// Hover mouse above the image bu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a PropertyChangeListener that subscribes to the named properties. | public void addPropertyChangeListener(String property, PropertyChangeListener listener); | [
"void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);",
"public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);",
"void addPropertyChangeListener(String propertyName,\r\n\t\t\tPropertyChangeListener listener);",
"void addPropertyChangeList... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the book's ID | public void setBook_id(int book_id) {
this.book_id = book_id;
} | [
"public void setId_book(long id_book) {\n\t\t_myLibrary.setId_book(id_book);\n\t}",
"public void setBookId(String v) {\r\n _isSetterInvokedBookId = true;\r\n _bookId = v;\r\n }",
"public void setBookID(int bookID) {\n this.bookID = bookID;\n }",
"public void setBookid( Integer booki... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Save Albums and Photos. | public static void saveAll()
{
savePhotos();
saveAlbums();
saveID();
} | [
"public void saveAlbum() {\n\t\tbyte[] albumBuffer = faceObj.serializeRecogntionAlbum();\n\t\tLog.e(TAG, \"Size of byte Array =\" + albumBuffer.length);\n\t\tSharedPreferences settings = getSharedPreferences(ALBUM_NAME, 0);\n\t\tSharedPreferences.Editor editor = settings.edit();\n\t\teditor.putString(\"albumArray\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a validating processor for ITI31 response messages (Patient Encounter Management). | public static Processor iti31ResponseValidator() {
return ConformanceProfileValidators.validatingProcessor(ItiPamProfile.ITI_31_ACK);
} | [
"public static Processor iti31RequestValidator() {\n return ConformanceProfileValidators.validatingProcessor(PamTransactions.ITI31);\n }",
"public static Processor iti30ResponseValidator() {\n return ConformanceProfileValidators.validatingProcessor(ItiPamProfile.ITI_30_ACK);\n }",
"public st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for property detailsVisibleColumns. | public int[] getDetailsVisibleColumns() {
return this.detailsVisibleColumns;
} | [
"public boolean[] getBoolDetailsVisibleColumns() {\r\n return this.boolDetailsVisibleColumns;\r\n }",
"public int[] getVisibleColumns() {\r\n return this.visibleColumns;\r\n }",
"public void setDetailsVisibleColumns(int[] detailsVisibleColumns) {\r\n this.detailsVisibleColumns = detai... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Encrypts a string according to the Caesar Cipher. The integer key specifies an offset and each character in plainText is replaced by the character \"offset\" away from it | public static String encryptCaesar(String plainText, int key) {
// Checks
if (!stringInBounds(plainText)) { return ""; } // If the string is not in bounds, return a empty string
//if (plainText.length() <= 0) { return ""; }
// Variables
String encrypted = ""; // Encrypted string, to be built, char by... | [
"public static String encrypt(String plaintext, String key, int offset) {\n\t String ciphertext=\"\";\n\t \n\t int j=0;\n\t for(int i=0; i<plaintext.length(); i++){\n//\t \t\tSystem.out.print(i+\" \");\n\t \t\tchar p = plaintext.charAt(i);\n//\t \t\tSystem.out.print(p+\" \");\n\t\t\tif (p == ' ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks is category property is in the inner filters. | private Filter checkCategoryInLeftFilter(Filter leftFilter) {
Filter innerEndFilter = leftFilter;
while (leftFilter != null) {
Filter child = leftFilter.getLeftFilter();
if (child == null) {
innerEndFilter = leftFilter;
break;
} else if (child.getLeftFilter() == null) {
innerEndFilter = child;
... | [
"boolean hasGroupByCategory();",
"boolean hasSubCategories(long categoryUid);",
"public boolean hasSubCategory() {\n\t\treturn subcategory.hasValue();\n\t}",
"private boolean isFilteredOut(Concept c, List<SemanticType> semanticTypeFilter){\n\t\tif(semanticTypeFilter.isEmpty())\n\t\t\treturn false;\n\t\tfor(Se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the confirm password. | public String getConfirmPassword() {
return confirmPassword;
} | [
"public String getConfirmPassword()\n\t{\n\t\treturn confirmPassword;\n\t}",
"public String getConfirmNewPassword() {\n return confirmNewPassword;\n }",
"private String extractConfirmPassword() {\n return SwingUtil.extract(confirmPasswordJPasswordField, Boolean.TRUE);\n }",
"public java.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to test hiding a picture | public static void testHidePicture(){
Picture wall = new Picture("wall.jpg");
Picture caterpillar = new Picture("caterpillar.jpg");
wall.explore();
wall.hidePicture(caterpillar);
wall.explore();
} | [
"public void hide() {\n// picture.setVisible(false);\n }",
"public void hide(){\n\t\tturtleImage.setVisible(false);\n\t\tturtleImage.setVisible(false);\n\t}",
"public void hidePics(){\n\t\t\tfor (int i = 0; i < 3; i++)\n\t\t\t\tfor (int j = 0; j < 3; j++)\n\t\t\t\t\tpics[i][j].setVisible(false);\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
rpc getApplicationAttemptReport(.hadoop.yarn.GetApplicationAttemptReportRequestProto) returns (.hadoop.yarn.GetApplicationAttemptReportResponseProto); | public abstract void getApplicationAttemptReport(
com.google.protobuf.RpcController controller,
org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationAttemptReportRequestProto request,
com.google.protobuf.RpcCallback<org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationAttemptRepo... | [
"public abstract void getApplicationAttemptReport(\n com.google.protobuf.RpcController controller,\n org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationAttemptReportRequestProto request,\n com.google.protobuf.RpcCallback<org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct Play Game Message | PlayGameMessage(String playerName) {
super(playerName);
} | [
"org.bolg_developers.bolg.StartGameMessage getStartGameMsg();",
"public void displayStartGameMsg() {\n\t\tSystem.out.println(\"################################\");\n System.out.println(\"### Que la partie commence ! ###\");\n System.out.println(\"################################\\n\");\n\t}",
"Pla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implements the constructor: Struct() Direct superclasses: metadslx.languages.soal.SoalType, metadslx.languages.soal.Declaration All superclasses: metadslx.languages.soal.SoalType, metadslx.languages.soal.Declaration, metadslx.languages.soal.NamedElement, metadslx.languages.soal.AnnotatedElement | public void Struct(Struct _this) {
this.SoalType(_this);
this.Declaration(_this);
} | [
"public StructMember() { }",
"Structure createStructure();",
"public DStructure() {\n this(\"\");\n }",
"Struct createStruct();",
"protected abstract Structure newStructure();",
"public DStructure(String n) {\n super(n);\n vars = new Vector();\n }",
"private void CreateStructDcl(){\n B... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
step 1, copy the target directory and the pom file to .verily/gen | public static void reloadProjectFromGen() throws IOException, InterruptedException, VerilyCompileFailedException {
FileUtils.copyDirectoryToDirectory(new File("target"), new File(".verily/gen/"));
FileUtils.copyFileToDirectory(new File("pom.xml"), new File(".verily/gen/"));
FileUtils.copyDirec... | [
"private void updatePOM(Context ctx) {\n try {\n final InputStream input = new FileInputStream(ctx.getOutputDirectory() + \"/pom.xml\");\n final List<String> packLines = IOUtils.readLines(input, Charset.forName(\"UTF-8\"));\n String pom = \"\";\n for (String line :... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Original signature : void OnRspFromFutureToBankByFuture(CThostFtdcReqTransferField, CThostFtdcRspInfoField, int, bool) native declaration : src\main\resources\lib\headfile\ThostFtdcTraderApi.h:305 | @Virtual(101)
public native void OnRspFromFutureToBankByFuture(Pointer<CThostFtdcReqTransferField > pReqTransfer, Pointer<CThostFtdcRspInfoField > pRspInfo, int nRequestID, boolean bIsLast); | [
"@Virtual(89) \n\tpublic native void OnRtnFromFutureToBankByFuture(Pointer<CThostFtdcRspTransferField > pRspTransfer);",
"@Virtual(88) \n\tpublic native void OnRtnFromBankToFutureByFuture(Pointer<CThostFtdcRspTransferField > pRspTransfer);",
"@Virtual(85) \n\tpublic native void OnRtnFromFutureToBankByBank(Point... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the history ID of this person. | public void setHistoryId(java.lang.String historyId) {
_person.setHistoryId(historyId);
} | [
"public void setHistoryId(long historyId)\r\n\t{\r\n\t\tthis.historyId = historyId;\r\n\t}",
"public void setHistoryId(String historyId) {\r\n this.historyId = historyId;\r\n }",
"@Override\n\tpublic void setHistory(java.lang.String history) {\n\t\t_wfms_Associate_History.setHistory(history);\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The static method cleanAttributes. used to remove attributes from session | public static void cleanAttributes(HttpServletRequest request) {
request.getSession().removeAttribute(ORDER);
request.getSession().removeAttribute(ORDER_EDITED);
request.getSession().removeAttribute(ORDER_EDIT);
request.getSession().removeAttribute(WELCOME_TEXT);
request.getSessi... | [
"public void removeProperties() {\n HttpSession session = (HttpSession) _currentSession.get();\n if (session != null) {\n \n // Removing the attributes directly throws a ConcurentModificationException in Tomcat\n ArrayList attributeNames = new ArrayList();\n Enumeration enuAtt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
// METHOD: Test condition 4: orientation(): values of coords[] get stored into relevant fields. | @Test
public void testCondition4()
{
Double[] angles = {75.0, 75.0, 71.0};
_renderable.orientation(angles);
Double testVal[] = _renderable.orientation();
assertEquals("x angle did not get set,", angles[0], testVal[0], 2);
assertEquals("y angle did not get set,", angles[1]... | [
"@Test\n public void testCondition5()\n {\n Double[] coordinates = null;\n Double before[] = _renderable.orientation();\n _renderable.orientation(coordinates);\n Double after[] = _renderable.orientation();\n assertEquals(\"orientation array changed\", before[0], after[0], 0.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
component identifier for v | public int getComponentId(int v) {
return ids[v];
} | [
"public int id(int v) {\n return id[v];\n }",
"int id(int v) {\n return id[v];\n }",
"public int getvID() {\n return vID;\n }",
"private static String formVehicleId(Point source) {\n\t\treturn \"V{\"+ source.getX() + \",\" + source.getY() + \"}\";\n\t}",
"public int getVUid() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a demo.d_rel_client_blob_h table reference | public DRelClientBlobH() {
this(DSL.name("d_rel_client_blob_h"), null);
} | [
"public static String AssetRef_CreateTable()\n\t{\n\t\tString str = \"create table assetref (\" \n\t\t\t\t+ \"id INTEGER PRIMARY KEY,\"\n\t\t\t\t+ \"uniqueId string,\"\n\t\t\t\t+ \"path string,\"\n\t\t\t\t+ \"name string,\"\n\t\t\t\t+ \"size int,\"\n\t\t\t\t+ \"lastChanged time\"\n\t\t\t\t+ \")\";\n\t\treturn str;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when the /plugin command is executed. Handles both player and console command senders. | @Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (args.length == 0) {
outputAllPluginsOverview(sender);
return true;
}
if (!Module.hasPermission(sender, this.getPermission())) {
Module.sendMessage("Pl... | [
"@Override\n public boolean onCommand(CommandSender sender, Command command, String label, String[] arguments) {\n if (!(sender instanceof Player)) {\n sender.sendMessage(Constants.PLUGIN_NAME + \" commands can only be run by a player\");\n return true;\n }\n\n // Now w... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates this multiplexed learner using the specified base learning algorithm. This constructor will normally only be called by the compiler. | public MuxLearner(Learner base) { this("", base); } | [
"public MuxLearner(String n, Learner base)\n {\n this(n, base, defaultDefaultPrediction);\n }",
"public MuxLearner(Learner base, String d) { this(\"\", base, d); }",
"public MuxLearner(String n, Learner base, String d)\n {\n super(n);\n setBase(base);\n defaultPrediction = d;\n network = new H... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads number of datasets in dataset distance table. | public int readNumberOfDatasetsInDISTable()
{
numberOfDatasetsInDISTable = db.readNumberOfDatasetsInDISTable();
return numberOfDatasetsInDISTable;
} | [
"public int getDataCount()\n\t{\n\t\treturn datasets.size();\n\t}",
"public static long getDataSetCount(){\n return dataSets.get();\n }",
"public static int getDataSetsPerThread(){\n return dataSetsPerThread.get();\n }",
"public int readNumberOfDatasets(long minCreationTimestamp)\n\t{\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all sememes for a specified component of specified assemblages restricted by SememeType | public static Stream<SememeChronology<? extends SememeVersion<?>>> getSememesForComponentFromAssemblagesFilteredBySememeType(int componentNid,
Set<Integer> allowedAssemblageSequences, Set<SememeType> typesToExclude) {
SememeSequenceSet sememeSequences = Get.sememeService().getSememeSequencesForComponentFromAssemb... | [
"public Result allSemesters(){\n\t\tUser user = Application.getLoggedUser();\n\t\tif (user == null || user.userType != UserType.ADMIN) {\n\t\t\treturn unauthorized(message.render(\"Please log in to the system as administrator\"));\n\t\t}\n\t\ttry{\n\t\t\tList<Semester> sems = SemesterDB.allSemesters();\n\t\t\t\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column POSSalesDetail.FixedFlag | public void setFixedflag(Integer fixedflag) {
this.fixedflag = fixedflag;
} | [
"public void setFixed(Boolean fixed) {\n this.fixed = fixed;\n }",
"public void setFixed(boolean fixed) {\n\t\tthis.fixed = fixed;\n\t}",
"public void setFixed( boolean fixed ) {\r\n this.fixed = fixed;\r\n }",
"public void setFixed(String fixed) {\n this.fixed = fixed;\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new trigger based on the given condition. Polled by the default scheduler button loop. | public Trigger(BooleanSupplier condition) {
this(CommandScheduler.getInstance().getDefaultButtonLoop(), condition);
} | [
"Trigger createTrigger();",
"SimpleTrigger createSimpleTrigger();",
"protected abstract void createTriggerOrAction();",
"GenericTrigger createGenericTrigger();",
"TriggerType createTriggerType();",
"public void addCondition(SetGenerator condition)\n\t{\n\t\tthis.triggerConditions.add(condition);\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copy the values and resources from the specified node. If overwrite is true this method will replace any values or resources with the specified nodes values and resources. Otherwise, this method will only fill in missing values and resources from the specified node. | public Node copyFrom( Node node, boolean overwrite ) {
// Clone values
for( String key : node.getValueKeys() ) {
if( overwrite || getValue( key ) == null ) setValue( key, node.getValue( key ) );
}
// Clone resources
for( String key : node.getResourceKeys() ) {
if( overwrite || getResource( key ) == nul... | [
"public void saveUserOverwrite(Path path, Node node, long writeId);",
"protected Node copyInto(Node node) {\n node.setValueNumber(valueNumber);\n return node;\n }",
"public void copy\n\t\t\t(Node node)\n\t\t\t{\n\t\t\tthis.parent = node.parent;\n\t\t\tthis.child1 = node.child1;\n\t\t\tthis.child2 = node.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the API client. | public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
} | [
"public void setClient(Client client) {\r\n this.client = client;\r\n }",
"public void setClient(Client client) {\n this.client = client;\n }",
"public static void setDefaultApiClient(ApiClient apiClient) {\n defaultApiClient = apiClient;\n }",
"protected synchronized void setA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getFood method, of class FoodBean. | @Test
public void testGetFood() throws Exception
{
System.out.println("getFood");
int memberId = 5;
FoodBean instance = new FoodBean();
ArrayList<FoodBean> result = instance.getFood(memberId);
assertNotNull(result);
assertTrue(!result.isEmpty());
} | [
"@Test\r\n public void testGetFoodName()\r\n {\r\n System.out.println(\"getFoodName\");\r\n FoodBean instance = new FoodBean(5, \"Beans on toast\", \r\n Date.valueOf(\"2014-04-01\"), Time.valueOf(\"10:00:00\"), \r\n 100, 120, 5, 7, 500, 0, 3);\r\n String expR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Navigates from an instance of MainActivity to another of RegisterUserActivity. | public static Intent fromMainActivityToNewUserActivity(final MainActivity mainActivity) {
Intent i = new Intent(mainActivity, RegisterUserActivity.class);
mainActivity.startActivity(i);
return i;
} | [
"private void linkToRegister() {\r\n final Intent registerIntent = new Intent(this, RegistrationActivity.class);\r\n startActivity(registerIntent);\r\n }",
"public void RegistrationPage(View view) {\n // moving to Registration page\n Intent intent=new Intent(this,registration.class)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overrides the search for location state using the A technique. The function (f) = cost to the current node (g) + heuristic cost to goal node (h) We use some hash tables that do the following: Get the move that brought me to this location Get the cost till I came to this location Get the state I am in on that location T... | @Override
public List<Move> searchForLocation(State starting, Location goal) {
// Initialize our priority queue
PriorityQueue<Location> aStarPQ = new PriorityQueue<Location>();
// Initialize the hashmaps that we are using
HashMap<Location, Move> moveToLocation = new HashMap<Location, Move>();
HashMap<Loca... | [
"private static BoardStateNode aStarAlgorithm()\n {\n // customized priority queue for BoardStateNode objects\n BSNPriorityQueue open = new BSNPriorityQueue();\n BSNPriorityQueue closed = new BSNPriorityQueue();\n // add initial state to the open list\n open.add(new BoardStateN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column public.cmm_burn_spd.coef1 | public void setCoef1(BigDecimal coef1) {
this.coef1 = coef1;
} | [
"public BigDecimal getCoef1() {\r\n return coef1;\r\n }",
"public void setX1( double x1 )\n {\n this.x1 = x1;\n }",
"public void setCampo1(BigDecimal campo1) {\n\t\tthis.campo1 = campo1;\n\t}",
"public void setMcsxLevel1(Float mcsxLevel1) {\r\n this.mcsxLevel1 = mcsxLevel1;\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inits local arrays by EV step | public void initArrays(final int evStep) {
mStopDistribution = evStep;
ISO_VALUE_LIST = EvData.getISOValues(evStep);
APERTURE_VALUE_LIST = EvData.getApertureValues(evStep);
SHUTTER_VALUE_LIST = EvData.getShutterValues(evStep);
} | [
"public void initArrays() {\n for (int i = 0; i < V; i++) {\n visited[i] = 0;\n parent[i] = -1;\n }\n }",
"private void initArrays()\n\t{\n\t\tR = new byte[ m ];\n\t\tR_init = new byte[ m ];\n\t}",
"private void init() {\n //Basic info\n s = graph.getSrc();\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show android IME picker (due to a kind of bug we need to show it in a delayed runnable) | void showPicker() {
Runnable run = new Runnable() {
public void run() {
InputMethodManager inputManager = (InputMethodManager) getSystemService (INPUT_METHOD_SERVICE);
inputManager.showInputMethodPicker();
}
};
Handler h=new android.os.Handler();
h.postDelayed(run,25... | [
"private void showSetAlarmNumberPickerDialog() {\n TimePickerDialogWrapper.newAlarmInstance(\n getActivity(),\n getPreferenceHandler()).show();\n }",
"public void onShowInputMethodPickerSelected(Context context);",
"protected void requestShowPicker() {\n if (widget... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lazy loader for the weapon map | private static Map<String, WeaponTile> getMap() {
if (weaponMap == null) {
weaponMap = new HashMap<>();
WeaponTile[] weapons;
weapons = new Gson().fromJson(
ConfigFileMaker.load(WEAPON_JSON_PATH, WEAPON_JSON_PATH_RES),
Wea... | [
"public void loadMap(){\n level= dataBase.getData(\"MAP\",\"PLAYER\");\n }",
"public abstract void loadMap(GameMap gameMap);",
"public void prepareTileLoading() {\n for (TileAsset resource : TileAsset.values()) {\n assetManager.load(resource.getPath(), Texture.class);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the process completed. | public void setProcessCompleted(String processCompleted)
{
this.processCompleted = processCompleted;
} | [
"public void completed() {\n isCompleted = true;\n }",
"public void setCompleted() {\n\t\tthis.completed = true;\n\t}",
"public synchronized void setComplete() {\n status = Status.COMPLETE;\n }",
"public void completeTask() {\n completed = true;\n }",
"public void setCompleted(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column TRSDEAL_PROMISSORY_FX.ADDITNL_INCOME_RECEIVABLE_SL | public BigDecimal getADDITNL_INCOME_RECEIVABLE_SL()
{
return ADDITNL_INCOME_RECEIVABLE_SL;
} | [
"public void setADDITNL_INCOME_RECEIVABLE_SL(BigDecimal ADDITNL_INCOME_RECEIVABLE_SL)\r\n {\r\n\tthis.ADDITNL_INCOME_RECEIVABLE_SL = ADDITNL_INCOME_RECEIVABLE_SL;\r\n }",
"public BigDecimal getADDITNL_INCOME_RECEIVABLE_GL()\r\n {\r\n\treturn ADDITNL_INCOME_RECEIVABLE_GL;\r\n }",
"public void setADDI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method checks an order date to see if theres an event during that date, and in which case it will return the discount for the order according to the event discount number. | public static synchronized double checkForEvent(Object orderDate) throws SQLException {
Date checkDate = (Date) orderDate;
int discount = 0;
double res = 1;
try {
PreparedStatement eventCheck = ConnectionToDB.conn
.prepareStatement("SELECT * FROM events WHERE startingDate <= ? AND endingDate >= ?"... | [
"public double discountedPrice(Order order);",
"private void extractDataFromOrders(List<Order> orders) {\n ArrayList<LocalDate> orderedListOfMapDays = new ArrayList<LocalDate>();\n HashMap<LocalDate, Integer> dateToCoffeeCaffeineMap = new HashMap<LocalDate, Integer>(), dateToTeaCaffeineMap = new Has... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
increase the impact on the budget of the guy for this event with the given amount | public void addGuyBudgetImpact(int amount) {
this.guyBudgetImpact += amount;
} | [
"public void increaseBudget(long amount) {\n\n if (m_spent <= amount) {\n m_spent -= amount;\n } else {\n m_currentBudget += m_spent - amount;\n m_spent = 0;\n }\n\n }",
"public void addGfBudgetImpact(int amount) {\n\t\tthis.gfBudgetImpact += amount;\n\t}",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to determine the closest valid Orientation the a target position | private Orientation getClosestValidOrientation(DiscreteCoordinates targetPos) {
float minDistance = Float.MAX_VALUE;
Orientation closestOrientation = getRandomValidOrientation();
if (targetPos != null) {
for (Orientation validOrientation : getValidOrientations()) {
f... | [
"private Orientation getOrientation(Location start, Location end) {\n\t\tif (start.x > end.x) { //WEST\n\t\t\tif( start.y > end.y) {\n\t\t\t\treturn Orientation.SOUTHWEST;\n\t\t\t}\n\t\t\telse if( start.y < end.y) {\n\t\t\t\treturn Orientation.NORTHWEST;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn Orientation.WEST;\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To be overwritten by subclasses to render the content of the goodbye block that is to be played at the end of each call. The method is called within the scope of a block VXML tag. Implementations should generally write a prompt tag with some text, or an audio tag with a link to .wav file. | protected void renderVoiceXMLGoodbye() throws Exception
{
write("<prompt bargein=\"false\">");
write("<break time=\"500ms\"/>");
writeEncode(getString("common:Envelope.Voice.Goodbye"));
write("</prompt>");
} | [
"public void showGoodbyeMessage() {\n String end_message = \"\\n Bye. I hope to talk to you again soon! :)\";\n System.out.println(end_message + \"\\n\" + DIVIDER);\n }",
"public void goodbye() {\r\n\ttitle(35, 330, 40);\r\n\tc.setFont(new Font(\"Corbel\", Font.BOLD, 22));\r\n\tc.drawString(\"Tha... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If state is 0 (free), return true | public Boolean isFree() {
return state == 0 ? true : false;
} | [
"boolean hasIsFree();",
"boolean isFree();",
"public Boolean isFree()\n\t{\n\t\treturn free;\n\t}",
"public boolean isFree() {\n\t\treturn free;\n\t}",
"int getIsFree();",
"boolean goalState() {\n\t\treturn (numbersLeft == 0);\n\t}",
"public boolean isGoalState(){\r\n int count = 0;\r\n fo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sends a RawStationDataFrame to the OSD. | @Override
public void storeRawStationDataFrame(RawStationDataFrame frame) throws Exception {
Validate.notNull(frame);
FileWriter fileWriter = null;
try {
if (this.fsOutputDirectory != null) {
// Write to disk.
String json = jsonMapper.writeValueAsString(frame);
String fileNa... | [
"public static RawStationDataFrame from(UUID id, UUID stationId, Set<UUID> channelIds,\n AcquisitionProtocol acquisitionProtocol,\n Instant payloadDataStartTime,\n Instant payloadDataEndTime, Inst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the dimension line listener in parameter to this home. | public void addDimensionLineListener(DimensionLineListener listener) {
this.dimensionLineListeners.add(listener);
} | [
"public void removeDimensionLineListener(DimensionLineListener listener) {\n this.dimensionLineListeners.remove(listener);\n }",
"public void addDustDensityListener(DustDensityListener listener) {\n\t\tlistenerDustDensity.add(listener);\n\t}",
"public void addNPTListener(NPTListener l){}",
"private void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of commands for a given API design that have been executed since a specific content version, including reverted commands. | public List<ApiDesignCommand> listAllContentCommands(String userId, String designId, long sinceVersion) throws StorageException; | [
"public List<ApiDesignCommand> listContentCommands(String userId, String designId, long sinceVersion) throws StorageException;",
"public List<Command> getCommands();",
"@Override\n public List<String> getHistory() {\n List<String> commands = new ArrayList<>(commandHistory);\n Collections.revers... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column t_flood_role.NODE_CODE | public String getNodeCode() {
return nodeCode;
} | [
"private Node getCodeNodeByCode(String code) {\n \n return m_CodeIndex.get(Constants.Property.CodeNodeKey, code.toLowerCase()).getSingle();\n }",
"public Long getCode() {\n return code;\n }",
"public void setNodeCode(String nodeCode) {\n this.nodeCode = nodeCode;\n }",
"St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create Tournament Negative Case: missed start date input | @WithMockUser(value = "spring")
@Test
void testShouldNotCreateTournamentBlankStartDate() throws Exception {
mockMvc.perform(
post("/tournaments/new").with(csrf())
.param("name", "Betty tornament")
.param("location", "Seville")
.param("category","Agility")
.param("petType", "hamster")
... | [
"public TestTask buildNonRecurringTaskWithStartDate() throws IllegalValueException {\n builder = new TaskBuilder();\n return builder.withName(\"non recurring\").withStartDate(\"11 oct 2016 11pm\")\n .withEndDate(\"12 oct 2016 11pm\").build();\n }",
"@WithMockUser(va... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Applications for the current client. repeated .google.cloud.talent.v4beta1.Application applications = 1; | com.google.cloud.talent.v4beta1.ApplicationOrBuilder getApplicationsOrBuilder(int index); | [
"com.google.cloud.talent.v4beta1.Application getApplications(int index);",
"java.util.List<com.google.cloud.talent.v4beta1.Application> getApplicationsList();",
"java.util.List<? extends com.google.cloud.talent.v4beta1.ApplicationOrBuilder>\n getApplicationsOrBuilderList();",
"ApplicationsClient getAppli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an API for modifying the alreadyexisting FillLayout on the given Composite. | public static LayoutsFillLayout modifyFill(Composite composite) {
return new LayoutsFillLayout(getLayout(composite, FillLayout.class));
} | [
"public static LayoutsFillLayout setFill(Composite composite) {\n\t\tFillLayout fillLayout = new FillLayout();\n\t\tcomposite.setLayout(fillLayout);\n\t\tLayoutsFillLayout wrapper = new LayoutsFillLayout(fillLayout).margin(defaultMargin()).spacing(defaultMargin());\n\t\twrapper.setMarginAndSpacingToDefault();\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Should return the base rental plus 1.5 per additional day if the movie is rented for more days than the minimum. | @Test
public void calculateAmountWhenRentalPeriodIsGreaterThanTheMinimum() {
// Given
final int daysRented = RENTAL_PERIOD + 1;
// When
final double actualAmount = children.calculateAmount(daysRented);
// Then
final int additionalDays = daysRented - RENTAL_PERIOD;
... | [
"@Test\n public void calculateAmountWhenRentalPeriodIsLessThanTheMinimum() {\n // Given\n final int daysRented = RENTAL_PERIOD - 1;\n\n // When\n final double actualAmount = children.calculateAmount(daysRented);\n\n // Then\n final double expectedAmount = BASE_RENTAL_FEE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setter method for lastUpdateUserId | public void setLastUpdateUserId(String aValue) {
lastUpdateUserId = aValue;
} | [
"public void setLastUpdateUserId(String lastUpdateUserId);",
"@Override\n\tpublic void setLastUpdateUserId(java.lang.String lastUpdateUserId) {\n\t\t_emailReminder.setLastUpdateUserId(lastUpdateUserId);\n\t}",
"public String getLastUpdateUserId() {\n\t\treturn lastUpdateUserId;\n\t}",
"@Override\n\tpublic jav... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a registry resource instance of the notification template. | private Resource createTemplateRegistryResource(NotificationTemplate notificationTemplate)
throws NotificationTemplateManagerServerException {
String displayName = notificationTemplate.getDisplayName();
String type = I18nEmailUtil.getNormalizedName(displayName);
String locale = noti... | [
"PSNotificationTemplate createNotificationTemplate();",
"Long createNotificationTemplate(NotificationTemplate notificationTemplate) throws UnifyException;",
"Notification createNotification();",
"public void createNotification(Notification notification);",
"public NotificationResource() {\r\n }",
"Info... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test that generated questions contains a Subtraction as reversion task | @Test
public void testSubtractionAsReversion() {
Application.loadQuestions();
assertTrue(Application.allQuestions.contains("21 - 7 = ?") || Application.allQuestions.contains("21 - 14 = ?"));
} | [
"@Test\n\tpublic void test04_05_06_AddEditDeleteAnswerAQuestion() {\n\t\tString answer = txData.getContentByArrayTypeRandom(1)+\"a116817\";\n\t\tString newanswer = txData.getContentByArrayTypeRandom(1)+\"n116817\";\n\n\t\tinfo(\"Test 4: Answer a question\");\n\t\t/*Step Number: 1\n\t\t *Step Name: Prepare data: Cr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table second_visa | List<SecondVisa> selectByExample(SecondVisaExample example); | [
"SecondVisa selectByPrimaryKey(Integer tid);",
"@Select({\n \"select\",\n \"NEWS_ID, TITLE, BODY, IMG_URL, URL, CREATE_TIME\",\n \"from NEWS\",\n \"where NEWS_ID = #{newsId,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=Jd... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the shortest path between two vertices | public ArrayList<Vertex> shortestPath(Vertex v1, Vertex v2) {
Vertex [] prev = new Vertex [vertices.size()];
ArrayList <Vertex> queue = new ArrayList<Vertex>();
ArrayList<Vertex> reversePath = new ArrayList<Vertex>();
ArrayList<Vertex> shortPath = new ArrayList<Vertex>();
int currentV = 0;
int number;
//... | [
"public Path shortestPath(Vertex a, Vertex b) {\n // If a or b aren't present in the set of vertices throw an exception\n if (!myGraph.containsKey(b) || !myGraph.containsKey(a)) {\n throw new IllegalArgumentException(\"One of the vertices isn't valid\");\n }\n /* Create a map ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Private method to link to the RegistrationActivity. | private void linkToRegister() {
final Intent registerIntent = new Intent(this, RegistrationActivity.class);
startActivity(registerIntent);
} | [
"private void openRegistrationScreen() {\n Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);\n startActivity(intent);\n }",
"public void RegistrationPage(View view) {\n // moving to Registration page\n Intent intent=new Intent(this,registration.class);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the long whitespaces in the given string | public static String clearLongWhitespaces(String str) {
if (str == null) {
str = "";
}
String result = "";
StringTokenizer st = new StringTokenizer(str);
while (st.hasMoreTokens()) {
String s = st.nextToken();
if (s != null) {
... | [
"public static String clearLongWhitespaces(String str) {\r\n\r\n if (str == null) {\r\n str = \"\";\r\n }\r\n String result = \"\";\r\n StringTokenizer st = new StringTokenizer(str);\r\n while (st.hasMoreTokens()) {\r\n String s = st.nextToken();\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a function containing an address. | public Function getFunctionContaining(Address addr); | [
"public Function getFunctionAt(Address entryPoint);",
"public Function lookup(String functionName) {\n\t\tObject func = functions.get(functionName);\n\t\tif (func == null) {\n\t\t\tthrow new IllegalArgumentException(functionName);\n\t\t}\n\t\treturn (Function) func;\n\t}",
"java.lang.String getFromAddress();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column vendor.business_license_duration | public void setBusinessLicenseDuration(Date businessLicenseDuration) {
this.businessLicenseDuration = businessLicenseDuration;
} | [
"public Date getBusinessLicenseDuration() {\n return businessLicenseDuration;\n }",
"protected void onChange_DiseaseDuration() {\n onChange_DiseaseDuration_xjal( DiseaseDuration );\n }",
"public void setBusinessLicense(String businessLicense)\n\t{\n\t\tthis.businessLicense = businessLicense;\n\t}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To avoid churns, we add a balance margin to the user specified rebalance threshold. e.g. when user sets the threshold to be balancePercentage, we use (balancePercentage1)balanceMargin instead. | private double balancePercentageWithMargin(Resource resource) {
return (_balancingConstraint.balancePercentage(resource) - 1) * BALANCE_MARGIN;
} | [
"private double balancePercentageWithMargin() {\n return (_balancingConstraint.resourceBalancePercentage(DISK) - 1) * BALANCE_MARGIN;\n }",
"@Override\n\tpublic double applyInterest() { //only penalty with a checking account\n\t\tif(getBalance() < getMinimum()){\n\t\t\tif (getBalance() > 5){\n\t\t\t\twithdraw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. CourseWorkspace wrkspace = new CourseWorkspace(app); CourseData appData = new CourseData(app); CourseFiles file = new CourseFiles(app); CourseStyle style = new CourseStyle(app); app.setWorkspa... | @Override
public void reloadWorkspace(AppDataComponent dataComponent) {
CourseData data = (CourseData)dataComponent;
taData.reloadOfficeHoursGrid(data);
} | [
"public ScheduleData(CourseSiteGeneratorAPP init){\n \n app = init;\n \n // CONSTRUCT THE LIST OF RECITATIONS FOR THE TABLE\n scheduleTableList = FXCollections.observableArrayList();\n \n //THIS WILL STORE OUR OFFICE HOURS\n //recitationTable = new HashMap();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Domain Artifact Definition'. This implementation returns null; returning a nonnull result will terminate the switch. | public Object caseDomainArtifactDefinition(DomainArtifactDefinition object) {
return null;
} | [
"public Object caseArtifactDefinition(ArtifactDefinition object) {\n\t\treturn null;\n\t}",
"public Object caseDDLArtifact(DDLArtifact object) {\r\n\t\treturn null;\r\n\t}",
"public Object caseArtifactDefinitionPackage(ArtifactDefinitionPackage object) {\n\t\treturn null;\n\t}",
"public T caseImplementationAr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required int64 executeTime = 3; | long getExecuteTime(); | [
"long getExecutionTime();",
"int get_executed_time(double time);",
"long getTotalRunTime();",
"public static long computeTimeout(long runtime) {\n return runtime * 10 + 2000;\n }",
"public int getExecTimeLimitInMillis();",
"public int getComputationTime();",
"public int getRunTime() { return runTi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a single text tweet from a String | public String createTweetText(String address, String text) {
String prefix = randomString.nextString(); //create random prefix code to append
int offset = prefix.length() + address.length() + 3; //offset from 140 chars. +3 for @ + " "
text = text.s... | [
"public static AbstractTaskManagerTweet parseTweet(String tweet) {\n\t\tString[] strings = tweet.split(Constants.SEPARATOR, -1);\n\t\tTweetType type = TweetType.valueOf(strings[0]);\n\t\tswitch (type) {\n\t\tcase NP:\n\t\t\t// TODO Where get yourself from? \n\t\t\tString projectName = strings[1];\n\t\t\tProject pro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to get the pieces on the board. | public OthelloPiece[][] getPieces() {
return m_Pieces;
} | [
"public BoardPiece[][] getBoardPieces();",
"public Piece[][] getPieces() { return _pieces; }",
"public List<Piece> getPieces() {\n return pieces;\n }",
"public ArrayList<Piece> getPieces()\n {\n ArrayList<Piece> pieces = new ArrayList<Piece>();\n for(Piece[] p : Grid)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
twitch auth callback method | private void twitchSignInResult(String callbackResult) {
int startPoint = callbackResult.indexOf("=") + 1;
int endPoint = callbackResult.indexOf("&");
String token = callbackResult.substring(startPoint, endPoint);
if (!token.equals("")) {
Toast.makeText(SettingActivity.thi... | [
"void authenticateTwitter(String userId, String token, String secret, boolean forceCreate, IServerCallback callback);",
"void onPrivMsg(TwitchUser sender, TwitchMessage message);",
"public abstract int callback(Credential[] cred);",
"void authenticateHandoff(String handoffId, String securityToken, IServerCall... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the zoneSyncState value for this SyncJobResult. | public int getZoneSyncState() {
return zoneSyncState;
} | [
"public SyncStatus getSyncStatus() {\r\n return mSyncStatus;\r\n }",
"public int getSyncState();",
"public void setZoneSyncState(int zoneSyncState) {\n this.zoneSyncState = zoneSyncState;\n }",
"@ApiModelProperty(required = true, value = \"Information about the current state of the Resou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new ChangeRegistrationResponse object indicated by the Hashtable parameter | public ChangeRegistrationResponse(Hashtable<String, Object> hash) {
super(hash);
} | [
"public ChangeRegistrationResponse() {\r\n super(FunctionID.CHANGE_REGISTRATION.toString());\r\n }",
"public RPCResponse(Hashtable<String, Object> hash) {\r\n\t\tsuper(hash);\r\n\t}",
"entities.Torrent.RegistrationResponseOrBuilder getRegistrationResponseOrBuilder();",
"com.openmdmremote.harbor.HRPC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests that a registration cannot proceed with bad formatted fields. | @Test
@InSequence(5)
public void addMemberWithBadFormatFieldsTest() {
// initialize main page
initializePageUrl();
// wait until the android page is loaded
androidPage.waitUntilPageIsLoaded();
// navigate to registration page
androidPage.navigateToRegistrationPage... | [
"@Test\r\n\tpublic void TC_07_verify_Invalid_Email_Address_format() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\t\r\n\t\t// Step... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the local rich finder. | public LocalRichFinder getLocalRichFinder() {
return localRichFinder;
} | [
"public LocalRichInfoFinder getLocalRichInfoFinder() {\n\t\treturn localRichInfoFinder;\n\t}",
"public void setLocalRichFinder(LocalRichFinder localRichFinder) {\n\t\tthis.localRichFinder = localRichFinder;\n\t}",
"public LocalRichService getLocalRichService() {\n\t\treturn localRichService;\n\t}",
"public Re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Observer interface so containers can be notified when a flashcard is deleted. | public interface FlashcardObserver {
/**
* Call this when a flashcard is deleted.
*
* @param flashcard the flashcard that was deleted.
*/
void delete(Flashcard flashcard);
} | [
"void delete(Flashcard flashcard);",
"void deleteFlashcard(Flashcard flashcard);",
"public void cardRemoved()\n\t{\n\t\tmWorld.deleteObserver(mWorldView);\n\t\tmWorld.deleteObserver(mLogView);\n\t\tmWorld.deleteObserver(this);\n\t\tmPlayer.deleteObserver(mPlayerView);\n\t\tmPlayer.getMission().deleteObserver(mM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a list of all asset balances | public List<BalanceAsset> getAssetBalances() {
IssueCommand issueCommand = multiChainCommand.getIssueCommand();
try {
return issueCommand.getAssetBalances();
} catch (MultichainException e) {
System.err.println(e.getMessage());
return null;
}
} | [
"public String getBalances() {\n\n\t\treturn getJson(API_VERSION, ACCOUNT, \"getbalances\");\n\t}",
"public List<BalanceAsset> listAssets() {\n\t\tIssueCommand issueCommand = multiChainCommand.getIssueCommand();\n\t\ttry {\n\t\t\treturn issueCommand.listAssets(null);\n\t\t} catch (MultichainException e) {\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Advances deathTick until we have fully iterated through the death spritesheet, and then it iterates lagTick, which is used to keep the dead body on screen for a few seconds. | public void advanceDeath() {
if(deathTick<deathFrames-1) deathTick++;
else lagTick++;
} | [
"@Override\n\t protected void onDeathUpdate()\n\t {\n\t\t ++this.deathTicks;\n\n\t\t if (this.deathTicks >= 180 && this.deathTicks <= 200)\n\t\t {\n\t\t\t float var1 = (this.rand.nextFloat() - 0.5F) * 8.0F;\n\t\t\t float var2 = (this.rand.nextFloat() - 0.5F) * 4.0F;\n\t\t\t float var3 = (this.rand.nextFloat() - 0.5... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
"Unleash" the car. This is only used at the start of a race after the countdown. The car gets different starting speeds depending on how long it has accelerated for. | public void unleash() {
locked = false;
float percent = framesAccelerated/60.0f;
if (percent > 1) percent = 2 - percent;
if (percent < 0) percent = 0;
if (player.aiControlled()) {
percent = AIcontroller.randomStartBoost();
}
speed = MAX_SPEED * percent;
} | [
"void unsetSpeed();",
"public void decelerate() {\n\t\tif (this.hasOnlyOneCar())\n\t\t{\n\t\t\tif (this.getHead().getSpeed()==Speed.FAST)\n\t\t\t\tthis.getHead().setSpeed(Speed.NORMAL);\n\t\t\telse\n\t\t\t\tthis.getHead().setSpeed(Speed.SLOW);\n\t\t}\n\t}",
"void decParkingTimeIfCar() {\n\t\tif (this.parkDurati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculate difference between the given DataTable objects. | DataTable diff(DataTable newTable, DataTable oldTable); | [
"private Collection getColumnDiff(Dataset<Row> left, Dataset<Row> right) {\n return CollectionUtils.subtract(Arrays.asList(left.schema().fieldNames()),\n Arrays.asList(right.schema().fieldNames()));\n }",
"Delta diff( Object original, Object modified );",
"public ColumnDiff getDiff();",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string vmUrl = 2; | public String getVmUrl() {
Object ref = vmUrl_;
if (ref instanceof String) {
return (String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
vmUrl_ = s;
... | [
"String getVmUrl();",
"public Builder setVmUrl(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n vmUrl_ = value;\n onChanged();\n return this;\n }",
"public abstract void setURL(String var_url);",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
scaling_list_present_mask has one bit for each seq_scaling_list_present_flag[i] for SPS OR pic_scaling_list_present_flag[i] for PPS, bit 0 5 are for each entry of ScalingList4x4 bit 6 7 are for each entry plus 6 for ScalingList8x8 | @NativeType("uint16_t")
public short scaling_list_present_mask() { return nscaling_list_present_mask(address()); } | [
"private static final boolean mpeg2_scale_bitcount(final Jlame_internal_flags gfc, final Jgr_info cod_info) {\n\t\tfinal int max_sfac[] = new int[4];\n\t\tint[] partition_table;\n\t\tfinal int[] scalefac = cod_info.scalefac;\n\n\t\t/*\n\t\t Set partition table. Note that should try to use table one,\n\t\t but d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Uom' reference. | Uom getUom(); | [
"public String getUom() {\n return (String)getAttributeInternal(UOM);\n }",
"String getURef();",
"public java.lang.String getBASE_UOM() {\r\n return BASE_UOM;\r\n }",
"JavaValue getULocale();",
"public java.lang.String getUNOM() {\n return UNOM;\n }",
"public String getUomCod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if both todoList events have the same identity fields and data fields. This defines a stronger notion of equality between two todoList events. | @Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if (!(other instanceof ToDoListEvent)) {
return false;
}
ToDoListEvent otherToDoListEvent = (ToDoListEvent) other;
return otherToDoListEvent.getTitle().equals... | [
"public boolean isSameToDoListEvent(ToDoListEvent otherToDoListEvent) {\n if (otherToDoListEvent == this) {\n return true;\n }\n\n return otherToDoListEvent != null\n && otherToDoListEvent.getTitle().equals(getTitle())\n && otherToDoListEvent.getDescription().eq... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Priority to apply to workflow pods. | public Integer getPodPriority() {
return podPriority;
} | [
"@Test\n public void podPriorityTest() {\n // TODO: test podPriority\n }",
"public String getPodPriorityClassName() {\n return podPriorityClassName;\n }",
"@Test\n public void podPriorityClassNameTest() {\n // TODO: test podPriorityClassName\n }",
"public abstract int getDefaultP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the localisation text for the title in delete dialogs. | public String getDeleteDialogTitle() {
return deleteDialogTitle;
} | [
"int getLocalizedText();",
"public String getDialogTitle();",
"public String getLocalizedTitleKey() { return localizedTitleKey;}",
"SteamMsgGameNotifications.CGameNotifications_LocalizedText getTitle();",
"PreferenceDialogTitleAttribute getDialogTitle();",
"public String getEditorialTitle();",
"@AutoEsc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |