query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
This method was generated by MyBatis Generator. This method sets the value of the database column CTS_MERCHANT.MAX_AMOUNT | public void setMAX_AMOUNT(BigDecimal MAX_AMOUNT) {
this.MAX_AMOUNT = MAX_AMOUNT;
} | [
"public void setMax_amount(BigDecimal max_amount) {\n this.max_amount = max_amount;\n }",
"public void setMaxAmount(Long maxAmount) {\n this.maxAmount = maxAmount;\n }",
"public M csarAmountMax(Object max){this.put(\"csarAmountMax\", max);return this;}",
"public int getMaxAmount() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Takes in a node and then paints all its neighbours in different colors depending on their distance value | public static void PaintNeighbours(Node node) {
for(Node n : node.getNeighbours()) {
System.out.println(n.getName());
// if(n.getIsWalkable()) {
if (node.getfCost() == 1) {
n.setColor(Color.black);
} else {
... | [
"public void setNeighbourColor(Color color){\n this.neighbourColor = color;\n }",
"private void drawNodes(Location origin, double scale) {\n if (nodeMap != null) {\n for (Node node : nodeMap.values()) {\n Point pt = node.getLocation().asPoint(origin, scale);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .CMsgDOTAFantasyLeagueEditInfoResponse.EResult result = 1 [default = SUCCESS]; | DotaGcmessagesClientFantasy.CMsgDOTAFantasyLeagueEditInfoResponse.EResult getResult(); | [
"com.weizhu.proto.AdminExamProtos.UpdateExamQuestionResponse.Result getResult();",
"POGOProtos.Rpc.EditPokemonTagOutProto.Result getEditResult(int index);",
"public updateCusComTeam_result(updateCusComTeam_result other) {\n __isset_bitfield = other.__isset_bitfield;\n this.success = other.success;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
without incapsulation and POP | @Test
public void searchInGoogleTest() {
// утсановка драйвера для определённого драйвера браузера
// ChromeDriverManager.getInstance().version("2.30").setup();
// утсановка драйвера для последней верссии драйвера браузера
// ChromeDriverManager.getInstance().setup();
// Configu... | [
"public void popojed()\n {\n }",
"public E pop() {\r\n // Fill in.\r\n }",
"@Override\r\n\tpublic int pop() {\n\t\t\t\r\n\t\treturn 0;\r\n\t}",
"@Override\n\t\tprotected void swop() {\n\n\t\t}",
"public Object pop() throws StackException;",
"public int pop() {\n \n }",
"E pop( ) throws ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table trading_timer_listing | int updateByPrimaryKeyWithBLOBs(TradingTimerListingWithBLOBs record); | [
"@Override\r\n\tpublic String returnTableNames() {\n\t\treturn \"schedule\";\r\n\t}",
"@Override\n\tpublic List<ScheduledFlightDto> viewScheduledFlight() throws SQLException {\n\t\tpst = connection.prepareStatement(\"select *from scheduledflight \");\n\t\t\n\t\trs = null;\n\t\trs = pst.executeQuery();\n\t\tschedu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Take the default entries from the parameter defaults and set them into the TextFields of the dialog. | private void setDefaults(Vector defaults)
{
Component deftmp = null;
Iterator defaultEl = defaults.iterator();
int i = 0;
while (defaultEl.hasNext())
{
deftmp = Fields.getComponent(i);
if (deftmp.getClass() == JTextField.class)
{
... | [
"public void setInitialValues() {\n\t\tidField.setText(\"\"); fnameField.setText(\"\"); lnameField.setText(\"\"); extnameField.setText(\"\"); mnameField.setText(\"\");\n\t\tcourseField.setText(\"\"); yrlevelField.setText(\"\"); ffnameField.setText(\"\"); fmnameField.setText(\"\"); flnameField.setText(\"\");\n\t\tmf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create backup files for notes. | public void backupNote() {
BackupTool.getInstance().exportNotes();
if (isConnected) {
mDropbox.uploadNotes();
if (mDrive != null && mDrive.getDrive() != null) {
mDrive.getDrive().saveNotesToDrive();
}
}
} | [
"private void saveBackup(ArrayList<TaskData> tasks) throws IOException {\n\t\tFile backupFile = new File(Constants.DEFAULT_BACKUP_DESTINATION);\n\t\tBufferedWriter bWriter = new BufferedWriter(new FileWriter(backupFile));\n\n\t\tfor (TaskData existingTask : tasks) {\n\t\t\tbWriter.append(setFormat(existingTask));\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is Constructor of Toyota class this methos calls parent constructer | Toyota(final long price,final String modal,final int id){
super(modal,id,price);
} | [
"public ShortTermCar(){\n super();\n }",
"public Tanh() {\n\t}",
"Traitement()\r\n {\r\n \r\n }",
"public Tbsloaidon19() {\n super();\n }",
"public PassengerCar() {\n\t\tsuper();\n\t}",
"public car(){\n\t\tthis(\"white\",250,4.0,\"Toyota\");\n\t\t\n\t}",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays the total score for Team A in the team_a_score TextView | public void displayForTeamA(int score) {
TextView teamAScoreTextView = (findViewById(R.id.team_a_score));
teamAScoreTextView.setText(String.valueOf(score));
} | [
"public void displayForTeamA(int score) {\n TextView scoreTeamAView = (TextView) findViewById(R.id.team_a_score);\n scoreTeamAView.setText(String.valueOf(score));\n }",
"public void displayForTeamA(int score, String Team) {\n if (Team.equals(\"teamA\")) {\n TextView scoreView = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: d | static String m5607d(JSONArray jSONArray, int i) {
return jSONArray.optString(i);
} | [
"private void d() {\n }",
"public void mo1857d() {\n }",
"public void setD(String d) {\n this.d = d;\n }",
"public boolean d() {\n }",
"protected void d()\r\n/* 49: */ {\r\n/* 50:57 */ super.d();\r\n/* 51: */ }",
"protected void mo4791d() {\n }",
"@Override\n\tpublic voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks if a table with the given name exists (or rather whether it can be accessed). | public boolean existsTable(String table) {
ResultSet rs = null;
try {
rs = query("SELECT * FROM " + table + " LIMIT 1");
} catch (SQLException ex) {
Announce.debug(ex);
return false;
}
if (rs != null) Database.close(rs);
return true;
} | [
"private boolean doesTableExist(SQLiteDatabase db, String name) {\n boolean exists = false;\n Cursor cursor = db.rawQuery(\n \"select DISTINCT tbl_name from sqlite_master where tbl_name = '\"+name+\"'\", null);\n if (cursor != null) {\n if (cursor.getCount() > 0) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void writeBoolean(boolean arg0) throws IOException {
} | [
"@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"
]
]
}
} |
RECUPERER UN HOTEL PAR L'ID | @RequestMapping(value="searchHotForm", method=RequestMethod.GET)
public ModelAndView affFormRechHot(){
return new ModelAndView("searchHot", "hSearch", new Hotel());
} | [
"Declaracao getId();",
"public int getId() {return posisjon;}",
"public int getId_Persona_Recibe(){\r\n return localId_Persona_Recibe;\r\n }",
"ErgoId getId();",
"public int getId()\r\n/* 88: */ {\r\n/* 89:104 */ return this.idDetalleGuiaRe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ce getter permet de recuperer au besoin le niveau de l'entraineur | public int getNiveau() {
return niveau;
} | [
"public CiudadNodo getOrigen() {\r\n \t return origen;\r\n \t }",
"public String getOrdenante()\r\n/* 388: */ {\r\n/* 389:615 */ return this.ordenante;\r\n/* 390: */ }",
"public String getNomEmprunteur() {\n \treturn nomEmprunteur;\n }",
"public java.lang.String getNombreRepre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a cursor wrapper. | public CategoryCursorWrapper(Cursor cursor) {
super(cursor);
} | [
"public SensorCursorWrapper(Cursor cursor) {\r\n super(cursor);\r\n }",
"public CursorWrapperClientes(Cursor cursor) {\n super(cursor);\n }",
"public ProfileCursorWrapper(Cursor cursor) {\n super(cursor);\n }",
"public MovieDetailCursorWrapper(Cursor cursor) {\n super(curs... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes jButton | private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setPreferredSize(new Dimension(100, 24));
jButton.setText("Run");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
Vector<String> agen... | [
"private void initJButtons() {\n\t\tstart = new JButton(\"Start\");\n\t\tstart.setFont(font);\n\t\tstart.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\ttry {\n\t\t\t\t\tstartButtonEvent(evt);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated float int_scale = 4; | public Builder addIntScale(float value) {
ensureIntScaleIsMutable();
intScale_.addFloat(value);
onChanged();
return this;
} | [
"int getScalef();",
"public int getB_I_Scale() {\n //unsigned\n return data.get(217);\n }",
"public static float scalb(float paramFloat, int paramInt) {\n/* 2333 */ paramInt = max(min(paramInt, 278), -278);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public long getItemId(int position) {
return position;
} | [
"@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"
]
]
}
} |
Registers the table with a parent table. When updates are made to the parent table, updates to child entities nested in the JSON string will be made. For example, pattern stops and shape points use this method to point to the pattern table as their parent. Currently, an update to either of these child tables must be ma... | private Table withParentTable(Table parentTable) {
this.parentTable = parentTable;
return this;
} | [
"void setParentPropertyTable(final PropertyTable table);",
"@Override\n\tpublic void initTable(ITable subtable) {\n\t\t_table = subtable;\n\t\tupdateTable();\n\t}",
"void setParent(Schema parent) {\n this.parent = parent;\n }",
"public /*override*/ void GetObjectData(SerializationInfo info, Streamin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method overrides the default onCreate method for Super Class Activity | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_touchlogger);
Toolbar toolbar = callToolBar();
getSupportActionBar().setDisplayShowHomeEnabled(true);
NavigationDrawerFragment drawerFragment
... | [
"protected void onCreate() {}",
"@Override public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate () {\n super.onCreate();\n }",
"@Override\n protected void onCreate();",
"public void onCreate() {\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: b | private void m5703b(int i, String str, Object obj, int i2) {
Object[] objArr = this.f6002c;
if (objArr == null) {
throw new IllegalStateException();
}
if (obj == null) {
obj = UniqueTag.f6691b;
}
int i3 = (i - 1) * 2;
synchronized (this) {
... | [
"public abstract T zzs(B b2);",
"public void b(ByteOrder bo) {\n/* 72 */ if (this.i != bo) {\n/* 73 */ this.i = bo;\n/* 74 */ this.h = a(bo);\n/* */ } \n/* */ }",
"public void doSth(B b){\n\n }",
"public abstract void mo14156a(B b, int i, int i2);",
"@Override\n\tpublic v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required .nwkMgrCmdId_t cmdId = 1 [default = NWK_CHANGE_NWK_KEY_REQ]; don't change this field | public boolean hasCmdId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
} | [
"void addKeyUpdateCommand(final List<DatanodeCommand> cmds,\n final DatanodeDescriptor nodeinfo) {\n if (isBlockTokenEnabled() && nodeinfo.needKeyUpdate) {\n cmds.add(new KeyUpdateCommand(blockTokenSecretManager.exportKeys()));\n nodeinfo.needKeyUpdate = false;\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() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
txtNomeMedicos = new javax.swing.JTextField();
jLabel2... | [
"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"
]
]
}
} |
Updates the SkipNode on the left on the given level to the given SkipNodeIdentity | SkipNodeIdentity updateLeftNode(SkipNodeIdentity snId, int level); | [
"public void setLeft(Node left){}",
"@Override\n public void nodeLeft(GRAPH_TRAVERSE_TYPE traversalType, String traversalId,\n SNode currNode, SRelation<SNode, SNode> relation, SNode fromNode, long order) {\n }",
"public Node moveLeft() {\r\n\t\tint[] board = sta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a BreadthFirst object. The constructed object can be reused as many times as necessary. | public BreadthFirst() {
// The list where discovered nodes are stored
discovered = new ArrayList<>();
} | [
"public BTree() {\n this(DEFAULT_ORDER);\n }",
"protected BreadthFirstTraversal(Graph G) {\n super(G, new LinkedList<Integer>());\n }",
"public CircularFifoQueue() {\n this(32);\n }",
"public MyBTree() {\n root = new Node(0);\n }",
"public BPlusTree() {\r\n\t\tthis(DEFAULT_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the left value text for the entry | public void setLeftValue(String text)
{
this.leftValue = text;
} | [
"public String getLeftText() {\n\t\tif (null == fLeftText)\n\t\t\tfLeftText = \"\";\n\t\treturn fLeftText;\n\t}",
"public void setLeft(String newLeft) {\n\tleft = newLeft;\n\tcreateFooterString();\n }",
"public void setLeftSideValue(String propertyValue)\n {\n if (propertyValue == null)\n prop... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Log.i("lol", "Rotate started"); Tetromino copy = new Tetromino(current); | public boolean rotateRight()
{
current.rotate_right();
if (current.position_y + current.size_y >= container_y)
{
current.rotate_left();
return false;
}
int shift_left = 0;
if (current.position_x + current.size_x >= container_x)
sh... | [
"Rotor() { }",
"@Override\n public void rotate() {\n }",
"public V rotaten( V cossin );",
"@Override\n public void reRotate() {\n }",
"void rotate() {\n root.getChildren().remove(preview);\n\n Direction d = t.getDirection();\n Direction newDirection;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Predicate <= value ; | @SuppressWarnings("unchecked")
private Predicate toPredicateLessThanOrEqual(Root<T> root, CriteriaBuilder builder) {
Expression expression = getExpression(root);
if (expression.getJavaType().equals(java.util.Date.class)) {
if (criteria.getValue() instanceof String) {
retu... | [
"public Value gte(Value v);",
"static interface PredicateEvaluator {\r\n boolean evaluate(int patientValue, int threshold);\r\n }",
"private Node get_pred(int value) {\n Node ret = head;\n\n while (ret.next.value < value) {\n ret = ret.next ;\n }\n\n return ret ;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .protobuf.Login_User_Message login_User_Message = 2; | public com.zhihao.p2p_server.protobuf.Message.Login_User_MessageOrBuilder getLoginUserMessageOrBuilder() {
if ((dataBodyCase_ == 2) && (loginUserMessageBuilder_ != null)) {
return loginUserMessageBuilder_.getMessageOrBuilder();
} else {
if (dataBodyCase_ == 2) {
return (c... | [
"proto.LoginMessageProto.LoginMessageOrBuilder getLoginMessageOrBuilder();",
"network.message.ServerResponses.Login getLogin();",
"public void loginReceieved(LoginMessage m);",
"private Login(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }",
"private LoginResponseMsg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .hadoop.yarn.ReservationRequestProto reservation_resources = 1; | public org.apache.hadoop.yarn.proto.YarnProtos.ReservationRequestProto getReservationResources(int index) {
if (reservationResourcesBuilder_ == null) {
return reservationResources_.get(index);
} else {
return reservationResourcesBuilder_.getMessage(index);
}
} | [
"org.apache.mesos.v1.master.Protos.Call.ReserveResourcesOrBuilder getReserveResourcesOrBuilder();",
"buffers.ClientRequest.Request.RegistrationOrBuilder getRegOrBuilder();",
"akka.protobuf.ByteString getRequestedStatusBytes();",
"com.ubbcluj.amcds.myDalgs.communication.Protocol.ProcessIdOrBuilder getNewLeader... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remove item from list remove item from display | public void removeItem(Item tempItem){
toDoList.remove(tempItem);
TableDisplay.getItems().removeAll(tempItem);
} | [
"public void removeItem()\r\n\t{\n\t\tSystem.out.println(\"Which item do you want to remove?\");\r\n\t\tString requiredName = sc.nextLine();\r\n\r\n\t\t// remove item from list\r\n\t\tString temp = itemList.get(requiredName);\r\n\t\titemList.remove(temp);\r\n\r\n\t\tfor (int i = 0; i < itemList.size(); i++)\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column c_banner.status | public Integer getStatus() {
return status;
} | [
"public Integer getBannerStatus() {\n return bannerStatus;\n }",
"public Integer getStatus(){\n try{\n return this.getInt(\"status\");\n }catch(Exception e){}\n return null;\n }",
"public Integer getStatus(){\n\t\treturn this.status;\n\t}",
"sifnode.oracle.v1.Types... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines whether a row exists in score: 1,2,3 | private boolean hasRow(ArrayList<Integer> score) {
Collections.sort(score);
return (score.get(2) - score.get(1) == 1 && score.get(1) - score.get(0) == 1);
} | [
"boolean hasScoreCheck();",
"public boolean isUniqueNameandScore(String name, int score) {\n for (Score person: scores) {\n if (person.getName()== name && person.getScore() == score) {\n Log.i(\"nameuniqe\", \"not unique name score\");\n return false;\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Devuelve el valor de la carta para luego poder sumar los puntos | public Valor getValor(int i) {
return this.baraja[i].getValor();
} | [
"public Money getCartValue(){\n\t\tint total = 0;\n\t\t\n\t\tfor(Product p: cart){\n\t\t\tif(p.getPrice().getCurrency().getCode().equals(\"USD\")){\n\t\t\t\ttotal += p.getPrice().getAmount()*7;\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttotal += p.getPrice().getAmount();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new Money(new Currency... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles the HTTP GET method. | @Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | [
"@Override\n\tpublic void handleGET(CoapExchange exchange) {\n\n\t\t\n\t}",
"protected void doGet(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException {\r\n\t\tSystem.out.println(\"--> get\");\r\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse respo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: Kerning is slightly different from minecraft here, but it'll do for now. | public void setText(String text, final float baseX, final float baseY, final float baseZ, final boolean center, Vector4f color)
{
subMesh = new SubMesh();
float x = baseX;
float y = baseY;
float z = baseZ;
final float width = 1.0f / 10.0f;
final float height = width;
final float space = - 1.0f /... | [
"void mo29804K();",
"ING getWeiMod();",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"void mo3117k();",
"public void jatekMenet();",
"public int initializeKnime();",
"public void challenge2(){\r\n\r\n enigMach.addPlug('H','L');\r\n enigMach.addPlug('G','P');\r\n Reflector... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the Query of this request | public Map<String, Object> getQuery() {
return this.query;
} | [
"public java.lang.String getQuery() {\n return query;\n }",
"public String getQuery()\n {\n return query;\n }",
"public String getQuery() {\r\n\t\treturn _query;\r\n\t}",
"public String getQuery() {\r\n\t\treturn this.query;\r\n\t}",
"public String getQuery() {\n\t\treturn this.query;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MISCELLANEOUS Captures display image and saves to a file selected by the user, in JPEG format. | public void captureDialog() {
// get file where captured image should be saved
final File f = getSaveFile();
if (f == null) return;
// start new thread to capture image and save it to the file
final BasicSSCell cell = this;
Runnable captureImage = new Runnable() {
public void run(... | [
"public void saveIMG() throws IOException {\n if (images.isEmpty()) {\n JOptionPane.showMessageDialog(option0, \"You must load an image \"\n + \"into the program before saving!\");\n System.exit(0);\n }\n \n //JOptionPane.showMessageDialog(option0... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Starting state for searching | private int pickDirection() {
State start = null;
// We know the solution
if (leftExplored && rightExplored)
// Return next state
return path[pathPos++];
// If we need to run a search
else if ((exitLeftReached && exitRightReached) || pathPos == path.length) {
// Get left core of the map
int[] lbou... | [
"public boolean startSearch();",
"public void startSearch() {\n\tif (increment.isSelected() && (incSearchPos >= 0)) {\n \t repeatIncremental();\n \t return;\n \t}\n \tif (!searchField.hasFocus()) {\n \t searchField.setText(\"\");\n \t searchField.requestFocus();\n \t} else {\n \t if (increment.isSe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method below shows all the months with number of days greater than the specified value. | public void withGreaterNumberOfDays(int specifiedNumber){
for (Month m : Months.values()){
if (m.inDays > specifiedNumber){
System.out.println(m.toString());
}
}
} | [
"public List<Integer> afficheMoisSuivant(){\t\t\r\n\t\t\tCalendar cal=Calendar.getInstance();\t\r\n\t\t\tcal.setTime(new Date());\r\n\t\t\t//on rajoute 1 mois au mois en cours\r\n\t\t\tcal.add(Calendar.MONTH, 1);\r\n\t\t\tcal.getTime();\r\n\t\t\tint mois=cal.get(Calendar.MONTH);\r\n\t\t\t\r\n\t\t\tint an=cal.get(Ca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a value from the set. Returns true if the set contained the specified element. | public boolean remove(int val) {
System.out.println("###REMOVE OPERATION");
Integer valIndex = this.map.get(val);
if(valIndex == null)
{
this.print();
System.out.println("#REMOVE OPERATIONS ENDS");
return false;
}
int lastIndex = thi... | [
"public boolean remove(Object value) {\n\t\tint index = indexOf(value); //tries to find the given object\n\t\tif (index == -1) {\t//collection doesn't contain given element\n\t\t\treturn false;\n\t\t} else {\n\t\t\tremove(index);\t//removes the first occurrence of element\n\t\t\treturn true;\n\t\t}\n\t}",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this is a rock paper scissors game First, Champion set his name and next Challenger set his name too Start game Champion choose first by insert 02 that choice is show on screen and next challenger choose by insert 02 that choice is rock paper scissors. This game will end when some player got 3 pointWin. show on screen ... | public static void main(String[] args) {
char decide;
do {
Player Champion = new Player();
Player Challenger = new Player();
Scanner sc = new Scanner(System.in);
System.out.print("Set champion name : ");
String championName = sc.nextLine();
... | [
"public static void winner() {\n\t\tString winner;\n\t\tint userChoice = 0;\n\t\tint choiceComputer = 0;\n\t\tboolean again = true;\n\t\tint userScore = 0;\n\t\tint computerScore = 0;\n\n\t\tdo {\n\n\t\t\tSystem.out.println(\"/// JEU DU CHIFOUMI ///, GOOD LUCK!!!\");\n\t\t\tSystem.out.println(\"Saisie du choix : \\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form StructureVisPanel | public StructureVisPanel(ProjectController projectController) {
initComponents();
File structureVisModelFile = new File(projectController.projectModel.getProjectPath().toFile().getAbsolutePath() + File.separatorChar + "structurevis.model");
if (structureVisModelFile.exists()) {
try ... | [
"private void createPanel() throws IOException{\n JPanel panel = new SideTab();\n panel.setSize(100,250);\n panel.setLocation(0, 0);\n add(panel);\n\n }",
"abstract public PanelModel createPanel();",
"private void createPanel() {\n this.createTable();\n this.createCh... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets value as the attribute value for the calculated attribute QaName | public void setQaName(String value) {
setAttributeInternal(QANAME, value);
} | [
"public void setNameAttributeValue(final String attributeValue) {\n this.propertyName = attributeValue;\n byNameAttribute = true;\n }",
"void setValue(String attributeName, String value);",
"public void setName(String name){setAttribute(\"name\", name);}",
"public void setAttribute(QName name... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return image resources and titles for tab icons | @Override
public CharSequence getPageTitle(int position) {
Drawable image = ContextCompat.getDrawable(context, imageResId[position]);
image.setBounds(0, 0, image.getIntrinsicWidth(), image.getIntrinsicHeight());
SpannableString spannableString = new SpannableString(" " + tabTitles[positio... | [
"@Source(\"tab.png\")\n\tImageResource tab();",
"private void setupTabIcons() {\n\n TextView tabOne = (TextView) LayoutInflater.from(this).inflate(R.layout.tab_custom, null);\n tabOne.setText(Constant.TAB_TITLE[0]);\n tabOne.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.ic_home_white,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ taken from MCMP | public static Pair<Vector3d, Vector3d> getRayTraceVectors(Entity entity) {
float pitch = entity.rotationPitch;
float yaw = entity.rotationYaw;
Vector3d start = new Vector3d(entity.getPosX(), entity.getPosY() + entity.getEyeHeight(), entity.getPosZ());
float f1 = MathHelper.cos(-yaw * 0.0... | [
"@Override\n public void visit(LLCmp node) {\n \n }",
"@Test\n public void compTest() {\n MainMemory m = new MainMemory(64);\n byte[] bytes = {0,0,0,0};\n byte[] bytes1 = {1};\n\n try {\n m.set(0, bytes);\n byte[] result = m.get(0,4);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extensions to type declaration member checkers: | protected void checkTypeDeclElem(TypeDeclElem e) {
super.checkTypeDeclElem(e);
if (e.getTag() == TagConstants.METHODDECL) {
MethodDecl md = (MethodDecl)e;
if (getOverrideStatus(md) != MSTATUS_NEW_ROUTINE) {
for (int j = 0; j < md.args.size(); j++) {
FormalParaDecl formal = md.args.elementAt... | [
"@Override\n\tpublic boolean visit(TypeDeclaration node)\n\t{\n\t\tJavadoc javaDoc = node.getJavadoc();\n\t\tint line;\n\t\tif (javaDoc == null)\n\t\t{\n\t\t\tline = compilationUnit.getLineNumber(node.getStartPosition());\n\t\t} else\n\t\t{\n\t\t\tline = compilationUnit.getLineNumber(node.getStartPosition() + javaD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verifies correct total tax | @Test
public void testGetTotalTax() throws Exception {
double totalTax = 1005.0;
assertEquals(receipt.getTotalTax(),totalTax,totalTax);
} | [
"@Override\r\n\tpublic void calcTax() {\n\t\t\r\n\t}",
"public void checkTotalBeforeDraftWithTax(String lineTotal,String subTotal,String bannerTotal, String discountTotal,String quantity,String taxValue){\n CommonClass.sleepTime(2000);\n Assert.assertEquals(txtlineTotal.getAttribute(\"value\"),lineT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Format string should use %n rather than \n | public static void main(String args[]) {
int i = 5;
System.out.printf("%d \n", i);
// Method uses the same code for two branches
if (i > 3)
i = 1;
else if (i < 3)
i = 0;
else
i = 0;
Scanner in = new Scanner(System.in);
System.out.print("Enter a string: ");
... | [
"public String formatString(String in);",
"public static void main(String[] args) {\n\n StringBuilder sbuf = new StringBuilder();\n System.out.printf(\"|%3$-20s|\", \"abc\", \"def\", \"ghi\");\n\n\n\n\n\n\n\n }",
"public static void printf(String fmt, String x)\n/* */ {\n/* 185 */ Sys... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create cookies for first and last names. | private void addAuthenticationCookies(HttpServletResponse response, String email, String password) throws UnsupportedEncodingException {
Cookie emailCookie = new Cookie("email",
URLEncoder.encode(email, "UTF-8"));
Cookie passwordCookie = new Cookie("password",
URLEncoder.... | [
"Cookie newCookie(String name, String value);",
"private static String buildCookieHeader(List<String> cookies) {\n if (cookies.size() == 1) return cookies.get(0);\n StringBuilder sb = new StringBuilder();\n for (int i = 0, size = cookies.size(); i < size; i++) {\n if (i > 0) sb.append(\"; \");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the object to use as key in the sort process. | String getCompareObject(); | [
"public String getSortKey();",
"String getObjectKey();",
"public int getKey(String obj)\n\t\t{\t\t\n\t\t\tif (objectKeys==null)\n\t\t\t{\n\t\t\t\tmaxIndex++;\n\t\t\t\tobjectKeys.put(obj, maxIndex);\n\t\t\t\treturn maxIndex;\n\t\t\t}\t\n\t\t\tif (!objectKeys.containsKey(obj))\n\t\t\t{\n\t\t\t\tmaxIndex++;\n\t\t\... | {
"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, 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"
]
]
}
} |
Super class of all classes that can serialise the setup information to the output stream. | public interface SetupWriter
{
/**
* Write the setup information to the output stream.
*/
public void write(OutputStream oStream, Blend gData) throws Exception;
} | [
"@Override\n\tpublic void setupWriteStreams() {\n\t\treturn;\n\t}",
"public Output() {\n\t}",
"@Override\n protected void setup(Context context) throws IOException,\n InterruptedException {\n multipleOutputs = new MultipleOutputs(context);\n\n }",
"@Override\n\tprotected void setup()\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case number: 4 /Coverage entropy=1.0986122886681096 | @Test(timeout = 4000)
public void test004() throws Throwable {
HashMap<Object, Integer> hashMap0 = new HashMap<Object, Integer>();
JSONObject jSONObject0 = new JSONObject((Map) hashMap0);
String string0 = jSONObject0.optString("is", (String) null);
assertNull(string0);
} | [
"@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"
]
]
}
} |
method to remove WorkoutsFragment if available | public void removeWorkoutsFragment(){
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
Fragment currentWorkoutsFrag = getSupportFragmentManager().findFragmentByTag("WORKOUTSFRAG");
String fragName = "NONE";
if (currentWorkoutsFrag!=null)
fragName = ... | [
"private void removeSelfIfNecessary() {\n if (mIsFragmentVisible) {\n getActivity().getFragmentManager().beginTransaction().remove(this).commit();\n } else {\n Log.w(TAG, \"Fragment already stopped.\");\n }\n }",
"public void removeCurrentFragment()\n\t{\n\t}",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
print something to output with line at end | public void println(String line) {
this.outString.append(line).append("\n");
} | [
"private static void FinishLine(){\n\n\t\tSystem.out.println(\" |\");\n\n\t}",
"public void printLine() {\r\n\t\tfor (int i=0; i < line.size() -1; i++) {\r\n\t\t\tSystem.out.print(line.get(i));\r\n\t\t}\r\n\t\tSystem.out.println(line.get(line.size() - 1));\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a square identity matrix. | public static Matrix makeIdentity(int m) {
return makeScalar(m, 1);
} | [
"public static Matrix makeIdentity() {\n return new Matrix(new double[][]{\n {1, 0, 0, 0},\n {0, 1, 0, 0},\n {0, 0, 1, 0},\n {0, 0, 0, 1}\n });\n }",
"public static Matrix identity(int n) {\r\n\t\tdouble[][] out = new double[n][n];\r\n\t\tfor (int i = 0... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method uses TwitterTimeLine class to fill the notification list view | private void createFirstTimeline() {
LOG.info("inside fill timeline method");
if (timeline == null) {
timeline = new TwitterTimeLine(notificationListView.getItems());
}
try {
timeline.fillMentionsTimeLine();
} catch (Exception ex) {
LOG.error("... | [
"private void populateTimeline(){\n client.getMentionsTimeline(new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n Log.d(\"DEBUG SUCCESS\", response.toString());\n\n //populate\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ozzy_Dog dog1 = new Ozzy_Dog(); dog1.name = "Rex"; dog1.age = 12; dog1.breed = "Shepherd"; dog1.color = "black"; //System.out.println(dog1.name); dog1.bark(); dog1.eat(); dog1.wagTail(); | public static void main(String[] args) {Ozzy_Dog dog1 = new Ozzy_Dog();
//
// dog1.name = "Rex";
// dog1.age = 12;
// dog1.breed = "Shepherd";
// dog1.color = "black";
//
// //System.out.println(dog1.name);
//
// dog1.bark();
// dog1.eat();
// dog1.wagTail();
//
//
Dog2 dog = new Dog2();
System.ou... | [
"public static void main(String[] args){\n\t\tDog lizDog = new Dog(); //going to constructor in Dog.java, has all atrributes of Dog.java; ()call constructor\n\t\tlizDog.bark(); //method just made in Dog class\n\t\tlizDog.bark();\n\t\tlizDog.bark();\n\t\tlizDog.bark();\n\t\tlizDog.bark();\n\t\n\t\tDog brookeDog = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Truncates a string and adds an ellipse string to the end. Note that if the string passed in is not longer the [len(str) len(ellipse)], then nothing happens and the string is simply returned as it was passed in. | public static String truncateStr(String str, int maxNumChars) {
final String ellipse = "...";
if (str == null)
return "";
if (str.length() >= maxNumChars) {
StringBuffer newStr = new StringBuffer(maxNumChars);
newStr.append(str.substring(0, maxNumChars - 1 - ellipse.length()));
new... | [
"public static String ellipsize(String text, int maxLength, String end) {\n if (text != null && text.length() > maxLength) {\n return text.substring(0, maxLength - end.length()) + end;\n }\n return text;\n }",
"public static String ellipsize(String text, int maxLength) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Utility to handle HTML dropdown list | protected void handleHtmlDropdownListWithIndex(WebElement element, int index) {
Select select = new Select(element);
select.selectByIndex(index);
} | [
"public String createHTMLDropdown(String sql) {\r\n String html = \"\";\r\n String message = openDB();\r\n if (message.equals(\"Opened\")) {\r\n try {\r\n rst = stm.executeQuery(sql);\r\n rsmd = rst.getMetaData();\r\n int count = rsmd.getColumnCount();\r\n while (rst.next()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: This logic was taken from BasicAction.update(). Probably it'll be more convenient to share these conditions for correctness. | @NotNull
private static Optional<IgnoreGroupHelperAction> tryCreateFor(@NotNull AnActionEvent e) {
Project project = e.getProject();
SvnVcs vcs = project != null ? SvnVcs.getInstance(project) : null;
VirtualFile[] files = getSelectedFiles(e);
if (project == null || vcs == null || isEmpty(files)) retur... | [
"@Override\n\tpublic void update(ActionEntity t) {\n\t\t\n\t}",
"public boolean update(IdeAction ideAction, Context context) {\n \r\n return false;\r\n }",
"ActionResponse.Update update();",
"void handleUpdate(A action, P payload);",
"public abstract boolean Update();",
"@Override\n\tprotected bool... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new routine call instance | public LogError() {
super("LOG_ERROR", Wetrn.WETRN, PaErrors.PA_ERRORS);
addInParameter(P_CALLER);
addInParameter(P_ERROR_TYPE);
addInParameter(P_ERROR_NUMBER);
addInParameter(P_ERROR_TEXT);
addInParameter(P_SPECIFIC_DETAILS);
} | [
"Callprocess createCallprocess();",
"CallParam createCallParam();",
"public Call createCall(String uri)\n throws OperationFailedException,\n ParseException;",
"public static CallFunc create(Runnable func) {\n\t \tCallFunc ret = new CallFunc();\n\t \tif(ret.initWithFunction(func)) {\... | {
"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() {
jPanel2 = new javax.swing.JPanel();
jPanel4 = new javax.swing.JPanel();
jSplitPane1 = new javax.swing.JSplitPane();
jInternalF... | [
"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"
]
]
}
} |
TODO Autogenerated method stub | @Override
public List<Borrower> readFirstLevel(String query, Object[] vals) {
return null;
} | [
"@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"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void mouseEntered(MouseEvent arg0) {
} | [
"@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"
]
]
}
} |
wait to open bank booth | @Override
public boolean condition() throws InterruptedException {
return s.bank.isOpen();
} | [
"private boolean openBank() {\n\t\t\n\t\tCamera.setCameraAngle(General.random(90, 100));\n\t\tCamera.setCameraRotation(General.random(0, 25));\n\t\t\n\t\tRSObject[] banks = Objects.findNearest(7, 11338);\n\t\tif (banks != null && banks.length > 0) {\n\t\t\tRSObject bank = banks[0];\n\t\t\tif (DynamicClicking.clickR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
private final int HOURS_DIFFERENCE = 5; | public LoggerReaderFixes(String path) {
super(path, true);
} | [
"private int getHourApprox(){\r\n if (minute >= 30)\r\n return hourApprox = hour+1;\r\n else\r\n return hourApprox = hour;\r\n }",
"public int getTimeSlotPerHour()\n{\nreturn timeSlotPerHour;\n}",
"int getGENHOURS1();",
"public int getHourOfDay();",
"private int getHour() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
int number = Main.getNumberFibonacci(); | @Override
public void run() {
int n0 = 0;
int n1 = 1;
int n2;
if (number < 1) {
System.out.println("Введенное число отрицательно или равно нулю!");
} else if (number == 1) {
System.out.println(n0);
} else {
Integer[] fibonacci = new Integer[number];
fibonacci[0] = n0;
fibonacc... | [
"public static int fib(int number){\n if(number <= 1) return number;\n return fib(number-1)+fib(number-2);\n }",
"public int fibonacci(int n) {\r\n if(n<=1) { return n;}\r\n return(fibonacci(n-1) + fibonacci(n-2));\r\n}",
"long fib(int limit);",
"public static void main(String[] args) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ if, stateNum equals to target.length => pattern matching to target. | @Override
public int bytesBefore(byte[] target) {
mark();
int stateNum = 0;
int length = 0;
if (bufIndex >= buffers.size()) {
reset();
return 0;
}
/* retrieve first byte array */
byte[] bs = buffers.get(bufIndex);
for (int i = bufOffset; i < bs.length; i++) {
if (bs[i] == target[stateNum])... | [
"public boolean checkMatch(){\n\t\tif(!this.isFull)\n\t\t\treturn false;\n\t\tfor(int i = 0; i < state.length; i ++){\n\t\t\tif (state[i] != 2){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tthis.isComplete = true;\n\t\treturn true;\n\t}",
"public abstract List<SearchState> matchThis(SearchState state);",
"void s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public long getItemId(int position) {
return position;
} | [
"@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"
]
]
}
} |
repeated .com.sy599.game.msg.serverPacket.TableMsg tables = 6; | public Builder removeTables(int index) {
if (tablesBuilder_ == null) {
ensureTablesIsMutable();
tables_.remove(index);
onChanged();
} else {
tablesBuilder_.remove(index);
}
return this;
} | [
"@Override\r\n\t/**\r\n\t * A method for parsing the messages received from the game server.\r\n\t * This method should be called from the thread responsible for receiving messages from the game server. Based on the message type, different actions will be carried out.\r\n\t */\r\n\tpublic void parseMessage(GameMess... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public int deleteByPrimaryKey(Integer id) {
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"
]
]
}
} |
Main method which solves the given problems and outputs the results to the console. | public static void main(String[] args) {
List<String> inputList = readStudenti();
List<StudentRecord> records = convert(inputList);
System.out.println("Zadatak 1");
System.out.println("=========");
System.out.println(vratiBodovaViseOd25(records));
System.out.println("Zadatak 2");
System.out.print... | [
"public static void main(String[] args) {\n solve();\r\n }",
"public static void main(String[] args) {\n\t\tsolve();\n\n\t}",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n while(sc.hasNext()){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Arguments: [] Required, () Optional ['Text to announce'] sets the text. (PLAYER:player_name) (FORMAT:format) Example Usage: NARRATE 'Hello, world!' NARRATE PLAYER: 'ALERT! Intruder! intruder! has infiltrated your base!' | @Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
String text = null;
FormatScriptContainer format = null;
if (scriptEntry.getArguments().size() > 3)
throw new InvalidArgumentsException(Messages.ERROR_LOTS_OF_ARGUMENTS);
... | [
"private static String createNotice() {\n return \"Utilisation of LocalMain to start a new game:\\n\" + \n \"\\n\" + \n \"Note: In the following explanation the symbols ‘’<‘’ and ‘’>’’ around the arguments are just here to make things clearer \\n\" + \n \" an... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void onFailed(int actionType, BaseResponse result) {
super.onFailed(actionType, result);
} | [
"@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"
]
]
}
} |
TODO Autogenerated method stub | @Override
public List<Service> GetMarketSubServices(int marketId) {
return serviceDal.GetMarketSubServices(marketId);
} | [
"@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"
]
]
}
} |
optional string SpawnPointId = 5; | public com.google.protobuf.ByteString
getSpawnPointIdBytes() {
java.lang.Object ref = spawnPointId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
... | [
"public void setSpawnX(int par1) {}",
"private int getSpawnType() {\n\t\treturn this._spawnType;\n\t}",
"public void setSpawnLocation(Point spawnPos);",
"@Override\n public void onSpawnpointChosen(SpawnpointChoiceEvent e) {\n\n }",
"public int getMaxSpawn(){\n return maxSpawn;\n }",
"void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize the contents of the frame. | private void initialize() {
frame = new JFrame();
frame.setTitle(game.getSpaceshipName() + " Window");
frame.setBounds(100, 100, 788, 566);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
frame.setLocationRelativeTo(null);
JLabel lblSpaceship = new JLabel(... | [
"public void initializeFrame();",
"private void initialize() {\n\t\tsetFrame();\n\t\tsetheader();\n\t\tsetList();\n\t}",
"public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"public frame() {\n initComponents();\n read_init_config();\n }",
"private void initialize() {\n\t\tinitData... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Pone una pieza en el casillero | public void putPiece(Piece piece){//No verifica que pise pieza. Bien o mal? Quizas trabajar con remove y putPiece?
if(getPiece()!=piece){
setPiece(piece);
if(piece!=null){
piece.setPosition(this);
}
}
} | [
"Cuentas() {\n cabeza = null; /* cabeza queda apuntando a nulo */\n }",
"public void pasaportePrimero() {\n Nodo aux = cabeza;\n int cont = 0;\n\n while (aux != null) {\n if (pasaporteCedula(aux.getPersona().getCedula())) { //Cuenta cuantos pasaportes hay en la Lista.\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 energy_index = 2 [default = 13]; | @java.lang.Override
public int getEnergyIndex() {
return energyIndex_;
} | [
"public int getEnergy() { return this.energy; }",
"@Override\n \tpublic int getEnergy() {\n \t\treturn energy;\n \t}",
"public void setEnergy(int energy) {\n this.energy = energy;\n }",
"public int getEnergy() {\n \t\treturn energy;\n \t}",
"@Override\n public int getEnergyStored()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Onlt gets lighter due to, err lights. | public void setTint(float newTint) {
if (newTint > 1f) {
newTint = 1f;
}
if (newTint > tint) { // cant make it darker than it already is
tint = newTint;
locationInfo.tint = tint; // just change the tint for efficiency
}
} | [
"@Override\n\tpublic void light() {\n\t\tSystem.out.println(\"my light has been broken!\");\n\t}",
"private void light() {\n\n final PreferenceScreen light_pref = (PreferenceScreen) findPreference(\"light\");\n Sensor temp = mSensorMgr.getDefaultSensor(Sensor.TYPE_LIGHT);\n if (temp != null) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the create date of this activity organizer. | @Override
public Date getCreateDate(); | [
"@Override\n\tpublic Date getCreateDate() {\n\t\treturn _marketingEvent.getCreateDate();\n\t}",
"public Date getCreateDate () {\r\n\t\treturn createDate;\r\n\t}",
"public java.lang.String getCREAT_DATE() {\r\n return CREAT_DATE;\r\n }",
"public String getCreationDate() {\r\n return new Date(creat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setting to allow delay interval between sending mail. This is useful to prevent bulk message be treated as spam. | public void setDelayBetweenEmailsMs(final long delayBetweenEmailsMs) {
this.delayBetweenEmailsMs = delayBetweenEmailsMs;
} | [
"public static void SetSleepAfterEMailMS(long sleepMS) \n {\n if (sleepMS <= 0L) {\n SendMail.SleepMSBetweenEMails = 0L;\n } else\n if (sleepMS > 20000L) {\n SendMail.SleepMSBetweenEMails = 20000L;\n } else {\n SendMail.SleepMSBetweenEMails = sleepMS;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convenience method for creating a byte array from a double array. | public static byte[] toByteArray(double[] data) {
byte[] tmp, result = new byte[data.length * 8];
for (int i = 0; i < data.length; i++) {
tmp = toBytes(data[i]);
System.arraycopy(tmp, 0, result, i * 8, 8);
}
return result;
} | [
"public static byte[] doubleArrayToByteArray(double[] doubleArray) {\n byte[] byteArray = new byte[doubleArray.length*8]; // 8 bytes per double\n ByteBuffer byteBuf = ByteBuffer.wrap(byteArray);\n DoubleBuffer doubleBuff = byteBuf.asDoubleBuffer();\n doubleBuff.put(doubleArray);\n return byteArray;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the position for npc | public Position(Npc npc) {
this(npc.getX(), npc.getY(), npc.getHeight());
} | [
"at.fhj.swengb.apps.battleship.BattleShipProtobuf.BattleShipGame.Pos getPos();",
"public Coords getPosition() {\n return position;\n }",
"public Positions getPos()\n\t{\n\t\treturn this.pos;\n\t}",
"java.lang.String getPlayerPos();",
"public NPC getNPC() {\n return npc;\n }",
"public Positio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getters y Setter de los campos del la forma de pago | public PaymentData(String cardName, String duesNumber, String cardNumber) {
this.cardName = cardName;
this.cardNumber = cardNumber;
this.duesNumber = duesNumber;
} | [
"private void getFromForm(){\n aluno.setNome(entNome.getText());\n aluno.setAnoIngresso(entAnoIngresso.getText());\n \n aluno.setEndereco(endereco.getEndereco());\n }",
"public FormaPago getFormaPago()\r\n/* 228: */ {\r\n/* 229:361 */ return this.formaPago;\r\n/* 230: */... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | [
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch(item.getItemId()){\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home\n Intent intent = new Intent(this, MainMenuCard.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
icons,hints can be null | private void crearGUI(String[] nombresBotones,ImageIcon[] icons,char[] hints){
cantidad=nombresBotones.length;
botones= new JButton[cantidad];
for (int i = 0; i < cantidad; i++) {
botones[i]= new JButton(nombresBotones[i]);//se crea el objeto
try{
bo... | [
"private void initIcon() {\n Icons upbook = new Icons(\"浏览和删除用户\", R.drawable.c);\n IconsList.add(upbook);\n Icons debook = new Icons(\"浏览和删除评价\", R.drawable.e);\n IconsList.add(debook);\n }",
"private void checkIcons(String ico){\n\n// switch (ico ){\n// ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new subscription | public synchronized void createSubscription(double subscriptionID) {
// update data structures
// generate CDAP message reply
} | [
"Future<CreateSubscriptionResponse> createSubscriptionAsync(\n CreateSubscriptionInput request);",
"@Override\n public SubscriptionResponse createSubscription(String topicName, SubscriptionRequest subscriptionRequest) {\n String url = subscriptionRequest.getUrl();\n Topic topic = getOrCrea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter returning the PRI_met_phi attributes value | public Double getPRI_met_phi() {
return PRI_met_phi;
} | [
"public double GetPhi() {\n \n return this.phi;\n }",
"@Override\n public int getValorePilota() {\n return super.getValorePilota();\n }",
"public double getIndiceMetabolicoBasal() {\n return indiceMetabolicoBasal;\n }",
"public int getLePhi() {\n\t\treturn _tthc2CoQua... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MethodName:clearLastName Description:This function is to Clear Last Name Field. | public CheckOutStep2 clearLastName()
{
GUIFunctions.clear(driver, CS2_LastName);
return new CheckOutStep2(driver) ;
} | [
"public void clearTxtLastName() {\r\n\t\tobjContactInformationPage.getTxt_LastName().clear();\r\n\t}",
"public avro.generated.User.Builder clearLastName() {\n lastName = null;\n fieldSetFlags()[1] = false;\n return this;\n }",
"public void clearPaypalAccountLastName() {\n\n\n paypalAcco... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .CMsgDOTAFantasyTeamStandingsResponse.CMsgTeamScore team_scores = 3; | public DotaGcmessagesClientFantasy.CMsgDOTAFantasyTeamStandingsResponse.CMsgTeamScoreOrBuilder getTeamScoresOrBuilder(
int index) {
return teamScores_.get(index);
} | [
"public int getNumberOfPlayersOnTeam(){\n return 1;\n }",
"public int Game_getTeams();",
"public int getScore( Team t );",
"public int numberOfTeams(){\n return noOfTeams;\n }",
"public void getTeamStats() {\r\n ba.sendArenaMessage(Tools.formatString(\"|\" + getTeamNa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Obtiene el valor del campo "causaCambioUbicacion". | @Column
public String getCausaCambioUbicacion() {
return causaCambioUbicacion;
} | [
"public String getCasa() {\n return casa;\n }",
"public String getNombreDelCambio() {\n return nombreDelCambio;\n }",
"public void setNumeroCausa(String numeroCausa) {\n\t\tthis.numeroCausa = numeroCausa;\n\t}",
"private static String obtenerCambio(Double total) {\n\t\treturn null;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Process orders using Java Thread Pool ProducerConsumer Completion | public double javaProducerConsumer(List<Order> orders) throws Exception {
//method variable
double batchTotal = 0.0;
logProcessingStart("Java Producer-Consumer", orders.size());
//creat the completion service pool
ExecutorService executorPool = Executors.newFixedThreadPool(poolSize);
Com... | [
"public void serviceOrders() {\n /* Creating an executor service to service multiple concurrent\n threads (at max equal to pool size here equal to 4) */\n ExecutorService threadPool = Executors.newFixedThreadPool(4);\n \n /* Iterating through the list of orders ,creating a thread\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new TemplateVariableWithOptions given some data. | public TemplateVariableWithOptions(
@NotNull String name,
@NotNull String defaultValue,
@NotNull String description,
@NotNull String[] options
) {
super(name, defaultValue, description);
this.options = options;
} | [
"public TemplateOptions build() {\n return new TemplateOptionsImpl(keyPairName, additionalOptions, inboundPorts, tags,\n userData);\n }",
"public static TemplateOptionsBuilder newBuilder() {\n return new TemplateOptionsBuilder();\n }",
"public TemplateOptionsBuilder userData(String userData) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True = habilidad ofensiva False = habilidad curativa | public void setOfensivo(Boolean ofensivo) {
this.ofensivo = ofensivo;
} | [
"public boolean filaVazia(){\n\n return primeiro -1 == ultimo;\n }",
"private boolean fimDeJogo() {\n return tabuleiro.protagonista.morreu() || tabuleiro.venceu();\n }",
"public boolean estaLlena()\r\n{\r\nint sigultimo=siguiente(ultimo);\r\nreturn (sigultimo==frente);\r\n}",
"public boole... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
XXX Since we already have the NodeStorage, why do we need a parameter for it? This is almost certainly a bug. Fix. Get the next DFA for a specific character. | public DFANode getNextDFA(final Character ch, final NodeStorage ns) {
synchronized (topDfaMonitor) {
if (topDFA == null) {
topDFA = new DFANodeImpl(Collections.EMPTY_SET);
} else if (topDFA.hasLinkFor(ch)) {
return topDFA.getNext(ch, ns);
... | [
"public DFA dfa() {\n // la costruzione del DFA utilizza due tabelle hash per tenere\n // traccia della corrispondenza (biunivoca) tra insiemi di\n // stati del NFA e stati del DFA\n HashMap<HashSet<Integer>, Integer> indexOfSet\n = new HashMap<>(); // NFA -> DFA\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method returns SimpleTimer's specific ClockNumberFrame. | public ClockNumberFrame returnClockNumberFrame() {
return this.clockframe;
} | [
"public long getFrame();",
"Integer getClockSeconds();",
"public static long getTimerBase()\n {\n return DateTime.timerBase;\n }",
"public long getTimerTime(int key) { throw new RuntimeException(\"Stub!\"); }",
"int getFrameIndex(int Duration, int Frames) {\n return (1 + ((int) (GL.that.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required uint32 user_id = 1; | public Builder setUserId(int value) {
bitField0_ |= 0x00000001;
userId_ = value;
return this;
} | [
"int getId(String user);",
"public int getId() {return user_id; }",
"public abstract String getUserid();",
"String getIdUser();",
"Long getUserIdAsLong( );",
"public long getRecipiantUserID();",
"public UUID getUserId();",
"int getUserIdLow();",
"long getUAccountid();",
"public int getIdUser() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |