__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/17520510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File extractShortcutExecutable(ZipFile zip){ try { if(zip == null) return null; Enumeration<? extends ZipEntry> files = zip.entries(); for(int i=0; i<zip.size(); i++){ ZipEntry zipFile = files.nextElement(); if(zipFile.getName().equals(EXECUTABLE_NAME)){ return extractFile(zip, zipFile); }else{ continue; } } } catch (Exception e) { e.printStackTrace(); MessageClass.showShortcutErrorMessage(); return null; } return null; } COM: <s> returns the temporary file it extracted or null if there was an error </s>
funcom_train/2676950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doPushMessage(AbstractMessage message) { try { msgOut.pushMessage(message); if (message instanceof RTMPMessage) { IRTMPEvent body = ((RTMPMessage) message).getBody(); if (body instanceof IStreamData && ((IStreamData) body).getData() != null) { bytesSent += ((IStreamData) body).getData().limit(); } } } catch (IOException err) { log.error("Error while pushing message.", err); } } COM: <s> send message to output stream and handle exceptions </s>
funcom_train/5572948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void subAppend(LoggingEvent event) { if (rollDate) { long n = System.currentTimeMillis(); if (n >= nextCheck) { now.setTime(n); nextCheck = rc.getNextCheckMillis(now); rollOverTime(); } } if (rollSize) { if ((fileName != null) && ((CountingQuietWriter) qw).getCount() >= maxFileSize) { rollOverSize(); } } super.subAppend(event); } COM: <s> handles append time behavior for composite rolling appender </s>
funcom_train/13994879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ValueObject createVO() { ValueObject clone = prototype.copy(); for (Iterator it = properties.values().iterator(); it.hasNext();) { ValueObjectProperty property = (ValueObjectProperty) it.next(); clone.getValue(property.getName()).setValue(property.getDefaultValue()); } clone.setID(createNewKey()); validate(); return clone; } COM: <s> creates a new value object by cloning the prototype </s>
funcom_train/17053479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand() { if (exitCommand == null) {//GEN-END:|16-getter|0|16-preInit exitCommand = new Command("\u0412\u044B\u0445\u043E\u0434", Command.EXIT, 0);//GEN-LINE:|16-getter|1|16-postInit }//GEN-BEGIN:|16-getter|2| return exitCommand; } COM: <s> returns an initiliazed instance of exit command component </s>
funcom_train/511648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExtName() { StringBuffer sb = new StringBuffer(); sb.append(this.getAktienName()); sb.append(" - "); sb.append(this.getBranche()); sb.append(" ("); sb.append(this.getWkn()); sb.append(")"); return sb.toString(); } COM: <s> returnes a external name </s>
funcom_train/34583173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void leaveGameSession() { logger.info("on clientinfo serverside leave msg is called"); if (gameSession!=null) { logger.info("Player " + name + " is leaving session " + gameSession); gameSession.removeParticipant(this); gameSession.multicastMsg(new SessionParticipationMsg(false, idOffset, this.getName()), this); gameSession = null; BomberServer.getInstance().addClientToGlobal(this); } else { logger.info("Couldn't leave game session (null)!"); } } COM: <s> removes the client from its current game session and notifies all participants </s>
funcom_train/2557431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean write(Type type, Object value, NodeMap node){ Class actual = value.getClass(); Class expect = type.getType(); Class real = actual; if(actual.isArray()) { real = writeArray(actual, value, node); } if(actual != expect) { node.put(label, real.getName()); } return writeReference(value, node); } COM: <s> this is used to write the xml element attributes representing </s>
funcom_train/28200139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recover(AbstractLookup lookup) { if (jobs == null) { // no recovery plan, throw itself throw this; } for (Job j : jobs) { j.before(); } AbstractLookup.Storage s = lookup.enterStorage(); try { for (Job j : jobs) { j.inside(); } } finally { lookup.exitStorage(); } } COM: <s> executes the jobs outside and then inside a locked session </s>
funcom_train/16393620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setCurrentGroup(HttpServletRequest req, HttpServletResponse resp, Group group) { req.getSession().setAttribute("sysCurrentGroupName", group.getGroupname()); Cookie cookie = new Cookie("evoplatformgroupname", group.getGroupname()); cookie.setPath("/"); // valid for complete server resp.addCookie(cookie); } COM: <s> programmatically switches the current group </s>
funcom_train/8604629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int byteArrayToInteger(byte[] b, int offset) { return (b[offset + 3] & 0xFF) << 24 | (b[offset + 2] & 0xFF) << 16 | (b[offset + 1] & 0xFF) << 8 | (b[offset] & 0xFF); } COM: <s> convert 4 bytes to integer </s>
funcom_train/10195457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getResolvedSql() { String sql; QueryCtl queryCtl = resolveQueryToExecute(); boolean compiled = queryCtl.isCompiled(); if (compiled) { sql = queryCtl.getSql(); } else { sql = queryCtl.compile(queryDefinition.getDatabasePolicy()).getSql(); queryCtl.decompile(); } return sql; } COM: <s> returns sql string including inlined queries </s>
funcom_train/37243264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLowestPitch() { int min = 128; Enumeration enum1 = getNoteList().elements(); while(enum1.hasMoreElements()){ Note note = (Note) enum1.nextElement(); if(note.getPitchType() == Note.MIDI_PITCH) if(note.getPitch() < min && note.getPitch() >= 0 ) min = note.getPitch();; } return min; } COM: <s> return the pitch value of the lowest note in the phrase </s>
funcom_train/2807972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsPrimaryKey() { TreeSet fieldKeys = new TreeSet(fields.keySet()); for (int i = 0; i < getModelEntity().getPksSize(); i++) { if (!fieldKeys.contains(getModelEntity().getPk(i).getName())) return false; } return true; } COM: <s> returns true if the entity contains all of the primary key fields </s>
funcom_train/19657188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleRegexRules() { // handle listbox if (trigger instanceof ListBox) { ListBox list = (ListBox) trigger; if (list.getValue(list.getSelectedIndex()).matches(condition)) { original.setVisible(true); } else { original.setVisible(false); } } if (trigger instanceof HasText) { HasText widget = (HasText) trigger; if (widget.getText().matches(condition)) { original.setVisible(true); } else { original.setVisible(false); } } } COM: <s> ensures that the value of this widget validates against this widgets </s>
funcom_train/7758216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean removePeerViewElement(PeerViewElement pve) { boolean removed; synchronized (localView) { removed = localView.remove(pve); if (removed) { // Refresh, if necessary, our up and down peers. updateUpAndDownPeers(); } } if (removed) { pve.setPeerView(null); } return removed; } COM: <s> remove the provided element from the local peerview </s>
funcom_train/50242456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setYear( Integer year ) { if ( year.intValue() < 1000 || year.intValue() > 9999 ) { String msg = "bad year == " + year + "; years must be four digits"; throw new IllegalArgumentException( "bad year == " + year ); } this.calendar.set( Calendar.YEAR, year.intValue() ); } COM: <s> sets the year used by restricted iterations </s>
funcom_train/28660064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigInteger decrypt_old(BigInteger inCipher) { if (inCipher.compareTo(this.getN()) > 0) { return this.getN() .add(this.decrypt(inCipher.subtract(this.getN()))); } else { // hook return inCipher.modPow(this.getD(), this.getN()); } } COM: <s> note iteration in use </s>
funcom_train/37422700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User findUserByUsername(String pUsrname)throws ClassNotFoundException, SQLException{ String tSql="select * from user where user_name="+ Utility.isNull(pUsrname)+" and url=''"; Vector tVect = findUserByQuery(tSql); if (tVect.size() > 0) return (User) tVect.firstElement(); else return null; } COM: <s> finds a user in the database using its name </s>
funcom_train/10363977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(PrintWriter writer) throws IOException { if (name != null) { Attribute nameAttr = new Attribute(ATTRIBUTE_NAME, name); nameAttr.write(writer); } for (String attributeName: getAttributeKeys()) { Attribute attribute = getAttribute(attributeName); attribute.write(writer); } writer.print(EOL); } COM: <s> write the section out to a print writer </s>
funcom_train/21647760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onClick( Widget widget ) { int pageNum = currPage; if( NEXT_BTN_TITLE.equals( widget.getTitle() ) ) { pageNum = currPage + 1; } else if( PREV_BTN_TITLE.equals( widget.getTitle() ) ) { pageNum = currPage - 1; } if( currPage>0 ) { listeners.fireChange( this, pageNum ); } } COM: <s> if one of button is clicked fires page changed event in listeners added </s>
funcom_train/32942790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ModelAndView processResume(HttpServletRequest aReq, HttpServletResponse aResp, TargetInstanceCommand aCmd, BindException aErrors) throws Exception { TargetInstance ti = targetInstanceManager.getTargetInstance(aCmd.getTargetInstanceId()); harvestCoordinator.resume(ti); return processFilter(aReq, aResp, null, aErrors); } COM: <s> process the resume target instance action </s>
funcom_train/592409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException { if (this.iterator == null) { this.iterator = this.filters.iterator(); } if (this.iterator.hasNext()) { this.iterator.next().doFilter(request, response, this); } else { this.servlet.service(request, response); } } COM: <s> used to coordinate the execution of the filters </s>
funcom_train/27779972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void jump(long bits) throws java.io.IOException { if (bits == 0) { return; } if (bits > 0 && bits < 8 * limit() - pos_bit) { // jump within the existing buffer pos_bit += (int) (bits); } else { load(bits + getFilePointer()); } } COM: <s> move the read pointer ahead by the specified amount </s>
funcom_train/10357297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void skipRequiredChar(char ch) throws ParseException { if (current >= endOffset) { parseError("Delimiter '" + ch + "' expected"); } if (source.charAt(current) != ch) { parseError("Delimiter '" + ch + "' expected"); } current++; } COM: <s> skip over a position where theres a required value </s>
funcom_train/637929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void mutation(float mutationProbability) { ArrayList mutationPopulation = new ArrayList(); Random random = new Random(); while (this.chromosomes.size() > 0) { Chromosome chromosome = new Chromosome(this.selectChromosome()); if (random.perform(mutationProbability)) { chromosome.mutate(); System.out.println("MUTATE!"); //TODO TATI tirar daqui } mutationPopulation.add(chromosome); } this.chromosomes.clear(); this.chromosomes.addAll(mutationPopulation); } COM: <s> performes mutation over the current population with an specified </s>
funcom_train/35575431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDebugLevel(int level){ final String sM = "setDebugLevel()"; if (level >= DEBUGLEVEL_OFF && level <= DEBUGLEVEL_FINEST){ debugLevel = level; addEntry(sC, sM, ">>>Log Debug Level: " + String.valueOf(level), "I"); } } COM: <s> h4 sets the debug level for logging </s>
funcom_train/22640990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToDefaults() { fontScale = 1; mcc = mnc = 0; locale = Locale.getDefault(); userSetLocale = false; touchscreen = TOUCHSCREEN_UNDEFINED; keyboard = KEYBOARD_UNDEFINED; keyboardHidden = KEYBOARDHIDDEN_UNDEFINED; hardKeyboardHidden = HARDKEYBOARDHIDDEN_UNDEFINED; navigation = NAVIGATION_UNDEFINED; orientation = ORIENTATION_UNDEFINED; screenLayout = SCREENLAYOUT_SIZE_UNDEFINED; } COM: <s> set this object to the system defaults </s>
funcom_train/34908051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addExpertPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_PopisBaze_expert_feature"), getString("_UI_PopisBaze_expert_description"), GebzPackage.Literals.POPIS_BAZE__EXPERT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_PopisPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the expert feature </s>
funcom_train/20626737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteImportStatus(String namespaceId) throws SQLException { String statement = getDAO().getStatement(TABLE_KEY, "DELETE_IMPORT_STATUS") + namespaceId; Statement stmt = conn.createStatement(); try { stmt.executeUpdate(statement); } finally { if (stmt != null) { stmt.close(); } } } COM: <s> delete the import status record for the given namespace </s>
funcom_train/51749849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rotateLeft() { if(!isBusy()) { active++; if(active >= this.getFramesPerGroup()) active -= this.getFramesPerGroup(); AbstractLogWriter.getInstance().write(this, "activating frame "+active+" containing "+this.getActiveFile() , AbstractLogWriter.OK); alpha[0].setStartTime(System.currentTimeMillis()); } } COM: <s> rotates the group counter clockwise </s>
funcom_train/18804388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof DateTick && super.equals(obj)) { DateTick dt = (DateTick) obj; if (!ObjectUtils.equal(this.date, dt.date)) { return false; } return true; } return false; } COM: <s> tests this tick for equality with an arbitrary object </s>
funcom_train/37818524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkPc(String pc) { if (pc == null || pc.isEmpty()) { showError("The program counter must not be empty!"); return false; } try { int i = Integer.parseInt(pc); if (i == 0) { showError("The program counter must not be '0'!"); return false; } } catch (NumberFormatException e) { showError("This value is not a valid program counter:\n\n\"" + beautifyString(pc) + "\""); return false; } return true; } COM: <s> check a string if its a valid program counter </s>
funcom_train/14607843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getFields(String prefix) throws UIException { prefix = (prefix != null) ? prefix + ":" : ""; List fields = new Vector(); for (Iterator controls = getControls().values().iterator(); controls.hasNext(); ) { HttpControl control = (HttpControl) controls.next(); if (control instanceof Field && control.getName().startsWith(prefix)) fields.add(control); } return fields; } COM: <s> return all fields contained in this form </s>
funcom_train/27811236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MusicIndex getIndex(Artist artist, List<MusicIndex> indexes) { String sortableName = artist.getSortableName().toUpperCase(); for (MusicIndex index : indexes) { for (String prefix : index.getPrefixes()) { if (sortableName.startsWith(prefix.toUpperCase())) { return index; } } } return MusicIndex.OTHER; } COM: <s> returns the music index to which the given artist belongs </s>
funcom_train/43293918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean start(String[] args) { //is task startable if (isStartable()) { // create an startup-thread m_StartUpThread = new Thread(m_StartUpTask); //execute the "startup"-method of each added class m_StartUpThread.start(); } else { OutputHandler .writeError(1600, "", OutputHandler.EL_HIGH, new String[] { }, this); //not started return false; } //set lifecycle state setLifeCycleState(LFS_START_READY); //started return true; } COM: <s> p start p </s>
funcom_train/6279399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedColumn(int col) { if (col < 0) return; Integer value = null; Object obj = state.get(new Integer(col)); if (obj == null) { value = new Integer(DOWN); } else { if (((Integer) obj).intValue() == DOWN) { value = new Integer(UP); } else { value = new Integer(DOWN); } } state.clear(); state.put(new Integer(col), value); } COM: <s> method set selected column </s>
funcom_train/64900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point doBelongsToCell(int col, int row) { if ((col==2 || col==3)&& !isFixedCell(col, row)) { int newRow = row; if ((row-getFixedRowCount())%2==1) newRow--; return new Point(2, newRow); } return new Point(col,row); } COM: <s> implement also cell spans so that it can be demonstrated how </s>
funcom_train/27737991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private GGEP addAddress(GGEP ggep, IpPort address) { byte[] payload = new byte[6]; System.arraycopy(address.getInetAddress().getAddress(), 0, payload, 0, 4); ByteUtils.short2leb((short) address.getPort(), payload, 4); ggep.put(GGEPKeys.GGEP_HEADER_IPPORT, payload); return ggep; } COM: <s> adds the address ggep </s>
funcom_train/21306031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton3() { if (jButton3 == null) { jButton3 = new JButton(new ImageIcon(getClass().getResource("/irudiak/g5.png"))); jButton3.setBackground(Color.blue); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if (jButton3.getBackground()==Color.blue) jButton3.setBackground(Color.yellow); else jButton3.setBackground(Color.blue); } }); } return jButton3; } COM: <s> this method initializes j button3 </s>
funcom_train/49997069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testXmlMonth() throws Exception { XMLGregorianCalendar xmlDay = Tstamp.makeTimestamp("2003-08-01"); Month month = new Month(xmlDay); assertEquals("Checking month's toString() method", "Aug-2003", month.toString()); } COM: <s> test the xmlgregorian calendar constructor </s>
funcom_train/13874267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBooleanSymbolPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BooleanLiteralExp_booleanSymbol_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BooleanLiteralExp_booleanSymbol_feature", "_UI_BooleanLiteralExp_type"), EssentialoclPackage.Literals.BOOLEAN_LITERAL_EXP__BOOLEAN_SYMBOL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the boolean symbol feature </s>
funcom_train/31679042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set( T value) { LocalContext ctx = (LocalContext) LocalContext.current(); if (ctx != null) { FastMap references = ctx._references; references.put(this, value); _hasBeenLocallyOverriden = true; return; } // No local context, sets default value. _defaultValue = value; } COM: <s> sets the local value referent for this reference </s>
funcom_train/4934326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJavaMappingConsequentNewVariable() throws ParserException, IOException, Exception { runtime.initialize( new String[]{ "test/true_antecedent_java.n3", "--pass" } ); executeLine( "# to trigger fireAllRules"); System.out .println("BasicRuntimeTest.testJavaMappingConsequentVariable()"); checkTitleOfGeneratedJFrame(); } COM: <s> here instantiation is not deferred new existential variable in consequent </s>
funcom_train/17118475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findID_Dataset() { // read all sheets determineSheets(); // check each sheet for a dataset boolean loop = true; int i = 0; while (loop && (this.sheets.length != i)) { debug("working on sheet: " + i); findID_Dataset(i); i++; } } COM: <s> find the ids </s>
funcom_train/19421173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(HttpServletRequest req) { EaasyStreet.logTrace("[In] SearchFieldDefinitionList.initialize()"); super.initialize(req); HttpSession ses = req.getSession(); int index = getIndex(ses, true); SearchDefinition search = getSearch(req.getParameter(Constants.RPK_RECORD_KEY)); ses.setAttribute("search", search); ses.setAttribute(Constants.SAK_APPL_TITLE_ARGS + index, new String[]{search.getDescription()}); EaasyStreet.logTrace("[Out] SearchFieldDefinitionList.initialize()"); } COM: <s> p called by the code controller code whenever the application is </s>
funcom_train/10792666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Joins join(Joins joins, boolean forceOuter, boolean toMany) { if (_fk == null) return joins; if (_outer || forceOuter) return joins.outerJoin(_fk, true, toMany); return joins.join(_fk, true, toMany); } COM: <s> joins from the owning class table to the table where this field lies </s>
funcom_train/50152771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dock() { MultiView.getMainView().addView(getFrameTitle(), this); if (frame != null) frame.dispose(); frame = null; String s = Prefs.getPref(getFrameSizePref()); ViewSize vs = ViewSize.fromString(s); vs.setDock(DockType.DOCK); Prefs.putPref(getFrameSizePref(), vs.toString()); } COM: <s> dock into the multiview </s>
funcom_train/21180212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMain(String classname) { java.util.jar.Attributes a = mf.getMainAttributes(); if (classname == null) { a.remove(java.util.jar.Attributes.Name.MAIN_CLASS); } else { a.put(java.util.jar.Attributes.Name.MAIN_CLASS, classname); } } COM: <s> sets the main class attribute of this collection or </s>
funcom_train/25506022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Locale getLocale() { String lang = this.properties.getProperty(LANGUAGE); if (lang.equalsIgnoreCase(LANGUAGE_DEFAULT_VALUE)) lang = LocalizationData.SYS_LOCALE.getLanguage(); String country = this.properties.getProperty(COUNTRY); if (country.equalsIgnoreCase(COUNTRY_DEFAULT_VALUE)) country = LocalizationData.SYS_LOCALE.getCountry(); return new Locale(lang, country); } COM: <s> gets the preferred locale </s>
funcom_train/50357141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getUserName() { String userName = JOptionPane.showInternalInputDialog( parentFrame, "Choose a screen name:", "Screen name selection", JOptionPane.PLAIN_MESSAGE); //GSClient.getCurrentInstance().name = userName; this.name = userName; return userName; } COM: <s> prompts for and return the desired screen name </s>
funcom_train/9484240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(MappingSourceVO o1, MappingSourceVO o2) { int res; Integer ord1 = this.getOrderNumber(o1.joinOrder); Integer ord2 = this.getOrderNumber(o2.joinOrder); if (ord1 != null && ord2 != null) { res = ord1 - ord2; } else { res = getOrder(o1) - getOrder(o2); if (res == 0) { res = o1.uri.compareTo(o2.uri); } } return res; } COM: <s> if object has properly sat join order properties then they are compared by </s>
funcom_train/326217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restoreDefaultSettingsQ() { int ans = JOptionPane.YES_OPTION; if (warnDefaultSetting) { ans = JOptionPane.showConfirmDialog(getContentPane(), "Are you sure you want to restore all default settings", getTitle(), JOptionPane.YES_NO_OPTION); } if (ans == JOptionPane.YES_OPTION) { restoreDefaultSettings(); } } COM: <s> restore default setting check with user before calling restore default settings </s>
funcom_train/36841109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readInput() { FileInput in = new FileInput("Toads.in"); String[] inStr; double x, y; for(int i = 0; i < in.getLineCount(); i++) { inStr = in.getString(i).split(" "); if(inStr.length == 2) { x = Double.parseDouble(inStr[0]); y = Double.parseDouble(inStr[1]); toads.add(new Toad(i,x,y)); } } } COM: <s> reads in the toads from the file toads </s>
funcom_train/10645930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void install(final JTextComponent c) { setComponent(c); component.addMouseListener(this); component.addMouseMotionListener(this); component.addFocusListener(this); component.addPropertyChangeListener(getPropertyHandler()); highlighter = c.getHighlighter(); navigationFilter = c.getNavigationFilter(); painter = new DefaultHighlighter.DefaultHighlightPainter( selectionColor); } COM: <s> adds listeners to c if c doesnt equal null </s>
funcom_train/1658441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String handleHTTPPost(HTTPRequest request) throws PluginHTTPException { String search = request.getPartAsString("search", 80); String indexuri = request.isPartSet("index") ? request.getPartAsString("index", 200) : DEFAULT_INDEX_SITE; boolean showprogress = (request.getPartAsString("showprogress", 5).equals("true")); return handleInner(request.getPath(), search, indexuri, showprogress); } COM: <s> generates the interface to the xmllibrarian and takes apropos action to an event </s>
funcom_train/44011527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCustID() { System.out.println("getCustID"); CustomerBO instance = null; String expResult = ""; String result = instance.getCustID(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get cust id method of class edu </s>
funcom_train/9298395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected final String TEXT_91 = NL + NL + "\t/**" + NL + "\t * @see Servlet#getServletInfo()" + NL + "\t */" + NL + "\tpublic String getServletInfo() {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t\treturn null; " + NL + "\t}"; COM: <s> protected final string text 90 nl nl t nl t </s>
funcom_train/48802663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void login() throws LoginException { loginSucceeded = false; if (subject == null) { subject = new Subject(); } try { invokeModule(LOGIN_METHOD); invokeModule(COMMIT_METHOD); loginSucceeded = true; } catch (LoginException le) { try { invokeModule(ABORT_METHOD); } catch (LoginException le2) { throw le; } throw le; } } COM: <s> perform the authentication and if successful </s>
funcom_train/8461389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Note getHighestNote() { Note highestNote = (Note)m_notes.elementAt(0); //short highestHeight = highestNote.getHeight(); //short currentNoteLength = 0; for (int i=1; i<m_notes.size(); i++) if (((Note)(m_notes.elementAt(i))).isHigherThan(highestNote)) highestNote = (Note)m_notes.elementAt(i); return highestNote; } COM: <s> returns the highest note among the notes composing this multi note </s>
funcom_train/41151059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean interpolationParametersValid(double sLow, double sUp, int sNrParts) { return sLow >= 0 && sUp <= 1 && sLow < sUp && sNrParts > 0 || sLow == sUp && sNrParts == 0; // special case included } COM: <s> checks if the given parameters are valid interpolation parameters </s>
funcom_train/1653138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRequestSender(Key key, short htl, RequestSender sender) { synchronized(requestSenders) { KeyHTLPair kh = new KeyHTLPair(key, htl, sender.uid); if(requestSenders.containsKey(kh)) { RequestSender rs = requestSenders.get(kh); Logger.error(this, "addRequestSender(): KeyHTLPair '"+kh+"' already in requestSenders as "+rs+" and you want to add "+sender); return; } requestSenders.put(kh, sender); } } COM: <s> add a request sender to our hash map </s>
funcom_train/39878756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearScheduledSyncOperations(Account account, String authority) { mSyncStorageEngine.setBackoff(account, authority, SyncStorageEngine.NOT_IN_BACKOFF_MODE, SyncStorageEngine.NOT_IN_BACKOFF_MODE); synchronized (mSyncQueue) { mSyncQueue.remove(account, authority); } } COM: <s> remove scheduled sync operations </s>
funcom_train/8485486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIllegalAssignment() { try { atTestClass.impl_invoke(atTestClass, AGAssignmentSymbol.jAlloc("TEST_OBJECT_INIT:="), NATTable.of(NATNumber.atValue(0))); fail("Expected an illegal assignment exception"); } catch(XSelectorNotFound e) { // expected exception: success } catch(InterpreterException e) { fail(e.getMessage()); } } COM: <s> tries to assign to a final public field </s>
funcom_train/1756350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw() { background(255); tooltip1.draw(width*.5f, height*.4f); tooltip2.draw(width*.7f, height*.5f); tooltip3.draw(width*.5f, height*.6f); tooltip4.draw(width*.3f, height*.5f); tooltip5.draw(width*.4f, height*.5f); tooltip6.draw(mouseX,mouseY); } COM: <s> draws the tooltips </s>
funcom_train/40846956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TransferData getTransferDataForMouseEntered() { data.component = this; data.card = this.gameCard; data.popupText = popupText; data.popupOffsetX = isTapped() ? cardHeight + cardXOffset + POPUP_X_GAP : cardWidth + cardXOffset + POPUP_X_GAP; data.popupOffsetY = 40; data.locationOnScreen = this.getLocationOnScreen(); return data; } COM: <s> prepares data to be sent to action callback on client side </s>
funcom_train/11382879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getCumulativeCpuTime() { if (JIFFY_LENGTH_IN_MILLIS < 0) { return 0; } long incJiffies = 0; for (ProcessInfo p : processTree.values()) { if (p != null) { incJiffies += p.dtime; } } cpuTime += incJiffies * JIFFY_LENGTH_IN_MILLIS; return cpuTime; } COM: <s> get the cpu time in millisecond used by all the processes in the </s>
funcom_train/16604418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void findCenter() { center = new float[]{0, 0}; int length = points.length; for(int i=0;i<length;i+=2) { center[0] += points[i]; center[1] += points[i + 1]; } center[0] /= (length / 2); center[1] /= (length / 2); } COM: <s> get the center of this polygon </s>
funcom_train/34193185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Parameters get(Point2D point) { Parameters parameters = null; double distance = Double.MAX_VALUE; // Search for the closest one for (Iterator<ParameterList.Entry> it = parametersList.iterator(); it.hasNext();) { ParameterList.Entry info = it.next(); double newDistance = info.p.distance(point); if (newDistance < distance) { distance = newDistance; parameters = info.parameters; } } return parameters; } COM: <s> get parameters closest to the given coordinate </s>
funcom_train/12836659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMessageEncoding(String aValue) { try { attName = soapEnv.createName(MESSAGE_ENCODING, soapPrefix, soapNamespace); rootElement.addChildElement(attName).addTextNode(aValue); } catch (SOAPException e) { e.printStackTrace(); } } COM: <s> method to set the message encoding fipa parameter </s>
funcom_train/25764907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void copy(File source, File dest) throws IOException { FileChannel srcChannel = null; FileChannel dstChannel = null; try { srcChannel = new FileInputStream(source).getChannel(); dstChannel = new FileOutputStream(dest).getChannel(); dstChannel.transferFrom(srcChannel, 0, srcChannel.size()); } finally { if (srcChannel != null) { srcChannel.close(); } if (dstChannel != null) { dstChannel.close(); } } } COM: <s> copying one file to another </s>
funcom_train/39787135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTestRow(String descriptor, Component testComponent) { Label label = new Label(descriptor); GridLayoutData layoutData = new GridLayoutData(); layoutData.setBackground(DESCRIPTOR_CELL_BACKGROUND); label.setLayoutData(layoutData); add(label); add(testComponent); } COM: <s> adds a test item row cell to the code test grid code </s>
funcom_train/11014447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fixTabIdRecord() { TabIdRecord tir = ( TabIdRecord ) records.get(records.getTabpos()); short[] tia = new short[ boundsheets.size() ]; for (short k = 0; k < tia.length; k++) { tia[ k ] = k; } tir.setTabIdArray(tia); } COM: <s> make the tabid record look like the current situation </s>
funcom_train/3098360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scanQuote() { Integer i; if ( verbosity > 5 ) System.out.println("'"); if ( (parenLevel > 0) && (parenLevel != readStack.sp) ) readStack.push(consMarkerSymbol); readStack.push(consMarkerSymbol); quoteStack.push(new Integer(++parenLevel)); readStack.push(CycObjectFactory.quote); } COM: <s> expands s to quote s when reading </s>
funcom_train/22470956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PlaySkipContainer getContainer(Map<Long, PlaySkipContainer> popularity, long id) { PlaySkipContainer psc = popularity.get(id); if (psc == null) { psc = new PlaySkipContainer(0, 0); popularity.put(id, psc); } return psc; } COM: <s> gets the play skip container from the given popularity map </s>
funcom_train/3927902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVersion( int versionNo ) { versionNumber = versionNo; markVersion( versionNumber ); Scene scene = getScene(); if ( scene != null ) { GlobalProgressIndicator.setProgressIndicator( ChiselSet.getProgressIndicator( ChiselSet.VALIDATORS ), "Serializing...", scene.getVrmlElementCount() ); getDocument().setViewerVersion( versionNo, scene ); } } COM: <s> set the version number for the file </s>
funcom_train/3698721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startProcess() throws IOException { if(listeningThread == null){ listeningThread = new Listening(socket.getInputStream(),this); listeningThread.start(); } if(talkingThread == null){ talkingThread = new Talking(socket.getOutputStream(),this); talkingThread.start(); } } COM: <s> to start the listening and the talking thread </s>
funcom_train/27673822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void preProcessEmail() { StringBuffer processed = new StringBuffer(); for (int index = 0; index < _emailStringBuffer.length(); index++) { char character = _emailStringBuffer.charAt(index); // if (!Character.isWhitespace(character) && (character != '"')) { // processed.append(character); // } if (character != '"') { processed.append(character); } } _processedMsg = processed.toString(); } COM: <s> simply removes any quotes from the given email </s>
funcom_train/31909395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent e) { if (!finished) { mouseExited(e); return; } finished = false; xStart = e.getX(); yStart = e.getY(); JGVTComponent c = (JGVTComponent)e.getSource(); previousCursor = c.getCursor(); c.setCursor(PAN_CURSOR); } COM: <s> invoked when a mouse button has been pressed on a component </s>
funcom_train/23891030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopClient() { //sending "exit" to the server and close the socket if(wd != null) { Object[] x1 = {1}; sendMessage(x1); } //stop listening for for incoming messages if (input != null) { input.killThread(); } //stop the thread with the kca if(kca != null) { kca.killThread(); } if(socket != null && !socket.isClosed()) { try { socket.close(); } catch (IOException e) { e.printStackTrace(); } } } COM: <s> stop the client and send a exit signal to the server </s>
funcom_train/21014943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double angleOfPoint ( final int pid ) { final double a = points [pid + 1] [0] - points [pid - 1] [0]; final double b = points [pid + 1] [1] - points [pid - 1] [1]; final double alpha = Math.toDegrees ( Math.atan ( b / a ) ); return alpha; } COM: <s> calculates the angle of a given point </s>
funcom_train/12155344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPatientName() { logger.debug("Entering getPatientName()."); String patientName = getValueAsString(GROUP_PATIENT_INFO, ELEMENT_PATIENT_NAME); if (logger.isDebugEnabled()) { logger.debug("Exiting getSeriesNumber(); RV = " + (patientName != null ? "\"" + patientName + "\"" : null) + "."); } return patientName; } COM: <s> gets the patients name of the image </s>
funcom_train/17027196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WidgetInstance addInstance(Document xml) { Element rootEl = xml.getDocumentElement(); String url = getElementTextContent(rootEl, "url"); String id = getElementTextContent(rootEl, "identifier"); String title = getElementTextContent(rootEl, "title"); String height = getElementTextContent(rootEl, "height"); String width = getElementTextContent(rootEl, "width"); WidgetInstance instance = new WidgetInstance(url, id, title, height, width, this); instances.put(id, instance); return instance; } COM: <s> record an instance of the given widget </s>
funcom_train/13850256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recoverTxns() { if (recoveredTxns == null) return; // Only PREPARED transactions are recovered. Since the txn // state is ACTIVE when stored, we must now force the state // to PREPARED // final Collection values = recoveredTxns.values(); final Iterator t = values.iterator(); while (t.hasNext()) { // Note, Txns get recovered in the PREPARED state txnTable.recover((Txn)t.next()); } // Monitor all of the pending transactions // monitor(values); recoveredTxns = null; // done with this list } COM: <s> process the recovered transactions </s>
funcom_train/9661910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { jPanel = new JPanel(); jPanel.add(getJButton(), null); jPanel.add(getJButton1(), null); jPanel.add(getJButton2(), null); jPanel.add(getJButton3(), null); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/18595159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePress(Component comp, int x, int y, int mask) { if (eventMode == EM_ROBOT && Bugs.hasRobotMotionBug()) { jitter(comp, x, y); } mouseMove(comp, x, y); if (eventMode == EM_ROBOT) mousePress(mask); else { postMousePress(comp, x, y, mask); } } COM: <s> mouse down in the given part of the component </s>
funcom_train/15949558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDocuments(Enumeration values) throws ModelVetoException { Vector lElems = new Vector(); while( values.hasMoreElements() ) { /* 1. fire Vetoable events */ Object lTemp = values.nextElement(); lElems.add(lTemp); fireAssociationAddedVetoable(SpecificationPackageInfo.ASSOCIATIONINFO_Documents, (BusinessDocument)lTemp); }/*while*/ /* 4 Add or change value */ values = lElems.elements(); while( values.hasMoreElements() ) { addDocuments((BusinessDocument)values.nextElement()); }/*while*/ } COM: <s> add the value of documents </s>
funcom_train/16670170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void increaseAngles(float deltaX, float deltaY) { angles.x += deltaX; angles.y += deltaY; while (angles.x>360f) angles.x -= 360f; while (angles.x<-360f) angles.x += 360f; while (angles.y>360f) angles.y -= 360f; while (angles.y<-360f) angles.y += 360f; } COM: <s> increase the entity rotation on x and y axis </s>
funcom_train/18479776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2 getCenter() { double x = 0 ; double y = 0 ; for(int i = 0; i < numP(); i++) { Point2 p0 = getP(i) ; x += p0.getX() ; y += p0.getY() ; } return new Point2(x / numP(),y / numP()) ; } COM: <s> returns the center of this polygon </s>
funcom_train/30006071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JInfoBar getInfoBar() { if (this.infoBar == null) { this.infoBar = new JInfoBar(this.infoIcon); this.infoBar.showInfo(new InfoEvent(this.title, this.text, false, this)); } return this.infoBar; } COM: <s> gets the info bar </s>
funcom_train/23024579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sql_close() { boolean result = false; if (booleanval(this.db_connect_id)) { if (booleanval(this.query_result)) { MySQL.mysql_free_result(gVars.webEnv, this.query_result); } result = MySQL.mysql_close(gVars.webEnv, this.db_connect_id); return result; } else { return false; } } COM: <s> other base methods </s>
funcom_train/22368904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getToolTip(long size, long sizeInBytes, long duration) { return StringUtils.getString(getText(size), " - ", StringUtils.fromByteToMegaOrGiga(sizeInBytes), " - ", StringUtils.fromSecondsToHoursAndDays(duration)); } COM: <s> returns tooltip for repository numbers </s>
funcom_train/3082855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeDescendantToggledPaths(Enumeration toRemove) { if (toRemove != null) { while (toRemove.hasMoreElements()) { Enumeration descendants = getDescendantToggledPaths((TreePath) toRemove.nextElement()); if (descendants != null) { while (descendants.hasMoreElements()) { expandedState.remove(descendants.nextElement()); } } } } } COM: <s> removes any descendants of the tree paths in code to remove code that </s>
funcom_train/41523659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String accViewFiles(){ //Reload ImageContainer from database and update state Command cmd = getCommand(LoadAttachments.class); ((LoadAttachments)cmd).setSource(source); cmd = runCommand(cmd); if(cmd != null){ List<File> auxFiles = ((LoadAttachments)cmd).getResult(); if(auxFiles != null){ files = new ArrayList<FileItem>(); for(File file : auxFiles) files.add(new FileItem(file)); } } return ActionBeanNames.EDIT_FILES; } COM: <s> reattach source to session in order to view its files </s>
funcom_train/23216740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamespacePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ActionDescriptionFile_namespace_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ActionDescriptionFile_namespace_feature", "_UI_ActionDescriptionFile_type"), ContractPackage.Literals.ACTION_DESCRIPTION_FILE__NAMESPACE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the namespace feature </s>
funcom_train/1303867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(String key) { final boolean[] result = new boolean[]{false}; final Visitor<T> visitor = new Visitor<T>() { public void visit(String key, Tree<RadixData<T>> node) { result[0] = node.getData().isReal(); } }; visit(key, visitor); return result[0]; } COM: <s> check if the tree contains any entry corresponding to the given key </s>
funcom_train/31160163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean propagate(alice.tuplecentre.Tuple t){ try { LogicTuple tu=(LogicTuple)t; Term term_a=info.toTerm(); Term term_b=tu.info.toTerm(); return term_a.unify(term_b); } catch (Exception ex){ return false; } } COM: <s> tries to unify a logic tuple as a tuple template with a </s>
funcom_train/12561075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateScrollIndicator() { if (scrollInd != null) { scrollInd.update(null); if (sbVisible) { scrollInd.setVerticalScroll( startIndex * 100 / (numElements - elementsToFit), elementsToFit * 100 / numElements); } else { scrollInd.setVerticalScroll(0, 100); } super.updateScrollIndicator(); } } COM: <s> updates the scroll indicator </s>
funcom_train/16744130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setHaplotype(AmpStatus ampStatus, long haplotype) { switch(ampStatus) { case Amp: mCellHaplotypeAmp = haplotype; break; case NonAmp: mCellHaplotypeNonAmp = haplotype; break; default: CompareUtils.ensureTrue(false, "ERROR: HMMCellLimited.setHaplotype(): Bad ampStatus argument!"); break; } } COM: <s> a private function that sets the haplotype </s>
funcom_train/20310521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void translateInverseAxioms( Element expr, ObjectProperty p, String propType ) { for (Iterator i = p.listInverse(); i.hasNext(); ) { translateInverseAxiom(expr, p, propType, (Property) i.next() ); } } COM: <s> axioms for all of the inverses of a property </s>