Unnamed: 0
int64
0
403
cwe_id
stringclasses
1 value
source
stringlengths
56
2.02k
target
stringlengths
50
1.97k
400
public App testInterface(@PathVariable(name = "version") VERSION version){ App app = new App("Listing", getVersionedPojos(version)); return app; }
public App testInterface(@PathVariable(name = "version") VERSION version){ return new App("Listing", getVersionedPojos(version)); }
401
public ResponseEntity<?> createGame(@RequestBody TicTacToeDTO ticTacToeDTO){ UserDetails principal = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); String username = principal.getUsername(); TicTacToeGameDTO createdGameDto; try { createdGameDto = ticTacToeService.createGame(ticTacToeDTO, username); } catch (RuntimeException e) { return new ResponseEntity<>(HttpStatus.BAD_REQUEST); } template.convertAndSend("/tictactoe/add", createdGameDto); return new ResponseEntity<>(createdGameDto, HttpStatus.OK); }
public ResponseEntity<?> createGame(@RequestBody TicTacToeDTO ticTacToeDTO){ UserDetails principal = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); String username = principal.getUsername(); TicTacToeGameDTO createdGameDto = ticTacToeService.createGame(ticTacToeDTO, username); template.convertAndSend("/tictactoe/add", createdGameDto); return new ResponseEntity<>(createdGameDto, HttpStatus.OK); }
402
private void saveData(){ configurationManager.loadProfile(String.valueOf((profileBox.getSelectedItem()))); ConnectionBuilder connParameters = new ConnectionBuilder.Builder(connNameTF.getText()).userName(usernameTF.getText()).password(passwordTF.getText()).url(urlTF.getText()).jar(jarTF.getText()).profile(String.valueOf((profileBox.getSelectedItem()))).driverName(configurationManager.getIProfile().getDriverName()).rawRetainDays(rawDataDaysRetainTF.getText()).olapRetainDays(olapDataDaysRetainTF.getText()).build(); configurationManager.saveConnection(connParameters); }
private void saveData(){ ConnectionBuilder connParameters = new ConnectionBuilder.Builder(connNameTF.getText()).userName(usernameTF.getText()).password(passwordTF.getText()).url(urlTF.getText()).jar(jarTF.getText()).profile(String.valueOf((profileBox.getSelectedItem()))).driverName(configurationManager.getIProfile().getDriverName()).rawRetainDays(rawDataDaysRetainTF.getText()).olapRetainDays(olapDataDaysRetainTF.getText()).build(); configurationManager.saveConnection(connParameters); }
403
public ResponseEntity<?> makeTransfer(@PathVariable String number1, @PathVariable String number2, @PathVariable Double money) throws AccountDoesNotExistException{ Account firstAccount = accountService.getOneAccount(number1); Account secondAccount = accountService.getOneAccount(number2); List<Account> updatedAccounts = transferService.makeTransfer(firstAccount, secondAccount, money); return new ResponseEntity<>(updatedAccounts, HttpStatus.OK); }
public ResponseEntity<?> makeTransfer(@PathVariable String firstAccountNumber, @PathVariable String secondAccountNumber, @PathVariable Double money) throws AccountDoesNotExistException{ List<Account> updatedAccounts = transferService.makeTransfer(firstAccountNumber, secondAccountNumber, money); return new ResponseEntity<>(updatedAccounts, HttpStatus.OK); }