__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/8101670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Factors (Factors other, boolean cloneAlphabet) { weightAlphabet = cloneAlphabet ? (Alphabet) other.weightAlphabet.clone() : other.weightAlphabet; weights = new SparseVector[other.weights.length]; for (int i = 0; i < weights.length; i++) weights[i] = (SparseVector) other.weights[i].cloneMatrix(); defaultWeights = other.defaultWeights.clone(); weightsFrozen = other.weightsFrozen; initialWeights = other.initialWeights.clone(); finalWeights = other.finalWeights.clone(); } COM: <s> construct new factors by copying the other one </s>
funcom_train/7518196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(OrdemServico entity) { EntityManagerHelper.log("saving OrdemServico instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved ordem servico entity </s>
funcom_train/14011860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Alignment combineAlignment(Alignment primary, Alignment secondary) { if (primary == null) { return secondary; } else if (secondary == null) { return primary; } int horizontal = primary.getHorizontal(); int vertical = primary.getVertical(); Alignment alignment = new Alignment(horizontal == Alignment.DEFAULT ? secondary.getHorizontal() : horizontal, vertical == Alignment.DEFAULT ? secondary.getVertical() : vertical); return alignment; } COM: <s> combines the properties of two code alignment code objects together </s>
funcom_train/32057664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUpdateCachedPreferredSize() { System.out.println("testUpdateCachedPreferredSize"); JGraph jg=new JGraph(); BasicGraphUI x = new BasicGraphUI(); GraphLayoutCache g = new GraphLayoutCache( new DefaultGraphModel(),jg ); x.installUI(jg); x.updateCachedPreferredSize(); } COM: <s> test of update cached preferred size method of class basic graph ui </s>
funcom_train/16319861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JInternalFrame getSelectedFrame() { // gets all the frames JInternalFrame[] frames = desktop.getAllFrames(); for (int i = 0; i < frames.length; i++) { // returns the first selected frame if (frames[i].isSelected()) { return frames[i]; } } // if no frame was selected, returns null return null; } COM: <s> returns the selected frame among children null if none </s>
funcom_train/42659467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean fireBeforeInsertEvent(E element) { // generate before add event if (this.beforeInsertEvent != null && 0 < this.beforeInsertEvent.getListenerCount()) { // create event ActionEventBefore_1x0<E> e = new ActionEventBefore_1x0<E>(this, eventID++, STR_BEFORE_INSERT); e.setData(element); this.beforeInsertEvent.fire(e); // check the canceled attribute of the ActionEvent // if the canceled attribute is true, then canceled the operation return e.isCanceled(); } return false; } COM: <s> fires a before insert event </s>
funcom_train/29921913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toXml(String title, String uri) { String ourdoc; // Build up the string to represent our document ourdoc = "<resource>"; ourdoc = ourdoc + "<title>" + title + "</title>"; ourdoc = ourdoc + "<uri>" + uri + "</uri>"; ourdoc = ourdoc + "</resource>"; // Return the created XML string return ourdoc; } COM: <s> create a string xml document from passed in parameters </s>
funcom_train/21439159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double getScreenAngle(Residue node, Residue parent) { Rectangle node_bbox = getCurrent(node); Rectangle par_bbox = getCurrent(parent); if( node_bbox==null || par_bbox==null ) return 0.; return angle(center(node_bbox),center(par_bbox)); } COM: <s> return the angle of the vector joining the centers of the </s>
funcom_train/28116182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void expectFailure() throws Exception { try { getContext().getConnection().setClientID(CLIENT_ID); fail("setClientID should throw IllegalStateException"); } catch (IllegalStateException expected) { // the expected behaviour } catch (Exception exception) { fail("Expected setClientID to throw IllegalStateException, " + "but got: " + exception); } } COM: <s> expect the set client id operation to fail </s>
funcom_train/3377956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeValue(String key) { if (key == null) { throw new IllegalArgumentException("argument can not be null"); } SecureKey secureKey = new SecureKey(key); Object value = table.remove(secureKey); if (value instanceof SSLSessionBindingListener) { SSLSessionBindingEvent e; e = new SSLSessionBindingEvent(this, key); ((SSLSessionBindingListener)value).valueUnbound(e); } } COM: <s> removes the specified session value delivering a session changed </s>
funcom_train/19379114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStartupSkin() { // Verify if the user wanna skin Romeo on startup if (config.getBoolean("Use_skin")) { // Get the themepack to load String themepack = config.get("Skin.path"); // Call void 'setSkinTheme' setSkinTheme(themepack); } } COM: <s> this method loads a skin on startup </s>
funcom_train/31625390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelFillStatus intersect(ModelFillStatus other) { if (other == COMPLETE) { return (this == COMPLETE) ? COMPLETE : PARTIALLY_FILLED; } else if (other == EMPTY) { return (this == EMPTY) ? EMPTY : PARTIALLY_FILLED; } else if (other == PARTIALLY_FILLED) { return PARTIALLY_FILLED; } else { throw new IllegalStateException("Unknown model status: " + other.status); } } COM: <s> since model status represents a completion </s>
funcom_train/21015092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNumberOfBetweenLinesRight ( final int numberOfBetweenLines ) { if ( frozen ) { return; } final int old = numberOfBetweenLinesRight; numberOfBetweenLinesRight = numberOfBetweenLines; pcs.firePropertyChange ( "numberOfBetweenLinesRight", old, numberOfBetweenLinesRight ); } COM: <s> sets the number of lines between the main lines </s>
funcom_train/51340757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public long rangeCount(Object fromKey, Object toKey) { fromKey = fromKey == null ? null : metadata.getTupleSerializer() .serializeKey(fromKey); toKey = toKey == null ? null : metadata.getTupleSerializer() .serializeKey(toKey); return rangeCount((byte[]) fromKey, (byte[]) toKey); } COM: <s> variant implicitly converts the optional application keys into unsigned </s>
funcom_train/41875985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStore() { Artifact artifact = new Artifact("test.savant.inversoft.org", "project", "filetype", "2.0", "exe"); testStore(artifact, new UnifiedURIBuilder(), "org/inversoft/savant/test/project/2.0/filetype-2.0.exe"); } COM: <s> tests the storing of the artifact to the local cache </s>
funcom_train/14373496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeNode leafLca(TreeNode that) { if (!isLeaf()) return null; if (!that.isLeaf()) return null; TreeNode current = this; int a = that.getLindex(); if (getLindex() > that.getLindex()) { current = that; a = getLindex(); } for (; current != null; current = current.parent) { if (current.rightmostLeaf.getLindex() >= a) return current; } return null; } COM: <s> compute the lowest common ancestor between this leaf and that the two </s>
funcom_train/8685957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ResourceLocation findMatchingEntry(String publicId) { Enumeration e = getElements().elements(); ResourceLocation element = null; while (e.hasMoreElements()) { Object o = e.nextElement(); if (o instanceof ResourceLocation) { element = (ResourceLocation) o; if (element.getPublicId().equals(publicId)) { return element; } } } return null; } COM: <s> find a resource location instance for the given public id </s>
funcom_train/34896463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasNext() { try { parseNext(); } catch (SvParserException ex) { // it's not appropriate to throw this here, so // we cache it and wait till the user calls // next() to throw it this.ex = ex; return true; } return (null != this.next); } COM: <s> returns true if there are still records left to parse </s>
funcom_train/35027214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(int sleep) throws IOException { if (!isBound) { tcp.bind(lastTCPAddress); udp.bind(lastUDPAddress); } new Thread(thread = new ConnectionRunnable(tcp, udp, sleep)).start(); log.log(Level.INFO, "[{0}][???] Started server.", label); } COM: <s> start this server with given sleep time </s>
funcom_train/1539374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String varsToString() { String s = ""; if ( vars == null ) { return s+"#"+nvar; } for ( int i = 0; i < vars.length; i++ ) { if ( i != 0 ) { s += ", "; } s += vars[i]; } return s; } COM: <s> get a string representation of the variable names </s>
funcom_train/134342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void expandIfNeeded(GlyphI child) { Rectangle2D.Double childbox = child.getCoordBox(); double oldend = getCoordBox().x + getCoordBox().width; double newend = childbox.x + childbox.width; if (childbox.x < getCoordBox().x || newend > oldend) { double newx = Math.min(childbox.x, getCoordBox().x); double newwidth = Math.max(oldend, newend) - newx; setCoords(newx, getCoordBox().y, newwidth, getCoordBox().height); } } COM: <s> expands the alignment glyph if child extends the alignment </s>
funcom_train/35113192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Value booleanValue (String name, final boolean currentValue, final String description) { return new DefaultValue(name, String.valueOf(currentValue)) { public void showDialog () { JCheckBox checkBox = new JCheckBox(); checkBox.setSelected(currentValue); if (showValueDialog(checkBox, description)) value = String.valueOf(checkBox.isSelected()); } public Object getObject () { return Boolean.valueOf(value); } }; } COM: <s> prompts the user for boolean value </s>
funcom_train/5580676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Group getGroup() { String gid; gid = (_group != null) ? _group.getGID() : "0"; _group = new Group(gid, _tname.getText(), _tdescr.getText(), ""); if (_pwd != null) { _group.setPasswd(_pwd); } return _group; } COM: <s> get the displayed group </s>
funcom_train/51631991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleProjectionEnabled() { // http://home.ott.oti.com/teams/wswb/anon/out/vms/index.html // projectionEnabled messages are not always paired with projectionDisabled // i.e. multiple enabled messages may be sent out. // we have to make sure that we disable first when getting an enable // message. handleProjectionDisabled(); if (fEditor instanceof JavaEditor) { initialize(); fElementListener= new ElementChangedListener(); JavaCore.addElementChangedListener(fElementListener); } } COM: <s> called whenever projection is enabled for example when the viewer issues a </s>
funcom_train/9667221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyFromLastWeekButtonActionPerformed(ActionEvent e) { DateTime dt2 = dt.minus(Period.weeks(1)); YearMonthDay ymd = dt2.toYearMonthDay(); String lastMonday = ymd.toString(); acts.copyAllToNextWeek(lastMonday); refreshTables(); } COM: <s> calls the method that opies last weeks activities to this week </s>
funcom_train/1518940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scaleValues(float v1, float v2){ float mult = (v2 - v1) / (this.v2 - this.v1); for(int i = 0; i < points.length; i++){ points[i][1] -= this.v1; points[i][1] *= mult; points[i][1] += v1; } this.v1 = v1; this.v2 = v2; } COM: <s> scales the values of the linear envelope to the specified values </s>
funcom_train/51640517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectionChanged(IWorkbenchPart part, ISelection selection) { if (!needsToProcessSelectionChanged(part, selection)) return; if (selection instanceof IStructuredSelection) { IStructuredSelection sel= (IStructuredSelection)selection; Iterator iter= sel.iterator(); while (iter.hasNext()) { Object selectedElement= iter.next(); if (selectedElement instanceof LogicalPackage) { selection= new StructuredSelection(((LogicalPackage)selectedElement).getJavaProject()); break; } } } super.selectionChanged(part, selection); } COM: <s> handles selection of logical package in packages view </s>
funcom_train/32308524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if(timerStart != -1) stop(); StringBuffer sb = new StringBuffer(); if (timerStart != -1) { sb.append(((System.currentTimeMillis() - timerStart + timeElapsed))); sb.append(" ms"); } else { sb.append(timeElapsed); sb.append(" ms"); } return sb.toString(); } COM: <s> return a string representing the current state of the timer </s>
funcom_train/16914662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean eval(final int value, final int threshold) { LOGGER.debug("eval: " + value + ", " + threshold); if (threshold < 0) { LOGGER.debug(value < Math.abs(threshold)); return value < Math.abs(threshold); } else { LOGGER.debug(value >= Math.abs(threshold)); return value >= threshold; } } COM: <s> evaluates the given value against the provided threshold </s>
funcom_train/9919119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModelviewMatrix(String name) { CGparameter p = CgGL.cgGetNamedParameter(currProgram, name); if (p != null) CgGL.cgGLSetStateMatrixParameter(p, CgGL.CG_GL_MODELVIEW_MATRIX, CgGL.CG_GL_MATRIX_IDENTITY); } COM: <s> copies the modelview matrix from open gl to parameter name in the shader </s>
funcom_train/14329390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_prepareSql() { String fieldName = "prepareSql"; String messageKey = Driver.PREPARESQL; assertDefaultPropertyByServerType(URL_SQLSERVER, messageKey, fieldName, DefaultProperties.PREPARE_SQLSERVER); if (!isOnlySqlServerTests()) { assertDefaultPropertyByServerType(URL_SYBASE, messageKey, fieldName, DefaultProperties.PREPARE_SYBASE); } } COM: <s> test the code prepare sql code property </s>
funcom_train/34265140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setList(FlywheelWorkspace[] p_List) { this.setColumnIdentifiers(this.buildColumnHeaderLabels()); if((p_List.length / MAX_ROW_COUNT) < 2) { this.setColumnCount(2);} else { this.setColumnCount(((p_List.length / MAX_ROW_COUNT) * 2) + 1); } this.setRowCount(p_List.length); this.buildTableValues(p_List); } COM: <s> sets up the table model with a list passed in </s>
funcom_train/19035707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String generateRandomString(int size) { StringBuffer buffer = new StringBuffer(); for(int i = 0; i < size; i++) { char character; do { character = (char)(128 * Math.random()); } while(!Character.isLetter(character)); buffer.append(character); } return buffer.toString(); } COM: <s> generates a random string code </s>
funcom_train/28740929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StatusInfo getStatusInfoById(Integer id) throws SimsException { //String errMsg = clsName + ".getStatusInfoById(): "; StatusLocal local; StatusInfo info; try { local = this.getStatusLocalById(id); info = local.getStatusInfo(); } catch (RuntimeException e) { //Propagate. throw e; } return info; } COM: <s> get status info object by id </s>
funcom_train/10655810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AttributeSet getFilledAttributeSet() { AttributeSet as = context.getEmptySet(); context.addAttribute(as, "key", "value"); context.addAttribute(as, "key1", "value1"); context.addAttribute(as, "key2", "value2"); return as; } COM: <s> returns non empty attribute set </s>
funcom_train/1150094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand19() { if (backCommand19 == null) {//GEN-END:|254-getter|0|254-preInit // write pre-init user code here backCommand19 = new Command("Back", Command.BACK, 0);//GEN-LINE:|254-getter|1|254-postInit // write post-init user code here }//GEN-BEGIN:|254-getter|2| return backCommand19; } COM: <s> returns an initiliazed instance of back command19 component </s>
funcom_train/24121686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(InputStream in) throws IOException { // Assize size and record type have already been read this.style = WMFConstants.readLittleEndianShort(in); this.colorUsage = WMFConstants.readLittleEndianShort(in); this.target = new DIBitmap(in, this.colorUsage); } COM: <s> reads the content of the record from a stream </s>
funcom_train/28592240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ensureCapacity(int newSize) { int newCap = array.length; if (newCap < newSize) { while (newCap < newSize) { newCap *= 2; } Object[] newArray = new Object[newCap]; System.arraycopy(array, 0, newArray, 0, size); array = newArray; } return; } COM: <s> expands the capacity to handle up to size elements </s>
funcom_train/50516211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void suppress(DataType output, int priority) { if (mCurrentInput == null) mCurrentInput = new hazard.util.PriorityList(); Filter data = new Filter(SUPPRESS, output, priority); if (mCurrentInput.contains(data)) mCurrentInput.remove(data); if (output != null){ if (output.getData() != null) mCurrentInput.add(data); } } COM: <s> suppresses the current input with a certain output </s>
funcom_train/15716693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(final ActionEvent e) { int currentBar = 0; for (Iterator i = this.bars.keySet().iterator(); i.hasNext();) { String barName = (String) i.next(); BarInfo barInfo = (BarInfo) this.bars.get(barName); if (barInfo.getButton() == e.getSource()) { // Found the selected button this.visibleBar = currentBar; render(); return; } currentBar++; } } COM: <s> invoked when one of our bars is selected </s>
funcom_train/45547380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IoState write(GatheringByteChannel out) throws IOException { IoState exitState; synchronized (lock()) { if (responseHeaders == null) exitState = IoState.DONE; else { out.write(responseHeaders); if (BufferUtil.INSTANCE.hasRemaining(responseHeaders)) exitState = IoState.WRITING; else { responseHeaders = null; exitState = IoState.DONE; } } } return exitState; } COM: <s> writes the http headers </s>
funcom_train/13271533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArcExtent(Float arcExtent) { if (arcExtent != this.arcExtent || (arcExtent != null && !arcExtent.equals(this.arcExtent))) { Float oldArcExtent = this.arcExtent; this.arcExtent = arcExtent; clearPointsCache(); this.propertyChangeSupport.firePropertyChange(Property.ARC_EXTENT.name(), oldArcExtent, arcExtent); } } COM: <s> sets the arc extent of a round wall </s>
funcom_train/5381761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IProgressMonitor monitorFor(IProgressMonitor monitor) { if (monitor == null || (monitor instanceof NullProgressMonitor)) { if (progressProvider != null) { try { monitor = progressProvider.getDefaultMonitor(); } catch (Exception e) { String msg = NLS.bind(Messages.meta_pluginProblems, Platform.PI_RUNTIME); InternalPlatform.getDefault().log(new Status(IStatus.ERROR, Platform.PI_RUNTIME, Platform.PLUGIN_ERROR, msg, e)); } } } return Policy.monitorFor(monitor); } COM: <s> returns a non null progress monitor instance </s>
funcom_train/22054741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { if (m_fReading == false) { Misc.debug(this, "Overridden close has been called to cache data first"); if (m_iCurrentMode == FILE_MODE_CACHED_BINARY) { writeCacheToFile(); } } super.close(); // Call superclass to do normal behaviour as well. } COM: <s> override the close operation to flush cache prior to closing </s>
funcom_train/12156963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doTest(String mode) throws IOException, ServletException { //create the context servletContext = new ServletContextMock("servletContext", expectations); boolean isNone = mode.equals("none"); /** * send the first request */ CachingXDIMERequestProcessor requestProcessor = firstRequest(isNone, mode); /** * send the second request */ secondRequest(isNone, requestProcessor); } COM: <s> do the tests by processing the same request twice </s>
funcom_train/14060059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFeature(final String name, final boolean value) { if (value) { this.m_features.add(name); } else { this.m_features.remove(name); } if (this.m_parent != null) { try { this.m_parent.setFeature(name, value); } catch (final Throwable e) { this.m_eh.handleError(e); } } } COM: <s> set the value of a feature flag </s>
funcom_train/236435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ManagerResponse zapDialOffHook(String zapChannel, String number) { log.fine("zapDialOffHook(" + zapChannel + "," + number + ")"); ManagerAction action = new ManagerAction("ZapDialOffHook"); action.addPair("ZapChannel", zapChannel); action.addPair("Number", number); ManagerResponse response = send(action); log.fine("zapDialOffHook() response:\n" + response); return response; } COM: <s> dial over zap channel while offhook </s>
funcom_train/26662348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLocal() { try { Boolean b = (Boolean) server.getAttribute(mwlScuServiceName, "Local"); return b.booleanValue(); } catch (Exception x) { log.error("Exception occured in isLocal: " + x.getMessage(), x); } return false; } COM: <s> checks if the mwl scp aet is local </s>
funcom_train/10598844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRootElement(String element, String namespace, String prefix) { this.rootElement = new Element(element, namespace, prefix); if (getLogger().isDebugEnabled()) { getLogger().debug("Root element='" + element + "' ns='" + namespace + "' prefix='" + prefix + "'"); } } COM: <s> set the root element </s>
funcom_train/32830322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int executeUpdate(String sql, Object... args) { logger.debug(sql); try { SimpleJdbcTemplate simpleJdbcTemplate = getSimpleJdbcTemplate(); return simpleJdbcTemplate.update(sql, args); } catch (Exception e) { throw new UnitilsException("Unable to execute statement: '" + sql + "'.", e); } } COM: <s> executes the given update statement </s>
funcom_train/48559206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand() { if (cancelCommand == null) {//GEN-END:|321-getter|0|321-preInit cancelCommand = new Command("\u041E\u0442\u043C\u0435\u043D\u0430", Command.CANCEL, 0);//GEN-LINE:|321-getter|1|321-postInit }//GEN-BEGIN:|321-getter|2| return cancelCommand; } COM: <s> returns an initiliazed instance of cancel command component </s>
funcom_train/36193924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FloatBuffer init(ArrayList<Float> arr) { if (arr.size() > 0) { FloatBuffer tmp = BufferUtil.newFloatBuffer(arr.size()); for (Float e : arr) { tmp.put(e); } tmp.rewind(); return tmp; } return null; } COM: <s> initialisation of a float buffer with vertex3f coordinates </s>
funcom_train/39367588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void arrayCopyFloatToShort(int numSamples, float[] traceIn, short[] traceOut) { float value; for(int i = 0; i < numSamples; i++) { value = traceIn[i]; value = Math.min(value, CLIPPING_MAX_INT16); value = Math.max(value, CLIPPING_MIN_INT16); traceOut[i] = (short)value; } } COM: <s> copies trac edata from byte array to float array </s>
funcom_train/36189577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onEntry(Object pojo, Method method, Object[] args) { if (m_usage != null) { PSSUsage usage = (PSSUsage) m_usage.get(); if (usage.m_stack > 0) { usage.inc(); m_usage.set(usage); // Set the Thread local as value has been modified } } } COM: <s> a psspojo method will be invoked </s>
funcom_train/48045901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matchesCalendrical(Calendrical calendrical) { ISOChronology.checkNotNull(calendrical, "Calendrical must not be null"); for (DateTimeField field : fields) { DateTimeField calField = field.getRule().getValue(calendrical); if (calField != null && calField.equals(field) == false) { return false; } } return true; } COM: <s> checks if the fields in this object match those in the specified calendrical </s>
funcom_train/20766700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInitialized() { ArrayList<Pot> pots = getPotArray().getPots(); if (getNumPots() == 0) { return true; } for (Pot p : pots) { if (p.getBitValue() != 0) { return true; } } return false; } COM: <s> checks for unitialized biases no non zero preference values </s>
funcom_train/20634387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDropTempTableIndexes(Statement stmt, boolean create, int index) throws SQLException { String statement = null; if (create) { statement = dao.getStatement(DTS_LOCAL_BACKUP_TABLE, CREATE_INDEX + index); } else { statement = dao.getStatement(DTS_LOCAL_BACKUP_TABLE, DROP_INDEX + index); } statement = replaceVarHolders(statement); stmt.executeUpdate(statement); } COM: <s> create or drop indexes on the repair table </s>
funcom_train/25859597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean search() { search = new DepthFirstSearchWithoutPrintingSolution(); long t1=System.currentTimeMillis(); SelectChoicePoint select = new SimpleSelect(vars.toArray(new Variable[1]), new MostConstrainedStatic(), new IndomainMin()); search.getSolutionListener().searchAll(true); search.getSolutionListener().recordSolutions(true); boolean result = search.labeling(store, select); long t2=System.currentTimeMillis(); time=t2-t1; if (!result) solution=false; return result; } COM: <s> it specifies simple search method based variable order which </s>
funcom_train/3272866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void acknowledgeActions() throws Exception { // Return whether or not the current player should // start his turn. if(listeningForActions){ xmlParser.acknowledgeActions(); // Chop off the first turn's worth of replay // for PlayByEmail and HotSeat. if(transmitWorldDataAfterNextTurnBlock){ transmitWorldDataAfterNextTurnBlock = false; // Stream World Objects to Xml resetWriter(); startElement(GAME_TAG); players.ToXml(this); world.ToXml(this); endElement(); transmitWorldData(); } } } COM: <s> acknowledge the action block just read </s>
funcom_train/17850875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isValid() { String test = ""; if(mNewSearchText != null) { test = mNewSearchText.replaceAll("\\*+","\\*").trim(); } return test.length() > 0 && !test.equals("DUMMY-ENTRY") && !test.equals("*"); } COM: <s> gets if this table entry has a valid search text </s>
funcom_train/27835226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector getDataCopy() { Vector newVector = new Vector(); for (int i = 0; i < getRowCount(); i++) { Vector tmpVector = new Vector(); for (int j = 0; j < getColumnCount(); j++) { tmpVector.addElement(getValueAt(i, j)); } newVector.addElement(tmpVector); } return newVector; } COM: <s> makes a copy of the current values shown in the table </s>
funcom_train/3380372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doDeleteEntry(String alias) throws Exception { if (keyStore.containsAlias(alias) == false) { MessageFormat form = new MessageFormat (rb.getString("Alias <alias> does not exist")); Object[] source = {alias}; throw new Exception(form.format(source)); } keyStore.deleteEntry(alias); } COM: <s> deletes an entry from the keystore </s>
funcom_train/4519260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RButton getRButton31117() { if (RButton31117 == null) { RButton31117 = new RButton(2); RButton31117.setText("EachCell"); RButton31117.setBounds(new Rectangle(550, 500, 120, 30)); RButton31117.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { (new TestEachCellTable()).setVisible(true); } }); } return RButton31117; } COM: <s> this method initializes rbutton31117 </s>
funcom_train/42045427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rollback() throws RimuDBException { // Clear the batches on the prepared statements, and close the statements if (statementQueue.size() > 0) { try { while (statementQueue.size() > 0) { BatchEntry batchEntry = statementQueue.remove(); PreparedStatement ps = batchEntry.getPreparedStatement(); ps.clearBatch(); ps.close(); } } catch (SQLException e) {} } // rollback the transaction try { getConnection().rollback(); } catch (SQLException e) { throw new RimuDBException(e, getClass().getName()); } } COM: <s> rollback the session </s>
funcom_train/15719138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQuality() { if(mQuality != null && mQuality.trim().length() > 0) { return mQuality; } else if(WtvcgScheduler2Settings.getInstance().getQualities().length > 0) { return WtvcgScheduler2Settings.getInstance().getQualities()[0]; } return null; } COM: <s> gets the available quality for this profile </s>
funcom_train/19088279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeSymbolTable(Map map, Node mnode) { NamedNodeMap aList = mnode.getAttributes(); if (aList != null) { Attr idAttr = (Attr) aList.getNamedItem("id"); if (idAttr != null) { map.put(idAttr.getValue(), mnode); } } for (Node kid = mnode.getFirstChild(); kid != null; kid = kid.getNextSibling()) { makeSymbolTable(map, kid); } } COM: <s> this default implementation will look for any id </s>
funcom_train/26658084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CodeToDeviceMapping lookupMapper() throws HomeFactoryException, RemoteException, CreateException { if ( mapper == null ) { CodeToDeviceMappingHome home = (CodeToDeviceMappingHome) EJBHomeFactory .getFactory().lookup(CodeToDeviceMappingHome.class, CodeToDeviceMappingHome.JNDI_NAME); mapper = home.create(); } return mapper; } COM: <s> returns the code to device mapping session bean </s>
funcom_train/7336617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendSelect(String id, String onclick, List values, List texts, String selValue, boolean state) { html.append(HtmlContentTools.select(id, onclick, null, values, texts, selValue, state, "")); } COM: <s> create a dropdown box with height 1 </s>
funcom_train/21847678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setDot() { JTextComponent c = getComponent(); if (c != null) { if (Utilities.getLastActiveComponent() != c) { Utilities.requestFocus(c); // possibly request for the component } int pos = getPosition(); if (pos >= 0 && pos <= c.getDocument().getLength()) { c.getCaret().setDot(pos); // set the dot return true; } } return false; } COM: <s> set the dot to the component and position stored in the mark </s>
funcom_train/27786494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date toDate(TradingTime time) { Calendar calendar = toCalendar(); calendar.set(Calendar.HOUR_OF_DAY, time.getHour()); calendar.set(Calendar.MINUTE, time.getMinute()); calendar.set(Calendar.SECOND, time.getSecond()); return calendar.getTime(); } COM: <s> convert this object and a </s>
funcom_train/50314301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add (int x, int y, int width, int height) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); try { lockToolkit(); long rectRgn = Fox.FXRegion_new(x, y, width, height); Fox.FXRegion_union(handle, rectRgn); Fox.FXRegion_delete(rectRgn); } finally { unlockToolkit(); } } COM: <s> adds the given rectangle to the collection of polygons </s>
funcom_train/5547736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (!object.getClass().equals(getClass())) { return false; } if (((RPermission)object).resource.equals(resource)) { return true; } Set comparedPropertyAndObjectSet = ((RPermission)object).propertyAndObjectSet; return propertyAndObjectSet.equals(comparedPropertyAndObjectSet); } COM: <s> two mies permission are same if and only all the attribute of </s>
funcom_train/35502084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParameterNames() { StringBuffer buff = new StringBuffer(""); Iterator<Parameter> params = getParameters().iterator(); while (params.hasNext()) { Parameter param = params.next(); buff.append(param.getName()); if (params.hasNext()) { buff.append(", "); } } return buff.toString(); } COM: <s> get a string consisting of all of this operations parameter names </s>
funcom_train/34263022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildRenameButton() { this.renameButton = FmsButtonFactory.createRenameButtonNoCallback(); // this.renameButton.addActionListener(FlywheelWorkspaceRenameBuilder().getInstance().getHandler()); this.getSouthPanel().add(this.renameButton, 1); renameButton.setEnabled(false); // TODO temp until bug is fixed } COM: <s> build rename button </s>
funcom_train/2642454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove() { if (_expectedSize != _hash.size()) { throw new ConcurrentModificationException(); } // Disable auto compaction during the remove. This is a workaround for bug 1642768. try { _hash.tempDisableAutoCompaction(); _hash.removeAt(_index); } finally { _hash.reenableAutoCompaction( false ); } _expectedSize--; } COM: <s> removes the last entry returned by the iterator </s>
funcom_train/43098544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPredecessor(Object handle, Object predecessor) { if (handle != null && handle instanceof MMessage && predecessor != null && predecessor instanceof MMessage) { ((MMessage) handle).addPredecessor((MMessage) predecessor); return; } throw new IllegalArgumentException( "handle: " + handle + " or predecessor: " + predecessor); } COM: <s> adds a predecessor to a message </s>
funcom_train/51682312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toSql() { StringBuilder sb = new StringBuilder(); sb.append("UPDATE host_table SET response_time='"); sb.append(responseTime); sb.append("' WHERE host='"); sb.append(hostId); sb.append("';"); return sb.toString(); } COM: <s> generate a sql update for this ping result </s>
funcom_train/19052245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float gain(float f, float gain) { float p = (float)Math.log(1.0 - gain) / (float)Math.log(0.5); if (f < .001) return 0.0f; else if (f > .999) return 1.0f; if (f < 0.5) return (float)Math.pow(2 * f, p) / 2; else return 1.0f - (float)Math.pow(2 * (1. - f), p) / 2; } COM: <s> calculate gain value for pixel value value in 0 1 range </s>
funcom_train/43327233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void save(String filename) { try { PrintfStream outfile = new PrintfStream(filename); int i,j; for (i=0; i<4; i++) for (j=0; j<4; j++) { if (histograms[i][j]==null) { DMatrix dummy = new DMatrix(histograms[0][0].cols(), histograms[0][0].rows()); dummy.save(outfile); dummy = null; } else histograms[i][j].save(outfile); } outfile.close(); } catch (IOException e) { JMC.fatal("Error saving histograms to file "+filename); } } COM: <s> save histograms from a file </s>
funcom_train/1379493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(2); gridLayout.setColumns(1); jPanel = new JPanel(); jPanel.setLayout(gridLayout); jPanel.add(getPnlFiltro(), null); jPanel.add(getPnlDate(), null); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/22093850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getHeaderValue(Vector httpHeaders, String name) { for (int i=0; i<httpHeaders.size(); i++) { HttpHeader h = (HttpHeader)httpHeaders.elementAt(i); if (h.getName().equalsIgnoreCase(name)) { return h.getValue(); } } return null; } COM: <s> gets the value of a http header from a vector of http headers </s>
funcom_train/42342577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder sb = new StringBuilder(); sb.append("[id=" + pID + ",len=" + pLength + ",data=0x"); for(int x = 0; x < pLength; x++) { sb.append(byteToHex(pData[x], true)); } sb.append("]"); return sb.toString(); } COM: <s> returns this packet in string form </s>
funcom_train/10280736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedRow(int pRow) { KFeedTableModel lModel = (KFeedTableModel) mFeedTable.getModel(); int lViewRow = lModel.mapRowIndexToTable(pRow); mFeedTable.setSelection(0, lViewRow, true); } COM: <s> select a row </s>
funcom_train/41503891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resumeThread(MiniThread thread) { // TODO: Implement MiniScheduler::resumeThread() int state = thread.getThreadState(); switch (state) { case MiniThread.THREAD_SUSPENDED_BLOCKED: thread.setThreadState(MiniThread.THREAD_BLOCKED); blockedQueue.put(thread.getTid(), suspendedQueue.remove(thread .getTid())); break; case MiniThread.THREAD_SUSPENDED_READY: thread.setThreadState(MiniThread.THREAD_READY); readyQueue.append(suspendedQueue.remove(thread.getTid())); break; default: break; } } COM: <s> b un implemented b invoked when the user chooses to resume either the </s>
funcom_train/9880262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayScrollPane(JPanel panel){ Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); resultFrame = new JDialog(mainFrame, "Results from Weka", false); resultFrame.getContentPane().add(panel); resultFrame.pack(); resultFrame.setLocation( (screenSize.width-panel.getSize().width)/2, (screenSize.height-panel.getSize().height)/2 ); resultFrame.setVisible(true); } COM: <s> window that allows iteration over bootstrap network </s>
funcom_train/22286591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findStyle(int pos) { int hi = this.nstyles - 1; int lo = 0; if (hi == 0) return 0; while (hi - lo > 1) { int mid = (hi + lo) / 2; int val = positions[mid]; if (val < pos) lo = mid; else if (val >= pos) hi = mid; } return (positions[lo] >= pos) ? lo : lo + 1; } COM: <s> returns the index of the first style whose position is to </s>
funcom_train/18104573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMute(boolean mute) { if (mute && !this.mute) { doSetLevel(0); this.mute = true; sendEvent(PlayerListener.VOLUME_CHANGED, this); } else if (!mute && this.mute) { this.level = doSetLevel(level); this.mute = false; sendEvent(PlayerListener.VOLUME_CHANGED, this); } } COM: <s> set player mute </s>
funcom_train/3332469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeDefaults() { // done in plugin class /* IPreferenceStore store = getPreferenceStore(); store.setDefault(P_CHOICE_SCOPE, SCOPE_WORKSPACE); store.setDefault(P_CHOICE_MULTIPLE, MULTIPLE_ADDMULTIPLE); store.setDefault(P_CHOICE_SELECTION, SELECTION_KEEPALL); store.setDefault(P_CHOICE_DELETE, DELETE_MATCH); store.setDefault(P_STRING_MARKERNAME, "Quickmark "); */ } COM: <s> sets the default values of the preferences </s>
funcom_train/19318452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() throws JMSException { try { if(dos != null) { dos.flush(); dis = new DataInputStream(new ByteArrayInputStream(baos.toByteArray())); setBodyModifiable(false); } } catch(IOException e) { throw new JMSException("Can't reset message " + e.getMessage()); } } COM: <s> puts the message body in read only mode and repositions the stream of </s>
funcom_train/40933612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PoleCorrection nutationCorrection(final AbsoluteDate date) { /* * This factor seems to be of order of magnitude a few tens of * micro arcseconds. It is computed from the classical * approach (not the new one used here) and hence requires * computation of GST, IAU2000A nutation, equations of * equinox, ..., et al.. * * For now, this term is ignored */ return PoleCorrection.NULL_CORRECTION; } COM: <s> compute nutation correction due to tidal gravity </s>
funcom_train/26201847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printUserHeaderFooter(boolean header) { em(); if (header) { print(replaceDocRootDir(Standard.configuration().header)); } else { if (Standard.configuration().footer.length() != 0) { print(replaceDocRootDir(Standard.configuration().footer)); } else { print(replaceDocRootDir(Standard.configuration().header)); } } emEnd(); } COM: <s> print user specified header and the footer </s>
funcom_train/36489634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendUsers() throws IOException, ClassNotFoundException, BadLocationException { oc = ObservableConnections.getInstance(); ArrayList<String> loggedUsers = oc.getLoggedInUsers(); for (int i = 0; i < loggedUsers.size(); i++ ) { oos.writeObject(loggedUsers.get(i)); } oos.writeObject(new String("END")); } COM: <s> function called when the server receives users which as the name suggests </s>
funcom_train/638297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SimpleInstance getNextNonTeamAnnotation() { logger.debug(""); if (selectedAnnotation != null) { List<SimpleInstance> frameAnnotations = getCurrentFilteredAnnotations(); boolean selectedAnnotationFound = false; for( SimpleInstance annotation : frameAnnotations ) { if( annotation.equals( selectedAnnotation ) ) { selectedAnnotationFound = true; } if( selectedAnnotationFound ) { if( !isTeamAnnotation( annotation ) ) { return annotation; } } } if (frameAnnotations.size() > 0) { return frameAnnotations.get(0); } } return selectedAnnotation; } COM: <s> retrieves the next non team annotation after the currently selected annotation </s>
funcom_train/25484770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getPrimaryKey() { ArrayList primaryKey = new ArrayList(); Iterator itRoles = fRoles.iterator(); while(itRoles.hasNext()) { Role role = ((Role)itRoles.next()); primaryKey.addAll(role.getEntity().getPrimaryKey()); } return primaryKey; } COM: <s> returns the primary key of the relationship </s>
funcom_train/51102672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shallowMerge(Object from, Object to) throws PropertyAccessException { // do super first if (getSuperclassDescriptor() != null) { getSuperclassDescriptor().shallowMerge(from, to); } Iterator it = declaredProperties.values().iterator(); while (it.hasNext()) { Property property = (Property) it.next(); property.shallowMerge(from, to); } } COM: <s> copies object properties from one object to another </s>
funcom_train/13443011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Chord getChord(int index) { Beat b = new Beat(); ChordDef cd = new ChordDef(); Chord c = new Chord(b, cd); try { c = theArray.get(index); } catch (ArrayIndexOutOfBoundsException e) { System.out.println("Invalid index!!"); } return c; } COM: <s> get the chord at index </s>
funcom_train/37422565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPresent(long pId, Vector pVct) { long tIdUser; for (int i=0; i<pVct.size(); i++) { tIdUser = ((User) pVct.get(i)).getIdUser(); if (tIdUser == pId) { return true; } } return false; } COM: <s> checks if the user is present in the vector </s>
funcom_train/5368543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllElements() { if( objects.size() > 0 ) { int firstIndex = 0; int lastIndex = objects.size() - 1; objects.clear(); selectedObject = null; fireIntervalRemoved( this, firstIndex, lastIndex ); } else { selectedObject = null; } } COM: <s> empties the list </s>
funcom_train/39911885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEh5() { System.out.println("getEh5"); Page1 instance = new Page1(); TextField expResult = null; TextField result = instance.getEh5(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get eh5 method of class timesheetmanagement </s>
funcom_train/37649407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Button buildCPDLauncherButton(Composite parent) { Button button = new Button(parent, SWT.PUSH | SWT.LEFT); button.setText("Launch CPD..."); button.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { new Thread(new Runnable() { public void run() { GUI.main(new String[] { "-noexitonclose" }); } }).start(); } }); return button; } COM: <s> build the cpd launcher button </s>