__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10616687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDigestException04() { Throwable cause = null; DigestException tE = new DigestException(cause); assertNull("getMessage() must return null.", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } COM: <s> test for code digest exception throwable code constructor assertion </s>
funcom_train/804178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readFile(File filename) { StringBuffer buffer = new StringBuffer(); try { FileReader fileReader = new FileReader(filename); BufferedReader input = new BufferedReader(fileReader); int character; while ((character = input.read()) != -1) { buffer.append((char) character); } input.close(); } catch (IOException e) { logger.error("Could not read jcamp file"); } return buffer.toString(); } COM: <s> reads the content of file filename into a string </s>
funcom_train/25850642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onClick(View arg0) { String message = "Bill : "+currencyFormat.format(getBill())+"\n"+"Tip % : "+getTipPercent()+"%\n"+"Tip : "+currencyFormat.format(calculateTip()); showAlert("End Bill", 0, message, "Thanks!", false); } COM: <s> done when the gui button calculate is pressed shows a dialog </s>
funcom_train/34141111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unloadExternalSpeechStrategy(String speechStrategyRelativePath) { File speechStrategyFile = new File(mExternalSpeechStrategyDirectory, speechStrategyRelativePath); mSpeechRuleProcessor.removeSpeechStrategy(speechStrategyFile); Log.i(LOG_TAG, "Removed external speech strategy: " + speechStrategyRelativePath); } COM: <s> unloads an external speech strategy with the given </s>
funcom_train/25705815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initSortHeader() { Enumeration enumeration = getColumnModel().getColumns(); while (enumeration.hasMoreElements()) { TableColumn column = (TableColumn) enumeration.nextElement(); column.setHeaderRenderer(columnHeadersRenderer); } getTableHeader().addMouseListener(new HeaderMouseListener()); } COM: <s> this method sets a sort header renderer as the renderer of the headers </s>
funcom_train/39926427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fire(Vector2D vect) { int x = super.getX(); int y = super.getY(); int width = super.getWidth(); int height = super.getHeight(); armVector = vect; missiles.add(new Missile(x + width/2, y + height/2, vect)); lastFrameFired = frameCount; arrowsFired++; } COM: <s> fires a missile at the vector in the parameter with </s>
funcom_train/12243500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point pointToReal(double x,double y) { double arr[]= new double[2]; double ret[]=new double[2]; arr[0]=x; arr[1]=y; try { at.inverseTransform(arr,0,ret,0,1); } catch(NoninvertibleTransformException e) { System.err.println("Error: Non-invertible coordinate transformation!"); } return new Point((int)ret[0],(int)ret[1]); } COM: <s> transforms view to world coordinates </s>
funcom_train/4151757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateArrows() { for (int i=0; i<arrow.length; i++) { if (future[i] != currentNode) arrow[i].setLocalTranslation( currentNode.vect.mult(scale).add(future[i].vect.mult(scale).subtract(currentNode.vect.mult(scale)).normalize().mult(arrowOffset))); else arrow[i].setLocalTranslation(0, 0, 1000); } } COM: <s> positions arrows based on future nodes </s>
funcom_train/22112778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PageList findAlertDefinitionChildren(Integer id) { AlertDefinition def = getAlertDefDAO().findById(id); PageControl pc = PageControl.PAGE_ALL; return _valuePager.seek(def.getChildren(), pc.getPagenum(), pc.getPagesize()); } COM: <s> get list of children alert definition for a parent alert definition </s>
funcom_train/21998951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getDir_panel() { JPanel dir_panel = new JPanel(); dir_panel.setLayout(new BorderLayout()); javax.swing.JLabel label = new JLabel(); label.setText(Localization.getString("MACROS_DIRECTORY")); dir_panel.add(label, java.awt.BorderLayout.WEST); dir_panel.add(getDirectory_text(), java.awt.BorderLayout.CENTER); dir_panel.add(getBrowse_button(), java.awt.BorderLayout.EAST); return dir_panel; } COM: <s> this method initializes j panel </s>
funcom_train/19000735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int toBytes(byte[] buffer, int offset) { // write number of attributes new AS400Bin4().toBytes(getAttributes().length, buffer, offset); int position = offset + 4; // write attributes for (int i = 0; i < getAttributes().length; i++) position += getAttributes()[i].toBytes(buffer, position); return position; } COM: <s> converts this object to a structure usable by the system apis </s>
funcom_train/31192846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInput( LangDefObj input ) { System.err.println("<"+getName()+">setInput ("+input.getClass()+")"); this.input = input; if( input != null ) { inputClass = input.getClass(); input.apply( addVisitor ); input.setRegSet( this ); } setNletters( input.getNletters() ); } COM: <s> sets the input ldo on java and c level </s>
funcom_train/27952640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getElement(Node node, String xpathExpr) throws JaxenException { XPath xpath = new DOMXPath(xpathExpr); List list = xpath.selectNodes(node); assertEquals("Node count" + xpathExpr, 1, list.size()); return (Element) list.get(0); } COM: <s> returns the code element code that code xpath expr code identifies </s>
funcom_train/11702071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList fget(String key) { ArrayList return_me = new ArrayList(); for (int i = 0; i < size; i++) { KeyValuePair pair = elements[i]; if (pair.key.equals(key)) { return_me.add(pair.value); } } return return_me; } COM: <s> implementation of the abstract fget method defined in queryable frame </s>
funcom_train/15518525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int goTo (long coordinate) { model.zoomAndCenter(getGenome (), 100, coordinate); if (model instanceof LcbViewerModel) { ((LcbViewerModel) model).alignView(getGenome (), coordinate); } else System.out.println ("BaseViewerModel -- not moving to align"); return 1; } COM: <s> centers view on selected coordinate of the genome associated with </s>
funcom_train/17724555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void formItemFound(FacesContext context, FileItem item, Hashtable<String, String> htUpload) { String key=item.getFieldName(); String value=item.getString(); // put in Hashtable for later access if(bDebug) System.out.println("Inserting form item in map " + key + " = " + value); htUpload.put(key, value); } COM: <s> handle upload of a standard form item </s>
funcom_train/16795561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getLength() { if (imp==null || IJ.altKeyDown()) return getRawLength(); else { Calibration cal = imp.getCalibration(); return Math.sqrt((x2d-x1d)*cal.pixelWidth*(x2d-x1d)*cal.pixelWidth + (y2d-y1d)*cal.pixelHeight*(y2d-y1d)*cal.pixelHeight); } } COM: <s> returns the length of this line </s>
funcom_train/31900941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLarge(boolean large) { if (large) { recHeight = largeImages[0].getIconHeight(); recWidth = largeImages[0].getIconWidth(); setFrames(largeImages); setDisabledIcon(largeDisabled); setSize(recWidth, recHeight); } // if else { recHeight = smallImages[0].getIconHeight(); recWidth = smallImages[0].getIconWidth(); setFrames(smallImages); setDisabledIcon(smallDisabled); setSize(recWidth, recHeight); } // else } // setLarge COM: <s> set this mozilla working buttons size </s>
funcom_train/1811843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(Graphics g, boolean debug){ if(state.shot != null){ float angle = drawingAngle+90; int width = state.shot.getWidth(); int height = state.shot.getHeight(); state.shot.setCenterOfRotation(width/2, height/2); state.shot.rotate(angle); state.shot.draw(circle.getCenterX()-width/2, circle.getCenterY()-height/2, 1f); state.shot.rotate(-angle); if(debug){ g.draw(circle); } }else{ g.draw(circle); } } COM: <s> draw the ship </s>
funcom_train/49456288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Boolean getParamBoolean(HttpServletRequest request, String parameter) throws Exception{ Boolean res = null; String value = getParam(request, parameter); if ("null".equals(value)) return null; try { res = Boolean.valueOf(value); } catch(Exception e) { _logger.error("Fail to parse value "+value+" as a boolean parameter "+parameter); } return res; } COM: <s> get the value as a boolean for the http parameter </s>
funcom_train/42194735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List buildDefaultEqualsList(List specs) { List result = new ArrayList(); Iterator it = specs.iterator(); while (it.hasNext()) { PropertySpecification spec = (PropertySpecification) it.next(); if (spec.getType().isDefaultEqualsCandidate()) { result.add(spec); } } return result; } COM: <s> builds a list of specifications of properties which will be used for </s>
funcom_train/46192816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ChangeLog nextChangeLog(String tabletName) throws IOException { FileChangeLogManager logManager = null; synchronized(logManagers) { logManager = logManagers.get(tabletName); if(logManager == null) { logManager = new FileChangeLogManager(conf, tabletName, hostName); logManagers.put(tabletName, logManager); } } return logManager.nextChangeLog(); } COM: <s> change log change log </s>
funcom_train/35095276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkForDragEnd(MouseEvent e) { if (e.getID() == MouseEvent.MOUSE_RELEASED && inDrag && null != previous) { previous.dispatchEvent(SwingUtilities.convertMouseEvent(this, e, previous)); inDrag = false; return true; } else { return false; } } COM: <s> checks to see if a drag event has ended </s>
funcom_train/44317616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean satisfies(Triple triple) { if (!TripleUtils.isVariable(triple.getAttribute().getString())) { if (!triple.getAttribute().getString().equals(getName())) { return false; } } if (TripleUtils.isVariable(triple.getValue().getString())) { return true; } return isValidValue(triple.getValue().getString()); } COM: <s> satisfies tests whether or not this edge could be used to </s>
funcom_train/15906309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fatalError(SAXParseException exception) throws SAXException { log("Parse Fatal Error at line " + exception.getLineNumber() + " column " + exception.getColumnNumber() + ": " + exception.getMessage(), exception); if (errorHandler != null) errorHandler.fatalError(exception); } COM: <s> forward notification of a fatal parsing error to the application </s>
funcom_train/29271311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMarshalSimpleContent() throws Exception { String expect = "<ex:Author rating=\"2\" xmlns:ex=\"http://ws.apache.org/jaxme/test/misc/types\">This is a test.</ex:Author>"; String got = getMarshalledAuthor(); assertEquals(expect, got); } COM: <s> p tests whether elements with simple content can be marshalled </s>
funcom_train/22224192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exit() { // try to stop it gracefully synchronized (this) { referenceQueue = null; } this.interrupt(); try { this.join(500); } catch (InterruptedException e) { } // last resort tentative to kill the cleaner thread if (this.isAlive()) this.stop(); } COM: <s> stops the cleaner thread </s>
funcom_train/1535251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean show(DynamicMeshElement2 e, int j) { ParametricSurfaceDiamond d = (ParametricSurfaceDiamond) e; if (d.isSingular() && d.getTriangle(j) != null && d.getTriangle(j).getIndex() == -1) { return true; } else if (show(d.getTriangle(j))) { return true; } return false; } COM: <s> shows a triangle that has been hidden </s>
funcom_train/22093684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkURL(URL u) { String urlStr = u.toString(); for (int i=0; i<rules.size(); i++) { RegExpRule rule = (RegExpRule)rules.elementAt(i); if (rule.match(urlStr)) { return rule.getAllow(); } } return defaultResult; } COM: <s> checks if a given url is allowed or denied by the rules </s>
funcom_train/19825299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void trimGenerations(int gen) { if (logdir == null) return; // Delete old logs boolean done = false; for (int i = gen; !done; i++) { File src = new File(logdir, LOGBASE + i); if (src.exists()) { src.delete(); } else done = true; } } COM: <s> delete all log files above given generation </s>
funcom_train/38557046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public C_Content copyToNewParent(C_ContentContainer newParent) { if (parent().equals(newParent)) { return newParent.duplicateChild(this); } if (!newParent.willAcceptChild(this)) { throw new RuntimeException( "ContentMoveException" + " " + "This content cannot be moved to that parent"); } C_Content newContent = copyWithinEC(); newContent.addObjectToBothSidesOfRelationshipWithKey( newParent, "parent"); newParent.addObjectToBothSidesOfRelationshipWithKey( newContent, "children"); return newContent; } COM: <s> perform a deep copy of the receiver into a new parent container </s>
funcom_train/14464897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveBookToFile() { try { com.extentech.ExtenXLS.ExtenXLS.writeBookToFile(foutpath, book); if (DEBUG)Logger.logInfo("WorkBookPanel.saveBookToFile()"+ book.getName() + " saved sucessfully."); } catch (Exception e) { Logger.logErr("WorkBookPanel.saveBookToFile failed.", e); } } COM: <s> saves the current workbook to a file </s>
funcom_train/25587233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand1() { if (itemCommand1 == null) {//GEN-END:|29-getter|0|29-preInit // write pre-init user code here itemCommand1 = new Command("Select", Command.ITEM, 0);//GEN-LINE:|29-getter|1|29-postInit // write post-init user code here }//GEN-BEGIN:|29-getter|2| return itemCommand1; } COM: <s> returns an initiliazed instance of item command1 component </s>
funcom_train/32057407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetBendable() { System.out.println("testSetBendable"); jgraph.setBendable( true ); boolean b = jgraph.isBendable(); assertEquals( b, true ); jgraph.setBendable( false ); b = jgraph.isBendable(); assertEquals( b, false ); } COM: <s> test of set bendable method of class jgraph </s>
funcom_train/31938059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPostingDate() throws ZoneException { ZoneEvent event = getZoneEvent(); if (event.getAction().equals(ZoneConstants.ACTION_DELETE)) return; ITransaction transaction= (ITransaction) getZoneEvent().getValue(); if (transaction.getPostingDate() == null) transaction.setPostingDate(new Date()); } COM: <s> if no posting date was specified then set the posting date to todays </s>
funcom_train/7677603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { ParamAPI oParamAPI = (ParamAPI)o; int comp = name_.compareTo(oParamAPI.name_); if (comp != 0) return comp; comp = type_.compareTo(oParamAPI.type_); if (comp != 0) return comp; return 0; } COM: <s> compare two param api objects using both name and type </s>
funcom_train/7891479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeLine(String line) { if (line.length() > 75) { buffer.append(line.substring(0, 75)); newLine(); buffer.append(' '); writeLine(line.substring(75)); } else { buffer.append(line); if (!"END:VCALENDAR".equals(line)) { newLine(); } } } COM: <s> write line to buffer split lines at 75 characters </s>
funcom_train/25842315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanUpHandlers() { synchronized (streamHandlers) { for (Iterator<WeakReference<CommandStreamHandler>> it = streamHandlers.iterator(); it.hasNext();) { WeakReference<CommandStreamHandler> handlerRef = it.next(); CommandStreamHandler handler = handlerRef.get(); if (handler == null) { it.remove(); } } } } COM: <s> cleans up any connection handlers which have been gced </s>
funcom_train/3315056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertConsistency(){ super.assertConsistency(); Set<E> s = getTestObject(); HashSet<E> hs = new HashSet<E>(s); assertEquals("Set does not equal from it constructed hash set.", s,hs); assertEquals("Hash codes of set and hash set are different.", hs.hashCode(), s.hashCode()); } COM: <s> checks consistency of all reading set methods </s>
funcom_train/38937917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fadeIn(JComponent component) { this.component = component; Alpha = 0.2F; //Get Graphics from Commponent g = this.component.getGraphics(); g2d = (Graphics2D) g; //Enable Anti-Alias g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); //start fade effect AnimationID = 0; start(); } COM: <s> fades in a component </s>
funcom_train/34985708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override protected void startup() { final JKeeperView jKeeperView = new JKeeperView(this, args); show(jKeeperView); addExitListener(new ExitListener() { public boolean canExit(EventObject e) { return jKeeperView.confirmDisposal(); } public void willExit(EventObject event) { } }); } COM: <s> at startup create and show the main frame of the application </s>
funcom_train/4879275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MP3File getNextMP3File() { int index = playListContents.getDataVector().indexOf( getVector(currentMP3File)); int nextMP3FileIndex; if (isShuffleOn()) { nextMP3FileIndex = getRandomIndexFromPlaylist(); } else { nextMP3FileIndex = index + 1; } if (nextMP3FileIndex >= playListContents.getRowCount()) { nextMP3FileIndex = 0; } setCurrentMP3File(nextMP3FileIndex); return getCurrentMP3File(); } COM: <s> gets the next mp3 file to play after the current playing file </s>
funcom_train/24009429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Rates getRate(Session session, Integer hotelid, Integer roomtype, Date currDate) { String sql = "from Rates\n"+ "where roomtype =:roomtype and :currdate between fromdate and todate"; Query query = session.createQuery(sql); query.setInteger("roomtype", roomtype).setDate("currdate", currDate); Rates rate = (Rates)query.uniqueResult(); return rate; } COM: <s> here gets the rate in the due date </s>
funcom_train/50053585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setProjectionForCamera(Camera inCam, GL gl) { gl.glMatrixMode(GL.GL_PROJECTION); gl.glLoadIdentity(); gl.glMultMatrixf(GLUtils.fromMatrix4f(inCam.getProjectionMatrix()), 0); gl.glMultMatrixf(GLUtils.fromMatrix4f(inCam.getViewMatrix()), 0); } COM: <s> setup for rendering with a given camera </s>
funcom_train/1476817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getTableNameFromClass(Class<?> type) { String tableName = getDataMapper(type).getTableName(); if ("".equals(tableName) || tableName == null) { // generate the table name based on defaults tableName = BasicTranslator.makeTableNameFromClass(type); } return tableName; } COM: <s> find the tablename from the classname </s>
funcom_train/4853755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL makeQuery (String keywords) { try { return new URL("http://www.metacrawler.com/crawler?general=" + URLEncoder.encode(keywords) + "&method=1&format=1&region=&rpp=20&timeout=15&hpe=10"); } catch (MalformedURLException e) { throw new RuntimeException ("internal error"); } } COM: <s> make a query url for meta crawler </s>
funcom_train/880621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new LDAPItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LDAPValue_value_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LDAPValue_value_feature", "_UI_LDAPValue_type"), LdapPackage.eINSTANCE.getLDAPValue_Value(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the value feature </s>
funcom_train/34451259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addThreadPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_MContext_thread_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_MContext_thread_feature", "_UI_MContext_type"), RuntimePackage.Literals.MCONTEXT__THREAD, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the thread feature </s>
funcom_train/9663636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getTableWidth() { String width = DOM.getStyleAttribute(getElement(), "width"); if (width != null && width.endsWith("px")) { return Integer.parseInt(width.substring(0, width.indexOf("px"))) + 20; } else { return getOffsetWidth() + 20; } } COM: <s> this method returns an actual table width </s>
funcom_train/38291737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void frozenAgent(AID name, ContainerID bufferContainer) throws NotFoundException { AgentDescriptor ad = platformAgents.acquire(name); if (ad == null) throw new NotFoundException("FrozenAgent failed to find " + name); AMSAgentDescription amsd = ad.getDescription(); if (amsd != null) { amsd.setState(AMSAgentDescription.SUSPENDED); } ContainerID cid = ad.getContainerID(); platformAgents.release(name); // Notify listeners fireFrozenAgent(cid, name, bufferContainer); } COM: <s> notify the platform that an agent has just frozen </s>
funcom_train/49441190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MInvoice lookupInvoiceOCR(Properties ctx, String ocr) throws Exception { List<MInvoice> invoices = new Query(ctx, MInvoice.Table_Name, "OCR=?", null) .setParameters(new Object[]{ocr}) .setApplyAccessFilter(true) .list(); if (invoices.size()>1) { m_log.warning("Document No: " + ocr + " is ambigous and can't be matched."); return(null); } if (invoices.size()==0) return(null); return(invoices.get(0)); } COM: <s> method to lookup invoice using ocr number </s>
funcom_train/5305734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getChunk(byte [] buffer, int offset, String chunk) { try { for (;;) { int dataLenght = getInt(buffer, offset); if (compareBytes(buffer, offset+4, chunk)) { return offset; } else { offset += 4 + 4 + dataLenght + 4; } } } catch (Exception e) {}; return -1; } COM: <s> finds the specified chunk </s>
funcom_train/25504680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String loadWidgetText(String[] widgetKey, Object... arguments) throws ResourceUnavailableException { assert widgetKey != null; assert widgetKey.length == 2; assert widgetKey[0] != null; assert widgetKey[1] != null; assert arguments != null; final String[] key = new String[] { widgetKey[0], widgetKey[1] + ".text" }; return loadText(key, arguments); } COM: <s> load and optionally format a widgets text attribute </s>
funcom_train/15565682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultEdge createEdge(DefaultGraphCell source, DefaultGraphCell target){ int arrow = GraphConstants.ARROW_CLASSIC; DefaultEdge edge = new DefaultEdge(); edge.setSource(source.getChildAt(0)); edge.setTarget(target.getChildAt(0)); GraphConstants.setLineEnd(edge.getAttributes(), arrow); GraphConstants.setEndFill(edge.getAttributes(), true); return edge; } COM: <s> generate the edeges between two nodes </s>
funcom_train/34805175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DOM getDOM() { DOM lDOM = DOM.createDocument("AUTHENTICATED_INFO"); lDOM.addElem("LOGIN_ID",mLoginId); lDOM.addElem("FORENAME",mForename); lDOM.addElem("SURNAME",mSurname); lDOM.addElem("PRIMARY_EMAIL_ADDRESS",mPrimaryEmail); return lDOM; } COM: <s> constructs authenticated info in a standard format </s>
funcom_train/37210096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void annotateBLASTReports() throws AnzoException, FileNotFoundException { BLASTReportAnnotator aBRAnn = new BLASTReportAnnotator(); aBRAnn.setDss(this.dss); aBRAnn.setNamedGraphUri(getNamedGraphUri()); // retrieve actual BLAST report resources here // <URI to report> --> <report content> Map<URI, String> reports = aBRAnn.collectReports(); aBRAnn.annotate(reports); } COM: <s> operates on dss </s>
funcom_train/16380202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateNumberOfCorrectorsType_Min(int numberOfCorrectorsType, DiagnosticChain diagnostics, Map<Object, Object> context) { boolean result = numberOfCorrectorsType >= NUMBER_OF_CORRECTORS_TYPE__MIN__VALUE; if (!result && diagnostics != null) reportMinViolation(CTEPackage.Literals.NUMBER_OF_CORRECTORS_TYPE, new Integer(numberOfCorrectorsType), new Integer(NUMBER_OF_CORRECTORS_TYPE__MIN__VALUE), true, diagnostics, context); return result; } COM: <s> validates the min constraint of em number of correctors type em </s>
funcom_train/31153153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JavaClassDeclaration getClassDeclaration(String className) { Enumeration nodes = getClassDeclarations(); while (nodes.hasMoreElements()) { JavaClassDeclaration classDecl = (JavaClassDeclaration) nodes.nextElement(); if (className.equals(classDecl.getClassName())) { return classDecl; } } return null; } COM: <s> returns the class declaration of the given name </s>
funcom_train/48748879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPageNumber(ControllerRequest request) throws ControllerException { String pg = request.getParameter("page"); if (pg != null) { try { this.setPageNumber(Integer.parseInt(pg)); } catch(NumberFormatException nfe) { throw new ControllerException("Page number parameter is not an integer"); } } else { setPageNumber(1); } } COM: <s> sets the page number based upon the controller request object </s>
funcom_train/34258408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getLastModifiedDateAggregates() { Date aggregateLastModifiedDate = getOnlyAggregatesLastModifiedDate(); if (aggregateLastModifiedDate != null && lastModifiedDate == null) { return aggregateLastModifiedDate; } else if (aggregateLastModifiedDate != null && lastModifiedDate != null && aggregateLastModifiedDate.compareTo(lastModifiedDate) > 0) { return aggregateLastModifiedDate; } else { return lastModifiedDate; } } COM: <s> take into account aggregate objects </s>
funcom_train/34784455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void columnAdded(javax.swing.event.TableColumnModelEvent e) { super.columnAdded(e); javax.swing.table.TableColumn column = getColumnModel().getColumn(e.getToIndex()); column.setMinWidth(squareWidth); column.setMaxWidth(squareWidth); } COM: <s> invoked when a column is added to the table column model </s>
funcom_train/35952716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setBaseText(JuxtaDocument document) throws ReportedException { if (document == null) { this.currentCollation = null; } else { Collation collation = this.comparisonSet.getCollation(document); if (collation == null) return false; // make this the current collation this.currentCollation = collation; currentCollation.setCollationFilter(currentCollationFilter); fireCurrentCollationChanged(currentCollation); } return true; } COM: <s> sets the specified document to be the current base text for display purposes </s>
funcom_train/13272878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writePreferences() throws IOException { OutputStream out = null; try { checkPreferencesFolder(); out = new FileOutputStream(new File(getPreferencesFolder(), PREFERENCES_FILE)); this.preferencesProperties.storeToXML(out, "Portable user preferences 3.0"); } finally { if (out != null) { out.close(); this.exist = true; } } } COM: <s> writes user preferences </s>
funcom_train/42181524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectAll() { if (this.focusedView == getFurnitureController().getView()) { getFurnitureController().selectAll(); } else if (this.focusedView == getPlanController().getView()) { getPlanController().selectAll(); } } COM: <s> selects everything in the focused component </s>
funcom_train/8470168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TemporalDocument next() { //String fileName = filesToProcess.poll(); NameAndTime n = filesToProcess.poll(); if (n == null) return null; try { return (n.hasTimeStamp()) ? new TemporalFileDocument(n.fileName, n.timeStamp) : new TemporalFileDocument(n.fileName); // no timestamp } catch (IOException ioe) { return null; } } COM: <s> returns the next document from the list </s>
funcom_train/34716825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArticleGenerationStrategy createStrategy(String strategyName){ if(ArticleGenerationStrategy.NORMAL_STRATEGY.equals(strategyName)){ return new NormalGenerationStrategy(); }else if(ArticleGenerationStrategy.BOMB_BONUS_STRATEGY.equals(strategyName)){ return new BombBonusGenerationStrategy(new NormalGenerationStrategy()); }else if(ArticleGenerationStrategy.SUPER_BOMB_BONUS_STRATEGY.equals(strategyName)){ return new SuperBombBonusGenerationStrategy(new NormalGenerationStrategy()); }else{ return null; } } COM: <s> creates a new article generation strategy object </s>
funcom_train/42710649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonDeleteInvoice() { if (jButtonDeleteInvoice == null) { jButtonDeleteInvoice = new JButton(); jButtonDeleteInvoice.setText("Delete"); jButtonDeleteInvoice.setBounds(new Rectangle(270, 450, 121, 21)); jButtonDeleteInvoice.setActionCommand("DeleteInvoice"); } return jButtonDeleteInvoice; } COM: <s> this method initializes j button delete invoice </s>
funcom_train/15494458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPath() throws Exception { System.out.println("getPath"); ResourceReader instance = new ResourceReader( "com/rift/coad/lib/common/coadunation-test.xml"); String expResult = "com/rift/coad/lib/common/coadunation-test.xml"; String result = instance.getPath(); assertEquals(expResult, result); } COM: <s> test of get path method of class com </s>
funcom_train/36999820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void log(String s) { if(!isInit) init(); byte[] bytes = null; try { bytes = s.getBytes(Util.UTF8); } catch (java.io.UnsupportedEncodingException e) { Util.printStackTrace(e); bytes = s.getBytes(); } Util.logStream.write(bytes, 0, bytes.length); Util.logStream.println(""); Util.logStream.flush(); } COM: <s> log a message </s>
funcom_train/37515925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mergeUpTo(int numberOfPos, CVariableInfoTable other) { if (numberOfPos > states.length) { expandArrayToInclude(numberOfPos - 1); } CVariableState[] otherStates = other.states; int otherStatesLength = otherStates.length; for (int i = 0; i < numberOfPos; i++) { mergeState(i, (i >= otherStatesLength) ? null : otherStates[i]); } } COM: <s> merges the state information from other into this for positions from 0 to </s>
funcom_train/44869062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMDrawGeometricBean getOriginPoint() { if (originPoint == null) { originPoint = new WCMDrawGeometricBean(); originPoint.setShape(WCMDrawGeometricBean.OVAL_CENTERED); originPoint.setH(5); originPoint.setV(5); originPoint.setFillColor(Color.lightGray); originPoint.setColor(Color.lightGray); originPoint.setX1(new Constant(0)); originPoint.setY1(new Constant(0)); if (presentation) { originPoint.setH(8); originPoint.setV(8); originPoint.setLineWidth(3); } } return originPoint; } COM: <s> this method initializes origin point </s>
funcom_train/13097590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void nextShipment() { // metas don't remove the storages from memory before we are done // m_map = new HashMap<SParameter, MStorage[]>(); // if (m_lastPP != null && m_lastStorages != null) // m_map.put(m_lastPP, m_lastStorages); m_line = 0; m_shipment = null; } COM: <s> prepares this instance for another shipment to be created during the </s>
funcom_train/3039678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void replace( IDocument document, int offset, int length, String string ) throws BadLocationException { if (document != null && string != null && offset >= 0 && length >= 0) { if (!document.get( offset, length ).equals( string )) document.replace( offset, length, string ); } } COM: <s> replaces the document content at the specified offset and length with the </s>
funcom_train/49406722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WordDefinition findByUri(final String uri) { final String terminologyURI = QualifiedName.getNamespaceUri(uri); final String nennform = QualifiedName.getNamePart(uri); final Query query = entityManager.createNamedQuery(WordDefinitionDBO.FIND_BY_URI); query.setParameter(WordDefinitionDBO.PARAM_TERMINOLOGY_URI, terminologyURI); query.setParameter(WordDefinitionDBO.PARAM_NENNFORM, nennform); return QueryExec.maxOne(query); } COM: <s> find a word definition by its uri </s>
funcom_train/2636028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EntityManagerFactory getEntityManagerFactory(String unitName) { if (unitName==null) unitName=defaultPersistenceUnitName; EntityManagerFactory entityManagerFactory=entityManagerFactories.get(unitName); if (entityManagerFactory==null) { entityManagerFactory=Persistence.createEntityManagerFactory(unitName); entityManagerFactories.put(unitName, entityManagerFactory); } return entityManagerFactory; } COM: <s> get entity manager factory by name </s>
funcom_train/24248144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ParsePhenoFile(String pheno) { File PheFile = new File(pheno); try { PhenoData.Initial(PheFile); PhenoData.parsePhenotype(); } catch (GMDRPhenoFileException e) { System.err.println("Pheno file initialization exception."); e.printStackTrace(System.err); } catch (IOException e) { System.err.println("Pheno file initialization exception."); e.printStackTrace(System.err); } IsLoadPhenoFile = true; } COM: <s> initialize basic implementation of the phenotype file </s>
funcom_train/2758947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHttpHost() { /* Connector[] connectors = _server.getConnectors(); for(int i = 0; i < connectors.length; i++) { System.out.println("ConfidentialScheme:" + connectors[i].getConfidentialScheme()); System.out.println("IntegralScheme:" + connectors[i].getIntegralScheme()); } */ return _server.getConnectors()[0].getHost(); } COM: <s> returns the host that the web server listens </s>
funcom_train/44602433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_elemtype_01() { compileAndExecGivenStatement( "X.java", "class X {\n" + " //@ requires \\elemtype(\\type(int[])) == \\type(int);\n" + " public void m() {\n" + " }\n" + "}\n", "new X().m()"); } COM: <s> jml elemtype expression not parsed </s>
funcom_train/42877155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTotalFilesize(List<Long> oids) { long totalFileSize = 0; // iterate over all oids to summarize clip duration Iterator<Long> oidIter = oids.iterator(); while (oidIter.hasNext()) { totalFileSize += dataPool.getMeta(oidIter.next()).getFile().length(); } return totalFileSize; } COM: <s> gets the total filesize of a couple clips </s>
funcom_train/1050243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCompleteDataForStoring() { Debug.temporary(this, "getCompleteDataForStoring, nonEdPack.size: " + nonEditorPackets.size()); StringBuilder builder = new StringBuilder(); for (Packet p: nonEditorPackets) { builder.append(p.formatForBolscript()); Debug.temporary(this, "appending: " + p); Debug.temporary(this, "formatted:\n" + p.formatForBolscript()); } builder.append(editableRawData); return builder.toString(); } COM: <s> returns the complete data for storage in a file </s>
funcom_train/1558954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu createMenuItem(String[] table, int rows, int columns ){ JMenu menu = new JMenu(table[0] + " " + table[1] + " " + table[2] + " "); menu.add(new LatexTable(app, this, btInsertUnicode, table, rows, columns, SelectionTable.MODE_TEXT)); return menu; } COM: <s> creates a sub menu for the unicode insert button </s>
funcom_train/18473001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAxisSelection(Collection selection) { clear(); updateHierarchy(selection); if (axisSelection == null) axisSelection = new ArrayList(); else axisSelection.clear(); axisSelection.addAll(selection); axisSelectionDirty = true; category.setDirty(true); expression = null; } COM: <s> sets the axis selection </s>
funcom_train/7421623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getScopeWithPrefix(BlockActivity act) { if (act == null) { return null; } String prefix = act.getParentSwimlane().getPrefix(); if (prefix == null) { this.output.addError("The prefix for this blockactivity " + " could not be determined.", act.getId()); return null; } return prefix + ":" + act.getName(); } COM: <s> determines the scope value from the given block activity </s>
funcom_train/25075467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleBrowseGraphDescButton() { trimTexts(); Object[] initialSelection = buildInitialSelectionFromText(graphDescText); IFile[] result = WorkspaceResourceDialog.openFileSelection(getShell(), "File selection", "Please select the graphical description file", false, initialSelection, GRAPHDESC_VIEWER_FILTERS); if (result != null && result.length > 0) { String path = result[0].getFullPath().toString(); graphDescText.setText(path); } } COM: <s> handles a click on the browse button allowing to select a graphical </s>
funcom_train/5411980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ZActionResult tagConversation(String ids, String tagId, boolean tag, String targetConstraints) throws ServiceException { return doAction(convAction(tag ? "tag" : "!tag", ids, targetConstraints).addAttribute(MailConstants.A_TAG, tagId)); } COM: <s> tag untag conversations </s>
funcom_train/42861288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchNodes(int parent, String sort) { /* Yes, this usage is "discouraged" by the documentation. However, in this * application, all columns really are needed/useful here. */ return mDb.query(DATABASE_TABLE_NODES, null, KEY_ROWID + "=" + parent, null, null, null, sort); } COM: <s> return a cursor over the list of all nodes in the database </s>
funcom_train/44136972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onDefaultModelValues() { String title = OSMApplication.Localisation.getString("SED_SlideDefault"); String msg = OSMApplication.Localisation.getString("SED_SlideDefaultConfirm"); int answer = JOptionPane.showConfirmDialog(null, msg, title, JOptionPane.YES_NO_OPTION); if(answer == JOptionPane.YES_OPTION) refreshModel(true); } COM: <s> call when user wants to set default model values </s>
funcom_train/19054900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getM_topPanel() { if (m_topPanel == null) { FlowLayout flowLayout = new FlowLayout(); flowLayout.setHgap(0); flowLayout.setAlignment(FlowLayout.LEFT); flowLayout.setVgap(0); m_topPanel = new JPanel(); m_topPanel.setLayout(flowLayout); m_topPanel.setBackground(Color.white); m_topPanel.add(getM_cmbFont(), null); } return m_topPanel; } COM: <s> this method initializes m top panel </s>
funcom_train/50575867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MusicFile getLocalFile(File dir, String path, TocEntry trackEntry) { try { return (MusicFile) LocalFile.newFile(dir, path, false, false, trackEntry); } catch (Exception ex) { return new BrokenFile(trackEntry, dir); } } COM: <s> returns the file corresponding to the path </s>
funcom_train/7880883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void lw(String bin) { // get operands indexed = true; int r1 = Integer.parseInt(bin.substring(8, 11), 2); int addr = effAdr(bin); // store to memory location if (addr >= 0 && addr <= 65536) { unsignedSetReg(r1, Long.parseLong(getMem(addr), 16)); } else { // report invalid memory location error } indexed = false; } COM: <s> description load word br </s>
funcom_train/51220751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean loadMedia(String newMedia){ if (repository==null) return false; Player player =InternalManager.getDefault().getPlayer(); if (player==null) return false; URL path; try { path = new URL(MediaQuery.getMediaFileUrlOfMedia(repository,newMedia)); } catch (MalformedURLException e) { return false; } if (player.setFile(path)){ InternalManager.getDefault().newMediaLoaded(newMedia); return true; } return false; } COM: <s> a media is loaded </s>
funcom_train/29712148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Viewer viewer, Object e1, Object e2) { if (e1 instanceof TreeParent && e2 instanceof TreeParent) { return ((TreeParent) e1).getShortname() - ((TreeParent) e2).getShortname(); // return collator.compare(str1, str2); } if (e1 instanceof TreeObject && e2 instanceof TreeObject) { return ((TreeObject) e1).getChapnum() - ((TreeObject) e2).getChapnum(); // return collator.compare(str1, str2); } return 0; } COM: <s> returns a negative zero or positive number depending on whether the </s>
funcom_train/5378174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeArgs(String header, String[] args) throws IOException { if (args == null || args.length == 0) return; write(header); for (int i = 0; i < args.length; i++) { //mask out the password argument for security if (i > 0 && PASSWORD.equals(args[i - 1])) write(" (omitted)"); //$NON-NLS-1$ else write(" " + args[i]); //$NON-NLS-1$ } writeln(); } COM: <s> helper method for writing out argument arrays </s>
funcom_train/36851866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDate(int position, java.util.Date value) throws SQLException { if (value == null) { java.sql.Date dummy = null; setDate(position, dummy); } else { setDate(position, new java.sql.Date(value.getTime())); } } COM: <s> sets a tt date tt variable identified by position to a tt java </s>
funcom_train/41818210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printRefreshLocalTask(String resource, String depth) { printTab(); output.print("<eclipse.refreshLocal"); //$NON-NLS-1$ printAttribute("resource", resource, true); //$NON-NLS-1$ printAttribute("depth", depth, false); //$NON-NLS-1$ output.println("/>"); //$NON-NLS-1$ } COM: <s> print a code eclipse </s>
funcom_train/3174489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void swapChoices(int i, int j) { int selected = lChoose.getSelectedIndex(); // Move it down T o = choices.get(i); choices.set(i, choices.get(j)); choices.set(j, o); // Show it update(); if (selected==i) lChoose.setSelectedIndex(j); if (selected==j) lChoose.setSelectedIndex(i); } COM: <s> exchange two choices </s>
funcom_train/4787338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void isValidCharPattern(char c) { switch (c) { case 'y' : case 'M' : case 'd' : case 'D' : case 'G' : case 'w' : case 'W' : case 'F' : case 'E' : case 'k' : case 'K' : case 'z' : case 'Z' : SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, "Invalid time pattern : " + c); //$NON-NLS-1$ } } COM: <s> checks if a given char is valid for the edit pattern </s>
funcom_train/3298209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MsnMessage addLine(String line) throws MessageFormatException { try { StringTokenizer strtok = new StringTokenizer(line); strtok.nextToken(); // Skip JOI Literal account = strtok.nextToken(); nick = SpecialCharacters.getInstance().decode(strtok.nextToken(), true); return this; } catch (Exception ex) { throw new MessageFormatException(ex); } } COM: <s> adds a feature to the line attribute of the join message object </s>
funcom_train/27823790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateProgress(final int phase,final int numberOfPhases,final int stepsDone,final int totalSteps) { if (SwingUtilities.isEventDispatchThread()) updateProgressInternal(phase,numberOfPhases,stepsDone,totalSteps); else SwingUtilities.invokeLater(new Runnable() { public void run() { updateProgressInternal(phase,numberOfPhases,stepsDone,totalSteps); } }); } COM: <s> updates the progress display </s>
funcom_train/27937256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processLevelsDebugging() { if(levelDebuggingInfosList != null) { for(int i=0; i<levelDebuggingInfosList.size(); i++) { LevelDebuggingInfo info = (LevelDebuggingInfo)levelDebuggingInfosList.get(i); debugLevels(info.hLevels, info.parameters); } levelDebuggingInfosList = null; } } COM: <s> process the levels debugging </s>