query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Loads employee from data store specified by employee id
@GetMapping(value = {"/count", "/count/"}) public ResponseEntity<Void> getEmployeeCount(){ employeeService.getEmployeeCount(); return new ResponseEntity<>(HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "EmployeeDetail getById(long identifier) throws DBException;", "public Employee getEmployeeByID(int id) {\n\t\t\r\n\t\ttry {\r\n\t\t\tEmployee f = temp.queryForObject(\"Select * from fm_employees where EID =?\",new EmployeeMapper(),id);\r\n\t\t\treturn f;\r\n\t\t} catch (EmptyResultDataAccessException e) {\r\n\t...
[ "0.73569727", "0.71418566", "0.7093638", "0.70777726", "0.7056446", "0.6956237", "0.6936568", "0.6936556", "0.6890953", "0.6850036", "0.6846374", "0.6834763", "0.68178284", "0.6804224", "0.67955285", "0.67890006", "0.67890006", "0.67807585", "0.67744297", "0.67270225", "0.671...
0.0
-1
Populate the protected helper fields
@Override public void handleOutput(final List<RuleMatch> evaluationResults) throws IOException { this.totalResults = evaluationResults.size(); this.uniqueFileSet = new HashSet<>(); this.perFileResults = new HashMap<>(); this.perFilePerRule = new HashMap<>(); for (final RuleMatch match : evaluationResults) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void initializeFields() {\n\n\t}", "protected void initDataFields() {\r\n //this module doesn't require any data fields\r\n }", "private TigerData() {\n initFields();\n }", "public void setupFields()\n {\n FieldInfo field = null;\n field = new FieldIn...
[ "0.65430224", "0.63168573", "0.6274953", "0.6273145", "0.62323093", "0.6041727", "0.5876736", "0.5861425", "0.5829919", "0.57774204", "0.5733185", "0.5701478", "0.56980824", "0.56754583", "0.5672506", "0.5671227", "0.56158394", "0.5589897", "0.5584113", "0.5582691", "0.555999...
0.0
-1
TODO: Move this code into a generic MvcDataHelper class
private Map<String, Object> getMvcMetadata(ComponentTemplate componentTemplate) { Map<String, Object> metadata = new HashMap<>(); Map<String, Field> metadataFields = componentTemplate.getMetadata(); for (Map.Entry<String, Field> entry : metadataFields.entrySet()) { String fieldName...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data getData(HelperDataType type);", "@Override\r\n\tpublic Map<String, Object> returnData(Map<String, Object> map,Model model, HttpServletRequest request) {\n\t\treturn null;\r\n\t}", "Collection getData();", "EntityData<?> getEntityData();", "Object getData();", "Object getData();", "public ab...
[ "0.5848108", "0.56478566", "0.55543303", "0.55111337", "0.54913706", "0.54913706", "0.54188174", "0.5351686", "0.53496814", "0.530783", "0.5282814", "0.5197805", "0.5172441", "0.5168834", "0.51314574", "0.5126722", "0.51265556", "0.5104546", "0.5073539", "0.505846", "0.505846...
0.49949703
25
Creates new form FrameMain
public FrameMain() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); initComponents(); refreshSchedule(); } catch (ClassNotFoundException ex) { Logger.getLogger(FrameMain.class.getName()).log(Level.SEVERE, null, ex); } ca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void createMainframe()\n\t{\n\t\t//Creates the frame\n\t\tJFrame foodFrame = new JFrame(\"USDA Food Database\");\n\t\t//Sets up the frame\n\t\tfoodFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfoodFrame.setSize(1000,750);\n\t\tfoodFrame.setResizable(false);\n\t\tfoodFrame.setIconImage(ic...
[ "0.79673624", "0.7775917", "0.7767061", "0.769193", "0.7601751", "0.7572077", "0.7572077", "0.7572077", "0.7572077", "0.7572077", "0.7572077", "0.7572077", "0.7572077", "0.7572077", "0.7572077", "0.7572077", "0.7572077", "0.7558721", "0.755684", "0.7412883", "0.73625636", "...
0.7366898
20
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(); jPanel2 = new javax.swing.JPanel(); btnUsers = new jav...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7318655", "0.7289971", "0.7289971", "0.7289971", "0.72860885", "0.7247684", "0.7213551", "0.72080934", "0.7195069", "0.7189731", "0.7183451", "0.71579945", "0.7147311", "0.7092687", "0.70798934", "0.7055229", "0.69868284", "0.6976656", "0.6954658", "0.6952896", "0.69449455...
0.0
-1
This is a functional problem. Only this function has to be written. This function takes as input the head of the linked list. It should return the head of the modified list.
public static ArrayList<Integer> findAnagrams(String s, String p) { //write your code here if(s.length()<p.length()) { ArrayList<Integer> arr = new ArrayList<>(); return arr; } ArrayList<Integer> result = new ArrayList<>(); HashMap<Character,Integer> P = new HashMap<>(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node reverserLinkedList(Node head){\n // size == 0\n if(head == null){\n return null;\n }\n // size == 1\n if(head.getNext() == null){\n return head;\n }\n\n Node newHead = reverserLinkedList(head.getNext());\n head.getNext().setN...
[ "0.71179265", "0.7046174", "0.686983", "0.6861113", "0.68205994", "0.68095285", "0.677386", "0.6638471", "0.6571187", "0.65697724", "0.6559744", "0.6549624", "0.6543594", "0.65309125", "0.65270936", "0.6525768", "0.65218097", "0.6516152", "0.6512648", "0.6512225", "0.6509", ...
0.0
-1
Created by NFY on 20170802.
public interface IUserTransactionRecodMapper extends BaseMapper { /** * 查询当月交易数量(付款、退款) * @param userId * @return */ Integer findMonthTransactionCount(Long userId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}"...
[ "0.5852576", "0.57559127", "0.56915087", "0.5660762", "0.5625997", "0.5625997", "0.56252474", "0.5603507", "0.5592584", "0.5577686", "0.5569169", "0.55292994", "0.5513244", "0.54856586", "0.54820323", "0.54820323", "0.54820323", "0.54820323", "0.54820323", "0.54696065", "0.54...
0.0
-1
best case, we'll have to move the whole sorted list by one, which is O(n). so best case O(n) We have to do this for each element in every array, which means it's going to be bounded by O(n^2) in worst case.
public void sort(int array[]){ for(int i=1;i < array.length;i++){ int j=i-1; int cur=i; while(array[cur] < array[j] && j >=0 ){ swap(array,cur,j); cur--; j--; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortIncreasing()\n {\n int min;\n \n for (int i = 0; i < list.length - 1; i++)\n {\n min = i; \n for(int j = i+1; j < list.length; j++)\n {\n if(list[j] < list[min])\n min = j; \n }\n if(i !...
[ "0.6649233", "0.65736574", "0.6456683", "0.6419364", "0.6388347", "0.634959", "0.6335836", "0.63252693", "0.6281311", "0.6233329", "0.62235373", "0.6215636", "0.6212135", "0.6194422", "0.61903286", "0.618628", "0.61433595", "0.61330914", "0.6125937", "0.6121093", "0.61157215"...
0.5869376
55
sets teh default dates
@Subscribe public void onInit(InitEvent event) { Date now = new Date(); dateFrom.setValue(giveMonthStart(now)); dateTo.setValue(addTime(giveMonthStart(now),1,"MONTH")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDefaultDateRange() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n Calendar todaysDate = Calendar.getInstance();\n toDateField.setText(dateFormat.format(todaysDate.getTime()));\n\n todaysDate.set(Calendar.DAY_OF_MONTH, 1);\n fromDateFiel...
[ "0.7642871", "0.7123722", "0.7080379", "0.7076965", "0.70652616", "0.68175143", "0.679365", "0.67564774", "0.6753107", "0.672448", "0.67146146", "0.6635261", "0.65720236", "0.65661377", "0.65169924", "0.651551", "0.6512262", "0.65075064", "0.6484006", "0.646275", "0.64494294"...
0.0
-1
copy of data under a dynamic format
public void onBtnGenerateClick() { taskSpan2s = dataManager.load(TaskSpan2.class) .query("select t from gantt_TaskSpan2 t") .view("taskSpan2-view") .list(); // prepare the new dataProvider ListDataProvider dataProvider = new ListDataProvider(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object copy_from(Object src) {\n\n GuestScienceData typedSrc = (GuestScienceData) src;\n GuestScienceData typedDst = this;\n super.copy_from(typedSrc);\n /** Full name of apk */\n typedDst.apkName = typedSrc.apkName;\n /** Type of data being sent */\n typedDs...
[ "0.59830606", "0.5806683", "0.5793542", "0.57616174", "0.5746742", "0.5728887", "0.5679334", "0.56658715", "0.55776656", "0.5497273", "0.5337615", "0.53302515", "0.5326599", "0.5322192", "0.5301481", "0.5279468", "0.527498", "0.52307963", "0.5219491", "0.52084005", "0.5205936...
0.0
-1
For inputting the value in the input box.
public static void main(String[] args) { String fn = JOptionPane.showInputDialog("Enter the first number"); String sn = JOptionPane.showInputDialog("Enter the second number"); int num1 = Integer.parseInt(fn); // Converting String to Integers. int num2 = Integer.parseInt(sn); int sum = num1 + num2; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void saveInput() {\r\n value = valueText.getText();\r\n }", "public void inputText(String value) {\n getWrappedElement().clear();\n getWrappedElement().sendKeys(value);\n logger.debug(\"updated element {} with value {}\", getLocator(), value);\n }", "public void setI...
[ "0.72594666", "0.67569953", "0.65076286", "0.6421903", "0.6415271", "0.6322242", "0.6224877", "0.61918527", "0.6182948", "0.6180258", "0.6169219", "0.61683655", "0.6157568", "0.61527", "0.61405265", "0.6125202", "0.611232", "0.6103172", "0.6103036", "0.6081682", "0.6072263", ...
0.0
-1
Log/send an error report?
@Override protected void invalidMessage(RemoteGENASubscription sub, UnsupportedDataException ex) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeToExceptionLog(String report);", "public void reportError (String id) throws IOException;", "@Override\r\n\tpublic void reportError(String errorInfo, String errorDetails) {\n\t\t\r\n\t}", "public void error(Object message)\n/* */ {\n/* 199 */ if (message != null) {\n/* 200 */ ...
[ "0.67542654", "0.6717281", "0.64276737", "0.6293731", "0.62707096", "0.6263185", "0.62586206", "0.6256913", "0.6239072", "0.6230972", "0.6226346", "0.6195714", "0.6175956", "0.61627173", "0.61335194", "0.61159986", "0.61138314", "0.61019313", "0.61018264", "0.6094747", "0.609...
0.0
-1
Creates a new virtual node instance
public VirtualNode(String id, String label){ this.id = id; this.label = label; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TNode createTNode();", "VM createVM();", "public VISNode() {\n this.model = new VISNodeModel();\n }", "protected SceneGraphObject createNode() {\n\tthrow new SGIORuntimeException(\"createNode() not implemented in class \"+this.getClass().getName());\n }", "VirtualThing createVirtualThing();", ...
[ "0.66648096", "0.6536149", "0.64711064", "0.6379082", "0.6256357", "0.6245678", "0.6203176", "0.6179065", "0.6171306", "0.6149318", "0.6145647", "0.6055559", "0.60170066", "0.60084593", "0.5996515", "0.5975554", "0.5975554", "0.5975554", "0.5975554", "0.5949769", "0.5921551",...
0.6225097
6
Get the virtual node ID
public String getId(){ return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getNodeID()\n {\n return vnodeid; \n }", "public String getNode_id() {\r\n\t\treturn node_id;\r\n\t}", "NodeId getNodeId();", "private String getMyNodeId() {\n TelephonyManager tel = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n String n...
[ "0.7619242", "0.7098274", "0.7096736", "0.70150566", "0.70150477", "0.6948097", "0.68732", "0.6826976", "0.66844136", "0.667987", "0.65112305", "0.6506814", "0.65065134", "0.64657044", "0.6453859", "0.64018536", "0.6395033", "0.6384901", "0.6380178", "0.6364863", "0.63339406"...
0.0
-1
Set the ID of the virtual node
public void setID(String id){ this.id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setID(String s) {\r\n\t\tthis.idNode = s;\r\n\t}", "void setID(int val)\n throws RemoteException;", "@Override\n public void setId(int pintId) {\n this.intDynaGraphId = pintId;\n }", "public void assignIDtoVM(){\n\t\tint count = 0;\n\t\tfor(VirtualMachine aux : vms)\n\t\t\...
[ "0.7098685", "0.6647811", "0.66392887", "0.64632386", "0.6424458", "0.6339807", "0.63303345", "0.6308665", "0.62834", "0.6280848", "0.62293863", "0.62241876", "0.6218783", "0.6204813", "0.61745995", "0.6169587", "0.61564046", "0.6152256", "0.6134927", "0.6134927", "0.6107654"...
0.0
-1
Add a new virtual machine instance in the list vms
public void addVirtualMachine(VirtualMachine vm){ vms.add(vm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "VM createVM();", "void placeVirtualMachine(VirtualMachine vm) {\n mapped_vms.add(vm);\n used_cpu = used_cpu.add(vm.getCPU());\n used_mem = used_mem.add(vm.getMemory());\n if (vm.isAntiColocatable()) {\n mapped_anti_coloc_job_ids.add(vm.getJobID());\n ...
[ "0.6203012", "0.60671973", "0.6016756", "0.58535177", "0.57001674", "0.56465995", "0.5623015", "0.5561136", "0.5560337", "0.5549113", "0.55210316", "0.5465896", "0.5453114", "0.5433191", "0.54002243", "0.5383093", "0.53310907", "0.53085047", "0.5254205", "0.52392274", "0.5236...
0.75184214
0
Print the virtual node information
public void printInfo(){ System.out.println("id : " + id + " label : " + label); System.out.println("vms : " ); for(VirtualMachine v : vms){ v.printInfo(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printNode(){\n\t\tSystem.out.println(\"\\nCurrent neigbor: \" + serventList.size());\n\t\tfor(int i = 0;i<serventList.size();i++){\n\t\t\tServentInfo b = serventList.get(i);\n\t\t\tSystem.out.println(\"(\" + b.IP + \":\" + b.port + \"); \");\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}", "public void p...
[ "0.78579426", "0.7177513", "0.71060437", "0.69810945", "0.69539464", "0.6935193", "0.68965226", "0.6803827", "0.6740536", "0.67118573", "0.66056305", "0.6582638", "0.6576603", "0.65638113", "0.6556201", "0.65474755", "0.65415287", "0.6469201", "0.6462455", "0.6451944", "0.644...
0.74205524
1
Get the virtual node information in order to generate a DB statement
public String getInfo(boolean action){ String updateVnode = label; String insertVnode = id + "','" + label; if (action) return insertVnode; return updateVnode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getNodeID()\n {\n return vnodeid; \n }", "@Override\n public String toString() {\n return \"V\"+this.VS_ID+\"\\tNodes: \"+getNodes()[0]+\" & \"+getNodes()[1]+\"\\t\"+\"DC\\t\"+getValue()+\" V\";\n }", "public NodeInfo getNodeInfo() throws RemoteException, Error;", "IQuer...
[ "0.60936797", "0.5756168", "0.56629384", "0.55660087", "0.5564912", "0.5563038", "0.5527805", "0.5469283", "0.5469283", "0.54158133", "0.527838", "0.52776283", "0.5269999", "0.52481574", "0.522997", "0.5184192", "0.5174674", "0.5137851", "0.5125782", "0.5116198", "0.51131725"...
0.0
-1
Get the label field of the virtual node
public String getLabel(){ return label; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNodeLabel ();", "public Object getLabel() \n {\n return label;\n }", "public String getLabel() {\n return getElement().getChildren()\n .filter(child -> child.getTag().equals(\"label\")).findFirst()\n .get().getText();\n }", "publi...
[ "0.7570508", "0.73434186", "0.7299086", "0.7283996", "0.72349447", "0.7186965", "0.71227306", "0.71227306", "0.7115689", "0.70918417", "0.70916116", "0.7083708", "0.7083139", "0.7083139", "0.7083139", "0.7083124", "0.70812494", "0.7079495", "0.7078829", "0.7077208", "0.707720...
0.70959496
9
Get the number of elements of the virtual machines related to this virtual node
public int getSizeVirtualMachine(){ return vms.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumVMs() {\n return numVMs;\n }", "public int numNodes() {\n return nodeVector.size();\n }", "int getNodesCount();", "int getNodesCount();", "public int size( )\r\n {\r\n int size = (int) manyNodes;// Student will replace this return statement with their own code:\r...
[ "0.71682405", "0.70663637", "0.69413376", "0.69413376", "0.684096", "0.6830219", "0.68248737", "0.67674327", "0.6748927", "0.67183834", "0.6717351", "0.66910857", "0.6666139", "0.66600996", "0.6647303", "0.66236985", "0.6614272", "0.66109073", "0.66097426", "0.6609679", "0.66...
0.74816954
0
Get a virtual machine instance identified by a list position
public VirtualMachine getVirtualMachine(int i){ return vms.get(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "T getElementFromIndex(int index) throws ListException;", "VM getVM();", "public E get(int index) { \n return (E)list[index];\n }", "public static ArrayList<InstanceEntity> getInstances() {\n ILifeCycleServiceRest resourceserviceproxy =\n ConsumerFactory.createConsumer(MsbUtil.getNsocLifecycl...
[ "0.5337586", "0.52358407", "0.51917255", "0.5190734", "0.5115209", "0.50145763", "0.49076602", "0.49008605", "0.4900815", "0.4893141", "0.4892346", "0.4892346", "0.48837915", "0.48654452", "0.48538864", "0.4844328", "0.48349592", "0.48288688", "0.48177677", "0.47994316", "0.4...
0.6023791
0
Performs an insert or update against the virtual machine table
public void updateVM() throws SQLException{ DataBase db = DataBase.getInstance(); ResultSet rs; for(VirtualMachine aux : vms){ PreparedStatement ps = db.prepareStatement("SELECT id FROM vm WHERE id = ?"); ps.setString(1, aux.getId()); System.out.println(aux.getId()); System.out.println(this.id); rs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean insert(Machine machine);", "public void insert(VRpDyIpbbCpuMem record) {\r\n getSqlMapClientTemplate().insert(\"V_RP_DY_IPBB_CPU_MEM.ibatorgenerated_insert\", record);\r\n }", "@Override\n\tprotected String sql() throws OperationException {\n\t\treturn sql.insert(tbObj, fieldValue);\n\t}", ...
[ "0.60151505", "0.59003514", "0.581226", "0.5760228", "0.5754265", "0.5671985", "0.5658201", "0.5651469", "0.56358886", "0.5632", "0.5623892", "0.5611848", "0.5598894", "0.55855244", "0.5576785", "0.5572385", "0.5572353", "0.5566639", "0.5556609", "0.5547127", "0.5545594", "...
0.60931134
0
Check the virtual node defined in order to find incomplete fields
public ErrorCheck checkVNode(){ if(id.isEmpty() || label.isEmpty() || id == null || label == null) return ErrorCheck.VNODE_NOT_COMPLETED; ErrorCheck ec; for(VirtualMachine aux : vms){ ec = aux.checkVM(); if(ec.equals(ErrorCheck.VM_NOT_COMPLETED)){ return ec; } } return ErrorCheck.ALL_OK; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasFieldNested();", "boolean hasNestedField();", "boolean hasNestedOuterField();", "public void checkFields(){\n }", "@Override\n\tprotected boolean verifyFields() {\n\t\treturn false;\n\t}", "public void testFields()\n {\n TestUtils.testNoAddedFields(getTestedClass(), null);\n }"...
[ "0.5913796", "0.5718013", "0.5614106", "0.5610078", "0.54759854", "0.542145", "0.54142785", "0.5403831", "0.5400106", "0.5381055", "0.53105855", "0.52978086", "0.5269408", "0.52657926", "0.52068067", "0.518194", "0.5175913", "0.5151172", "0.5145458", "0.51220745", "0.5113118"...
0.55583084
4
Check if exist an equal virtual node at virtual node table
public boolean checkRowDBVNode(ResultSet rs){ try{ while(rs.next()){ if(rs.getString("id").equals(id)) return false; } }catch(SQLException e){ System.err.println(e); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean node_exists (NodeWS node) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tQuery i = null;\r\n\t\t\t\t\t\r\n\t\t\t\t\tiniciaOperacion();\r\n\t\t\t\t\ti = sesion.createQuery(\"SELECT u.id_node FROM Node u WHERE u.node_name = :seu\"); \r\n\t\t\t\t i.setString(\"seu\", node.getNode_name());\r\n\t\t\t\t \r\n\t\t\t\t ...
[ "0.6420574", "0.6184763", "0.61731505", "0.60548913", "0.602707", "0.602707", "0.599658", "0.59531355", "0.5931185", "0.5924084", "0.58571297", "0.58211464", "0.5792133", "0.5770525", "0.5759152", "0.5748599", "0.5709725", "0.56896317", "0.566942", "0.56367433", "0.5632217", ...
0.58026177
12
Set the ID of each virtual machine in order to get an unique virtual machine ID
public void assignIDtoVM(){ int count = 0; for(VirtualMachine aux : vms) aux.setId(id + Integer.toString(count++)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMachineID(int value) {\n this.machineID = value;\n }", "java.lang.String getMachineId();", "public String getMachineId()\n\t{\n\t\treturn machineId;\n\t}", "public int getMachineID() {\n return machineID;\n }", "public String vmwareMachineId() {\n return this.vmwar...
[ "0.6860014", "0.6573876", "0.6327339", "0.62619656", "0.61758655", "0.61295414", "0.612729", "0.6104605", "0.60151505", "0.5941158", "0.59160227", "0.59027016", "0.58677936", "0.58015823", "0.5796205", "0.5753831", "0.56721485", "0.56541985", "0.5653721", "0.5626829", "0.5615...
0.8165437
0
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() { desktop = new javax.swing.JPanel(); barraMenu = new javax.swing.JMenuBar(); raizArquivo = new javax.swing.JMenu(); menu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.route_config, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
We initialize a Decorator with existing pizza we need decorate
public PizzaDecorator(IPizza pizza) { mPizza = pizza; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ProductDecorator() {}", "protected ProductDecorator(Product prod) {\n\t\tproduct = prod;\n\t}", "public PizzaService() {\n this.pizzas = new ArrayList<>();\n counter = 0;\n pizzaIOHandler = new PizzaIOHandler();\n }", "public JsonFactory setInputDecorator(InputDecorator d)\n/* ...
[ "0.60749406", "0.5737223", "0.5622574", "0.5553513", "0.5460059", "0.54128754", "0.5379299", "0.53775924", "0.5358057", "0.535421", "0.5320362", "0.53197557", "0.53032553", "0.5239551", "0.5161494", "0.51542634", "0.5132685", "0.51325566", "0.51258075", "0.50945514", "0.50822...
0.80331683
0
Initializes a new OverflowInLiteralWarningMessage.
public OverflowInLiteralWarningMessage(@Nonnull String literalText) { super("Overflow in literal: " + Objects.requireNonNull(literalText, "literalText")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IntegerLiteral(Integer number)\n {\n this.literal = number; \n }", "public OverflowTransactionException(String message) {\n\t\tsuper(message);\n\t}", "public PriQOverflowException() {\n\t}", "public PriQOverflowException(String msg) {\n\t\tsuper(msg);\n\t}", "InvalidLiteralExp createInvalidLite...
[ "0.55744755", "0.54104364", "0.5394547", "0.5356798", "0.5335368", "0.5313899", "0.52807117", "0.51882726", "0.5177293", "0.5069285", "0.5024159", "0.4999921", "0.4995503", "0.499013", "0.4983445", "0.4976838", "0.4965331", "0.49468863", "0.49406064", "0.49348265", "0.4917438...
0.75400573
0
This method defines a way to sort a list from highscores to lower scores. This method makes it possible to use Collections.sort() to sort the higscoreslist in the HighscoresActivity. I found this way of sorting a list in the following video:
@Override public int compareTo(Highscore other) { Integer other_score = Integer.parseInt(other.score); Integer compared_score = Integer.parseInt(score); int compareInt = compared_score.compareTo(other_score); if (compareInt < 0) return 1; if (compareInt > 0) return -1; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortHighscores(){\n Collections.sort(highscores);\n Collections.reverse(highscores);\n }", "private void sort() {\n ScoreComparator comparator = new ScoreComparator();\n Collections.sort(scores, comparator);\n }", "public void sortHighScores(){\n for(int i=0; i<MAX_S...
[ "0.8071339", "0.7596275", "0.75950503", "0.74270767", "0.71305597", "0.7123387", "0.71214265", "0.70871276", "0.66462827", "0.6530787", "0.6499973", "0.6464894", "0.63644403", "0.634711", "0.6343313", "0.6326284", "0.63257235", "0.6304584", "0.6295809", "0.62856954", "0.62671...
0.0
-1
///////////////////////////////////////////////////////////////// Quick print methods that take in a printable item and a problem number. Only prints item if the given problem number is within the range of the min/max global variable problem numbers at the top of the file. Also prints the problem number before the actu...
static void p(String s, int probNumber) { if (probNumber >= minProbNumber && probNumber <= maxProbNumber) System.out.println(probNumber + ": " + s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printCheck();", "public void printItems();", "static void printQuestion(int questionNum) {\n\t System.out.println(multiChoice[questionNum][QUESTION]);\n\t int lastColumn = multiChoice[questionNum].length;\n\t for (int x = START_OF_CHOICES; x < lastColumn; x++) {\n\t System.out.println(\"\\...
[ "0.50891393", "0.5012183", "0.5006428", "0.49808544", "0.49779457", "0.49739325", "0.4925475", "0.48804575", "0.48575735", "0.48569506", "0.4855935", "0.4817655", "0.48157188", "0.48134956", "0.4801866", "0.47979218", "0.47971234", "0.47857377", "0.47689247", "0.4767739", "0....
0.492571
6
Deserialize an Avro record, recursing into its component fields and deserializing them as well. Fields of the record are matched by name against fields in the Hive row. Because Avro has some data types that Hive does not, these are converted during deserialization to types Hive will work with.
public Object deserialize(List<String> columnNames, List<TypeInfo> columnTypes, Writable writable, Schema readerSchema) throws AvroSerdeException { if(!(writable instanceof AvroGenericRecordWritable)) { throw new AvroSerdeException("Expecting a AvroGenericRecordWritable"); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Object deserializeStruct(GenericData.Record datum, Schema fileSchema, StructTypeInfo columnType)\n throws AvroSerdeException {\n List<TypeInfo> innerFieldTypes = columnType.getAllStructFieldTypeInfos();\n List<String> innerFieldNames = columnType.getAllStructFieldNames();\n List<Object> i...
[ "0.6149267", "0.59349495", "0.59320694", "0.5810518", "0.5697408", "0.55789536", "0.55415756", "0.5501582", "0.5438776", "0.5325396", "0.530681", "0.52594113", "0.5232177", "0.52260137", "0.52115047", "0.5169842", "0.5135791", "0.5132366", "0.51101863", "0.51001906", "0.50967...
0.53691834
9
The actual deserialization may involve nested records, which require recursion.
private List<Object> workerBase(List<Object> objectRow, Schema fileSchema, List<String> columnNames, List<TypeInfo> columnTypes, GenericRecord record) throws AvroSerdeException { for(int i = 0; i < columnNames.size(); i++) { TypeInfo columnType = columnTypes.get(i);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deserialize() {\n\t\t\n\t}", "public abstract Object deserialize(Object object);", "@Override\r\n\tprotected Object readObject() throws IOException, SerializeException {\r\n\t\treturn AdvancedDeserializerUtil.readObject(super.readObject());\r\n\t}", "protected abstract DBObject parse(InputStream ...
[ "0.66786516", "0.6089745", "0.60533047", "0.60033065", "0.5909134", "0.5904743", "0.5862021", "0.5809003", "0.57874405", "0.57543325", "0.57352793", "0.5629841", "0.55761683", "0.5563011", "0.55187947", "0.54967", "0.5492006", "0.5480992", "0.54592985", "0.5458148", "0.545229...
0.0
-1
No equivalent Java type for the backing structure, need to recurse and build a list
private Object deserializeStruct(GenericData.Record datum, Schema fileSchema, StructTypeInfo columnType) throws AvroSerdeException { List<TypeInfo> innerFieldTypes = columnType.getAllStructFieldTypeInfos(); List<String> innerFieldNames = columnType.getAllStructFieldNames(); List<Object> innerObjec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deepList() throws Exception;", "@Override\n\tCollection<T> internalElements() {\n\t\tCollection<T> values = new LinkedList<T>();\n\t\t\n\t\tfor(LinkedList<T> list : internalStorage.get(0).values()) {\n\t\t values.addAll(list);\t\n\t\t}\n\t\treturn values;\n\t}", "void testListMethods(Tester t) {\n...
[ "0.65258867", "0.5881786", "0.58757985", "0.5861125", "0.584949", "0.58354676", "0.58254945", "0.5801821", "0.57787275", "0.57787275", "0.5773934", "0.5673202", "0.56582004", "0.56335443", "0.5608105", "0.55641496", "0.55607694", "0.5537358", "0.55332893", "0.54973215", "0.54...
0.0
-1
Calculate tags individually since the schema can evolve and can have different tags. In worst case, both schemas are same and we would end up doing calculations twice to get the same tag
private Object deserializeUnion(Object datum, Schema fileSchema, Schema recordSchema, UnionTypeInfo columnType) throws AvroSerdeException { int fsTag = GenericData.get().resolveUnion(fileSchema, datum); // Determine index of value from fileSchema int rsTag = GenericData.get().r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testUnionOnSchemaUdfTypeEvolution2() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query_prefix =\n \" l1 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : int, c : chararray, j : int \" \n ...
[ "0.57316035", "0.5584445", "0.54323936", "0.5386859", "0.52988183", "0.5279264", "0.52212536", "0.52181536", "0.5133194", "0.5107148", "0.5018805", "0.49980962", "0.4921692", "0.49083903", "0.48458877", "0.48283702", "0.48273993", "0.48106754", "0.47973022", "0.4772517", "0.4...
0.0
-1
Need to check the original schema to see if this is actually a Fixed.
private Object deserializeList(Object datum, Schema fileSchema, Schema recordSchema, ListTypeInfo columnType) throws AvroSerdeException { if(recordSchema.getType().equals(Schema.Type.FIXED)) { // We're faking out Hive to work through a type system impedance mismatch. // Pull...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isFixedField(final String code) {\n return Global.FIXED_FIELDS.contains(code);\n }", "public IDatatype getFixed() { \n\t\treturn myFixed;\n\t}", "public boolean getFixed() {\r\n return fixed;\r\n }", "public Boolean getFixed() {\n return fixed;\n }", "public v...
[ "0.599232", "0.59246236", "0.5841498", "0.57720584", "0.56299376", "0.5597147", "0.5563856", "0.55239445", "0.54979014", "0.5393279", "0.5243989", "0.52395636", "0.521386", "0.52058953", "0.5194711", "0.5189252", "0.51821595", "0.518061", "0.517865", "0.5145433", "0.5142754",...
0.0
-1
Avro only allows maps with Strings for keys, so we only have to worry about deserializing the values
private Object deserializeMap(Object datum, Schema fileSchema, Schema mapSchema, MapTypeInfo columnType) throws AvroSerdeException { Map<String, Object> map = new HashMap<String, Object>(); Map<CharSequence, Object> mapDatum = (Map)datum; Schema valueSchema = mapSchema.getValueType(); TypeInfo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Map<String, Serializable> toMap();", "protected abstract T parseMap(Map<String, Object> values);", "public VehicleInfoAvro() {}", "@Test\n public void testMapWithSchema() {\n String json =\n \"{a: 6}\\n\" +\n \"{a: 5, m: null}\\n\" +\n \"{a: 4, m: {}}\\n\" +\n ...
[ "0.58813876", "0.5691998", "0.5605342", "0.5520687", "0.54979587", "0.5481394", "0.5438432", "0.5340661", "0.52511024", "0.5229736", "0.51934016", "0.518171", "0.5174014", "0.5170804", "0.5135496", "0.5101002", "0.5095132", "0.50888956", "0.5088591", "0.5068995", "0.50609624"...
0.6006657
0
author: rushi create_time : 2020/12/2110:31
public interface HistoryDataService { PageInfo<WaterHistoryDto> list(String code, String stationId, String startTime, String endTime, Integer pageSize, Integer pageNum); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "public void mo38117a() {\n }", "public void autoDetails() {\n\t\t\r\n\t}", "public void mo6081a() {\n }", "public void mo4359a() {\n }", "pr...
[ "0.5464929", "0.54009455", "0.533481", "0.52801883", "0.52737975", "0.52526397", "0.52422583", "0.5229774", "0.5223151", "0.5223151", "0.5223151", "0.5223151", "0.5223151", "0.5223151", "0.5223151", "0.5204214", "0.5201425", "0.5152121", "0.51468813", "0.51315755", "0.5091852...
0.0
-1
This is how we start the game. The user will always begin a game automatically.
public static void main(String[] args) { boolean stillPlaying = true; // the boolean above passes through the while function, which will start // the method newGame() while(stillPlaying==true){ // the stillPlaying may no longer still be equal to the newGame, as the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startGame() {\r\n this.setupGame();\r\n }", "public void startGame() {\n \t\ttimeGameStarted = System.nanoTime();\n \t\tisStarted = true;\n \n \t}", "private void startGame() {\n\t\tmain.next_module = new Game(main, inputs, gameSelectionData);\n\t}", "public void startGame() \n\t{\n\t\tgam...
[ "0.86527526", "0.8226983", "0.817351", "0.8116435", "0.81094915", "0.8109434", "0.80771655", "0.8009306", "0.79424804", "0.78908277", "0.78634", "0.7857645", "0.7857645", "0.7857645", "0.7846107", "0.7811488", "0.7766362", "0.7750641", "0.77325046", "0.7711288", "0.7692366", ...
0.0
-1
Facilitates tracking of outcomes (both good and bad) grouped by category. Implementations of this interface will likely distribute the counters a centralized metrics and alerting tool such as prometheus.
public interface OutcomeCounter { /** * Facilitates tracking of successful outcomes grouped by category. * @param category high level category for the outcome */ void success(String category); /** * Facilitates tracking of failure outcomes grouped by category. This can be things * that services c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int scoreForThisCategory(int category, int playerName) {\n\t\t// at start let the score be 0.\n\t\tint score = 0;\n\t\t// if player chose one to six we score++ every time we get that number\n\t\t// in the dice. that will give us how many that number player chose is\n\t\t// in the dice.\n\t\tif (category >=...
[ "0.54662645", "0.53188854", "0.52918845", "0.5183284", "0.51629937", "0.49980956", "0.49522138", "0.49355292", "0.49165225", "0.49015743", "0.48898664", "0.4888286", "0.48727733", "0.48501304", "0.48415765", "0.4752115", "0.4750144", "0.47229242", "0.46580756", "0.46511123", ...
0.6762334
0
Facilitates tracking of successful outcomes grouped by category.
void success(String category);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OutcomeCounter {\n\n /**\n * Facilitates tracking of successful outcomes grouped by category.\n * @param category high level category for the outcome\n */\n void success(String category);\n\n /**\n * Facilitates tracking of failure outcomes grouped by category. This can be things\n * ...
[ "0.60565335", "0.5655384", "0.55028", "0.5258272", "0.50686973", "0.5056213", "0.5042899", "0.50164056", "0.48631796", "0.48586622", "0.47833696", "0.47527713", "0.47391394", "0.4670086", "0.4661617", "0.45851853", "0.45562512", "0.455548", "0.4476646", "0.44724333", "0.44630...
0.6051263
1
Facilitates tracking of failure outcomes grouped by category. This can be things that services can automatically handle (e.g. invalid user input resulting in an appropriate error response) or things that cannot be worked around (e.g. calls to a database failing).
void failure(String category);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void persistentFailure(String category);", "public interface OutcomeCounter {\n\n /**\n * Facilitates tracking of successful outcomes grouped by category.\n * @param category high level category for the outcome\n */\n void success(String category);\n\n /**\n * Facilitates tracking of failure outcomes ...
[ "0.6644106", "0.6289827", "0.5805146", "0.5581279", "0.5227927", "0.515029", "0.51439464", "0.5133889", "0.5028317", "0.49903747", "0.4936692", "0.4924528", "0.4920604", "0.48794723", "0.48139802", "0.48037523", "0.47830167", "0.47364175", "0.47256213", "0.47236753", "0.47182...
0.6608875
1
Facilitates tracking of persistent failure outcomes grouped by category. This can be things that services can automatically handle (e.g. invalid user input resulting in an appropriate error response) or things that cannot be worked around (e.g. calls to a database failing).
void persistentFailure(String category);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void failure(String category);", "public interface OutcomeCounter {\n\n /**\n * Facilitates tracking of successful outcomes grouped by category.\n * @param category high level category for the outcome\n */\n void success(String category);\n\n /**\n * Facilitates tracking of failure outcomes grouped by...
[ "0.63820785", "0.627229", "0.5645359", "0.54415643", "0.5037501", "0.4994895", "0.4957673", "0.494885", "0.48897478", "0.48585218", "0.48250207", "0.47875538", "0.4736842", "0.4676967", "0.46293962", "0.46225423", "0.45916134", "0.45915228", "0.4575089", "0.45684618", "0.4550...
0.7263361
0
Creates new form TabelaDoces
public TabelaDoces() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void carregarTabela() {\n try {\n\n Vector<String> cabecalho = new Vector();\n cabecalho.add(\"Id\");\n cabecalho.add(\"Nome\");\n cabecalho.add(\"Telefone\");\n cabecalho.add(\"Titular\");\n cabecalho.add(\"Data de Nascimento\");\n\n...
[ "0.7066111", "0.7027649", "0.6812307", "0.679385", "0.67789996", "0.67516375", "0.6713413", "0.6656002", "0.665043", "0.66401553", "0.65582633", "0.6514978", "0.6429661", "0.6416529", "0.6410968", "0.64057714", "0.6383386", "0.6373116", "0.6365281", "0.6353677", "0.632883", ...
0.6872932
2
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() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new java...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7318655", "0.7289971", "0.7289971", "0.7289971", "0.72860885", "0.7247684", "0.7213551", "0.72080934", "0.7195069", "0.7189731", "0.7183451", "0.71579945", "0.7147311", "0.7092687", "0.70798934", "0.7055229", "0.69868284", "0.6976656", "0.6954658", "0.6952896", "0.69449455...
0.0
-1
Created by lenoubun16 on 6/28/16.
public interface Universal { supprotBrands(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Ov...
[ "0.6027413", "0.5978293", "0.5946132", "0.5837613", "0.5774127", "0.57532895", "0.57532895", "0.5751899", "0.57300913", "0.5698467", "0.5694823", "0.56753397", "0.5659542", "0.5659271", "0.5648652", "0.56393856", "0.56314623", "0.56224334", "0.5607537", "0.55966544", "0.55838...
0.0
-1
Assignment1 Basic Calculator creation
public static void main(String[] args) { int num1 = 100; int num2 = 50; CalcOperation calc = new CalcOperation(); System.out.println("Addition of "+num1+" and "+num2+" is: "+calc.addition(num1, num2)); System.out.println("Subraction of "+num1+" and "+num2+" is: "+calc.subraction(num1, num2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Calculator () {\n\t\ttotal = 0; // not needed - included for clarity\n\t\thistory = \"0\";\n\t}", "public Calculator() {\r\n\t\tthis.operator = new Addition();\r\n\t}", "public Calculator () {\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t\thistory = \"\" + 0;\r\n\t}", "private void ca...
[ "0.7361307", "0.730372", "0.72532547", "0.7138051", "0.70691025", "0.70679605", "0.70531946", "0.7049781", "0.7049601", "0.70121783", "0.6964138", "0.6958979", "0.6862381", "0.6825505", "0.6752062", "0.66512966", "0.6634253", "0.6613855", "0.659754", "0.6573969", "0.65388334"...
0.63620347
38
POST /cuentas : Create a new cuenta.
@PostMapping("/cuentas") @Timed public ResponseEntity<Cuenta> createCuenta(@RequestBody Cuenta cuenta) throws URISyntaxException { log.debug("REST request to save Cuenta : {}", cuenta); if (cuenta.getId() != null) { throw new BadRequestAlertException("A new cuenta cannot already have...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@PostMapping(consumes=MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.CREATED)\n public Taco postTaco(@RequestBody Taco taco) {\n return tacoRepo.save(taco);\n }", "@PostMapping(\"/cotacaos\")\n @Timed\n public ResponseEntity<CotacaoDTO> createCotacao(@Valid @RequestBody Cota...
[ "0.6382239", "0.6357133", "0.62767345", "0.625853", "0.61889255", "0.6161004", "0.6160519", "0.61500204", "0.6149061", "0.6088773", "0.5997038", "0.5930025", "0.5904956", "0.58966243", "0.58861494", "0.5884503", "0.58837426", "0.5877972", "0.5872957", "0.5868343", "0.5862943"...
0.7967194
0
GET /cuentas : get all the cuentas.
@GetMapping("/cuentas") @Timed public ResponseEntity<List<Cuenta>> getAllCuentas(Pageable pageable) { log.debug("REST request to get a page of Cuentas"); Page<Cuenta> page = cuentaRepository.findAll(pageable); HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/conto-contabiles\")\n @Timed\n public List<ContoContabile> getAllContoContabiles() {\n log.debug(\"REST request to get all ContoContabiles\");\n return contoContabileService.findAll();\n }", "@GetMapping(\"/contabancarias\")\n @Timed\n public List<ContabancariaDTO> get...
[ "0.6981988", "0.6779703", "0.6729244", "0.6696365", "0.6468678", "0.63208836", "0.63166785", "0.63166785", "0.63162893", "0.6274065", "0.62500334", "0.6217827", "0.6176035", "0.61564475", "0.61284435", "0.60940903", "0.6080012", "0.6079873", "0.60796255", "0.60633594", "0.602...
0.7213445
0
GET /cuentas/:id : get the "id" cuenta.
@GetMapping("/cuentas/{id}") @Timed public ResponseEntity<Cuenta> getCuenta(@PathVariable Long id) { log.debug("REST request to get Cuenta : {}", id); Optional<Cuenta> cuenta = cuentaRepository.findById(id); return ResponseUtil.wrapOrNotFound(cuenta); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/cotacaos/{id}\")\n @Timed\n public ResponseEntity<CotacaoDTO> getCotacao(@PathVariable Long id) {\n log.debug(\"REST request to get Cotacao : {}\", id);\n CotacaoDTO cotacaoDTO = cotacaoService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(cotacaoDT...
[ "0.7104891", "0.7095711", "0.68921643", "0.6704356", "0.67003196", "0.6666103", "0.6657157", "0.6548072", "0.65345556", "0.6530136", "0.64861405", "0.6456585", "0.6448934", "0.64243627", "0.64179873", "0.6415991", "0.64096653", "0.6407327", "0.6388686", "0.63838786", "0.63594...
0.8057066
0
DELETE /cuentas/:id : delete the "id" cuenta.
@DeleteMapping("/cuentas/{id}") @Timed public ResponseEntity<Void> deleteCuenta(@PathVariable Long id) { log.debug("REST request to delete Cuenta : {}", id); cuentaRepository.deleteById(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DeleteMapping(\"/cotacaos/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCotacao(@PathVariable Long id) {\n log.debug(\"REST request to delete Cotacao : {}\", id);\n cotacaoService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, i...
[ "0.78127027", "0.77156365", "0.76986516", "0.7644242", "0.7476198", "0.7377897", "0.73516285", "0.735159", "0.72703904", "0.7259785", "0.7249647", "0.7225838", "0.7160329", "0.71423197", "0.7136225", "0.71342736", "0.7122609", "0.71061194", "0.70891327", "0.70891327", "0.7084...
0.8253912
0
/ Called on fragment creation
@SuppressLint("InflateParams") @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = (View) inflater.inflate(R.layout.customprogress, null); // Button buttonPositive = (Button) view.findViewById(R.id.dialog_button_positive); // Button button...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void onFragmentCreate(Bundle savedInstanceState) {\n\t}", "public void createFragment() {\n\n }", "@Override\r\n\tpublic void onFragmentStart() {\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n ...
[ "0.82305765", "0.7794558", "0.77377504", "0.73515123", "0.7327469", "0.7261706", "0.7217277", "0.7169862", "0.7145246", "0.71130484", "0.71102494", "0.7109482", "0.7068901", "0.704926", "0.6943264", "0.6942282", "0.69392055", "0.68874145", "0.6871476", "0.686645", "0.6855818"...
0.0
-1
/ Create dialog to non cancelable on touch outside
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); dialog.setCanceledOnTouchOutside(false); return dialog; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\t\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}", "public void setCanceledOnTouchOutside(boolean z) {\n Dialog dialog = getDialog();\n if (dialog != null) {\n dialog.setCanceledOnTouchOutside(z);\...
[ "0.7187542", "0.70707303", "0.68061244", "0.67119324", "0.66947424", "0.66727424", "0.6665413", "0.66391253", "0.6632265", "0.6619231", "0.66040266", "0.659516", "0.65759087", "0.65660805", "0.65644413", "0.65434", "0.65434", "0.65417796", "0.65233713", "0.6498459", "0.649845...
0.75053596
0
/ Dismiss the dialog on button click
@Override public void onClick(View iView) { if(mClickListener!= null){ switch (iView.getId()) { // case R.id.dialog_button_positive: // mClickListener.onCustomDialogClickView(true); // break; // case R.id.dialog_button_negative: // mClickListener.onCustomDialogClickView(false); // break; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onBtnClick() {\n dialog.dismiss();\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\t\tdialog.dis...
[ "0.8485972", "0.7935448", "0.79240036", "0.79159313", "0.79159313", "0.79159313", "0.7913187", "0.7905764", "0.7905764", "0.78839546", "0.78839546", "0.78663", "0.7863912", "0.7863912", "0.7863912", "0.7863912", "0.7863912", "0.7863912", "0.7863912", "0.7863912", "0.7859303",...
0.0
-1
Creates new form Recepcionist
public Recepcionist() { super("Recepcionista"); initComponents(); this.setLocationRelativeTo(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void nuevaRestriccion(RestricionPredio cd) {\n Map<String, List<String>> params = null;\n List<String> p = null;\n if (cd != null) {\n params = new HashMap<>();\n p = new ArrayList<>();\n p.add(cd.getId() + \"\");\n params.put(\"idRestriccion\...
[ "0.6504158", "0.64332914", "0.63468075", "0.63296", "0.6290332", "0.62737936", "0.62718016", "0.6240401", "0.6236225", "0.61726207", "0.6165858", "0.61586106", "0.61381304", "0.6092467", "0.6091782", "0.60891765", "0.6083704", "0.6071326", "0.60619026", "0.60542494", "0.60370...
0.5630236
88
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() { jLabel1 = new javax.swing.JLabel(); RegistrarR = new javax.swing.JButton(); RegistrarH = new javax.swing.JButton(); Atras = ne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73195875", "0.7291065", "0.7291065", "0.7291065", "0.7286258", "0.7248489", "0.7213822", "0.7208757", "0.7195916", "0.7190243", "0.7184025", "0.71591616", "0.7148041", "0.70930153", "0.7080625", "0.7056986", "0.6987694", "0.69770867", "0.6955136", "0.69538426", "0.69452894...
0.0
-1
allow click based slot select
@Override public void e_on_mouse_click(EMouseClick e){ NE_GUI_QuickslotBar.active_slot = id; Player.get_player_ent().set_active_item(item); //set player item and update data }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void click(int slot, ClickType type);", "public void selectSlot() {\n\t\t\r\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tselect();\n\t\te.consume();\n\t}", "private void mouseClickedHandler(java.awt.event.MouseEvent evt) {\n this.vuePlan.didSelectVueLieu(this);\n }", "public...
[ "0.78729063", "0.76515174", "0.6938467", "0.6927462", "0.6694402", "0.66159004", "0.65686435", "0.65567887", "0.6543168", "0.65402097", "0.6490037", "0.64751345", "0.64667857", "0.6459093", "0.6458234", "0.6457618", "0.6457618", "0.6457618", "0.6457618", "0.6457618", "0.64576...
0.6668593
5
private Lobby; Constructeur du serveur
public Server() throws IOException { try { this.serverSocket = new ServerSocket(this.port,100, InetAddress.getByName(host)); } catch (UnknownHostException e) { System.out.println("Erreur lors de la construction du serveur (Hôte inconnu) - Server Constructor Error"); e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Lobby() {\r\n\t\tobservers = new ArrayList<Observer>(); // Initialize the list of observers ( empty at the begining)\r\n\t}", "@PostMapping(value=\"/private\")\n\t\tpublic Long newLobby(@RequestBody User user) {\n\t\t\tlong id = lastId.incrementAndGet();\n\t\t\tLobby lob = new Lobby(user,true);\n\t\t\tlob...
[ "0.70495534", "0.6685492", "0.6445221", "0.6351479", "0.6323239", "0.62918067", "0.619239", "0.6192154", "0.6154054", "0.6029848", "0.5994723", "0.5970962", "0.5962677", "0.5956983", "0.5950939", "0.5932202", "0.59070307", "0.58808875", "0.58808875", "0.5848373", "0.58277965"...
0.0
-1
getter read the data
public String getName() { return Name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getData();", "String getData();", "Object getData();", "Object getData();", "public Object getData();", "public Object getData(){\n\t\treturn this.data;\n\t}", "@Override\r\n\t\tpublic Meta_data getData() {\n\t\t\treturn this.data;\r\n\t\t}", "Object getRawData();", "T getData() {\...
[ "0.7500836", "0.74236983", "0.7321372", "0.7321372", "0.7239403", "0.71680737", "0.7131784", "0.71301377", "0.7117341", "0.710859", "0.7076178", "0.7045705", "0.70246", "0.6981986", "0.6976977", "0.69682044", "0.6963913", "0.6944815", "0.69173324", "0.6916139", "0.69062895", ...
0.0
-1
setter: to change value
public void setName(String Name) { this.Name=Name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setValue(Object value) { this.value = value; }", "@Override\n public void setValue(Object val)\n {\n value = val;\n }", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "public void setValue(Object value);", "public void setValue(Object v...
[ "0.80279076", "0.7894674", "0.78135324", "0.7809386", "0.7804096", "0.77479726", "0.77045286", "0.7689544", "0.76861507", "0.76770014", "0.76695055", "0.7665675", "0.76557964", "0.76359034", "0.76239085", "0.76164204", "0.757401", "0.75712144", "0.75612324", "0.75512606", "0....
0.0
-1
bunu static eledimki obiri classlardan bunu ala bilim
public static Stage getPrimaryStage() { return primaryStage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private UsineJoueur() {}", "private static void cajas() {\n\t\t\n\t}", "public Cgg_jur_anticipo(){}", "public Pengenalan(){ //Constructor (Nama harus sama dengan Class)\n System.out.println(\"\\nConstructor : \");\n System.out.println(\"Dibutuhkan untuk pemanggilan saat diimport oleh Class lain a...
[ "0.6650792", "0.65955096", "0.6525954", "0.64154834", "0.63470554", "0.6344716", "0.62184036", "0.61952084", "0.61918634", "0.6189216", "0.6178026", "0.6145177", "0.6112665", "0.6109123", "0.60664666", "0.603115", "0.6008093", "0.6006936", "0.59881943", "0.598245", "0.597659"...
0.0
-1
Constructor used for a shared thread pool with the testbed server (since the amount of communication threads are equal to the amount of drones. The threads are never active at the same time so we may share them)
public World(ExecutorService threadPool, PackageService packageService){ this.droneThreads = threadPool; this.packageService = packageService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TestInvoker()\n {\n super(new TestClient(), new ThreadPoolExecutorImpl(3));\n }", "public Server(){\n this.tasks = new LinkedBlockingQueue<Task>();\n this.waitingPeriod = new AtomicInteger();\n }", "public LocalEventLoopGroup(int nThreads, ThreadFactory threadFactory) {\n/*...
[ "0.70247144", "0.67876834", "0.66524416", "0.66431165", "0.65462977", "0.6440099", "0.64189553", "0.63113594", "0.6277084", "0.6224094", "0.62135947", "0.62027687", "0.6171785", "0.6153451", "0.61464965", "0.61460185", "0.6129061", "0.6076021", "0.6050951", "0.6031403", "0.60...
0.5936052
29
Advances the world state with a given time interval if the goal has been reached, the world will stop advancing
public void advanceWorldState(float timeInterval, int nbTotalIterations, int nbSubIterations) throws IllegalArgumentException, IOException, InterruptedException { if(!isValidTimeInterval(timeInterval)) throw new IllegalArgumentException(INVALID_TIME_INTERVAL); // Set<Block> blockSet = this.getBlockSet(); // Sys...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public void setTime(UpodWorld w)\n{\n StateRepr sr = getState(w);\n sr.checkAgain(0);\n}", "public void move()\n {\n daysSurvived+=1;\n\n energy -= energyLostPerDay;\n\n Random generator = new Random();\n\n //losowo okreslony ruch na podstawie genomu\n int turn...
[ "0.5977702", "0.5922388", "0.5912376", "0.58888996", "0.58774364", "0.5813694", "0.57895327", "0.5762549", "0.57300586", "0.5718061", "0.57166", "0.57164395", "0.56875956", "0.56527364", "0.5649808", "0.56445265", "0.5632978", "0.56309503", "0.562134", "0.55959463", "0.559533...
0.5336667
48
Debugging method used to save data to a .txt file
protected static void errorLog(float error){ String logString = error + "\n"; try { Files.write(Paths.get("errorLog.txt"), logString.getBytes(), StandardOpenOption.APPEND); }catch (IOException e) { //exception handling left as an exercise for the reader } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void save() {\n\t\tWriteFile data = new WriteFile( this.name + \".txt\" );\n\t\ttry {\n\t\t\t data.writeToFile(this.toString());\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Couldn't print to file\");\n\t\t}\n\t}", "@Override\n public void writeDataToTxtFile() {\n\n }", "public ...
[ "0.71530825", "0.7026276", "0.70179546", "0.6862623", "0.66725874", "0.64944154", "0.64631075", "0.6441315", "0.6438276", "0.6421259", "0.6417696", "0.6416228", "0.63839245", "0.6334605", "0.63327837", "0.628616", "0.6273699", "0.62641245", "0.626331", "0.624932", "0.6173633"...
0.0
-1
Method to advance all the drones in the drone set for exactly one iteration step
private void advanceAllDrones(Set<Drone> droneSet, float deltaTime, int nbIterations) throws InterruptedException { //first set the time interval for all the drones for(Drone drone: droneSet){ drone.setNbIterations(nbIterations); drone.setDeltaTime(deltaTime); } //get the execution pool ExecutorServi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void moveAllDrones() {\n for (Pieces d : drones) {\n d.tryToMove(this);\n }\n }", "public void nextSet(){\n this.fillVector();\n }", "public void advanceSimulation () {\n\t\tstep_++;\n\t}", "public void nextIterate() {\n\tdd1[0] = POW2_53 * d1;\n\tdd1[1] = 0.0;\n\...
[ "0.708193", "0.5995467", "0.59043247", "0.5850788", "0.57860315", "0.57175976", "0.56844366", "0.5680103", "0.5665465", "0.56203234", "0.5601961", "0.55579966", "0.5545623", "0.5539911", "0.5492466", "0.54873914", "0.54304135", "0.53759485", "0.5368608", "0.53564197", "0.5355...
0.6709924
1
delivers and loads all the packages that can be loaded onto the drones and can be delivered to the gates
private void movePackages(){ //get the package set Set<Drone> droneSet = this.getDroneSet(); PackageService packageService = this.getPackageService(); //get all the packages that need to be delivered and are assigned a drone (these are the only //ones that need to be loaded and unloaded // Set<WorldDelivery>...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadPackages(Set<Drone> drones, Set<WorldDelivery> packages) {\n\t\t//get the map of all drones\n\t\tMap<String, Drone> droneMap = this.getDroneMap();\n\t\t//cycle trough all the packages, filter for all the packages that are not\n\t\t//delivered yet\n//\t\tSet<WorldDelivery> unDelivered = packages.st...
[ "0.682837", "0.6185023", "0.6112575", "0.5974199", "0.571184", "0.57100075", "0.5679005", "0.56440705", "0.56035537", "0.5599491", "0.5598046", "0.55764735", "0.5573713", "0.55622816", "0.5544941", "0.5540432", "0.5523782", "0.55085325", "0.5477119", "0.54524636", "0.5417995"...
0.69983274
0
unloads all the packages from the drones that can deliver their packages
private void unloadPackages(Set<Drone> drones){ //loop trough all the drones, check if they carry any packages for(Drone drone: drones){ if(drone.isDelivering()){ //check if the drone can deliver the package if(canDeliverPackage(drone)){ //unload the package drone.unloadPackage(); } } } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void movePackages(){\n\t\t//get the package set\n\t\tSet<Drone> droneSet = this.getDroneSet();\n\t\tPackageService packageService = this.getPackageService();\n\t\t//get all the packages that need to be delivered and are assigned a drone (these are the only\n\t\t//ones that need to be loaded and unloaded\n/...
[ "0.71861416", "0.6462892", "0.6109399", "0.60910827", "0.5891151", "0.58340514", "0.57990646", "0.57864106", "0.56855655", "0.562011", "0.561913", "0.56134826", "0.5602219", "0.55763537", "0.5458888", "0.5440192", "0.54323196", "0.54213995", "0.5418461", "0.54145545", "0.5380...
0.7674684
0
Loads all the packages onto the drones that can accept a new package and meet the requirements for loading a package
private void loadPackages(Set<Drone> drones, Set<WorldDelivery> packages) { //get the map of all drones Map<String, Drone> droneMap = this.getDroneMap(); //cycle trough all the packages, filter for all the packages that are not //delivered yet // Set<WorldDelivery> unDelivered = packages.stream().filter(p -> !...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void movePackages(){\n\t\t//get the package set\n\t\tSet<Drone> droneSet = this.getDroneSet();\n\t\tPackageService packageService = this.getPackageService();\n\t\t//get all the packages that need to be delivered and are assigned a drone (these are the only\n\t\t//ones that need to be loaded and unloaded\n/...
[ "0.6445072", "0.6041438", "0.600584", "0.5984931", "0.58047533", "0.5677413", "0.5665986", "0.55863065", "0.55528164", "0.55447555", "0.55377245", "0.551399", "0.5510169", "0.55094373", "0.5495627", "0.54793155", "0.54455805", "0.54185903", "0.5387882", "0.53777385", "0.53750...
0.6265223
1
Gets the package with the lowest delivery sequence number, as documented in the overseer the undelivered package with the lowest sequence number must be delivered first by the drone
private WorldDelivery getNextDelivery(String droneID, Set<WorldDelivery> undeliveredDeliveries){ WorldDelivery lowestSeqNbDelivery = null; long lowestSeqNb = Long.MAX_VALUE; for(WorldDelivery delivery: undeliveredDeliveries){ //check if this package is destined for the currently selected drone if(!droneID....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getFirstPack() {\n return packs.first().getNumber();\n }", "public String getMinSeqNo() throws Exception {\n return \"-1\";\n }", "@Override\n public Note getLowest() {\n if (this.sheet.isEmpty()) {\n throw new IllegalArgumentException(\"No note is added.\");\n }\n ...
[ "0.6334864", "0.5944542", "0.5817536", "0.5693289", "0.5648435", "0.5546768", "0.5546458", "0.55097044", "0.5488413", "0.54872584", "0.5466073", "0.5429319", "0.54126024", "0.5407268", "0.53896224", "0.53891724", "0.5381538", "0.53764904", "0.5360875", "0.5357922", "0.5354088...
0.7505602
0
Method that returns a set containing all the drones in the world
public Set<Drone> getDroneSet(){ return new HashSet<Drone>(this.drones.values()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Set<Point2D> getWallSet();", "private Set<WorldAirport> getAirportSet(){\n\t\treturn new HashSet<WorldAirport>(this.getAirportMap().values());\n\t}", "public Set<Restaurant> getSurroundingRestaurants(){\n\n Set<Restaurant> retval = new HashSet<>();\n for (Restaurant r : restaurants){\n ...
[ "0.63638246", "0.610953", "0.60642", "0.5999782", "0.5996449", "0.59819955", "0.5951194", "0.59331435", "0.5930912", "0.5912841", "0.58880264", "0.5843237", "0.58355933", "0.5813138", "0.58035886", "0.57982427", "0.57509637", "0.5749704", "0.5736432", "0.5728164", "0.5702013"...
0.69875175
0
Getter for the map of drones currently active in the world (key = drone id and value = drone with id)
private Map<String, Drone> getDroneMap(){ return this.drones; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HashMap<String, Door> getDoors() {\n return (doors);\n }", "private Map<String, DroneGuiState> getDroneGuiStates(Set<Drone> drones)\n\t{\n\t\t//generate the map containing the gui states\n\t\tMap<String, DroneGuiState> stateMap = new HashMap<>();\n\t\t//fill the map\n\t\tString key;\n\t\tDroneGuiS...
[ "0.66847014", "0.66510963", "0.64789563", "0.6147263", "0.5960614", "0.59212023", "0.5768772", "0.5659138", "0.5629676", "0.559073", "0.55602396", "0.5532207", "0.55226964", "0.5521848", "0.55214554", "0.54998416", "0.5465614", "0.5457558", "0.5451931", "0.5428578", "0.537724...
0.76865697
0
Getter for the map that contains all the airports in the world
private Map<Integer, WorldAirport> getAirportMap(){ return this.airports; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Set<WorldAirport> getAirportSet(){\n\t\treturn new HashSet<WorldAirport>(this.getAirportMap().values());\n\t}", "public GameMap map() {\n\t\treturn map;\n\t}", "public Grille getMap() {\n return map;\n }", "public static Map<String, Flight> getFlightMap() {\r\n return flightMap;\r\n }",...
[ "0.7064933", "0.6533955", "0.64571244", "0.6379224", "0.63673997", "0.6340586", "0.631509", "0.6311815", "0.627576", "0.6251775", "0.61941826", "0.6160322", "0.6152712", "0.61222184", "0.60664886", "0.6028689", "0.601656", "0.60097694", "0.59924906", "0.5963796", "0.59430623"...
0.8358337
0
Getter for the set consisting of all airports in the world
private Set<WorldAirport> getAirportSet(){ return new HashSet<WorldAirport>(this.getAirportMap().values()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Map<Integer, WorldAirport> getAirportMap(){\n\t\treturn this.airports;\n\t}", "public Set<String> getAirports() {\n Set<String> airports = new HashSet<>();\n AirportDataHolder.getInstance().\n getAirportDataMap().\n forEach(airport -> airports.add(airport.getIa...
[ "0.72837955", "0.72788537", "0.6935835", "0.690464", "0.68345284", "0.672168", "0.6720551", "0.6589061", "0.6553656", "0.6420315", "0.63485116", "0.63483274", "0.62790626", "0.62719965", "0.6162422", "0.6155319", "0.61358136", "0.6082628", "0.6047094", "0.6019902", "0.6010018...
0.86709595
0
Method that returns the drone in the world
public Drone getDrone() throws IOException { for (Drone drone : this.getDroneSet()) { return drone; } throw new IOException("No drone was found"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Town getDroghedaLocation1() {\n\t\treturn new Town(\"Louth\");\r\n\t}", "public World getWorld();", "World getWorld();", "public int getLand();", "public Pieces getDroneAt(double x, double y) {\n //first look for obstacle\n for (Pieces d : drones) {\n if(d instanceof Obstacl...
[ "0.6531954", "0.6369783", "0.61605626", "0.6157853", "0.6156647", "0.6112723", "0.6020834", "0.5965319", "0.59583324", "0.59583324", "0.5955602", "0.5949543", "0.5949424", "0.59318453", "0.58689", "0.58392924", "0.58364666", "0.5808641", "0.57906735", "0.578699", "0.5750777",...
0.6578041
0
Add all the drones in the collection to the world
public void addDrones(Collection<Drone> drones){ Map<String, Drone> droneMap = this.getDroneMap(); //add all the drones for(Drone drone: drones){ String ID =drone.getDroneID(); droneMap.put(ID, drone); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addItems() {\n for (int i = 0; i < 10; i++) {\n double offset = i/60d;\n mClusterManager.addItem(new CrumbClusterItem(new Crumb(new LatLng(5,-5 + offset))));\n }\n Log.d(TAG, \"All items added to map\");\n }", "public void addToWorld() {\n world()...
[ "0.5778272", "0.56956816", "0.56372213", "0.54764366", "0.54317635", "0.54165417", "0.5411768", "0.5378527", "0.5376216", "0.53746307", "0.53720516", "0.5371379", "0.5357316", "0.53349525", "0.53339535", "0.5330447", "0.53191155", "0.5311629", "0.53089476", "0.5302092", "0.52...
0.68499625
0
Adds a single drone to the set that contains all drones
public void addDrone(Drone drone){ Set<Drone> droneSet = this.getDroneSet(); droneSet.add(drone); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addDrones(Collection<Drone> drones){\n\t\tMap<String, Drone> droneMap = this.getDroneMap();\n\t\t//add all the drones\n\t\tfor(Drone drone: drones){\n\t\t\tString ID =drone.getDroneID();\n\t\t\tdroneMap.put(ID, drone);\n\t\t}\n\t}", "public void addDrone(Drone d) {\r\n\t\tthis.freeDrones.add(d);\r\n\...
[ "0.7112552", "0.6762587", "0.66066283", "0.57908785", "0.5732432", "0.55568117", "0.548008", "0.5425746", "0.53917795", "0.53900945", "0.5375353", "0.5333869", "0.5319658", "0.5250337", "0.52218676", "0.5219163", "0.5138492", "0.5135542", "0.51147985", "0.5108712", "0.5100896...
0.7655252
0
Adds an airport to the world, airports are only defined by their location and orientation the world assigns the airport an unique identifier to check packet transportation
public int addAirport(Vector location, Vector heading){ //get the parameters needed for airport generation Map<Integer, WorldAirport> airports = this.getAirportMap(); //first check if the width and length are already defined, if not define them now int newID = this.getNextAirportID(); //generate the airport ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addNewAirplane(){\r\n\t\tuiAirplaneModel.setNewAirplane(new ArrayList<UiAirplaneModel>());\r\n\t\tUiAirplaneModel plane=new UiAirplaneModel();\r\n\t\tplane.setAirplaneModel(\"\");\r\n\t\tplane.setGroupIDs(new ArrayList<String>());\r\n\t\tplane.setStatusCheck(false);\r\n\t\tplane.setApNamesList(new Arra...
[ "0.6074592", "0.58794343", "0.583797", "0.5805021", "0.578951", "0.57443345", "0.57185787", "0.57096", "0.57061803", "0.5634569", "0.5618254", "0.5607705", "0.5522105", "0.55078846", "0.5499042", "0.54774934", "0.5473008", "0.5441377", "0.5427316", "0.54177475", "0.5415404", ...
0.76981276
0
Getter for the next ID to be given to a newly generated airport
private int getNextAirportID(){ return this.airportIDCounter++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getNextID() {\n String id = \"am\" + Integer.toString(nextID);\n nextID++;\n return id;\n }", "private static int getNextID() {\n return persons.get(persons.size() - 1).getId() + 1;\n }", "private int nextValidID() {\n return nextId++;\n }", "publ...
[ "0.7941326", "0.7609989", "0.7596231", "0.7533867", "0.7518224", "0.7429992", "0.7292761", "0.72858983", "0.7253678", "0.72432667", "0.7164213", "0.71464187", "0.7072395", "0.7058357", "0.7056365", "0.70496356", "0.70107985", "0.6850662", "0.68349963", "0.6798125", "0.6790693...
0.85274994
0
Getter for the length of the runways of the airport
private float getRunwayLength() { return runwayLength; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getWayLength();", "public int getRoadLength() {\n \t\treturn roadLength;\n \t}", "public long length() {\n return kmers_num;\n }", "private float getRunwayWidth() {\n\t\treturn runwayWidth;\n\t}", "public double getLength();", "public double getLength() {\r\n\t\treturn length;\r\n\t}", "p...
[ "0.8026333", "0.77219343", "0.70798063", "0.7020263", "0.70163983", "0.6968394", "0.6964404", "0.6962866", "0.6961188", "0.694596", "0.6943159", "0.693733", "0.692151", "0.6904713", "0.6842307", "0.6837937", "0.6794158", "0.6788014", "0.6784725", "0.6741695", "0.66899204", ...
0.80683875
0
Setter for the length of the runways, it can be only set once, after that all different calls are ignored
public void setRunwayLength(float runwayLength) { if(this.getRunwayLength() != 0f){ return; } this.runwayLength = runwayLength; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setLength(int length);", "public void setLength(long length);", "public void setLength(long length);", "synchronized void setLength(int length) {\n this.length = length;\n }", "public void setLength(int length)\n {\n this.length = length;\n }", "public void set...
[ "0.7214479", "0.7079896", "0.7079896", "0.70567924", "0.6909963", "0.689991", "0.689991", "0.68816006", "0.6836057", "0.68053323", "0.67964506", "0.6794086", "0.66766554", "0.66700757", "0.6643616", "0.6643616", "0.6643616", "0.6606172", "0.65916806", "0.6569242", "0.65561783...
0.6722649
12
Getter for the width of the runways of the airports in this world
private float getRunwayWidth() { return runwayWidth; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getWidth() {\n return (roomWidth);\n }", "private float getRunwayLength() {\n\t\treturn runwayLength;\n\t}", "public int getWidth() {\n return getTileWidth() * getWidthInTiles();\n }", "public int getWidth() {\n\treturn width;\n\t//return myOven.getWidth();\n}", "public int getRoadLe...
[ "0.7207366", "0.72051644", "0.6882976", "0.68719774", "0.6856022", "0.6789639", "0.6728506", "0.6724313", "0.6697226", "0.6697226", "0.6697226", "0.6690005", "0.6679374", "0.66771054", "0.666156", "0.6657896", "0.6656242", "0.6649573", "0.664245", "0.6625007", "0.6614293", ...
0.7898029
0
Setter for the witdh of the runway, can only be set once, all calls after the initial setting will be ignored
public void setRunwayWidth(float runwayWidth) { if(this.runwayWidth != 0f){ return; } this.runwayWidth = runwayWidth; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private float getRunwayWidth() {\n\t\treturn runwayWidth;\n\t}", "public void setW(double w) {\n this.w = w;\n }", "public void setW(int w) {\n\t\tthis.W = w;\n\t}", "public void setWitdh(int newValue)\n {\n width = newValue;\n }", "public void setRunwayLength(float runwayLength) {\n...
[ "0.7081472", "0.7013609", "0.7007345", "0.6741886", "0.66709834", "0.65618014", "0.65205044", "0.6473318", "0.6439058", "0.6415103", "0.6407888", "0.6402681", "0.6368425", "0.6260179", "0.62332135", "0.6229053", "0.61872", "0.6142542", "0.6138304", "0.6107639", "0.5990594", ...
0.7588189
0
Checks if the current drone can deliver its specified package
private boolean canDeliverPackage(Drone drone){ //check first if drone has the required velocity, if not skip the rest of the calc Vector droneVelocity = drone.getVelocity(); if(droneVelocity.getSize() > MAX_LANDING_VELOCITY){ return false; } //check if the drone is currently at the airport where the pac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean canPickUpPackage(Drone drone, WorldDelivery delivery){\n\t\t//check if the drone ID and the delivery drone ID match\n\t\tString droneID = drone.getDroneID();\n\t\tString deliveryDroneID = delivery.getDeliveryDroneID();\n\t\t//if not return false\n\t\tif(!droneID.equals(deliveryDroneID)){\n\n\t\t\tr...
[ "0.73630786", "0.66127425", "0.66026473", "0.64381295", "0.6420831", "0.6234046", "0.6204343", "0.60156286", "0.60156286", "0.5971991", "0.5969944", "0.5913901", "0.5902701", "0.5890156", "0.58368224", "0.58368224", "0.5797441", "0.5772619", "0.57488817", "0.57252276", "0.569...
0.7673819
0
Checks if the drone can pick up the specified package
private boolean canPickUpPackage(Drone drone, WorldDelivery delivery){ //check if the drone ID and the delivery drone ID match String droneID = drone.getDroneID(); String deliveryDroneID = delivery.getDeliveryDroneID(); //if not return false if(!droneID.equals(deliveryDroneID)){ return false; } //get ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasPackageName();", "boolean isPackageInstaller(String packageName);", "boolean canQueryPackage(@NonNull AndroidPackage querying, String potentialTarget);", "public boolean isMixPackagesPresent()\n\t{\n\t\ttry\n\t\t{\n\t\t\tArrayList<Integer> versions = new ArrayList<Integer>();\n\t\t\t\n\t\t\tif(Pac...
[ "0.69787717", "0.63858336", "0.63392746", "0.6236497", "0.6234771", "0.62280124", "0.6216046", "0.6176979", "0.6176979", "0.60254484", "0.6022752", "0.6003098", "0.59792274", "0.5978767", "0.5872595", "0.5867405", "0.57346666", "0.573281", "0.56979626", "0.5677875", "0.566454...
0.67989874
1
Checks if there are any drones that have crashed during the time step simulated
private void checkForCrashes(Set<Drone> droneSet){ //first check if the drones have crashed with the ground checkForGroundCollisions(droneSet); //then if they have collided with each other checkForDroneCollisions(droneSet); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkForDroneCollisions(Set<Drone> droneSet) {\n\t\t//then check if any drone is in a 5m vicinity of another\n\t\t//first cast the set to a list\n\t\tList<Drone> droneList = new ArrayList<>(droneSet);\n\t\t//create a list to store the crashed indices\n\t\tSet<Integer> crashedDroneIndices = new HashSet...
[ "0.61541873", "0.6102076", "0.608928", "0.6086452", "0.6006798", "0.59654415", "0.5931128", "0.5916985", "0.5896132", "0.5891459", "0.5854708", "0.5811212", "0.5806581", "0.57809496", "0.5777445", "0.5633998", "0.5606834", "0.55766314", "0.5542944", "0.5536159", "0.5526735", ...
0.6865198
0
Checks if the drones have crashed with the ground if so it removes the drones from the world object set and removes it from the provided drone set (need for integrity)
private void checkForGroundCollisions(Set<Drone> droneSet) { for(Drone drone: droneSet){ //if so, delete the drone from the set if(drone.checkCrash()){ this.removeDrone(drone); droneSet.remove(drone); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkForDroneCollisions(Set<Drone> droneSet) {\n\t\t//then check if any drone is in a 5m vicinity of another\n\t\t//first cast the set to a list\n\t\tList<Drone> droneList = new ArrayList<>(droneSet);\n\t\t//create a list to store the crashed indices\n\t\tSet<Integer> crashedDroneIndices = new HashSet...
[ "0.7277322", "0.67283237", "0.64582825", "0.6260142", "0.60606223", "0.6022754", "0.59351957", "0.59207374", "0.59059197", "0.5887297", "0.58612883", "0.58292705", "0.5825468", "0.5762214", "0.5717524", "0.5689808", "0.56777906", "0.5650612", "0.5624451", "0.5613867", "0.5548...
0.7674961
0
Checks the drone set for colliding drones a drone collides if the centers of two drones are within the specified crash distance of 5 meters (see static variable CRASH_DISTANCE)
private Set<Drone> collisionDetection(Set<Drone> droneSet){ //convert the set of drones to an array list List<Drone> droneList = new ArrayList<>(droneSet); Set<Drone> crashedDrones = new HashSet<>(); int nbDrones = droneList.size(); //cycle trough all the drones and check if they have crashed for(int i = 0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkForDroneCollisions(Set<Drone> droneSet) {\n\t\t//then check if any drone is in a 5m vicinity of another\n\t\t//first cast the set to a list\n\t\tList<Drone> droneList = new ArrayList<>(droneSet);\n\t\t//create a list to store the crashed indices\n\t\tSet<Integer> crashedDroneIndices = new HashSet...
[ "0.7388294", "0.6865687", "0.6405549", "0.63297504", "0.632591", "0.62573415", "0.614103", "0.60879", "0.60424465", "0.6023314", "0.58697736", "0.58658624", "0.5860243", "0.5844264", "0.58197165", "0.5796918", "0.57867163", "0.5768146", "0.5726602", "0.57161534", "0.56796247"...
0.6850494
2
Checks for drones that have collided with each other and removes the collided drones from the world object set as well from the provided drone set
private void checkForDroneCollisions(Set<Drone> droneSet) { //then check if any drone is in a 5m vicinity of another //first cast the set to a list List<Drone> droneList = new ArrayList<>(droneSet); //create a list to store the crashed indices Set<Integer> crashedDroneIndices = new HashSet<>(); //get the si...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkForGroundCollisions(Set<Drone> droneSet) {\n\t\tfor(Drone drone: droneSet){\n\t\t\t//if so, delete the drone from the set\n\t\t\tif(drone.checkCrash()){\n\t\t\t\tthis.removeDrone(drone);\n\t\t\t\tdroneSet.remove(drone);\n\t\t\t}\n\t\t}\n\t}", "private Set<Drone> collisionDetection(Set<Drone> dr...
[ "0.7201494", "0.7066727", "0.6351003", "0.6123763", "0.5727197", "0.5655017", "0.5653279", "0.55904317", "0.55435395", "0.5497836", "0.53741", "0.53493136", "0.53155446", "0.5310197", "0.5291823", "0.5273596", "0.52574515", "0.521238", "0.52042514", "0.5197962", "0.51648426",...
0.77290463
0
Remove a given drone from the world object set
private void removeDrone(Drone drone){ this.getDroneSet().remove(drone); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeFromWorld(World world);", "public void remove(){\n Api.worldRemover(getWorld().getWorldFolder());\n }", "void remove(GeometricalObject object);", "public void remove(GeometricalObject object);", "public void removeByObject()\r\n\t{\n\t}", "public void removeWorld(String name){...
[ "0.73667926", "0.7136338", "0.6736631", "0.67249596", "0.65017205", "0.64143443", "0.62439233", "0.61957824", "0.6182204", "0.61703944", "0.6170011", "0.6159048", "0.61285186", "0.61025953", "0.6067281", "0.6040079", "0.6015921", "0.60109925", "0.60035396", "0.5986597", "0.59...
0.77663654
0
Checks if all the packages are delivered
private boolean allPackagesDelivered(){ PackageService service = this.getPackageService(); Set<WorldDelivery> packages = service.getAllUndeliveredWorldDeliveries(); for(WorldDelivery delivery : packages){ if(!delivery.isDelivered()){ return false; } } //TODO uncomment if packages are implemented ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean isDelivered();", "boolean isUseAllLatestPacks();", "@Override\n\tpublic boolean isDeliverable() {\n\t\treturn true;\n\t}", "public boolean isMixPackagesPresent()\n\t{\n\t\ttry\n\t\t{\n\t\t\tArrayList<Integer> versions = new ArrayList<Integer>();\n\t\t\t\n\t\t\tif(PackageInformation.ge...
[ "0.6258956", "0.6219398", "0.6125592", "0.6048389", "0.602688", "0.59318316", "0.59318316", "0.58981454", "0.58689976", "0.5848269", "0.5836706", "0.5832282", "0.5829562", "0.582522", "0.5823706", "0.57344985", "0.56778383", "0.56734735", "0.5609354", "0.5607837", "0.559741",...
0.8266159
0
Getter for the approximated cube path, each cube lies within a probability sphere of 5 meters from the indicated location
public Path getApproxPath() { return approxPath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Polygon getPolygon(double eyeDistance){\n //define the front two verticies of the currentTrack\n Point3D track_vertex0 = currentTrack.getVertex(0);\n Point3D track_vertex1 = currentTrack.getVertex(1);\n //use center point to define the center of the sphape\n int cubeSize =...
[ "0.56390756", "0.5192568", "0.5080845", "0.50124055", "0.49725425", "0.4949026", "0.4941392", "0.4887047", "0.48552537", "0.48513374", "0.4815036", "0.4807121", "0.48038736", "0.47810492", "0.4777604", "0.47745332", "0.47593683", "0.47493184", "0.4722798", "0.46945015", "0.46...
0.48254004
10
Setter for the approximated cube path (see getter for more info)
protected void setApproxPath(Path approxPath) { this.approxPath = approxPath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setPath(){\r\n // get the reversed path\r\n ArrayList<Grid> reversedPath = new ArrayList<>();\r\n int index = _endIndex;\r\n reversedPath.add(_map.get_grid(index));\r\n while(index != _startIndex){\r\n index = _map.get_grid(index).get_parent();\r\n ...
[ "0.5572998", "0.54776", "0.54004794", "0.5206829", "0.51716906", "0.5107201", "0.50722086", "0.50617903", "0.505325", "0.4969556", "0.49649104", "0.49389416", "0.49387485", "0.49051678", "0.48968044", "0.48950803", "0.4884079", "0.4848277", "0.48319402", "0.48301888", "0.4814...
0.5593335
0
Getter for all the threads used to simulate a world
private ExecutorService getDroneThreads() { return droneThreads; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getThreads() { return threads; }", "public void threadManager() {\n /**Retrieve all data stored in \"preference\"*/\n if (mNodeThingUtils.getAllSavedThing() != null) {\n\n Map<String, String> getAllSensor = mNodeThingUtils.getAllSavedThing();\n Set<String> keys = g...
[ "0.6747184", "0.64832205", "0.6411265", "0.6353192", "0.62141025", "0.6205777", "0.5976391", "0.59012145", "0.5790679", "0.57699174", "0.571801", "0.5692424", "0.5688684", "0.56465393", "0.5643335", "0.5638747", "0.5634748", "0.5611224", "0.55971736", "0.5571494", "0.55668247...
0.6368815
3
Checks if the provided time interval is valid
private boolean isValidTimeInterval(float timeInterval){ return timeInterval > 0.0f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isSetTimeInterval();", "public static boolean validateTime(String validTill) {\n\t\treturn true;\n\t}", "public boolean validateTime(){\n if(startSpinner.getValue().isAfter(endSpinner.getValue())){\n showError(true, \"The start time can not be greater than the end time.\");\n ...
[ "0.6776741", "0.67454785", "0.6744026", "0.67341423", "0.65985477", "0.6527557", "0.6475676", "0.64705884", "0.64551675", "0.6403639", "0.6372456", "0.6369489", "0.6358195", "0.6344356", "0.6341403", "0.6246308", "0.6231602", "0.6229591", "0.62265056", "0.62180793", "0.620266...
0.7970218
0
Getter for the package service used in the world the service is responsible for assigning packages to the drones and notifying the world about which packages should be given to which drone
private PackageService getPackageService() { return packageService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ServicesPackage getServicesPackage();", "protected abstract String getPackageName();", "public interface LabyService {\n\n /**\n * Retrieves the version of the plugin.\n *\n * @return The plugin version.\n */\n String getVersion();\n\n /**\n * Retrieves the debugger of the plugin.\n *\n * @ret...
[ "0.66902304", "0.61024857", "0.60959935", "0.6095912", "0.60082436", "0.5888177", "0.58539516", "0.5840237", "0.58378077", "0.5762794", "0.5736213", "0.5722792", "0.5699582", "0.56402665", "0.5639112", "0.5622786", "0.56066483", "0.5600282", "0.559794", "0.55929196", "0.55925...
0.76145905
0
Creates a new gui queue element, these elements are used to be put in the rendering queue for the GUI. This allows us to decouple the testbed from the renderer (we render on a different thread) The renderer reads the queue elements one by one (every 1/20 s) and renders the produced frame
public GUIQueueElement getGuiElements(){ //retrieve the needed sets Set<Drone> drones = this.getDroneSet(); // Set<Block> blocks = this.getBlockSet(); //no blocks in the world Set<WorldAirport> airports = this.getAirportSet(); Set<WorldDelivery> deliveries = this.getPackageService().getSubmittedWorldDeliveries...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void createGui() {\r\n\t\tEventQueue.invokeLater( new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tGui window = new Gui();\r\n\t\t\t\t\twindow.frame.setVisible( true );\r\n\t\t\t\t\twindow.videoFrame.addKeyListener( window );\r\n\t\t\t\t} catch ( Exception e ) {\r\n\t\t\t\t...
[ "0.62946963", "0.61831546", "0.58525056", "0.5823014", "0.58225596", "0.5785936", "0.57610184", "0.5735872", "0.57284415", "0.57272846", "0.57123655", "0.5695394", "0.56879115", "0.56739336", "0.5662782", "0.56442875", "0.56182355", "0.55748886", "0.55574197", "0.5555441", "0...
0.60991704
2
Creates a map of drone gui states with as the key the drone ID and value the state of the drone needed to render for the GUI
private Map<String, DroneGuiState> getDroneGuiStates(Set<Drone> drones) { //generate the map containing the gui states Map<String, DroneGuiState> stateMap = new HashMap<>(); //fill the map String key; DroneGuiState value; for(Drone drone: drones){ //get the ID, position and orientation of the drone k...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<Integer, Color> getStates(){\n return myStates;\n }", "public String getDroneState() {\n return \"mid:\" + mid +\n \";x:\" + x +\n \";y:\" + y +\n \";z:\" + z +\n \";pitch:\" + pitch +\n \";roll:\" + roll +\n ...
[ "0.57111585", "0.5541443", "0.5534375", "0.55225223", "0.5512344", "0.5476503", "0.5455686", "0.5393201", "0.53851014", "0.53828347", "0.53060144", "0.52869016", "0.52847517", "0.52650535", "0.52267456", "0.5212023", "0.5150567", "0.5102843", "0.5102467", "0.50770265", "0.507...
0.7626587
0
Generates a set of airport states for the GUI, used for rendering the airports present within the world
private Set<AirportGuiState> getAirportGuiStates(Set<WorldAirport> airports){ //create the set to store all the states Set<AirportGuiState> stateSet = new HashSet<>(); for(WorldAirport airport: airports){ //create the entry AirportGuiState airportState = airport.getGuiState(); //add the entry stateSe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void terrainStates(){\n \tif(statesPad.getRawButton(portButton)){terrainStates = portState;}\n \telse if(statesPad.getRawButton(chevellButton)){terrainStates = chevellState;}\n \telse if(statesPad.getRawButton(ballGrabButton)){terrainStates = ballGrabState;}\n \telse if(statesPad.getRawButton(dr...
[ "0.61374027", "0.60706115", "0.5714352", "0.5545335", "0.5503027", "0.54218084", "0.5414177", "0.53447986", "0.53237754", "0.5303432", "0.526058", "0.5235268", "0.5225398", "0.5219706", "0.52047205", "0.5194864", "0.5185605", "0.51846004", "0.5167767", "0.5114281", "0.5109511...
0.71634084
0
Creates a set of delivery state objects containing all the states for the deliveries, will be sent over to the GUI for rendering the data about the packages.
private Set<DeliveryGuiState> getDeliveryGuiStates(Set<WorldDelivery> deliveries){ Set<DeliveryGuiState> guiDeliveries = new HashSet<>(); for(WorldDelivery delivery : deliveries){ //grab the needed parameters int sourceAirport = delivery.getSourceAirport(); int sourceGate = delivery.getSourceAirportGate();...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.List<WorldUps.UGoDeliver> getDeliveriesList() {\n if (deliveriesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(deliveries_);\n } else {\n return deliveriesBuilder_.getMessageList();\n }\n }", "private DeliveryServiceStateRegistry()...
[ "0.55647427", "0.55305773", "0.55214876", "0.54439837", "0.542001", "0.54112864", "0.53607565", "0.53465545", "0.5346148", "0.529024", "0.5288516", "0.52732134", "0.5253904", "0.5225807", "0.5218758", "0.52008224", "0.5195768", "0.51922137", "0.5188238", "0.5179424", "0.51643...
0.7634798
0
Sets new email for administrator
public void setAdminEmail(String adminEmail) { this.admin_email = adminEmail; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void setEmail(final String emailNew) {\n this.email = emailNew;\n }", "public void setUserEmail(String newEmail) {\n profile.setEmail(currentUser, newEmail);\n }", "public void setEmail(final String e)\n {\n this.email = e;\n }", "void setEmail(String email);", "void s...
[ "0.7263711", "0.7258256", "0.72277844", "0.7142088", "0.7142088", "0.71322083", "0.70984805", "0.70984805", "0.7009291", "0.6934008", "0.6929315", "0.68756074", "0.6851209", "0.6797377", "0.67876977", "0.67704153", "0.673771", "0.67129654", "0.66901284", "0.66802305", "0.6679...
0.67050993
18