__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/14589066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void swap (Entry a, Entry b) { int aListIndex = a.listIndex; int aRowIndex = a.rowIndex; a.listIndex = b.listIndex; a.rowIndex = b.rowIndex; b.listIndex = aListIndex; b.rowIndex = aRowIndex; mQueue.set(a.listIndex, a); mQueue.set(b.listIndex, b); } COM: <s> swap two entry objects in the list updating </s>
funcom_train/16380450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateTriesType_Min(int triesType, DiagnosticChain diagnostics, Map<Object, Object> context) { boolean result = triesType >= TRIES_TYPE__MIN__VALUE; if (!result && diagnostics != null) reportMinViolation(CTEPackage.Literals.TRIES_TYPE, new Integer(triesType), new Integer(TRIES_TYPE__MIN__VALUE), true, diagnostics, context); return result; } COM: <s> validates the min constraint of em tries type em </s>
funcom_train/25870952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteFavouriteStop(final String stopCode) { if(stopCode == null || stopCode.length() == 0) return; if(!getFavouriteStopExists(stopCode)) return; SQLiteDatabase db = getWritableDatabase(); db.delete(FAVOURITE_STOPS_TABLE, FAVOURITE_STOPS_STOPCODE + " = " + stopCode, null); } COM: <s> delete a favourite stop from the database </s>
funcom_train/25342471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getListenersAt(long time) { Entry best = null; for (Entry entry : this.entries) { if (entry.getTime() < time) { if (best == null || best.getTime() < entry.getTime()) { best = entry; } } } return best != null ? best.getNumberOfListeners() : -1; } COM: <s> gets the number of listeners at a specified time </s>
funcom_train/3813818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndTime(int endTime) { if (getBeginTime() > endTime) { throw new Error("Attempting to set an end time (" + endTime + ") that is earlier than the start time (" + getBeginTime() + ")."); } this.endTime = endTime; } COM: <s> sets the frame number when the words ended </s>
funcom_train/16748155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StringLiteral resolveInfixExpression(InfixExpression infixExpression) { Expression left = infixExpression.getLeftOperand(); if (left instanceof StringLiteral) return (StringLiteral) left; else if (left instanceof InfixExpression) resolveInfixExpression ((InfixExpression) left); Expression right = infixExpression.getRightOperand(); if (right instanceof StringLiteral) return (StringLiteral) right; else if (right instanceof InfixExpression) resolveInfixExpression ((InfixExpression) right); return null; } COM: <s> this method resolves a given infix expression </s>
funcom_train/18808038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDateConstructor1() { final TimeZone zone = TimeZone.getTimeZone("GMT"); final Quarter q1 = new Quarter(new Date(1017619199999L), zone); final Quarter q2 = new Quarter(new Date(1017619200000L), zone); assertEquals(1, q1.getQuarter()); assertEquals(1017619199999L, q1.getLastMillisecond(zone)); assertEquals(2, q2.getQuarter()); assertEquals(1017619200000L, q2.getFirstMillisecond(zone)); } COM: <s> in gmt the end of q1 2002 is java </s>
funcom_train/18141431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateStatus() { // check whether valid PointInTime value = getValue(); if (value==null) { // show 'X' on disabled button widgetCalendar.setEnabled(false); widgetCalendar.setIcon(MetaProperty.IMG_ERROR); } else { // show current calendar on enabled button widgetCalendar.setEnabled(true); widgetCalendar.setIcon(calendar.getImage()); } } COM: <s> update the status icon </s>
funcom_train/44011347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsAlreadyInDB() { System.out.println("isAlreadyInDB"); CouponBO instance = new CouponBO(); boolean expResult = true; boolean result = instance.isAlreadyInDB(); 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 is already in db method of class edu </s>
funcom_train/20042825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _getSelectedItemPos() { requiredMethod("addItems()") ; boolean result = true ; oObj.selectItemPos((short)1, true) ; short pos = oObj.getSelectedItemPos() ; result = pos == 1 ; tRes.tested("getSelectedItemPos()", result) ; } COM: <s> selects some item and gets selected item position </s>
funcom_train/4521169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(RegistroLinea entity) { LogUtil.log("saving RegistroLinea instance", Level.INFO, null); try { entityManager.persist(entity); LogUtil.log("save successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved registro linea entity </s>
funcom_train/4425119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertExecution(String expected, String name) { Nameable entity = generateCode(name); Assert.assertNotNull("expected parsing, validation, and code " + "generation to be correct for " + name, entity); TestInterpreter interpreter = new TestInterpreter((Actor) entity, null); interpreter.initialize(); interpreter.schedule(); String output = interpreter.getOutput(); Assert.assertEquals("expected " + expected + ", got " + output, expected, output); } COM: <s> parses validates compiles and interprets the actor defined in the file </s>
funcom_train/10628294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBitLengthPositive2() { byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; BigInteger aNumber = new BigInteger(aSign, aBytes); assertEquals(96, aNumber.bitLength()); } COM: <s> bit length of a positive number with the leftmost bit set </s>
funcom_train/25875616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deletePassword(){ Dialog about = new AlertDialog.Builder(this) .setIcon(R.drawable.passicon) .setTitle(R.string.dialog_delete_password_title) .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { deletePassword2(); } }) .setNegativeButton(R.string.no, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { // do nothing } }) .setMessage(R.string.dialog_delete_password_msg) .create(); about.show(); } COM: <s> prompt the user with a dialog asking them if they really want </s>
funcom_train/1068799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getTextToDisplay() { String stereotypes = ""; if(parentEditPart!=null){ if(parentEditPart.getGraphEdge().getSemanticModel().getPresentation().equals(ModelerHelper.STEREOTYPE_TEXT_VERTICAL_PRESENTATION)) { stereotypes = parentEditPart.verticalStereotypesToDisplay(); } else { stereotypes = parentEditPart.horizontalStereotypesToDisplay(); } if(stereotypes!=""){//stereotype exists return PapyrusPlugin.ST_LEFT+stereotypes+PapyrusPlugin.ST_RIGHT; } } return ""; } COM: <s> returns the string to be displayed in the label </s>
funcom_train/22204796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeName(BaseName name) { if (staticallyMerged()) { ((OzoneTopic) m_baseTopic).removeName(name); } ArrayList oldNames = new ArrayList(m_names); m_names.remove(name); name.removePropertyChangeListener(this); firePropertyChange("names", oldNames, m_names); } COM: <s> internal method invoked when base name </s>
funcom_train/35847256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleSettingsTabRefresh() { // loadPosition(prpTodo, TabToDo.class); // loadPosition(prpProperties, TabProps.class); // loadPosition(prpDocumentation, TabDocumentation.class); // loadPosition(prpStyle, TabStyle.class); // loadPosition(prpSource, TabSrc.class); // loadPosition(prpConstraints, TabConstraints.class); // loadPosition(prpTaggedValues, TabTaggedValues.class); } COM: <s> when the setting values should be reloaded </s>
funcom_train/9547631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object createInstance(String className, String staticMethod) throws ConfigurationException { try { Class forName = Class.forName(className); Object component; if (staticMethod == null) component = forName.newInstance(); else component = forName.getDeclaredMethod(staticMethod, new Class[0]).invoke(null, new Object[0]); return component; } catch (Exception e) { log.error(e); throw new ConfigurationException("Failed to create configurable " + className, e); } } COM: <s> create an instance via the reflection of a class by using the given </s>
funcom_train/38289486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List loadClassNames() { List result = new Vector(); int index = 0; String key, className; do { className = null; key = CLASS_TO_DEBUG + (index++); if (store.contains(key)) { className = store.getString(key); result.add(className); } } while (className != null); lastClassIndex = index-1; return result; } COM: <s> seeks given preference store for figure classes which should be configured </s>
funcom_train/7232630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone () { final CPNTransitionFigure clone = (CPNTransitionFigure) super.clone(); clone.setNetElement(new Transition()); clone.name = new CPNNameFigure (clone); clone.name.moveBy(-25,-25); clone.guard = new CPNAnnotationFigure (CPNAnnotationFigure.TRANSITION_GUARD, clone); clone.guard.moveBy(10,-8); clone.action = new CPNAnnotationFigure (CPNAnnotationFigure.ACTION, clone); clone.action.moveBy (-10,-8); return clone; } COM: <s> clones this get transition </s>
funcom_train/14099111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean listDeleteItem (Node deleteMe) { if (deleteMe == null) { return false; } // search to make sure no duplicate node is inserted Node_LinkedList target = findAdjacent(deleteMe) ; if (target == null) { // the node was not found, abort the insert return false; } // still here, delete the node from the adjacency list target.deleteMe(); return true; } COM: <s> searches the adjacency list for the target node </s>
funcom_train/40443655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { long bits = 1L; bits = 31L * bits + VecMathUtil.floatToIntBits(x); bits = 31L * bits + VecMathUtil.floatToIntBits(y); bits = 31L * bits + VecMathUtil.floatToIntBits(z); bits = 31L * bits + VecMathUtil.floatToIntBits(w); return (int) (bits ^ (bits >> 32)); } COM: <s> returns a hash code value based on the data values in this object </s>
funcom_train/27829380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendYearEndReport(boolean stopped, String[] titles, int year, float[] yearvalues){ writeln(yearOpenTag + "-- END OF " + year + " " + (stopped ? "stopped" : "") + "--" + closeTag); for (int i = 0; i < titles.length; i++) { writeln(traderOpenTag + titles[i] + closeTag + ": " + _nf.format(yearvalues[i])); } } COM: <s> append year end report to market output </s>
funcom_train/33758284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(getPainelControlePanel(), null); jContentPane.add(getClientePanel(), null); jContentPane.add(getFecharButton(), null); jContentPane.add(getLogPanel(), null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/31557710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String saveSingleSample(Sample exportee, String format) { // use the default title... String etext = ""; if (exportee.meta.get("filename") != null) { File oldfile = new File((String) exportee.meta .get("filename")); etext = " (" + oldfile.getName() + ")"; } String title = I18n.getText("export") + etext; return saveSingleSample(exportee, format, title); } COM: <s> save a single sample </s>
funcom_train/19718621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int indexOfInternalNode (InternalNode [] nodes, InternalNode nodeToFind) { for (int i = 0; i < nodes.length; i++) { InternalNode node = nodes[i]; if (node.equals(nodeToFind)) { return i; } } throw new RuntimeException("Couldn't find index of internal node: " + nodeToFind); } COM: <s> note use this as little as possible </s>
funcom_train/9700543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeModifiers(IGeneratedJavaClassBuilder modelB) { if (page0.isAbstract()){ modelB.isAbstract(true); } else { modelB.isAbstract(false); } if (page0.isFinal()){ modelB.isFinal(true); } else { modelB.isFinal(false); } if (page0.isPublic()){ modelB.visibility(EVisibility.PUBLIC); } else if (page0.isPackage()){ modelB.visibility(EVisibility.DEFAULT); } else if (page0.isProtected()){ modelB.visibility(EVisibility.PROTECTED); } else { modelB.visibility(EVisibility.PRIVATE); } } COM: <s> initialize the modifiers </s>
funcom_train/36678738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Player getPlayerByName(String playerName) { Player result = null; for (Player p : players) { if (p.getName().equals(playerName)) { result = p; } } if (result == null) { throw new IllegalArgumentException("Unknown Player name: " + playerName + " available players:" + players); } else { return result; } } COM: <s> get a player by name </s>
funcom_train/44508606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bind(final String name, final Object object) throws NamingException { if (log.isDebugEnabled()) { log.debug("Binding JNDI object with name [" + name + "]"); } execute(new JndiCallback() { public Object doInContext(Context ctx) throws NamingException { ctx.bind(name, object); return null; } }); } COM: <s> bind the given object to the current jndi context using the given name </s>
funcom_train/43608770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String translateCHead() { StringBuffer sb = new StringBuffer(); for (int i = 0; i < next_bit; i++) { int bit = print_order[i]; if ((bits & (1L << bit)) != 0) { sb.append(c_head_flag_names[bit]); sb.append(" "); } } return sb.toString(); } COM: <s> returns the flag information appropriate for c header files </s>
funcom_train/25201739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object drawBox(Node node, PrintStream out, String box) { if (trace) { trace(out, node); } ps.drawBox(out, node, x, y); Dimen depth = new Dimen(node.getDepth()); depth.negate(); ps.drawBox(out, node, x, y); return null; } COM: <s> this method draws a single box </s>
funcom_train/43410218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RespostaEntidade insereEntidadeCompleta(String lg, String cargo, String local, String funcao, Entidade e, String sigla, ArrayList<Morada> moradas, ArrayList<Telefone> telefones) { EntidadesService entidades = new EntidadesService(lg); entidades.getConnectionDB(); RespostaEntidade result = null; result = entidades.insereEntidadeCompleta(cargo, local, funcao, e, sigla, moradas, telefones); entidades.closeConnectionDB(); return result; } COM: <s> inserts a new entity and if is internal and individual a new contact </s>
funcom_train/31978832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHtml() { StringBuffer sb = new StringBuffer(); sb.append("\t<TD"); if (_attributes != null) { Enumeration e = _attributes.keys(); while (e.hasMoreElements()) { String a = (String) e.nextElement(); String val = (String) _attributes.get(a); sb.append(" ") .append(a) .append("=\"") .append(val) .append("\""); } } sb.append(">\n\t\t") .append(_contents) .append("\n\t</TD>\n"); return sb.toString(); } COM: <s> get the html for this cell </s>
funcom_train/2546565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Writer getWriter() throws IOException { //get an absolute path to the resource URL u = WorkflowModellerPlugin.getDefault().getBundle().getEntry("/"); //$NON-NLS-1$ u = Platform.resolve(u); //create a FileWriter to that file File f = new File(u.getFile() + filepath); FileWriter fWriter = new FileWriter(f); return new BufferedWriter(fWriter); } COM: <s> gets a buffered writer to the file </s>
funcom_train/2290702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isEnabled() { try { if ((m_engineState == CmsPublishEngineState.ENGINE_STOPPED) || (m_engineState == CmsPublishEngineState.ENGINE_STARTED)) { OpenCms.getLoginManager().checkLoginAllowed(); return true; } else { return false; } } catch (CmsAuthentificationException e) { return false; } } COM: <s> returns code true code if the login manager allows login </s>
funcom_train/2939321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Composite createButtonArea(ScrolledComposite parent) { aussen = new CompositeGenerator(parent, new BorderLayout(), null); CompositeGenerator center = new CompositeGenerator(aussen, null, BorderLayout.CENTER, null); CompositeGenerator unten = new CompositeGenerator(aussen, new RowLayout(), BorderLayout.SOUTH, null); addButtons(unten); parent.setContent(aussen.getComposite()); return center.getComposite(); } COM: <s> creates the global buttons such as save inside the </s>
funcom_train/37564797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStatus(){ long elapsed = (System.currentTimeMillis() - this.startTime); if ( this.pages == 0) { } else { LOG.info("\t" + this.pages + "\t" + (int)((1000 * pages)/elapsed) + " pages/second\t" ); } } COM: <s> utility to present performance stats </s>
funcom_train/15893538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ProcessMonitor selectDistinct(Class<? extends ProcessMonitor> type, Collection<? extends ProcessMonitor> plugins) throws IllegalStateException { ProcessMonitor result = null; for (ProcessMonitor prospect : plugins) { if (prospect.getClass().isAssignableFrom(type)) if (result==null) result = prospect; else throw new IllegalStateException(type.getName()+": duplicate instances found: "+result+", "+prospect); } return result; } COM: <s> return a distinct instance of the specified class from the supplied collection </s>
funcom_train/23721293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String firstString(String key) { checkKey(key); List<Object> list = map.get(key); if (list == null) { return null; } else { Object res = list.get(0); if (res instanceof String) { return (String) res; } else { throw new PropertyTreeException("unexpected PropertyTree"); } } } COM: <s> get the first string value of a named property </s>
funcom_train/45076735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DateTime getEndTime() { String dstr = null; try { dstr = getQualifierValueByName(XML.ObservationEndDate_Time); } catch (Exception e) { cat.error(e); } if (dstr == null) { return null; } else { Date theDate = ISODate.HL72Date(dstr); Calendar calen = Calendar.getInstance(); calen.setTime(theDate); return new DateTime(calen); } } COM: <s> returns the end time or null for the high level observation data </s>
funcom_train/2628393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetWindow() { System.out.println("getWindow"); FullComponentType instance = new FullComponentType(); ComponentType expResult = new ComponentType(); instance.window = expResult; ComponentType result = instance.getWindow(); assertEquals(expResult, result); } COM: <s> test of get window method of class full component type </s>
funcom_train/15625098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMapSquare(@NotNull final MapSquare<G, A, R> mapSquare) { if (!mapSquares.contains(mapSquare)) { if (mapSquare.getMapModel() != mapModel) { throw new IllegalArgumentException(); } mapSquares.add(mapSquare); } } COM: <s> adds an erroneous </s>
funcom_train/34889732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleException(String s, boolean mapDownloadStarted, StreamConnection con) { if (mapDownloadStarted) { try { StorageSystem.getInstance().addMapFinish(false); } catch (StorageSystemException ex) { if (Magex.EMU_DEBUG) { ex.printStackTrace(); } } } if(serverActive){ serverActive = false; btListener.disconnected(remDevName + " - " + s); } } COM: <s> in case of and exception thrown in process connection method </s>
funcom_train/11009013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XSSFCell evaluateInCell(Cell cell) { if (cell == null) { return null; } XSSFCell result = (XSSFCell) cell; if (cell.getCellType() == XSSFCell.CELL_TYPE_FORMULA) { CellValue cv = evaluateFormulaCellValue(cell); setCellType(cell, cv); // cell will no longer be a formula cell setCellValue(cell, cv); } return result; } COM: <s> if cell contains formula it evaluates the formula and </s>
funcom_train/3379916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMember(Principal member) { // // if the member is part of the group (common case), return true. // if not, recursively search depth first in the group looking for the // principal. // if (groupMembers.contains(member)) { return true; } else { Vector<Group> alreadySeen = new Vector<Group>(10); return isMemberRecurse(member, alreadySeen); } } COM: <s> returns true if the passed principal is a member of the group </s>
funcom_train/46124275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addArticleIntoResponse(List<ArticlePageTranslation> listOfArticlePageTranslation, ArticleGetRequest request, ArticleGetResponse response){ for(ArticlePageTranslation articlePageTranslation : listOfArticlePageTranslation){ response.getArticle().add(this.getArticleElementByArticleDomain(articlePageTranslation, request)); } // We set the response-status to the response object this.setResponseStatusIntoResponse(WsResponseCode.SUCCESS, null, response); } COM: <s> add one or many article s into the response object </s>
funcom_train/26365553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closeDialogAndCallBack(String clickedButton){ //close dialog moDialog.setVisible(false); moDialog.dispose(); if (mbframeNotProvided) moFrame.dispose(); if (moCallback != null) { //call the method for the clicked //button and pass an XML representation of the //users input callbackMethod(clickedButton); } } COM: <s> close the dialog and call the appropriate </s>
funcom_train/3388801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String preProcessSignature(String signature) { int index; if ((index=signature.indexOf(" throws"))>0) { signature = signature.substring(0,index); } while ((index = signature.indexOf("java.lang."))>0) { signature = signature.substring(0,index)+ signature.substring(index+10,signature.length()); } return signature; } COM: <s> this method chops off the throws exceptions removes java </s>
funcom_train/438124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActiveCell(Cell cell) { if (activeCell == null || activeCell != cell) { Workbook prevWorkbook = activeWorkbook; Spreadsheet prevSpreadsheet = activeSpreadsheet; Cell prevCell = activeCell; activeCell = cell; activeSpreadsheet = cell.getSpreadsheet(); activeWorkbook = activeSpreadsheet.getWorkbook(); if (activeWorkbook != null) { workbooks.remove(activeWorkbook); workbooks.push(activeWorkbook); } fireSelectionChanged(new SelectionEvent(this, activeWorkbook, activeSpreadsheet, activeCell, prevWorkbook, prevSpreadsheet, prevCell)); } } COM: <s> sets the active cell of the application and thereby also the active </s>
funcom_train/42651211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNamedValueThatReferencesSameFromPreviousContext() { EvaluationContext ctx = new EvaluationContext(builder); ctx.addParameter("test", 1); EvaluationContext sub = ctx.subContext() ; sub.addValue("test", new NamedValue("test")); assertEquals(new Integer(1), sub.resolve(Integer.class, "test")); } COM: <s> this case happens when transmitting the same value over several boards </s>
funcom_train/15636913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPrefixEqual(BitString bs, int length) { if (length > bs.stream.length || length > stream.length) return false; for (int i = 0; i < length; ++i) { if (stream[i]!=bs.stream[i]) return false; } return true; } COM: <s> checks if first code length code bits in code bs code are equal </s>
funcom_train/24217093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void launch(ArrayList<Move> moves) { StringBuilder s = new StringBuilder(); int i = 0; int n = moves.size(); while(i < n) { if(i%2 == 0) { s.append(1+i/2); s.append(". "); } else s.append("\t ... "); s.append(moves.get(i)); if(++i % 2 == 0) s.append("\n"); } field.setText(s.toString()); setVisible(true); } COM: <s> launch this box with a given list of moves </s>
funcom_train/49753050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem() { if (stringItem == null) {//GEN-END:|80-getter|0|80-preInit // write pre-init user code here stringItem = new StringItem("", "Escriba la URL del archivo a descargar.");//GEN-LINE:|80-getter|1|80-postInit // write post-init user code here }//GEN-BEGIN:|80-getter|2| return stringItem; } COM: <s> returns an initiliazed instance of string item component </s>
funcom_train/29699591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getElevation() { int cElev = super.getElevation(); if (!isMakingDfa()) { return cElev; } // otherwise, we are one elevation above our hex or the target's hex, // whichever is higher int tElev = game.getBoard().getHex(displacementAttack.getTargetPos()).floor(); return Math.max(cElev, tElev) + 1; } COM: <s> returns the elevation of this entity </s>
funcom_train/41489818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class resolve(Element element) { if (element == null) { throw new IllegalArgumentException("The element is null"); } Class clazz = resolveByElementName(element); if (clazz != null) { return clazz; } clazz = resolveByClassAttribute(element); if (clazz != null) { return clazz; } return resolveByPersistentClassMap(element); } COM: <s> resolves the i name i to a persistent class that can be inserted </s>
funcom_train/37201377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRow(int i, LAVector x) throws IllegalIndexException { if (i < 0 || i>=getRowDimension()) { throw new IllegalIndexException(); } if (x.b.getColumnDimension() != getColumnDimension()) { throw new IllegalIndexException(); } for (int j=0; j<getColumnDimension(); ++j) { vals[i][j] = x.b.vals[0][j]; } } COM: <s> sets a row of this matrix to the values in a vector </s>
funcom_train/8513826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawTriangle(Canvas canvas, Paint paint, float[] path, float x, float y) { path[0] = x; path[1] = y - size - size / 2; path[2] = x - size; path[3] = y + size; path[4] = x + size; path[5] = path[3]; drawPath(canvas, path, paint, true); } COM: <s> the graphical representation of a triangle point shape </s>
funcom_train/21218316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDescription() { return "All ROMs (*." + Setup.System.SMS.getRomFileExtension().toUpperCase() + ", *." + Setup.System.GG.getRomFileExtension().toUpperCase() + ", *." + Setup.ZIP_FILE_EXTENSION.toUpperCase() + ")"; } COM: <s> returns a description of this filter code all roms </s>
funcom_train/14245201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getAllSubSystems(MNamespace ns) { if (ns == null) return new ArrayList(); Iterator it = ns.getOwnedElements().iterator(); List list = new ArrayList(); while (it.hasNext()) { Object o = it.next(); if (o instanceof MNamespace) { list.addAll(getAllSubSystems((MNamespace)o)); } if (o instanceof MSubsystem) { list.add(o); } } return list; } COM: <s> returns all subsystems found in this namespace and in its children </s>
funcom_train/44284043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void eventListener(MouseWheelEvent e) { DKnob t = (DKnob) e.getSource(); if (t.hasFocus()) // to make consistent with other operation. t.setValue(t.getValue() - (e.getWheelRotation() / (float) (getValueMax() - getValueMin()))); } COM: <s> invoked when mouse wheel is moved </s>
funcom_train/34794936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paint() { final Objective objective = selection.getSelected(); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { plot.clear(false); plot.setXLabel("iteration"); if (objective != null) { plot.setYLabel(objective.getName()); paintList(data.getMaxPoints(objective), 0); paintList(data.getMeanPoints(objective), 1); paintList(data.getMinPoints(objective), 2); } else { plot.setYLabel(""); } plot.revalidate(); plot.repaint(); } }); } COM: <s> repaints the plot </s>
funcom_train/38388446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void prepareStatement(String sqlString, PyObject maxRows, boolean prepared) throws SQLException { if (prepared) { this.sqlStatement = this.connection.connection.prepareStatement(sqlString); } else { this.sqlStatement = this.connection.connection.createStatement(); } if (maxRows != Py.None) { this.sqlStatement.setMaxRows(maxRows.__int__().getValue()); } } COM: <s> prepare a statement ready for executing </s>
funcom_train/31363089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getToolTipText(MouseEvent event) { int x = event.getX(); int y = event.getY(); HTDrawNode node = draw.findNode(new HTCoordS(x, y)); if (node != null) { return node.getName(); } else { return null; } } COM: <s> returns the tooltip to be displayed </s>
funcom_train/10508588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object evaluate(String property, PropertyHelper helper) { for (Iterator i = stack.iterator(); i.hasNext();) { Map map = (Map) i.next(); Object ret = map.get(property); if (ret != null) { return ret; } } return null; } COM: <s> evaluate a property </s>
funcom_train/12333415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void startWorker(ServiceWorker worker, Socket socket, int compressedBlockSize) { SocketInitializer initializer = new ByteStreamSocketInitializer( socket, config.isUseCompression(), compressedBlockSize); worker.setInitializer(initializer); threadPool.submit(worker); } //- startWorker COM: <s> starts a service worker by supplying it with a </s>
funcom_train/25187261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetExpected() { System.out.println("getExpected"); StructureErrorInfo instance = new StructureErrorInfo(1, 2, "1", "2"); String expResult = "1"; String result = instance.getExpected(); assertEquals(expResult, result); } COM: <s> test of get expected method of class structure error info </s>
funcom_train/20773707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addClusterSV(int id, Rectangle area, float initialDisparity, int timestamp){ StereoDisparity sv = new StereoDisparity(id, size, massTimeConstantUs, 2, maxDisparityFractionChipsizeX, initialDisparity, timestamp); sv.setCheckAreaRectangle(area); sv.setUsingCheckAreaRectangle(true); // sv.setMaxDisparityChangePixels(5); // sv.setMaxDisparityChangeEnabled(true); clusterDisparity.put(id, sv); } COM: <s> adds a new cluster sv </s>
funcom_train/30075639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ModelAndView onSubmit(Object command) throws ServletException { Department department = (Department) command; // delegate the insert to the Business layer getGpir().storeDepartment(department); return new ModelAndView(getSuccessView(), "departmentId", Integer.toString(department.getId())); } COM: <s> method inserts a new code department code </s>
funcom_train/4725808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getBeforeSlash(String string, int slash) { string = string + '/'; String substring = ""; int slashIndex = 0; for (int i = 0; i < slash; i++) { slashIndex = string.indexOf('/'); if (slashIndex > 0) { substring = string.substring(0, slashIndex); string = string.substring(slashIndex + 1); } else { substring = ""; } } return substring; } COM: <s> get the substring before the given slash example two foo </s>
funcom_train/12081406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand2() { if (okCommand2 == null) {//GEN-END:|43-getter|0|43-preInit // write pre-init user code here okCommand2 = new Command("Ok", Command.OK, 0);//GEN-LINE:|43-getter|1|43-postInit // write post-init user code here }//GEN-BEGIN:|43-getter|2| return okCommand2; } COM: <s> returns an initiliazed instance of ok command2 component </s>
funcom_train/31911524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int nextInEndTag() throws IOException, XMLException { switch (current) { case 0x9: case 0xA: case 0xD: case 0x20: do { nextChar(); } while (current != -1 && XMLUtilities.isXMLSpace((char)current)); return LexicalUnits.S; case '>': if (--depth < 0) { throw createXMLException("unexpected.end.tag"); } else if (depth == 0) { context = TOP_LEVEL_CONTEXT; } else { context = CONTENT_CONTEXT; } nextChar(); return LexicalUnits.END_CHAR; default: throw createXMLException("invalid.character"); } } COM: <s> returns the next lexical unit in the context of a end tag </s>
funcom_train/24922133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasErrors(List l) { for (int i = 0; i < l.size(); i++) { XMLValidationError verr = (XMLValidationError) l.get(i); if (verr.getType().equals(XMLValidationError.TYPE_ERROR)) { return true; } } return false; } COM: <s> returns true if the given list with xmlvalidation element elements contains at least </s>
funcom_train/10864804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void free() { if (intArrayAllocator!=null) { intArrayAllocator.free(intArray); // Should give up handle to the array now // that it is freed. intArray = null; } if (floatArrayAllocator!=null) { floatArrayAllocator.free(floatArray); // Should give up handle to the array now // that it is freed. floatArray = null; } arraysLength = 0; } COM: <s> notify allocators that they can free arrays allocated </s>
funcom_train/28262002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { // Push extra register first, if 32 bit instruction // Double word will be stored as [di[LSB][MSB] edi[LSB][MSB]] because // stack is counting backwards in memory if (cpu.doubleWord) { cpu.setWordToStack(cpu.edi); } // Get word at DI and assign to SS:SP cpu.setWordToStack(cpu.di); } COM: <s> this pushes the word in di onto stack top ss sp </s>
funcom_train/1653757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGenerate_fromHTMLNode_textareaDivA() { HTMLNode methodHTMLNode; String[] nodeNamesArray = {"textarea","div","a"}; for(int i=0;i<nodeNamesArray.length;i++) { methodHTMLNode = new HTMLNode(nodeNamesArray[i], SAMPLE_OKAY_ATTRIBUTE_NAME,SAMPLE_ATTRIBUTE_VALUE); assertEquals(generateFullNodeOutput(nodeNamesArray[i], SAMPLE_OKAY_ATTRIBUTE_NAME,SAMPLE_ATTRIBUTE_VALUE,""), methodHTMLNode.generate()); } } COM: <s> tests generate method with a </s>
funcom_train/14004603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parseFirstTag(String custRequest) { try { KXmlParser xml = new KXmlParser(); xml.setInput(new StringReader(custRequest)); int parserStatus = xml.next(); return xml.getName(); } catch (Exception ex) { ex.printStackTrace(); } return null; } COM: <s> parse the first xml tag from the request xml block </s>
funcom_train/37565526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRequiredPhrase(String[] terms) { if (terms.length == 0) { // ignore empty phrase } else if (terms.length == 1) { addRequiredTerm(terms[0]); // optimize to term query } else { clauses.add(new Clause(new Phrase(terms), true, false)); } } COM: <s> add a required phrase </s>
funcom_train/46460576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object objectValue(XMLProperty prop) { if(!prop.getPropertyType().equals("object")) { //$NON-NLS-1$ return null; } XMLControl control = (XMLControl) prop.getPropertyContent().get(0); return control.loadObject(null); } COM: <s> returns the object value of the specified property </s>
funcom_train/3820979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(String fieldName, Integer value) { Field field = ctype.getField(fieldName); if ((field != null) && (field.getType().equals(Field.INTEGER_TYPE))) { this.attributes.put(fieldName, (value != null ? value.toString() : "")); } } COM: <s> sets a integer field to a given content </s>
funcom_train/2903190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean saveMyData(JXUser d){ try{ File saved = new File(ZLocater.getNetworkDataPropertyPath("myself.xml")); if(!saved.exists()){ saved.createNewFile(); } PrintWriter out = new PrintWriter(new FileWriter(saved)); out.print(d.toXML()); out.flush(); out.close(); return true; } catch(Exception ioe){ new JXError(getClass(), "Error saving your personal user data", ioe.getStackTrace()); } return false; } COM: <s> save the new personal data </s>
funcom_train/18739496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean computeHasMergers() { boolean result = !getLhsMergeMap().isEmpty() || !getRhsMergeMap().isEmpty(); if (!result) { for (Rule subRule : getSubRules()) { result = subRule.hasMergers(); if (result) { break; } } } return result; } COM: <s> computes if the rule has mergers or not </s>
funcom_train/48380705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAcceleration(float acceleration){ // float currentAccel = (float) Math.sqrt(ax*ax+ay*ay); float currentSpeed = (float) Math.sqrt(vx*vx+vy*vy); // If the sprite is motionless then set the acceleration in direction of // image rotation if(currentSpeed == 0.0f){ setAcceleration(acceleration, rot); } // we are moving so test if we have existing acceleration if not // accelerate in same direction we are moving else { setAcceleration(acceleration, (float) Math.atan2(vy, vx)); } } COM: <s> sets the acceleration of the sprite in its current direction </s>
funcom_train/50172200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPage(int pageNumber) { BlockTupleRenderer blockTupleRenderer = new BlockTupleRenderer(); blockTupleRenderer.setReportFileFormat(reportFileFormat); StringBuffer buffer = new StringBuffer(); writeTitle(buffer, reportFileFormat); TupleProvider[] sortedTupleProviders = tupleSorter.sort(currentSortAttribute, isSortAscending); /* String page = blockTupleRenderer.renderTuple(tuples[pageNumber]); */ String page = blockTupleRenderer.renderTuple(sortedTupleProviders[pageNumber].getTuple()); buffer.append(page); return buffer.toString(); } COM: <s> gets the ith page of results </s>
funcom_train/23278806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeLaunchSponsor(LaunchSponsor ls){ if (!validateClass(ls)) throw new ARISException("Invalid Launch Sponsor"); //Delete all objects related to this Launch Sponsor List<LaunchFile> files = ls.getFiles(); while (files.size() > 0) removeLaunchSponsorFile(ls, files.get(0).getId()); getHibernateTemplate().delete(ls); } COM: <s> removes the launch sponsor </s>
funcom_train/19433049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpdate(Iterator theUpdate) throws CacheException { myCache.update(theUpdate); final QueryProcessor processor = this; Runnable getter = new Runnable() { public void run() { try { processor.setCacheResult(myCache.get(myQuery)); } catch (CacheException e) { processor.declareException("Problem getting data from cache", e); } } }; thread(getter); } COM: <s> must be called before get combined data </s>
funcom_train/8934626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(String key, String value) { props.setProperty(key, value); try { props.store(new FileOutputStream(new File(file)), "- DO NOT MODIFY - LOCAL CONFIG - DO NOT MODIFY -"); } catch (FileNotFoundException e) { } catch (IOException e) { } } COM: <s> set key with value </s>
funcom_train/31648233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttribute(Attribute attribute) { if(status != STAT_PREPARE){ try{ attribute.submit(); }catch(Exception ex){} return; }else if(attributeList == null){ if(status == STAT_PREPARE) attributeList = new java.util.Vector(); else getAttributeList(); } if(!attributeList.contains(attribute)) attributeList.add(attribute); } COM: <s> add a new attribute to the table </s>
funcom_train/43471180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseQueryExpr2(String pstrPattern) { digester.addObjectCreate(pstrPattern, PFQRYEXPR_CLAZZ); digester.addBeanPropertySetter(pstrPattern + "/lhs"); digester.addBeanPropertySetter(pstrPattern + "/rhs"); digester.addBeanPropertySetter(pstrPattern + "/attrlhs"); digester.addBeanPropertySetter(pstrPattern + "/attrrhs"); digester.addBeanPropertySetter(pstrPattern + "/operator"); } COM: <s> parsing the queryexprlhs or queryexprrhs expression </s>
funcom_train/20044268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _addNew() { SubTotalColumn[] columns = new SubTotalColumn[1]; SubTotalColumn column = new SubTotalColumn(); column.Column = 5; column.Function = GeneralFunction.SUM; columns[0] = column; oObj.addNew(columns, 1); tRes.tested("addNew()", true); } COM: <s> test creates a subtotal field definition and adds it to the descriptor </s>
funcom_train/16400097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public class Version extends polyglot.main.Version { public String name() { return "dj"; } // TODO: define a version number, the default (below) is 0.1.0 public int major() { return 0; } public int minor() { return 1; } public int patch_level() { return 0; } } COM: <s> version information for dj extension </s>
funcom_train/31650342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPackageFileName( int index ) { if ( index > pkg.size() ) { return ""; } else { SBIEPackage p = (SBIEPackage)pkg.get(index); if ( p.getFileName()==null ) { return ""; } else { return HTMLEncode.htmlescape( p.getFileName() ); } } } COM: <s> returns one of the package names in the package list </s>
funcom_train/8092922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modelErrors() throws Exception{ Evaluation eval = new Evaluation(m_train); if (!m_isLeaf) { m_isLeaf = true; eval.evaluateModel(this, m_train); m_isLeaf = false; m_numIncorrectModel = eval.incorrect(); for (int i = 0; i < m_sons.length; i++) m_sons[i].modelErrors(); } else { eval.evaluateModel(this, m_train); m_numIncorrectModel = eval.incorrect(); } } COM: <s> updates the num incorrect model field for all nodes </s>
funcom_train/2302765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runDebuger() throws Exception { String baseDir = "C:\\spin\\"; String[] errorCommand = {"spin", "-t", "-p", "-N", "pan.ltl", "pan_in"}; Process errorChild = Runtime.getRuntime().exec(errorCommand); writeOutput(errorChild, "errorreport"); } COM: <s> runs the spin debugger and saves the results in a proper report file </s>
funcom_train/14615466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadItems() throws InterruptedException { try { List visitedFiles = retriever.getPreloadData(); if( Thread.interrupted() ) { // Abort the update throw new InterruptedException(); } loadItems(visitedFiles); } catch (TemplateException e) { eventHandler.fireCacheUnavailable( this, e ); return; } } COM: <s> load all items in the data store </s>
funcom_train/4837172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matches(String input) { TrieNode node= root; for (int i= input.length() - 1; i >= 0; i--) { node= node.getChild(input.charAt(i)); if (node == null) return false; if (node.isTerminal()) return true; } return false; } COM: <s> returns true if the given code string code is matched by a </s>
funcom_train/8094743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Matrix getY(Instances instances) { double[][] y; Matrix result; int i; y = new double[instances.numInstances()][1]; for (i = 0; i < instances.numInstances(); i++) y[i][0] = instances.instance(i).classValue(); result = new Matrix(y); return result; } COM: <s> returns the data class column as matrix </s>
funcom_train/18787836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void complete(MetaClass clazz) { getOrAddTag(clazz, persistence); boolean isPersistent = false; for (MetaProperty property : clazz.getProperties()) { isPersistent |= complete(property); } for (MetaIndexedProperty property : clazz.getIndexedProperties()) { isPersistent |= complete(property); } if (isPersistent) { clazz.setTaggedValue(UmlConstants.PERSISTENCE_TAG, isPersistent); } } COM: <s> registers all standard defined uml tags in the model </s>
funcom_train/33770396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateInfos(){ super.updateInfos(); ArtistWrapper artist = (ArtistWrapper) person; infosTable.setText(10,1,artist.getNameGroup()); infosTable.setText(11,1,(artist.getIsGroup().booleanValue())?text.yes():text.no()); infosTable.setText(12,1,artist.getUrl()); infosTable.setText(13,1,artist.getDescription()); } COM: <s> update the table containing artists informations </s>
funcom_train/3726224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String toString(Entity entity) { try { String label = entity.getLabel(KAONVocabularyAdaptor.INSTANCE.getLanguageURI("en")); if (label == null) { URL url = new URL(entity.getURI()); label = url.getRef(); } return label; } catch (Exception e) { return "no-label"; } } COM: <s> returns the label of the node in the tree </s>
funcom_train/20294098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTypeLocale() { Locale[] locales; locales = Locale.getAvailableLocales(); for (int i = 0; i < locales.length; i++) { if (locales[i].getCountry().length() > 0) { this.addItem(i, locales[i].getDisplayName()); } } } COM: <s> sets the type locale attribute of the html select object </s>