__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/987276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void glColor4i (int red, int green, int blue, int alpha) { CC.gl_color (gl_util.ItoF (gl_util.CLAMP (red, 0, 255)), gl_util.ItoF (gl_util.CLAMP (green, 0, 255)), gl_util.ItoF (gl_util.CLAMP (blue, 0, 255)), gl_util.ItoF (gl_util.CLAMP (alpha, 0, 255))); } COM: <s> glvoid gl color4i glint red glint green glint blue glint alpha </s>
funcom_train/46057416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Quota getCustomQuota(String path) { if (defaultQuotas == null) { throw new OLATRuntimeException(QuotaManagerImpl.class, "Quota manager has not been initialized properly! Must call init() first.", null); } PropertyManager pm = PropertyManager.getInstance(); Property p = pm.findProperty(null, null, quotaResource, QUOTA_CATEGORY, path); if (p == null) return null; else return parseQuota(p); } COM: <s> get the quota in kb for this path </s>
funcom_train/45277103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBet(double betAmnt) { betAmount = betAmnt; bjCanvas.showCurrentBet(betAmount); if (bjClient != null) { bjClient.sendMessageToServer("----------------------"); bjClient.sendMessageToServer(bjClient.getPlayerName() + " bets " + betAmount); } } COM: <s> sets the bet amount </s>
funcom_train/48559412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand2() { if (cancelCommand2 == null) {//GEN-END:|331-getter|0|331-preInit cancelCommand2 = new Command("\u041E\u0442\u043C\u0435\u043D\u0430", Command.CANCEL, 0);//GEN-LINE:|331-getter|1|331-postInit }//GEN-BEGIN:|331-getter|2| return cancelCommand2; } COM: <s> returns an initiliazed instance of cancel command2 component </s>
funcom_train/27973000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long getFirstArrivalTime() { long time = 0; ResultSet rs = sqlExchange.sql("SELECT `arrivalDateBegin` FROM `containers` ORDER BY `arrivalDateBegin` ASC LIMIT 0,1;"); try { while (rs.next()) { time = rs.getInt("arrivalDateBegin"); } } catch (SQLException e) { System.out.println(e); } return time; } COM: <s> retrieves the smallest arrival date begin from the database </s>
funcom_train/18358003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean querySuitInPlan(long suitID) { Iterator psaIt = personnel.iterator(); while (psaIt.hasNext() == true) { PersonnelSuitAssignment psa = (PersonnelSuitAssignment) psaIt.next(); if ( new Long(psa.getSuit().getEquipmentID()).equals( new Long(suitID)) == true) { // suit is in the plan... return true; } } return false; } COM: <s> return true if the given suit id is in the plan </s>
funcom_train/3909999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void editSCORM(final Element itemElement, final SchemaElement schemaElement) { Thread thread = new Thread() { SCORM12_EditorDialog editor; public void run() { if(_editSCORMHandler != null) { _editSCORMHandler.setEnabled(false); // block multiple key presses } editor = new SCORM12_EditorDialog(_contentPackage, itemElement, schemaElement); // Show the Window later in the Event queue SwingUtilities.invokeLater(new Runnable() { public void run() { editor.show(); } }); } }; thread.start(); } COM: <s> edit the scorm elements in the scorm dialog editor </s>
funcom_train/45134184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getAttributeDouble(String attributeName) throws XMLInvalidTypeException, NullPointerException { double value; try { value = Double.parseDouble(getAttributeString(attributeName)); } catch (NullPointerException npe){ throw npe; } catch (Exception e){ throw new XMLInvalidTypeException("Attribute not a double"); } return value; } COM: <s> returns the double value of the given attribute of the root tag </s>
funcom_train/42401849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addImageFactoryField(final Type imageFactory) { Checker.notNull("parameter:imageFactory", imageFactory); this.getGeneratorContext().debug("Created field."); // add a field to hold the new imageFactory type. final NewType beanFactory = this.getBeanFactory(); final NewField field = beanFactory.newField(); field.setFinal(false); field.setName(Constants.IMAGE_FACTORY_FIELDNAME); field.setStatic(false); field.setTransient(false); field.setType(imageFactory); field.setValue(EmptyCodeBlock.INSTANCE); field.setVisibility(Visibility.PRIVATE); } COM: <s> adds a field to the bean factory to hold the image factory </s>
funcom_train/32957429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPasswordResetToSpecificName() { pwm.resetPassword(testUser); pwm.checkPassword(testUser, testPassword.toCharArray()); pwm.changePassword(testUser, testPassword.toCharArray(), testPassword.toCharArray()); } COM: <s> the admin resets the users password to a supplied password rather than </s>
funcom_train/45248558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldTaxaWAG() { if (jNumberFloatFieldTaxaWAG == null) { jNumberFloatFieldTaxaWAG = new JNumberFloatField(); jNumberFloatFieldTaxaWAG.setLocation(new Point(345, 186)); jNumberFloatFieldTaxaWAG.setSize(new Dimension(65, 20)); } return jNumberFloatFieldTaxaWAG; } COM: <s> this method initializes j number float field taxa wag </s>
funcom_train/41594118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPartTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ADXP_partType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ADXP_partType_feature", "_UI_ADXP_type"), V3Package.eINSTANCE.getADXP_PartType(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the part type feature </s>
funcom_train/23898320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load() { Reader inputReader; try { resetError(); int fileLength = (int) file.length(); char[] buffer = new char[fileLength]; inputReader = new FileReader(file); int numChar = inputReader.read(buffer); text = new String(buffer); log("Number of characters read from " + filePath + ": " + numChar); } catch (FileNotFoundException e) { setErrorCode(EC_FILENOTFOUND); showError(e); setError("File Not Found"); } catch (IOException e) { setErrorCode(EC_ERROR); showError(e); } } COM: <s> load the complete file into text </s>
funcom_train/48143686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RealPolynomial differentiate() { if ( degree() == 1 ) { return (RealPolynomial) RealPolynomialRing.getInstance().zero(); } else { double[] dn = new double[degree() - 1]; for ( int k = 1; k < degree(); k++ ) { dn[k - 1] = getCoefficientAsDouble( k ) * k; } return new RealPolynomial( dn ); } } COM: <s> differentiate the real polynomial </s>
funcom_train/18788408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) { if (((this.name != null) && !this.name.equals(name)) || ((this.name == null) && (name != null))) { this.name = name; update.addUpdate(new PrimitiveFieldUpdate("name", name)); setModified(true); } } COM: <s> sets the new value of the simple property name </s>
funcom_train/10867271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int numVowels(char s[], int len) { int n = 0; for (int i = 0; i < len; i++) { switch(s[i]) { case 'a': case 'e': case 'i': case 'o': case 'u': case 'ā': case 'ī': case 'ē': case 'ū': n++; } } return n; } COM: <s> count the vowels in the string we always require at least </s>
funcom_train/19423006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeMember(String userId) { if (members != null) { Iterator i = members.iterator(); UserGroupMember memberToRemove = null; while (i.hasNext()) { UserGroupMember member = (UserGroupMember) i.next(); if (userId.equals(member.getUser().getUserId())) { memberToRemove = member; } } if (memberToRemove != null) { members.remove(memberToRemove); } } } COM: <s> p removes the specified member from the group </s>
funcom_train/45247686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ StringBuffer buffer = new StringBuffer(); buffer.append(this.getClass().getName()); buffer.append("["); //$NON-NLS-1$ buffer.append("author="); //$NON-NLS-1$ buffer.append(author); buffer.append(";date="); //$NON-NLS-1$ buffer.append(date); buffer.append(";tag="); //$NON-NLS-1$ buffer.append(tag); buffer.append(";language="); //$NON-NLS-1$ buffer.append(language); buffer.append("]"); //$NON-NLS-1$ return buffer.toString(); } COM: <s> returns a string consisting of metadata </s>
funcom_train/39291279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createActions() { try { addStackAction(new UndoAction(this)); addStackAction(new RedoAction(this)); addEditPartAction(new DeleteAction((IWorkbenchPart) this)); addEditPartAction(new AddServiceAttributeAction( (IWorkbenchPart) this) ); addEditPartAction(new AddServiceFunctionalityAction( (IWorkbenchPart) this) ); addEditorAction(new SaveAction(this)); } catch (Exception e) { e.printStackTrace(); } } COM: <s> create actions and registers them to the action registry </s>
funcom_train/48351794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void markBlocksAsNonAtomic(Integer iid, Integer thread) { ListIterator<Integer> it = ciTracker.getContext(iid).listIterator(); // Loop over all the block iids and ignore the counts. while (it.hasNext()) { Integer curBlock = it.next(); if (allBlocks.contains(curBlock)) vcNonAtomicBlocks.add(curBlock); it.next(); // skip count } } COM: <s> mark all blocks that we are tracking in the current </s>
funcom_train/7866886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object aValue, int rowIndex, int columnIndex) { // Activity column, if (columnIndex == 1) { // Set the value (Boolean for column 1) to iTableRows. iTableRows.put(iMediator.getTableRow(rowIndex), aValue); } } COM: <s> sets the value in the cell at code column index code and </s>
funcom_train/1123528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WordSet getNeighbour(int j, Neighbour n) { WordSet w = new WordSet(alphabet); int[] v = new int[longest + 1]; int asize = alphabet.getSize(); for (int[] u : getWords()) { n.copy(u, v); for (int x = 0; x < asize; x++) { n.setV(v, x); if (!member(n.cutV(v))) { w.addCombinations(v, j); } } } return w; } COM: <s> gets code j code th neighbour of this word set </s>
funcom_train/15420083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void configureWriter() throws SecurityException { String encoding = getEncoding(); switch (mode) { case MODE_OUT: outWriter = new ConsoleStreamWriter(this, System.out, encoding); break; case MODE_ERR: errWriter = new ConsoleStreamWriter(this, System.err, encoding); break; case MODE_BOTH: errWriter = new ConsoleStreamWriter(this, System.err, encoding); outWriter = new ConsoleStreamWriter(this, System.out, encoding); break; default: throw new RuntimeException("Invalid mode " + mode); } } COM: <s> configure the writers </s>
funcom_train/5600723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Shape getShape() { final GridRange gridRange = geometry.getGridRange(); Shape shape = new Rectangle2D.Double( gridRange.getLower (0), gridRange.getLower (1), gridRange.getLength(0), gridRange.getLength(1)); shape = AffineTransform2D.transform(gridToCRS, shape, true); return shape; } COM: <s> returns the coverage shape in coverage crs not geographic crs </s>
funcom_train/36117678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ComponentStatus convertToComponentStatus() { return new ComponentStatus(this.id, ComponentBase .convertStateToString(((ComponentBase) this.componentInstance) .getState()), String.format(" %2d/%-2d ", this.grantedInterfaces.size(), this.requiredInterfaces.size()), this.componentDescription.getName(), this.componentDescription .getClassName()); } COM: <s> convert this wrapper to the component status class </s>
funcom_train/37611376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Reservation reserveNext() { synchronized (m_reservablesMutex) { purgeZombieResources(); while (true) { if (++m_lastReservable >= m_reservables.size()) { m_lastReservable = 0; } final Reservable reservable = m_reservables.get(m_lastReservable); if (reservable.reserve()) { return reservable; } } } } COM: <s> returns a resource reserved for exclusive use by the caller </s>
funcom_train/36871325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleFile(File file, int depth, Collection results) { //we work only with files if (file == null || !file.isFile()) { return; } //remove '.' at the start of last file extension, if exists String curName = file.getName().toLowerCase(); if (curName.endsWith(ext)) { results.add(file); } } COM: <s> method is inhereted from directory walker </s>
funcom_train/44498985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCurrentPageText() { String text = null; try { text = getCurrentPage().getText(); } catch ( IOException ioe ) { throw new RuntimeException(JameleonUtility.createErrMsg("Could get response text: "+ioe.getMessage()), ioe); } return text; } COM: <s> gets the text of the current response page </s>
funcom_train/28542025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IToolBarManager getToolBarManager() { if (toolBarMgr == null) { // TODO: The code below does not work anymore in Eclipse 3.2M5. // We cannot call this API anymore because we get an exception. // See WWinActionBars.getToolBarManager() // toolBarMgr = createSubToolBarManager(getParent().getToolBarManager()); toolBarMgr = createSubToolBarManager(null); toolBarMgr.setVisible(getActive()); } return toolBarMgr; } COM: <s> we are implementing this method only to avoid a class cast exception </s>
funcom_train/51220685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle toRelativeArea(Rectangle absoluteArea) { screenBounds =selected.getScreenBounds(); if (screenBounds==null){ dispose(); return null; } int resizeFactor=screenBounds.width*1000/originalDimension.width; return new Rectangle(absoluteArea.x*resizeFactor/1000,absoluteArea.y*resizeFactor/1000,absoluteArea.width*resizeFactor/1000,absoluteArea.height*resizeFactor/1000); } COM: <s> converts an area expressed in absolute coordinates related to </s>
funcom_train/45247296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldProporcaoWAG() { if (jNumberFloatFieldProporcaoWAG == null) { jNumberFloatFieldProporcaoWAG = new JNumberFloatField(); jNumberFloatFieldProporcaoWAG.setLocation(new Point(345, 106)); jNumberFloatFieldProporcaoWAG.setSize(new Dimension(65, 20)); } return jNumberFloatFieldProporcaoWAG; } COM: <s> this method initializes j number float field proporcao wag </s>
funcom_train/15926406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTimeAndDate() { Calendar cal = Calendar.getInstance(); String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss"; SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW); String time = sdf.format(cal.getTime()); return time; } COM: <s> get the current time and date useful for delineating console output </s>
funcom_train/7850793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String stringArg(final int n) throws ArgumentTypeMismatchException, InsufficientArgsException { final Object a = getArg(n); if (a == null) { throw new ArgumentTypeMismatchException(n, "String", "null"); } try { return (String) a; } catch (final ClassCastException e) { throw new ArgumentTypeMismatchException(n, "String", (a != null ? a.getClass().toString() : "null")); } } COM: <s> helper function for strings </s>
funcom_train/31645987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRemainder() { // Variables String result; // Check for end-of-input if (currentPos == maxPos) { return null; // Return remaining string // Note: currently sets the current position to the end // Is this command supposed to consume the remaining tokens? // If not, the position adjustments should be removed } else { result = string.substring(currentPos); nextPos = maxPos; peekPos = maxPos; return result; } // if }// getRemainder() COM: <s> gets the rest of the unparsed data and is returned as a </s>
funcom_train/21434134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting()) { return; } if (e.getSource().equals(bucketsTable.getSelectionModel())) { bucketSelectedAction(); } else if (e.getSource().equals(objectsTable.getSelectionModel())) { objectSelectedAction(); } } COM: <s> handles list selection events for this application </s>
funcom_train/14108229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int numstringLength() throws PSError { // Check first byte if (get(0) != 149) { throw new PSErrorTypeCheck(); } int numRepr = get(1); int len; if (numRepr < 128) { len = (get(2) << 8) | get(3); } else { len = (get(3) << 8) | get(2); } return len; } COM: <s> treat this string as an encoded number string and get the length </s>
funcom_train/27912800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String load(String jarName) { if (handler == null) return toString() + ".load() no handler for " + path + "."; try { handler.update(jarName, null); } catch(JSPloaderException jle) { return jle.getMessage(); } return jarName + " loaded."; } COM: <s> loads or reloads an archive </s>
funcom_train/22233580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNormalIndices(int index, int normalIndices[]) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_NORMAL_INDEX_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray5")); ((IndexedGeometryArrayRetained)this.retained).setNormalIndices(index, normalIndices); } COM: <s> sets the normal indices associated with the vertices starting at </s>
funcom_train/8372996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int replaceArticle(Article oldArticle, Article newArticle) { int wordsChanged = 0; try { PreparedStatement pstmt = con .prepareStatement("UPDATE words SET articleId = ? WHERE articleId = ?"); pstmt.setInt(1, newArticle.getArticleId()); pstmt.setInt(2, oldArticle.getArticleId()); wordsChanged = pstmt.executeUpdate(); con.commit(); } catch (SQLException e) { e.printStackTrace(); } return wordsChanged; } COM: <s> replace an article through another not considering the language of the </s>
funcom_train/29298442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reset() { examiner = null; currentTestPair = null; testStart = false; correctanswers = 0; nrQuestions = 0; testform.Question_label.setText(""); testform.hint_label.setText(""); testform.context_label.setText(""); testform.lineEdit.setText(""); } COM: <s> reset the testwidget to default values </s>
funcom_train/3862218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HTMLTagAttribute getHTMLTagAttribute(String name) { HTMLTagAttribute moRet = null; Iterator moAttrs = coAttributes.iterator(); while (moAttrs.hasNext()) { moRet = (HTMLTagAttribute)moAttrs.next(); if (moRet.getName().equalsIgnoreCase(name)) { break; } else { moRet = null; } } return moRet; } COM: <s> returns the htmltag attribute with the given attribute name </s>
funcom_train/27839786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTimeCounter() { long now = Calendar.getInstance().getTimeInMillis(); long counter = (now - timeCounter) / 1000; StringBuffer result = new StringBuffer(); if (counter > 60 * 60) { long hours = counter / 3600; result.append(hours); counter = counter % 3600; } else result.append("00"); result.append(":"); if (counter > 60) { long minutes = counter / 60; result.append(minutes).append(":"); counter = counter % 60; } else result.append("00"); result.append(":").append(counter); setTimeCounterString(result.toString()); } COM: <s> format and display the execution time as hh mm ss </s>
funcom_train/20295926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopWatching(){ if(!watching){ return; } watching = false; try { if(watchSocket != null){ watchSocket.close(); watchSocket = null; } if(watcherIn != null){ watcherIn.close(); watcherIn = null; } if(Isocket != null){ Isocket.close(); Isocket = null; } } catch (IOException e) { theClient.logger.print_error("Cannot close input stream for watcher"); } popupDialog("The watching is ended,\nWinner: " + winner + " !", MsgType.info); theClient.stopWatching(); } COM: <s> closes all sockets and stops watching process </s>
funcom_train/1958126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDetermineOS() { int type = StartScan.determineOS(); String osname = System.getProperty("os.name"); if (osname.startsWith("Windows")) { assertTrue("Incorrect type", type == StartScan.WINDOWS); } else if (osname.equals("Linux")) { assertTrue("Incorrect type", type == StartScan.LINUX); } else { fail("Your OS is not known to StartScan "+osname); } } COM: <s> check if os is determined correctly </s>
funcom_train/46695417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreate_String_String() { System.out.println("create"); String mode = "Actor"; String id = "ID"; ActorFactory instance = ActorFactory.newInstance(); Actor result = instance.create(mode, id); assertNotNull(result); assertEquals(mode, result.getMode()); assertEquals(id,result.getID()); } COM: <s> test of create method of class actor factory </s>
funcom_train/41302228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MainScreenItem getFocusedItem() { if (items.isEmpty()) { return null; } else if (cgServices.getFocusedIndex() == -1) { return (MainScreenItem) items.firstElement(); } else { return (MainScreenItem) items.elementAt(cgServices.getFocusedIndex()); } } COM: <s> gets focused item id </s>
funcom_train/27820324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double tanh(double x) { if (x > 500) { return 1F; } else if (x < -500) { return -1F; } // Calculus pg. 362 return ((Math.exp(x) - Math.exp(-x)) / (Math.exp(x) + Math.exp(-x))); } COM: <s> hyperbolic tangent is a sigmoidal function </s>
funcom_train/3597366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeNoteTypeIn(JInternalFrame f) { JPanel panel = new JPanel(); JButton nbut = new JButton(NOTEBUTTON); nbut.setFont(new Font("Serif", Font.PLAIN, textsize)); nbut.addActionListener(this); panel.add(nbut); f.getContentPane().add(panel); noteTextField = new JTextField(20); noteTextField.addActionListener(this); panel.add(noteTextField); f.setVisible(true); } COM: <s> put up a notes section when the user hits return it adds </s>
funcom_train/44109077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Locale getLocale(String alias) { for (Iterator iter = locales.keySet().iterator(); iter.hasNext();) { Locale locale = (Locale) iter.next(); if (alias.equals((String) locales.get(locale))) { return locale; } } return null; } COM: <s> gets the locale matching a given alias </s>
funcom_train/50345499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resequenceIds(){ List<String> l = getLocationsBySequenceList(); int i; for (i=0; i<l.size(); i++){ RouteLocation rl = getLocationById(l.get(i)); rl.setSequenceId(i+1); // start sequence numbers at 1 } _sequenceNum = i; } COM: <s> reorder the location sequence numbers for this route </s>
funcom_train/14364374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createComboBoxStructure(List<? extends ModelElement> modelElements_p, HashMap<AbstractOwner, HashMap<String, ModelElement>> structureHolder_p) { HashMap<String, ModelElement> structure = new HashMap<String, ModelElement>(modelElements_p.size()); structureHolder_p.put(_currentUser, structure); updateStructure(modelElements_p, structure, false); } COM: <s> create combo box supporting structure based on given model elements list </s>
funcom_train/37740766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int processMgrState () throws RemoteException { ProcessDefinitionDirectory pdd = null; try { pdd = pddHome.create(); if (pdd.isEnabled(packageId, processId)) { return WfProcessMgr.ENABLED; } else { return WfProcessMgr.DISABLED; } } catch (InvalidKeyException ivke) { return WfProcessMgr.DISABLED; } catch (CreateException ce) { logger.error (ce.getMessage(), ce); throw new RemoteException(ce.getMessage()); } finally { EJBUtil.removeSession (pdd); } } COM: <s> returns the state of the code wf process mgr code </s>
funcom_train/5241318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PointerTargetNodeList getCoordinateTerms(Synset synset) throws JWNLException { PointerTargetNodeList list = new PointerTargetNodeList(); for (Iterator itr = getDirectHypernyms(synset).iterator(); itr.hasNext();) { list.addAll(getPointerTargets(((PointerTargetNode) itr.next()).getSynset(), PointerType.HYPONYM)); } return list; } COM: <s> get code synset code s siblings the hyponyms of its hypernyms </s>
funcom_train/958916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ExceptionReport createException(String error, String code) { ExceptionReport exRep = new ExceptionReport(); exRep.setLanguage(CommonProperties.getInstance().get("lang")); exRep.setVersion("1.0"); ExceptionType ex = new ExceptionType(); ex.setExceptionCode(code); ex.getExceptionText().add(error); exRep.getException().add(ex); return exRep; } COM: <s> creates a new exception report </s>
funcom_train/29372639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getJTextArea_ATIS() { if (jTextArea_ATIS == null) { jTextArea_ATIS = new JTextArea(); jTextArea_ATIS.setBounds(new Rectangle(15, 45, 286, 91)); jTextArea_ATIS.setText(""); jTextArea_ATIS.setEditable(false); } return jTextArea_ATIS; } COM: <s> this method initializes j text area atis </s>
funcom_train/41603083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { //cellContext.setWidth(table.getColumnModel().getColumn(column).getWidth()); return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); } COM: <s> returns a configured component appropriate to render the given </s>
funcom_train/37123447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopPlugin(PluginInfo p) { firePluginUnloading(p); if ((p.getLoadState() & PluginInfo.STARTED) > 0) { unregisterActions(p); p.getPlugin().stop(); } else { logger.warn("Plugin not started, hence no need to stop: " + p.getName()); } p.setPlugin(null); p.setClassLoader(null); p.setLoadState(PluginInfo.NOT_LOADED | PluginInfo.PREPARED); // bug fix } COM: <s> stops a plugin </s>
funcom_train/46450782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isIndependentActivity(XComponent activity) { // Returns true if there are no direct or indirec predecessors List predecessors = getPredecessors(activity); if ((predecessors == null) || (predecessors.size() == 0)) { XComponent super_activity = superActivity(activity); if (super_activity == null) { return true; } else { return isIndependentActivity(super_activity); } } else { return false; } } COM: <s> method checks if a activity is a an independent one </s>
funcom_train/1952175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { _root = null; _rooted = false; _name = ""; _description = ""; _type = ""; _distance_unit = ""; _idhash = null; _confidence = null; _identifier = null; _rerootable = true; setAllowMultipleParents( Phylogeny.ALLOW_MULTIPLE_PARENTS_DEFAULT ); } COM: <s> deletes this phylogeny </s>
funcom_train/12549285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Double getValue() { String content = super.getText(); Double retval; if (content.length() != 0) { try { retval = new Double(Double.parseDouble(content)); return retval; } catch (NumberFormatException nfe) { return this.defaultValue; } } return this.defaultValue; } COM: <s> returns the value that is currently displayed in the double text field </s>
funcom_train/50558513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAllowedRoles(String allowed) { if (allowed == null || "".equals(allowed)) return; StringTokenizer st = new StringTokenizer(allowed, ","); roles = new ArrayList(); while (st.hasMoreTokens()) { roles.add(st.nextToken().trim()); } } COM: <s> set the roles which can execute this action </s>
funcom_train/32648316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStatus() { StringBuffer buffer = new StringBuffer(); buffer.append("Memory Object Storage System<br>"); Enumeration e = list(); while (e.hasMoreElements()) { buffer.append("<li>"); buffer.append(e.nextElement()); buffer.append("</li>"); } return buffer.toString(); } COM: <s> returns the signature of this store implementation </s>
funcom_train/4122541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private GoodsType getBestGoodsToProduce(Tile t) { if (t.hasResource()) { return t.getTileItemContainer().getResource().getBestGoodsType(); } else { List<AbstractGoods> sortedPotentials = t.getSortedPotential(); if (sortedPotentials.isEmpty()) { return null; } else { return sortedPotentials.get(0).getType(); } } } COM: <s> determines the best goods to produce on a given code tile code </s>
funcom_train/26640775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void moveToMRU(LinkEntry entry) { if (entry.after != header) { modCount++; // remove entry.before.after = entry.after; entry.after.before = entry.before; // add first entry.after = header; entry.before = header.before; header.before.after = entry; header.before = entry; } } COM: <s> moves an entry to the mru position at the end of the list </s>
funcom_train/44011416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetState() { System.out.println("setState"); String state = ""; StoreBO instance = new StoreBO(); instance.setState(state); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set state method of class edu </s>
funcom_train/23269532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getConnectTimeout(final Page.Request pageRequest) throws WWWeeePortal.Exception { return getConfigProp(CONNECT_TIMEOUT_PROP, pageRequest, RSProperties.RESULT_INTEGER_CONVERTER, DEFAULT_CONNECT_TIMEOUT_MS, false, false).intValue(); } COM: <s> get the value in milliseconds used to </s>
funcom_train/38315825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateMinimumRequirements(MinimumRequirements minimumRequirements) throws PersistenceException { Session session = null; try { session = this.sessionManager.getHibernateSession(); session.update(minimumRequirements); } catch (HibernateException he) { log.error("HibernateException caught updating minimum requirements.", he); throw new PersistenceException(he); } finally { this.sessionManager.flushCommitCloseSession(session); } } COM: <s> update a minimum requirements in the database </s>
funcom_train/38786165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix extract(Index idx) throws JasymcaException{ if(idx.row_max > nrow() || idx.col_max > ncol()){ throw new JasymcaException("Index out of range."); } Matrix x = new Matrix( idx.row.length, idx.col.length ); for(int i=0; i<idx.row.length; i++) for(int k=0; k<idx.col.length; k++) x.a[i][k] = a[idx.row[i]-1][idx.col[k]-1]; return x; } COM: <s> extract matrix x from position </s>
funcom_train/14071061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLink(Link link) { Iterator<Link> it = links.iterator(); while (it.hasNext()) { if (it.next().getModule().equals(link.getModule())) { it.remove(); break; } } links.add(link); } COM: <s> add a link to the set </s>
funcom_train/8075711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performRequest(String request) { if (request.compareTo("Show results") == 0) { showResults(); } else if (request.compareTo("Clear results") == 0) { m_outText.setText(""); } else { throw new IllegalArgumentException(request + " not supported (TextViewer)"); } } COM: <s> perform the named request </s>
funcom_train/33465268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeRawLittleEndian32(final int value) throws IOException { writeRawByte((value ) & 0xFF); writeRawByte((value >> 8) & 0xFF); writeRawByte((value >> 16) & 0xFF); writeRawByte((value >> 24) & 0xFF); } COM: <s> write a little endian 32 bit integer </s>
funcom_train/34282346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void rescaleImage(int width, int height, int hint) { Image master = getMasterImage(); if (master!=null) { bgImage = master.getScaledInstance(width,height, hint); tracker.addImage(bgImage, 1); try { tracker.waitForID(1); } catch (InterruptedException e) { e.printStackTrace(); bgImage = null; return; } finally { tracker.removeImage(bgImage, 1); } } else { bgImage = null; } } COM: <s> rescales the displayed image to be the specified size </s>
funcom_train/33639082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Object decode(byte[] buf) throws ClassNotFoundException{ try{ ByteArrayInputStream bais = new ByteArrayInputStream(buf); ObjectInputStream ois = new ObjectInputStream(bais); Object obj = ois.readObject(); ois.close(); bais.close(); return obj; }catch(IOException e){ return null; } } COM: <s> decodes the specified byte array to an object </s>
funcom_train/7718839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setValue(String value) { if (value.length() < PersistConsts.GAE_MAX_STRING_LEN) { this.shorten_string = value; this.full_string = null; } else { this.shorten_string = value.substring(0, PersistConsts.GAE_MAX_STRING_LEN - 1); this.full_string = new Text(value); } } COM: <s> set the string value </s>
funcom_train/5158890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getFrontendBackdrops() { if(umcParams.get(KEY_FRONTEND_BACKDROPS)!=null && !umcParams.get(KEY_FRONTEND_BACKDROPS).getValue().equals("")) return Boolean.valueOf(umcParams.get(KEY_FRONTEND_BACKDROPS).getValue()); return false; } COM: <s> returns the backdrops flag for the creation of the frontend </s>
funcom_train/26228460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MethodInfo run(MethodInfo info) { if (level >= 10) { return at.dms.ssa.Optimizer.optimize(info); } else if (level >= 1) { CodeInfo code; code = info.getCodeInfo(); if (code != null) { code = at.dms.optimize.Optimizer.optimize(code, level); info.setCodeInfo(code); } return info; } else { return info; } } COM: <s> runs the optimizer on the given code info </s>
funcom_train/44519895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void closeFolder( Folder folder ) throws MessagingException { // delete the messages if atleast one message was deleted FlagTerm flagTerm = new FlagTerm(new Flags(Flags.Flag.DELETED), true); Message deletedMessages[] = folder.search(flagTerm); if(deletedMessages.length > 0) { folder.close(true); } else { // do whatever was chosen in the conf folder.close( delete ); } } COM: <s> close a particular folder </s>
funcom_train/50911828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOfLargestElementInColumn(int jcol) throws EuclidRuntimeException { checkColumn(jcol); int imax = -1; double max = Double.NEGATIVE_INFINITY; for (int irow = 0; irow < rows; irow++) { if (max < flmat[irow][jcol]) { max = flmat[irow][jcol]; imax = irow; } } return imax; } COM: <s> get index of largest element in column </s>
funcom_train/37203501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { DataConstraint dc2 = (DataConstraint) o; if (source.isSource() && dc2.getSource().isSource() == false) { return -1; } if (sink.isSink() && dc2.getSink().isSink() == false) { return 1; } return toString().compareTo(dc2.toString()); } COM: <s> use the to string as the comparable </s>
funcom_train/4300630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void replace(Node x, Node n) throws HsqlException { if (x.equals(root)) { root = n; if (n != null) { n.setParent(null); } } else { set(x.getParent(), x.isFromLeft(), n); } } COM: <s> replace two nodes </s>
funcom_train/20368481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closeTabAtPoint(Point point) { int tab = tabs.indexAtLocation(point.x, point.y); if(tab < 0 || tab >= tabs.getTabCount()) { return; } ResultsPanel resultsPanel = (ResultsPanel) tabs.getComponent(tab); context.close(resultsPanel); } COM: <s> close tab at the actions point </s>
funcom_train/31586871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ExpressionLocation makeLocator(int offset) { int line = t.getLineNumber(offset); int column = t.getColumnNumber(offset); ExpressionLocation loc = new ExpressionLocation(); loc.setSystemId(env.getSystemId()); loc.setLineNumber(line); loc.setColumnNumber(column); return loc; } COM: <s> make a locator object representing a specific parsing location </s>
funcom_train/24220101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fill(Connection con, String schemaname, String[] tables) throws SQLException { DatabaseMetaData dbmd = con.getMetaData(); for (int i = 0; i != tables.length; i++) { Table tb = getTable(dbmd, schemaname, tables[i], null, 1); tableList.put(tables[i], tb); } } COM: <s> primary fill all structures for tables list </s>
funcom_train/15663082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ApplicationsBean decodeRow(ResultSet rs) throws DAOException { ApplicationsBean bean = createApplicationsBean(); try { bean.setAppid(Manager.getInteger(rs, 1)); bean.setAppname(rs.getString(2)); } catch(SQLException e) { throw new DataAccessException(e); } bean.isNew(false); bean.resetIsModified(); return bean; } COM: <s> transforms a result set iterating on the applications on a applications bean bean </s>
funcom_train/37758139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChar(int row, int col, char val) { char[] c = getLine(row); if (c == null) { return; } if (col >= c.length && col < lineWidth) { char[] cc = new char[lineWidth]; System.arraycopy(c, 0, cc, 0, c.length); setLine(row, cc); } c[col] = val; } COM: <s> set a character </s>
funcom_train/32762472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append( "Variable: " + _name + ", " ); buffer.append( "Initial Value: " + _initialValue + ", " ); buffer.append( "Lower Limit: " + _lowerLimit + ", " ); buffer.append( "Upper Limit: " + _upperLimit ); return buffer.toString(); } COM: <s> a string for displaying a variable </s>
funcom_train/18759189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JoinTable getJoinTablebyAlias( char cAlias ) { for ( int iX = 0; vJoinTable != null && iX < vJoinTable.size(); iX++ ) { JoinTable jt = vJoinTable.get( iX ); if ( jt.getAlias() == cAlias ) return jt; } throw new Message( "sy.alias_not_found", cAlias + "" ); } COM: <s> obtain a join table object for the table given by c alias </s>
funcom_train/9710418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BindingOperationEntry find(List boes, BindingOperation bo) { for (int i=0; i < boes.size(); i++) { BindingOperationEntry boe = (BindingOperationEntry) boes.get(i); if (boe.getBindingOperation() == bo) { return boe; } } return null; } COM: <s> find binding operation entry </s>
funcom_train/44734616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getSiderealTime(double jd) { if (englishName.equals(EARTH_NAME)) { return SideralTime.getApparentSiderealTime(jd); } double t = jd - re.epoch; double rotations = t / re.period; double wholeRotations = floor(rotations); double remainder = rotations - wholeRotations; return remainder * 360 + re.offset; } COM: <s> compute the z rotation to use from equatorial to geographic coordinates </s>
funcom_train/16397971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSolveEmpty() { System.out.println("testSolveEmpty"); Puzzle puzzle = PuzzleFactory.newInstance(PuzzleTypeEnum.TINY); TinySolver solver = new TinySolver(puzzle); try { solver.solveEntirePuzzle(); fail("Empty grid should be unsolveable"); } catch (UnsolveablePuzzleException expected) { // do nothing } } COM: <s> test of class net </s>
funcom_train/7384944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void decodeChildren(mxCodec dec, Node node, Object obj) { Node child = node.getFirstChild(); while (child != null) { if (child.getNodeType() == Node.ELEMENT_NODE && !processInclude(dec, child, obj)) { decodeChild(dec, child, obj); } child = child.getNextSibling(); } } COM: <s> decodec all children of the given node using decode child </s>
funcom_train/21507287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initGUI() { // Get the size of the default screen Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); // Server GUI logText = new JTextArea(); logText.setEditable(false); JScrollPane scrollPane = new JScrollPane(logText); add(scrollPane, BorderLayout.CENTER); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setSize(DIMENSIONS.x,DIMENSIONS.y); setTitle(TITLE_TEXT); setVisible(true); setLocation(dim.width/2 - getWidth()/2, dim.height/2 - getHeight()/2 - 200); } COM: <s> creates a jpanel to display information about server activity </s>
funcom_train/50151010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendEmail() { if ((eTo==null)||(eTo.length()==0)) System.out.println("Error sending e-mail . . . unknown destination address!"); else if ((eSubj==null)||(eSubj.length()==0)) System.out.println("Error sending e-mail . . . unknown subject!"); else if ((eMsg==null)||(eMsg.length()==0)) System.out.println("Error sending e-mail . . . unknown Message!"); else { Thread run=new Thread(this); run.start(); } } COM: <s> sends the e mail after populating all fields adding all attachments </s>
funcom_train/18059161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String get_key( List<Integer> stack ) { StringBuilder sb = new StringBuilder(); Iterator<Integer> iter = stack.iterator(); while ( iter.hasNext() ) { sb.append( Character.toChars( iter.next() )); } return sb.toString(); } COM: <s> constructs the key from the series of entries in the key codepoint </s>
funcom_train/13496523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String readLine(final PushbackInputStream input) throws IOException { final StringBuilder line = new StringBuilder(); int c; while ((c = read(input)) != CR) { if (c == -1) throw new EOFException(); line.append((char)c); } c = read(input); if (c == -1) throw new EOFException(); return line.toString(); } COM: <s> reads a line from the requests body skipping the terminating crlf </s>
funcom_train/21482628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addToReplicationQueue(CacheEventMessage cacheEventMessage) { if (!replicationThread.isAlive()) { LOG.error("CacheEventMessages cannot be added to the replication queue" + " because the replication thread has died."); } else { synchronized (replicationQueue) { replicationQueue.add(cacheEventMessage); } } } COM: <s> adds a message to the queue </s>
funcom_train/25656989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RGHTMLPageVisitor getVisitor(String pageurl) { RGHTMLPageVisitor visitor = new RGHTMLPageVisitor(strippedContentDelimiter, pageurl); visitor.setIncTitle(incTitle); visitor.setIncImage(incImage); visitor.setIncBase(incBase); visitor.setIncLink(incLink); visitor.setIncMeta(incMetaData); return visitor; } COM: <s> help to create a rghtmlpage visitor object </s>
funcom_train/43325949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void df( String format, Object... args ) { if (debug == false) return; long millis = System.currentTimeMillis() % NumMillis; System.out.print( c.GREEN + c.BOLD + "DEBUG: " + millis + " " + c.REMOVE ); System.out.printf( format, args ); } COM: <s> prints without a newline using printf and a debug header </s>
funcom_train/25033955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void skipInsistently(long length) throws IOException { long remaining = length; while (remaining > 0) { //System.err.println("skipInsistently(): looping remaining="+remaining); long bytesSkipped = in.skip(remaining); //System.err.println("skipInsistently(): asked for ="+remaining+" got="+bytesSkipped); if (bytesSkipped <= 0) throw new IOException("skip failed with "+remaining+" bytes remaining to be skipped, wanted "+length); remaining-=bytesSkipped; } } COM: <s> p skip as many bytes as requested unless an exception occurs </s>
funcom_train/26176813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showSummary (Map map) { int tagletCount= 0; this.logger.debug("Taglet map:"); final Iterator i= map.keySet().iterator(); while (i.hasNext()) { final String name= (String) i.next(); final Object taglet= map.get(name); if (taglet instanceof ConvertedTaglet) { this.logger.debug("- " + name + " (simple taglet)."); tagletCount++; } else { this.logger.debug("- " + name + " (standard tag)."); } } this.logger.info( String.valueOf(tagletCount) + " taglets installed." ); } COM: <s> prints the installation summary for the specified installation map </s>