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
/ send a new message
@FXML public void sendAmessage(ActionEvent event) throws SQLException{ DBConnect db = DBConnect.getInstance(); db.sendMessage(message.getText(), selectedCustomer.getChat_id()); message.setText(""); updateChat(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void sendMessage(String msg) {\n message = msg; \n newMessage = true;\n }", "public void send(Message msg);", "public void sendMessage(String message) {}", "public void sendMessage(String message);", "@Override\r\n\tpublic void sendMessage(String message) {\n\t\t\r\n\t}", "void...
[ "0.81898594", "0.7711328", "0.7628965", "0.7602749", "0.7572829", "0.7536589", "0.73904693", "0.73760146", "0.7344552", "0.7327101", "0.73253983", "0.72775716", "0.7262471", "0.72518265", "0.7226973", "0.7203142", "0.71983147", "0.71960205", "0.7167439", "0.71659774", "0.7163...
0.0
-1
update chat after each message
private void updateChat() throws SQLException{ DBConnect db = DBConnect.getInstance(); ArrayList<String> messages = db.getChat(selectedCustomer.getChat_id()); chat.getItems().clear(); for(String mess :messages){ chat.getItems().add(mess); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void doUpdateChatListView(Message msg)\n {\n Bundle b = msg.getData();\n String next = b.getString(Constants.CHAR);\n chatList.add(new CustomString(next,Constants.SENDER_DEVICE));\n customAdapter.notifyDataSetChanged();\n\n }", "@Override\r\n\t\t\tpublic void...
[ "0.7055973", "0.6954711", "0.69140244", "0.6839825", "0.6838561", "0.68264204", "0.67133266", "0.6653939", "0.6652119", "0.6590467", "0.65394986", "0.65393126", "0.65315795", "0.6525995", "0.6507693", "0.6502042", "0.64783126", "0.6478258", "0.6451216", "0.6421995", "0.641499...
0.7771407
0
get Orders from database related to selected customer
private ObservableList<Order> getOrders() throws SQLException{ DBConnect db = DBConnect.getInstance(); return db.getOrders(selectedCustomer.getCustomer_id()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ObservableList<Order> getAllCustomerOrders(int customerId){\r\n ObservableList<Order> customerOrders = null;\r\n try {\r\n OrderDB odb = new OrderDB();\r\n customerOrders = odb.getAllOrders(customerId);\r\n } catch (Exception e){\r\n System.err.println(...
[ "0.7511526", "0.7155055", "0.6772857", "0.67366004", "0.66375303", "0.6573504", "0.6536187", "0.648291", "0.6443883", "0.6421602", "0.64192706", "0.63113683", "0.63067365", "0.6305884", "0.6296612", "0.6198901", "0.61927646", "0.61904407", "0.6158365", "0.61522686", "0.615176...
0.72417367
1
display order page contatin all information about selected order
@FXML public void dislay(ActionEvent event) throws IOException, SQLException{ FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource("OrderPage.fxml")); Parent root = loader.load(); // pass information to orderPage scene OrderPageController controller = loader.getController(); controller.initData(this.tableView.getSelectionModel().getSelectedItem()); Scene scene = new Scene(root); Stage orderWindow = new Stage(); orderWindow.setScene(scene); orderWindow.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void viewOrderDetails(){\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"StatisticsTab\"), \"StatisticsTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"OrdersTab\"), \"OrdersTab\");\n\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnOrderDetails\"...
[ "0.750585", "0.74664795", "0.7430899", "0.72586435", "0.72405446", "0.6974491", "0.69216055", "0.69095814", "0.6720607", "0.6704338", "0.67022", "0.6696287", "0.66513515", "0.65977764", "0.65748876", "0.6552623", "0.6522707", "0.6486609", "0.6484211", "0.64792305", "0.6443252...
0.0
-1
end current chat and give a feedback about problem then go to waiting customers scene
@FXML public void EndChat(ActionEvent event) throws IOException, SQLException{ FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource("FeedBack.fxml")); Parent root = loader.load(); Scene scene = new Scene(root); // pass information to FeedBack scene FeedBackController controller = loader.getController(); controller.initData(selectedCustomer); Stage window = (Stage)((Node)event.getSource()).getScene().getWindow(); window.setScene(scene); window.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void ChatLeave() {\n\t\t\r\n\t\tClose();\r\n\t}", "public void leaveChat(){\n toServer.println(\"leavechat\" + \" \" + chatID + \" \" + username);\n toServer.flush();\n gui.dispose();\n clientModel.activeChats.remove(chatID);\n }", "public void endGameMessage() {\n ...
[ "0.7045602", "0.68233407", "0.6795488", "0.6570453", "0.65009856", "0.64736927", "0.64266455", "0.64137036", "0.6383396", "0.6347115", "0.6293844", "0.6287378", "0.62656826", "0.62538356", "0.6196697", "0.61884224", "0.61881894", "0.61729", "0.61004055", "0.61003006", "0.6085...
0.58666366
45
this method maps the following URL & http method URL: HTTP method: GET
@RequestMapping(value = "/exhibits", method = RequestMethod.GET) public ResponseEntity<?> getExhibits() { logger.debug(messageSource.getMessage("controller.getRequest", new Object[]{null}, Locale.getDefault())); Iterable<ExhibitEntity> exhibitList = exhibitService.findAll(); logger.debug(messageSource.getMessage("controller.returnResponse", new Object[]{exhibitList}, Locale.getDefault())); return new ResponseEntity<>(exhibitList, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "public HTTPRequestMethod getMethod();", "String getHttpMethod();", "String getHttpMethod();", "@Override\npublic void get(String url) {\n\t\n}", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse respon...
[ "0.7450784", "0.69351697", "0.6792845", "0.6792845", "0.6683708", "0.65396285", "0.6473864", "0.6453372", "0.6451835", "0.6350462", "0.6303853", "0.62616706", "0.6249558", "0.621253", "0.620593", "0.6184517", "0.6161724", "0.61597204", "0.6123876", "0.61162436", "0.6074225", ...
0.0
-1
this method maps the following URL & http method URL: HTTP method: POST
@RequestMapping(value = "/exhibits/add", method = RequestMethod.POST) public ResponseEntity<?> addExhibit(@RequestBody ExhibitEntity exhibit) { logger.debug(messageSource.getMessage("controller.getRequest", new Object[]{exhibit}, Locale.getDefault())); ExhibitEntity newExhibit = exhibitService.save(exhibit); logger.debug(messageSource.getMessage("controller.returnResponse", new Object[]{newExhibit}, Locale.getDefault())); return new ResponseEntity<>(newExhibit, HttpStatus.CREATED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getMethod() {\n return \"POST\";\n }", "@Override\n public String getMethod() {\n return \"POST\";\n }", "@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}", "private static HttpUriRequest doPostMethod(Strin...
[ "0.77097327", "0.7580948", "0.75152856", "0.7006632", "0.68538254", "0.67290294", "0.659889", "0.64780617", "0.64771", "0.6371598", "0.63588065", "0.63393205", "0.633861", "0.62656075", "0.62656075", "0.62579113", "0.62463015", "0.61860055", "0.616394", "0.61494434", "0.61145...
0.0
-1
Thread que fica esperando por novos objetos na conexao, quando recebe um novo objeto, escreve para a classe que implementa a interface receber
public Listener(InputStream is, Receber acoes){ this.acoes = acoes; this.is = is; this.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void toThread() {\n\t\t// TODO Auto-generated method stub\n\t\tnew Thread(this).start();\n\t\tclient.start();\n\t}", "public void execute()\n\t {\n\t // espera a que se conecte cada cliente\n\t for ( int i = 0; i < jugadores.length; i++ ) //<-- dos por defecto o de 0 a 1\n\t {\n\t ...
[ "0.62973756", "0.62006444", "0.60487705", "0.6039246", "0.60361433", "0.595031", "0.59298056", "0.59017706", "0.5890951", "0.5871", "0.57712644", "0.5760659", "0.5747872", "0.5732986", "0.572257", "0.5712797", "0.5665246", "0.56162196", "0.56055796", "0.5596426", "0.5589809",...
0.0
-1
Troca a classe que executara as acoes
public void setReceber(Receber r){ this.temp = r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void execute(){\n\t\t\n\t}", "protected void execute() {}", "protected void execute() {\n\n\t}", "public void execute() {\n\n\t}", "protected void execute() {\n\t\t\n\t}", "protected void execute()\n\t{\n\t}", "public void execute() {\n\t\t\n\t}", "protected void execute() {\n \t\n }", ...
[ "0.7159234", "0.710845", "0.710025", "0.7095227", "0.70751095", "0.7033133", "0.70326066", "0.6999542", "0.6999542", "0.69900686", "0.6986018", "0.6986018", "0.6986018", "0.6986018", "0.6986018", "0.6986018", "0.6986018", "0.6986018", "0.6986018", "0.6986018", "0.6986018", ...
0.0
-1
Will return the table name for persistent layer for the entity.
public String getTableName() { return tableName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getDatabaseTableName(String entityName);", "private String getEntitiesTableName()\n {\n\tString prefix = PropertyLookup.getTableNamePrefix();\n\tString separator = PropertyLookup.getTableNameSeparator();\n\tString suffix = PropertyLookup.getEntitiesTableNameSuffix();\n\n\treturn prefix ...
[ "0.80053115", "0.7850709", "0.7736429", "0.73660886", "0.72001904", "0.7165397", "0.71349925", "0.7124932", "0.71177244", "0.70546556", "0.7028047", "0.7003188", "0.6993118", "0.6993118", "0.69819134", "0.6971558", "0.6971558", "0.6941148", "0.6907759", "0.68976223", "0.68855...
0.68901527
20
Given the column name for an entity in the persistence layer, will return the name of Java property regarding to that column.
public String getPropertyName(String column) { refineMetaData(); column = column.toLowerCase(); // Log.debug("%s->%s", column, col2prop.get(column)); return col2prop.get(column); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getDatabaseColumnName(String entityName, String propertyName);", "public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }", "@Override\n public String foreignKeyColumnName(\n String propertyName,\n String propertyEntityName,...
[ "0.7734096", "0.7489233", "0.6744704", "0.67023516", "0.6696412", "0.6637393", "0.660669", "0.6488553", "0.6476488", "0.6437684", "0.6400011", "0.63894826", "0.635871", "0.6200329", "0.6173594", "0.61539006", "0.6141643", "0.61104536", "0.610462", "0.6089068", "0.60838133", ...
0.7168574
2
To set the name of the table for the entity in the database.
public void setTableName(String tableName) { this.tableName = tableName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTableName(String name) {\n this.tableName = name;\n }", "public void setTableName(String value) {\n setAttributeInternal(TABLENAME, value);\n }", "public abstract String getDatabaseTableName(String entityName);", "public String tableName() {\n if ( tableName != null ...
[ "0.77427226", "0.74510354", "0.72626436", "0.71856457", "0.71309483", "0.71209735", "0.7101091", "0.7060451", "0.70339125", "0.70250773", "0.70215356", "0.6950252", "0.6936582", "0.6936582", "0.6901279", "0.6896559", "0.6896559", "0.6896559", "0.6884393", "0.6884393", "0.6878...
0.6859559
24
Left empty here. If necessary, will be overrident in subclasses to load some special values into the entity.
public void loadDefaultValues() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void loadEntityDetails() {\n \tsuper.loadEntityDetails();\n }", "protected void entityInit() {}", "@Override\n\tpublic void initEntity() {\n\n\t}", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected voi...
[ "0.68963915", "0.6875179", "0.68475056", "0.6256575", "0.62219757", "0.62219757", "0.6202192", "0.6199303", "0.6164149", "0.6164149", "0.6164149", "0.61472553", "0.60471445", "0.5941131", "0.5925846", "0.59235144", "0.59220356", "0.59189725", "0.59189725", "0.59189725", "0.59...
0.5972217
13
Returns the instance of this function.
public static FunctionPParamDel getInstance() { if (FUNCTION == null) { FUNCTION = new FunctionPParamDel(); } return FUNCTION; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T getInstance() {\n return instance;\n }", "@Override\n public T getInstance() {\n return instance;\n }", "T getInstance();", "protected abstract T self();", "protected abstract T self();", "protected abstract T self();", "public static ChainingMethods getInstance(){\n i...
[ "0.67980206", "0.67204595", "0.65498716", "0.6430024", "0.6430024", "0.6430024", "0.6414863", "0.63829726", "0.63782674", "0.6361739", "0.6317809", "0.6283666", "0.62277657", "0.620488", "0.61650395", "0.6087347", "0.6072842", "0.60299826", "0.5982953", "0.59785676", "0.59725...
0.0
-1
This gets called every 1/60 seconds
@Override public void handle(long now) { int frame = (int) (now / 16666666.6667); if (frame % 600 == 0) new SimpleEnemy(game); // 10 seconds if (frame % 900 == 0) new SimplePowerUp(game); // 15 seconds if (frame % 1950 == 0) new HealthPack(game); // 32.5 seconds if (frame % 2100 == 0) new Shield(game); // 35 seconds for (GameEntity gameObject : Globals.gameObjects) { if (gameObject instanceof Animatable) { Animatable animObject = (Animatable) gameObject; animObject.step(); } } Globals.gameObjects.addAll(Globals.newGameObjects); Globals.newGameObjects.clear(); Globals.gameObjects.removeAll(Globals.oldGameObjects); Globals.oldGameObjects.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void runEachMinute() {\n \n }", "protected void runEachHour() {\n \n }", "@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }", "protected void runEach10Minutes() {\n try {\n saveHistoryData();\n ...
[ "0.8122509", "0.7433361", "0.7040194", "0.7033647", "0.7010729", "0.6912692", "0.6912692", "0.68936515", "0.68692106", "0.6854757", "0.6854757", "0.6854757", "0.6854757", "0.67993903", "0.67993903", "0.67993903", "0.67993903", "0.67993903", "0.67993903", "0.67993903", "0.6799...
0.0
-1
WELCOME MESSAGE MENU SCANNER OBJECT!
public static void main(String args[]){ Scanner sc = new Scanner(System.in); // THIS IS THE WELCOME MESSAGE System.out.println("Hello! I am Bank simulator! \n\n" + "I simulate a bank which consist of customers and availableBanker.\n" + "My simulation last for 2 minutes! During this time, I will be keeping track of: \n\n" + " 1) Total amount of customers that visited the bank. \n" + " 2) Total amount of customers that each teller helped.\n" + " 3) Total amount of time that each teller was occupied. \n" + " 4) Total amount of customers that did not get to see a teller.\n"); System.out.println(" - Would you like me to run my simulation? Enter Y or N: "); String runCmd = sc.nextLine().toLowerCase(); // SWITCH COMMAND - prompts user if they want to run the simulation or not // Takes in user input; Three cases; If y - then runs simlation; If n - then exits; If anything else - prints "you broke me" switch(runCmd){ case "y": System.out.println("Loading . . ."); System.out.println("Bank Simulation Executed!"); System.out.println("Please wait 2 minutes. Simulation is currently running . . .\n"); System.out.println("-------------------------------------------------------------------\n"); System.out.println("CONSOLE LOG: "); Runnable runBank = new Runnable(){ //-------- DECLARED VARIABLES ---------------------------------------------------------------------------------- Random randy = new Random(); // Implemented random class - Queue<Integer> bankLine = new LinkedList<Integer>(); // Implement of Queue class int totalNumCustomers = 0; // Total number of customers that visited the bank boolean teller1 = false; boolean teller2 = false; // Initial availability set to false boolean teller3 = false; // From beginning of simulation - availableBanker are occupied boolean teller4 = false; boolean teller5 = false; // Array of bankers boolean[] availableBanker = {teller1, teller2, teller3, teller4, teller5}; // Process time int variable int processTime = 1, processTime2 = 1, processTime3 = 1, processTime4 = 1, processTime5 = 1; // Timer for the 2 min count - 120 seconds int timer = 0; // Customer helped int helped1 = 0, helped2 = 0, helped3 = 0, helped4 = 0, helped5 = 0; // Time spent with customer int timeSpent1 = 0, timeSpent2 = 0, timeSpent3 = 0, timeSpent4 = 0, timeSpent5 = 0; // Teller available int banker1, banker2, banker3, banker4, banker5; // Random time with teller (2 - 5 seconds random) int[] randTeller = { (randy.nextInt(5 - 2) + 2), (randy.nextInt(5 - 2) + 2), (randy.nextInt(5 - 2) + 2) , (randy.nextInt(5 - 2) + 2), (randy.nextInt(5 - 2) + 2)}; //---------- START OF RUN METHOD -------------------------------------------------------------------------------- // Method to be ran by the runnable which is triggered by the switch statement (entering y) public void run(){ // Initialized at a lower number just for testing purposes - 2 mins is too long to wait // OUTPUT MESSAGE - BANK SIMULATION RESULTS // RUN MAIN IF CONDITION // IF Timer is equal to time requested to run - change equal value to whatever needed // THEN print out all recorded results if(timer == 25){ totalNumCustomers = helped1 + helped2 + helped3 + helped4 + helped5 + bankLine.size(); System.out.println("\n-------------------------------------------------------------------------------\n"); System.out.println(" *** BANK SIMULATION RESULTS *** \n"); System.out.println("\t - Total amount of customers that visited the bank: " + totalNumCustomers + "\n"); System.out.println("\t - Teller #1 helped: " + helped1 + " customers" + "\tTotal occupied time: " + timeSpent1 + " seconds"); System.out.println("\t - Teller #2 helped: " + helped2 + " customers" + "\tTotal occupied time: " + timeSpent2 + " seconds"); System.out.println("\t - Teller #3 helped: " + helped3 + " customers" + "\tTotal occupied time: " + timeSpent3 + " seconds"); System.out.println("\t - Teller #4 helped: " + helped4 + " customers" + "\tTotal occupied time: " + timeSpent4 + " seconds"); System.out.println("\t - Teller #5 helped: " + helped5 + " customers" + "\tTotal occupied time: " + timeSpent5 + " seconds"); System.out.println("\n\t - Total amount of customers that did not get help: " + bankLine.size()); System.out.println("\n-------------------------------------------------------------------------------\n"); System.exit(-1); // RUN MAIN ELSE CONDITION } else { // Random time with teller 2 - 5 seconds if(randy.nextInt(2) < 6){ int randomTime = (randy.nextInt(5 - 2) + 3); bankLine.add(randomTime); } // BANKER 1------------------------------------------------------------------ while(banker1 == 1){ processTime = timer; banker1 = 0; } if((timer - processTime) >= randTeller[0]){ System.out.println("Teller is now available."); availableBanker[0] = true; // Teller is now available } if(availableBanker[0] == true && bankLine.isEmpty() == false){ timeSpent1 = timeSpent1 + randTeller[0]; randTeller[0] = bankLine.poll(); banker1 = 1; System.out.println("A customer was served successfully served. (1)"); helped1++; } // BANKER 2------------------------------------------------------------------ // This starts the timer until the teller is done with the customer. Then it resets. while(banker2 == 1){ processTime2 = timer; banker2 = 0; } if((timer - processTime2) >= randTeller[1]){ System.out.println("Teller is now available."); availableBanker[1] = true; // Teller is now available } if(availableBanker[1] == true && bankLine.isEmpty() == false){ timeSpent2 = timeSpent2 + randTeller[1]; randTeller[1] = bankLine.poll(); banker2 = 1; System.out.println("A customer was served successfully served. (2)"); helped2++; } // BANKER 3------------------------------------------------------------------ while(banker3 == 1){ processTime3 = timer; banker3 = 0; } if((timer - processTime3) >= randTeller[2]){ System.out.println("Teller is now available."); availableBanker[2] = true; // Teller is now available } if(availableBanker[2] == true && bankLine.isEmpty() == false){ timeSpent3 = timeSpent3 + randTeller[2]; randTeller[2] = bankLine.poll(); banker3 = 1; System.out.println("A customer was served successfully served. (3)"); helped3++; } // BANKER 4------------------------------------------------------------------ while(banker4 == 1){ processTime4 = timer; banker3 = 0; } if((timer - processTime4) >= randTeller[3]){ System.out.println("Teller is now available."); availableBanker[3] = true; // Teller is now available } if(availableBanker[3] == true && bankLine.isEmpty() == false){ timeSpent4 = timeSpent4 + randTeller[3]; randTeller[3] = bankLine.poll(); banker4 = 1; System.out.println("A customer was served successfully served. (4)"); helped4++; } // BANKER 5------------------------------------------------------------------ while(banker5 == 1){ processTime5 = timer; banker5 = 0; } if((timer - processTime5) >= randTeller[4]){ System.out.println("Teller is now available."); availableBanker[4] = true; // Teller is now available } if(availableBanker[4] == true && bankLine.isEmpty() == false){ timeSpent5 = timeSpent5 + randTeller[4]; randTeller[4] = bankLine.poll(); banker5 = 1; System.out.println("A customer was served successfully served. (5)"); helped5++; } timer++; } // End of timer == value } // End of void run }; // End of runnable // Tells when to execute a task ScheduledThreadPoolExecutor go = new ScheduledThreadPoolExecutor(1); // scheduleAtFixedRate - runBank go.scheduleAtFixedRate(runBank, 0, 1, TimeUnit.SECONDS); // End of switch case - break break; //--------------------------------------------------------------------------------------------------------------- // NO --> EXIT PROGRAM case "n": System.out.println("That's okay . . .! I didn't want to work anyways . . ."); System.exit(-1); break; // ANYTHING ELSE --> EXITS PROGRAM default: System.out.println("You didn't put Y or N!\n" + "You broke meeee . . .\n" + "Good-bye cruel wooooorld . . ."); System.exit(-1); break; } // End Switch }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void returnToMenu(){\n client.moveToState(ClientState.WELCOME_SCREEN);\n }", "public void action() {\n MessageTemplate template = MessageTemplate.MatchPerformative(CommunicationHelper.GUI_MESSAGE);\n ACLMessage msg = myAgent.receive(template);\n\n if (msg != null) {\n\n ...
[ "0.66361415", "0.6492804", "0.63764083", "0.6232587", "0.6215328", "0.62072027", "0.6108584", "0.6099338", "0.60674876", "0.603948", "0.60244644", "0.6024031", "0.60120803", "0.60090226", "0.59957886", "0.5985865", "0.5978322", "0.595293", "0.59409225", "0.58909047", "0.58873...
0.0
-1
START OF RUN METHOD Method to be ran by the runnable which is triggered by the switch statement (entering y)
public void run(){ // Initialized at a lower number just for testing purposes - 2 mins is too long to wait // OUTPUT MESSAGE - BANK SIMULATION RESULTS // RUN MAIN IF CONDITION // IF Timer is equal to time requested to run - change equal value to whatever needed // THEN print out all recorded results if(timer == 25){ totalNumCustomers = helped1 + helped2 + helped3 + helped4 + helped5 + bankLine.size(); System.out.println("\n-------------------------------------------------------------------------------\n"); System.out.println(" *** BANK SIMULATION RESULTS *** \n"); System.out.println("\t - Total amount of customers that visited the bank: " + totalNumCustomers + "\n"); System.out.println("\t - Teller #1 helped: " + helped1 + " customers" + "\tTotal occupied time: " + timeSpent1 + " seconds"); System.out.println("\t - Teller #2 helped: " + helped2 + " customers" + "\tTotal occupied time: " + timeSpent2 + " seconds"); System.out.println("\t - Teller #3 helped: " + helped3 + " customers" + "\tTotal occupied time: " + timeSpent3 + " seconds"); System.out.println("\t - Teller #4 helped: " + helped4 + " customers" + "\tTotal occupied time: " + timeSpent4 + " seconds"); System.out.println("\t - Teller #5 helped: " + helped5 + " customers" + "\tTotal occupied time: " + timeSpent5 + " seconds"); System.out.println("\n\t - Total amount of customers that did not get help: " + bankLine.size()); System.out.println("\n-------------------------------------------------------------------------------\n"); System.exit(-1); // RUN MAIN ELSE CONDITION } else { // Random time with teller 2 - 5 seconds if(randy.nextInt(2) < 6){ int randomTime = (randy.nextInt(5 - 2) + 3); bankLine.add(randomTime); } // BANKER 1------------------------------------------------------------------ while(banker1 == 1){ processTime = timer; banker1 = 0; } if((timer - processTime) >= randTeller[0]){ System.out.println("Teller is now available."); availableBanker[0] = true; // Teller is now available } if(availableBanker[0] == true && bankLine.isEmpty() == false){ timeSpent1 = timeSpent1 + randTeller[0]; randTeller[0] = bankLine.poll(); banker1 = 1; System.out.println("A customer was served successfully served. (1)"); helped1++; } // BANKER 2------------------------------------------------------------------ // This starts the timer until the teller is done with the customer. Then it resets. while(banker2 == 1){ processTime2 = timer; banker2 = 0; } if((timer - processTime2) >= randTeller[1]){ System.out.println("Teller is now available."); availableBanker[1] = true; // Teller is now available } if(availableBanker[1] == true && bankLine.isEmpty() == false){ timeSpent2 = timeSpent2 + randTeller[1]; randTeller[1] = bankLine.poll(); banker2 = 1; System.out.println("A customer was served successfully served. (2)"); helped2++; } // BANKER 3------------------------------------------------------------------ while(banker3 == 1){ processTime3 = timer; banker3 = 0; } if((timer - processTime3) >= randTeller[2]){ System.out.println("Teller is now available."); availableBanker[2] = true; // Teller is now available } if(availableBanker[2] == true && bankLine.isEmpty() == false){ timeSpent3 = timeSpent3 + randTeller[2]; randTeller[2] = bankLine.poll(); banker3 = 1; System.out.println("A customer was served successfully served. (3)"); helped3++; } // BANKER 4------------------------------------------------------------------ while(banker4 == 1){ processTime4 = timer; banker3 = 0; } if((timer - processTime4) >= randTeller[3]){ System.out.println("Teller is now available."); availableBanker[3] = true; // Teller is now available } if(availableBanker[3] == true && bankLine.isEmpty() == false){ timeSpent4 = timeSpent4 + randTeller[3]; randTeller[3] = bankLine.poll(); banker4 = 1; System.out.println("A customer was served successfully served. (4)"); helped4++; } // BANKER 5------------------------------------------------------------------ while(banker5 == 1){ processTime5 = timer; banker5 = 0; } if((timer - processTime5) >= randTeller[4]){ System.out.println("Teller is now available."); availableBanker[4] = true; // Teller is now available } if(availableBanker[4] == true && bankLine.isEmpty() == false){ timeSpent5 = timeSpent5 + randTeller[4]; randTeller[4] = bankLine.poll(); banker5 = 1; System.out.println("A customer was served successfully served. (5)"); helped5++; } timer++; } // End of timer == value }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void run() {\r\n InputReader reader = new InputReader();\r\n String choice;\r\n do{\r\n System.out.println(\"Please stand still when probe is in you temple.\");\r\n choice = reader.getText(\"Start? Y for yes / N for no\");\r\n } while (!choi...
[ "0.68425876", "0.6840338", "0.6839135", "0.6833603", "0.674398", "0.6700134", "0.66698146", "0.66698146", "0.66624737", "0.6654949", "0.66440827", "0.6634025", "0.6614256", "0.6603612", "0.6603612", "0.65871906", "0.65799415", "0.6570974", "0.6568961", "0.6568961", "0.6562848...
0.0
-1
Responds on button clicks and adds todos.
@Override public void onClick(View view) { if (title.getText() == null || content.getText() == null) { Toast.makeText(getActivity(), "Missing fields!", Toast.LENGTH_SHORT).show(); } else { viewModel.addTodo(new Todo( title.getText().toString(), content.getText().toString() )); title.getText().clear(); content.getText().clear(); Toast.makeText(getActivity(), "Added Todo!", Toast.LENGTH_SHORT).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onChanged(@Nullable List<Todo> todos) {\n adapter.submitList(todos);\n }", "@Override\n public void addTodo(Todo todo) {\n todos.add(todo);\n adapter.notifyDataSetChanged();\n dismissFragment(); //this will remove the dialog ...
[ "0.6495515", "0.63455194", "0.62010264", "0.61273485", "0.60885906", "0.60438436", "0.6006898", "0.59635407", "0.5961368", "0.5942943", "0.58411556", "0.5833771", "0.5814564", "0.580214", "0.57982427", "0.5793632", "0.57784057", "0.5758251", "0.5719869", "0.5698682", "0.56935...
0.58982366
10
Creates new form VistaCrearPedidoAbonado
public VistaCrearPedidoAbonado() { initComponents(); errorLabel.setVisible(false); controlador = new CtrlVistaCrearPedidoAbonado(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public CrearPedidos() {\n initComponents();\n }", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public CrearQuedadaVista() {\n }", "public void crearEntidad() throws EntidadNotFoundExceptio...
[ "0.7389781", "0.71863", "0.7041937", "0.69959754", "0.69548655", "0.68892854", "0.67406166", "0.67198074", "0.671699", "0.66738427", "0.6650236", "0.66438097", "0.66402256", "0.66241056", "0.65011895", "0.6490618", "0.64890647", "0.6473019", "0.64584213", "0.6456987", "0.6440...
0.76508576
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() { notificarPopup = new javax.swing.JPopupMenu(); jPanel1 = new javax.swing.JPanel(); jLabel8 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); errorLabel = new javax.swing.JLabel(); pedidoPanel = new javax.swing.JPanel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); numReferenciaTextField = new javax.swing.JTextField(); cantidadTextField = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); finalizarPedidoButton = new javax.swing.JButton(); noFinalizarButton = new javax.swing.JButton(); introducirRefYCantButton = new javax.swing.JButton(); datosAbonadoPanel = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); nombreLabel = new javax.swing.JLabel(); apellidosLabel = new javax.swing.JLabel(); telefonoLabel = new javax.swing.JLabel(); emailLabel = new javax.swing.JLabel(); abonadoIncorrectoButton = new javax.swing.JButton(); abonadoCorrectoButton = new javax.swing.JButton(); jLabel7 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); numAbonadoTextField = new javax.swing.JTextField(); buscarButton = new javax.swing.JButton(); buscarPorParametrosButton = new javax.swing.JButton(); jLabel12 = new javax.swing.JLabel(); volverButton = new javax.swing.JButton(); cancelarButton = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel8.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N jLabel8.setText("Pedido:"); jLabel6.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N jLabel6.setText("Datos Abonado:"); errorLabel.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N errorLabel.setForeground(java.awt.Color.red); errorLabel.setText("jLabel12"); jLabel9.setText("Nº Referencia:"); jLabel10.setText("Cantidad:"); numReferenciaTextField.setEnabled(false); cantidadTextField.setEnabled(false); jLabel11.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N jLabel11.setText("Finalizar pedido:"); finalizarPedidoButton.setText("Si"); finalizarPedidoButton.setEnabled(false); finalizarPedidoButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { finalizarPedidoButtonActionPerformed(evt); } }); noFinalizarButton.setText("No"); noFinalizarButton.setEnabled(false); noFinalizarButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { noFinalizarButtonActionPerformed(evt); } }); introducirRefYCantButton.setText("Introducir"); introducirRefYCantButton.setEnabled(false); introducirRefYCantButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { introducirRefYCantButtonActionPerformed(evt); } }); javax.swing.GroupLayout pedidoPanelLayout = new javax.swing.GroupLayout(pedidoPanel); pedidoPanel.setLayout(pedidoPanelLayout); pedidoPanelLayout.setHorizontalGroup( pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pedidoPanelLayout.createSequentialGroup() .addGroup(pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(pedidoPanelLayout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(finalizarPedidoButton, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(51, 51, 51) .addComponent(noFinalizarButton)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pedidoPanelLayout.createSequentialGroup() .addComponent(jLabel9) .addGap(18, 18, 18) .addComponent(numReferenciaTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pedidoPanelLayout.createSequentialGroup() .addComponent(jLabel10) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(cantidadTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(174, 174, 174)) .addGroup(pedidoPanelLayout.createSequentialGroup() .addGroup(pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel11) .addGroup(pedidoPanelLayout.createSequentialGroup() .addGap(133, 133, 133) .addComponent(introducirRefYCantButton))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pedidoPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cantidadTextField, numReferenciaTextField}); pedidoPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {finalizarPedidoButton, noFinalizarButton}); pedidoPanelLayout.setVerticalGroup( pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pedidoPanelLayout.createSequentialGroup() .addGap(16, 16, 16) .addGroup(pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel9) .addComponent(numReferenciaTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel10) .addComponent(cantidadTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(introducirRefYCantButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE) .addGroup(pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pedidoPanelLayout.createSequentialGroup() .addComponent(jLabel11) .addGap(73, 73, 73)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pedidoPanelLayout.createSequentialGroup() .addGroup(pedidoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(finalizarPedidoButton) .addComponent(noFinalizarButton)) .addGap(22, 22, 22)))) ); pedidoPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {cantidadTextField, numReferenciaTextField}); pedidoPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {finalizarPedidoButton, noFinalizarButton}); jLabel2.setText("Nombre:"); jLabel3.setText("Apellidos:"); jLabel4.setText("Teléfono:"); jLabel5.setText("Email:"); abonadoIncorrectoButton.setText("No"); abonadoIncorrectoButton.setEnabled(false); abonadoIncorrectoButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { abonadoIncorrectoButtonActionPerformed(evt); } }); abonadoCorrectoButton.setText("Si"); abonadoCorrectoButton.setEnabled(false); abonadoCorrectoButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { abonadoCorrectoButtonActionPerformed(evt); } }); jLabel7.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N jLabel7.setText("¿Es el abonado que buscaba?"); javax.swing.GroupLayout datosAbonadoPanelLayout = new javax.swing.GroupLayout(datosAbonadoPanel); datosAbonadoPanel.setLayout(datosAbonadoPanelLayout); datosAbonadoPanelLayout.setHorizontalGroup( datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(datosAbonadoPanelLayout.createSequentialGroup() .addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(datosAbonadoPanelLayout.createSequentialGroup() .addGap(63, 63, 63) .addComponent(abonadoCorrectoButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(29, 29, 29) .addComponent(abonadoIncorrectoButton, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(datosAbonadoPanelLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabel7)) .addGroup(datosAbonadoPanelLayout.createSequentialGroup() .addGap(30, 30, 30) .addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(datosAbonadoPanelLayout.createSequentialGroup() .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(apellidosLabel)) .addGroup(datosAbonadoPanelLayout.createSequentialGroup() .addComponent(jLabel2) .addGap(18, 18, 18) .addComponent(nombreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(datosAbonadoPanelLayout.createSequentialGroup() .addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4) .addComponent(jLabel5)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(emailLabel) .addComponent(telefonoLabel)))))) .addContainerGap(32, Short.MAX_VALUE)) ); datosAbonadoPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {apellidosLabel, emailLabel, nombreLabel, telefonoLabel}); datosAbonadoPanelLayout.setVerticalGroup( datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(datosAbonadoPanelLayout.createSequentialGroup() .addGap(23, 23, 23) .addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(nombreLabel)) .addGap(18, 18, 18) .addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(apellidosLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(telefonoLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(emailLabel)) .addGap(41, 41, 41) .addComponent(jLabel7) .addGap(16, 16, 16) .addGroup(datosAbonadoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(abonadoIncorrectoButton) .addComponent(abonadoCorrectoButton)) .addContainerGap(60, Short.MAX_VALUE)) ); datosAbonadoPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {apellidosLabel, emailLabel, nombreLabel, telefonoLabel}); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(39, 39, 39) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(datosAbonadoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6)) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(154, 154, 154) .addComponent(jLabel8)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(141, 141, 141) .addComponent(pedidoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 274, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(127, 127, 127) .addComponent(errorLabel))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addGap(37, 37, 37) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent(jLabel8)) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(18, 18, 18) .addComponent(datosAbonadoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(9, 9, 9) .addComponent(pedidoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(18, 18, 18) .addComponent(errorLabel) .addContainerGap(18, Short.MAX_VALUE)) ); jLabel1.setText("Nº Abonado:"); buscarButton.setText("Buscar"); buscarButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buscarButtonActionPerformed(evt); } }); buscarPorParametrosButton.setText("Buscar por parámetros"); buscarPorParametrosButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buscarPorParametrosButtonActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addGap(18, 18, 18) .addComponent(numAbonadoTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(buscarButton) .addGap(98, 98, 98) .addComponent(buscarPorParametrosButton) .addContainerGap(96, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addContainerGap(24, Short.MAX_VALUE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(numAbonadoTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1) .addComponent(buscarButton) .addComponent(buscarPorParametrosButton)) .addGap(42, 42, 42)) ); jLabel12.setFont(new java.awt.Font("Ubuntu", 1, 24)); // NOI18N jLabel12.setText("CREAR PEDIDO ABONADO"); volverButton.setText("Volver"); volverButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { volverButtonActionPerformed(evt); } }); cancelarButton.setText("Cancelar"); cancelarButton.setEnabled(false); cancelarButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelarButtonActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel12) .addGap(283, 283, 283)) .addGroup(layout.createSequentialGroup() .addGap(116, 116, 116) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 728, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(54, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(61, 61, 61) .addComponent(volverButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(cancelarButton) .addGap(43, 43, 43)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap(52, Short.MAX_VALUE) .addComponent(jLabel12) .addGap(33, 33, 33) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cancelarButton) .addComponent(volverButton)) .addGap(30, 30, 30)) ); pack(); }
{ "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.7321342", "0.7292121", "0.7292121", "0.7292121", "0.72863305", "0.7249828", "0.7213628", "0.7209084", "0.7197292", "0.71912086", "0.7185135", "0.7159969", "0.7148876", "0.70944786", "0.70817256", "0.7057678", "0.69884527", "0.69786763", "0.69555986", "0.69548863", "0.69453...
0.0
-1
End of variables declaration//GENEND:variables
public String getNumeroAbonado() { return numAbonadoTextField.getText(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n pu...
[ "0.6359434", "0.6280371", "0.61868024", "0.6094568", "0.60925734", "0.6071678", "0.6052686", "0.60522056", "0.6003249", "0.59887564", "0.59705925", "0.59680873", "0.5967989", "0.5965816", "0.5962006", "0.5942372", "0.5909877", "0.5896588", "0.5891321", "0.5882983", "0.5881482...
0.0
-1
Allow public readonly access to the count of error messages
public static int count() { return errorCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getErrorCount();", "public int getErrorCount() {\n return this._errorCount;\n }", "public int getErrorCount()\r\n {\r\n \treturn errorCount;\r\n }", "public int errorCount() {\n\t\treturn errorCount;\n\t}", "public int getErrorCount() {\n return error_.size();\n }", "public Lo...
[ "0.78349864", "0.7301117", "0.7294126", "0.72640705", "0.71688646", "0.7162506", "0.71457404", "0.71162754", "0.70900685", "0.7051778", "0.7028875", "0.7022404", "0.7022404", "0.7022404", "0.7022404", "0.7022404", "0.6977874", "0.6948736", "0.6882643", "0.6854523", "0.6842468...
0.7509476
1
Report nonfatal errors, output a message and return
public static void warn( String message ) { System.err.println( "Logic: " + message ); errorCount = errorCount + 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void report_fatal_error(String message, Object info) {\n report_error(message, info);\n System.out.println(\"ENTRO\");\n //System.exit(1);\n }", "public void fatal(String message);", "public void report_fatal_error(String message, Object info) {\r\n report_error(message, i...
[ "0.6903755", "0.67780584", "0.6719263", "0.6536158", "0.64411277", "0.63985485", "0.63801444", "0.6329488", "0.6319524", "0.6287272", "0.628493", "0.6259168", "0.6258693", "0.6258224", "0.6215914", "0.61926687", "0.6191165", "0.6158848", "0.61389005", "0.61363006", "0.6127656...
0.0
-1
Report fatal errors, output a message and exit, never to return
public static void fatal( String message ) { warn( message ); System.exit( 1 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fatalError(String msg) {\n\t\tLog.e(\"FATAL ERROR\", msg);\n\t\tSystem.exit(0);\n\t}", "public void report_fatal_error(String message, Object info) {\r\n report_error(message, info);\r\n System.exit(1);\r\n }", "public static void main(String[] args){\n \t\tfatalError();\n \t\tSyst...
[ "0.75060767", "0.7363449", "0.72334033", "0.71830016", "0.71251476", "0.7032012", "0.6990918", "0.6925294", "0.6897276", "0.6891846", "0.6886927", "0.6870044", "0.68620986", "0.68289745", "0.682361", "0.68147147", "0.6805332", "0.68048656", "0.67774427", "0.6767309", "0.67672...
0.7358032
2
Get next name without skipping to next line (unlike sc.Next())
public static String nextName( Scanner sc ) { sc.skip( whitespace ); sc.skip( name ); return sc.match().group(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected String getNextName(String descriptor) throws Exception;", "public String nextName() {\n expect(JsonType.NAME);\n\n String name = readString();\n skipWhitespace(input);\n char read = input.read();\n if (read != ':') {\n throw new JsonException(\n \"Unable to read na...
[ "0.697474", "0.66500276", "0.6634982", "0.6634982", "0.65042317", "0.6321853", "0.6308041", "0.6307251", "0.6295489", "0.6259855", "0.61629844", "0.6104316", "0.6085636", "0.60227066", "0.59301144", "0.5879797", "0.5855514", "0.584721", "0.58436394", "0.58385277", "0.5771328"...
0.7452206
0
what pin of the destination name of a wire is sourcesrcpindestinationdstpin construct a new wire by scanning its description from the source file
public Wire( Scanner sc ) throws ConstructorFailure { String sourceName = sc.next(); srcPin = sc.next(); String dstName = sc.next(); dstPin = sc.next(); //Bug: In the above, what if there are no next inputs? source = Logic.findGate( sourceName ); destination = Logic.findGate( dstName ); if (source == null) { Errors.warn( "No such source gate: Wire " + sourceName + " " + srcPin + " " + dstName + " " + dstPin ); throw new ConstructorFailure(); } if (destination == null) { Errors.warn( "No such destination gate: Wire " + sourceName + " " + srcPin + " " + dstName + " " + dstPin ); throw new ConstructorFailure(); } // take care of source and destination pins // Bug: This is a start, but in the long run, it might not be right source.registerOutput( srcPin ); destination.registerInput( dstPin ); if (sc.hasNextFloat()) { delay = sc.nextFloat(); if (delay < 0.0F) { Errors.warn( "Negative delay: Wire " + sourceName + " " + srcPin + " " + dstName + " " + dstPin + " " + delay ); delay = 99999.0F; // no failure needed, use bogus value } } else { Errors.warn( "Floating point delay expected: Wire " + sourceName + " " + srcPin + " " + dstName + " " + dstPin + " " ); delay = 99999.0F; // no failure needed, use bogus value } ScanSupport.lineEnd( sc, this.toString() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private byte[] obtainPackets4Source(Packet packet){\n\t\t//filter IPV6\n\t\tif(packet.contains(IpPacket.class)){\n\t\t\t\n\t\t\tIpPacket ipPkt = packet.get(IpPacket.class);\n\t\t\tIpHeader ipHeader = ipPkt.getHeader();\n\t\t\n\t\t\tbyte[] src=ipHeader.getSrcAddr().getAddress();\n\t\t\tbyte[] dest = ipHeader.getDst...
[ "0.57431895", "0.557282", "0.54222083", "0.5416555", "0.5358431", "0.5358431", "0.53421104", "0.5341254", "0.5328331", "0.5304399", "0.52895", "0.5286827", "0.5267889", "0.52226967", "0.51732975", "0.514795", "0.51439995", "0.5070386", "0.5062261", "0.50553185", "0.50524753",...
0.46041268
91
output the wire in a form like that used for input
public String toString(){ String sourceName; String destinationName; // its possible the wire has no source gate so this avoids null // pointer errors if( source == null){ sourceName = "No wire source"; } else { sourceName = this.source.name; } // provides the same check for destination gates if( destination == null ){ destinationName = "No wire destination"; } else { destinationName = this.destination.name; } return "Wire " + sourceName + " "+ srcPin + " " + destinationName + " " + " " + dstPin + " " + delay; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void render() {\n System.out.println(this.input);\n return;\n }", "@Override\n\tprotected void renderInternal(PrintWriter writer) {\n\t\tnew TagWriter(writer)\n\t\t\t.startEmpty(\"input\")\n\t\t\t.attribute(\"type\", \"text\")\n\t\t\t.attribute(\"style\", \"display:none\")\n\t\t\t.end(...
[ "0.6122462", "0.591646", "0.57936853", "0.5726596", "0.5550252", "0.5540604", "0.54788464", "0.5407625", "0.53829134", "0.53469366", "0.5338901", "0.53271544", "0.5315031", "0.5239454", "0.5228856", "0.52283937", "0.52123713", "0.51664025", "0.5157073", "0.5142217", "0.513486...
0.0
-1
Bug: The need for the above really depends on the gate kind
public static Gate newGate( Scanner sc ) throws ConstructorFailure { // going to write a whole bunch of new junk here and then slowly // remove what I no longer need. This code is ages from being able // to be compiled String name = ScanSupport.nextName( sc ); if( " ".equals( name )){ Errors.warn( "No gate name provided" ); throw new ConstructorFailure(); } if (Logic.findGate( name ) != null) { Errors.warn( "Gate redefined: " + name ); throw new ConstructorFailure(); } String type = ScanSupport.nextName( sc ); if( "or".equals( type ) ){ return new orGate( sc, name ); } else if ( "and".equals( type )){ return new andGate( sc, name ); } else if ( "not".equals( type )){ return new notGate( sc, name ); } else if ( "const".equals( type )){ return new constant( sc, name ); } else { Errors.warn( "Gate " + name + " " + type + " has an invalid type" ); throw new ConstructorFailure(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testX1andX2orNotX1() {\n \tCircuit circuit = new Circuit();\n \t\n \tBoolean b1 = Boolean.TRUE;\n \tBoolean b2 = Boolean.FALSE;\n \tAnd and = (And) circuit.getFactory().getGate(Gate.AND);\n\t\tNot not = (Not) circuit.getFactory().getGate(Gate.NOT);\n\t\tOr or = (Or) circuit.getFactory()....
[ "0.59774965", "0.5903696", "0.57840234", "0.5670295", "0.56205577", "0.5427167", "0.5263975", "0.5228391", "0.5225113", "0.5178564", "0.51116234", "0.5104363", "0.50781864", "0.5071945", "0.5065781", "0.50599915", "0.50585145", "0.50556296", "0.50461805", "0.5036907", "0.5020...
0.48876727
46
tell the gate that one of its input pins is in use
public void registerInput( String pinName ) { //Bug: all we do is prevent inputs from being used twice, more later for (String s: inputs) { if (s.equals( pinName )) { Errors.warn( "Input reused: " + name + " " + pinName ); } } inputs.add( pinName ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean sjekkPIN(int pin);", "public void enableInputs();", "public void inputChangeEvent( float time, int dstPin, boolean v ) {\n\tErrors.fatal( \"Input should never change: \" + toString() );\n }", "private boolean needPIN() {\n return datafacade.getInt(\"pin\")!=-1;\n }", "@...
[ "0.58509713", "0.5733031", "0.5730423", "0.5722082", "0.57107186", "0.5660157", "0.5638973", "0.5621898", "0.56146514", "0.5609557", "0.5609557", "0.53898364", "0.5341708", "0.5304604", "0.5301651", "0.5268056", "0.525991", "0.5259747", "0.52508324", "0.52506506", "0.52310634...
0.5268985
15
tell the gate that one of its output pins is in use
public void registerOutput( String pinName ) { //Bug: we do nothing about this here, it'll get more fun later }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void writeOut(Circuit circuit, boolean state, int index) {\n outputPins[index].setState(state);\n for (ChipListener l : listeners) l.outputChanged(Chip.this, index, state);\n }", "public boolean lockOutput() {\n return output.setStation(this);\n }", "public void SetOu...
[ "0.58527476", "0.5789524", "0.5756229", "0.56426364", "0.563568", "0.55401087", "0.55119133", "0.5463319", "0.5463319", "0.5441305", "0.54215986", "0.5418969", "0.5343702", "0.5342695", "0.52915967", "0.52675766", "0.5249702", "0.5242069", "0.52322525", "0.51881534", "0.51780...
0.5602949
5
output the gate in a form like that used for input
protected String myString(){ return( "gate " + name ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n return gate;\n }", "public JPanel getPanel() { return gate; }", "public String getName() { return \"Gate\"; }", "public String toString() {\n\t\treturn \"gate output \" + name + ' ' + delay;\n\t}", "@Override\n public String toString() {\n return gateAdr + \...
[ "0.6863843", "0.59450716", "0.5667534", "0.5619157", "0.5594991", "0.5524784", "0.55211735", "0.54806226", "0.547926", "0.54671776", "0.54241055", "0.53400296", "0.53238195", "0.53056204", "0.5296865", "0.5291443", "0.5224183", "0.5218183", "0.51989305", "0.5154696", "0.51413...
0.4781946
73
see lecture notes for 10/03/2017 to see how to solve instatiation problems
orGate( Scanner sc, String name ){ this.name = name; ScanSupport.lineEnd( sc, name); this.createDelay(sc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private DiscretePotentialOperations() {\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tInstitude i1=new Institude(10,\"Pune\",new Branch(11,\"Bas\",new Subject(20,\"Java\",new Topic\r\n\t\t\t\t(30,\"Method Overloading\",new SubTopic(40,\"Method Overriding\",new Question(50,\"What is class\")))))...
[ "0.59460264", "0.58077383", "0.5717888", "0.5699649", "0.56016433", "0.5588691", "0.5579626", "0.55590796", "0.55307865", "0.5519551", "0.5508427", "0.5473175", "0.54509926", "0.54212946", "0.54128706", "0.54118687", "0.5405789", "0.5405237", "0.5392875", "0.53851575", "0.534...
0.0
-1
not sure that it needs any arguements
andGate( Scanner sc, String name ){ this.name = name; ScanSupport.lineEnd( sc, name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void initParams() {\n\t\t\n\t}", "@...
[ "0.6399592", "0.6396188", "0.62476707", "0.622151", "0.6208073", "0.6169608", "0.6144591", "0.60180396", "0.60180396", "0.5988086", "0.5948092", "0.59457386", "0.5940191", "0.59381056", "0.5936728", "0.59252256", "0.5914325", "0.5875014", "0.5865231", "0.5865231", "0.5865176"...
0.0
-1
Find a gate by textual name in the set gates
public static Gate findGate( String s ) { // quick and dirty implementation for (Gate i: gates) { if (i.name.equals( s )) { return i; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Gate findGate( String n ) {\n for (Gate g: allGates) {\n if (g.name.equals( n )) return g;\n }\n return null;\n }", "public String getName() { return \"Gate\"; }", "private Shape find(String name, ArrayList<Shape> listShapes, ArrayList<Command> commands) {\r\n ...
[ "0.7250432", "0.5583547", "0.53737134", "0.528022", "0.5204758", "0.50965786", "0.50395256", "0.4998982", "0.49981198", "0.4979453", "0.4968718", "0.4965262", "0.49623504", "0.49541694", "0.49428996", "0.4911102", "0.48970118", "0.48885712", "0.48153773", "0.47860378", "0.477...
0.7581383
0
Initialize this logic circuit by scanning its description
private static void readCircuit( Scanner sc ) { while (sc.hasNext()) { String command = sc.next(); if ("gate".equals( command )) { try { gates.add( Gate.newGate( sc ) ); } catch (Gate.ConstructorFailure e) { // do nothing, the constructor already reported the error } } else if ("wire".equals( command )) { try { wires.add( new Wire( sc ) ); } catch (Wire.ConstructorFailure e) { // do nothing, the constructor already reported the error } } else if ("--".equals( command )) { sc.nextLine(); } else { Errors.warn( "unknown command: " + command ); sc.nextLine(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void initialize(List<Gdl> description) {\r\n try {\r\n \tdescription = sanitizeDistinct(description);\r\n\t\t\tpropNet = OptimizingPropNetFactory.create(description);\r\n\t\t\t//propNet.renderToFile(\"propnet.dot\");\r\n\t\t\troles = propNet.getRoles();\r\n\t\t\tinitPropnetVar...
[ "0.6489825", "0.6124246", "0.6106129", "0.60467076", "0.5999615", "0.5978998", "0.5960923", "0.594189", "0.5936541", "0.5920582", "0.5919218", "0.58910334", "0.58718634", "0.5846088", "0.58372575", "0.5822256", "0.5806131", "0.577388", "0.57663447", "0.57623905", "0.5755986",...
0.0
-1
Print out the wire network to system.out
private static void printCircuit() { for (Gate i: gates) { System.out.println( i.toString() ); } for (Wire r: wires) { System.out.println( r.toString() ); } }
{ "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 d...
[ "0.7228915", "0.6957467", "0.66704065", "0.6478969", "0.6427015", "0.6397989", "0.6385403", "0.63809603", "0.6352528", "0.62512505", "0.6232342", "0.620309", "0.6192734", "0.61389434", "0.6102355", "0.60813534", "0.6045015", "0.6045015", "0.6045015", "0.6045015", "0.6045015",...
0.7006638
1
Step 1: Find the contract whose Initiate(3) is completed from contract Details. Step 2: Get the details to review Risk,Financial Data, Collateral,Client outreach dtls.. Step 3: If successful, update the workflowReview table with updatedBy and updatedOn and statusId. Step 4: Also, update workflowEdit with Pending Status. Step 5: Also update the contractDetails table with statusId with stage review.
@RequestMapping(value = "review/workflow", method = RequestMethod.POST) public Contract reviewWorkflow(@RequestBody int contractid) { Contract con = contractService.findByContractIdAndCurrStatusId(contractid, WorkflowStageEnums.Initiate.ordinal() + 1); if(null != con) { Date updatedOn = new Timestamp(System.currentTimeMillis()); List<WorkflowReview> lstworkflowReview = workflowReviewService.findByContractIdAndStatusId(contractid,WorkflowStageCompletionResultEnums.Pending.ordinal() + 1);//pending=1 if(null != lstworkflowReview && lstworkflowReview.size() > 0) { WorkflowReview workflowReview = lstworkflowReview.get(0); workflowReview.setComments("Review is completed"); workflowReview.setStatusId(WorkflowStageCompletionResultEnums.Completed.ordinal() + 1); workflowReview.setUpdatedBy(workflowReview.getAssignedTo()); workflowReview.setUpdatedOn(updatedOn); workflowReviewService.saveWorkflowReview(workflowReview); WorkflowEdit workflowEdit = new WorkflowEdit(); workflowEdit.setAssignedTo(workflowReview.getAssignedTo()); workflowEdit.setContractId(contractid); workflowEdit.setComments("Edit is pending"); updatedOn = new Timestamp(System.currentTimeMillis()); workflowEdit.setCreatedOn(updatedOn); workflowEdit.setStatusId(WorkflowStageCompletionResultEnums.Pending.ordinal() + 1); workflowEdit.setUpdatedOn(updatedOn); workflowEditService.saveWorkflowEdit(workflowEdit); con.setCurrStatusId(WorkflowStageEnums.Review.ordinal() + 1); con = contractService.saveContract(con); } } return con; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public WorkflowResponse execute(WorkflowDTO workflowDTO) throws WorkflowException {\n\n if (log.isDebugEnabled()) {\n log.debug(\"Executing API State change Workflow.\");\n }\n if (stateList != null) {\n Map<String, List<String>> stateActionMap = getSelecte...
[ "0.6133974", "0.57006377", "0.53529716", "0.51636106", "0.51530594", "0.51119053", "0.510597", "0.5097769", "0.5020745", "0.4998036", "0.49843505", "0.49810144", "0.4979623", "0.49758407", "0.49540395", "0.49147752", "0.49006408", "0.48892608", "0.48885235", "0.4879593", "0.4...
0.7480736
0
.clarifai.api.UserAppIDSet user_app_id = 1;
boolean hasUserAppId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.clarifai.grpc.api.UserAppIDSet getUserAppId();", "com.clarifai.grpc.api.UserAppIDSet getUserAppId();", "com.clarifai.grpc.api.UserAppIDSetOrBuilder getUserAppIdOrBuilder();", "com.clarifai.grpc.api.UserAppIDSetOrBuilder getUserAppIdOrBuilder();", "public void setUserId(){\n AdGyde.setClientUserI...
[ "0.76256806", "0.76256806", "0.6751339", "0.6751339", "0.63550764", "0.61067605", "0.60613406", "0.60395926", "0.58157873", "0.5790636", "0.57730806", "0.57723117", "0.5710018", "0.5695878", "0.56843317", "0.56843317", "0.5672764", "0.56627274", "0.56597555", "0.56276387", "0...
0.5550676
27
.clarifai.api.UserAppIDSet user_app_id = 1;
com.clarifai.grpc.api.UserAppIDSet getUserAppId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.clarifai.grpc.api.UserAppIDSetOrBuilder getUserAppIdOrBuilder();", "com.clarifai.grpc.api.UserAppIDSetOrBuilder getUserAppIdOrBuilder();", "public void setUserId(){\n AdGyde.setClientUserId(\"ADG1045984\");\n Toast.makeText(this, \"UserId = ADG1045984\", Toast.LENGTH_SHORT).show();\n }", ...
[ "0.675112", "0.675112", "0.63546145", "0.6106961", "0.6061832", "0.60400426", "0.5816435", "0.57911766", "0.5772788", "0.5772107", "0.5710057", "0.5695659", "0.568511", "0.568511", "0.56726515", "0.56622803", "0.5659865", "0.5628104", "0.5621385", "0.56152785", "0.56011575", ...
0.7625713
1
.clarifai.api.UserAppIDSet user_app_id = 1;
com.clarifai.grpc.api.UserAppIDSetOrBuilder getUserAppIdOrBuilder();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.clarifai.grpc.api.UserAppIDSet getUserAppId();", "com.clarifai.grpc.api.UserAppIDSet getUserAppId();", "public void setUserId(){\n AdGyde.setClientUserId(\"ADG1045984\");\n Toast.makeText(this, \"UserId = ADG1045984\", Toast.LENGTH_SHORT).show();\n }", "ApplicationId appId();", "short ...
[ "0.7626253", "0.7626253", "0.63556314", "0.61067635", "0.60612375", "0.60389894", "0.5815697", "0.5789717", "0.5772906", "0.5772335", "0.57101506", "0.56953317", "0.5684587", "0.5684587", "0.5673191", "0.5663154", "0.56600285", "0.5626862", "0.5620631", "0.5615524", "0.560127...
0.6751714
3
string concept_id = 2;
java.lang.String getConceptId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getConcept();", "public static void getRoomConcept(String concept)\n\t{\n\t\t\n\t}", "Concept getConcept(String id);", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId()...
[ "0.64319813", "0.61727816", "0.6135722", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", "0.5804606", ...
0.72886676
0
string concept_id = 2;
com.google.protobuf.ByteString getConceptIdBytes();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getConceptId();", "String getConcept();", "public static void getRoomConcept(String concept)\n\t{\n\t\t\n\t}", "Concept getConcept(String id);", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", ...
[ "0.7289324", "0.64320993", "0.6172994", "0.6135658", "0.58050615", "0.58050615", "0.58050615", "0.58050615", "0.58050615", "0.58050615", "0.58050615", "0.58050615", "0.58050615", "0.58050615", "0.58050615", "0.58050615", "0.58050615", "0.58050615", "0.58050615", "0.58050615", ...
0.56729007
52
repeated .clarifai.api.ConceptLanguage concept_languages = 3;
java.util.List<com.clarifai.grpc.api.ConceptLanguage> getConceptLanguagesList();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.clarifai.grpc.api.ConceptLanguage getConceptLanguages(int index);", "java.util.List<? extends com.clarifai.grpc.api.ConceptLanguageOrBuilder> \n getConceptLanguagesOrBuilderList();", "com.clarifai.grpc.api.ConceptLanguageOrBuilder getConceptLanguagesOrBuilder(\n int index);", "int getConceptLan...
[ "0.7333542", "0.6911888", "0.6803772", "0.65125555", "0.55658317", "0.5514909", "0.5497754", "0.5459166", "0.5378045", "0.5338909", "0.53268355", "0.530514", "0.5277348", "0.52727586", "0.52325135", "0.52217007", "0.51904005", "0.5183695", "0.517394", "0.5150441", "0.5136571"...
0.70189124
1
repeated .clarifai.api.ConceptLanguage concept_languages = 3;
com.clarifai.grpc.api.ConceptLanguage getConceptLanguages(int index);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.util.List<com.clarifai.grpc.api.ConceptLanguage> \n getConceptLanguagesList();", "java.util.List<? extends com.clarifai.grpc.api.ConceptLanguageOrBuilder> \n getConceptLanguagesOrBuilderList();", "com.clarifai.grpc.api.ConceptLanguageOrBuilder getConceptLanguagesOrBuilder(\n int index);", ...
[ "0.70178807", "0.69103855", "0.6802317", "0.651211", "0.5567115", "0.5515031", "0.5497891", "0.54596484", "0.53775334", "0.53402954", "0.5327648", "0.53057975", "0.5277139", "0.5273925", "0.5234392", "0.52232295", "0.5190439", "0.51850134", "0.51732075", "0.5151061", "0.51370...
0.73326385
0
repeated .clarifai.api.ConceptLanguage concept_languages = 3;
int getConceptLanguagesCount();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.clarifai.grpc.api.ConceptLanguage getConceptLanguages(int index);", "java.util.List<com.clarifai.grpc.api.ConceptLanguage> \n getConceptLanguagesList();", "java.util.List<? extends com.clarifai.grpc.api.ConceptLanguageOrBuilder> \n getConceptLanguagesOrBuilderList();", "com.clarifai.grpc.api.Co...
[ "0.7333542", "0.70189124", "0.6911888", "0.6803772", "0.55658317", "0.5514909", "0.5497754", "0.5459166", "0.5378045", "0.5338909", "0.53268355", "0.530514", "0.5277348", "0.52727586", "0.52325135", "0.52217007", "0.51904005", "0.5183695", "0.517394", "0.5150441", "0.5136571"...
0.65125555
4
repeated .clarifai.api.ConceptLanguage concept_languages = 3;
java.util.List<? extends com.clarifai.grpc.api.ConceptLanguageOrBuilder> getConceptLanguagesOrBuilderList();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.clarifai.grpc.api.ConceptLanguage getConceptLanguages(int index);", "java.util.List<com.clarifai.grpc.api.ConceptLanguage> \n getConceptLanguagesList();", "com.clarifai.grpc.api.ConceptLanguageOrBuilder getConceptLanguagesOrBuilder(\n int index);", "int getConceptLanguagesCount();", "speech.m...
[ "0.7332505", "0.70174694", "0.6803061", "0.6512835", "0.5565492", "0.5514856", "0.5496935", "0.54585266", "0.53770053", "0.5339303", "0.53268", "0.5304535", "0.5277535", "0.52718323", "0.5232228", "0.5221515", "0.5190006", "0.51830447", "0.51728094", "0.5150765", "0.51364756"...
0.6910596
2
repeated .clarifai.api.ConceptLanguage concept_languages = 3;
com.clarifai.grpc.api.ConceptLanguageOrBuilder getConceptLanguagesOrBuilder( int index);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.clarifai.grpc.api.ConceptLanguage getConceptLanguages(int index);", "java.util.List<com.clarifai.grpc.api.ConceptLanguage> \n getConceptLanguagesList();", "java.util.List<? extends com.clarifai.grpc.api.ConceptLanguageOrBuilder> \n getConceptLanguagesOrBuilderList();", "int getConceptLanguagesC...
[ "0.7333542", "0.70189124", "0.6911888", "0.65125555", "0.55658317", "0.5514909", "0.5497754", "0.5459166", "0.5378045", "0.5338909", "0.53268355", "0.530514", "0.5277348", "0.52727586", "0.52325135", "0.52217007", "0.51904005", "0.5183695", "0.517394", "0.5150441", "0.5136571...
0.6803772
3
formats tour startDate and startTime according to the preferences
private String formatStartDate(final TourData _tourData) { final DateTime dtTourStart = _tourData.getTourStartTime(); final DateTime dtTourEnd = dtTourStart.plusSeconds((int) _tourData.getTourRecordingTime()); return String.format( net.tourbook.ui.Messages.Tour_Tooltip_Format_DateWeekTime, _dateFormatter.print(dtTourStart.getMillis()), _timeFormatter.print(dtTourStart.getMillis()), _timeFormatter.print(dtTourEnd.getMillis()), dtTourStart.getWeekOfWeekyear()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateStartTime() {\n Date date = startTimeCalendar.getTime();\n String startTime = new SimpleDateFormat(\"HH:mm\").format(date);\n startHourText.setText(startTime);\n }", "public void formatDateTime() {\n // Check if type of parsing is for display or not. \n // If it i...
[ "0.6269547", "0.62355846", "0.5950287", "0.5933665", "0.57788235", "0.5753041", "0.5735577", "0.5718038", "0.5709577", "0.56245", "0.56170225", "0.5616922", "0.561384", "0.56025994", "0.5596673", "0.55966365", "0.5537549", "0.5537549", "0.55328655", "0.5532465", "0.5513921", ...
0.7050593
0
performs the actual PDF generation info and examples at:
public void printPDF(final IXmlSerializable object, final PrintSettings printSettings) throws FileNotFoundException, FOPException, TransformerException { boolean canWriteFile = true; FileOutputStream pdfContentStream = null; BufferedOutputStream pdfContent = null; try { // setup pdf outpoutStream final File pdfFile = new File(printSettings.getCompleteFilePath()); if (pdfFile.exists()) { if (printSettings.isOverwriteFiles()) { // overwrite is enabled in the UI } else { final FileCollisionBehavior fileCollisionBehaviour = new FileCollisionBehavior(); canWriteFile = net.tourbook.ui.UI.confirmOverwrite(fileCollisionBehaviour, pdfFile); if (fileCollisionBehaviour.value == FileCollisionBehavior.DIALOG_IS_CANCELED) { return; } } } if (canWriteFile) { pdfContentStream = new FileOutputStream(pdfFile); pdfContent = new BufferedOutputStream(pdfContentStream); // setup xml input source final String xml = object.toXml(); // // debug logging // System.err.println("--------------------------------------------------------"); // System.err.println(object.toXml()); // System.err.println("--------------------------------------------------------"); // XStream xStream = new XStream(); // try { // FileUtils.writeStringToFile(new File("/home/jkl/tourdata_xs.xml"), // xStream.toXML(object)); // } catch (IOException e) { // e.printStackTrace(); // } // prepare xsl file for transformation final ClassLoader classLoader = getClass().getClassLoader(); final InputStream xslFile = classLoader.getResourceAsStream(TOURDATA_2_FO_XSL); StreamSource xmlSource; try { xmlSource = new StreamSource(new ByteArrayInputStream(xml.getBytes("UTF-8"))); //$NON-NLS-1$ } catch (final UnsupportedEncodingException e) { //if UTF-8 fails, try default encoding xmlSource = new StreamSource(new ByteArrayInputStream(xml.getBytes())); e.printStackTrace(); } // setup xsl stylesheet source final StreamSource xslSource = new StreamSource(xslFile); // get transformer final TransformerFactory tfactory = TransformerFactory.newInstance(); final Transformer transformer = tfactory.newTransformer(xslSource); // setup FOP final FOUserAgent foUserAgent = _fopFactory.newFOUserAgent(); foUserAgent.setProducer(this.getClass().getName()); final Fop fop = _fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, pdfContent); setTranslationParameters(transformer); setTransformationParameters((TourData) object, transformer, printSettings); // perform transformation final Result res = new SAXResult(fop.getDefaultHandler()); transformer.transform(xmlSource, res); // launch the pdf file (will only work if the user has a registered pdf viewer installed) Program.launch(printSettings.getCompleteFilePath()); try { xslFile.close(); } catch (final IOException e) { e.printStackTrace(); } } } finally { if (pdfContent != null) { try { pdfContent.close(); } catch (final IOException e) { e.printStackTrace(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void generarDocP(){\n generarPdf(this.getNombre());\n }", "public static void main(String[] args) throws DocumentException, IOException {\n \t\n// // step 1\n// Document document = new Document();\n \n // step 1: creation of the document with a certain size and ce...
[ "0.7089162", "0.703969", "0.6824349", "0.65453124", "0.6531417", "0.6497297", "0.64821655", "0.64530647", "0.64356285", "0.6398324", "0.6391861", "0.63152575", "0.63087547", "0.6288959", "0.62458736", "0.62198555", "0.6214946", "0.6212236", "0.6189482", "0.61661464", "0.61558...
0.0
-1
configures parameters used in the xsl transformation
private void setTransformationParameters( final TourData _tourData, final Transformer _transformer, final PrintSettings _printSettings) { _transformer.setParameter("isPrintMarkers", _printSettings.isPrintMarkers()); //$NON-NLS-1$ _transformer.setParameter("isPrintDescription", _printSettings.isPrintDescription()); //$NON-NLS-1$ _transformer.setParameter("paperSize", _printSettings.getPaperSize().toString()); //$NON-NLS-1$ _transformer.setParameter("paperOrientation", _printSettings.getPaperOrientation().toString()); //$NON-NLS-1$ _transformer.setParameter("startDate", formatStartDate(_tourData)); //$NON-NLS-1$ _transformer.setParameter("unitAltitude", new Double(net.tourbook.ui.UI.UNIT_VALUE_ALTITUDE)); //$NON-NLS-1$ _transformer.setParameter("unitDistance", new Double(net.tourbook.ui.UI.UNIT_VALUE_DISTANCE)); //$NON-NLS-1$ _transformer.setParameter("unitTemperature", net.tourbook.ui.UI.UNIT_VALUE_TEMPERATURE); //$NON-NLS-1$ _transformer.setParameter("unitLabelDistance", UI.UNIT_LABEL_DISTANCE); //$NON-NLS-1$ _transformer.setParameter("unitLabelSpeed", UI.UNIT_LABEL_SPEED); //$NON-NLS-1$ _transformer.setParameter("unitLabelAltitude", UI.UNIT_LABEL_ALTITUDE); //$NON-NLS-1$ _transformer.setParameter("unitLabelTemperature", UI.UNIT_LABEL_TEMPERATURE); //$NON-NLS-1$ _transformer.setParameter("unitLabelHeartBeat", net.tourbook.ui.Messages.Value_Unit_Pulse); //$NON-NLS-1$ _transformer.setParameter("unitLabelCadence", net.tourbook.ui.Messages.Value_Unit_Cadence); //$NON-NLS-1$ _transformer.setParameter("unitLabelCalories", net.tourbook.ui.Messages.Value_Unit_Calories); //$NON-NLS-1$ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setXsl(String xsl) {\n this.xsl = xsl;\n }", "public ArrayList getXsltParams() {\n return xsltParams;\n }", "public static void replaceInitParams(XmlElement xml, XmlElement xmlParams)\n {\n String sTemplate = xml.getString();\n if (sTemplate != null && sTemp...
[ "0.61892253", "0.56643796", "0.55818963", "0.5560465", "0.55462474", "0.5308361", "0.5285081", "0.5262344", "0.52118915", "0.5205314", "0.5167271", "0.51523924", "0.5131361", "0.5116479", "0.5116222", "0.5086255", "0.5071148", "0.505866", "0.50572056", "0.4974029", "0.4947302...
0.5512976
5
questions.add(new Question(1, false, "false", "asdf")); questions.add(new Question(2, true, "true", "asdf"));
@Override public int onStartCommand(Intent intent, int flags, int startId) { questions.addAll(DataUtil.loadQuestions("data.csv", this)); return Service.START_NOT_STICKY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MultipleAnswerQuestion(String question ,boolean isSingleAnswered)\r\n {\r\n super(question,isSingleAnswered);\r\n this.answers = new ArrayList<>(); //Initializing the HashSet\r\n }", "public void addQuestion(Question question);", "private void creatingNewQuestion() {\r\n Abstr...
[ "0.66368866", "0.6306725", "0.6259415", "0.61785454", "0.61146504", "0.6100112", "0.6087184", "0.60349345", "0.60193706", "0.59852374", "0.5981842", "0.5976385", "0.592633", "0.5882031", "0.58745897", "0.5862228", "0.5794296", "0.5785651", "0.57845455", "0.5771796", "0.572357...
0.0
-1
initializing the list of files to be parsed
public ServerParser() { m_fileNames = new ArrayList<String>(); m_fileNames.add("xml/time_context_element.xml"); m_fileNames.add("xml/location_context_element.xml"); m_fileNames.add("xml/velocity_context_element.xml"); m_fileNames.add("xml/temperature_context_element.xml"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void init() {\n\n File folder = new File(MAP_PATH);\n File[] listOfFiles = folder.listFiles();\n\n for (int i = 0; i < Objects.requireNonNull(listOfFiles).length; i++) {\n this.mapFiles.add(new File(MAP_PATH + listOfFiles[i].getName()));\n }\n }", "private void i...
[ "0.71005505", "0.6933245", "0.67433655", "0.6661134", "0.6501387", "0.64502347", "0.6434856", "0.6425116", "0.6352556", "0.63291395", "0.6314788", "0.628671", "0.6275413", "0.62452656", "0.6240012", "0.6227228", "0.6210388", "0.6209681", "0.6175887", "0.61630446", "0.6129158"...
0.6444867
6
has the purpose of obtaining the metadata of the context element
public MetadataContext parseMetadata(KXmlParser myParser) { MetadataContext metadata = new MetadataContext(); //<contextMetadata> try { myParser.nextTag(); System.out.println(myParser.getName()); //<description> myParser.nextTag(); System.out.println(myParser.getName()); metadata.setM_description( myParser.nextText()); //<positionInfo> myParser.nextTag(); System.out.println(myParser.getName()); metadata.setM_latitude( Double.parseDouble( myParser.getAttributeValue(0))); metadata.setM_longitude( Double.parseDouble( myParser.getAttributeValue(1))); //</positionInfo> myParser.nextTag(); System.out.println(myParser.getName()); //<temporalInfo> myParser.nextTag(); System.out.println(myParser.getName()); metadata.setM_time( myParser.nextText()); //<version> myParser.nextTag(); metadata.setM_time( myParser.nextText()); //<unit> myParser.nextTag(); System.out.println(myParser.getName()); metadata.setM_unit(myParser.nextText()); //</contextMetadata> myParser.nextTag(); System.out.println(myParser.getName()); } catch (XmlPullParserException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return metadata; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getContext();", "Map<String, Object> getContext();", "public String getContextString();", "public String getContext() { return context; }", "Context getContext();", "public Attributes getContextAttributes() {\r\n return this.atts;\r\n }", "public IContextInformation getContextInfor...
[ "0.70289993", "0.6577228", "0.65362006", "0.6507868", "0.64984506", "0.641658", "0.634284", "0.6286766", "0.6249544", "0.62477887", "0.622689", "0.6194023", "0.61860245", "0.6164836", "0.61072564", "0.6044772", "0.6044772", "0.6044772", "0.59713644", "0.5949146", "0.5949146",...
0.60890126
15
Properties loading from configuration file. Properties passed to jvm will override configuration file settings.
public static void loadProperties() { Properties props = new Properties(); try { props.load( new BufferedInputStream( ClassLoader.getSystemResourceAsStream("bench.properties") ) ); } catch (IOException ioe) { logger.log(Level.SEVERE, ioe.getMessage()); } props.putAll(System.getProperties()); //overwrite System.getProperties().putAll(props); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n private void loadProperties()\n {\n File f = getPropertiesFile();\n if (!f.exists())\n return;\n \n m_props = (Map<String, Object>) PSConfigUtils.loadObjectFromFile(f);\n }", "public void loadProperties(){\n\n\ttry{\n\t prop.load(file);\n ...
[ "0.75044435", "0.73725367", "0.736365", "0.7225865", "0.7173044", "0.71703917", "0.71508014", "0.704264", "0.7001537", "0.7000228", "0.69979364", "0.69826424", "0.69560736", "0.69462335", "0.6931208", "0.6918859", "0.68965536", "0.6885825", "0.6867764", "0.6863343", "0.685526...
0.6788351
29
/ Delegate the building of the sql to the concrete impl.
abstract protected String buildSQL(BatchSQLEnum sql);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void constructExecuteSql() {\n getMetaData();\n // Validate that the primary keys are present in the underlying SQL\n StringBuilder orderBySql = new StringBuilder(super.getExecuteSql()).append(\"\\n order by \");\n switch (metaData.getDbType()) {\n case ORACLE:\n ...
[ "0.6610283", "0.65436137", "0.6498206", "0.6445604", "0.6326645", "0.631047", "0.61952275", "0.61809886", "0.60628587", "0.6051978", "0.60511464", "0.60197514", "0.59991026", "0.5998534", "0.598744", "0.5972822", "0.5955672", "0.59382147", "0.5936671", "0.59347636", "0.592222...
0.6612766
0
Constructs a Card Object
public Card(String name, String description, String flavorText, Boolean scorable, int cost) { this.name = name; this.description = description; this.flavorText = flavorText; this.scorable = scorable; this.cost = cost; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card () {}", "public Card()\n {}", "public Card() { this(12, 3); }", "Card(){\t \n}", "public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true value to 0\n\ttrueVa...
[ "0.8219015", "0.7965876", "0.77801573", "0.77382445", "0.75989383", "0.75534165", "0.7475822", "0.7445035", "0.7441012", "0.7438649", "0.7405022", "0.7358737", "0.7334442", "0.7310112", "0.7294291", "0.72936153", "0.72741586", "0.71834666", "0.7181025", "0.7157086", "0.712898...
0.68237805
43
gets and returns the Card name
public String getName() { return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCardName() {\n \t\treturn cardName;\n \t}", "public String getCardName(){\n return type.getType() + \" of \" + suit.getSuit();\n }", "public String getCardName() {\r\n\t\treturn cardName;\r\n\t}", "public String getCardName()\n {\n String returnString = \"\";\n if(...
[ "0.795263", "0.7793953", "0.7772358", "0.7436137", "0.7070384", "0.7045951", "0.69826245", "0.6928439", "0.6712774", "0.6667026", "0.6563868", "0.65540445", "0.65352887", "0.6481422", "0.6460211", "0.64381903", "0.6353717", "0.6338054", "0.6319884", "0.6289567", "0.6273747", ...
0.0
-1
gets and returns the Card functional description
public String getDescription() { return description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getDisplay_description();", "java.lang.String getDesc();", "String getDesc();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getD...
[ "0.7403749", "0.7123801", "0.7107613", "0.70891595", "0.70891595", "0.70891595", "0.70891595", "0.70891595", "0.70891595", "0.70891595", "0.70891595", "0.70891595", "0.70891595", "0.70891595", "0.70891595", "0.70891595", "0.70891595", "0.70891595", "0.70891595", "0.70891595", ...
0.0
-1
gets and returns the Card representational description
public String getFlavorText() { return flavorText; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getDisplay_description();", "java.lang.String getDesc();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java...
[ "0.7727304", "0.7649847", "0.76210856", "0.76210856", "0.76210856", "0.76210856", "0.76210856", "0.76210856", "0.76210856", "0.76210856", "0.76210856", "0.75102925", "0.75102925", "0.75102925", "0.75102925", "0.75102925", "0.75102925", "0.75102925", "0.75102925", "0.75102925", ...
0.0
-1
gets and returns the Card's scorability
public Boolean isScorable() { return scorable; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getHighCard() {\r\n return highCard;\r\n }", "public Suit getSuit() {\n return cardSuit;\n }", "public Integer getIscard() {\n return iscard;\n }", "public int getVictoryCards() {\n \t\treturn victory;\n \t}", "public String getCardSuit() {\n return ...
[ "0.63046664", "0.6281905", "0.6183887", "0.61724365", "0.60985667", "0.60177976", "0.6010687", "0.59963155", "0.5993926", "0.59144706", "0.58726686", "0.5817007", "0.58133084", "0.5811674", "0.5802213", "0.5794709", "0.5770184", "0.5752631", "0.5734461", "0.57294244", "0.5728...
0.0
-1
gets and returns the Card cost
public int getCost() { return cost; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getCost();", "int getCost();", "int getCost();", "public int getCost(){\r\n\t\treturn this.cost;\r\n\t}", "public int getCost() {\n \t\treturn cost;\n \t}", "double getCost();", "double getCost();", "public double getCost() {\t\t \n\t\treturn cost;\n\t}", "public int getCost()\n {\n r...
[ "0.7626033", "0.7626033", "0.7626033", "0.75656796", "0.75317806", "0.75298727", "0.75298727", "0.74570835", "0.7433428", "0.7432642", "0.7400502", "0.7342009", "0.7339469", "0.7326244", "0.7302713", "0.72969764", "0.7289721", "0.7289055", "0.7272821", "0.72489387", "0.724530...
0.7430124
11
Card's default play method. Removes card from hand.
public void play(PlasterClash p) { p.currentPlayer().getHand().remove(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "public void playCard(PlayingCard card){\n\t\tplayed = hand.remove(hand.indexOf(card));\t\t\n\t}", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "public Card playCard() {\n Card card = this.myCards[this.numCards - 1];\n this.myCards[this....
[ "0.7685783", "0.7634678", "0.7623676", "0.71239865", "0.71151304", "0.6782385", "0.6751528", "0.66157573", "0.65942824", "0.6568754", "0.654527", "0.6538543", "0.6522078", "0.64884126", "0.6452768", "0.6441427", "0.6388188", "0.6371467", "0.6335863", "0.6332924", "0.6292231",...
0.6322543
20
Plays card to the play zone.
public void playToPlayZone(PlasterClash p) { p.getPlayZone().add(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "@Override\r\n\tpublic void playMonumentCard() {\n\t\t\r\n\t}", "void playMonumentCard();", "void playCurrentStationCard();", "public void playCard(int player, int card) {\n }", "@Override\r\n\...
[ "0.7729296", "0.7586702", "0.7383592", "0.7143579", "0.7056927", "0.6888459", "0.6764091", "0.6717147", "0.66646695", "0.6592885", "0.65782684", "0.6556899", "0.6492474", "0.6489548", "0.6489194", "0.6461302", "0.64482355", "0.6426991", "0.6409414", "0.63171124", "0.62882775"...
0.6201926
25
compares the cost of a card with inputted card
public int compareTo(Card other) { return this.getCost() - other.getCost(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int canBuy(SimpleResList cardCost) {\r\n\t\tint totalNeeded = cardCost.getTotalRes();\r\n\t\tint numLeft = totalNeeded;\r\n\r\n\t\tif ((numLeft = cardCost.subtract(resList)) == 0)\r\n\t\t\treturn totalNeeded;\r\n\r\n\t\tArrayList<SimpleResList> copySellOrList = new ArrayList<SimpleResList>(\r\n\t\t\t\tsellO...
[ "0.639418", "0.62933695", "0.61456436", "0.6117914", "0.60307556", "0.59586734", "0.5926095", "0.59154165", "0.5864304", "0.58623606", "0.58492756", "0.5833679", "0.57743514", "0.57705265", "0.572438", "0.56969744", "0.56933963", "0.56729835", "0.56729835", "0.56729835", "0.5...
0.59024954
8
overrides object's equals method comparing it to Card name instead
@Override public boolean equals(Object other) { if (null == other) { return false; } if (this == other) { return true; } if (!(other instanceof Card)) { return false; } Card that = (Card) other; return this.getName().equals(that.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean equals(Card anotherCard){\n\t\t\n\t}", "@Override\n public boolean equals(Object otherObject) {\n if (this == otherObject) return true;\n if (!(otherObject instanceof Card)) return false;\n Card card = (Card) otherObject;\n return suit == card.suit &&\n ...
[ "0.82124674", "0.7662579", "0.74975413", "0.7322548", "0.7221635", "0.7213113", "0.7137252", "0.7116097", "0.7090119", "0.7069784", "0.7065302", "0.70243174", "0.69689834", "0.6944188", "0.69272286", "0.6843431", "0.68383026", "0.6804984", "0.68016773", "0.68004775", "0.67962...
0.83405316
0
overrides object's hashCode method
public int hashCode() { int result = 6; result = 31 * result * name.hashCode(); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t public int hashCode();", "@Override\n int hashCode();", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "@Override\n public int hashCode();", "@Override \n int hashCode();", "@Ov...
[ "0.86153233", "0.8569667", "0.8569554", "0.8569554", "0.8569554", "0.85046935", "0.8436218", "0.83908755", "0.8377985", "0.83454835", "0.8297275", "0.8217672", "0.8217672", "0.8217672", "0.81879854", "0.81626034", "0.81626034", "0.81626034", "0.81626034", "0.8147919", "0.8143...
0.0
-1
overrides object's toString method to return card name and cost
@Override public String toString() { return (getName() + " (" + getCost() + ")"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String toString() {\n\t\treturn \"\\nCard Name: \" + getName() +\n\t\t\t\t\"\\nMultiverse Id: \" + getMultiverseid() +\n\t\t\t\t\"\\nMana Cost: \" + getManaCost();\n\t}", "public String toString() {\n // return \"Card {suit: \"+getSuitString()+\", rank: \"+getRankString()+\"}\";\n ...
[ "0.81528115", "0.78821146", "0.7863834", "0.7743196", "0.75685513", "0.74937016", "0.74029344", "0.73591405", "0.73367083", "0.73233896", "0.73011583", "0.72753936", "0.72707254", "0.7219165", "0.72177047", "0.7208151", "0.7191179", "0.7152853", "0.7151701", "0.713572", "0.71...
0.7797981
3
null out current tags
public void clear(boolean nulltags) { Arrays.fill(tags, null); numTags = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clearHasTag() {\n \n hasTag_ = 0;\n }", "void unsetTag();", "public Canary clearTagsEntries() {\n this.tags = null;\n return this;\n }", "public void clearTagArray(){\n\t\t\n\t\ttagArray.clear();\n\t\t\n\t}", "void deleteUnusedTags();", "public void clearRemovalTag() ...
[ "0.72711617", "0.70527774", "0.6935374", "0.6917035", "0.67385024", "0.6557437", "0.654588", "0.64974755", "0.64550054", "0.6430049", "0.64088935", "0.63597554", "0.62692773", "0.617897", "0.61491966", "0.61240643", "0.61120254", "0.61114854", "0.60732996", "0.60471576", "0.6...
0.6456594
8
find Tag by key NOTE: key must be internal()
public Tag get(String key) { for (int i = 0; i < numTags; i++) { if (tags[i].key == key) return tags[i]; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public Object findElement(Object key) {\r\n\r\n // Search for node possibly containing key\r\n TFNode node = search(root(), key);\r\n \r\n // Note the index of where the key should be\r\n int index = FFGTE(node, key);\r\n\r\n // If the index is greater tha...
[ "0.69128275", "0.666514", "0.6570228", "0.65162915", "0.6448829", "0.64236087", "0.64170617", "0.6394228", "0.6382925", "0.63618153", "0.63103783", "0.6297818", "0.62807", "0.6241103", "0.6233209", "0.6232001", "0.6232001", "0.6231499", "0.6201527", "0.6175707", "0.61570597",...
0.76938325
0
The default constructor for a packet
public Packet(int source, int dest, int DSCP){ try{ this.source = source; this.dest = dest; this.DSCP = DSCP; } catch(Exception e){ e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Packet() {\n\t}", "public PacketBuilder() {\n\t\tthis(1024);\n\t}", "public PacketHandler() {}", "public CapsPacketExtension()\n {\n }", "public Packet(PacketId packetId, String message)\n {\n this.packetId = packetId;\n this.message = message;\n\n }", "protected Abstrac...
[ "0.8793962", "0.7748382", "0.72830826", "0.7244727", "0.7081021", "0.70791566", "0.70141655", "0.7005786", "0.6966049", "0.6962662", "0.6946647", "0.6934468", "0.68551326", "0.6820514", "0.6682915", "0.66578573", "0.66479796", "0.66243356", "0.6584366", "0.6561475", "0.654746...
0.67665833
14
Adds an MPLS header to a packet
public void addMPLSheader(MPLS header){ MPLSheader.add(header); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addHeader(String s, String s1) {\n\t\t\n\t}", "private void addHeader() {\n \n \t\t// StartNr; Namn; #Varv; Totaltid; Varv1; Varv2; Varv3; Start;\n \t\t// Varvning1; Varvning2; Mål\n \n \t\tsb.append(\"Plac; StartNr; Namn; #Varv; Totaltid; \");\n \t\tfor (int i = 0; i < maxNbrOfLaps; i++) {\n \t\t\ts...
[ "0.6257059", "0.6100692", "0.6068293", "0.5814382", "0.5788572", "0.5773261", "0.5729729", "0.570147", "0.5664481", "0.55612653", "0.55041116", "0.5487742", "0.5450254", "0.5422845", "0.53824466", "0.5379631", "0.5348183", "0.5331204", "0.5320227", "0.52685225", "0.52622294",...
0.7730241
0
Pops an MPLS header from the packet
public MPLS popMPLSheader(){ return MPLSheader.poll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void decodeHeader(Packet p){\n \t// Client parent isn't null so client is authenticated\n \tif (client != null)\n \t\tp.header = client.getCrypt().decrypt(p.header);\n \t\n \tif(realm.getVersion() < Versions.VERSION_MOP){\n \t\tByteBuffer toHeader = ByteBuffer.allocate(6);\n ...
[ "0.62708956", "0.55550104", "0.5506377", "0.54841655", "0.5338778", "0.5324107", "0.5216382", "0.52076554", "0.5169057", "0.51436913", "0.51365334", "0.5098239", "0.5094649", "0.506286", "0.50346947", "0.49864793", "0.49657473", "0.49553314", "0.49184024", "0.48890212", "0.48...
0.78480417
0
Returns the source ip address of this packet
public int getSource(){ return this.source; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String sourceIPAddress() {\n return this.sourceIPAddress;\n }", "public String getIpSource() {\n return getPropertyAsString(IP_SOURCE, \"\");\n }", "java.lang.String getDestinationIp();", "String getDestIpAddress() {\n return destIpAddress;\n }", "public String getIp(...
[ "0.7909437", "0.73024297", "0.70414317", "0.6731609", "0.6729017", "0.6650779", "0.65836114", "0.65836114", "0.65836114", "0.65836114", "0.65836114", "0.65836114", "0.65836114", "0.65836114", "0.6564744", "0.65327394", "0.6531795", "0.6524011", "0.6514175", "0.64923394", "0.6...
0.6188628
60
Returns the destination ip address of this packet
public int getDest(){ return this.dest; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getDestinationIp();", "public String destinationIPAddress() {\n return this.destinationIPAddress;\n }", "public java.lang.String getDestinationIp() {\n java.lang.Object ref = destinationIp_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n ...
[ "0.8402904", "0.8057579", "0.79245317", "0.7901471", "0.7708959", "0.7624557", "0.7476961", "0.74410194", "0.7389889", "0.7148443", "0.6946437", "0.6822355", "0.6773004", "0.6658362", "0.65593904", "0.6451762", "0.6431667", "0.64084905", "0.6360913", "0.6360913", "0.6360913",...
0.6333019
27
Set the DSCP field
public void setDSCP(int dSCP) { this.DSCP = dSCP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSipDscp(int dscp);", "public void setVideoDscp(int dscp);", "@SystemApi\n @NonNull\n public Builder setDscp(@IntRange(from = DSCP_MIN, to = DSCP_MAX) int dscp) {\n if (dscp < DSCP_MIN || dscp > DSCP_MAX) {\n throw new IllegalArgumentException(\"Invalid DSC...
[ "0.6747486", "0.66402835", "0.6082793", "0.5835632", "0.57476795", "0.55335295", "0.5532566", "0.5489073", "0.5485284", "0.5388673", "0.534774", "0.52982706", "0.51846856", "0.5170313", "0.51546216", "0.5151883", "0.5136067", "0.5134711", "0.5134711", "0.5117554", "0.51169795...
0.7320918
0
Returns the DSCP field
public int getDSCP() { return this.DSCP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SystemApi\n @IntRange(from = DSCP_MIN, to = DSCP_MAX)\n public int getDscp() {\n return mDscp;\n }", "public String getDField(int position){\n\t\treturn dfield.get(position);\n\t}", "public int getSipDscp();", "public java.lang.String getDsCPF() {\n return dsCPF;\n }", "java.lang...
[ "0.6534479", "0.62496585", "0.60489225", "0.602682", "0.5966303", "0.58907604", "0.5884304", "0.5870271", "0.58634084", "0.5836765", "0.58323896", "0.58267033", "0.58235365", "0.5823175", "0.58202636", "0.5811323", "0.5808903", "0.5807062", "0.5803819", "0.57999027", "0.57965...
0.6085562
2
Returns the trace ID for this cell
public int getTraceID(){ return this.traceID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getTraceId() {\n\t\treturn this.traceInformation.getTraceId();\n\t}", "public String getTraceId() {\n return traceId;\n }", "public int getLineID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null...
[ "0.72947514", "0.70585364", "0.6395495", "0.6358816", "0.6193949", "0.6158934", "0.61446023", "0.61446023", "0.61253726", "0.61086315", "0.61007077", "0.6081036", "0.6047464", "0.6039531", "0.6028695", "0.60260606", "0.6020174", "0.5967442", "0.5961937", "0.5927731", "0.57777...
0.7280576
1
Get first MPLS header
public MPLS getFirstMPLS() { return this.MPLSheader.peek(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MPLS popMPLSheader(){\r\n\t\treturn MPLSheader.poll();\r\n\t}", "public String getFirst(String headerName)\r\n/* 336: */ {\r\n/* 337:496 */ List<String> headerValues = (List)this.headers.get(headerName);\r\n/* 338:497 */ return headerValues != null ? (String)headerValues.get(0) : null;\r\n/* ...
[ "0.7202505", "0.6925936", "0.64975756", "0.6438977", "0.64365584", "0.64339894", "0.64278084", "0.64193577", "0.6383684", "0.6294447", "0.62814337", "0.6267727", "0.623245", "0.622894", "0.62077504", "0.61789423", "0.614319", "0.6125238", "0.61192805", "0.611843", "0.608677",...
0.8014683
0
smallest: should be negative, the first bit is 1, all other 1s are to the rightmost
public int nextSmallest(int n){ int countOnes = 0; while(n>0){ if( (n&1) > 0){ countOnes++; } n = n>>1; } int countZeroes = 32 - countOnes; int num = 0; for(int i=0;i<countZeroes;i++){ num = (num<<1)+1; } return (~(num << (countOnes-1))) & (-1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static long lowestOneBit(long i) {\r\n // HD, Section 2-1\r\n return i & -i;\r\n }", "static int min(int a, int b) { return a < b ? a : b; }", "private static int searchSmallest(List<Integer> input) {\n\t\tint left = 0;\n\t\tint right = input.size()-1;\n\t\t\n\t\twhile(left < right) {\n...
[ "0.754237", "0.6506039", "0.63041365", "0.6283111", "0.6253774", "0.62514406", "0.6241591", "0.6233381", "0.6227295", "0.61834276", "0.61788464", "0.6167415", "0.61418533", "0.61416763", "0.61281806", "0.6125974", "0.6105583", "0.60731363", "0.6054926", "0.60191184", "0.60080...
0.7070416
1
largest: should be positive, the first bit is 0, all other 1s are to the leftmost, except the first bit
public int nextLargest(int n){ int countOnes = 0; while(n>0){ if( (n&1) > 0){ countOnes++; } n = n>>1; } int num = 0; for(int i=0;i<countOnes;i++){ num = (num<<1)+1; } num = num << (31 - countOnes); return num; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static long highestOneBit(long i) {\r\n // HD, Figure 3-1\r\n i |= (i >> 1);\r\n i |= (i >> 2);\r\n i |= (i >> 4);\r\n i |= (i >> 8);\r\n i |= (i >> 16);\r\n i |= (i >> 32);\r\n return i - (i >>> 1);\r\n }", "public static int maxOnesLength(in...
[ "0.7337718", "0.61511064", "0.6113955", "0.60509527", "0.5882972", "0.5840029", "0.5838727", "0.5825941", "0.57879543", "0.5774615", "0.576142", "0.57511634", "0.57022077", "0.56889653", "0.5686115", "0.5676613", "0.56659514", "0.5662746", "0.5620126", "0.5613038", "0.5609904...
0.66693425
1
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
weight should be in kgs height should be in cms age should be in years For bmi and bmr, when the user is inputting, need to invoke set methods as constructor wont do it
public User(String userId) { this.name= null; this.userId= userId; this.height= 0; this.gymFrequency= 0; this.loseGainPerWeek= 0; this.age= 0; this.waterReminder= 0; this.weight= 0; this.gender= null; // this.goal= goal; this.restrictions="none"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BMI(String name, double weight, double height)\n {\n this.name = name;\n this.weight = weight;\n this.height = height;\n }", "public static void main( String [] args )\n {\n Scanner input = new Scanner( System.in );\n\n int weightInput = 0; // Init weight input\n int...
[ "0.7491573", "0.70549625", "0.6949782", "0.667269", "0.65731263", "0.6498808", "0.63972586", "0.63937175", "0.6383899", "0.6347084", "0.63189054", "0.6315716", "0.6288466", "0.6239145", "0.6151759", "0.6143376", "0.6127921", "0.6115932", "0.6111319", "0.6093732", "0.60799426"...
0.0
-1
added func to calculate req number of calories per day
public void setCalDay() { float goal_bmr; if(gender=="male") { goal_bmr= (float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age + 5); } else { goal_bmr=(float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age - 161); } switch (gymFrequency) { case 0:calDay = goal_bmr*1.2; break; case 1: case 2: case 3:calDay = goal_bmr*1.375; break; case 4: case 5:calDay = goal_bmr*1.55; break; case 6: case 7:calDay = goal_bmr*1.725; break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int calculateCalories(int steps) {\n\t\treturn (int) (steps * 0.25);\n\t}", "public int daysOverdue(int today);", "private void calcCalories()\n\t{\n\t\tif (getIntensity() == 1)\n\t\t{\n\t\t\tbikeCal = 10 * bikeTime; \n\t\t}\n\t\telse if (getIntensity() == 2)\n\t\t{\n\t\t\tbikeCal = 14.3 * bikeTime; \...
[ "0.62065536", "0.60917765", "0.6077303", "0.59998375", "0.59834653", "0.5971183", "0.5969344", "0.5939618", "0.5930622", "0.5912987", "0.5911069", "0.59034413", "0.59014153", "0.5872093", "0.5866555", "0.58554024", "0.5836008", "0.5803784", "0.57978976", "0.5770995", "0.57614...
0.0
-1
The main constructor for Payment objects
public Payment(double amountPaid, int method, Timestamp date, int cardDetailsID, int invoiceID){ this.recordID = recordID; this.amountPaid = amountPaid; this.method = method; this.date = date; this.cardDetailsID = cardDetailsID; this.invoiceID = invoiceID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CashPayment()\n {\n super();\n }", "public PaymentDetails () {\n\t}", "public PaymentMethod()\n {\n }", "public PaymentCard() {\n\t}", "public VoucherPayment() {\r\n }", "public Payroll()\r\n\t{\r\n\t\t\r\n\t}", "public BoletoPaymentRequest() {\n\n }", "public Merchant...
[ "0.8022714", "0.8010355", "0.7987303", "0.78804547", "0.78086275", "0.7555792", "0.7389275", "0.7285341", "0.72687274", "0.72644866", "0.7226094", "0.7175793", "0.7114416", "0.71116906", "0.70313084", "0.69982266", "0.69780856", "0.69780856", "0.696686", "0.69442207", "0.6916...
0.6997921
16
Returns a number that represents the amount paid
public double getAmountPaid(){ return amountPaid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getPaidAmount();", "double getPaid();", "public double getPaid() {\n return paid_;\n }", "double getUnpaidAmount();", "public double getPaid() {\n return paid_;\n }", "public BigDecimal getPaidNum() {\n return paidNum;\n }", "public double getTotalAmountPaid(){\n\t\...
[ "0.8195395", "0.78005403", "0.7538518", "0.7508683", "0.7502134", "0.746434", "0.7344085", "0.7276772", "0.72375774", "0.7184611", "0.7122953", "0.7084992", "0.7041687", "0.69697493", "0.694068", "0.687331", "0.68631333", "0.6854825", "0.6777224", "0.6761761", "0.67329204", ...
0.683886
18
Returns the method used
public int getMethod(){ return method; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getMethod();", "String getMethod();", "public String getMethod ()\n {\n return method;\n }", "public Method getMethod();", "MethodName getMethod();", "protected Method getMethod() {\n return method;\n }", "Method getMethod();", "Method getMethod();", "private String getName() ...
[ "0.80037767", "0.80037767", "0.7727529", "0.76733625", "0.75900507", "0.7525846", "0.752241", "0.752241", "0.7490081", "0.7483931", "0.7483931", "0.7425753", "0.7411579", "0.7411579", "0.7411579", "0.7411579", "0.7400076", "0.7368733", "0.736167", "0.734984", "0.734984", "0...
0.7617951
4
Returns the date when payment was made
public Timestamp getDate(){ return date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getPAYMENT_DATE() {\r\n return PAYMENT_DATE;\r\n }", "public Date getPAYMENT_DATE() {\r\n return PAYMENT_DATE;\r\n }", "@Override\n\tpublic java.util.Date getPaymentDate() {\n\t\treturn _esfShooterAffiliationChrono.getPaymentDate();\n\t}", "public String getReturnDate();", "...
[ "0.77218133", "0.77218133", "0.75104433", "0.7151166", "0.7147799", "0.7138441", "0.7128706", "0.7108933", "0.7091059", "0.70870423", "0.698439", "0.698439", "0.6862222", "0.6837165", "0.6779182", "0.6746673", "0.6720037", "0.66754293", "0.6649265", "0.6639368", "0.6613838", ...
0.0
-1
Returns the id of the card used for payment
public int getCardDetailsID(){ return cardDetailsID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getCardId() {\r\n return cardId;\r\n }", "public int getId() {\n//\t\tif (!this.isCard())\n//\t\t\treturn 0;\n\t\treturn id;\n\t}", "public String getIdCard() {\n return idCard;\n }", "public String getIdCard() {\n\t\treturn idCard;\n\t}", "public int getCardID() {\n ...
[ "0.76781934", "0.74926805", "0.7460837", "0.74602157", "0.7453622", "0.74407804", "0.7405226", "0.7357569", "0.7357569", "0.7357569", "0.7281959", "0.7266028", "0.72184527", "0.7197861", "0.7105637", "0.6793052", "0.6773832", "0.6740446", "0.6739623", "0.6739623", "0.6710789"...
0.6701116
21
Returns the id of the invoice
public int getInvoiceID(){ return invoiceID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Long getInvoiceId();", "public int getC_Invoice_ID();", "public int getUlIdInvoInvoice()\r\n {\r\n return this._ulIdInvoInvoice;\r\n }", "public int getInvoiceNumber() {\n return invoiceNumber;\n }", "public int getInvoiceNumber() {\n return invoiceNumber;\n }", "public j...
[ "0.8536587", "0.7743938", "0.74230844", "0.7219102", "0.7219102", "0.71431935", "0.71410966", "0.7126121", "0.7018151", "0.6987595", "0.6974702", "0.69664717", "0.6944111", "0.685718", "0.67275685", "0.67275095", "0.6707059", "0.6657767", "0.6637149", "0.65059805", "0.6462450...
0.74974203
2
TODO Autogenerated method stub
@Override public boolean onTouch(View arg0, MotionEvent event) { if (gestureDetector.onTouchEvent(event)) { event.setAction(MotionEvent.ACTION_CANCEL); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onDestroy() { super.onDestroy(); // if (PlayerService.myMediaPlayer != null) { // PlayerService.myMediaPlayer.stop(); // PlayerService.myMediaPlayer.release(); // PlayerService.myMediaPlayer = null; // } Log.d(TAG,"MainActivity destroyed"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
String SAVED_TEXT = "saved_text";
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); editKey = (EditText) findViewById(R.id.etKey); editText = (EditText) findViewById(R.id.etText); buttonSave = (Button) findViewById(R.id.btnSave); buttonLoad = (Button) findViewById(R.id.btnLoad); buttonSave.setOnClickListener(this); buttonLoad.setOnClickListener(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void save(String text) {\n File file = new File(path + \"/savedFile.txt\");\n\n Save(file, text);\n }", "boolean saveMyNoteText(String myNote);", "public void store(final String text, final String variableName);", "public abstract String toSaveString();", "String savedFile();...
[ "0.6795235", "0.66816306", "0.6510454", "0.63714623", "0.63372093", "0.62452656", "0.62155604", "0.62135166", "0.6196608", "0.61870617", "0.6176039", "0.6127682", "0.60739607", "0.5999192", "0.5964471", "0.5914298", "0.58450437", "0.5800428", "0.5797032", "0.57691437", "0.576...
0.0
-1
Configurando o banco de dados
private void configureDB() { mDb = mDbHelper.getWritableDatabase(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void inicializarBD() {\n\t\ts = new StandardServiceRegistryBuilder().configure().build();\r\n\t\tsf = new MetadataSources(s).buildMetadata().buildSessionFactory();\r\n\t}", "private Conexao() {\r\n\t\ttry {\r\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:mem:.\", \"sa\", \"\");\r\n\...
[ "0.68723744", "0.6594592", "0.6149901", "0.6127034", "0.60059685", "0.59899104", "0.59577966", "0.5849833", "0.5818573", "0.5816633", "0.58098584", "0.5785404", "0.5770526", "0.5758038", "0.56933945", "0.5685397", "0.566851", "0.5663755", "0.56325054", "0.5626456", "0.561082"...
0.58110046
10
Test that waiting on a request that never completes times out
@Test public void testTimeout() throws Exception { ProduceRequestResult request = new ProduceRequestResult(topicPartition); FutureRecordMetadata future = new FutureRecordMetadata(request, relOffset, RecordBatch.NO_TIMESTAMP, 0, 0, Time.SYSTEM); assertFalse(future.isDone(), "Request is not completed"); try { future.get(5, TimeUnit.MILLISECONDS); fail("Should have thrown exception."); } catch (TimeoutException e) { /* this is good */ } request.set(baseOffset, RecordBatch.NO_TIMESTAMP, null); request.done(); assertTrue(future.isDone()); assertEquals(baseOffset + relOffset, future.get().offset()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void timeoutInactiveRequests() throws Exception {\n final Semaphore semaphore = new Semaphore(1);\n final int responseSize = 16;\n RpcHandler handler = new RpcHandler() {\n @Override\n public void receive(\n TransportClient client,\n ByteBuffer message,\n ...
[ "0.6877465", "0.6601529", "0.64517343", "0.6394682", "0.63213617", "0.6296904", "0.6245825", "0.617068", "0.61510557", "0.61434627", "0.61401814", "0.6113957", "0.6066856", "0.60652184", "0.6016804", "0.59918463", "0.59749854", "0.5960586", "0.593129", "0.5907572", "0.5889214...
0.63604045
4
Test that an asynchronous request will eventually throw the right exception
@Test public void testError() { FutureRecordMetadata future = new FutureRecordMetadata(asyncRequest(baseOffset, new CorruptRecordException(), 50L), relOffset, RecordBatch.NO_TIMESTAMP, 0, 0, Time.SYSTEM); assertThrows(ExecutionException.class, future::get); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testHttpFailureRetries() {\n delayTestFinish(RUNASYNC_TIMEOUT);\n runAsync1(0);\n }", "@Test\n public void furtherRequestsDelay() throws Exception {\n final byte[] response = new byte[16];\n final StreamManager manager = new StreamManager() {\n @Override\n public ManagedBuffer...
[ "0.67326546", "0.62654436", "0.6254543", "0.6171326", "0.61443686", "0.6122452", "0.6111305", "0.5981824", "0.5936044", "0.5930516", "0.5874946", "0.58609074", "0.58247656", "0.58111817", "0.5806495", "0.58036304", "0.5776917", "0.5776584", "0.57559466", "0.574801", "0.573453...
0.64912176
1
Test that an asynchronous request will eventually return the right offset
@Test public void testBlocking() throws Exception { FutureRecordMetadata future = new FutureRecordMetadata(asyncRequest(baseOffset, null, 50L), relOffset, RecordBatch.NO_TIMESTAMP, 0, 0, Time.SYSTEM); assertEquals(baseOffset + relOffset, future.get().offset()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void validSessionTransactionsGetOffsetTest() {\n // Insert test transaction 1.\n validSessionValidTransactionPostTest();\n\n String clutterTransaction = String.format(\"{\" +\n \"\\\"date\\\": \\\"1889-04-20T19:45:04.030Z\\\", \" +\n \"\\\"amount...
[ "0.60218334", "0.59046584", "0.5615643", "0.5531587", "0.5388309", "0.5352276", "0.5328659", "0.5299004", "0.5272537", "0.5244888", "0.5217793", "0.5201805", "0.51578456", "0.51539993", "0.5152872", "0.51423764", "0.5138651", "0.5121856", "0.51217455", "0.5077759", "0.5074149...
0.70663816
0
/ create a new request result that will be completed after the given timeout
public ProduceRequestResult asyncRequest(final long baseOffset, final RuntimeException error, final long timeout) { final ProduceRequestResult request = new ProduceRequestResult(topicPartition); Thread thread = new Thread(() -> { try { Thread.sleep(timeout); if (error == null) { request.set(baseOffset, RecordBatch.NO_TIMESTAMP, null); } else { request.set(-1L, RecordBatch.NO_TIMESTAMP, index -> error); } request.done(); } catch (InterruptedException e) { } }); thread.start(); return request; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Builder makeTemporary(int timeout);", "public RlcpResponse execute(int timeout) {\n return getMethod().getConnector().execute(this, timeout);\n }", "public long timeout(long timeout);", "public DeferredResult(Long timeout)\n/* */ {\n/* 87 */ this(timeout, RESULT_NONE);\n/* */ }", ...
[ "0.66691947", "0.6318682", "0.6282498", "0.6240814", "0.61275154", "0.61125624", "0.6039673", "0.5855137", "0.58422863", "0.58283484", "0.5820129", "0.57531756", "0.56769687", "0.56218493", "0.5589155", "0.55861825", "0.55659616", "0.5550304", "0.55467993", "0.5520289", "0.55...
0.59171057
7
Finds an expertise by its name
Expertise findByName(String name);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Expert findExpertByName(String expertName) {\n\t\treturn expertRepository.findExpertByName(expertName);\n\t}", "@Override\n\tpublic ArrayList<Expert> findExpertBySkillName(List<String> skillName) {\n\t\treturn expertRepository.findExpertBySkillName(skillName);\n\t}", "@Override\n\tpublic Ar...
[ "0.71691096", "0.6391864", "0.6136667", "0.61337626", "0.5859704", "0.5708162", "0.56219244", "0.554876", "0.5545668", "0.55202734", "0.5495979", "0.549327", "0.5486686", "0.5469492", "0.54323494", "0.537359", "0.5351208", "0.5350042", "0.53497094", "0.532638", "0.5320505", ...
0.80611706
0
Created by ZKQ on 2015/5/27.
public interface TEndProjectCommentDAO extends BaseDao<TEndProjectComment> { //获取一个教师可以评审的结题 List<TEndProjectComment> findMyReviewEndPros(String teaCode, PageBean pageBean); int findMyReviewEndProsCount(String teaCode); List findByEndprojectcommentAdvise(Object endprojectcommentAdvise); List findByEndprojectcommentContent(Object endprojectcommentContent); List findByIsdeleted(Object isdeleted); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpubli...
[ "0.6157695", "0.6063208", "0.60104537", "0.59962785", "0.5915975", "0.5898719", "0.5898719", "0.5881903", "0.5861248", "0.5850831", "0.58489937", "0.58489937", "0.58489937", "0.58489937", "0.58489937", "0.57804036", "0.57783204", "0.5770405", "0.5763345", "0.5761989", "0.5761...
0.0
-1
Adds a new int to the set, if one is already there it does nothing
void add(int n);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean insert(int val) {\r\n return set.add(val);\r\n }", "public void add(final int item) {\n if (!contains(item)) {\n set[size] = item;\n size += 1;\n }\n }", "public void add(int add){\n if (!elementOf(add)) {\n int[] added = new int...
[ "0.71197236", "0.6987683", "0.6967702", "0.68449044", "0.68448716", "0.67760813", "0.66992486", "0.6480739", "0.6414852", "0.62882787", "0.6241032", "0.62227905", "0.61156374", "0.60784566", "0.607303", "0.6058266", "0.6053883", "0.60504186", "0.6039524", "0.60358745", "0.602...
0.0
-1