__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3599056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(int aValue) { if(aValue < iMinimum) { throw new IllegalArgumentException("Cannot progress to a value (" + aValue + ") that is less than the minimum (" + iMinimum + ")!"); } jpbProgress.setValue(aValue); if(aValue >= iMaximum) { this.setVisible(false); this.dispose(); } } COM: <s> this method basically tells the progressbar to move on </s>
funcom_train/50113931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long skipHandler(long counter, InputStream input, int level) throws Exception { skipped = skipped + input.skip(counter); if (skipped != level) { long dif = level - skipped; //ResumeTab.statusField.setText("Read "+dif +" bytes from Previous Resume File"); skipHandler(dif, input, level); } return skipped; } COM: <s> used to skip over the download already read </s>
funcom_train/47891973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int calculateRanks() { PackageDecl p = PackageDecl.getDefaultPackage(); int i; visitor.setMethods(true); visitor.setConstructors(true); visitor.setPropagateRank(true); for (i = 0; !visitor.hasConverged() && i < 1000; i++) { p.accept(visitor); } methodRanks = visitor.getMethodRanks(); for (i = 0; !hasConverged() && i < 1000; i++) { p.accept(this); } return i; } COM: <s> use the method rank visitor to get all the method ranks </s>
funcom_train/4385690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Double amsler(Integer id1, Integer id2) { if(id1.equals(id2)) return new Double(1); if(id2.intValue()>id1.intValue()) { Integer id3 = id1; id1 = id2; id2 = id1; } Double aux = (Double)(((Map)(scores.get(id1))).get(id2)); if(aux.intValue()<0) return computeAmsler(id1,id2); return aux; } COM: <s> returns the amsler score between two given link identifyers </s>
funcom_train/39023850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attribute(String name, Object value) { if (_attributesMode) { _sb.append(' '); _sb.append(name); _sb.append("=\""); if (value != null) { _sb.append(toXMLAttributeValue(value.toString())); } _sb.append("\""); } } COM: <s> adds attribute if attributes mode is setwhen opening tag </s>
funcom_train/27822835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getApplicationFields(String filter) throws KAONException { Set result=new HashSet(); Iterator iterator=filterEntitiesOnSingleProperty(OMO_ApplicationField,OMO_applicationFieldName,filter); while (iterator.hasNext()) { ApplicationField applicationField=getApplicationField((String)iterator.next()); result.add(applicationField); } return result.iterator(); } COM: <s> returns all application fields that match the given filter string </s>
funcom_train/13318005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectionChanged(IAction action, ISelection selection) { super.selectionChanged(action, selection); if (project != null) { try { IProjectDescription descr = project.getProject().getDescription(); action.setEnabled(!descr.hasNature(RMIProjectNature.NATURE_ID) && descr.hasNature(JavaCore.NATURE_ID)); } catch (CoreException e) { action.setEnabled(false); } } } COM: <s> this action is enabled only for projects that dont already </s>
funcom_train/7273895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { boolean retBool = false; if (o instanceof GUESSEndpoint) { GUESSEndpoint ep = (GUESSEndpoint) o; retBool = (getAddress().equals(ep.getAddress())) && (getPort() == ep.getPort()); } return retBool; } COM: <s> returns true if two guessendpoint objects are equal </s>
funcom_train/49823633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean confirmTelemetryHost(String hostName) { logger.info("setting telemetry host as " + hostName); if (TelemetryClient.isHost(hostName)) { logger.info("Telemetry host confirmed at " + hostName); return true; } else { this.exceptionMessage = "unable to confirm telemetry host at " + hostName; logger.info("unable to confirm Telemetry host at " + hostName); return false; } } COM: <s> confirms telemetry host </s>
funcom_train/20828015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getProbability(Alignable performer, Alignable target) { int probability = 0; if (performer != null && target != null) { double compatibility = performer.compatability(target); int investigativePower = (int) (5*performer.getInfluence()+ 30); int difficulty = (int) (2*target.getInfluence()); probability = (int) (investigativePower-difficulty + 20*compatibility); } if (probability < 0) return 3; else if (probability > 100) return 100; else return probability; } COM: <s> probability increases based on performers group size and compatibility and </s>
funcom_train/5601883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDefault() { ChildProcess childProcess = new ChildProcess(); String command[] = buildJavaCommand(CLASS_NAME); childProcess.setCommand(command); childProcess.setDebug(true); int exitValue = childProcess.run(); assertEquals("Expected child process to end normally instead of " + exitValue, 0, exitValue); } COM: <s> test a default child process </s>
funcom_train/3316939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadBreadCrumbs(PageInfo pageInfo, List breadCrumbs) { PageInfo parent = pageInfo.getParent(); if (parent == null || parent.getName().equals("")) return; breadCrumbs.add(0, parent.getName()); loadBreadCrumbs(parent, breadCrumbs); } COM: <s> load bread crumbs </s>
funcom_train/14180029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Element getElement() { Element element = new Element("player"); element.addContent(alhambra.getElement()); Iterator<MoneyCard> moneyCardIterator = moneyCards.iterator(); while (moneyCardIterator.hasNext()) { element.addContent(MoneyCard.writeMoneyCard(moneyCardIterator.next())); } Iterator<Building> buildingIterator = reserveField.iterator(); while (buildingIterator.hasNext()) { element.addContent(Building.writeBuilding(buildingIterator.next())); } return element; } COM: <s> create an element containing the data of this player </s>
funcom_train/32769850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getCenterPanel() { if (centerPanel == null) { try { centerPanel = new JPanel(); centerPanel.setLayout(new BorderLayout()); centerPanel.add(getJPanel1(), BorderLayout.SOUTH); centerPanel.add(getJTabbedPane(), BorderLayout.CENTER); } catch (OpenJCADPreferenceNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return centerPanel; } COM: <s> this method initializes center panel </s>
funcom_train/1846465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format(String date, String inFormatPattern, String outFormatPattern) { String outDate = ""; try { Date d1 = convertStringToDate(date, inFormatPattern); SimpleDateFormat outDateF = new SimpleDateFormat(outFormatPattern); outDate = outDateF.format(d1); } catch(Exception e) { outDate = "Error processing date"; } return outDate; } COM: <s> formats the date string using the specified format pattern p </s>
funcom_train/10505201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFileSeparator(String sep) { if (sep == null || sep.length() != 1) { throw new IllegalArgumentException( "File Separator has to be a single character and not " + sep); } ((SshRepository) getRepository()).setFileSeparator(sep.trim().charAt(0)); } COM: <s> sets the path separator used on the target system </s>
funcom_train/39406134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelPreAuthorizedPaymentTable() { if (jPanelPreAuthorizedPaymentTable == null) { jPanelPreAuthorizedPaymentTable = new JPanel(); jPanelPreAuthorizedPaymentTable.setLayout(new BorderLayout()); jPanelPreAuthorizedPaymentTable.add(getJScrollPane(), java.awt.BorderLayout.CENTER); } return jPanelPreAuthorizedPaymentTable; } COM: <s> this method initializes j panel pre authorized payment table </s>
funcom_train/20324538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeLink(WordLink x) { if(x.getOneEnd() == this){ if(links.remove(((WordNode)x.getTheOtherEnd()).getWord()) != null){ return true; }else{ return false; } }else{ if(links.remove(((WordNode)x.getOneEnd()).getWord()) != null){ return true; }else{ return false; } } } COM: <s> removes the link </s>
funcom_train/9502393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(GeoElement geo) { remove(geo, true); // close dialog if no elements left if (root.getChildCount() == 0) { closeDialog(); return; } // make sure something is selected if (getSelectionModel().isSelectionEmpty()) selectFirstElement(); } COM: <s> removes an element from the list </s>
funcom_train/51628317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void arrange(LocalVariable[] variables) { Arrays.sort(variables, new Comparator() { public int compare(Object o1, Object o2) { return rank((LocalVariable) o1) - rank((LocalVariable) o2); } private int rank(LocalVariable l) { return fUsedNames.contains(l.getName()) ? 1 : 0; } }); } COM: <s> sorts already used locals behind any that are not yet used </s>
funcom_train/45502873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLevel( Direction relPosition, Level level ) { if( this.room.existsCellAt( x + relPosition.xOffset(), y + relPosition.yOffset() ) ) { this.room.getCell( x + relPosition.xOffset(), y + relPosition.yOffset() ).internalSetLevel( relPosition.invert(), level.getInverse() ); } internalSetLevel( relPosition, level ); } COM: <s> specifies the level difference between this cell and the cell </s>
funcom_train/1170141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CardList getSets(ArrayList<String> sets) { CardList list = new CardList(); for (Card c : this) { for (SetInfo set : c.getSets()) if (sets.contains(set.toString())) { list.add(c); break; } } return list; }//getSets() COM: <s> p get any cards that exist in the passed in sets list </s>
funcom_train/1358806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeBackgroundImage(String image, String brainparts){ //load new image try{ img = new ImageIcon(new URL(NeuronVis2D.url, image)); }catch(Exception e){} //reset image info this.imgx = img.getIconWidth(); this.imgy = img.getIconHeight(); this.BrainParts = brainparts; //pdx=0; //pdy=0; //transx=0; //transy=0; //panx = 0; //pany = 0; iszoom = 1; imgscale = 1; //change offset NeuronVis2D.setOffSet(pdx, pdy); repaint(); } COM: <s> change background image </s>
funcom_train/31740238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Point getPreferredLocation(){ Dimension ownerSize = this.getOwnerSize(); Dimension preferredSize = this.getPreferredSize(); Point preferredLocation = new Point(); preferredLocation.x = (ownerSize.width - preferredSize.width) / 2; preferredLocation.y = (ownerSize.height - preferredSize.height) / 2; return preferredLocation; } COM: <s> gets the preferred location of this frame </s>
funcom_train/26019559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addImdnHeaders(SipRequest invite, String msgId) { if (!activated) { return; } invite.addHeader(CpimMessage.HEADER_NS, ImdnDocument.IMDN_NAMESPACE); invite.addHeader(ImdnUtils.HEADER_IMDN_DISPO_NOTIF, ImdnDocument.POSITIVE_DELIVERY + ", " + ImdnDocument.NEGATIVE_DELIVERY + ", " + ImdnDocument.DISPLAY); invite.addHeader(ImdnUtils.HEADER_IMDN_MSG_ID, msgId); } COM: <s> add imdn headers </s>
funcom_train/3471077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStartTime(Block block, long startTime) { assert(block != null); assert(startTime >= 0); assert(blockStartTimes.containsKey(block)); // change the blockStartTimes and the blockEndTimes this.blockStartTimes.put(block, new Long(startTime)); block.tellStartTime(startTime); calculateRecordEndTimes(); } COM: <s> sets the start time of the given block </s>
funcom_train/21848552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu createLookAndFeelMenu() { m_lfmenu.removeAll(); DefaultLookAndFeelManager lfm = (DefaultLookAndFeelManager) JETARegistry .lookup(DefaultLookAndFeelManager.COMPONENT_ID); Iterator iter = lfm.getDefaultLookAndFeels().iterator(); while (iter.hasNext()) { LookAndFeelInfo lf = (LookAndFeelInfo) iter.next(); createLookAndFeelMenuItem(lfm, lf); } return m_lfmenu; } COM: <s> creates the look and feel submenu </s>
funcom_train/5265187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public PublicKey decodeRSAPublicKey(byte[] ekey) { try { X509EncodedKeySpec spec = new X509EncodedKeySpec(ekey); KeyFactory factory = KeyFactory.getInstance("RSA", "BC"); return (RSAPublicKey) factory.generatePublic(spec); } catch (Throwable t) { Logger.getLogger("").log(Level.SEVERE, null, t); assert false; return null; } } COM: <s> convert a byte array to a rsa public key </s>
funcom_train/45129939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(WebRequest request, ErrorGroup errorGroup) { String value = getValue(request); Iterator valIt = validators.iterator(); try { while (valIt.hasNext()) { Validator val = (Validator) valIt.next(); val.validate(value); } } catch (ValidationException ve) { errorGroup.addKey(ve.getErrorKey(), this); } } COM: <s> validate the field applying each registered validator </s>
funcom_train/33850755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearStack() { if (!isValid()) throw new IllegalStateException("accessing top or bottom frame"); assert slotList.size() >= numLocals; if (slotList.size() > numLocals) slotList.subList(numLocals, slotList.size()).clear(); } COM: <s> clear the java operand stack </s>
funcom_train/41302314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchDisplayable(Alert alert, Displayable nextDisplayable) { if (R.getErrorScreen().isNoErrorOrViewed()) { Display display = Display.getDisplay(this); if (alert == null) { display.setCurrent(nextDisplayable); } else { display.setCurrent(alert, nextDisplayable); } } } COM: <s> switches a current displayable in a display </s>
funcom_train/48336391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DataObject runInterpreterMethod(DataObject data, String error) { String name = data.getName(); Error err = new Error(error); if (err.getError() == null) { err.setError(Error.UNKNOWN_METHOD_ERROR); } Vector v = new Vector(); v.addElement(err.toDataObject()); return new DataObject(data.getName()); } COM: <s> this is an empty method that should be overridden by objects </s>
funcom_train/3556178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PropertyList getList(char startChar) { // get the list: here we try a very fast access for the ASCII characters // via unchecked access and caught exceptions PropertyList list; try { // direct indexed sequence list = _asciiArray[startChar]; } catch (IndexOutOfBoundsException ex) { // mapped sequence list = (PropertyList)_nonASCIIMap.get(new Character(startChar)); } return list; } COM: <s> get the property list for a given character </s>
funcom_train/33418226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void scanString(final StringBuffer string) throws IOException { final char delimiter = this.readChar(); if ((delimiter != '\'') && (delimiter != '"')) { throw this.expectedInput("' or \""); } for (;;) { final char ch = this.readChar(); if (ch == delimiter) { return; } else if (ch == '&') { this.resolveEntity(string); } else { string.append(ch); } } } COM: <s> this method scans a delimited string from the current reader </s>
funcom_train/10369338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printSearchEnumeration(NamingEnumeration ne) { try { while (ne.hasMore()) { SearchResult sr = (SearchResult) ne.next(); System.out.println("-->" + sr.getName()); System.out.println(sr.getAttributes()); } } catch (NamingException e) { e.printStackTrace(); } } COM: <s> dump search enumeration </s>
funcom_train/12809211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void normalizeIndentation() { float max = 0; for (Element o : list) { if (o instanceof ListItem) { max = Math.max(max, ((ListItem)o).getIndentationLeft()); } } for (Element o : list) { if (o instanceof ListItem) { ((ListItem)o).setIndentationLeft(max); } } } COM: <s> makes sure all the items in the list have the same indentation </s>
funcom_train/41165042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(MaSingleTextForm2 entity) { EntityManagerHelper.log("deleting MaSingleTextForm2 instance", Level.INFO, null); try { entity = getEntityManager().getReference(MaSingleTextForm2.class, entity.getSingleTextFormId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent ma single text form2 entity </s>
funcom_train/22950142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetDeltas(){ Iterator<NeuronLayer> layerIterator = this.neuronLayers.iterator(); while (layerIterator.hasNext()){ Iterator<Neuron> neuronIterator = layerIterator.next().neuronList().iterator(); while (neuronIterator.hasNext()){ neuronIterator.next().setCurrentDelta(0); } } } COM: <s> resets deltas of all synapses by setting to 0 </s>
funcom_train/7422985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private YMIDataOutput mapMiDataOutput(YDecomposition decomposition, YVariable local) { YMIDataOutput miDataOutput = new YMIDataOutput(); miDataOutput.setFormalOutputExpression("/" + decomposition.getID() + "/" + local.getName()); miDataOutput.setOutputJoiningExpression(" "); miDataOutput.setResultAppliedToLocalVariable(local); return miDataOutput; } COM: <s> generates a yawl midata output object with variable mapping rules </s>
funcom_train/39998639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPane() { if (jTabbedPane == null) { jTabbedPane = new JTabbedPane(); jTabbedPane.addTab("Problems", null, getJTextPane(), null); jTabbedPane.addTab("Console", null, getTeaConsoleScrollPane(), null); } return jTabbedPane; } COM: <s> this method initializes j tabbed pane </s>
funcom_train/2587355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String toString(final float[] dashArray) { final StringBuffer buffer = new StringBuffer(); for (int i = 0; i < dashArray.length; i++) { final float f = dashArray[i]; if (i != 0) { buffer.append(','); } buffer.append(f); } return buffer.toString(); } COM: <s> a utility method that converts a dash array from a </s>
funcom_train/21611175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean compareFormalParameters(FormalParameter[] a, FormalParameter[] b) { if(a.length != b.length) { return false; } for(int i = 0; i < a.length; i++) { if( ! a[i].equals(b[i]) ) { return false; } } return true; } COM: <s> compares two lists of formal parameters </s>
funcom_train/39870232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleStartListening(Intent recognizerIntent) { if (!checkOpenConnection()) { return; } try { mService.startListening(recognizerIntent, mListener); if (DBG) Log.d(TAG, "service start listening command succeded"); } catch (final RemoteException e) { Log.e(TAG, "startListening() failed", e); mListener.onError(ERROR_CLIENT); } } COM: <s> sends the actual message to the service </s>
funcom_train/2537023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int searchLevelsOne(MTComponent c) { //Search all above levels for instance of Selector int numberOfLevels = numberOfLevels(c); try { if (numberOfLevels > 1) { for (int i = 2; i <= numberOfLevels; i++) { if (isMatch(primaryType, primary, getComponentAtLevel(c,i))) { return 99 - i; } } } } catch (Exception e) { } return 0; } COM: <s> searches whether a parent matches the primary part of the selector </s>
funcom_train/44779203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { try { createMenus(); setLayout(new BorderLayout()); myToolBar = getToolBar(); add(myToolBar, BorderLayout.NORTH); add(getWorkspace(), BorderLayout.CENTER); // TERRY - FONT STUFF //Browser.setUIFont(myFont); } catch (Throwable ivjExc) { ivjExc.printStackTrace(); } } COM: <s> initialize the class </s>
funcom_train/26101834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkCondition() { if (!ifCondition.equals("")) { String ifProperty = getProject().getProperty(ifCondition); return ifProperty == null ? false : true; } if (!unlessCondition.equals("")) { String unlessProperty = getProject().getProperty(unlessCondition); return unlessProperty == null ? true : false; } return true; } COM: <s> check if and unless condition before run test case </s>
funcom_train/45809884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exportTopics(Iterator<TopicIF> it) throws IOException { while (it.hasNext()) { TopicIF topic = it.next(); if (!setup) { serializer.setup(topic.getTopicMap()); setup = true; } serializer.write(topic); for (AssociationRoleIF role : topic.getRoles()) serializer.write(role.getAssociation()); } } COM: <s> public exports all the topics returned by the iterator </s>
funcom_train/50813599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processNoImprovementFound( Problem problem ) throws EngineException { if( problem.getEngine().getTabuList().getSize() == problem.getEngine().getTabuList().getCapacity() ) { problem.getRandomConfigurator().configure( 1.0f ) ; problem.getEngine().getTabuList().clear() ; } } COM: <s> reconfigures the buisness objects with a rate of 1 and clear the </s>
funcom_train/7678988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePeoplePrimary(Long personId, String column, Long primaryId) { mValuesLocal.clear(); mValuesLocal.put(column, primaryId); getDatabase().update(sPeopleTable, mValuesLocal, "_id=" + personId, null); } COM: <s> set the specified primary column for the person </s>
funcom_train/32764771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTableToGroup( final DataTable newTable, final String group ) { String name = newTable.name(); TABLE_MAP_BY_NAME.put( name, newTable ); Collection tableSet = tableSetForGroup(group); tableSet.add(newTable); NOTICE_PROXY.tableAdded( this, newTable ); } COM: <s> add the table to the edit context </s>
funcom_train/11387838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder sb = new StringBuilder(); sb.append(trackerName); sb.append("\t"); sb.append(reasonForBlackListing); sb.append("\t"); sb.append(blackListReport.replace("\n", ":")); return sb.toString(); } COM: <s> print information related to the blacklisted tasktracker in a </s>
funcom_train/39255932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean insert() throws Exception { boolean bRes = false; Connection oConn = Data.getConnection(); ResultSet oRS = Data.getResultSet("SELECT * FROM \"fInsertNewNote\"("+owner+",'"+note+"',"+task+")",oConn); if(oRS.next()) { int res = oRS.getInt(1); id = res; bRes = true; } oRS.close(); oConn.close(); return bRes; } COM: <s> this simply inserts a new note </s>
funcom_train/45302207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateList() { //retrieve the selected index int selIndex; selIndex = cvsRootsList.getSelectedIndex(); //if it has a meaningful value if (selIndex > -1) { //set the new CVS Root listModel.set(selIndex, cvsRoot.getText()); //repaint the whole list cvsRootsList.repaint(); } } COM: <s> update the cvs roots list </s>
funcom_train/46301199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(File path) { try { _log.info("loading stif from " + path.getAbsolutePath()); InputStream in = new FileInputStream(path); if (path.getName().endsWith(".gz")) in = new GZIPInputStream(in); run(in); } catch (IOException e) { throw new RuntimeException("Error loading " + path, e); } } COM: <s> for each stif file call run </s>
funcom_train/46261641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { IDrawingObjectLink current=lastObject; while(current!=null){ current.o.drawMe(imageBufferGraphics); current=current.prev; } if(currentTool.getClass() != SelectTool.class)magicBox.active=false; magicBox.drawMe(imageBufferGraphics); g.drawImage(imageBuffer,0, 0, this); imageBuffer = createImage(canvasWidth, canvasHeight); imageBufferGraphics = imageBuffer.getGraphics(); } COM: <s> draws the list of objects to the canvas </s>
funcom_train/40312395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsReadOnly_InvalidColumn3() { try { ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry); resMetaData.isReadOnly(10); fail("SQLException is expected."); } catch(SQLException e) { //ensure the SQLException is thrown by isReadOnly method. assertEquals("The sqlstate mismatches", "22003", e.getSQLState()); } } COM: <s> tests is read only with column index larger than the number of column </s>
funcom_train/49247108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean verify(File file, ByteArrayOutputStream os) throws IOException, UnsupportedEncodingException { String org = getFileContent(file); String processed = new String(os.toByteArray(), "UTF-8"); if (org.equals(processed)) { ok.add(file.getName()); return true; } else { failed.add(file.getName()); return false; } } COM: <s> compares the parsed and dumped result with the original file </s>
funcom_train/3416099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int x() { int n = read(); if (ASCII.isHexDigit(n)) { int m = read(); if (ASCII.isHexDigit(m)) { return ASCII.toDigit(n) * 16 + ASCII.toDigit(m); } } throw error("Illegal hexadecimal escape sequence"); } COM: <s> utility method for parsing hexadecimal escape sequences </s>
funcom_train/10597702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean exists() { try { connect(); int rc = servletConnection.getResponseCode(); return rc == HttpServletResponse.SC_OK || rc == HttpServletResponse.SC_FOUND || rc == HttpServletResponse.SC_NOT_MODIFIED; } catch (Exception e) { if (logger.isDebugEnabled()) logger.debug("Exception occured while making servlet request", e); return false; } } COM: <s> returns true always </s>
funcom_train/37721407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invokeStatusUpdate(final String aMessage) { try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { SplashWindow.this.updateStatus(aMessage); } }); } catch (Exception e) { log.warn("Error occured while updating splash message", e); } } COM: <s> invoke an status message update </s>
funcom_train/22798425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getHistory(QueryBits query, Integer issueId) throws DatabaseException { QueryHelper queryHelper = new QueryHelper(IssueQueries.selectIssueHistoryQuery(query)); queryHelper.addInputInt(ObjectTypes.ISSUE); queryHelper.addInputInt(issueId); queryHelper.addInputInt(issueId); queryHelper.addInputInt(issueId); return executeQueryReturnList(queryHelper); } COM: <s> get a list of issue history for a given issue id </s>
funcom_train/45867551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { synchronized (panel) { // this call will call paintComponent to paint the buffer super.paint(g); Graphics2D g2 = (Graphics2D) g; Insets in = getInsets(); int x = in.left; int y = in.top; g2.translate( x, y); panel.paintOver(g2); g2.translate(-x, -y); } } COM: <s> p paints the component and then adds the work done by the </s>
funcom_train/3361202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void truncate(long length) throws SerialException { if (length > len) { throw new SerialException ("Length more than what can be truncated"); } else if((int)length == 0) { buf = new byte[0]; len = length; } else { len = length; buf = this.getBytes(1, (int)len); } } COM: <s> truncates the code blob code value that this code blob code </s>
funcom_train/43818347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFinalParamForIdForViewDatesInList() { if (Utilities.getInstance().datesId != null) { if (!Utilities.getInstance().datesId.isEmpty() && Utilities.getInstance().datesId.size() > 0) { return true; } else { return false; } } else { return false; } } COM: <s> checks if is final param for id for view dates in list </s>
funcom_train/31342185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLong(int index) throws JSONException { Object object = get(index); try { return object instanceof Number ? ((Number) object).longValue() : Long.parseLong((String) object); } catch (Exception e) { throw new JSONException(NLS.bind("JSONArray[{0}] is not a number.", index)); //$NON-NLS-1$ } } COM: <s> get the long value associated with an index </s>
funcom_train/13220358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean collectionBuilderExists(Object parent, Class nodeType, String nodeName) { if ( CollectionBuilderFactory.isCollectionType(getCurrentArgumentType()) ) { String attributeName = CollectionBuilderFactory.getCollectionBuilder(nodeName, nodeType).getCollectionAttributeName(nodeName); return collectionBuilders.containsKey(new CollectionBuilderKey(parent, attributeName)); } return false; } COM: <s> returns true if a collection builder already being used for current node </s>
funcom_train/41332884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fill(Graphics2D g, Shape s) { Rectangle bounds = s.getBounds(); int width = bounds.width; int height = bounds.height; BufferedImage bimage = Effect.createBufferedImage(width, height, true); Graphics2D gbi = bimage.createGraphics(); gbi.setColor(Color.BLACK); gbi.fill(s); g.drawImage(applyEffect(bimage, null, width, height), 0, 0, null); } COM: <s> paint the effect based around a solid shape in the graphics supplied </s>
funcom_train/39176735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int rowIndex, int columnIndex) { switch(columnIndex) { case 0: // required? if(optionalParameterNames.contains(getValueAt(rowIndex, 1))) { return Boolean.FALSE; } else { return Boolean.TRUE; } case 1: // name return allParameterNames.get(rowIndex); default: throw new IndexOutOfBoundsException("Illegal column number " + columnIndex); } } COM: <s> get the value for a given cell of the table </s>
funcom_train/3882906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LangstringType_value_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LangstringType_value_feature", "_UI_LangstringType_type"), ImsMdRootv1p1Package.Literals.LANGSTRING_TYPE__VALUE, true, true, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the value feature </s>
funcom_train/46160296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unloadRecording(String tapeName) { logger.getLogger().info("unload recording: " + tapeName); ReplayChanges rc = replayers.get(tapeName); if (rc != null) { logger.getLogger().info("aborting: " + rc); ctxFactory.joinTransaction().abortRunnable(rc); replayers.remove(tapeName); } } COM: <s> unload the recording </s>
funcom_train/12560368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void endMIDlet0() { midlet[0].notifyDestroyed(); // Since we are calling MIDlet.notifyDestroyed(), MIDlet.destroyApp() // will not be called by System. So make it up here. try { ((DummyMIDlet)midlet[0]).destroyApp(true); } catch (MIDletStateChangeException ignore) {} } COM: <s> terminates dummy midlet </s>
funcom_train/21954809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendMessages(long[] uids) throws IOException { BufferedWriter out = null; try { out = openCacheFile(); if (uids.length > 0) { out.write(APPEND_MSG); out.newLine(); for (int i = 0; i < uids.length; i++) { out.write(Long.toString(uids[i])); out.newLine(); } out.write(DONE_MSG); out.newLine(); } } finally { if (out != null) closeCacheFile(out); else lock = false; } } COM: <s> notes the given uids as needing to be appended to the server </s>
funcom_train/2760973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EvalState getEvalState() { for(int i = _eventInvocations.length -1; i >= 0; i-- ) { if(_eventInvocations[i].getStepEvalState() != null) { return _eventInvocations[i].getStepEvalState(); } } return EvalState.PENDING; } COM: <s> returns the step eval state </s>
funcom_train/38513404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setType(Enum pType) { if (pType != null && type.getClass() != pType.getClass()) { type = pType; removeAllItems(); for (int i = 0; i < type.getInstances().length; i++) { Object o = type.getInstances()[i]; addItem(o); } } } COM: <s> sets a new enumeration type </s>
funcom_train/47988622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPane() { if (jTabbedPane == null) { jTabbedPane = new JTabbedPane(); jTabbedPane.setName(""); jTabbedPane.addTab("MDC", null, getJPanel(), "Calculates the MCD between two numbers"); jTabbedPane.addTab(null, null, getJPanel1(), null); jTabbedPane.addTab(null, null, getJPanel2(), null); } return jTabbedPane; } COM: <s> this method initializes j tabbed pane </s>
funcom_train/4535350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleConference(String uriMapping) throws Exception { int index = uriMapping.indexOf("xmpp:"); int join = uriMapping.indexOf("?join"); String conference = uriMapping.substring(index + 5, join); ConferenceUtils.joinConferenceOnSeperateThread(conference, conference, null); } COM: <s> handles the uri mapping to join a conference room </s>
funcom_train/20138167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeItem(final String theName) { int n = _myRadioToggles.size(); for (int i = 0; i < n; i++) { if ((_myRadioToggles.get(i)).getName().equals(theName)) { (_myRadioToggles.get(i)).removeListener(this); _myRadioToggles.remove(i); } } updateValues(false); } COM: <s> remove an item from the radio button check box list </s>
funcom_train/4987647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh() { //System.out.println("refresh table with text selection: "+textSelectionTab.selectedTexts); for (ListGridRecord record : records) { if (textSelectionTab.selectedTexts.contains(record)) record.setAttribute("keep", true); else record.setAttribute("keep", false); } //System.out.println("Refresh text table : "+textSelectionTab.selectedTexts); grid.refreshFields(); } COM: <s> update the table but dont change the selection </s>
funcom_train/41178973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStorage() { S_Constructor_Test1 = new Storage("refrigerator", 2, 150); assertEquals("refrigerator", S_Constructor_Test1.getStorageType()); assertEquals(2, S_Constructor_Test1.getStorageNum()); assertEquals(150, S_Constructor_Test1.getNumberOfPlaces()); } COM: <s> test method to check if the storage constructor create a correct object storage </s>
funcom_train/43098300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object buildCompositeStateOnStateMachine(Object statemachine) { if (statemachine instanceof MStateMachine) { MCompositeState state = (MCompositeState) createCompositeState(); state.setStateMachine((MStateMachine) statemachine); state.setName("top"); return state; } throw new IllegalArgumentException("statemachine"); } COM: <s> builds a compositestate as top for some statemachine </s>
funcom_train/1124928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void immediateForagerDeath(Simulation simulation) { if (_state._foragersRemaining > 0 && _state._foragersAlive < _state._foragerPopulationSize) { ButterflyAgent butterfly = createForager(_state._catcher); simulation.addAgentNextTimestep(butterfly); setForagersAlive(_state._foragersAlive + 1); } } COM: <s> release immediately upon the death of the previous forager sequential </s>
funcom_train/22638991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean peformSanityChecks() { if (arguments.option_qx_debug()) { Log.error("You cannot use --qx-debug when creating Palm Pre projects."); return false; } if (appName == null || appName.isEmpty()) { Log.error("Please use --qx-app to specify an application name."); return false; } return arePalmToolsPresent(); } COM: <s> returns whether everything is set for successfully creating and </s>
funcom_train/38540970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2D getNextCyclePositionEstimation() { double x = mTo.getX() + Math.cos(Math.toRadians(mAngle)) * mMagnitude; double y = mTo.getY() + Math.sin(Math.toRadians(mAngle)) * mMagnitude; return new Point2D.Double(x, y); } COM: <s> estimates where the next position will be </s>
funcom_train/28750378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContentid(Long newVal) { if ((newVal != null && this.contentid != null && (newVal.compareTo(this.contentid) == 0)) || (newVal == null && this.contentid == null && contentid_is_initialized)) { return; } this.contentid = newVal; contentid_is_modified = true; contentid_is_initialized = true; } COM: <s> setter method for contentid </s>
funcom_train/38994164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix simplify(){ Matrix result = new Matrix(this.getXDimension(),this.getYDimension()); for(int i = 0; i < this.getXDimension(); i++) for(int j = 0; j < this.getYDimension(); j++) result.setEntry(i, j, this.getEntry(i, j).simplify()); return result; } COM: <s> simplifies every entry </s>
funcom_train/25332435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetResult_CallableStatement_int() throws Exception { CoordinateSystemTypeHandler instance = new CoordinateSystemTypeHandler(); final CallableStatement cs = this.context.mock(CallableStatement.class); int columnIndex = 0; Object result = instance.getResult(cs, columnIndex); assertNull(result); } COM: <s> test of get result method of class coordinate system type handler </s>
funcom_train/3907638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCellEditable(Object node, int column) { VocabularyTreeNode elementNode = (VocabularyTreeNode)node; switch(column) { // Column 0 (the JTree) has to be true so that the TreeTable expands and contracts case 0: return true; case 1: return false; case 2: return false; default: return false; } } COM: <s> determine whether a particular cell is editable </s>
funcom_train/6205262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initDrag() { int ops = DND.DROP_COPY; Transfer[] transfers = new Transfer[] { ResourceTransfer.getInstance(), GaijinTransfer.getInstance() }; IDragSourceTransferDelegate[] delegates = new IDragSourceTransferDelegate[] { new ResourceTransferDragSourceAdapter(getTreeViewer()), new GaijinTransferDragSourceListener(getTreeViewer()) }; getTreeViewer().addDragSupport(ops, transfers, new MultiTransferDragSourceAdapter(delegates)); } COM: <s> intialize drag operations for the part </s>
funcom_train/25440464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendPrimaryKey(StringBuilder stringBuilder) throws IOException { for (DbTable dbTable : ApplicationUtil.getProjectData().getDataBase().getDbTables()) { stringBuilder.append(ddlGeneratorInterface.getSqlTable(dbTable.getName(), false, false, true, false, false, false, false, false, false, ddlIncludeStorageParameter)); } } COM: <s> scrive il file dei constraint </s>
funcom_train/20372766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*public void testSaveTemplate() { System.out.println("SaveTemplate"); Integer result = instance.SaveTemplate("Marcelo", "Teste", new Integer(40), new Integer(1)); assertEquals(new Integer(0), result); }*/ COM: <s> test of save template method of class br </s>
funcom_train/7876426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setYearPosition(int yearPosition) { if (yearPosition == this.yearPosition) { return; } int old = this.yearPosition; this.yearPosition = yearPosition; if (orientation == HORIZONTAL) { remove(abajo); } else { remove(ys); remove(scroll); } layoutScrollAndYear(); firePropertyChange("yearPosition", old, yearPosition); } COM: <s> setter for property year position </s>
funcom_train/21821672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void revertUnchangedFiles(Set<IFile> filesToRevert, IProgressMonitor monitor) { int size = filesToRevert.size(); monitor.beginTask("Reverting unchanged files...", size); CommitReplaceAction action = new CommitReplaceAction(); StructuredSelection selection = new StructuredSelection(filesToRevert.toArray(new IFile[size])); action.revertSelection(selection); monitor.worked(size); monitor.done(); } COM: <s> reverts the unchanged files </s>
funcom_train/9930832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getMin() { if (getAxisAttributes().get("min") == null) { return axisMin; } else { double min = TypeConverter.getDouble( getAxisAttributes().get("min"), axisMin); if (min > axisMin) min = axisMin; return min; } } COM: <s> gets the min </s>
funcom_train/36228648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean openTutorial() { if (app.openTutorial()) { LogEntryList logEntries = app.getLogBook().getLogEntries(); if (!logEntries.isEmpty() && app.getCurrentLogEntry() == null) app.setCurrentLogEntry(logEntries.get(0)); return true; } return false; } COM: <s> opens the tutorial log book </s>
funcom_train/16604631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isControlDwn(int index, int controllerIndex) { switch (index) { case LEFT: return isControllerLeft(controllerIndex); case RIGHT: return isControllerRight(controllerIndex); case UP: return isControllerUp(controllerIndex); case DOWN: return isControllerDown(controllerIndex); } if (index >= BUTTON1) { return isButtonPressed((index-BUTTON1), controllerIndex); } throw new RuntimeException("Unknown control index"); } COM: <s> check if a particular control is currently pressed </s>
funcom_train/16668392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startEdit(Object task) { this.task = task; int row = chart.getTranslator().getRow(task); Rectangle2D bounds = chart.getTaskBounds(task, row, 0, 0); editor = new JTextField(chart.getTranslator().getText(task)); editor.addActionListener(this); editor.addFocusListener(this); editor.setBounds(bounds.getBounds()); editor.setOpaque(true); editor.setHorizontalAlignment(JTextField.CENTER); chart.add(editor); chart.addComponentListener(this); editor.grabFocus(); } COM: <s> invoked when a task is double clicked </s>
funcom_train/12304401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toRSL(StringBuffer buf, boolean explicitConcat) { if ( explicitConcat ) { buf.append( quotify( value ) ); } else { buf.append( value ); } if (concatValue == null) { return; } if (explicitConcat) { buf.append(" # "); } concatValue.toRSL(buf, explicitConcat); } COM: <s> produces a rsl representation of this value </s>
funcom_train/7979976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void kickUpdate() { // TODO: further improve this so that case with hundreds of // thousands or millions of seeds works better without requiring // this specific settings check if (((Boolean) getUncheckedAttribute(null, ATTR_REREAD_SEEDS_ON_CONFIG)) .booleanValue()) { refreshSeeds(); getSettingsHandler().getOrder().getController().getFrontier().loadSeeds(); } } COM: <s> take note of a situation such as settings edit where </s>
funcom_train/39885939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CharBuffer append(CharSequence csq, int start, int end) { if (csq == null) { csq = "null"; } CharSequence cs = csq.subSequence(start, end); if (cs.length() > 0) { return put(cs.toString()); } return this; } COM: <s> writes chars of the given </s>
funcom_train/4644666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNewValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ReferenceModel_newValue_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ReferenceModel_newValue_feature", "_UI_ReferenceModel_type"), TassooPackage.Literals.REFERENCE_MODEL__NEW_VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the new value feature </s>