query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Returns how many times there was a draw between human and bot.
public static Integer getDrawsPvE() { return humanVsBot.draws + botVsHuman.draws; }
[ "int getWinCount();", "public int getDraws() {\n return draws;\n }", "int getTotalBotCount() {\n int t = 0;\n\n for (Integer i : m_botTypes.values())\n t += i;\n\n return t;\n }", "int getHerwinCount();", "public int totalGames() {\n return wins + losses + draws...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method for generating Lucid definitions for all the component services.
private static String listAtomicSvcDefs(ConstraintAwarePlan cnstrAwrPlan) { String lucidCode = ""; //Generating and appending Lucid definition of each component service for (List<ServiceNode> serviceLayer : cnstrAwrPlan.getServiceLayers()) { for (ServiceNode serviceNode : serviceLayer) { lucidCode...
[ "public abstract Vector loadComponentDefinitions(long bundleID);", "private static String defineAtomicSvc(ServiceNode serviceNode)\n\t{\n\t\tString lucidCode = \"\";\n\t\tString svcDef = \"\";\n\t\tString svcName = serviceNode.getService().getName();\n\t\t\n\t\t//Generating and combining all sub-definitions to fo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Description: method to delete passenger
@Transactional @RequestMapping(value="/passenger/{id}", method=RequestMethod.DELETE) public ResponseEntity<E> deletePassenger(@PathVariable("id") String id) throws Exception { Passenger passenger = null; //check if unique phone number List<Passenger> listOfPassengers = passengerDAO.findById(id); if(l...
[ "@RequestMapping(value = \"/passengers/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deletePassenger(@PathVariable Long id) {\n log.debug(\"REST request to delete Passenger : {}\", id);\n passengerRepo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test injected components are not null.
@Test public void testInjectedComponentsAreNotNull() { assertThat(dataSource).isNotNull(); assertThat(jdbcTemplate).isNotNull(); assertThat(entityManager).isNotNull(); assertThat(productRepository).isNotNull(); assertThat(reviewRepository).isNotNull(); }
[ "@Test\n\tpublic void testInjectedComponentsAreNotNull() {\n\t\tassertThat(productRepository).isNotNull();\n\t\tassertThat(commentRepository).isNotNull();\n\t\tassertThat(reviewRepository).isNotNull();\n\t\tassertThat(dataSource).isNotNull();\n\t\tassertThat(jdbcTemplate).isNotNull();\n\t\tassertThat(entityManager)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getName method, of class Product.
@Test public void testGetName() { System.out.println("getName"); Product instance = new Product(); String expResult = ""; String result = instance.getName(); assertEquals(expResult, result); }
[ "String getProductName();", "@Test\n public void testSetName() {\n System.out.println(\"setName\");\n String name = \"foo product\";\n Product instance = new Product();\n instance.setName(name);\n assertEquals(name, instance.getName());\n }", "@Test\n public void test...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Autogenerated Javadoc Generically represents a handler for exporting refset data. Requirements be able to display available export handlers to a user for exporting content a global list of export handlers is sufficient (no need to be project specific) know that it is exporting a refset import content to an input ...
public interface ExportRefsetHandler extends Configurable { /** * Returns the file type filter. * * @return the file type filter */ public String getFileTypeFilter(); /** * Returns the release file name computed from the beta file name. * * @param betaFileName the beta file name * @param...
[ "void exportData(Function<Entity, Void> handler) throws RegistryStorageException;", "public abstract void export(RDFHandler handler, QNameURI subject) throws RepositoryException, RDFHandlerException;", "public interface IOManager {\n\n /**\n * Adds the specified handler to the list of handlers.\n *\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets (as xml) the "currentrun" attribute
org.apache.xmlbeans.XmlString xgetCurrentrun();
[ "java.lang.String getCurrentrun();", "public String getCurrentBpo() {\n return (String) getAttributeInternal(CURRENTBPO);\n }", "public String getActeur() {\n return (String) getAttributeInternal(ACTEUR);\n }", "public String getMppfcTmpConsubrol() {\n return (String) getAttributeIn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns if the method name is from a getter.
public Boolean isGetter() { // Returns if the method name matches the getter regular expression. return isGetter(getReflectedMethod().getName()); }
[ "public static Boolean isGetter(final String methodName) {\n\t\t// Returns if the method name matches the getter regular expression.\n\t\treturn methodName.matches(GETTER_REGEX);\n\t}", "static boolean isGetter(final String methodName) {\n for (final String getterPrefix : GETTER_PREFIXES) {\n if...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make a jump instruction that jumps to the provided label.
public static AbstractInsnNode makeJumpInsn(int opcode, LabelNode label) { return new JumpInsnNode(opcode, label); }
[ "public void jump(LabelImpl label) {\n\t\tput(OpCode.jmp);\n\t\tlabel.putAdr();\n\t}", "public void goTo(final Label label) {\r\n mv.visitJumpInsn(Opcodes.GOTO, label);\r\n }", "public Jump(String branchLabel) {\r\n\t\tcode = ActionConstants.JUMP;\r\n\t\tthis.branchLabel = branchLabel;\r\n\t}", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the scroll border color.
public Color getScrollBorderColor();
[ "public Color getBorderColor() {\n\treturn borderColor;\n }", "public Vector4f getBorderColour()\n\t{ return borderColour; }", "public String getBorderColor() {\n\t\treturn borderColor;\n\t}", "public Color getBorderColor();", "public ColorStateList getBorderColors() {\n return mBorderColor;\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
True if has "pages" element
boolean isSetPages();
[ "public boolean hasMorePages();", "boolean hasMorePages();", "public boolean hasPage(String name)\n {\n return getPage(name) != null;\n }", "public boolean containsPage(String name);", "public Boolean hasPageId()\n {\n return (this.page_id != null);\n }", "public boolean isSetPag...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the window decoration Must be called before creating the window
public Display setDecoration(boolean decorated) { if (window != NULL) { System.err.println("Warning [Decoration] must be set before creating the window!"); } else { glfwWindowHint(GLFW_DECORATED , decorated ? GLFW_TRUE : GLFW_FALSE); } return (this); }
[ "public WindowDecoration(SimpleWindow simpleWindow) {\n // Initialises the color and titlebar size\n titlebarSize = 0.05;\n textPosition = 0.03;\n titleBarColor = Color.darkGray;\n closeButtonColor = Color.red;\n borderColor = Color.black;\n titleLabelColor = Color....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setSubject method, of class MailNotifier.
public void testSetSubject() { System.out.println("setSubject"); String subject = ""; MailNotifier instance = new MailNotifier(); instance.setSubject(subject); }
[ "public void testGetSubject() {\n System.out.println(\"getSubject\");\n MailNotifier instance = new MailNotifier();\n String expResult = \"Warning!!!\";\n instance.setSubject(expResult);\n String result = instance.getSubject();\n assertEquals(expResult, result);\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new Slot vertex in this graph.
public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Slot createSlot();
[ "Slot createSlot();", "Vertex createVertex();", "public void addSlot(@NonNull final Slot newSlot){\n slots.add(newSlot);\n }", "void create(VertexDescriptor descriptor);", "public SlotContract() {\n super();\n }", "public Vertex insertVertex(String n){\r\n Vertex newVert = new V...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new roundPowerUp given a powerUp list.
public RoundPowerUpsImpl(final List<PowerUp> powerUpList) { this.powerUpList = powerUpList; }
[ "public RoundPowerUpsImpl() {\n\t\tthis.powerUpList = new ArrayList<>();\n\t\tfor (int i = 0; i < BARRIER_POWERUP_NUMBER; i++) {\n\t\t\tPowerUp p = new PowerUpImpl(Type.PLUS_ONE_BARRIER, Model.BOARD_DIMENSION);\n\t\t\tif (!this.powerUpList.isEmpty() && this.powerUpList.stream().anyMatch(e -> e.getCoordinate().equal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return First Date of Current Month
public static LocalDate getFirstOfCurrentMonth() { return LocalDate.now().with(TemporalAdjusters.firstDayOfMonth()); }
[ "public static Date getFirstDateOfCurrentMonth(){\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.DAY_OF_MONTH , 1);\n return cal.getTime();\n }", "public static Date getFirstDayOfMonth() {\n\n Calendar date = Calendar.getInstance();\n date.set(Calendar.DATE, 1);/...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read workbook default style info.
@Test public void cellsWorkbookGetWorkbookDefaultStyleTest() throws ApiException { String name = BOOK1; String folder = TEMPFOLDER; api.setApiClient( CellsApiUtil.Ready(folder, name)); StyleResponse response = api.cellsWorkbookGetWorkbookDefaultStyle(name, folder); // TODO: test va...
[ "public String getDefaultStyle()\n {\n return strategy.getDefaultStyle();\n }", "private void readStyles() {\n table.clearSelection();\n\n styles.getReadWriteLock().writeLock().lock();\n styles.clear();\n if (styleDir.getText().length() > 0) {\n addStyles(styleD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the sitting flag.
public void setSitting(boolean p_75270_1_) { isSitting = p_75270_1_; }
[ "public void setSitting(boolean sitting) {\n\t\t\tisSitting = sitting;\n\t\t}", "void setTrueSight(boolean trueSight);", "void setSnowy(boolean snowy);", "public void setStench()\n {\n stench = true;\n }", "public void placePowerStation() {\n this.powerStation = true;\n\n }", "public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds LDAP blocked nonadmin users, blocks them into Cloud Pipeline system and notifies about them.
@SchedulerLock(name = "BlockedUsersMonitoringService_monitor", lockAtMostForString = "PT10M") public void monitor() { if (isMonitoringDisabled()) { log.debug("Blocked users monitoring is not enabled"); return; } log.debug("Started blocked users monitoring"); ...
[ "public static void processUserAccountBlocked() {\n\t}", "@Override\n public List<String> getBlockList(String username) {\n User user = userService.get(username);\n ArrayList<String> blockUsers = user.getUsersBlocked();\n return blockUsers;\n }", "boolean blockUser(User user);", "pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a random mutation type. NOTE: Will never return NULL mutation type.
public MutationType getRandomMutationType() throws Exception { return MutationType.values()[(new Double(Math.ceil((this.random.nextDouble() * (MutationType.values().length - 1))))).intValue()]; }
[ "public Mutation getRandomMutation(MutationType type) throws Exception {\n\t\tSourceStatement faultyStatement;\n\t\tMutation mutation;\n\t\t\n\t\tswitch(type){\n\t\tcase NULL: // Use for testing (e.g., to make sure the program compiles without mutations).\n\t\t\tSystem.out.print(\"Applying null mutation...\");\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use EthereumVerifyMessage.newBuilder() to construct.
private EthereumVerifyMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private VerifyMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n\t\t\tsuper(builder);\n\t\t}", "private EthereumSignMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n\t\t\tsuper(builder);\n\t\t}", "public interface VerifyProto$VerifyCodeRequestOrBuilder extends MessageLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Spring Data JPA repository for the Gross entity.
@SuppressWarnings("unused") @Repository public interface GrossRepository extends JpaRepository<Gross, Long> { }
[ "public interface GirosLinRepository extends JpaRepository<GirosLin,Long> {\n\n}", "public interface MarsGponPMGemRepository extends JpaRepository<MarsGponPMGem,Integer> {\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface GoodsExchangeRepository extends JpaRepository<GoodsExchange, Long> {\n\n}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the vHub property: vHub Address.
public VwanConfiguration withVHub(IpAddressSpace vHub) { this.vHub = vHub; return this; }
[ "public IpAddressSpace vHub() {\n return this.vHub;\n }", "public static void setRootHub(Hub thisHub, boolean b) {\n\t\tOAObjectInfoDelegate.setRootHub(thisHub.data.getObjectInfo(), b ? thisHub : null);\n\t}", "public Builder setVhost(\n java.lang.String value) {\n if (value == null) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Searches User in table of users, considering that searchValue is Email
private void searchUserEmail(String searchValue) { String query = "SELECT * FROM " + DBInfo.USERS + " WHERE EMAIL = ?;"; try { PreparedStatement preparedStatement = con.prepareStatement(query); preparedStatement.setString(1, searchValue); ResultSet rs = preparedStatement.executeQuery(); while (rs.next()...
[ "public List<User> searchUser(String searchValue);", "List<User> searchByEmail(final String email);", "private void searchUserByUserName(String searchValue) {\n\t\tString query = \"SELECT * FROM \" + DBInfo.USERS + \" WHERE USERNAME = ?;\";\n\t\ttry {\n\t\t\tPreparedStatement preparedStatement = con.prepareStat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to empty all textfields on customer login page.
public void emptyTextFields() { username.setText(""); password.setText(""); }
[ "public void clearTextFields() {\n\t\tcp5.get(Textfield.class, \"Name\").setText(\"\");\n\t\tcp5.get(Textfield.class, \"Last Name\").setText(\"\");\n\t\tcp5.get(Textfield.class, \"E-mail\").setText(\"\");\n\t\tcp5.get(Textfield.class, \"Nationality\").setText(\"\");\n\t\tcp5.get(Textfield.class, \"Phone Number\").s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
only keep the first numFeatures featureList
public static ClfDataSet sampleFeatures(ClfDataSet clfDataSet, int numFeatures){ List<Integer> columnsToKeep = IntStream.range(0,numFeatures).mapToObj(i->i).collect(Collectors.toList()); return sampleFeatures(clfDataSet, columnsToKeep); }
[ "private ArrayList<Attribute> getRandomFeatures(int featuresCount, ArrayList<Attribute> features) {\n ArrayList<Attribute> featuresSubset = new ArrayList<>(featuresCount);\n //initialize list with indexes\n ArrayList<Integer> featuresIndexes = new ArrayList<>(features.size());\n for (int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
GET /polos/:id : get the "id" polo.
@GetMapping("/polos/{id}") @Timed public ResponseEntity<PoloDTO> getPolo(@PathVariable Long id) { log.debug("REST request to get Polo : {}", id); PoloDTO poloDTO = poloService.findOne(id); return ResponseUtil.wrapOrNotFound(Optional.ofNullable(poloDTO)); }
[ "Produto get(Integer id);", "@GetMapping(\"/procesadors/{id}\")\n @Timed\n public ResponseEntity<Procesador> getProcesador(@PathVariable Long id) {\n log.debug(\"REST request to get Procesador : {}\", id);\n Procesador procesador = procesadorRepository.findOne(id);\n return ResponseUtil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PrimaryExpression__Group_1__1" $ANTLR start "rule__PrimaryExpression__Group_1__1__Impl" InternalReflex.g:7615:1: rule__PrimaryExpression__Group_1__1__Impl : ( ( rule__PrimaryExpression__IntegerAssignment_1_1 ) ) ;
public final void rule__PrimaryExpression__Group_1__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalReflex.g:7619:1: ( ( ( rule__PrimaryExpression__IntegerAssignment_1_1 ) ) ) // InternalReflex.g:7620:1: ( ( rule__PrimaryExpr...
[ "public final void rule__PrimaryExpression__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:7608:1: ( rule__PrimaryExpression__Group_1__1__Impl )\n // InternalReflex.g:7609:2: rule__PrimaryExpression__G...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The user is trying to execute a stored procudure, is it in the whitelist?
public static boolean isStoredProcedureWhitelisted(String name) { return storedProceduresWhitelist.contains(name.toUpperCase()); }
[ "public boolean isStoredProcError(){\r\n\treturn getERR_FLAG().equals(STORED_PROC_ERROR_FLAG);\r\n}", "public boolean validateProcedureCodeName(){\n\t\treturn !utils.isProxyWebelement(PrcedurecodeLabel);\n\t}", "public boolean allProceduresAreCallable() throws SQLException {\n // Sybase - if accessible_s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
endregion region Season This method is used insert a season to the database.
public boolean insertSeason(Season season) { try (PreparedStatement ps = connection.prepareStatement("INSERT INTO seasons (seasonNumber, seriesID) VALUES (?, ?)")) { ps.setInt(1, season.getSeasonNumber()); ps.setInt(2, season.getSeriesID()); ps.execute(); return t...
[ "public hu.webtown.liferay.portlet.model.Season create(long seasonId);", "void setSeason(World world, Season season);", "public void setSeason(String season) {\n this.season = season;\n }", "public int getSeasonId() {\n return seasonId;\n }", "public void setSeasonId(int value) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a SHOW command with the specified ID and type of data to show about the specified subsystem.
public SHOW( String s1, ShowType st, String s2 ) { super( s1 ); showType = st; systemName = s2; }
[ "public static void display(String showTableString) {\n ArrayList<String> commandTokens = new ArrayList<String>(Arrays.asList(showTableString.split(\" \")));\n if(commandTokens.get(1).equals(\"tables\")){\n \tMetaDataHandler md = new MetaDataHandler();\n \tmd.displayListOfTables();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adding this wait as the Sybase ASE logs can fill up quickly if you execute a lot of DDLs Hence, we put in a periodic check (currently going by every "maxLogCounter" updates executed) to see if the log level exceeds a "stopLogSpaceThreshold". If so, we wait till it gets back down to a "resumeLogSpaceThreshold"
private void waitForLogSpace(Connection conn, JdbcHelper jdbc) { this.curLogCounter.incrementAndGet(); // only trigger the check every "maxLogCounter" checks if (this.curLogCounter.get() == maxLogCounter) { boolean firstTime = true; while (tru...
[ "private void checkLogSizeAndAge()\n {\n if (m_LogFile.length() >= m_LogMaxByteLimit || Calendar.getInstance().compareTo(m_NextCreationDate) > 0)\n {\n closeLogFile();\n openLogFile();\n \n if (m_LogMaxFileCount != 0) \n {\n chec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Module__Group__5__Impl" $ANTLR start "rule__Module__Group__6" ../com.mguidi.soa.ui/srcgen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:1094:1: rule__Module__Group__6 : rule__Module__Group__6__Impl rule__Module__Group__7 ;
public final void rule__Module__Group__6() throws RecognitionException { int stackSize = keepStackSize(); try { // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:1098:1: ( rule__Module__Group__6__Impl rule__Module__Group__7 ) ...
[ "public final void rule__Module__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:2775:1: ( rule__Module__Group__6__Impl rule__Module__Group__7 )\n // InternalOCLlite.g:2776:2: rule__Module__Group__6__Imp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the isOwned value for this DatacloudCompany.
public java.lang.Boolean getIsOwned() { return isOwned; }
[ "@ApiModelProperty(value = \"Flag indicating that the customer associated with the authorisation is an owner of the account. Does not indicate sole ownership, however. If not present then 'true' is assumed\")\n\n\n public Boolean getIsOwned() {\n return isOwned;\n }", "public boolean isOwned(){\n\t\treturn i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor. Receives the PagesRDD, an instance of the Grid diagram and the track table.
public NearestNeighborQueryCalculator( final GridPagesRDD pagesRDD, final Broadcast<Grid> diagram, final TrajectoryTrackTableRDD trackTable) { this.pagesRDD = pagesRDD; this.diagram = diagram.value(); this.trackTable = trackTable; collector = new TrajectoryCollector(this.pagesRDD, this.trackTable); }
[ "public NearestNeighborQuery(\n\t\t\tfinal VoronoiPagesRDD pagesRDD, \n\t\t\tfinal Broadcast<VoronoiDiagram> diagram,\n\t\t\tfinal TrajectoryTrackTableRDD trackTable) {\n\t\tthis.pagesRDD = pagesRDD;\n\t\tthis.diagram = diagram.value();\n\t\tthis.trackTable = trackTable;\n\t\tcollector = new TrajectoryCollector(thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetching the download id received with the broadcast
@Override public void onReceive(Context context, @NonNull Intent intent) { long id = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1); //Checking if the received broadcast is for our enqueued download by matching download id if (downloadID == id) { T...
[ "@Override\n public void onReceive(Context context, Intent intent) {\n long id = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1);\n //Checking if the received broadcast is for our enqueued download by matching download id\n if (downloadID == id) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The entry point of the program, creates a JFrame and adds an instance of HashTableDisplay as the ContentPane/
public static void main(String[] args) { JFrame frame = new JFrame("Hash Table Display"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(new HashTableDisplay()); frame.setMinimumSize(new Dimension(900, 700)); frame.pack(); frame.setVisibl...
[ "public HashTableDisplay() {\n h = new HTable(currentTableSize);\n setPreferredSize(Toolkit.getDefaultToolkit().getScreenSize());\n add(userPanel);\n add(displayPanel);\n }", "public TinhFrame() {\n initComponents();\n showTable();\n }", "public Hwk2JFrame() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Populates the headers for the token request.
private void populateTokenRequestHeaders(T grantRequest, HttpHeaders headers) { ClientRegistration clientRegistration = clientRegistration(grantRequest); headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); if (ClientAuthenticat...
[ "private HttpEntity<?> setTokenToHeaders() {\n HttpHeaders headers = new HttpHeaders();\n headers.set(\"Authorization\", this.token.getToken_type() + \" \" + this.token.getAccess_token());\n headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));\n return new HttpEntity...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
methods This returns the lower temporal bound of this digital ink structure (t_s).
public long getLowerTBound() { return this.lowerTBound; }
[ "public double lowerBound()\n\t{\n\t\treturn _lowerBound;\n\t}", "public double getLowerBound()\n\t{\n\t\treturn this.lowerBound ;\n\t}", "public double getlowerBound()\n\t{\n\t\treturn this.lowerBound;\n\t}", "public long getLowerBound()\n {\n return m_lowerBound;\n }", "double getLowerBound()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for stateAssignedCode The state assigned code for the jurisdiction.
public void setStateAssignedCode(String value) { this.stateAssignedCode = value; }
[ "public void setStateAssignedNo(java.lang.String stateAssignedNo) {\n this.stateAssignedNo = stateAssignedNo;\n }", "public String getStateAssignedCode() {\r\n return this.stateAssignedCode;\r\n }", "public void setStateCode(String stateCode) {\r\n\t\tthis.stateCode = stateCode;\r\n\t}", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
writeAccess because we write lastMod date, not because we write to the file the mutex protects the properties object, not the file
private void writeProperties() { propsMutex.writeAccess(new Runnable() { public void run() { OutputStream out = null; FileLock lock = null; try { FileObject pFile = file.getPrimaryFile(); FileObject myFile = File...
[ "public synchronized void lockWrite() {\n\t}", "private void saveUnlocked()\r\n {\r\n // to write a file, we create a fileoutputstream using the file name.\r\n // Then we make a dataoutputstream from the fileoutputstream.\r\n // Then we write to the dataoutputstream\r\n try {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column IMAL141_DEV_O18.S_CONTROL_PARAM.ADD_STRING3_PROTECTED
public String getADD_STRING3_PROTECTED() { return ADD_STRING3_PROTECTED; }
[ "public void setADD_STRING3_PROTECTED(String ADD_STRING3_PROTECTED) {\r\n this.ADD_STRING3_PROTECTED = ADD_STRING3_PROTECTED == null ? null : ADD_STRING3_PROTECTED.trim();\r\n }", "public String getADD_STRING2_PROTECTED() {\r\n return ADD_STRING2_PROTECTED;\r\n }", "public String getADD_STRI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the top level module
public Module getTopLevelModule () throws G2AccessException;
[ "public String getRootmodule()\n {\n return theRootmodule;\n }", "public ProgramModule getRootModule(String treeName);", "public static SkylarkModule getTopLevelModule() {\n return TopLevelModule.class.getAnnotation(SkylarkModule.class);\n }", "public ProgramModule getDefaultRootModule();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
to run the console app, please uncomment line 6 and comment out line 7 new StudyApp();
public static void main(String[] args) { new GraphicStudyApp(); }
[ "public static void main(String[] args) {\n SimpleFactory simpleFactory = new SimpleFactory();\n ICource javaCource = simpleFactory.create(JavaCource.class);\n javaCource.startStudy();\n }", "@Override\n\tpublic void simpleInitApp() {\n\t\tbuildExample(new Screen(this));\n\n\t}", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
(Gantt) Marker options specific to the start markers for this chart's Pathfinder connectors. Overrides the generic marker options.
@JSProperty("startMarker") @Nullable ConnectorsStartMarkerOptions getStartMarker();
[ "@JSProperty(\"startMarker\")\n void setStartMarker(@Nullable ConnectorsStartMarkerOptions value);", "public Builder startMarker(@Nullable ConnectorsStartMarkerOptions value) {\n object.setStartMarker(value);\n return this;\n }", "@JSProperty(\"marker\")\n void setMarker(@Nullable ConnectorsMarke...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Rename all sheets in the template workbook. Add a SUFFIX to each name.
private List<String> renameTemplateSheets() { List<String> names = new LinkedList<String>(); for (int i = 0; i != workbook.getNumberOfSheets(); i++) { String name = workbook.getSheetName(i); // exclude protected sheets from processing if( !protectedSheetNames.contains(name) ) { name +=...
[ "public static void rename() {\n int a = 1;\n for (int i = 0; i <= 9999; i++) {\n File temp = extension(i);\n if(temp.exists()) {\n temp.renameTo(new File(FOLDER + name(a) + \n temp.toString().substring(temp.toString().indexOf(\".\"))));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
POST /hrClassInfos > Create a new hrClassInfo.
@RequestMapping(value = "/hrClassInfos", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public ResponseEntity<HrClassInfo> createHrClassInfo(@Valid @RequestBody HrClassInfo hrClassInfo) throws URISyntaxException { log.debug("REST request to save HrClassI...
[ "@RequestMapping(value = \"/hrClassInfos\",\n method = RequestMethod.PUT,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<HrClassInfo> updateHrClassInfo(@Valid @RequestBody HrClassInfo hrClassInfo) throws URISyntaxException {\n log.debug(\"REST request to u...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check every patient and see if they have common patient
public List<Patient> findCommonPatient(List<Patient> list1, List<Patient> list2) { List<Patient> resultList = new ArrayList<>(); for (Patient patientInList1 : list1) { if (list2.contains(patientInList1)) { // it is common patient! resultList.add(patientInLis...
[ "public boolean checkForPatientDuplicates(PatientEntry targetPatient)\n {\n for(PatientEntry a : patientList)\n {\n //Runs the class method compareTo to check for duplicates\n if(targetPatient.compareTo(a))\n {\n return true;\n }\n }...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to set more than one variables of the model at once. Pairs of the type 'variable=value' must be separated by the separator string _sep. Then they will be tokenized and sent to setVariable(), using _arraySep as separator string for values of array variables.
public boolean setVariables(String _valueList, String _sep, String _arraySep) { boolean result = true; String name = "", value = ""; StringTokenizer line = new StringTokenizer(_valueList, _sep); while (line.hasMoreTokens()) { String token = line.nextToken(); int index = token.indexOf('='); if (i...
[ "public boolean setVariable(String _variable, String _value, String _sep) {\r\n\t\tif (model == null)\r\n\t\t\treturn false;\r\n\t\ttry {\r\n\t\t\tField field = model.getClass().getField(_variable);\r\n\t\t\tif (field.getType().isArray()) {\r\n\t\t\t\tboolean result = true;\r\n\t\t\t\tObject array = field.get(model...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ We cannot simply increment the height array towards the camera each framethat would make the world move far too fast. Rather, we move the geometry gradually over the distance of a single resolution, then we move the geometry back, and increment the height array.
private void incrementTerrain(GL10 gl){ gl.glMatrixMode(GL10.GL_MODELVIEW); //Load the current transformation matrix. //gl.glLoadIdentity(); //Translate to the location of the terrain. gl.glTranslatef(0, 0, z); //Increment the z value by speed. z += speed; ...
[ "void updateWorld() {\n // % of surrounding neighbours that are like me\n final double threshold = 0.7;\n\n // TODO Update logical state of world\n\n updateEachActor(world, threshold);\n }", "public void move(){\n if(isAlive) {\n //update each bound\n fo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getType method, of class Tile.
@Test public void testGetType() { System.out.println("getType"); Tile newTile = new Tile(); char expResult = 'G'; char result = newTile.getType(); assertEquals(expResult, result); Tile newTileWithType = new Tile('W'); expResult = 'W'; result = newTile...
[ "public Tile.Type getType() {\n return this.type;\n }", "public int tileType(){\n\t\treturn this.type;\n\t}", "public abstract boolean isTileTypeAllowed(TileType tileType);", "public int getTileType() {\n\t\treturn id;\n\t}", "boolean isImageTileType();", "PileType getType();", "@Test\n pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Query an asset type for id
public Optional<AssetTypeDTO> findByAssetType(int idAssetType){ logger.info("AssetTypeService.findByAssetType() - Query asset type by its id"); return assetTypeRepository.findByAssetType(idAssetType).map(assetType -> mapper.toAssetTypeDto(assetType)); }
[ "IAssetType getAssetType(UUID assetTypeId) throws SiteWhereException;", "Asset findAsset(String id);", "public T getAsset(String id) throws SiteWhereException;", "TypeRespone findByIdType(Long Id);", "SceneType selectByPrimaryKey(Integer typeId);", "@Override\n public List<Asset> getAssetsByType(String ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the current string
public String getString() { synchronized (currentStringLock) { StringBuilder s = new StringBuilder(currentString.size()); for (Character c : currentString) s.append(c); return s.toString(); } }
[ "public String getString() {\r\n\t\treturn currString;\r\n\t}", "public java.lang.String getCurrentValue() {\n return currentValue;\n }", "public java.lang.String getCurrentValue() {\n return currentValue;\n }", "public String getCurrent_word(){\n\t\treturn current_word;\n\t}", "public java.lang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the subparameter count...
public int getSubparamCount() { return count; }
[ "public int getNumberOfParam();", "public int getNoOfParameters() {\n return this.parameters.size();\n }", "int countTypedParameters();", "int getTypeParameterCount();", "public abstract int getNumberOfParams(int numInputs);", "public int getNParams() {\n return nParams;\n }", "priva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Private method to decode from the input String, the Rovers and Instructions set for each rover
private void decodeRoversAndInstructions(Scanner scanner, ArrayList<IMarsRover> marsRoversList, HashMap<Integer, ArrayList<ICommand>> instructionsSet, ILoggerOutput loggerOutput) { int rovId = 1; int xPos; int yPos; String instructionsAsString; CompassPoint facingCardinalPoint; ...
[ "public void decode() {\n\n if(snowtamOriginal == null){\n snowtamDecoded = \" \";\n }\n else{\n String snowtam = snowtamOriginal;\n\n //formatage du snowtam pour traitement\n snowtam = snowtam.replace(\")\",\") \");\n snowtam = snowtam.rep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface for accessing a hierarchical data element
public interface IHierarchyDataAccessor<K,T> { /** * Returns the key from an object * @param obj object to return key from * @return key */ public K accessKey(T obj); /** * Returns the parent key from an object * @param obj object to return parent key from *...
[ "String getSubtreeDn();", "public PathElement get();", "public StructuredData getStructuredDataAttribute();", "public interface GraphElement {\n /**\n * Get element label\n *\n * @return The element label\n */\n String getLabel();\n\n /**\n * Get element label id\n *\n * @...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return (!calibrating && (state == SPEECH || silFrames < endSil));
public boolean isSpeech() { return (!calibrating && (state == SPEECH)); }
[ "@Override\r\n public boolean isSpeaking() {\n return false;\r\n }", "boolean hasVoicedesckey();", "boolean isSpeakerEnabled();", "boolean hasSpeakMsg();", "boolean isSpectating();", "boolean needsEchoCalibration();", "boolean hasPostEndOfAudioTimeoutMs();", "boolean isCalibrating();", "boolean...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the inverse of the logit transform of x.
protected static double InvLogit(double x) { double tmp = Math.exp(x); return tmp / (1.0 + tmp); }
[ "protected static double Logit(double x) {\n\t\treturn Math.log( x / (1.0 - x) );\n\t}", "private double minusInverseX(double x) {\n return -Math.sqrt(x / (x - 1));\n }", "public double logZero(double x);", "private double log(int x, int base){\r\n\t return (Math.log(x) / Math.lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required .pomelo.area.cardRelationAttStruct relationAtt1 = 16;
pomelo.area.CardHandler.cardRelationAttStruct getRelationAtt1();
[ "pomelo.area.CardHandler.cardRelationAttStruct getRelationAtt2();", "pomelo.area.CardHandler.cardRelationAttStructOrBuilder getRelationAtt2OrBuilder();", "pomelo.area.CardHandler.CardPropertyStruct getBaseAtt();", "private cardRelationAttStruct(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
run the change calculator
public static void main(String[] args) { runChange(args); }
[ "public void runProgram()\r\n\t{\r\n\t\tinput();\r\n\t\tcalculations();\r\n\t\tpayment();\r\n\t\tchangeGiven();\r\n\t}", "public void actionPerformed(ActionEvent e) {\n Number dn1r = 0.0, dn1i = 0.0, dn2r = 0.0, dn2i = 0.0, ddepth = 0.0;\n\n System.out.println(\"action event\");\n if (e.getAc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the missing GroupObjects when comparing to another group.
public ArrayList<GroupObject> findMissing(ArrayList<GroupObject> g) { SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd"); ArrayList<GroupObject> temp = new ArrayList<GroupObject>(); for(GroupObject tempG : go) { if(!g.contains(tempG)) { temp.add(tempG); } } return temp; }
[ "public static Group difference(Group group1, Group group2)\n throws MPJException {\n if (group1 == null) {\n return (null);\n } else if (group2 == null) {\n Group dGroup = new Group();\n dGroup.table = new Vector<IbisIdentifier>(group1.table);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DELETE /jelos/:id : delete the "id" jelo.
@DeleteMapping("/jelos/{id}") @Timed public ResponseEntity<Void> deleteJelo(@PathVariable Long id) { log.debug("REST request to delete Jelo : {}", id); jeloRepository.delete(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();...
[ "@RequestMapping(value = \"/removerExercicio\", method = RequestMethod.GET, params = \"id\")\n\n public String delete(@RequestParam(\"id\") int id) {\n\n exercicioDao.remove(exercicioDao.findById(id));\n\n return \"redirect:/listExercicio\";\n\n }", "@Override\n public void delete(Long id) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new FSDirectory instance over the given file, which must be a folder.
public static BaseDirectoryWrapper newFSDirectory(Path f, LockFactory lf) { return newFSDirectory(f, lf, rarely()); }
[ "public static BaseDirectoryWrapper newFSDirectory(Path f) {\n return newFSDirectory(f, FSLockFactory.getDefault());\n }", "private MyDir build(File f) { \n\tif (!f.exists()) return null; \n\tif (!f.isDirectory()) return null; \n \n\t// f is an existing directory\n\tString path = f.getPath();\n\tString nam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
beware, runReadAction while dispatch() in sending out readStart/Finish notifications would end up with deadlock/InterruptedException
@Override public void runReadAction(Runnable r) { myReadActionDispatcher.dispatch(r); }
[ "public abstract void runReadAction(@NonNull Runnable runnable);", "public void readAccess (final Runnable action) {\n\n if (this == EVENT) {\n doEvent (action);\n return;\n }\n\n Thread t = Thread.currentThread();\n readEnter(t);\n try {\n actio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__EventDef__Group__1" $ANTLR start "rule__EventDef__Group__1__Impl" InternalDsl.g:25529:1: rule__EventDef__Group__1__Impl : ( '(' ) ;
public final void rule__EventDef__Group__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:25533:1: ( ( '(' ) ) // InternalDsl.g:25534:1: ( '(' ) { // InternalDsl.g:25534:1: ( '(' ) // ...
[ "public final void rule__EventDef__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:25656:1: ( rule__EventDef__Group__6__Impl )\n // InternalDsl.g:25657:2: rule__EventDef__Group__6__Impl\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears current user's cell when deleting a coin.
private void clearCell(String id, String username){ String sql = "UPDATE heroku_4c689183642aecd.coins SET "+ username +" = '' WHERE id = " + id + ";"; jdbcTemplate.update(sql); }
[ "void clearCell(int x, int y);", "@Override\n public void deleteCell(Coord c) {\n delegate.clearCell(c.col, c.row);\n }", "public void clear()\n {\n cells.clear();\n }", "public static void deleteCurrentUser(){\n currentUser = null;\n Paper.book().delete(SavedUsers.FIRSTNAME);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check PyFile(OutputStream).fileno() is acceptable to _io.open()
@Test public void openPyFileOStreamByFileno() throws IOException { PySystemState sys = Py.getSystemState(); OutputStream ostream = new FileOutputStream(FILE1); PyFile file = new PyFile(ostream); openByFilenoTest(file, "wb"); }
[ "@Test\n public void openPyFileByFileno() throws IOException {\n PySystemState sys = Py.getSystemState();\n PyFile file = new PyFile(FILE1, \"w\", 1);\n openByFilenoTest(file, \"wb\");\n }", "public void openByFilenoTest(PyObject file, String mode) throws IOException {\n PyObject...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .SSIT.proto.MemberInfo curInfo = 2;
SSIT.proto.Unetmgr.MemberInfo getCurInfo();
[ "SSIT.proto.Unetmgr.MemberInfoOrBuilder getCurInfoOrBuilder();", "public SSIT.proto.Unetmgr.MemberInfoOrBuilder getCurInfoOrBuilder() {\n return curInfo_;\n }", "public SSIT.proto.Unetmgr.MemberInfoOrBuilder getCurInfoOrBuilder() {\n if (curInfoBuilder_ != null) {\n return curInfoBuilder...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for the list of kept random event cards
public ArrayList<RandomEvent> getKeptRandomEventCards() { return keptRandomEventCards; }
[ "List<UI_Card> getPlayerDiscardedCards();", "public ArrayList<Cards> getSeedCards() {\r\n\t\treturn seedCards;\r\n\t}", "public Card getCard()\n {\n return cards.remove((int)(Math.random() * cards.size()));\n }", "public List<Card> getNewCards() {\n return newCardList;\n }", "public Optional<Random...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stress test CRUD operation of Prize.
public void testCRUDPrize() throws Exception { int number = 10; long startTime = System.currentTimeMillis(); for (int i = 0; i < number; i++) { PrizeType type = new PrizeType(); type.setPrizeTypeId(1L); type.setDescription("Test"); Prize pri...
[ "public void test_AddPrizeToContest_Failure5() throws Exception {\r\n try {\r\n initContext();\r\n\r\n Contest contest = createContestForTest();\r\n beanUnderTest.createContest(contest);\r\n\r\n Prize prize = createPrizeForTest();\r\n\r\n entityManager.e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Abstract Method that loads Things Details
ThingsResponse loadThingsDetails(ThingsRequest request);
[ "public abstract void load(HumanEntity human);", "@Override\n public ThingDetailLoadResponse loadThingDetail(int thingId) throws ThingIdDoesNotExistException {\n Optional<Thing> optionalThing = thingDao.findById(thingId);\n if (optionalThing.isPresent()) {\n throw new ThingIdDoesNotExi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new UserEventManager with a Speaker.
public AttendeeEventManager(User user) { super(user); }
[ "public Speaker(String name, String address, String email, String userName, String password) {\n super(name, address, email, userName, password);\n this.speakingEvents = new ArrayList<String>();\n }", "public void addEventToSpeaker(String title, String speakerUserName){\n Speaker speaker =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the given filter to the toChannel edition editor.
public void addFilterToToChannel(ViewerFilter filter);
[ "public void addFilterToFromChannels(ViewerFilter filter);", "public void addFilterToCombo(ViewerFilter filter);", "public void addFilterToCreator(ViewerFilter filter);", "public void addFilterToReader(ViewerFilter filter);", "public void addFilterToComboRO(ViewerFilter filter);", "public void addFilterTo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the company email.
public void setCompanyEmail(String companyEmail) { this.companyEmail = companyEmail; }
[ "@Override\n\tpublic void setCompanyemail(String companyemail) {\n\t\tmodel.setCompanyemail(companyemail);\n\t}", "public String getCompanyEmail() {\r\n\t\treturn companyEmail;\r\n\t}", "public void setEmail(Client cl, String email) {\n\n\t\tcl.setEmail(email);\n\t}", "public void setEmail(String value) {\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method extracts the diseasecui assoc.
public void extractDiseaseCuiMap(String diseaseInput, String diseaseMeshAssoc, String meshCuiAssoc, String output){ DataReader reader = new DataReader(); ArrayList<String> diseaseIds = reader.readIds2(diseaseInput); HashMap<String, HashSet<String>> diseaseMeshMap = reader.readMap(di...
[ "public void extractDisease(String casFile, \n String drugFile,\n String ctdDrugDiseaseFile,\n String geneFile,\n String ctdGeneDiseaseFile,\n String diseaseOutput,\n String drugDiseaseAssocOutput,\n String geneDiseaseAssocOutput){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run program with given version
public void startVersion(String version) { if (version.equals("A")) { versionALoop(); } else if (version.equals("B")) { versionBLoop(); } else if (version.equals("C")) { versionCLoop(); } else { System.out.println(version); System.out.println("Error, Incorrect version!"); System.exit(1); } ...
[ "String getVersion( String version );", "private void doVersion() {\n System.out.println(\"DMDirc - a cross-platform, open-source IRC client.\");\n System.out.println();\n if (globalConfigProvider == null) {\n System.out.println(\"Version: Unknown\");\n exit();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the userRecordAccess value for this Zuora_Customer_HPM_Setting__c.
public void setUserRecordAccess(com.sforce.soap.enterprise.sobject.UserRecordAccess userRecordAccess) { this.userRecordAccess = userRecordAccess; }
[ "void setAccessPermissionOwn(String zone, String absolutePath,\n\t\t\tString userName, boolean recursive) throws JargonException;", "void setAccessPermissionWrite(String zone, String absolutePath,\n\t\t\tString userName, boolean recursive) throws JargonException;", "void setUserAccess(prisms.arch.ds.User user, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method converts the formated .csv file referenced by the string workFile to the final .xls spreadsheet.
public String convertCSVToXLSX(String workFile, boolean withOptions) throws IOException { try { //temporary .xls file. xlsFile = new File("..\\tempXLS.xls"); //create new .xls workbook workBook = new HSSFWorkbook(); //map styles to this workbook Map<String, CellStyle> sty...
[ "private void convertToCSV() {\n\t\tSheet sheet;\n\t\tRow row;\n\t\tint lastRowNum;\n\t\tthis.csvData = new ArrayList<>();\n\n\t\tSystem.out.println(\"Converting files contents to CSV format.\");\n\n\t\t// Discover how many sheets there are in the workbook....\n\t\tint numSheets = this.workbook.getNumberOfSheets();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Object__ObjectTypeAssignment_0" $ANTLR start "rule__Object__NameAssignment_1" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27557:1: rule__Object__NameAssignment_1 : ( ruleQualifiedName ) ;
public final void rule__Object__NameAssignment_1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27561:1: ( ( ruleQualifiedName ) ) ...
[ "public final void rule__ObjectObligation__NameAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:29169:1: ( ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns port portType name.
public QName getPortPortType() { if (super.getProperty(PORTTYPE_NAME) == null) { return null; } else { return QName.valueOf(super.getProperty(PORTTYPE_NAME)); } }
[ "public String getPortTypeName() {\n\t\treturn portTypeName;\n\t}", "PortType getPortType();", "public PortType getPortType();", "public PortType getPortType() {\n return portType;\n }", "public PortType createPortType();", "public PortType getPort() {\n return port;\n }", "public St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the list of all persons covered by the given fire station number and the count of children and adults inside that list of people.
PersonsByStationDTO getPersonsByStation(int station);
[ "@ApiOperation(value = \"Retourner une liste des personnes couvertes par la caserne de pompiers est fournir un décompte du nombre d'adultes et du nombre d'enfants\")\n @GetMapping(\"/firestations\")\n public PersonsInFirestationNumberResponse getPersonsFromFirestationNumber(@RequestParam String stationNumber)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method concat the split messages that corresponds to a whole message of the list of connected users
private String concatListOfUsers(String message){ String userList=null; if (controller.incompletedListUsers==null){ if(message.charAt(message.length()-1)== '&'){ controller.incompletedListUsers= message; } else{ //crear lista userList= message; } } else{ if(message.charAt(...
[ "public ArrayList<User> parseMessage(ArrayList<User> users) throws FileNotFoundException, IOException {\n\n //Local variable\n FileReader fr;\n BufferedReader bfr;\n ArrayList<User> messageUsers = new ArrayList<>();\n\n //read file\n File f;\n\n //The first time, the...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update offset and clear entries because leader's snapshot is more uptodate. This method is only called for applying snapshot from leader.
void applyingSnapshot(Snapshot snapshot) { this.offset = snapshot.getLastLogIndex() + 1; this.entries.clear(); }
[ "private void flush() {\n synchronized(map){\n if (map.size() > maxEntries && map.size() != 0) {\n Debug.DEBUG(\"Removing oldest entry\", \"QueryArray:flush\");\n map.remove(0);\n }\n }\n }", "public void reset() {\n this.offset = 0;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a keyvalue list of the event statuses for teams competing at the given event.
public ApiResponse<Map<String, TeamEventStatus>> getEventTeamsStatusesWithHttpInfo(String eventKey, String ifModifiedSince) throws ApiException { okhttp3.Call localVarCall = getEventTeamsStatusesValidateBeforeCall(eventKey, ifModifiedSince, null); Type localVarReturnType = new TypeToken<Map<String, Team...
[ "public static EventStatus evaluateStatusOfTeam(Event e, List<Match> teamMatches, String teamKey)\n {\n\n // There might be match info available,\n // but no alliance selection data (for old events)\n JsonArray alliances = JSONHelper.getasJsonArray(e.getAlliances());\n int year = 201...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the attribute value for the calculated attribute MppfcAdr3.
public String getMppfcAdr3() { return (String) getAttributeInternal(MPPFCADR3); }
[ "public String getMppfcAdr3Local() {\n return (String) getAttributeInternal(MPPFCADR3LOCAL);\n }", "public void setMppfcAdr3(String value) {\n setAttributeInternal(MPPFCADR3, value);\n }", "public String getMppfcAdr4() {\n return (String) getAttributeInternal(MPPFCADR4);\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method isDateBeforeToday this method checks if a date is before the current date
private boolean isDateBeforeToday(Date inputDate) { Date currentDate = new Date(); if(inputDate.before(currentDate)){ return true; }else return false; }
[ "public static boolean isDateBeforeToday(LocalDate date) {\n requireNonNull(date);\n return date.isBefore(getTodayDate());\n }", "public static boolean dateBeforeNow(Date date) {\n if (date == null) {\n return false;\n }\n\n //convert date to LocalDate\n Loc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for the DbChangeEvent object
public DbChangeEvent(Object source, int eventType, Map key) { super(source); if (eventType < 0 || eventType > 4) { throw new IllegalArgumentException(); } this.eventType = eventType; this.primaryKey = key; }
[ "public EventDao() {\n\t\tsuper(de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.Event.EVENT, de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.pojos.Event.class);\n\t}", "public EventRecord() {\n\t\tsuper(opus.address.database.jooq.generated.tables.Event.Event);\n\t}", "public JHI_ENTITY_AUDIT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a specific number of films.
public List<Film> getFilms(int numberOfFilms);
[ "List<Film> getAll(int startIndex, int pageSize);", "public static ArrayList<Film> retrieveFilms() {\n\t\ttry {\n\t\t\tConnection con = connect();\n\t\t\tString sql = \"SELECT * FROM FILM;\";\n\t\t\tArrayList<Film> films = new ArrayList<>();\n\t\t\ttry (Statement stmt = con.createStatement(); ResultSet rs = stmt....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the instance of Reports(package: Utilities)
public Reports getreports() { return(reports==null)? reports = new Reports(driver) : reports; }
[ "public static Report getInstance() {\n return new Report();\n }", "Report createReport();", "public DiskoReportManager getReportManager();", "private static ExtentReports createInstance() {\n String fileName = getReportPath(reportFilepath);\n\n ExtentHtmlReporter htmlReporter = new Ex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Is this instance immutable.
public boolean isImmutable() { return _immutable; }
[ "public void makeImmutable() {\n\t\tthis.immutable = true;\n\t}", "public void setImmutable() {\n _immutable = true;\n }", "@Override\n public boolean isMutable() {\n return true;\n }", "public boolean isImmutable() {\n\t\treturn this.immutable;\n\t}", "boolean isImmutable();", "void checkI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize GUI elements contained in the TeamDetailPanel
public final void initUI() { setBackground(Color.WHITE); setName("Panel"); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); // Panel name is team name JPanel title = new JPanel(); JLabel titleLabel = new JLabel(detailTeam.getTeamName()); titleLabel.setMinimumSize(new Dimension(0, 40)); titleLabel...
[ "public void initialize_visual_controls() {\n\t\tthis.teamOfWork = (ImageButton) findViewById(R.id.btn_team_of_work);\n\t\tthis.starDay = (ImageButton) findViewById(R.id.btn_start_day);\n\t\tthis.createRoute = (ImageButton) findViewById(R.id.btn_create_route);\n\t\tthis.closeDay = (ImageButton) findViewById(R.id.bt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private static final Logger log = LoggerFactory.getLogger(SshApplication.class);
public static void main(String[] args) { SpringApplication.run(SshApplication.class, args); }
[ "public String getSshId() {\n return ssh_id_;\n }", "public String getSshServer() { return ssh_server; }", "public SSHConnection getSSHConnection() {return _sshConnection;}", "@Before\n public void setup() throws Exception{\n \n System.setProperty(\"app.home\", BASE_DIR + \"/scribengin\");\n Sys...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the DepthFistAnalysisAdaptor for the extension
private static void createDepthFirstAdaptor(Environment result, Environment extEnv) { // Create a extended depth first analysis adapter and add it to extEnv JavaName jname = new JavaName(result.getAstPackage() + ".analysis", "DepthFirstAnalysis" + extEnv.getName() + "Adaptor"); IClassDefinition extA...
[ "private static void createDepthFirstAdaptor(Environment result,\n\t\t\tEnvironment extEnv)\n\t{\n\n\t\t// Create a extended depth first analysis adapter and add it to extEnv\n\t\tJavaName jname = new JavaName(result.getAstPackage() + \".analysis\", \"DepthFirstAnalysis\"\n\t\t\t\t+ extEnv.getName() + \"Adaptor\");...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns WeatherID within the group in German (Identifier for Weathercondition
public String getWeatherID() { return weatherID; }
[ "String getWikidataEntityId();", "public String Identifier(String day){\n if(day.equals(\"Mon\")){\n return \"M\";\n }\n else if(day.equals(\"Tue\")){\n return \"T\";\n }\n else if(day.equals(\"Wed\")){\n return \"W\";\n }\n els...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the 9 default ports
public void createDefaultPorts() { // Parameters: ResourceName, Hex X-coord, Hex Y-coord, Edge-Direction, Ratio, vv0-Direction, vv1-Direction ports[0] = new Port("wood", -3, 2, "NE", 2, "NE", "E"); ports[1] = new Port(null, 3, -3, "SW", 3, "SW", "W"); ports[2] = new Port(null, 2, 1, "NW", 3, "W", "NW"); ...
[ "Port createPort();", "public void setDefaultPort() {\r\n\t\tsetPort(DEFAULT_PORT);\r\n\t}", "public Port createPort();", "public void addPorts(){\n\t\t\n\t}", "@Override\n\t\tpublic int buildBasicPort() {\n\t\t\treturn buildPort();\n\t\t}", "PortDefinition createPortDefinition();", "StartPort createSta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the options from raw arguments and preset options.
private Options createFromArgs(Options options, String[] args) throws InvalidOptionException { Options newOptions = new Options(); for (int i = 0; i < args.length; i++) { if (!newOptions.hasOption(args[i])) { if (!options.hasOption(args[i])) { System.out.println(args[i] + " is an invalid...
[ "private static List<Option> prepareOptions(String[] args) throws ParseException {\n final Options options = new Options();\n optionMode = OptionBuilder.hasArg(false).create(OPTION_CONSOLE_MODE);\n optionSource = OptionBuilder.hasArg(true).hasArgs(1).create(OPTION_FILE_INPUT);\n\n option...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function that holds the Array Input for Passing Cart Number
public void PassingCartNumber() { //Passing the CartNumber. Insert into Array slot 0 the name of the user cart[0] = ItemsInCart; }
[ "public void PassingCartNumber()\n {\n //Passing the Username. Insert into Array slot 0 the name of the user\n cart[0] = Integer.parseInt(LBLCartNo.getText());\n \n }", "private static void modifyItemNumberInCart() {\r\n\t\tString itemName = getValidItemNameInput(scanner);\r\n\t\tSystem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Change the object "agent" to simulate the movement of the patrolling agent towards "next".
private void moveAgentToNext(int agentId) { AgentPosition agent = teamInfo.agents[agentId]; int next = teamInfo.nextActions[agentId]; boolean checkArrival = false; int current = agent.origin; Edge edge = null; // System.out.printf(" > Agent %d:\n", agentId); //If gui is seted this step create a objec...
[ "public void move(){\n\t\tint xSize = rgsSpace.getXSize();\n\t\tint ySize = rgsSpace.getYSize();\n\n\t\t// Check for all neighbor that agent can go\n\t\t// Attention with java: -13 modulo 15 = -13 !!!! \n\t\tArrayList<String> toGo = new ArrayList<String>();\n\t\tif (! rgsSpace.isCellOccupied((x+1)%xSize,y))\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to fetch all Synchro projects
List<Project> getAll();
[ "public List<Project> getAllProjects();", "private ProjectBaseBean[] getAllProjects() {\n ProjectBaseBean[] projects = ProjectServiceClient.findProjectsTM75(\"\");\n return projects;\n }", "public List<Project> loadAllProjects() {\r\n\r\n List<Project> result = new ArrayList<Project>();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mapea PersonaDTO a Persona entity
Persona PersonaDTOToPersona(PersonaDTO personaDTO);
[ "PersonaDTO PersonaToPersonaDTO(Persona persona);", "List<PersonaDTO> PersonaListToPersonaDTOList(List<Persona> personaList);", "private PersonajeDTO convertirEntidadDTO(Personaje personaje) {\n\t\tlogger.debug(\"Aqui inicia el metodo convertirEntidadDTO\");\n\t\tPersonajeDTO personajeDTO = new PersonajeDTO();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }