__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3828971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() throws SessionStatusException { if ( closed ) { throw new SessionStatusException("session has been killed"); } if ( !isAlive() ) { throw new SessionExpiredException("session has been expired"); } if ( duration < 0 ) return; expiration = new Timestamp(System.currentTimeMillis() + duration); } COM: <s> resets the expiration date to the current timestamp plus duration </s>
funcom_train/24083259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(String date, String type, String name, String value) { return (this.getDateAsShortString().equals(date) && this.getType().equals(type) && this.getName().equals(name) && this.getValue().equals(value) ); } COM: <s> helper function to determine if this transaction is equal in every way </s>
funcom_train/44010325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void join() { Lib.debug(dbgThread, "Joining to thread: " + toString()); Lib.assertit(this != currentThread); Lib.assertit(currentThread.status == statusRunning); // boolean intStatus = Machine.interrupt().disable(); while (this.status != statusFinished) { System.out.println(this); System.out.println(this.status); currentThread.ready(); runNextThread(); } // Machine.interrupt().restore(intStatus); } COM: <s> waits for this thread to finish </s>
funcom_train/2985720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(final ActionEvent event) { if (event .getActionCommand() .equals(m_resources.getString("show.text"))) { m_showText = !m_showText; final Preferences prefs = GUIUtil.getUserPrefs(); prefs.put(DOCK, m_lastDocPos); prefs.putBoolean(SHOW_TEXT, m_showText); m_toolBar.setShowText(m_showText); } m_popup.setVisible(false); } COM: <s> handle all events belonging to the popup menu </s>
funcom_train/24941429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDependency(Port port, Dependency toRemove) { assert portMap.containsKey(port) : "Unknown port"; Collection<Dependency> depsForPort = portMap.get(port); assert depsForPort.contains(toRemove) : "Entry doesn't contain dependency for port. Dep: " + toRemove + " deps " + depsForPort; depsForPort.remove(toRemove); } COM: <s> removes the mapping of the given dependency to the port in this entry </s>
funcom_train/4151815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assignPlayer(MajorCharacter p, Class[] q) { // Assign players to local objects player = p; player.updateStats(); playerAttacks = q; // Create input system playerInput = new PlayerInput(this); // Pass attack reference to HUD hudNode.passCharacterInfo(playerAttacks, player.minGauge); } COM: <s> specifies the player character for this game state </s>
funcom_train/44596868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean eatUpToToken(int token1, int token2, int token3) { if (currentToken == token1 || currentToken == token2 || currentToken == token3) return false; while (currentToken != token1 && currentToken != token2 && currentToken != token3) { if (atEnd()) return true; next(); } return true; } COM: <s> consumes tokens if necessary until one of three given tokens </s>
funcom_train/27839377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printString(String s, StringBuffer buffer) { if (this.needNormalize) { int len = (s != null) ? s.length() : 0; for ( int i = 0; i < len; i++ ) { char ch = s.charAt(i); switch ( ch ) { case '<': { buffer.append("&lt;"); break; } case '>': { buffer.append("&gt;"); break; } case '&': { buffer.append("&amp;"); break; } case '"': buffer.append("&quot;"); break; case '\r': case '\n': default: { buffer.append(ch); } } } } else { buffer.append(s); } } COM: <s> normalizes the given string </s>
funcom_train/32944727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Target newTarget() { Target target = new Target(); target.setIdentity(getNewIdentity()); target.setOwner(AuthUtil.getRemoteUserObject()); target.setState(Target.STATE_PENDING); target.setCreationDate(new Date()); // Set the default profile on the target. Profile profile = profileManager.getDefaultProfile(AuthUtil.getRemoteUserObject().getAgency()); target.setProfile(profile); return target; } COM: <s> create a new target </s>
funcom_train/2309609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getProcessingTime() { long processTime = MAX_PROCESS_TIME; int state = getPandora().mind().getState(); if (state > Mind.ALERT) { processTime = MAX_PROCESS_TIME / 5; } else if (state > Mind.ACTIVE) { processTime = MAX_PROCESS_TIME / 2; } else if (state < Mind.ACTIVE) { processTime = MAX_PROCESS_TIME * 2; } return processTime; } COM: <s> return the current allowed processing time </s>
funcom_train/38293209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void LBrace() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: jj_consume_token(LBRACE); break; case LBRACE2: jj_consume_token(LBRACE2); break; default: jj_la1[1] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } COM: <s> left brace in all of the possible states of the token manager </s>
funcom_train/19097331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxtServerName() { if (txtServerName == null) { txtServerName = new JTextField(); txtServerName.setPreferredSize(new Dimension(100, 19)); txtServerName.setMinimumSize(new Dimension(100, 19)); } return txtServerName; } COM: <s> this method initializes txt server name </s>
funcom_train/38293218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void RBrace() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case RBRACE: jj_consume_token(RBRACE); break; case RBRACE2: jj_consume_token(RBRACE2); break; default: jj_la1[2] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } COM: <s> right brace in all of the possible states of the token manager </s>
funcom_train/16435443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doAutoIncrecement() { List<SSPeriodicInvoice> iPeriodicInvoices = SSDB.getInstance().getPeriodicInvoices(); int iMax = 0; for (SSPeriodicInvoice iPeriodicInvoice: iPeriodicInvoices) { if (iPeriodicInvoice.iNumber != null && iPeriodicInvoice.iNumber > iMax) { iMax = iPeriodicInvoice.iNumber; } } iNumber = iMax + 1; } COM: <s> auto increment the sales number </s>
funcom_train/4361005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isContainerProvidedServlet(String classname) { if (classname.startsWith("org.apache.catalina.")) { return (true); } try { Class clazz = this.getClass().getClassLoader().loadClass(classname); return (ContainerServlet.class.isAssignableFrom(clazz)); } catch (Throwable t) { return (false); } } COM: <s> return code true code if the specified class name represents a </s>
funcom_train/11656364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupFilepart(HTTPSampler httpSampler, String fileField, File file, String mimeType) { HTTPFileArg[] hfa = {new HTTPFileArg(file == null ? "" : file.getAbsolutePath(), fileField, mimeType)}; httpSampler.setHTTPFiles(hfa); } COM: <s> setup the filepart with specified values </s>
funcom_train/15512699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int maxGroupReference(String replacementString) { int count = 0; Matcher matcher = Pattern.compile("(\\A|[^\\\\])\\$(\\d*)").matcher( replacementString ); while(matcher.find()) { String digit = matcher.group(2); count = Math.max( count, Integer.parseInt( digit )); } return count; } COM: <s> finds the highest group reference in the replacement pattern </s>
funcom_train/27780085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { stop = true; if (queue == null) { return; } synchronized (queue) { while (queue.empty() == false || active > 0) { try { queue.wait(); } catch (InterruptedException x) { logger.log(Level.WARNING, "waiting for stop", x); } } } } COM: <s> kill all waiting threads </s>
funcom_train/37747045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FontFamilySet getFontSet() throws PropertyException { PropertyValue fontSet = getPropertyValue(PropNames.FONT_FAMILY); if (fontSet.getType() != PropertyValue.FONT_FAMILY) { throw new PropertyException( "font-family value is not a FontFamilySet object."); } // TODO make the FO tree property values immutable objects wherever // possible return (FontFamilySet)fontSet; } COM: <s> gets the current code font family set code property </s>
funcom_train/51616611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add( JRadioButtonBound<TO> b) { me().add( b ); b.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { save(); //update the subcomponents AND refresh the text of the menu } }); } COM: <s> adds the button to the group </s>
funcom_train/50218995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Include visit_inline_content_include(Element element) throws ParseException { Expression nameExp = parseExpressionAttribute(element, "src"); Expression encodingExp = parseExpressionAttribute(element, "encoding"); Expression parseExp = parseExpressionAttribute(element, "parse"); Include result = new Include(template, nameExp, false, encodingExp, parseExp); return result; } COM: <s> include element element include src encoding attribute parse ftl boolean expression </s>
funcom_train/457816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateNewProjectLegalName() { tester.startPage(EditProjectPage.class); final FormTester formTester = tester.newFormTester(MARKUP_ID_FORM); formTester.setValue(MARKUP_ID_PROJECT_NAME_TEXTFIELD, PROJECT_NAME_LEGAL); formTester.submit(MARKUP_ID_PROJECT_PERSIST_BUTTON); assertFalse(formTester.getForm().hasError()); assertTrue(formTester.getForm().hasFeedbackMessage()); } COM: <s> tests the basic creation of a new project correct name submitted </s>
funcom_train/13850630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkExistance(String source, final String codebase) { Message message; boolean gotCodebase; if (codebase != null && codebase.trim().length() > 0) { message = new Message(Reporter.INFO, getString("codebaseIs") + " " + codebase, getString("existenceExp")); gotCodebase = true; } else { message = new Message(Reporter.INFO, getString("nocodebase"), getString("existenceExp")); gotCodebase = false; } Reporter.print(message, source); return gotCodebase; } COM: <s> check for existence </s>
funcom_train/11012572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWithHyperlink() { HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("WithHyperlink.xls"); HSSFSheet sheet = wb.getSheetAt(0); HSSFCell cell = sheet.getRow(4).getCell(0); HSSFHyperlink link = cell.getHyperlink(); assertNotNull(link); assertEquals("Foo", link.getLabel()); assertEquals("http://poi.apache.org/", link.getAddress()); assertEquals(4, link.getFirstRow()); assertEquals(0, link.getFirstColumn()); } COM: <s> test reading hyperlinks </s>
funcom_train/18721638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getContentTitle() { String xPath = OFFSET + "Description/MultimediaContent/*/CreationInformation/Creation/Title"; //System.out.println(mpeg7.toString()); contentTitle = readXmlValue(xPath, contentTitle); if (contentTitle == null) { contentTitle = ""; } return contentTitle; } COM: <s> title of the content </s>
funcom_train/33839429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getBuffer(int size, long offset) throws IOException, FitsException { if (currInput == null) { throw new IOException("No stream open to read"); } buffer = new byte[size]; if (offset != 0) { FitsUtil.reposition(currInput, offset); } currInput.readFully(buffer); bp = new ByteParser(buffer); } COM: <s> read some data into the buffer </s>
funcom_train/21180214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void accumulate(java.util.Vector v, String prefix, java.io.File f) { if (f.isDirectory()) { String s = prefix + f.getName() + java.io.File.separator; java.io.File[] flist = f.listFiles(); for (int i = 0; i < flist.length; i++) { accumulate(v, s, flist[i]); } } else { v.add(prefix + f.getName()); } } COM: <s> adds a file name or its contents if a directory to a vector </s>
funcom_train/10671238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void verifyThatAllBeanInfoNotInvoked() throws Exception { for (int i = 0; i < listOfBeanInfo.length; i++) { if (listOfBeanInfo[i].getIsInvokedAndChangeToNotInvoked()) { throw new LocationException("BeanInfo " + listOfBeanInfo[i].getClass().getName() + " must not be invoked."); } } } COM: <s> verify that all bean info are not used by introspector </s>
funcom_train/8281079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelZonasCreadas() { if (jPanelZonasCreadas == null) { jPanelZonasCreadas = new JPanel(); jPanelZonasCreadas.setLayout(new GridBagLayout()); jPanelZonasCreadas.setBorder(BorderFactory.createTitledBorder(null, "Zonas creadas", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51))); } return jPanelZonasCreadas; } COM: <s> this method initializes j panel zonas creadas </s>
funcom_train/25709995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NewickTreeNode getDescendant(String name) { ArrayList<NewickTreeNode> descendants = root.getDescendants(); NewickTreeNode descendant = new NewickTreeNode(); for (int i = 0; i < descendants.size(); i++) { if (descendants.get(i).getName().equals(name)) { descendant = descendants.get(i); break; } } return descendant; } COM: <s> returns the descendant with the given name </s>
funcom_train/318502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void log(final String level, final String message, final Throwable t) { final StringBuffer buf = new StringBuffer(); final long millis = System.currentTimeMillis(); buf.append(millis - startTime); buf.append(" ["); buf.append(Thread.currentThread().getName()); buf.append("] "); buf.append(level); buf.append(" "); buf.append(name); buf.append(" - "); buf.append(message); buf.append(LINE_SEPARATOR); System.err.print(buf.toString()); if (t != null) { t.printStackTrace(System.err); } // System.err.flush(); } COM: <s> this is our internal implementation for logging regular non parameterized </s>
funcom_train/26116760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawCalibration(Canvas canvas) { canvas.translate(middleX, 0); canvas.drawColor(Color.WHITE); float x = -bmNeedle.getWidth() / 2; /* TODO "N" get from strings.xml */ canvas.drawText("N", 0, 30, mPaint); canvas.drawBitmap(bmNeedle, x, 60, mPaintBm); } COM: <s> only draw basic for calibration </s>
funcom_train/41328422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSelectElement() { //System.out.println("removeSelectElement() fired"); currSubTray.removeElement(currTv); Util.lookup.put(Util._EL_SELECTED_FROM_TRAY, null); list.setListData(currSubTray); currTv = null; list.repaint(); } COM: <s> the current selected view is removed and the sub tray is updated </s>
funcom_train/7428171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawRect(final double x, final double y, final double width, final double height) { TEMP_RECT.setRect(x, y, width, height); SWTShapeManager.transform(TEMP_RECT, transform); SWTShapeManager.awtToSWT(TEMP_RECT, SWT_RECT); gc.setLineWidth(getTransformedLineWidth()); gc.drawRectangle(SWT_RECT); } COM: <s> draws the outline of the specified rectangle </s>
funcom_train/50573159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStatusCompleted(Time t) { if (t != null) { if (! t.equals(_completionTime)) { logActivity("Completion time modified."); } _completionTime = t; if (! isComplete()) { logActivity("Set status to complete."); _status = STATUS_COMPLETE; } modified(); } } COM: <s> sets this story to the completed status also sets </s>
funcom_train/28749515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setId(Long newVal) { if ((newVal != null && this.id != null && (newVal.compareTo(this.id) == 0)) || (newVal == null && this.id == null && id_is_initialized)) { return; } this.id = newVal; id_is_modified = true; id_is_initialized = true; } COM: <s> setter method for id </s>
funcom_train/31890048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveOfflineQueue() { //debugOnly(); messageQueue.deleteNonStorable(); String filename; if (Beehive.getComm().onServer()) filename = userAddress; else filename = address.getAddress().getHostName(); filename = "rep/Comm/offline/" + filename; messageQueue.save(filename); } COM: <s> serializes storable messages from the sockets message queue </s>
funcom_train/50962964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isGreater(Term t) { t = t.getTerm(); if (t instanceof Number) { return value>((Number)t).doubleValue(); } else if (t instanceof Struct) { return false; } else if (t instanceof Var) { return true; } else { return false; } } COM: <s> returns true if this double term is grater that the term provided </s>
funcom_train/11008761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SharedStringsTable getSharedStringsTable() throws IOException, InvalidFormatException { ArrayList<PackagePart> parts = pkg.getPartsByContentType( XSSFRelation.SHARED_STRINGS.getContentType()); return parts.size() == 0 ? null : new SharedStringsTable(parts.get(0), null); } COM: <s> opens up the shared strings table parses it and </s>
funcom_train/18503784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applySetSlides(SendSlides command) { //Get the list to use this.slides = command.getSlides(); //Need to set the parent for all slides as this is not saved when serializing Iterator iter = slides.iterator(); while (iter.hasNext()) { Slide currSlide = (Slide)iter.next(); currSlide.setParent(this); } //Go to current slide setCurrentSlideNum(command.getSlideNum()); //Repaint repaint(); } COM: <s> apply a send slides command by setting the slides list </s>
funcom_train/10018223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getQNameValueOfVariant(int variant) { if (variant < 0 || m_variantTypes[variant] != VARIANT_QNAME) throw new EXISchemaRuntimeException( EXISchemaRuntimeException.INCOMPATIBLE_VARIANT_TYPE, new String[] { "QName" } ); return m_variants[variant]; } COM: <s> returns qname value of a variant </s>
funcom_train/42851145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArtwork(URL imageUrl) { if (imageUrl != null) { SyndImage image = new SyndImageImpl(); image.setUrl(imageUrl.toExternalForm()); if (feed.getTitle()!=null) { image.setTitle(feed.getTitle()); } else { image.setTitle(Messages.getString("RSSFeed.NO_TITLE")); //$NON-NLS-1$ } feed.setImage(image); } } COM: <s> used to set the feeds artwork </s>
funcom_train/2840719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void firePropertyChange(PropertyChangeEvent evt) { logger.debug("firePropertyChange(evt={}) - start", evt); Object oldValue = evt.getOldValue(); Object newValue = evt.getNewValue(); if (oldValue == null || newValue == null || !oldValue.equals(newValue)) multicast(evt); } COM: <s> fire an existing property change event to any registered listeners </s>
funcom_train/45226136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getBackKeyCode() { try { if (currentPlatformName.equals(Platform.MOTOROLA)) { } else if (currentPlatformName.equals(Platform.NOKIA)) { } else if (currentPlatformName.equals(Platform.SAMSUNG)) { } else if (currentPlatformName.equals(Platform.SIEMENS)) { } else if (currentPlatformName.equals(Platform.SONY_ERICSSON)) { return KeyCode.BACK_KEY_SE; } } catch (Throwable e) { } return 0; } COM: <s> define real keys back code for current platform </s>
funcom_train/36885485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateInstructionAttachmentView(InstructionAttachmentView view) throws InstructionAttachmentException{ InstructionAttachmentDAO dao = null; InstructionAttachmentConverter converter = null; InstructionAttachmentDTO dto = null; if(view != null){ dao = new InstructionAttachmentDAO(); converter = new InstructionAttachmentConverter(); dto = converter.convert(view); try { dao.updateInstructionAttachment(dto); } catch (InstructionAttachmentException pe) { throw pe; } catch (Exception e) { InstructionAttachmentException pe = new InstructionAttachmentException(e, InstructionAttachmentException.LAYER_SERVICE, InstructionAttachmentException.ACTION_UPDATE); e.printStackTrace(System.out); throw pe; } } } COM: <s> actualiza un instruction attachment view </s>
funcom_train/24474291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateSize() { Rectangle bounds = this.graph.getGUI().getBounds(); Dimension newDimention = new Dimension(bounds.width, bounds.height); if (!newDimention.equals(this.graphDimention)) { // Updates this Panel's preferred size because the area taken up by // the graph has changed. this.panel.setPreferredSize(newDimention); // Let the scroll pane know to update itself and its scrollbars. this.panel.revalidate(); this.graphDimention = newDimention; } } COM: <s> updates the size of this panel </s>
funcom_train/10980783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMatchWithKeyInPath() { ActionMapping[] mapping = new ActionMapping[1]; mapping[0] = new ActionMapping(); mapping[0].setPath("/page-*"); ActionConfigMatcher matcher = new ActionConfigMatcher(mapping); ActionConfig matched = matcher.match("/page-{0}"); assertNotNull("ActionConfig should be matched", matched); assertEquals("Path hasn't been replaced", "/page-{0}", matched.getPath()); } COM: <s> verifies that a match succeeds when the substituted value contains a </s>
funcom_train/43933253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invoke(String method, IPendingServiceCallback callback) { log.debug("invoke method: {} params {} callback {}", new Object[] { method, callback }); // get it from the conn manager RTMPConnection conn = connManager.getConnection(); if (conn == null) { log.info("Connection was null 2"); } else { conn.invoke(method, callback); } } COM: <s> invoke a method on the server </s>
funcom_train/45622595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefaultTargetsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ProjectType_defaultTargets_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ProjectType_defaultTargets_feature", "_UI_ProjectType_type"), MSBPackage.eINSTANCE.getProjectType_DefaultTargets(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the default targets feature </s>
funcom_train/49944752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void quickSort(String arr[], int left, int right) { int index = partition(arr, left, right); if (left < index - 1) { PSortTask task = new PSortTask(execService, taskCounter, semaphore, arr, left, index - 1); execService.submit(task); } if (index < right) quickSort(arr, index, right); } COM: <s> quick sort algorithm </s>
funcom_train/20042470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _getName() { oObj.loadModule(TransliterationModules.LOWERCASE_UPPERCASE, loc); String name = oObj.getName(); boolean res = name.equals("lower_to_upper(generic)"); log.println("getName return: " + name); tRes.tested("getName()", res); } COM: <s> loads uppercase lowercase module and </s>
funcom_train/22770092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XObject loadChildByName(XPath path, String name, int type, IEngineContext context) throws InvalidObjectPathException { log.debug("loadChildByName"); XObject[] children = loadChildren(path, type, context); XObject result = XArrays.findByName(children, name); return result; } COM: <s> loads child by name </s>
funcom_train/5809544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isIpValidated(long nodeid, String ip, String catLabel) { List nodesList = getRTCNodes(nodeid, ip); Iterator iter = nodesList.iterator(); while (iter.hasNext()) { RTCNode node = (RTCNode) iter.next(); if (node.belongsTo(catLabel)) { return true; } } return false; } COM: <s> check if this ip has already been validated for this category </s>
funcom_train/1066394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createQualifiedNameLabel() { FontData[] fontdata={new FontData(this.fontString, this.fontSize, SWT.ITALIC)}; Font font = PapyrusPlugin.fontManager.get(fontdata); Label label = new Label(); label.setFont(font); label.setOpaque(false); // Add the label to the figure, after the name this.add( label, getQualifiedNameLabelPosition()); this.qualifiedLabel = label; } COM: <s> create the label that contains the qualified name </s>
funcom_train/34341188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCodBanco() { if (CodBanco == null) {//GEN-END:|32-getter|0|32-preInit // write pre-init user code here CodBanco = new TextField("CodBanco", null, 5, TextField.ANY);//GEN-LINE:|32-getter|1|32-postInit // write post-init user code here }//GEN-BEGIN:|32-getter|2| return CodBanco; } COM: <s> returns an initiliazed instance of cod banco component </s>
funcom_train/8357528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getRadiobtnLaplacian() { if (radiobtnLaplacian == null) { radiobtnLaplacian = new JRadioButton(); radiobtnLaplacian.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { radiobtnFisher.setSelected(false); radiobtnEntropy.setSelected(false); radiobtnLaplacian.setSelected(true); radiobtnSoap.setSelected(false); jButton.setEnabled(true); jButton1.setEnabled(false); } }); } return radiobtnLaplacian; } COM: <s> this method initializes radiobtn laplacian </s>
funcom_train/5600940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ImageRequest getImageRequest(final ImageType type) throws WebServiceException { final GridGeometry geometry = getGridGeometry(); return new ImageRequest(type, layer, geometry, responseCRS, colormapRange, getTime(), elevation, interpolation, format, background, transparent); } COM: <s> returns a snapshot of current configuration as an </s>
funcom_train/40921199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionOpen() { Object dialog = addComponent(this, "/xml/lukeinit.xml", null, null); Object path = find(dialog, "path"); if (this.baseDir != null) setString(path, "text", this.baseDir); else setString(path, "text", System.getProperty("user.dir")); } COM: <s> show an open index dialog </s>
funcom_train/44565121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNameNormal() { if (isFilled(DcAssociate._E_FIRSTNAME) && isFilled(DcAssociate._F_LASTTNAME)) return (getDisplayString(DcAssociate._E_FIRSTNAME) + " " + getDisplayString(DcAssociate._F_LASTTNAME)).trim(); else return getName(); } COM: <s> returns the name formatted as first name last name </s>
funcom_train/13851383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getProxyHost(String host) { String str = props.getProperty(ssl ? "https.proxyHost" : "http.proxyHost"); if (str == null && !ssl) { str = props.getProperty("proxyHost"); } if (str == null || (str.length() != 0 && nonProxied(host))) { str = ""; } return str; } COM: <s> returns proxy host if given host should be proxied through it </s>
funcom_train/35273965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doTerrainUpdates(float dt) { if (terrainEditToolActivated) { lastModifyTime += dt; if (lastModifyTime >= toolModifyRate) { lastModifyTime = 0; if (terrainEditToolActivated) { toolController.doTerrainEditToolActivated(); } terrainEditToolActivated = false; lastModifyTime = app.getContext().getTimer().getTime(); } } } COM: <s> update the terrain if it has had any editing done on it </s>
funcom_train/11650544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { setLayout(new BorderLayout()); add(makeLabelPanel(), BorderLayout.NORTH); add(makeMainPanel(), BorderLayout.CENTER); // Force a minimum table height of 70 pixels add(Box.createVerticalStrut(70), BorderLayout.WEST); add(makeButtonPanel(), BorderLayout.SOUTH); table.revalidate(); sizeColumns(table); } COM: <s> initialize the components and layout of this component </s>
funcom_train/27780397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeDoc(long id) { if (id < 0 && id >= size()) { return true; } Object item = docsInfo.elementAt((int) id); synchronized (item) { if (item instanceof DELETED) { return false; } docsInfo.setElementAt(new DELETED((DocMetadata) item), (int) id); delNum++; return true; } } COM: <s> remove the document with the given unique id </s>
funcom_train/4856014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HistoryPoint getHistory(int location) { if (this.history.isEmpty() || location < 0) { return new HistoryPoint(); } if (location > this.history.size() - 1) { location = this.history.size() - 1; } return this.history.get(location); } COM: <s> this method returns the history at a particular history </s>
funcom_train/34355484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @SuppressWarnings("unchecked") public boolean contextExists(URI context) throws DatabaseAccessException { try { Query query = getDataSource().getQueryFactory().createNamedQuery(CONTEXT_EXISTS); query.setParameter("ctx", context); List result = query.getResultList(); return !result.isEmpty(); } catch (Exception e) { throw new DatabaseAccessException("Error while accessing database", e); } } COM: <s> checks whether the specified context exists in the underlying database </s>
funcom_train/4289147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDContextsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Property_dContexts_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Property_dContexts_feature", "_UI_Property_type"), NfpsPackage.Literals.PROPERTY__DCONTEXTS, false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the dcontexts feature </s>
funcom_train/16883872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLWriter findattribute( String name ) { if ( Attribute.find( name ) != null ) return this; if ( element == null ) return null; if ( element.getClass() != Vector.class ) return null; XMLWriter xml = null; Vector<?> v = (Vector<?>)element; int i; for ( i = 0; i < v.size(); i++ ) { xml = (XMLWriter)v.get( i ); if ( xml.findattribute( name ) != null ) return xml; } return null; } COM: <s> find and retrieve the first element that has the specified attribute name </s>
funcom_train/38905366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTextFieldZadani1() { if (textFieldZadani1 == null) {//GEN-END:|54-getter|0|54-preInit // write pre-init user code here textFieldZadani1 = new TextField("", null, 32, TextField.ANY);//GEN-LINE:|54-getter|1|54-postInit // write post-init user code here }//GEN-BEGIN:|54-getter|2| return textFieldZadani1; } COM: <s> returns an initiliazed instance of text field zadani1 component </s>
funcom_train/26491984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int executeUpdate() { int rs = -1; if ( !getConnection() ) return rs; try { System.err.println("DBOject: executeUpdate: " + query); rs = con.executeUpdate( query ); } catch ( SQLException e ) { System.err.println("DBObject: SQLException: " + e.getMessage() + "\n - Query = " + query); } con.release(); return rs; } COM: <s> perfores a sql execute update with the given query string </s>
funcom_train/5249664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveTo(int move) throws Exception { int indexOfCurrent = steps.indexOf(currentStep); if (move>0) { if (indexOfCurrent<(steps.size() - move)) currentStep = steps.get(indexOfCurrent+move); else currentStep = steps.get(steps.size()-1); } else if (move<0) { if (indexOfCurrent>(0-move)) currentStep = steps.get(indexOfCurrent+move); else currentStep = steps.get(0); } } COM: <s> move the cursor state </s>
funcom_train/18040369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText(Object element) { if (element instanceof String) { return (String) element; } else if (element instanceof Integer) { return element.toString(); } else if (element instanceof ArrayList){ ArrayList aelement = (ArrayList) element; Object jsObj = aelement.get(1); String type; if(jsObj instanceof ScriptableObject){ type = ((ScriptableObject)jsObj).getClassName(); }else{ type = jsObj.getClass().getName(); } return aelement.get(0).toString() + " ("+type+")"; } else{ return null; } } COM: <s> returns the string necessary for the specified element </s>
funcom_train/30280972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void launchThreadsOnFinish(BPThreadX t) { if (LOG.isTraceEnabled()) { LOG.trace("Entering launchThreadsOnFinish ..."); } if (t == null) { throw new RuntimeException("Assert: t==null"); } synchronized (processX.getMutex()) { if (threadxsToLaunchOnFinish.contains(t)) { throw new RuntimeException( "Assert: this thread is scheduled already"); } threadxsToLaunchOnFinish.add(t); } } COM: <s> schedule thread to run on this thread finish as outgoing thread </s>
funcom_train/25289866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPatternMask(int mask) { if (isLiveOrCompiled() && !this.getCapability(ALLOW_PATTERN_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("LineAttributes8")); if (isLive()) ((LineAttributesRetained)this.retained).setPatternMask(mask); else ((LineAttributesRetained)this.retained).initPatternMask(mask); } COM: <s> sets the line pattern mask to the specified value </s>
funcom_train/5378312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StreamManagerOutputStream getOutputStream(String target) throws IOException { if (useReliableFiles) { ReliableFileOutputStream out = new ReliableFileOutputStream(new File(manager.getBase(), target)); return new StreamManagerOutputStream(out, this, target, null, ST_OPEN); } File tmpFile = manager.createTempFile(target); return new StreamManagerOutputStream(new FileOutputStream(tmpFile), this, target, tmpFile, ST_OPEN); } COM: <s> returns an code output stream code for a filemanager managed file from a </s>
funcom_train/10268595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String connectAsService() throws IOException{ // first connect as default admin user _sessionHandle = connect(_adminUser, _adminPassword); // create new user for service if necessary if (! isRegisteredUser(_user)) _interfaceAClient.createUser(_user, _password, true, _sessionHandle); // logon with service user and return the result return connect(_user, _password); } COM: <s> attempts to logon to the engine using a service id </s>
funcom_train/13271893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) { if (name != this.name || (name != null && !name.equals(this.name))) { String oldName = this.name; this.name = name; this.propertyChangeSupport.firePropertyChange(Property.NAME.name(), oldName, name); } } COM: <s> sets the name of this piece of furniture </s>
funcom_train/10802072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeSequenceMetaData(SequenceMetaData meta) { if (meta == null) return false; if (_locking) { synchronized (this) { return _seqs.remove(meta.getName()) != null; } } else { return _seqs.remove(meta.getName()) != null; } } COM: <s> remove the given sequence metadata from the repository </s>
funcom_train/1307831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getWidgetRow(Widget widgetToFind, int columnToSearch) { for (int i = 0; i < grid.getRowCount(); i++) { if (columnToSearch != -1) { Widget widget = grid.getWidget(i, columnToSearch); if (widget != null && grid.getWidget(i, columnToSearch).equals(widgetToFind)) { return i; } } else { } } return -1; } COM: <s> return the row corresponding to the given widget </s>
funcom_train/37074851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSyntenyLinkedFeatProps() { if (linkedFeatProps == null) { linkedFeatProps = new ArrayList(5); for (int i=0; i < getAllTiers().size(); i++) { linkedFeatProps.addAll(getTierProperty(i).getSyntenyLinkedFeatProps()); } } return linkedFeatProps; } COM: <s> retrieves all feature props that are synteny links </s>
funcom_train/2576888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Date nextStandardDate(Date date, DateTickUnit unit) { Date previous = previousStandardDate(date, unit); Calendar calendar = Calendar.getInstance(this.timeZone, this.locale); calendar.setTime(previous); calendar.add(unit.getCalendarField(), unit.getMultiple()); return calendar.getTime(); } COM: <s> returns the first standard date based on the specified field and </s>
funcom_train/46092819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSpinner getMSubmissionSpinner() { if (mSubmissionSpinner == null) { mSubmissionSpinner = new JSpinner(); mSubmissionSpinner.setFont(new Font("Dialog", Font.PLAIN, 12)); SpinnerModel model = new SpinnerNumberModel(1, 1, 100, 1); mSubmissionSpinner.setModel(model); } return mSubmissionSpinner; } COM: <s> this method initializes m submission spinner </s>
funcom_train/2729798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showPopup() { if (popup == null){ PopupFactory fac = new PopupFactory(); Point xy = getLocationOnScreen(); datePanel.setVisible(true); popup = fac.getPopup(this, datePanel, (int) xy.getX(), (int) (xy.getY()+this.getHeight()-1)); popup.show(); } } COM: <s> called internally to popup the dates </s>
funcom_train/19435920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String evaluate(String formula) { String value = "0"; try { Object result = _interpreter.eval(formula); if (result instanceof Number) { value = ((Number)result).toString(); } else if (result instanceof Boolean) { value = (Boolean)result ? "1" : "0"; } else { log.error(formula + "= " + result + " isn't a Number, returning 0"); } } catch (EvalError e) { log.error("Can't evaluate " + formula + ", use 0", e); } return value; } COM: <s> perform bean shell evaluation of the mathematical formula </s>
funcom_train/28755600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScaleid(Long newVal) { if ((newVal != null && this.scaleid != null && (newVal.compareTo(this.scaleid) == 0)) || (newVal == null && this.scaleid == null && scaleid_is_initialized)) { return; } this.scaleid = newVal; scaleid_is_modified = true; scaleid_is_initialized = true; } COM: <s> setter method for scaleid </s>
funcom_train/20265194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean whetherRegistered(String email) { Assert.notNull(email); String sql = "select email from users where email=?"; PreparedStatement ps; try { ps = getJdbcTemplate().getDataSource().getConnection().prepareStatement(sql); ps.setString(1, email); ResultSet rs = ps.executeQuery(); while (rs.next()) { return true; } } catch (SQLException e) { e.printStackTrace(); } return false; } COM: <s> define whether the email has been registered </s>
funcom_train/4750161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getDenom(int freq, int rank) { int denom = df.length - 1; int matches = 0; while (denom >= 0) { // if the frequencies match, then increment the // load up the freqToDenom array. amount of matches, // and if the matches are where it needs to be, return the // denomination. if (df[denom] == freq && matches++ == rank) return denom; denom--; } return -1; } COM: <s> finds and locates a card of specified rank first second third and </s>
funcom_train/31455322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component loadComponent(URI uri) throws ComponentException { Statement st = this.containerManager.find1(new ResourceImpl(uri.toString()), RDF.type, CV.ContextMap); if (st != null) { RDFConceptMap cMap = new RDFConceptMap(uri); cMap.update(new RDFComponentManager(this, uri, null, true)); return cMap; } else { RDFConcept c = new RDFConcept(uri); c.update(new RDFComponentManager(this, uri, null, false)); return c; } } COM: <s> returns a resource i </s>
funcom_train/18026699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Axis getDomAxis( DasAxis axis ) { Axis domAxis; if ( plot.xaxis.controller.dasAxis == axis ) { domAxis= plot.xaxis; } else if ( plot.yaxis.controller.dasAxis==axis ) { domAxis= plot.yaxis; } else if ( plot.zaxis.controller.dasAxis==axis ) { domAxis= plot.zaxis; } else { domAxis= null; } return domAxis; } COM: <s> get the axis in the dom for the das axis implementation </s>
funcom_train/23235893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isHit(int x, int y) { if (isClosed()) { return false; } int height = this.height; int width = this.width; if (isMinimized()) { height = TITLEBAR_SIZE + (frame ? FRAME_SIZE * 2 : 0); } if ((x < this.x) || (y < this.y) || (x > this.x + width) || (y > this.y + height)) { return false; } return true; } COM: <s> checks if the point is inside the panel </s>
funcom_train/45736859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SchemaUsageStatistics buildXmlSchemaUsageStatistics() { XmlSchema.SchemaUsageStatistics res = new SchemaUsageStatistics(); res.notUsedElementList = new ArrayList<Element>(); //Recursivaly iterate all elements and get the statistics. List<Element> roots = this.getAllRootElements(); this.buildXmlSchemaUsageStatistics(roots, res); return res; } COM: <s> used to generate usage statistics about the xml schema </s>
funcom_train/2903349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addInputSet(String label, JTextField input){ if((pi==null) || (pl==null)){ pi = new JPanel(new GridLayout(5, 5, 5, 5)); pl = new JPanel(new GridLayout(5, 5, 5, 5)); } pi.add(input); pl.add(new JLabel(label)); } COM: <s> add a new set of input gui </s>
funcom_train/48266695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IMChannel channel(final String theChatName) { String myChatId = ((String) _myChatChannelsMap.get(theChatName)); if (isContained(_myChatChannels, myChatId)) { return ((IMChannel) _myChatChannels.get(myChatId)); } return new IMChannel(this, "ERROR", "ERROR", "ERROR", "ERROR"); } COM: <s> get a chat channel </s>
funcom_train/3704744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(InetAddress host,int port)throws IOException { HTTP_Socket = new Socket(host,port); HTTP_in = new Jhttpp2ServerInputStream(server,this,HTTP_Socket.getInputStream(),false); HTTP_out = new BufferedOutputStream(HTTP_Socket.getOutputStream()); } COM: <s> connects to the given host and port </s>
funcom_train/44486269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet getReportResultSet( HttpServletRequest request, Connection conn ) throws Exception { ResultSet rs = null; String reportId = ""; String queryName = ""; if ( null != request ){ reportId = request.getParameter("reportId"); Properties rptProp = getReportProperties(); if ( null != reportId && null !=rptProp ){ queryName = rptProp.getProperty(reportId + ".query1"); rs = getQueryResultSet( request, conn, reportId, queryName ); } } return rs; } COM: <s> returns one result set for the report id specified in the request </s>
funcom_train/33264411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GadgetGridBagConstraints getConstraints(Gadget gadget) { GadgetGridBagConstraints constraints = (GadgetGridBagConstraints)gadgettable.get(gadget); if (constraints == null) { setConstraints(gadget, defaultConstraints); constraints = (GadgetGridBagConstraints)gadgettable.get(gadget); } return (GadgetGridBagConstraints)constraints.clone(); } COM: <s> retrieves the constraints for the specified gadget </s>
funcom_train/374676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int loadCache() throws IOException { URL url = JConfig.getURL(this.name, RESOLVER_SEARCH_PATH_PROPERTY); if (url == null) { logger.fine("cache file " + name + " not found"); return 0; } logger.finer("loading cache file " + url.toString()); return loadCache(new BufferedReader(new InputStreamReader(url.openStream()))); } COM: <s> load cache entries using default mechanism </s>
funcom_train/47522826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Error extend(List list, String json) { buf = new StringBuilder(); it = new StringCharacterIterator(json); try { c = it.first(); while (Character.isWhitespace(c)) c = it.next(); if (c == '[') { c = it.next(); array(list); return null; } else return error(ARRAY_TYPE_ERROR); } catch (Error e) { return e; } finally { buf = null; it = null; } } COM: <s> evaluates a json code string code and extends a code list code </s>
funcom_train/26312799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeTeam(int team) { Client c = getPlayerListSelected(lisPlayerInfo); if ((c != null) && (c.getLocalPlayer().getTeam() != team)) { c.getLocalPlayer().setTeam(team); c.sendPlayerInfo(); } } COM: <s> change local player team </s>
funcom_train/40685851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMapDragStartHandler(final MapDragStartHandler handler) { maybeInitMapDragStartHandlers(); mapDragStartHandlers.addHandler(handler, new VoidCallback() { @Override public void callback() { MapDragStartEvent e = new MapDragStartEvent(MapWidget.this); handler.onDragStart(e); } }); } COM: <s> this event is fired when the user starts dragging the map </s>
funcom_train/3272934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkContainment(Point3f point){ boolean returnBool = false; Fleet fleet = null; // Enumerate through the Fleets in World and for(Enumeration units = fleets.elements(); units.hasMoreElements();){ fleet = (Fleet) (units.nextElement()); // Intersect with all Ships in the Fleet returnBool |= fleet.checkContainment(point); } return returnBool; } COM: <s> returns if the current point is contained within </s>