__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3420799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int isUnchangedByNormalization(XMLString value) { int end = value.offset + value.length; for (int i = value.offset; i < end; ++i) { int c = value.ch[i]; if (XMLChar.isSpace(c)) { return i - value.offset; } } return -1; } COM: <s> checks whether this string would be unchanged by normalization </s>
funcom_train/36855535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getOwner( int assignmentUuid ) throws AssignmentNotFoundException { final EntityManager em = emf.createEntityManager(); AssignmentProperty current = em.find( AssignmentProperty.class, assignmentUuid ); if (current == null) { throw new AssignmentNotFoundException( "uuid: " + assignmentUuid ); } return current.getOwnerId().getPerson().getEmail(); } COM: <s> get the owner of an assignment </s>
funcom_train/10257609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printConstructors() { System.out.println("+++CONSTRUCTORS+++"); CtConstructor[] constructors = cc.getDeclaredConstructors(); for (int i = 0; i < constructors.length; i++) { System.out.println(constructors[i].getName() + " " + constructors[i].getSignature()); } } COM: <s> prints all declared constructors of class </s>
funcom_train/25192226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void increment () { // set the load value to the minimum of 100 or 5 plus the current // value int load = Math.min (100, loadAdvertisement.percentage.intValue () + incrementUnit); // set the new load value into the advertisement loadAdvertisement.percentage = new Integer (load); // log an appropriate message System.err.println (agent.getName () + " increments to " + load); // update the agent agent.modify (); } COM: <s> increment the load value </s>
funcom_train/25657200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopUpdateThread() { log.info("Stopping properties update thread..."); synchronized (IntegratedProperties.RESET_LOCK) { if (null != updateThread) { updateThreadDone = true; log.info("Notifying properties update thread..."); IntegratedProperties.RESET_LOCK.notifyAll(); } } } COM: <s> stops the thread that polls the remote properties for updates </s>
funcom_train/22369426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getUrlToPlay(IAudioObject audioObject, boolean isRemoteAudio) { String url; if (audioObject instanceof IPodcastFeedEntry && !isRemoteAudio) { url = podcastFeedHandler.getDownloadPath((IPodcastFeedEntry) audioObject); } else { url = audioObject.getUrl(); } return url; } COM: <s> returns url to play audio object </s>
funcom_train/17253496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { GameTask<?> task = queue.poll(); do { if (task == null) return; while (task.isCancelled()) { task = queue.poll(); if (task == null) return; } task.invoke(); } while ((executeAll) && ((task = queue.poll()) != null)); } COM: <s> this method should be invoked in the update or render method </s>
funcom_train/25732499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Record addNewRecord(final Properties fieldValues) { Record record = addNewRecord(); // method Set<String> stringPropertyNames() would have been more // appropriate // @since 1.6 // JPL based on 1.5 Enumeration<?> e = fieldValues.propertyNames(); while (e.hasMoreElements()) { // see above for the reason of this non elegant cast String fieldName = (String) e.nextElement(); record.setValue(fieldName, fieldValues.getProperty(fieldName)); } return record; } COM: <s> create and add a new instance of internal class </s>
funcom_train/1676822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(DatabaseEntry key1, DatabaseEntry key2) { if (comparator != null) { return comparator.compare(getByteArray(key1), getByteArray(key2)); } else { return compareBytes (key1.getData(), key1.getOffset(), key1.getSize(), key2.getData(), key2.getOffset(), key2.getSize()); } } COM: <s> compares two keys using the user comparator if there is one </s>
funcom_train/29738278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAutoCommit(boolean autoCommit) { boolean old = isAutoCommit(); if (old == autoCommit) { return; } this.autoCommit = autoCommit; // think: before or after firing autocommit change? if (autoCommit && isModified()) { push(); } firePropertyChange("autoCommit", old, isAutoCommit()); } COM: <s> if true will push the values on every modified notification </s>
funcom_train/50222845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map createLocationMap(Object modelSource) { Graph g = (Graph) modelSource; Map m = new HashMap(); //add a location to represent the whole system addLocation(m, g); for (Iterator i = g.vertices().iterator(); i.hasNext();) { addLocation(m, i.next()); } return m; } COM: <s> this method is called during compilation the results are stored </s>
funcom_train/12521701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateCode(BlockScope currentScope, CLICodeStream codeStream) { if ((bits & IsReachable) == 0) return; int pc = codeStream.getPosition(); exception.generateCode(currentScope, codeStream, true); codeStream.Throw(); codeStream.addSequencePoint(pc, this.sourceStart, this.sourceEnd); } COM: <s> throw cil code generation </s>
funcom_train/3380278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void skipEntry() throws ParsingException, IOException { while(lookahead != ';') { switch (lookahead) { case StreamTokenizer.TT_NUMBER: throw new ParsingException(st.lineno(), ";", ResourcesMgr.getString("number ") + String.valueOf(st.nval)); case StreamTokenizer.TT_EOF: throw new ParsingException(ResourcesMgr.getString ("expected [;], read [end of file]")); default: lookahead = st.nextToken(); } } } COM: <s> skip all tokens for this entry leaving the delimiter </s>
funcom_train/15956078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("SOAAgency".equals(portName)) { setSOAAgencyEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/8335375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCvResults(int index, double newCvResults) { System.out.println("cv done"); double oldCvResults = this.cvResults[index]; this.cvResults[index] = newCvResults; propertyChangeSupport.fireIndexedPropertyChange(PROP_CVRESULTS, index, oldCvResults, newCvResults); } COM: <s> set the value of cv results at specified index </s>
funcom_train/24442875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public MappingCellInput parse(String value) { if(value.matches("\".*\"")) return new MappingCellInput(value.substring(1,value.length()-2)); else try {return new MappingCellInput(Integer.parseInt(value)); } catch(Exception e) { return null; } } COM: <s> retrieves the mapping cell input from the string </s>
funcom_train/40433515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process() { log.trace("Entering process"); String xmlMessage = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<process-order xmlns=\"" + NAMESPACE + "\" google-order-number=\"" + orderNumber + "\"/>\n"; send(xmlMessage); log.trace("Leaving process"); } COM: <s> notifies the buyer that the order is being processed </s>
funcom_train/927377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { //Stop editing if (inputSheet.getTable().getCellEditor()!=null) { inputSheet.getTable().getCellEditor().stopCellEditing(); } else if (currentStatusSheet.getTable().getCellEditor()!=null) { currentStatusSheet.getTable().getCellEditor().stopCellEditing(); } //Remove sheets from panels inputPanel.removeAll(); outputPanel.removeAll(); currentStatusPanel.removeAll(); repaint(); } COM: <s> remove propertysheet from screen </s>
funcom_train/45596860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteNodeUpwards(Hashtable layouts,LayerStateNode node){ //first remove from hashtable. layouts.remove(node.squares); //now go to all parents and delete as far up as possible. LayerStateNode parent; StateEdge edge; //has only one parent parent = node.parent; if (parent != null){ parent.removeChildWithParent(node); //subtract since not in tree anymore if (parent.childrenStates.size() == 0){ deleteNodeUpwards(layouts,parent); } } } COM: <s> the function deletes the node given from hashtable and </s>
funcom_train/18577452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void inc() { long x, sum; int carry = 1; // add one for (int i=0; i<nlen; i++) { x = difference[i] & 0x0ffffffffL; sum = x + carry; if (sum >= 0x100000000L) carry = 1; else carry = 0; difference[i] = (int)sum; } } COM: <s> increment this distance </s>
funcom_train/21487604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOPTION_COMMAND() { if (OPTION_COMMAND == null) {//GEN-END:|32-getter|0|32-preInit // write pre-init user code here OPTION_COMMAND = new Command("Option", Command.ITEM, 0);//GEN-LINE:|32-getter|1|32-postInit // write post-init user code here }//GEN-BEGIN:|32-getter|2| return OPTION_COMMAND; } COM: <s> returns an initiliazed instance of option command component </s>
funcom_train/25585752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printEmptyTag(String p_name,String p_atrName,double p_atrValue) { writeOffset(); write('<'); write(p_name); write(' '); write(p_atrName); write("=\""); print(p_atrValue); writeln("\"/>"); } COM: <s> prints an empty xml tag with attribute </s>
funcom_train/2643193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void swap(T from, T to) { T p = (T) from.getPrevious(); T n = (T) from.getNext(); if (null != p) { to.setPrevious(p); p.setNext(to); } if (null != n) { to.setNext(n); n.setPrevious(to); } from.setNext(null); from.setPrevious(null); } COM: <s> replace from with to in the list </s>
funcom_train/20843079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasAnyAttribute() { if (anyAttribute != null) { return true; } // check nested attribute groups ... if (attributeGroups != null && !attributeGroups.isEmpty()) { for (Iterator it = attributeGroups.values().iterator(); it.hasNext();) { AttributeGroup ag = (AttributeGroup) it.next(); if (ag.hasAnyAttribute()) { return true; } } } return false; } COM: <s> returns whether this type can contain attributes not defined by the </s>
funcom_train/20504259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() throws Exception { boxOfficeMockControl = MockControl.createControl(BoxOffice.class); boxOfficeMock = (BoxOffice)boxOfficeMockControl.getMock(); eventsCalendarMockControl = MockControl.createControl(EventsCalendar.class); eventsCalendarMock = (EventsCalendar)eventsCalendarMockControl.getMock(); } COM: <s> setting up the test initializing the services mocks </s>
funcom_train/15912053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDragged(MouseEvent e) { if (currentDesk == null || helpMode() || !isEnabled()) return; Point p = e.getPoint(); if (!dragPerformed) { // mouse drag threshold dragDistance += Math.abs(p.x-lastPos.x)+Math.abs(p.y-lastPos.y); if (dragDistance < dragThreshold) { lastPos = p; return; } // init drag dragPerformed = true; doBeginDrag(e); } // drag processing doDrag(e); } COM: <s> if drag is higher than threshold this method delegates event processing to </s>
funcom_train/50083575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createClassificators(FingerprintItem[] objects, double[] vigilanceParameters) { Art2aClassificator myART; try { mART2aClassificators = new Art2aClassificator[mNumberOfClassificators]; for (int i = 0; i < mNumberOfClassificators; i++) { myART = new Art2aClassificator(objects, vigilanceParameters[i]); myART.classify(); mART2aClassificators[i] = myART; } } catch (Exception exp) { throw new RuntimeException("An error occured while creating the classificators.", exp); } } COM: <s> creates the art2a classificators </s>
funcom_train/5373751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDigits (int value) { checkWidget (); if (value < 0) error (SWT.ERROR_INVALID_ARGUMENT); if (value == this.digits) return; this.digits = value; int pos; pos = getSelection(); /* if (OS.IsWinCE) { pos = OS.SendMessage (hwndUpDown, OS.UDM_GETPOS, 0, 0) & 0xFFFF; } else { pos = OS.SendMessage (hwndUpDown, OS.UDM_GETPOS32, 0, 0); } */ setSelection (pos, false); } COM: <s> sets the number of decimal places used by the receiver </s>
funcom_train/2636336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem() { if (stringItem == null) {//GEN-END:|16-getter|0|16-preInit // write pre-init user code here stringItem = new StringItem("God bless you!!", "");//GEN-LINE:|16-getter|1|16-postInit // write post-init user code here }//GEN-BEGIN:|16-getter|2| return stringItem; } COM: <s> returns an initiliazed instance of string item component </s>
funcom_train/12119928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoM3(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end getVediProcedure().show(); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto m3 procedura jbutton </s>
funcom_train/42669332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getAcompanhadosHipertensos() { if (AcompanhadosHipertensos == null) {//GEN-END:|89-getter|0|89-preInit // write pre-init user code here AcompanhadosHipertensos = new TextField("Acompanhados", null, 3, TextField.NUMERIC);//GEN-LINE:|89-getter|1|89-postInit AcompanhadosHipertensos.setString("0"); }//GEN-BEGIN:|89-getter|2| return AcompanhadosHipertensos; } COM: <s> returns an initiliazed instance of acompanhados hipertensos component </s>
funcom_train/18729458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vertex translate(Vertex vertex) { Vertex v = vertex.minus(getOrigin()); double x = i.dot(v); double y = j.dot(v); double z = n.dot(v); v.setX(x); v.setY(y); v.setZ(z); return v; } COM: <s> return the vertex translated to this coordinate system </s>
funcom_train/21951778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParseConfig() { System.out.println("Testing parse config..."); try { parser.parseConfig(testConfig); Enumeration keys = parser.mapTable.keys(); String key = null; while (keys.hasMoreElements()) { key = (String)keys.nextElement(); System.out.println("Key: " + key + " Element: " + (String)parser.mapTable.get(key)); } } catch (Exception e) { System.out.println("Exception " + e.getMessage()); } } COM: <s> tests that the parse method of the xmlparser </s>
funcom_train/3102244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected RefactoringStatus validateNewName(final String name) { Assertion.valid(name); final IRenameElementCapability capability= (IRenameElementCapability) getRefactoring().getAdapter(IRenameElementCapability.class); capability.setNewElementName(name); try { return capability.checkNewElementName(name); } catch (final CoreException exception) { EiffelUserPlugin.getInstance().logThrowable(exception); return RefactoringStatus.createFatalErrorStatus(RefactoringMessages.RefactoringCoreProcessing_error_interal); } } COM: <s> validates the new name entered by the user </s>
funcom_train/40409593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCsvDataMapArray_oneColumnIllegalArgument() throws IOException { try { CsvUtils.getCsvDataMapArray("test_data/one_column.csv", true); fail("IllegalArgumentException expected"); } catch (IllegalArgumentException e) { // Ignore Exception. } } COM: <s> tests getting a csv data map array of one column throwing an illegal </s>
funcom_train/22791612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getUrl(String fileName) { String path = getClass().getPackage().getName().replace('.', '/'); path = "/" + path + "/" + fileName; URL result = getClass().getResource(path); return result; } COM: <s> returns a url of resource </s>
funcom_train/31031456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearForm() { txtStype.setText(""); txtStype.setEnabled(true); txtSdesc.setText(""); txtSdesc.setEnabled(true); txtSperc.setText(""); txtSperc.setEnabled(true); /* Unset field values */ stype = null; sdesc = null; sperc = null; btnSubmit.setText("Create"); this.setTitle("Create an item sales tax"); this.mode = ValueConstants.CREATE_MODE; btnSubmit.setVisible(true); btnSubmit.setEnabled(false); btnDelete.setVisible(false); chkCreateItemSalesTax.setSelected(false); lblStatus.setText(""); setLabelColorToBlack(); } COM: <s> this method clears all the fields of settlement </s>
funcom_train/36933030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void colorToBuffer(CCColor theColor, ByteBuffer theBuffer, int theIndex) { for(int i = 0; i < _myPixelFormat.numberOfChannels;i++) { theBuffer.put( theIndex + _myPixelFormat.offsets[i], (byte)(colorChannel(theColor, color_indices[_myPixelFormat.numberOfChannels - 1][i])*255) ); } } COM: <s> writes a color into a byte buffer </s>
funcom_train/36671882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setEventType(int button) { if((buttonClicked == this.ROBOT && button == this.ADD) || (buttonClicked == this.NONE && button == this.ADD)) { if(drawObj == this.ROBOT) drawObj = previousDrawObj; } buttonClicked = button; if(button == this.ROBOT) { previousDrawObj = drawObj; drawObj = this.ROBOT; } } COM: <s> set what should happen when the mouse is clicked in this panel </s>
funcom_train/9819746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigInteger toBigInteger(boolean sign_ext) { BigInteger ret; if (sign_ext == SIGN_EXT && negative(SIGN_EXT)) { forceNegate(); // temporary fix ret = new BigInteger('-' + toHexString(), 16); forceNegate(); // undo } else ret = new BigInteger(toHexString(), 16); return ret; } COM: <s> returns the value as a big integer with appropriate sign extension </s>
funcom_train/31168241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSourceOf(TransactionOpDescriptor desc) { logIsInitiator("Begin method call, tid: " + desc.tid); boolean initiator = false; if (desc.source.equals(lServer.getLocalServerID())) { logIsInitiator("I am the initiator."); initiator = true; } else logIsInitiator("I am not the inititor."); logIsInitiator("End method call, tid: " + desc.tid); return initiator; } COM: <s> returns true if this host is the source of the specified transaction </s>
funcom_train/44854795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getXMLString(String inTitle, String inMessage) { StringBuffer lBuffer = new StringBuffer(); lBuffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); lBuffer.append("<Root>"); lBuffer.append("<Title>").append(inTitle).append("</Title>"); if (inMessage.length() > 0) { lBuffer.append("<messages>").append("<message>").append(inMessage).append("</message>").append("</messages>"); } lBuffer.append("</Root>"); return lBuffer.toString(); } COM: <s> returns the xml string to generate view </s>
funcom_train/12212448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDisplayed(String toolTip) { for (int i = 0; i < editorTab.getTabCount(); i++) { JPanel tab = (JPanel) editorTab.getComponentAt(i); if (toolTip .equals(tab .getClientProperty(LayoutConstants.CATALYST_EDITORPANE_TOOLTIP))) { // Sets focus to already opened and selected node tab. editorTab.setSelectedIndex(i); return true; } } return false; } COM: <s> check if node tab already being displayed in editor pane </s>
funcom_train/24645337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public E executeDefaultSelectByPK(E row) { try { List<E> e = executeSelect(toQuery("#SELECT ID#", row)); if (e != null && e.size() > 0) { return e.get(0); } } catch (SQLException e) { e.printStackTrace(); } return null; } COM: <s> executing select id pattern </s>
funcom_train/12118700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC67(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.aggiungeJMenuItem_ActionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c67 aggiunge jmenu item </s>
funcom_train/28984523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkAsymmetricTestResult () { if (okAsymmetricTestResult == null) {//GEN-END:|198-getter|0|198-preInit // write pre-init user code here okAsymmetricTestResult = new Command ("Ok", Command.OK, 0);//GEN-LINE:|198-getter|1|198-postInit // write post-init user code here }//GEN-BEGIN:|198-getter|2| return okAsymmetricTestResult; } COM: <s> returns an initiliazed instance of ok asymmetric test result component </s>
funcom_train/8813293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHistoryToken(HistoryTokenListDTO token) { if (token != null) { if (token.getTokens().size() == 1) { setHistoryTokenValue(token.getTokens().get(0)); } else { setHistoryTokenValue2(token.getTokens()); } } } COM: <s> display a history token in this element </s>
funcom_train/38531885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireMemberRemoved(ProjectMember member) { ArrayList temp; temp = (ArrayList)listListeners.clone(); for ( int x = 0; x < temp.size(); x++ ) { ((ListenerProject)temp.get(x)).memberRemoved(this, member); } } COM: <s> gets called when a member is removed from this project </s>
funcom_train/12379548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireMessageSelection() { Movil message; int selectedRow = getSelectionModel().getMinSelectedIndex(); if (selectedRow == -1) { message = null; } else { message = displayedMessages[selectedRow]; } MovilSelectionEvent e = new MovilSelectionEvent(message); EventListener[] listeners = getEventListenerList().getListeners( MessageSelectionListener.class); for (int i = 0; i < listeners.length; ++i) { ((MessageSelectionListener) listeners[i]).messageSelected(e); } } COM: <s> notifies code message selection listener code s of a message </s>
funcom_train/27822980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Collection getStatementInfos(Collection statements) throws RemoteException,FinderException { Collection result=new LinkedList(); Iterator objects=statements.iterator(); while (objects.hasNext()) { Statement statement=(Statement)objects.next(); result.add(statement.getStatementInfo()); } return result; } COM: <s> converts a collection of statements into a collection of statement info objects </s>
funcom_train/18104257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int itemNum, Item item) { synchronized (Display.LCDUILock) { // NullPointerException will be thrown // by item.getOwner() if item == null if (item.getOwner() != null) { throw new IllegalStateException(); } if (itemNum < 0 || itemNum >= numOfItems) { throw new IndexOutOfBoundsException(); } setImpl(itemNum, item); } } COM: <s> sets the item referenced by code item num code to the </s>
funcom_train/14011038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processBlojsomCongfiguration(ServletContext context, String filename) { Properties configuration = new Properties(); InputStream cis = context.getResourceAsStream(filename); try { configuration.load(cis); cis.close(); _blog = new Blog(configuration); } catch (IOException e) { _logger.error(e); } catch (BlojsomConfigurationException e) { _logger.error(e); } } COM: <s> load blojsom configuration information </s>
funcom_train/3990158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGlowaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BadanieOkresowe_glowa_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_glowa_feature", "_UI_BadanieOkresowe_type"), PrzychodniaPackage.Literals.BADANIE_OKRESOWE__GLOWA, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the glowa feature </s>
funcom_train/14215095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addItem(int index, ShoppingCartItem item) throws CartItemModifyException { if (isReadOnlyCart()) { throw new CartItemModifyException("Cart items cannot be changed"); } if (!cartLines.contains(item)) { cartLines.add(index, item); return index; } else { return this.getItemIndex(item); } } COM: <s> add an item to the shopping cart </s>
funcom_train/33835051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand4() { if (backCommand4 == null) {//GEN-END:|60-getter|0|60-preInit // write pre-init user code here backCommand4 = new Command("Home", Command.BACK, 0);//GEN-LINE:|60-getter|1|60-postInit // write post-init user code here }//GEN-BEGIN:|60-getter|2| return backCommand4; } COM: <s> returns an initiliazed instance of back command4 component </s>
funcom_train/40285342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopServer() { if (embedded != null) { try { System.out.println("Shutting down MyServer..."); embedded.stop(); System.out.println("MyServer shutdown."); server.notifyAll(); } catch (Exception e) { //No need to do anything } } } COM: <s> stop the server programmatically </s>
funcom_train/25099210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSignificantDigitsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RangeableValueType_significantDigits_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RangeableValueType_significantDigits_feature", "_UI_RangeableValueType_type"), DatatypesPackage.Literals.RANGEABLE_VALUE_TYPE__SIGNIFICANT_DIGITS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the significant digits feature </s>
funcom_train/8093631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void adjust(Instance newInst, Exemplar predictedExemplar) throws Exception { /* correct prediction */ if(newInst.classValue() == predictedExemplar.classValue()){ predictedExemplar.incrPositiveCount(); /* incorrect prediction */ } else { predictedExemplar.incrNegativeCount(); /* new instance falls inside */ if(predictedExemplar.holds(newInst)){ prune(predictedExemplar, newInst); } } } COM: <s> adjust the nnge </s>
funcom_train/1800722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueLocal(String columnHeader, String newContents) { if (newContents.startsWith("=")) { throw new IllegalArgumentException("Formulas are not supported."); } else { values.put(columnHeader.toLowerCase(), new CustomElement(newContents)); } } COM: <s> locally sets the value at the particular cell specified by the </s>
funcom_train/2273247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Ident getType(String name) throws NoSuchElementException { BetRefer bf; bf = varList.get(name); if (bf == null) { throw new NoSuchElementException(tr("Cannot to find ") + name + " " + tr("variable")); } return bf.getType(); } COM: <s> return type of variable </s>
funcom_train/9301372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addWord(String word, boolean overrideAlias) { // check to see if the word already exists Integer idx = ids.get(word); // if the word exists and is not an alias, return the proper number if(idx != null && (!overrideAlias || words.get(idx).equals(words))) return idx; // get the new id, add the word, and return idx = words.size(); words.add(word); ids.put(word, idx); return idx; } COM: <s> add a symbol to the vocabulary </s>
funcom_train/40222659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean undoMove() { Move m = popMove(); // unable to undo if (m == null) { // signal our disapproval. java.awt.Toolkit.getDefaultToolkit().beep(); return false; } // Undo and refresh all widgets. boolean status = m.undo(this); if (status) { refreshWidgets(); } else { // if we can't undo the move, we push it back onto the stack pushMove(m); } // return results. return status; } COM: <s> solitaire game stores all moves and enables them to be undone </s>
funcom_train/18465078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IType determineType(IJavaElement element) { //TODO: should this be in a utility class? try { if (element instanceof IType) { return ((IType) element); } if (element instanceof ICompilationUnit) { ICompilationUnit unit = (ICompilationUnit) _selectedElement; return unit.getTypes()[0]; } if (element instanceof IClassFile) { return ((IClassFile) element).getType(); } } catch (JavaModelException e) { } return null; } COM: <s> returns an itype corresponding to the selected item </s>
funcom_train/43664428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPersistentPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Persistable_persistent_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Persistable_persistent_feature", "_UI_Persistable_type"), XmdldbPackage.Literals.PERSISTABLE__PERSISTENT, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the persistent feature </s>
funcom_train/9810037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void join(InetAddress inetaddr) throws IOException { // tell lower layer to filter for this mcastAddr mcast = true; byte mcastAddrBytes[] = inetaddr.getAddress(); mcastAddr = ((mcastAddrBytes[0]) << 24) | ((mcastAddrBytes[1] & 0xff) << 16) | ((mcastAddrBytes[2] & 0xff) << 8) | (mcastAddrBytes[3] & 0xff); } COM: <s> join the multicast group </s>
funcom_train/9808397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (!(obj instanceof ServiceImpl)) { return false; } Service s = (Service) obj; if (!(s.getLocator().equals(this.getLocator()))) { return false; } return (s.getName().equals(this.getName()) && s.getServiceType() == this.getServiceType() && s .hasMultipleInstances() == this.hasMultipleInstances()); } COM: <s> tests two code service code objects for equality </s>
funcom_train/1613017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BooleanOperand createComparison(Operator op, ComparableOperand op1, ComparableOperand op2, Class type){ if( type == String.class ) return facade.createStringComparison((StringComparisonOperator)op, (StringComparableOperand)op1, (StringComparableOperand)op2); else return facade.createDefaultComparison((DefaultComparisonOperator)op, op1, op2); } COM: <s> create a comparison and returns a boolean operand </s>
funcom_train/4126048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getProductionNextTurn() { if (canAutoProduce()) { return getAutoProduction(getGoodsInputNextTurn()); } else if (getGoodsInputType() == null) { return getProductionAdding(0); } else { return getProductionAdding(getStoredInput() + colony.getProductionNextTurn(getGoodsInputType())); } } COM: <s> returns the actual production of this building for next turn </s>
funcom_train/50464897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void installGlassPane() { Component gp = getGlassPane(); //don't set glasspane if already a BusyGlassPane if(BusyGlassPane.class.isInstance(gp)) return; orgGlassPane = gp; busyGlassPane = new BusyGlassPane(); setGlassPane(busyGlassPane); disableFrameMenu(); busyGlassPane.setVisible(true); busyGlassPane.start(null); } COM: <s> install the glass pane </s>
funcom_train/18873649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { connection.send(message); } catch (InterruptedIOException ex) { // TODO: Exception (e.g. timeout) handling } catch (IOException ex) { // TODO: Exception (e.g. network failure) handling } catch (IllegalArgumentException ex) { // TODO: Exception (e.g. too big or otherwise invalid // message) handling } catch (SecurityException ex) { // TODO: Exception (e.g. insufficient permissions) handling } } COM: <s> sends a text sms </s>
funcom_train/50865203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean withinBounds(IntPoint position) { boolean result = true; if (!navLayer.withinDisplayEdges(position)) result = false; int radius = (int) Math.round(Math.sqrt(Math.pow(150D - position.getX(), 2D) + Math.pow(150D - position.getY(), 2D))); if (radius > pixelRange) result = false; return result; } COM: <s> checks if mouse location is within range boundries and edge of map display </s>
funcom_train/47555406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node typeCheck(ContextVisitor tc) throws SemanticException { Instanceof n = (Instanceof) node(); Type rtype = n.compareType().type(); Type ltype = n.expr().type(); if (! tc.typeSystem().isCastValid(ltype, rtype, tc.context())) { throw new SemanticException( "Left operand of \"instanceof\" must be castable to " + "the right operand."); } return n.type(tc.typeSystem().Boolean()); } COM: <s> removes the restriction that the compare type must be a </s>
funcom_train/42680020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCmbConvert() { if (cmbConvert == null) { cmbConvert = new JComboBox(); cmbConvert.setBounds(new Rectangle(402, 195, 161, 20)); cmbConvert.setToolTipText("Select the output format"); cmbConvert.setVisible(false); options = new Options(getClass().getClassLoader().getResourceAsStream("presets.xml")).read(); for (int i = 0;i<options.size();i++) cmbConvert.addItem(options.get(i).getName()); } return cmbConvert; } COM: <s> this method initializes cmb convert </s>
funcom_train/24934430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public I_DirectedGraphic addDirectedGraphic(final I_DirectedGraphic graphic) { final SimpleDirectedGraphic directedGraphic = new SimpleDirectedGraphic(); directedGraphic.containedLines.addAll(containedLines); final ArrayList containedLinesGraphic = graphic.getLines(); directedGraphic.containedLines.addAll(containedLinesGraphic); return directedGraphic; } COM: <s> adds the lines of the given graphic to this graphic </s>
funcom_train/964926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void locateOnScreen(Frame frame) { Dimension paneSize = frame.getSize(); Dimension screenSize = frame.getToolkit().getScreenSize(); frame.setLocation( (screenSize.width - paneSize.width) / 2, (screenSize.height - paneSize.height) / 2); } COM: <s> locates the frame on the screen center </s>
funcom_train/28298602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TransSibPlayer getHumanPlayer(int index) { if (index>=0&&index<getNrHumanPlayers()) { int humanIndex=-1; int numP=getNrPlayers(); for (int i=0;i<numP;i++) { if (isHuman(i)) humanIndex++; if (humanIndex==index) return players[i]; } } return null; } COM: <s> returns the given human player </s>
funcom_train/18807603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLastMillisecond(final Calendar calendar) { final int year = this.serialDate.getYYYY(); final int month = this.serialDate.getMonth(); final int day = this.serialDate.getDayOfMonth(); calendar.clear(); calendar.set(year, month - 1, day, 23, 59, 59); calendar.set(Calendar.MILLISECOND, 999); return calendar.getTime().getTime(); } COM: <s> returns the last millisecond of the day evaluated using the supplied </s>
funcom_train/21461632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendError(HttpServletResponse res, int code, String message) { try { res.reset(); res.sendError(code, message); } catch (Exception e) { System.err.println("WARN Error sending http servlet error code ("+code+") and message ("+message+"): " + e); } } COM: <s> handles sending back servlet errors to the client </s>
funcom_train/13870124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features messageEClass = createEClass(MESSAGE); createEAttribute(messageEClass, MESSAGE__START); createEAttribute(messageEClass, MESSAGE__LENGTH); createEAttribute(messageEClass, MESSAGE__VALUE); errorEClass = createEClass(ERROR); warningEClass = createEClass(WARNING); informationEClass = createEClass(INFORMATION); } COM: <s> creates the meta model objects for the package </s>
funcom_train/10210717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePositionsOnInsert(int offset, int length) { ListIterator<WeakReference<SimplePosition>> positionsIt = positions .listIterator(); while (positionsIt.hasNext()) { SimplePosition p = positionsIt.next().get(); if (p == null) { positionsIt.remove(); } else if (p.offset > offset) { // A position that pointed behind the insertion point. logger.debug("Update position at " + p.offset); p.offset += length; } } } COM: <s> recalculates the offset of all positions after text was inserted </s>
funcom_train/30197005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAttivita() throws Exception { System.out.println("attivita"); /* ActionMapping mapping = null; ActionForm form = null; HttpServletRequest request = null; HttpServletResponse response = null; MenuIntervistatoreAction instance = new MenuIntervistatoreAction(); ActionForward expResult = null; ActionForward result = instance.attivita(mapping, form, request, response); assertEquals(expResult, result); */ } COM: <s> test of attivita method of class com </s>
funcom_train/3888221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMaxPersonsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StaffType_maxPersons_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StaffType_maxPersons_feature", "_UI_StaffType_type"), ImsldV1p0Package.Literals.STAFF_TYPE__MAX_PERSONS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the max persons feature </s>
funcom_train/24218808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void log(Level level, String message, Object parameter) { StringBuilder builder = new StringBuilder(); builder.append("["); builder.append(this.getSessionId()); builder.append("] "); builder.append(message); this.logger.log(level, builder.toString(), parameter); } COM: <s> logs some output with an additional parameter </s>
funcom_train/22356726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeListeners(JTextComponent j) { j.removeFocusListener(focusAdapter); j.removeKeyListener(keyAdapter); j.removeCaretListener(caretAdapter); j.removeMouseListener(this); if (j instanceof OrderEditor) { OrderEditor editor = (OrderEditor) j; editor.releaseListener(); } } COM: <s> removes the adapters for key caret focusevents from the given jtext components </s>
funcom_train/25093471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJComboBoxWcsoBase() { if (jComboBoxWcsoBase == null) { jComboBoxWcsoBase = new JComboBox(baseAlgos); jComboBoxWcsoBase.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { fireAlgoChanged(); } }); } return jComboBoxWcsoBase; } COM: <s> this method initializes j combo box wcso base </s>
funcom_train/25766854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Token getToken() { int start = -1; int end = -1; StringBuffer sb = new StringBuffer(); Iterator<Token> iter = tokens.iterator(); while (iter.hasNext()) { Token token = iter.next(); if (start == -1) { start = token.getStart(); } sb.append(token.getValue()); if (iter.hasNext()) { sb.append(" "); } else if (end == -1) { end = token.getEnd(); } } return new Token(sb.toString(), start, end); } COM: <s> returns this keyword as a single token </s>
funcom_train/44875286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initLayoutAndData(Composite aGroup, int numColumns) { GridLayout gl = new GridLayout(numColumns, false); aGroup.setLayout(gl); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 1; aGroup.setLayoutData(gd); } COM: <s> internal method that initializes a preference fields layout </s>
funcom_train/4694933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LIRUpType visit(NewClass newClass, Integer d){ System.out.println(newClass.getName()+"\n\n"); ClassLayout thisClassLayout = classLayouts.get(newClass.getName()); String tr = "Library __allocateObject("+thisClassLayout.getAllocSize()+"),R"+d+"\n"; tr += "MoveField _DV_"+thisClassLayout.getClassName()+",R"+d+".0\n"; return new LIRUpType(tr, LIRFlagEnum.REGISTER,"R"+d); } COM: <s> new class propagating visitor </s>
funcom_train/13391903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGroups(String[] groups) { if (groups == DiscoveryGroupManagement.ALL_GROUPS) { groups = new String[]{"all"}; } else { for (int i = 0; i < groups.length; i++) { if (groups[i].equals("")) { groups[i] = "public"; } } } configParms.put(GROUPS, groups); } COM: <s> set the lookup groups the service will use for discovery </s>
funcom_train/16453257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showBlankScreen() { csp.sps.setMessage("", "Arial", 14, Color.WHITE, Color.BLACK, "", csp._langFont, csp._size, Color.WHITE, Color.BLACK, false, false, csp._templateMenu.isSelected(), csp._template, false, false); } COM: <s> show blank screen </s>
funcom_train/46660188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int get(final char c) { /* * For the Sun VM, the char version accelerates some algorithms by 5 to 10 %, * in the IBM VM, there is no difference. */ // int x = c - lowest; // if (x < 0 || x >= array.length) { // return defaultValue; // } final char x = (char) (c - lowest); if (x >= array.length) { return defaultValue; } return array[x]; } COM: <s> returns the stored value for the given code char code </s>
funcom_train/2853077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractInt (String definition) throws MalformedHeaderException { if (definition == null || definition.equals("")) throw new MalformedHeaderException( "null or empty header field value"); // XXX THIS IS WRONG, SHOULD BE CONVERTING INT try { value = Integer.parseInt(definition); } catch (NumberFormatException nfe) { throw new MalformedHeaderException( "number format error: " + nfe); } } COM: <s> subclasses may need to do further checks on value </s>
funcom_train/49160050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDependency(Resource resource, LockType type) { LOGGER.info("Adding dependency %s to %s for %s", type, resource, this); final DependencyStatus accept = resource.accept(type); if (accept == DependencyStatus.ERROR) throw new RuntimeException(format( "Resource %s cannot be satisfied for lock type %s", resource, type)); resource.register(this); final boolean ready = accept.isOK(); synchronized (this) { if (!ready) nbUnsatisfied++; dependencies.put(resource, new DependencyStatusCache(type, ready)); } } COM: <s> add a dependency </s>
funcom_train/39475197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNoise(Random r, double range) { for (int i = 0; i < weights.length; i++) { for (int j = 0; j < weights[i].length; j++) { weights[i][j] += r.nextGaussian() * range; } } } COM: <s> add gaussian noise to all the weights in this layer </s>
funcom_train/5551680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double evaluate(final double[] values,final int begin, final int length) { if (test(values, begin, length)) { Sum sum = new Sum(); return sum.evaluate(values, begin, length) / ((double) length); } return Double.NaN; } COM: <s> returns the arithmetic mean of the entries in the specified portion of </s>
funcom_train/3474528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Customization (Properties properties) { this(); Object[] entryset = properties.entrySet().toArray(); for(int i = 0; i < entryset.length; i++) { if(entryset[i] instanceof Map.Entry) { Map.Entry entry = (Map.Entry)entryset[i]; put(entry.getKey(), entry.getValue()); } } } COM: <s> creates a customization object and and reads all elements from the given properties </s>
funcom_train/4628773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { super.createPartControl(parent); ISourceViewer sourceViewer = getSourceViewer(); Control widget = sourceViewer.getTextWidget(); IPreferenceStore store = TUnitPlugin.getDefault().getPreferenceStore(); Color background = new Color(Display.getCurrent(), PreferenceConverter.getColor(store, TclPreferencesConstants.P_BACKGROUNDCOLOR)); widget.setBackground(background); } COM: <s> override to set the initial color of the backgound </s>
funcom_train/18937316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveProperties() throws IOException { /*controller.setProperty(PeerConfiguration.PROP_LOGFILE, logFilenameTextField.getText());*/ model.setProperty(PeerConfiguration.PROP_LOGFILE, logFilenameTextField.getText()); logManager.save(); logManager.setLogFile(new File(logFilenameTextField.getText())); } COM: <s> saves the values at the input fields as the default values </s>
funcom_train/50330509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMinorVersion() { int minor = 0; if (sprogType.isSprog()) { try { minor = Integer.parseInt(sprogVersion.substring(sprogVersion.indexOf(".") + 1, sprogVersion.indexOf(".") + 2)); } catch (NumberFormatException e) { log.error("Cannot parse SPROG minor version number"); } } return minor; } COM: <s> return minor version number for a known sprog </s>
funcom_train/42395956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetJugadores() { System.out.println("getJugadores"); Partida instance = new Partida(); List<Jugador> expResult = null; List<Jugador> result = instance.getJugadores(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get jugadores method of class model </s>