query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Get the server URL for this login control object | public String getServerURL() {
return LoginManager.this.getServerURL();
} | [
"public String getServerURL() {\n return this.properties.getProperty(Constants.SERVER_URL_KEY);\n }",
"public String getServerUrl() {\n return serverUrl;\n }",
"@java.lang.Override\n public java.lang.String getServerUrl() {\n return instance.getServerUrl();\n }",
"@j... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Yes! getters and setters are in a single method. WHY?? i dont want nulls in database so this way is okay? idk In words, if the value is null for string and 1 for interger/double/float it GETS the value else it SETS the value and instantly GETS too cuz a = b = 4; at end a and b are 4 | public int ID(int value) {
return (value == -1) ? id : (id = value);
} | [
"public void setC_UOM_Weight_ID (int C_UOM_Weight_ID)\n{\nif (C_UOM_Weight_ID <= 0) set_Value (\"C_UOM_Weight_ID\", null);\n else \nset_Value (\"C_UOM_Weight_ID\", new Integer(C_UOM_Weight_ID));\n}",
"public String getNullValue () {\n \t return nullValue;\n }",
"public void setC_UOM_Volume_ID (int C_UOM_Volu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public int addSection(Section section) {
return (Integer) sectionDao.save(section);
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Override to inject the tooltip content into the cell. | @Override
public void onBrowserEvent(Context context, Element elem, NativeEvent event) {
super.onBrowserEvent(context, elem, event);
if (BrowserEvents.CONTEXTMENU.equals(event.getType()) && contextMenuHandler != null) {
contextMenuHandler.onContextMenu(event);
}
} | [
"@Override\r\n\tpublic void setTooltipText(int aRow, int aCol, String newVal) {\n\t\t\r\n\t}",
"protected void setColumnToolTip(int column, String toolTipText) {\n }",
"@Override\r\n\tpublic String getToolTipText(MouseEvent event) {\r\n\t\tint row = rowAtPoint(event.getPoint());\r\n\t\tint column = columnAtPoi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by Shamyyoun on 5/7/16. | public interface OnUserSelectedListener {
public void onUserSelected(User user);
} | [
"@Override\n public void extornar() {\n \n }",
"@Override\n }",
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the stationno value for this AutoLoginResponse. | public void setStationno(java.lang.String stationno) {
this.stationno = stationno;
} | [
"public void setStationNum(String stationNum) {\n this.stationNum = stationNum;\n }",
"public void setStationNumber(String stationNumber)\n\t{\n\t\twStationNo = stationNumber;\n\t}",
"public void setStationNumber(String arg, String compcode) throws ReadWriteException\n\t{\n\t\tsetValue(_Prefix + Machi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Queue q = new LinkedList(); | public static String[] solution(String[][] tickets) {
List<String> list = new ArrayList<>();
String first = "ICN";
boolean check[] = new boolean[tickets.length+1];
int min_i = 0;
int count = 0;
while ( count < tickets.length) {
//q.add(first);
list.add(first);
min_i = -1;
String min_t = "";... | [
"public QueueFromLinkedList(){\n list = new LinkedList();\n }",
"public MyQueue(){\n\t\tlinkList = new LinkedList<T>();\n\t}",
"public ALQueue()\n {\n\t_queue = new ArrayList<Quasar>();\n }",
"public MyStack() {\r\n queue = new LinkedList<>();\r\n\r\n }",
"private IQueue<Integer> M... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
empty used to enumerate all connected Links. | public java.util.Iterator iteratorLink()
// -end- 328A5BB3023A get_all_head3298AE8300D9 "Association::iteratorLink"
; | [
"private List<Link> getAllLinks() {\n Topology flowTopology = getFlowTopology();\n return flowTopology.getLink();\n }",
"public Iterable<Link> getLinks() {\n return links;\n }",
"public NEOLink getLinks() {\n return links;\n }",
"public int getLinkCount() {\n return noLinks_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notifies controller of an event | public void notifyController(Event event)throws RemoteException{
notify(event);
} | [
"private void sendEventController(String event){\n synchronized (controllerEvents) {\n controllerEvents.add(event);\n controllerEvents.notifyAll();\n }\n }",
"@Override\n\tpublic boolean onNotify(ControllerEvent event) {\n\t\tswitch(event.eventId) {\n\t\t\tcase(ControllerEve... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new position controller for a robot. | public RobotPositionController(OdometryRobot robot) {
this.robot = robot;
} | [
"public Robot()\n\t{\n\t\tposition = new Position();\n\t\tgoal = new Position();\n\t}",
"public Robot() \n {\n \t//Setting the motor channels on the RobotDrive object for the tank drive setup.\n myRobot = new RobotDrive(MOTOR_CHANNEL_LEFT, MOTOR_CHANNEL_RIGHT);\n myRobot.setExpiration(0.1);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a vertex by name. | public void remove(String vertexName) {
Point[] h = new Point[this.vertices.length - 1];
int i = 0, j = 0;
for (i = 0; i < this.vertices.length; i++) {
if (this.vertices[i].getName().equals(vertexName)) {
continue;
}
h[j] = this.vertices[i];
... | [
"@Override\n\tpublic void removeVertex(String name) {\n\n\t}",
"void removeVertex(IVertex vertex);",
"public void removeVertex(String vname) {\n\n\t\tVertex vtx=vtces.get(vname); // 1.\n\t\tArrayList<String> keys=new ArrayList<>(vtx.nbrs.keySet()); // List of all keys get\n\n\t\tfor(String key:keys) {\n\t\t\tV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
metoda in care va returna ziua calendaristica de astazi | public String toString(int zi , int luna, int an) {
return "DataCalendaristica [zi=" + zi + ", luna=" + luna + ", an=" + an + "]";
} | [
"public String actionPrueba() {\n\t\tDate inicio = new Date();\r\n\t\t Date fin = new Date();\r\n\t\t \r\n\t\tSimpleDateFormat formateador = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\ttry{\r\n\t \r\n\t\t\t\tinicio = formateador.parse(\"01/11/2015\");\r\n\t\t\t\tfin = formateador.parse(\"30/11/2015\");\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When exit is run, it sends signal to terminate. | @Override
public Command run(String[] tokens, JShell shell) {
return this;
} | [
"public void exit() {\n\t\tsuper.exit();\n\t}",
"@Override\n\tpublic void exit() {\n\t\tSystem.exit(0);\n\t}",
"private void doExit() {\n }",
"public void exit() {\n messageHandler.exit();\n }",
"@Override\n\tpublic void exit() {\n\t\tsuper.exit();\n\t\t\n\n\t}",
"private void terminate() {\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
} | [
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ updateInfo [method]: Method to update the progress elements (progressbars / labels) | public void updateInfoGM1(int noq, float noqInPercent, float surness) {
this.view.pgbKnowledge.getProgressBar().setProgress(surness);
this.view.lblKnowledge.setText("" + (int)(surness * 100) + "%");
this.view.pgbNoOfQuest.getProgressBar().setProgress(noqInPercent);
this.view.lblNoOfQuest.setText("" + noq);
... | [
"public void updateInfo() {\n\t\texplicitWaitClickable(updateBtn);\n\t\tclick(updateBtn);\n\t}",
"void progressUpdate(float progress);",
"@Override\r\n \tpublic void updateProgress(String id,int current, int total) {\n \t\t\r\n \t}",
"private void updateProgressBar() {\n\t\tmHandler.postDelayed(mUpdateTimeTas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 switch4 = 15; | public Builder setSwitch4(int value) {
bitField0_ |= 0x00004000;
switch4_ = value;
return this;
} | [
"public IfSwitchReplacement() {\n\t\tshort i=__set_short((short)(1),(short)0),j=__set_short((short)(0),(short)1);\n\t/***** BEGIN ORIGINAL [IF_SWITCH_1] *****\r\n\t\t\tif (__get_short(i,(short)0)==1) j=__set_short((short)(10),(short)1);\r\n\t\t\telse j=__set_short((short)(20),(short)1); \r\n\t***** END ORIGINAL [IF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create user's basic information usage: RegisterController | int createUserinfo(UserDTO u); | [
"@RequestMapping(value=\"/register.htm\")\n protected ModelAndView register() {\n ModelAndView mv = new ModelAndView(\"register\", \"command\", new User());\n return mv;\n }",
"@GetMapping(\"/registration\")\n\tpublic String registerUser(Model model) {\n\t\tmodel.addAttribute(\"user\", new Use... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The doGet method of the servlet. This method is called when a form has its tag value method equals to get. | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
doPost(request,response);
out.flush();
out.close();
} | [
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(request, response); //susing doPost方法执行 对应jsp页面中的form表单中的method\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets staff type the the permissions parameter | public void setPermissions(String permissions) {
this.permissions = permissions;
} | [
"public abstract String setPermission();",
"public void setPermissions(List<Permission> permissions) {\t\t\r\n\t\tthis.permissions = permissions;\t\r\n\t}",
"public void setPermissionType(Byte permissionType) {\n this.permissionType = permissionType;\n }",
"public void mintaPermission(){\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Hide and show progress bar // | private void showDialog() {
mProgressBar.setVisibility(View.VISIBLE);
mProgressBar.setIndeterminate(true);
} | [
"public void hideProgressBar() {\n\t\tsetProgressBarIndeterminateVisibility(false); \n\t}",
"public void showProgressBar() {\n\t\tsetProgressBarIndeterminateVisibility(true);\n\t}",
"public void showProgressBar() {\n progress.setVisible(true);\n }",
"public void hideProgress() {\n llP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if a given location is present in the grid. | public boolean contains(int x, int y) {
if (isValid(x,y)) {
int index = Arrays.binarySearch(getCoordinates(), getKey(x,y));
//the index returned by a binarySearch is positive if the number exists
return (index >= 0);
} else {
throw new ArrayIndexOutOfBoundsException("("+x+","+y+")");
}
} | [
"public boolean containsLocation(Location location);",
"public boolean locationCheck(BoardLocation location){\n int row = location.getRow();\n int column = location.getColumn();\n if (inputRCnumCheck(row) && inputRCnumCheck(column)){\n return true;\n }else{\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test for baseStockTransVofficeService.validateInput method | @Test
public void testValidateInput_7() throws Exception {
expectedException.expect(LogicException.class);
expectedException.expectMessage(ErrorCode.ERROR_USER.ERROR_USER_OBJECT_IS_EMPTY);
BaseStockImpToPartnerBalanceService spyTemp = PowerMockito.spy(baseStockImpToPartnerBalanceService);
... | [
"private void validateInput() {\n }",
"protected abstract boolean validateInput();",
"@Test\r\n public void testValidateInputs() {\r\n assertEquals(new Calculation().validateInputs(itemPrice, moneyInserted), expResult);\r\n }",
"private boolean validInput(ReceiveOrderModel model) {\n bo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field success is set (has been assigned a value) and false otherwise | public boolean isSetSuccess() {
return this.success != null;
} | [
"public boolean hasSuccessValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasSuccessValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean isSetSuccess() {\n return __isset_bit_vector.get(__SUCCESS_ISSET_ID);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: Warning this method won't work in the case the id fields are not set | @Override
public boolean equals(Object object) {
if (!(object instanceof Schedule)) {
return false;
}
Schedule other = (Schedule) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
... | [
"public int getId () { return id; }",
"public int getId(){ return this.id;}",
"public int id() {return this.id;}",
"@Override\n public int getId() { return id; }",
"public void setId(long id){ \r\n this.id = id; \r\n }",
"public void setId( int id ) { this.id = id; }",
"public void setId( l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialise key variables and views | private void init() {
/**
* Get the company we are reffering to
*/
} | [
"private void initKeys()\n\t{\n\t}",
"private void init() {\n\t\tfindView();\n\t\tinitValue();\n\t}",
"private void initializeKeys() {\n\n //Retrieving the Answer Keys Array\n String[] keysArray = getStringArrayResourceByName(\"key\", mCurrentQuestionIndex);\n\n //Initializing the ArrayList... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method convert date componet to string | public static String dateOnly2String(Date date) {
if (date == null) {
return "";
}
return SDFDATEONLY.format(date);
} | [
"public static String date2string(Date date){\n\t\tif (date == null) {\n\t\t\t\n\t\t\treturn \"Не установлена\";\n\t\t}\n\t\tDateFormat dFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n return dFormat.format(date);\n\t\t\n\t}",
"private static String getDateString(EYSDate date)\n {\n if ((date... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method return the successor index of the given index, traversing towards parent. | public static int findSuccessorFromParent(int searchItemIndex) {
int parentIndex = getParentIndex(searchItemIndex);
if (parentIndex < 0) { // this implies that
return -1;
}
if (isLeftChild(searchItemIndex,parentIndex)) {
return parentIndex;
} else {
return findSuccessorFromParent(parentInde... | [
"private int parentOf(final int index) {\n confirmInBounds(index);\n return ((index + 1) / 2) - 1;\n }",
"public int parent(int index) {\n\t\treturn (index -1) / 2;\n\t}",
"private int parent(int index){\n\t\t// bitwise operation for round down of index / 2\n\t\treturn index >> 1;\n\t}",
"int... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads a comment from the cache base on on it's commentId | public static Comment readFromCommentId(SQLiteDatabase db, long cId) {
Comment comment = new Comment();
Cursor c = db.query(comment.getTableName(), comment.getColNames(), COMMENT_ID + "=?",
new String[] { Long.toString(cId) }, null, null, null);
if (c.moveToFirst()) {
comment.readFromCursor(c);
}
c.c... | [
"private static PSComment tryCommentCache(@Nullable PSComment comment, Long id) {\n PSComment g = comment;\n if (g == null) {\n PSEntityCache<PSComment> cache = CommentManager.getCache();\n g = cache.get(id);\n if (g == null) {\n g = new PSComment(); // Add new constructor\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
isClosed Event handling Method that registers a ConnectionListener with the Connection instance. | public void addConnectionListener(ConnectionListener cl) {
listeners.add(cl);
} | [
"public abstract void connectionClosed(ConnectionEvent event);",
"public void connectionClosed() {\r\n isConnected = false;\r\n }",
"public void onConnectionClosed() {\n \n }",
"void connectionClosed(ClientConnection clientConnection);",
"protected void onClose() {\n\t\tif (state != Conn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
in some random units | public Carro(double weight, double kms,double emission_factor) {
this.weight = weight;
this.kms = kms;
this.emission_factor = emission_factor;
} | [
"static Vec3 random_in_unit_sphere(){\n\t\tVec3 p;\n\t\tdo{\n\t\t\tp = new Vec3(Math.random(),Math.random(),Math.random()).mul(2).sub(new Vec3(1,1,1));\n\t\t} while(p.squared_length() >= 1.0);\n\t\treturn p;\n\t}",
"private String getUnit(String name) {\n List<String> unitList = this.nameUnitMap.get(name);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if this cell editor is able to perform the select all action. This default implementation always returns false. Subclasses may override | public boolean isSelectAllEnabled() {
if (m_popupText == null || m_popupText.isDisposed()) {
return false;
}
return m_popupText.getCharCount() > 0;
} | [
"public boolean areAllItemsSelectable() {\n\t\t\treturn false;\n\t\t}",
"public boolean isSelectAll();",
"public boolean selectable()\r\n\t{\r\n\t\treturn impl.selectable(this);\r\n\t}",
"public boolean supportsSelectedOnly() {\n\t\t\treturn true;\n\t\t}",
"boolean canSelectMultipleRows();",
"public boole... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function for checking norml text with only characters | public boolean matchText(String input) {
boolean match = false;
try {
String emailregex = "^[a-zA-Z]{1,40}+$";
match = input.trim().matches(emailregex);
} catch (Exception e) {
e.printStackTrace();
}
return match;
} | [
"static boolean isText(char param1Char) {\n/* 4589 */ switch (param1Char) {\n/* */ case '%':\n/* */ case 'n':\n/* 4592 */ return true;\n/* */ } \n/* 4594 */ return false;\n/* */ }",
"boolean hasPrenormText();",
"boolean containsShouldNotCharact... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Vaciar el tablaHash de todos los valores. | @FXML
protected void botonVaciar() {
if (scene == null) {
initializeHashTable();
}
tablaHash = new TablaHash(10);
generarGrafico();
} | [
"private void setToRemoved() {\r\n key = null;\r\n value = null;\r\n inTable = false;\r\n }",
"private void deleteTableElements(){\n DefaultTableModel modelo2 = (DefaultTableModel) form_tablaCompras.getModel(); \n //Borrar los valores que ya existen, para no repetirlos en la... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
| Getters / Setters | | | public void setRecipeIngredients(List<Ingredient> ingredients) {
mRecipeIngredientsAdapter.setmIngredients(ingredients);
mRecipeIngredientsRecyclerView.setAdapter(mRecipeIngredientsAdapter);
mRecipeIngredientsAdapter.notifyDataSetChanged();
} | [
"@Override\n }",
"@Override\r\n\t\tprotected void getData() {\n\r\n\t\t}",
"@Override\n\tpublic void getPuntuacio() {\n\n\t}",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\tpublic void setValue() {\n\t\t\n\t}",
"@Override\r\n\tpublic void getData() {\n\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is where we will all collaborate. Construct your animal and add it to the List | public static void populateAnimals(List<Random> animals)
{
Random r = new Random();
Random q = new Random();
animals.add(r);
animals.add(q);
} | [
"public static void populateAnimals(List<Animal> animals)\n {\n Bear bear1 = new Bear(\"Care\", \"There's a weird symbol on his stomach and rainbows shooting from it. That can't be healthy.\", \"A fluffy cloud.\");\n Bear bear2 = new CircusBear(\"Fez\", \"This bear wears a fez and looks somewhat f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of BrokerViewImpl | public BookViewImpl(BookModel model) {
System.out.println("Creating BrokerViewImpl");
try {
//** 1 Assign model to the attribute brokerModel
this.brokerModel = model;
//** 2 Invoke the addChangeListener method of the model with this instance
model.a... | [
"@Override\n public IMakeBroker newBroker() {\n return new IMakeBroker(this);\n }",
"public static View init(BlockingQueue<Message> messages)\r\n\t{\r\n\t\tif (instance == null)\r\n\t\t{\r\n\t\t\tinstance = new View(messages);\r\n\t\t}\r\n\t\treturn instance;\r\n\t}",
"public ProposalApprovalViewImpl() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
an interface to parse String to migrationCostMaker | public static interface MigrationCostParser {
public MigrationCostMaker parse(String s);
} | [
"public void fromString(String str) {\n\t\t_example = null; _label = null; _value = 0.f;\n\t\tString s = str.substring(1,str.length()-1);\n\t\tString sub[] = s.split(\";\"); \n\t\tif (sub == null) \n\t\t\treturn;\n\t\tif (sub.length >= 1)\n\t\t\t_example = new Example(sub[0]);\n\t\tif (sub.length >= 2) {\n\t\t\t//_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
compare rules based on length and hashcode of rule variable | private int compareLenghtAndHash(Rule o, int isLonger) {
if(isLonger != 0){
return isLonger;
}
if(ruleHashCode() > o.ruleHashCode())
return 1;
if(ruleHashCode() < o.ruleHashCode())
return -1;
return 0;
} | [
"boolean gameRule(String rule);",
"public int getNumberOfRules() {\r\n return 32;\r\n }",
"private List<int[]> cleanRuleBase(List<int[]> listOfRules, List<Double> listOfDegree, int numberOfVariables) {\n // ant1 is the antecedent of the rule 1\n // ant2 is the antecedent of the rule 2\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Do nothing: for test purpose only. | @DeleteMapping("/test")
public void testApiDELETEEndpointMethod() {
} | [
"protected void sanityCheck() {\n\t\t// do nothing\n\t}",
"protected void method_5557() {}",
"private void testing() {\n\t}",
"private void doTest() {\r\n\r\n\t}",
"protected void mo4791d() {\n }",
"public void doNothing(){\n\t\t\n\t}",
"private static void EX5() {\n\t\t\r\n\t}",
"private void test... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a camera that is looking at a specified location in the world. | public LockOnCamera(Vector3f position, Vector3f location)
{
this.position = position;
this.location = location;
this.pitch = 10f;
} | [
"private OrthographicCamera createCamera() {\n OrthographicCamera camera = new OrthographicCamera(VIEWPORT_WIDTH / PIXEL_TO_METER, VIEWPORT_HEIGHT / PIXEL_TO_METER);\n camera.position.set(camera.viewportWidth / 2f, camera.viewportHeight / 2f, 0);\n camera.update();\n if (DEBUG_PHYSICS) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initiating default amount of delay | public TimeOutValve() {
super.setDelay(DEFAULT_TIMEOUT_DELAY);
} | [
"public int getInitialDelay() {\r\n return 300; //ms\r\n }",
"private Delay() {\n\t\n\t}",
"@Override\r\n\tpublic void generateDelay() {\n\t\tthis.setDelay(0);\r\n\t}",
"protected void delay() {\n this.sleep(r.nextInt(100));\n }",
"public void delay() {\n\t\ttry {\n\t\t\tThread.sleep(min... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Register a namespace prefix | private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namesp... | [
"public void addNamespace(String pPrefix) {\n // check if already registered.\n if (!namespaces.containsKey(pPrefix)) {\n LOGGER.debug(\"Add namespace for prefix '{}'\", pPrefix);\n namespaces.put(pPrefix, NAMESPACE_PREFIX + pPrefix);\n }\n }",
"private java.lang.String registerPrefix(javax.xm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Used if using a marker without parent list | public void setTo(PlotPainterContainerView containerView, PointData data) {
this.containerView = containerView;
this.data = data;
} | [
"@Override\n public boolean onMarkerClick(Marker marker) {\n if ( (!(marker.getSnippet().equals(\"Current Location\"))) && (!(marker.getSnippet().equals(\"Child Current Location\"))) ) {\n\n //get the Id of marker in long format\n Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Names of fields in tuple passed in storm topology | public interface StormFields {
/**
* Field with {@link pl.edu.agh.kaflog.common.LogMessage}
*/
public static final String LOG_MESSAGE = "logMessage";
/**
* Field with String contain HBase row id
*/
public static final String ROWID = "rowid";
} | [
"public MolapMember[] getTuple()\r\n\t{\r\n\t\treturn tuple;\r\n\t}",
"public int getNameField();",
"private String traitFields(List<Field> fields) {\n StringBuilder buffer = new StringBuilder();\n boolean first = true;\n for (Field field : fields) {\n if (first) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the given entity. | public E update(final E entity) {
LOG.debug("Update entity {} with id {}", clazz.getSimpleName(), entity.getId());
return entityManager.merge(entity);
} | [
"@Override\n\tpublic void updateEntity(Object Entity) {\n\t\t\n\t}",
"@Override\n\tpublic void update (Entity entity) {\n\n\t}",
"@Override\n\tpublic void update(Entity entity) {\n\t\t\n\t}",
"@Override\r\n\tpublic void update(Sail entity) {\n\t\t\r\n\t}",
"Post update(Post entity);",
"@Override\n publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes postidRadioButton1 | private JRadioButton getPostidRadioButton1() {
if (postidRadioButton1 == null) {
postidRadioButton1 = new JRadioButton();
postidRadioButton1.setBounds(new Rectangle(6, 132, 153, 28));
postidRadioButton1.setText("Wordpress Post ID");
}
return postidRadioButton1;
} | [
"public radio_button() {\n initComponents();\n }",
"private void initButtons(){\n bGrad = new JRadioButton(\"\");\n bPal = new JRadioButton(\"\");\n ButtonGroup bg = new ButtonGroup();\n bg.add(bGrad);\n bg.add(bPal);\n ActionListener actionRefV = EventHa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Visit a Note node | public Object visit(Note node){
return null;
} | [
"INote nextNote();",
"@Override\n public Object visit(Sequence node){\n this.currentSequencePatter = \"\";\n node.getNotesList().accept(this);\n this.sequenceMap.put(node.getName(), this.currentSequencePatter);\n this.currentSequencePatter = \"\";\n return null;\n }",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a card from the deck | public Card dealCard() {
return deck.remove(0);
} | [
"void removeCard(Card card){\n cards.remove(card);\n }",
"public void removeCard(Card card) {\n hand.cards.remove(card);\n //System.out.println(\"Size after remove\" + hand.cards.size());\n }",
"public void discardCard(Card card) {\n cards.remove(card);\n }",
"public void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests isSorted() func with a tree which only has a root node | @Test
void isSortedB() {
BinTree tree = new BinTree(n1);
assertTrue(tree.isSorted());
} | [
"private boolean isSorted(Node node) {\n if (node == null || node.next == null) {\n \treturn true;\n } else {\n \tif (node.data.compareTo(node.next.data) > 0)\n \t\treturn false;\n \treturn isSorted(node.next);\n }\n }",
"private static boolean isBST(Node root) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the overlay with graph bounds and initial parabola | public ParabolaOverlay(double minX, double maxX, double minY, double maxY, double a, double b, double c) {
this.minX = minX;
this.maxX = maxX;
this.minY = minY;
this.maxY = maxY;
this.a = a;
this.b = b;
this.c = c;
} | [
"private void constructNode(GL2 gl, int components, float[] fractions, Color[] colors) {\n //direction of node (up), on z axis\n VectorO Vdir = new VectorO(0, 0, 1);\n //horizontal vector, that means in plane perpendicular on Vdir,\n //this vector rotates itself around Vdir\n Vect... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper method to generate random vehicle registration. | public String generateRandomReg ( final int year ) {
//Generate random registration - in form 2 digit year - then 5 random letters.
String alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
//This is our loop - till we get unique reg.
boolean isUniqueReg = true;
String randomReg = "" + yea... | [
"public void randomGenerate() {\r\n int random = (int) (Math.random() * 4 + 0);\r\n if (random == this.num) {\r\n int randomX = (int) (Math.random() * width + 0);\r\n Robot r1 = new Robot(randomX, (height - 1), fuel, p1);\r\n R1.add(r1);\r\n }\r\n }",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case number: 61 /Coverage entropy=1.3571751325367705 | @Test(timeout = 4000)
public void test061() throws Throwable {
XPathLexer xPathLexer0 = new XPathLexer("wZmtOF");
Token token0 = xPathLexer0.slashes();
Token token1 = xPathLexer0.comma();
assertEquals(32, token1.getTokenType());
Token token2 = xPathLexer0.dots();
assertEqu... | [
"@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n String string0 = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by tim on 5/22/15. | public interface IPrintSupplier
{
//TODO: Build this out more so that it's standardized across print suppliers.
/**
* Upload a model to a given supplier.
*
* @param troveItemId Persistent Item identifier pointing to the object stored with Trove that contains the
* approp... | [
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\n public void extornar() {\n \n }",
"protected void method_5557() {}",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n }",
"protected void mo4791d() {\n }",
"public void mo28221a() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ / / / | public void findByBornplace(ArrayList<Node> list, Node node, String bornplace)
/* */ {
/* 372 */ if (node == null)
/* 373 */ return;
/* 374 */ if (node.getBornplace().indexOf(bornplace) != -1)
/* 375 */ list.add(node);
/* 376 */ findByBornplace(list, node.getLeftNode(), bornplace);
... | [
"public static void main (String arg[]){\n\tSystem.out.println(\" ( ) ( ( \"); \n\n\tSystem.out.println(\" ( )\\\\ ) ( /( ( )\\\\ ) ( )\\\\ ) \");\n\t\n\tSystem.out.println(\" )\\\\ (()/( ( )\\\\()) )\\\\ (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The class holding records for this type | @Override
public Class<TmExprRecord> getRecordType() {
return TmExprRecord.class;
} | [
"@Override\n public Class<ClazzRecord> getRecordType() {\n return ClazzRecord.class;\n }",
"@Override\r\n\tpublic Collection<RecordType> getRecords() {\r\n\t\treturn records.values();\r\n\t}",
"public ProviderRecords(){\n\t\tproviderDetails = new ArrayList<Provider>();\n\t}",
"@Override\n publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Encodes an "Object" and returns the encoded content as an Object. The Objects here may just be byte[] or Strings depending on the implementation used. | Object encode(Object source) throws UraEncoderRuntimeException; | [
"Object encode( Object object ) throws EncoderException;",
"@Override\n byte[] encode(final Object obj);",
"void encode(final Object obj, final OutputStream stream);",
"public interface Encoder\n //////////////////////////////////////////////////////////////////////\n /////////////////////////////... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
protected void onPreExecute() {
super.onPreExecute();
progressDialog = new ProgressDialog(MainActivity.this);
progressDialog.setMessage("Cancelling task...");
progressDialog.setIndeterminate(true);
progressDialog.show();
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Start the ProfileChangeRunner class and schedule its next execution. After that the changes are automatically scheduled one after each other. | public static void start(ScheduledExecutorService executor, SummaryLogger summaryLogger, Config config, Client client) {
Queue<ProfileItem> queue = new LinkedList<>(config.getProfile().getFlow());
Context context = new Context(executor, summaryLogger, queue, config.getProfile().getBurstLimit(), client);... | [
"public void scheduleStartProfiles() {\n FgThread.getHandler().post(new Runnable() {\n public final void run() {\n UserController.this.lambda$scheduleStartProfiles$8$UserController();\n }\n });\n }",
"public void startProfiles() {\n List<UserInfo> profi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .com.deerengine.pokemongo.protocol.ResponseEnvelop.MapPokemonProto MapPokemon = 10; | public com.deerengine.pokemongo.protocol.PokemonProto.ResponseEnvelop.MapPokemonProto getMapPokemon(int index) {
if (mapPokemonBuilder_ == null) {
return mapPokemon_.get(index);
} else {
return mapPokemonBuilder_.getMessage(index);
}
} | [
"POGOProtos.Rpc.PokemonProtoOrBuilder getDummyPokemonOrBuilder();",
"POGOProtos.Rpc.BuddyPokemonProto getBuddyPokemonProto();",
"POGOProtos.Rpc.HoloPokemonId getPokemonType();",
"POGOProtos.Rpc.PokemonProto getPokemonEggs(int index);",
"com.alex.game.player.PlayerProto.PlayerPBOrBuilder getPlayerPBOrBuilder... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
arg1 and arg2 are the variables i.e username and password. these values are passed from feature file | public void ContactEmailAndName(String arg1,String arg2) throws InterruptedException
{
Thread.sleep(1000);
contactemail.clear();
//Sending the keys with the help of variable of Emailid
contactemail.sendKeys(arg1);
Thread.sleep(1000);
contactname.clear();
//Sending the keys with the help of va... | [
"@When(\"User login into application with {string} and password {string}\")\n\t\tpublic void user_login_into_application_with_and_password(String arg1, String arg2) {\n\t\t System.out.println(\"String1=\"+arg1);\n\t\t System.out.println(\"String1=\"+arg2);\n\t\t}",
"@When(\"^User login into application with u... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required uint32 networkAddress = 3; (uint16) short Address | public int getNetworkAddress() {
return networkAddress_;
} | [
"private short getCheckedValue(long address) {\n if (address >= handlerBlock.getAddressEnd()) {\n return 0x34FF;\n } else {\n return (short) (data.get((int) address) & 0xFF);\n }\n }",
"short GetInt16(int index);",
"public static int read16(int address, boolean signed){\n\t\t_in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
read data from txt file | public void initList(){
try {
Scanner scan = new Scanner(openFileInput("list.txt"));
while (scan.hasNextLine()) {
String line = scan.nextLine();
todoData.add(line);
}
}catch(Exception e){
e.printStackTrace();
}
} | [
"public synchronized void readData() {\n try {\n File file = new File(\"file.txt\");\n FileInputStream fis = new FileInputStream(file);\n StringBuffer stringBuffer = new StringBuffer();\n while (fis.available()>0){\n stringBuffer.append((char)fis.re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Value injected by FXMLLoader | @FXML
void doAnalizzaAeroporti(ActionEvent event) {
txtResult.clear();
try {
Long start = System.currentTimeMillis();
model.createGraph(Double.parseDouble(distanzaMinima.getText()));
Long end = System.currentTimeMillis();
// Log
System.out.println(String.format("Il proc... | [
"private Object initController() {\n fxmlParent.get();\n return loader.get().getController();\n }",
"@FXML\r\n private void initialize() {\r\n \r\n }",
"private void pass(String fxmlFile, String parameterToPass) throws IOException {\n FXMLLoader loader = new FXMLLoader(getClass()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column lb01_pt.lbt83_urikakemeisai.gyotaiflag | public String getGyotaiflag() {
return gyotaiflag;
} | [
"public String lagGaupeId() { // metode for å lage en id for gaupe\t\t\t\t\t\t \n\t\tint j = GaupeTabell.size(); //setter j's verdi til ArrayList strl\n\t\tj++; //øker j\n\t\tString id = \"G\" + j; //lager id til dyret\t\t\n\t\treturn id; //returner id'n\n\t}",
"public Long getXiaoliang() {\n return xiaoli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ fork check compute task thread | public abstract void forkCctThread(); | [
"@Override // java9.util.concurrent.ForkJoinTask\n public final boolean exec() {\n compute();\n return false;\n }",
"@Override // java.util.concurrent.ForkJoinTask\n public final boolean exec() {\n compute();\n return false;\n }",
"@Override\n\tprotected Long compute() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated string tags = 4; | public int getTagsCount() {
return tags_.size();
} | [
"@Test\n public void test3() {\n String input = \"<tagz/>\" + \n \"<tag ><x>элемент 1</x></tag >\" +\n \"<tag att1=\\\"test1\\\" att2=\\\"test2\\\"\\t/>\\n\" +\n \"<tag attrib=\\\"test\\\" />\";\n String output[] = {\n \"<tag ><x>элемент 1</x></ta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public int getQuantaValue(IBlockAccess world, int x, int y, int z) {
return 0;
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Test method for 'servicio.AppServicio.deleteIdioma(int)' | public void testDeleteIdiomaInt() {
} | [
"public void deletePuesto(Integer id) throws Exception;",
"public void eliminarServicio(int idServicio) throws DataBaseException;",
"public void delete(Integer idCarte);",
"int deleteByExample(InteraccionescomponentesExample example);",
"public void deleteById(Integer id) throws Exception;",
"@Test\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string username = 1; | public java.lang.String getUsername() {
java.lang.Object ref = username_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8()... | [
"public void setUsername(String str) {\n\tthis.username=str;\n}",
"public void getUser(String input) {\n getUsername = input;\n }",
"public String getStrusername() {\n return strusername;\n }",
"void setUsername(String user){\n \tthis.user = user;\n }",
"public static String setTex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Most recent Java reserved word map<string, .map_for_proto2_test.ReservedAsMapFieldWithEnumValue.SampleEnum> enum = 9; | public map_test.MapForProto2TestProto.ReservedAsMapFieldWithEnumValue.SampleEnum getEnumOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, java.lang.Integer> map =
internalGetEnum().getMap();
if (!map.cont... | [
"MapEnumElementType getMapEnumElement();",
"public java.util.Map<String, NestedEnum>\n getMapStringEnumMap() {\n return internalGetAdaptedMapStringEnumMap(\n internalGetMapStringEnum().getMap());}",
"private static Map<String, ParticipationRoleType> makeEnumFromNameMap()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes the menu with all menu items. | private void init()
{
this.add(copyMenuItem);
this.addSeparator();
this.add(closeMenuItem);
this.copyMenuItem.setName("copy");
this.closeMenuItem.setName("service.gui.CLOSE");
this.copyMenuItem.addActionListener(this);
this.closeMenuItem.addActionListener(... | [
"private void initializeAllMenus(){\r\n\t\tlistOfMenu.clear();\r\n\t\tlistOfMenu.add(new MenuWelcomeGUI(jFrame, program));\r\n\t\t\r\n\t\tmenuSettingsGUI = new MenuSettingsIntallGUI(program);\r\n\t\tlistOfMenu.add(menuSettingsGUI);\r\n\t}",
"Menu() {\n menuDetails = getCommandsFromFile();\n menus = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Borra una seta existente | @GET
@Path("/deleteSeta/{id}")
@Produces({ MediaType.APPLICATION_JSON })
public Response deleteSeta(@PathParam("id") Long id) {
try {
setaDao.delete(id);
} catch (Exception e) {
logger.error("Se ha producido un error al intentar borrar una seta", e);
throw new ErrorException("Error de base de datos", -1... | [
"public void createSet();",
"boolean getSet();",
"public void setExists() {\n exists = true;\n }",
"@Test\n public void contains() {\n assertTrue(mySet.size() == 0);\n\n mySet.add(5);\n boolean isIt = mySet.contains(5);\n boolean isIt2 = mySet.contains(10);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Color c=g.getColor(); g.setColor(Color.RED); g.fillOval(x,y,WIDTH,HEIGHT); g.setColor(c); | public void paint(Graphics g){
if(!living){ tf.bullets.remove(this);}
switch(dir){
case LEFT:
g.drawImage(ResoureMgr.bulletL,x,y,null);
break;
case RIGHT:
g.drawImage(ResoureMgr.bulletR,x,y,null);
break;
... | [
"public void paint(Graphics g) {\nColor yellow = new Color(255,255,0);\n g.setColor(yellow);\n g.fillOval(x-7,y-7,15,15);\n}",
"public void paint(Graphics g)\r\n\t{\n\t\tColor ob = new Color(80,70,100);\r\n\t\tg.setColor(ob);\r\n\t\tg.drawOval(100,90,100,200);\r\n\t\tg.fillOval(100,90,100,200);//to fill color b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the account status to verified | public void setAccountVerified(boolean accountVerified) {
this.accountVerified = accountVerified;
} | [
"public void setStatus(int status) {\n\t\t_videoUserContactEntry.setStatus(status);\n\t}",
"public void setAccountStatus(String accountStatus) {\n\t\tthis.accountStatus = accountStatus;\n\t}",
"public void setVerifyStatus(String verifyStatus) {\n this.verifyStatus = verifyStatus;\n }",
"public void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end of displayArray this method adds up all the values in the array | public static void sum(int[] a) {
int sum = 0;
for (int i = 0; i < array.length; i++) {
sum += a[i];
} // end of for
System.out.println(sum);
} | [
"private void sumArrayJButtonActionPerformed() {\n // declare and initialize array\n int[] array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};\n int total = 0;\n\n // sum the array elements by enhanced for loop\n for (int index : array) {\n total += index;\n }\n\n //... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
bindingGroup = new org.jdesktop.beansbinding.BindingGroup();
entityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persis... | [
"public StForm() {\n initComponents();\n }",
"public CineForm() {\n initComponents();\n }",
"public javaform() {\n initComponents();\n }",
"public EditDemographicForm() {\n initComponents();\n }",
"public FightForm() {\n initComponents();\n }",
"public For... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
note that the sinks should be threadsafe! | public Worker(ExecutorService es, long cycleTime, JmxSink sink) {
this.es = es;
this.cycleTime = cycleTime;
this.sink = sink;
} | [
"@Override\n\tpublic void msgAtSink() {\n\t\t\n\t}",
"private void initOutputCollector() {\n \n \t\tboolean fwdCopyFlag = false;\n \t\t\n \t\t// create output collector\n \t\toutput = new OutputCollector<Key, Value>();\n \t\t\n \t\t// create a writer for each output\n \t\tfor (int i = 0; i < config.getNumOutputs(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getPrintServices Get Default Print Service | public static PrintService getDefaultPrintService()
{
return PrintServiceLookup.lookupDefaultPrintService();
} | [
"public static PrinterData[] getPrinterList() {\r\n\tif (true) return new PrinterData[0]; // printing on X is currently unimplemented\r\n\t\r\n\t/* Connect to the default X print server */\r\n\t//byte [] buffer = Converter.wcsToMbcs(null, XDefaultPrintServer, true);\r\n\t//int pdpy = OS.XOpenDisplay(buffer);\r\n\ti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method adds header parameters to the request | public void addHeaders(String headerName, String headerValue) {
headers.add(headerName, headerValue);
} | [
"private void setRequestHeaders(RestParams params, HttpUriRequest request) {\n if (params.getSessionId() != null) {\n request.setHeader(\"auth\", params.getSessionId());\n }\n request.setHeader(\"X-API-Version\", String.valueOf(params.getApiVersion().getValue()));\n request.se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the collation name for the given collation key. | String getCollationNameForKey(String collationKey); | [
"public static java.lang.String getCollationKey(java.lang.String name) { throw new RuntimeException(\"Stub!\"); }",
"public String getName() {\n // GTK L&F calls this method before the constructor has finished,\n // so we can't do a lookup with a null key.\n if (_key == null)\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by catmo_000 on 11/29/2015. | public interface ISimpleDuck {
void quack();
void tryCharge();
} | [
"@Override\n public void extornar() {\n \n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n }",
"private static void EX5() {\n\t\t\r\n\t}",
"public void mo5201a() {\n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
jhipsterneedleentityaddfield JHipster will add fields here, do not remove | public UUID getId() {
return id;
} | [
"@Override\n public void editNewlyAddedField() {\n }",
"public void createFields() {\n }",
"public EntityInfoBuilder<T> addField(String fieldPath) {\n String columnName = fieldPath.toLowerCase().replaceAll(\"\\\\.\", \"_\");\n return addField(fieldPath, columnName, false);\n }",
"@Ov... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lock a list of principals for writing. | public static void createWriteLock(String[] principalUniqueIDs) throws TechnicalLockException, com.sap.engine.frame.core.locking.LockException {
final String method = "createWriteLock(String)";
String[] names = getNamespaces(principalUniqueIDs.length);
String[] arguments = LockManager.escap... | [
"public void testMultiLock() throws Exception {\n JESyncClient jesync = new JESyncClient(\"127.0.0.1:11400\");\n \n JESyncLock lock = jesync.lock(\"test\", 1, 1, 20);\n assertTrue(lock.isGranted());\n \n int n = 5;\n for(int i=0;i<n;i++){\n JESyncLock lock... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Concat__Group__0" $ANTLR start "rule__Concat__Group__0__Impl" InternalJsonDsl.g:5579:1: rule__Concat__Group__0__Impl : ( 'CONCAT' ) ; | public final void rule__Concat__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalJsonDsl.g:5583:1: ( ( 'CONCAT' ) )
// InternalJsonDsl.g:5584:1: ( 'CONCAT' )
{
// InternalJsonDsl.g:5584:1: ( 'CON... | [
"public final void rule__ConcatOp__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.webgme_mtl.ui/src-gen/org/xtext/example/webgme/ui/contentassist/antlr/internal/InternalMTL.g:4961:1: ( rule__ConcatOp__Group__... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shutdown the scheduler. It would be invoked only one time when server shuts down | public void shutdown(); | [
"public static void shutdown() throws SundialSchedulerException {\r\n\r\n logger.debug(\"shutdown() called.\");\r\n\r\n try {\r\n getScheduler().shutdown();\r\n scheduler = null;\r\n } catch (Exception e) {\r\n throw new SundialSchedulerException(\"COULD NOT SHUTDOWN SCHEDULER!!!\", e);\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the key that the name maps to. If the key is null, it will return the default value NOTE: If the value is a double, it will return a Double object, not a primitive. To get the primitive, use getDouble | public Object getValue(String key, Object defaultValue) {
try {
return m_server.getValue(m_absoluteKeyCache.get(key));
} catch (NoSuchElementException e) {
return defaultValue;
}
} | [
"Key get(String name);",
"Object getKey(Object mappingKey, Object value, Object defaultKey);",
"public java.lang.String getKeyName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Testing concatenation of PV VMs into a string (allowableTextChoices) | @Test
public void testCreateAllowableTextChoices() {
String expectedResult = "PvValue1|PvValue2|PvValue3|PvValue4";
List<String> pvVmList = Arrays.asList("PvValue1", "PvValue2", "PvValue3", "PvValue4");
String allowableTextChoices = ValidatorService.createAllowableTextChoices(pvVmList);
assertEquals(expectedRe... | [
"public String getChoice(){\r\n\t\treturn \"tetriminos: \" + hasTetriminos() + \" triminos: \" + hasTriminos();\r\n\t\t\r\n\t}",
"@Ignore\n\t@Test\n\tpublic void testVmeContainRelevantText() {\n\t\tassertTrue(service.vmeContainRelevantText(vme, \"Foo1\"));\n\t\tassertTrue(!service.vmeContainRelevantText(vme2, \"F... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
execute an sql update, returning the status Usage: update("UPDATE STATEMENT"); | public int update(String updateString, int retryNum)
throws SQLException {
lastSQL = updateString;
int responseCode = -1;
if ((inUse) && (ready())) {
try {
sqlserver = true;
lastQueryTime = System.currentTimeMillis();
if (myStat... | [
"public void executeUpdate(String sqlString);",
"public int executeUpdate() throws SQLException;",
"int executeUpdate() throws SQLException;",
"public abstract int executeUpdateBySql(String sql) throws QueryException;",
"public int executeUpdate(String sql){\n Statement stm = null;\n if (hasConnection... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Compare__Group__1__Impl" $ANTLR start "rule__Compare2__Group__0" InternalRpgleParser.g:5910:1: rule__Compare2__Group__0 : rule__Compare2__Group__0__Impl rule__Compare2__Group__1 ; | public final void rule__Compare2__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalRpgleParser.g:5914:1: ( rule__Compare2__Group__0__Impl rule__Compare2__Group__1 )
// InternalRpgleParser.g:5915:2: rule__Compare2__Group__0__I... | [
"public final void rule__Compare__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.upb.llvm_parser.ui/src-gen/de/upb/llvm_parser/ui/contentassist/antlr/internal/InternalLLVM.g:17178:1: ( ( ( rule__Compare__Gro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENLAST:event_exampleLabelMouseClicked Move the selected row one row up. | private void moveUpJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_moveUpJMenuItemActionPerformed
int selectedRow = patternDesignTable.getSelectedRow();
int selectedColumn = patternDesignTable.getSelectedColumn();
pattern.swapRows(selectedRow, selectedRow - 1);
... | [
"public void moveSelectionUp() {\n if (mACPanel.isShowing()) {\n mACPanel.moveUp();\n return;\n }\n Cursor c = getCursor();\n int line = c.getLeftLine();\n int column = c.getLeftColumn();\n if (line - 1 < 0) {\n line = 1;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper method that returns the sets associated with an exercise | private List<ExerciseSubset> selectSets(int exerciseId) {
ArrayList<ExerciseSubset> sets = new ArrayList<ExerciseSubset>();
String query = "SELECT ExerciseSubsets.id, ExerciseSubsets.weight, ExerciseSubsets.numReps " +
"FROM ExerciseSubsets " +
"LEFT OUTER JOIN SubsetsTo... | [
"public java.util.Set getUses();",
"private ArrayList<AbLog> chosenGroup(ArrayList<AbLog> exercises, int muscleGroup) {\n ArrayList<AbLog> subset = new ArrayList<>();\n\n for (AbLog entry : exercises) {\n if (entry.getMuscleGroup() == muscleGroup) {\n subset.add(entry);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Starts the selected algorithm as a thread. | public void play(boolean videoAlreadyStarted, String algorithmChoice, String url){
if (!videoAlreadyStarted) {
// This block configures the logger with handler and formatter
try {
fh = new FileHandler(tempFolderPath + File.separator + "DashAlgorithmLog.log");
... | [
"public void startThread() {\n\t\tstart();\t\t\n\t}",
"public void start() {\n if (thread == null) {\n thread = new Thread(new MainRunner());\n thread.start();\n }\n }",
"public void start() {\n\trunner = new Thread(this);\n\trunner.start();\n }",
"public void start()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Restart service when phone is restarted | @Override
public void onReceive(Context context, Intent intent) {
if(intent.getAction() != null){
if((intent.getAction().equals("android.intent.action.BOOT_COMPLETED")
|| intent.getAction().equals("android.intetn.action.QUICKBOOT_POWERON")
|| intent.getAction().equals("co... | [
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Log.d(\"RestartAppService\", \"onStart WakeUpService\");\n if(Demo.isAppClosed){\n restartApp();\n }\n return super.onStartCommand(intent, flags, startId);\n }",
"@Override\n protected... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets number of bombs on board | public int getBombCount() {
return m_bombCount;
} | [
"int getNumBombs();",
"int getBlackPieces() {\n int count = 0;\n for (PieceColor piece : _board) {\n if (piece == BLACK) {\n count += 1;\n }\n }\n return count;\n }",
"int findBoardCount();",
"public int countQuantityOfPieceInBoard() {\r\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getting CreateAAActivityLog value from AAS SET file. | public abstract String getCreateAAActivityLog() throws MitchellException; | [
"public String getContactActivityLog() {\n return contactActivityLog;\n }",
"public static String getLog2Title(Activity activity) {\n \treturn getLogTitle(activity, getTextString(activity, R.string.log_file_number_2));\n\t}",
"LogSetup getCurrentLogSetup();",
"@Override\r\n\tpublic int getActivityInfo(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert the given object to string with each line indented by 4 spaces (except the first line). | private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
} | [
"private String toIndentedString(Object o)\n/* */ {\n/* 607 */ if (o == null) {\n/* 608 */ return \"null\";\n/* */ }\n/* 610 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }",
"private String toIndentedString(Object o)\n/* */ {\n/* 164 */ if (o == null) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if this PriceStep overlaps with another PriceStep | public boolean overlap(PriceStep step) {
if (endPrice != 0 && step.endPrice != 0) {
if (startPrice >= step.endPrice) return false;
if (endPrice <= step.startPrice) return false;
return true;
} else if (endPrice == 0 && step.endPrice == 0) {
return true;
} else if (endPrice == 0) {
return startP... | [
"public boolean overlap(Period p) {\n\t\t\n\n\t\treturn (this.start == p.stop || this.stop == p.start) || (this.start == p.start || this.stop == p.stop); // TODO\n\t}",
"public boolean isOverlap(TimeSpan ts){\n for(TimeSpan span : reservationTimes.inorder()){\n if(span.equals(ts)) return true;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sends a message with custom elements to the output channel. | public void utterElements(Object[] elements) {
utterElements(elements, null);
} | [
"public void write(Object msg) {\n channelPipeline().write(msg);\n }",
"@ProcessElement\n public void processElement(ProcessContext c) throws IOException {\n OutgoingMessage message =\n new OutgoingMessage(CoderUtils.encodeToByteArray(getCoder(), c.element()),\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public void onClick(DialogInterface dialog, int which) {
System.exit(0); //退出应用程序
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The interface Main activity view. | public interface MainActivityView {
/**
* Guest Menu.
*/
void guestMenu();
/**
* Dentist Menu.
*/
void dentistMenu();
} | [
"public MainView() {\n \tMainPresenter mainPresenter = new MainPresenter(this); //TODO: Darf/soll ich das?\n \tHorizontalLayout navigation = new HorizontalLayout(); \n \tnavigation.add(new Button(\"Entry\",\n event -> clickButton(\"Entry\"))); \n \tnavigation.add(new Button(\"Diary\", \n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |