__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/13779020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addServiceMethod(ModuleOpenClass openClass, IOpenMethod originalMethod){ try{ openClass.addMethod(getServiceMethod(originalMethod)); }catch (DuplicatedMethodException e) { SyntaxNodeException error = new SyntaxNodeException(null, e, getTableSyntaxNode()); getTableSyntaxNode().addError(error); OpenLMessagesUtils.addError(error); } } COM: <s> add auxiliary method with name specified in property id for direct call </s>
funcom_train/20286176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CalendarEventList getEvents(String tmp1, String tmp2, String tmp3) { String key = tmp1 + "/" + tmp2 + "/" + tmp3; if (eventList.containsKey(key)) { return eventList.get(key); } else { return new CalendarEventList(); } } COM: <s> returns a list representative of the event objects </s>
funcom_train/20869495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanUpSession() { // only run once if (sessionDestroyedCalled) { return; } sessionDestroyedCalled = true; log.debug("sessionDestroyed event"); // run the main window -onclose code, if any appOnClose(); if (lastEvalResult.length() > 0) { log.debug("sessionDestroyed eval failed running -onclose:\n" + lastEvalResult); } // ApplicationInstance dispose super.dispose(); if (windowMap != null) { windowMap.clear(); } windowMap = null; win = null; removeAppTaskQueue(); } COM: <s> cleanup applications resources when exting </s>
funcom_train/46222516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getFloat(String key) throws JSONException { Object o = get(key); try { return o instanceof Number ? ((Number)o).floatValue() : Float.valueOf((String)o).floatValue(); } catch (Exception e) { throw new JSONException("JSONObject[" + quote(key) + "] is not a number."); } } COM: <s> get the float value associated with a key </s>
funcom_train/40926405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawString(String s, float x, float y) { try { if (customTextHandler != null && !textAsShapes) { customTextHandler.drawString(s, x, y); } else { fallbackTextHandler.drawString(s, x, y); } } catch (IOException ioe) { handleIOException(ioe); } } COM: <s> renders the text specified by the specified code string code </s>
funcom_train/3093938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getOption(String aName, int aDefault) { int value = aDefault; Object obj = get(aName); if (obj!=null) { if (obj instanceof Number) value = ((Number)obj).intValue(); else { String msg = "Property `"+aName+"' read from the config file "+ "is not a number! Ignored."; System.err.println(msg); } } String property = getPropertySafe( prefix + aName ); if (property != null) value = Integer.parseInt(property); return value; } COM: <s> gets the requested integer value from the hash table or from the </s>
funcom_train/46857338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void NewJobType() { DlgAddEditJobType dlg = new DlgAddEditJobType(this); if (dlg.getAnswer() == JOptionPane.OK_OPTION) { jobTypes.add(dlg.getJobType()); ((DefaultComboBoxModel) lstJobTypes.getModel()).addElement(dlg.getJobType()); lstJobTypes.updateUI(); } } COM: <s> creates a new job type </s>
funcom_train/26335429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endDialog() { // return control if( this.engine != null ) { this.engine.getUI().getMessageViewPort().refresh(); this.engine.takeKeyboardControl(); } // notify listener if( this.listener != null ) { this.listener.checkResponse( this ); } } COM: <s> end dialog returns control to the game engine and notifies the listener </s>
funcom_train/18111839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDirPathPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DirTreeBase_DirPath_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DirTreeBase_DirPath_feature", "_UI_DirTreeBase_type"), BioDBPackage.Literals.DIR_TREE_BASE__DIR_PATH, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the dir path feature </s>
funcom_train/35949803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopSystemChannels() throws ChannelLifeCycleException { User root = SecurityFactory.getRootUser(); for (Map.Entry<String, Channel> entry : mSystemChannels.entrySet()) { Channel channel = entry.getValue(); channel.stop(root.getLoginname()); } mSystemChannels.clear(); if (mLoggerChannel != null) { mLoggerChannel.stop(root.getLoginname()); } if (mAdminChannel != null) { mAdminChannel.stop(root.getLoginname()); } } COM: <s> stops all the system channels running in the system and clears the system </s>
funcom_train/33704011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addYearPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Date_year_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Date_year_feature", "_UI_Date_type"), BankabeulePackage.Literals.DATE__YEAR, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the year feature </s>
funcom_train/20081201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void stopJob() { log.info("[UnboundedJobProcessor] Stopping Job Execution"); // Notify Workers jobService.notifyJobEnd(profile.getJobId()); // Update Future and return Result (null for unbounded) profile.getFuture().setResult(null); if (! profile.getFuture().isJobFinished() ) { profile.getFuture().setState(GridJobState.COMPLETE); } // Destroy this instance destroy(); } COM: <s> stops execution of the </s>
funcom_train/4852691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand1() { if (exitCommand1 == null) {//GEN-END:|29-getter|0|29-preInit // write pre-init user code here exitCommand1 = new Command("Sair", Command.EXIT, 0);//GEN-LINE:|29-getter|1|29-postInit // write post-init user code here }//GEN-BEGIN:|29-getter|2| return exitCommand1; } COM: <s> returns an initiliazed instance of exit command1 component </s>
funcom_train/11763675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getFileVersion(String sequence){ try{ return Integer.parseInt(sequence, 10); } catch (NumberFormatException e){ // EXAMPLE: // parseInt("2147483647", 10) returns 2147483647 // parseInt("-2147483648", 10) returns -2147483648 // parseInt("2147483648", 10) throws a NumberFormatException return -1; } } COM: <s> this method is required to determine the version of the file applied to </s>
funcom_train/49026797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCbGenCucina() { if (cbGenCucina == null) { try { tagGenCucina = Terminologia.getTerminologia().getTuttiTermini(TipoTermine.genere_cucina); tagGenCucina.add("Seleziona genere cucina.."); cbGenCucina = new JComboBox(tagGenCucina.toArray()); cbGenCucina.setFont(new Font("Dialog", Font.PLAIN, 12)); } catch (DBException e) { e.printStackTrace(); } } return cbGenCucina; } COM: <s> this method initializes cb occasione </s>
funcom_train/44588779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IJavaModelStatus commonVerify() { if (elementsToProcess == null || elementsToProcess.length == 0) { return new JavaModelStatus(IJavaModelStatusConstants.NO_ELEMENTS_TO_PROCESS); } for (int i = 0; i < elementsToProcess.length; i++) { if (elementsToProcess[i] == null) { return new JavaModelStatus(IJavaModelStatusConstants.NO_ELEMENTS_TO_PROCESS); } } return JavaModelStatus.VERIFIED_OK; } COM: <s> common code used to verify the elements this operation is processing </s>
funcom_train/42868330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutStream out) throws IOException { out.flushBits(); out.writeUBits(5, getBitSize()); out.writeSBits(bitSize, minX); out.writeSBits(bitSize, maxX); out.writeSBits(bitSize, minY); out.writeSBits(bitSize, maxY); out.flushBits(); } COM: <s> write the rect contents to the output stream </s>
funcom_train/12165384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initConfiguration() { ConfigurationFactory factory = ConfigurationFactory.getInstance(); try { cfg = (ISCSConfiguration) factory.getConfiguration(ISCSConfiguration.class); } catch (ConfigurationException ce) { System.out.println("Can't read configuration file: " + ce); System.exit(1); } } COM: <s> reads config file scs config </s>
funcom_train/36922248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(ListSelectionEvent event) { // See if this is a valid this selection if( event.getSource() == this.getSelectionModel() && event.getFirstIndex() >= 0 ) { if (mainFrame != null) { mainFrame.getPad().setColor( getSelectedColor()); } } } COM: <s> invoked every time user selects a color cell </s>
funcom_train/26338680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(Object key, Object value) { SoftReference ref = new SoftReference(value, _queue); synchronized (this) { _ref2key.put(ref, key); Object prevref = _key2ref.put(key, ref); if (prevref != null) { _ref2key.remove(prevref); } } } COM: <s> associates an object with a key </s>
funcom_train/3315479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(Collection<? extends E> c){ boolean reply; BigInteger otherMask = getMaskOf(c); if (otherMask != null){ BigInteger oldMask = mask; mask = mask.or(otherMask); reply = !mask.equals(oldMask); } else { reply = super.addAll(c); } return reply; } COM: <s> adds all of the elements in the specified collection to this collection </s>
funcom_train/17587713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object remove(Object key) { Object k = maskNull(key); int h = hash(k); Entry[] tab = getTable(); int i = indexFor(h, tab.length); Entry prev = tab[i]; Entry e = prev; while (e != null) { Entry next = e.next; if (h == e.hash && k == e.get()) { modCount++; size--; if (prev == e) tab[i] = next; else prev.next = next; return e.value; } prev = e; e = next; } return null; } COM: <s> removes the mapping for this key from this map if present </s>
funcom_train/46520070
/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 ("BookQuotePort".equals(portName)) { setBookQuotePortEndpointAddress(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/3404231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resurrect(Map<String, M> methods, Set<String> complete) { for (Map.Entry<String, M> e : methods.entrySet()) { if(complete.contains(e.getKey())) continue; if(hasJAXBAnnotation(reader().getAllMethodAnnotations(e.getValue(),this))) complete.add(e.getKey()); } } COM: <s> if the method has an explicit annotation allow it to participate </s>
funcom_train/43261183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Spacer getSpacer() { if (spacer == null) {//GEN-END:|153-getter|0|153-preInit // write pre-init user code here spacer = new Spacer(16, 80);//GEN-LINE:|153-getter|1|153-postInit // write post-init user code here }//GEN-BEGIN:|153-getter|2| return spacer; } COM: <s> returns an initiliazed instance of spacer component </s>
funcom_train/38184257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean closeTree() throws VistException { try { if ( isOpen ) { myTree.closeTree(); isOpen = false; for (ViSTTree tree : (Collection<ViSTTree>)myOpenedTrees.values() ) { tree.closeTree(); } } return true; } catch (BPlusTreeException e) { throw new VistException( e ); } } COM: <s> closes current my tree and all trees that were opened by </s>
funcom_train/27943341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hidePopupWindow() { if( nMode != MODE_CHANGE_PASSWD ) { try { popupWindow.hidePopup(); } catch( Exception e ) { System.err.println( "JRegisterUserPanel.hidePopupWindow - " + e ); } } if( plugin != null ) plugin.removeRegistrationEngineListener( this ); } COM: <s> hide the popup message window </s>
funcom_train/50849653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isColliding(int iX, int iY, int iWid, int iHei) { return !((this.iX + this.iWid <= iX) || (this.iX >= iX + iWid) || (this.iY + this.iHei <= iY) || (this.iY >= iY + iHei)); } COM: <s> indicates whether i collide with something </s>
funcom_train/5551523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataAdapter getAdapter(Object in) { if (in instanceof BufferedReader) { BufferedReader inputStream = (BufferedReader) in; return new StreamDataAdapter(inputStream); } else if (in instanceof double[]) { double[] inputArray = (double[]) in; return new ArrayDataAdapter(inputArray); } else { throw new IllegalArgumentException( "Input data comes from the" + " unsupported source"); } } COM: <s> creates a data adapter from a data object </s>
funcom_train/37763874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage() { return super.getMessage() + " '" + value + "' for " + paramName + " on Rule " + ruleName + (className!=null ? ", for Class " + className : "") + (propName!=null ? ", on Property " + propName : ""); } COM: <s> returns a localized message for the exception </s>
funcom_train/9494880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPhase1Solved(final SimplexTableau tableau) { if (tableau.getNumArtificialVariables() == 0) { return true; } for (int i = tableau.getNumObjectiveFunctions(); i < tableau.getWidth() - 1; i++) { if (MathUtils.compareTo(tableau.getEntry(0, i), 0, epsilon) < 0) { return false; } } return true; } COM: <s> checks whether phase 1 is solved </s>
funcom_train/43605964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node rewrite(PaoTypeSystem ts, NodeFactory nf) { Instanceof n = (Instanceof) node(); Type rtype = n.compareType().type(); if (rtype.isPrimitive()) { Type t = ts.boxedType(rtype.toPrimitive()); return n.compareType(nf.CanonicalTypeNode(n.compareType().position(), t)); } return n; } COM: <s> rewrites code instanceof code checks where the comparison type is </s>
funcom_train/42840517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean send(SendMailSession mailSession, EmailMessage msg) { try { log.debug("send email"); Email email = new Email(); email.from(msg.getSource()).to(msg.getDestination()).subject(msg.getSubject()); emailBuilder.applyTemplate(email, msg); mailSession.sendMail(email); return true; } catch (MailException mex) { log.error("Sending email failed", mex); return false; } } COM: <s> sends single email in open email session </s>
funcom_train/51293867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { this.assays = new HashMap(); ArrayList vSources = this.hyrax.getVersionedSources(); for(int i=0; i<vSources.size(); i++) { Das2AssayVersionedSource vSource = (Das2AssayVersionedSource)vSources.get(i); //this.assays.put(vSource.getID(), vSource.getAssays()); } } COM: <s> this method will pre cache all the assays associtated with each </s>
funcom_train/25365907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsRevealedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Room_isRevealed_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Room_isRevealed_feature", "_UI_Room_type"), LeveleditorPackage.Literals.ROOM__IS_REVEALED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is revealed feature </s>
funcom_train/13918588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object value, Object node, int column){ if (MATCH_INDEX == column){ ((ClsCheckNode)node).setChecked((Boolean)value); handleNodeCheck((ClsCheckNode)node); } ClassificationDlg.this.validate(); ClassificationDlg.this.repaint(); } COM: <s> when user clicks unclicks node this method is called </s>
funcom_train/19456486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getLineNumberLabel() throws CompileException { ApplesoftToken token = nextToken(); if (token.isString() && isIntegerNumber(token.getStringValue())) { return "LINE" + token.getStringValue(); //$NON-NLS-1$ } throw new CompileException(textBundle. format("ApplesoftCompiler.ExpectingLineNumberError", //$NON-NLS-1$ token.toString())); } COM: <s> answer with the line number label </s>
funcom_train/50703305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String indent(boolean inc) { if (SmallXMLObj.indent >= SmallXMLObj.indentStr.length()) return ""; SmallXMLObj.last = inc; if (inc) return SmallXMLObj.indentStr.substring(0, SmallXMLObj.indent++); else return SmallXMLObj.indentStr.substring(0, --SmallXMLObj.indent); } COM: <s> manages the indent and prints the required number of characters to represent </s>
funcom_train/21643889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getHelpRobocodeApiMenuItem() { if (helpRobocodeApiMenuItem == null) { helpRobocodeApiMenuItem = new JMenuItem(); helpRobocodeApiMenuItem.setText("Robocode API"); helpRobocodeApiMenuItem.setMnemonic('A'); helpRobocodeApiMenuItem.setDisplayedMnemonicIndex(9); helpRobocodeApiMenuItem.addActionListener(eventHandler); } return helpRobocodeApiMenuItem; } COM: <s> return the help robocode api menu item </s>
funcom_train/14012525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireStateChanged() { EventListener[] listeners = getEventListenerList().getListeners(ChangeListener.class); ChangeEvent e = new ChangeEvent(this); for (int index = 0; index < listeners.length; ++index) { ((ChangeListener) listeners[index]).stateChanged(e); } } COM: <s> notifies all listeners that have registered for this event type </s>
funcom_train/3926822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printTo( int tokenType ) { int scanner = dataSource.getState(); while ( scanner <= endLimit ) { print( dataSource, scanner ); if ( dataSource.getType( scanner ) == tokenType ) { break; } scanner = dataSource.getNextToken(); } } COM: <s> print up to and including a token of a specific type without going </s>
funcom_train/12781685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureCapacity(int capacity) { if (capacity >= store.length) { int[] old = store; store = new int[1 + (int) (getGrowthFactor() * capacity)]; Arrays.fill(store, defaultValue); System.arraycopy(old, 0, store, 0, old.length); } } COM: <s> make sure we can store to a particular index </s>
funcom_train/18272079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize() throws RemoteException, SimRuntimeException { // -------------------------- // Initialize the data source // -------------------------- this.dataSource = new IntrospectableDataSource(new WorkerIntrospector( this.name), this.name, Worker.class.getName(), World.simulator); LocationSensor sensor = new LocationSensor(Worker.LOCATION_SENSOR); this.dataSource.addSensor(sensor); this.dataSource.register(); this.updateSensor(); // Statistics this.statistics = new WorkerStatistics(this); // If we already got an activity let's execute it. this.work(); } COM: <s> wakes up the worker </s>
funcom_train/25075924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addZipCodePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_School_zipCode_feature"), getString("_UI_PropertyDescriptor_description", "_UI_School_zipCode_feature", "_UI_School_type"), SchoolPackage.Literals.SCHOOL__ZIP_CODE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the zip code feature </s>
funcom_train/2286813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDependency(String name, String version) { CmsModuleVersion moduleVersion = new CmsModuleVersion(version); CmsModuleDependency dependency = new CmsModuleDependency(name, moduleVersion); m_dependencies.add(dependency); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_ADD_MOD_DEPENDENCY_2, name, version)); } } COM: <s> adds a module dependency to the current module </s>
funcom_train/39970874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scenarioSuccess(String scenarioId) { ScenarioResult result = scenarioFailures.remove(scenarioId); log.info(String.format("Scenario %s (%s) succeeded", scenarioId, result.getScenarioType().getSimpleName())); setResults(result, null); scenarioSuccesses.put(scenarioId, result); notifyCountDownLatch(); } COM: <s> report a scenario as successful to the runner </s>
funcom_train/47491416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCodeTextField() { if (codeTextField == null) {//GEN-END:|52-getter|0|52-preInit // write pre-init user code here codeTextField = new TextField("Codigo", null, 40, TextField.NUMERIC);//GEN-LINE:|52-getter|1|52-postInit // write post-init user code here }//GEN-BEGIN:|52-getter|2| return codeTextField; } COM: <s> returns an initiliazed instance of code text field component </s>
funcom_train/7673886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setNameForSsaReg(RegisterSpec ssaReg) { int reg = ssaReg.getReg(); LocalItem local = ssaReg.getLocalItem(); ssaRegToLocalItems.ensureCapacity(reg + 1); while (ssaRegToLocalItems.size() <= reg) { ssaRegToLocalItems.add(null); } ssaRegToLocalItems.set(reg, local); } COM: <s> records a debug local variable name for a specified register </s>
funcom_train/40678951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(final AUTOPLUG_SORT listener) { connect(AUTOPLUG_SORT.class, listener, new GstCallback() { @SuppressWarnings("unused") public GValueArray callback(DecodeBin2 elem, Pad pad, Caps caps, GValueArray factories) { return listener.autoplugSort(elem, pad, caps, factories); } }); } COM: <s> adds a listener for the code autoplug sort code signal </s>
funcom_train/11792343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ResourceKey createAAResource() throws Exception { EndpointReferenceType AREpr = getAREpr(); String oldService = resourceContext.getService(); ((ResourceContextImpl) resourceContext) .setService("iit/acs/ApplicationArchive"); ResourceKey key = ((ApplicationArchiveResourceHome) resourceContext .getResourceHome()).create(AREpr); ((ResourceContextImpl) resourceContext).setService(oldService); return key; } COM: <s> creates a new aa resource </s>
funcom_train/46578130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean replace(Data data, Topic topic, Topic replacement) { synchronized(this) { if (data == null || topic == null || replacement == null) { return false; } if (topic.equals(Topic.getDefault())) { return false; } if (topic.equals(replacement)) { return false; } replaceTopic(data, topic, replacement); return true; } } COM: <s> removes a specific topic replacing it with a different topic </s>
funcom_train/36948742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instruction visitIterNode(IterNode iVisited) { // TODO: push iterator var into the iter's scope. // Scope newScope = pushScope(iVisited); // newScope.getVariables().add( new Variable( newScope, )) // TODO: insert from varNode; either DAsgnNode or LocalAsgnNode // depending... (see: block local var ambiguity) pushScope( iVisited ); return super.visitIterNode(iVisited); } COM: <s> visit an iter node and extract variable references from it </s>
funcom_train/19655648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchAllMarkets() { return mDb.query(DB_TABLE, new String[] { KEY_ID, KEY_TITLE, KEY_STREET, KEY_PLZ, KEY_LOCALITY }, null, null, null, null, null); } COM: <s> return a cursor over the list of all markets in the database </s>
funcom_train/20875054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeGlobalConstraint(GlobalConstraint<V, T> constraint) { constraint.setModel(null); iGlobalConstraints.remove(constraint); if (constraint instanceof InfoProvider<?>) iInfoProviders.remove(constraint); for (ModelListener<V, T> listener : iModelListeners) listener.constraintRemoved(constraint); } COM: <s> removes a global constraint from the model </s>
funcom_train/1683370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeHeaders(final String name) { if (name == null) { return; } for (Iterator i = this.headergroup.iterator(); i.hasNext(); ) { BufferedHeader header = (BufferedHeader) i.next(); if (name.equalsIgnoreCase(header.getName())) { i.remove(); } } } COM: <s> removes all headers with a certain name from this message </s>
funcom_train/46057911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteUserData(Identity identity) { List userNotes = this.listUserNotes(identity); for (Iterator iter = userNotes.iterator(); iter.hasNext();) { this.deleteNote( (Note)iter.next() ); } Tracing.logDebug("All notes deleted for identity=" + identity, this.getClass()); } COM: <s> delete all notes for certain identity </s>
funcom_train/7510783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelFiltersButtons() { if (jPanelFiltersButtons == null) { jPanelFiltersButtons = new JPanel(); jPanelFiltersButtons.setLayout(new FlowLayout(FlowLayout.LEFT)); jPanelFiltersButtons.add(getJButtonSearchFiltered()); jPanelFiltersButtons.add(getJButtonResetFiltered(), null); } return jPanelFiltersButtons; } COM: <s> this method initializes j panel filters buttons </s>
funcom_train/17290598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visit(long tid, int seq, int msg, int d1, int d2, int d3, int d4) { if (msg < 0 || msg > messages.length) { } else { String s = messages[msg]; log.debug(Trace.class.getName(), "dump", MessageFormat.format( s, tid, seq, d1, d2, d3, d4)); } } COM: <s> dumps the contents of the trace buffer to the logger named </s>
funcom_train/22629838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int select(int index){ session.update_readerList() ; String rdr_name = session.get_cgd().get_reader(index); if (rdr_name == null){ screen.error(Errors.WRONG_RDR_NB, Integer.toString(index)) ; return Errors.WRONG_RDR_NB; } return select(rdr_name) ; } COM: <s> connect to the card into the reader number index and do the authetification </s>
funcom_train/8285497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveRelationToDeleted(Item parentID, Item studentID) { delRelatesToTable.save(new Item[] {parentID, studentID}, new Item[] {parentID, studentID}, DBSQLAccessor.AND); relatesToTable.delete(new Item[] {parentID, studentID}, DBSQLAccessor.AND); } COM: <s> moves a parent child relationship to the deleted table </s>
funcom_train/15931488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public V replace(K key, V value) { if (value == null) throw new NullPointerException(); Comparable<K> k = comparable(key); for (;;) { Node<K,V> n = findNode(k); if (n == null) return null; Object v = n.value; if (v != null && n.casValue(v, value)) return (V)v; } } COM: <s> replace entry for key only if currently mapped to some value </s>
funcom_train/40142832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(Object obj, Errors errors) { ValidationUtils.rejectIfEmptyOrWhitespace(errors, "title", "field.required", "*"); ValidationUtils.rejectIfEmptyOrWhitespace(errors, "creationDate", "field.required", "*"); } COM: <s> determines whether the category obj retrieved from the todo form is valid </s>
funcom_train/3098119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void trace(String message) { int level = Project.MSG_DEBUG; if (this.project != null) { String doTrace = this.project.getProperty(ENABLE_TRACE_PROPERTY); if (doTrace != null && Project.toBoolean(doTrace)) { level = Project.MSG_INFO; } } log(this.prefix + ' ' + message, level); } COM: <s> in order to support deep tracing of the processing of antlion you </s>
funcom_train/44838598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Assistant findById(String id) throws RemoteException { Assistant assistant = null; try { assistant = assistantManager.findById(id); } catch (RemoteException rex) { System.out.println("Error on the remote server" + rex); throw new RemoteException("Error on the remote server" + rex); } return assistant; } COM: <s> finds an assistant by id </s>
funcom_train/43605769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeVisitor enterCall(Node parent, Node n) throws SemanticException { Type t = null; if (parent != null && n instanceof Expr) { t = parent.childExpectedType((Expr) n, this); } AscriptionVisitor v = (AscriptionVisitor) copy(); v.outer = this; v.type = t; return v; } COM: <s> sets up the expected type information for later calls to </s>
funcom_train/18934646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(SchedulerData data, ServiceManager manager) { GridProcessAccounting acc = getData(data.getXml(), manager); Document logDocFile = super.getXMl(data.getXml()); Element element = logDocFile.getDocumentElement(); String peerID = element.getAttribute("peerID"); DeploymentID peerDeploymentID = new DeploymentID(peerID); AccountingAggregator aggregator = manager.getDAO( PeerDAO.class).getAccountingAgreggator(peerDeploymentID.getContainerID()); aggregator.reportReplicaAccounting(acc); } COM: <s> report accounting peer id string worker id string state string init cputime long </s>
funcom_train/37834527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createPiedPiper() { piedpiper.setEntityClass("holidaymakernpc"); piedpiper.initHP(1000); piedpiper.setResistance(0); piedpiper.setVisibility(100); piedpiper.add(ConversationStates.IDLE, ConversationPhrases.GREETING_MESSAGES, new GreetingMatchesNameCondition(piedpiper.getName()), true, ConversationStates.IDLE, "hello", null); fullpath = PathesBuildHelper.getOutgoingPhasePathes(); leadNPC(); } COM: <s> function for creating pied piper npc </s>
funcom_train/19457167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeBootCode() { InputStream inputStream = getClass(). getResourceAsStream("/com/webcodepro/applecommander/storage/AppleCommander-boot.dump"); //$NON-NLS-1$ if (inputStream != null) { byte[] bootCode = new byte[SECTOR_SIZE]; try { inputStream.read(bootCode, 0, bootCode.length); writeSector(0, 0, bootCode); } catch (IOException ignored) { // Ignored } } } COM: <s> write the apple commander boot code to track 0 sector 0 of </s>
funcom_train/37040779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void simulateDirectRevelation() { Iterator<Agent> traders = auction.getTraderIterator(); while (traders.hasNext()) { AbstractTradingAgent trader = (AbstractTradingAgent) traders.next(); int quantity = trader.determineQuantity(auction); double value = trader.getValuation(auction); boolean isBid = trader.isBuyer(); Order shout = new Order(trader, quantity, value, isBid); shouts.add(shout); enumerateTruthfulShout(shout); } } COM: <s> update the market state with a truthful shout from each trader </s>
funcom_train/25788721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UriBuilder port(String port) throws IllegalArgumentException { if (port == null) { this.port = null; } else if (port.startsWith("{") && port.endsWith("}")) { this.port = port; } else { this.port(Integer.parseInt(port)); } return this; } COM: <s> set the uri port </s>
funcom_train/11383549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(String user, Path subDir, Path... baseDirs) { // TODO if parent owned by NM, rename within parent inline sched.schedule(new FileDeletion(user, subDir, baseDirs), debugDelay, TimeUnit.SECONDS); } COM: <s> delete the path s as this user </s>
funcom_train/10957813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getAllPaths(File root, List<File> dirs) { dirs.add(root); if (root.isDirectory()) { File[] files = root.listFiles(); if (files != null) { for (File file : files) { if (file.isDirectory()) { getAllPaths(file, dirs); } } } } } COM: <s> if root is a dir find al the subdir paths </s>
funcom_train/25314359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectionRectangle(int x, int y, int x2, int y2) { int w; int h; if (x2 < x) { w = x - x2; x = x2; } else w = x2 - x; if (y2 < y) { h = y - y2; y = y2; } else h = y2 - y; selectionRectangle = new Rectangle(x, y, w, h); } COM: <s> sets a new or updates the selection rectangle while the mouse is being </s>
funcom_train/5268651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attack(Sprite playerSprite, BlockingAnimationGroup anims) { int damage = -Math.max(1, attack - dict.getInt(player.getDefense())); anims.add(new AttackAnimation(this, playerSprite)); anims.add(new HitpointsUpdateAnimation(playerSprite, damage, player.getHitpointsTotal())); player.modifyHP(damage); } COM: <s> makes this monster attack the player </s>
funcom_train/8492374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void regenerateNormal() { float nx = 0; float ny = 0; float nz = 0; Iterator<Triangle> iterator = parents.iterator(); if (parents.size() == 0) { System.out.println("3DS DAMAGED!"); nx = 1; } Triangle tri; Vector3f wn; while (iterator.hasNext()) { tri = iterator.next(); wn = tri.getWeightedNormal(); nx += wn.x; ny += wn.y; nz += wn.z; } // normal = (Vector3f) new Vector3f(nx, ny, nz).normalise(); normal.set(nx, ny, nz); normal.normalise(); } COM: <s> generates the normal of the vertex </s>
funcom_train/2920115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTokenBoundaries(Object t, Token startToken, Token stopToken) { if ( t==null ) { return; } int start = 0; int stop = 0; if ( startToken!=null ) { start = startToken.getTokenIndex(); } if ( stopToken!=null ) { stop = stopToken.getTokenIndex(); } ((Tree)t).setTokenStartIndex(start); ((Tree)t).setTokenStopIndex(stop); } COM: <s> track start stop token for subtree root created for a rule </s>
funcom_train/3447448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setObject(Object bean) { this.bean = bean; try { info = Introspector.getBeanInfo(bean.getClass()); if (info != null) { beanDescriptor = info.getBeanDescriptor(); filterTable(getFilter()); } } catch(IntrospectionException e) { LOG.error("Cannot instantiate components for "+bean, e); } } COM: <s> set the table model to represents the properties of the object </s>
funcom_train/35179526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double length() { double length = 0.0; Waypoint currentWaypoint = null; Waypoint previousWaypoint = null; for (int z = 0; z < waypoints.size(); z++) { /* Only attempt to calculate the distance if we are not * on the first way point of the segment. */ if (z > 0) { currentWaypoint = waypoints.get(z); previousWaypoint = waypoints.get(z - 1); length += currentWaypoint.calculateDistanceTo(previousWaypoint); } } return length; } COM: <s> calculates the length of the track segment </s>
funcom_train/3514790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect() throws UnknownHostException, IOException { m_socket = new Socket(m_host, s_smtp_server_port); m_state = SMTPClientState.CONNECTED; m_in = new BufferedReader(new InputStreamReader(m_socket.getInputStream())); m_out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(m_socket.getOutputStream()))); } COM: <s> open a new connection to the remote host </s>
funcom_train/1049974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendBol(BolPositionedAndWeighted bol){ BolPositionedAndWeighted newBol = new BolPositionedAndWeighted(bol.bolName, bol.style, (double) duration, bol.weight); bols.add(newBol); positionMap.put(new Double(duration), newBol); duration += (1.0 / ((double)bol.getPlayingStyle().getSpeedValue())); duration = algorithm.tools.Calc.roundIfClose(duration); } COM: <s> appends a weighted bol to the sequence </s>
funcom_train/44716676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoSubgroupsRevoking() { int[] ordering = { 0, 1, 2, 3 }; List orders = generateOrdering(ordering); Iterator it = orders.iterator(); OrderingTestRunner runner = new OrderingTestRunner() { void executeTest(int[] ordering) { doNoSubgroupRevokeTest(ordering); } }; outer: while (it.hasNext()) { runner.run((int[]) it.next()); continue outer; } } COM: <s> try orderings of set context step grant permission step add member step </s>
funcom_train/50936818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFinishedTask(Task t) throws VgridException { try { InputStream in = null; try { this.srv.setFinishedTask(this.sutil.serialize(t)); } finally { if (in != null) in.close(); } } catch (IOException e) { throw new VgridException(e); } } COM: <s> sends a finished task to the included server </s>
funcom_train/2302270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawTransitions(Graphics g) { java.awt.Graphics2D g2 = (java.awt.Graphics2D) g; super.drawTransitions(g); Iterator it = selectedTransitions.iterator(); while (it.hasNext()) { Transition t = (Transition) it.next(); try { arrowForTransition(t).drawHighlight(g2); } catch (NullPointerException e) { // Then this transition isn't in here. } } } COM: <s> draws the transitions normally then draws the highlight for </s>
funcom_train/13524207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetComment() { try { assertNull(contr.getComment(null)); assertNull(contr.getComment(curvingInvalid)); } catch (ImpossibleSlopeException e) { e.printStackTrace(); fail("No exception must be thrown by getComment, just return null"); } try { assertNotNull(contr.getComment(ControllerImpl.GRAPH_CLOUD_REGRESSION)); } catch (ImpossibleSlopeException e) { e.printStackTrace(); fail("No exception must be thrown by getComment, just return not null"); } } COM: <s> test get comment string </s>
funcom_train/27678896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(int column, int row, double value) { if ((column<0) || (column>=MAX_COLUMNS)) throw new IllegalArgumentException("Column out of range: "+column); if (row>=counter) throw new IllegalArgumentException("row>=counter"); if (columns[column]==null) { columns[column] = new float[maxRows]; if (column>lastColumn) lastColumn = column; } columns[column][row] = (float)value; } COM: <s> sets the value of the given column and row where </s>
funcom_train/3168841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OrderSpec subOrder(int i) { return (OrderSpec) (mySubOrders.fetch(i)); /* udanax-top.st:30634:CrossOrderSpec methodsFor: 'accessing'! {OrderSpec CLIENT} subOrder: i {Int32} "The sub OrderSpec used for the given axis. Note that this is *not* in lex order." ^(mySubOrders fetch: i) cast: OrderSpec! */ } COM: <s> the sub order spec used for the given axis </s>
funcom_train/27673818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RenderedOp loadImage(String digit, int xOffset, int yOffset) { String imagePath = _imageDir+digit+_imageExtention; RenderedOp digitImage = JAI.create("fileload", imagePath); AffineTransform shift = AffineTransform.getTranslateInstance(xOffset, yOffset); return JAI.create("Affine",(new ParameterBlock()).addSource(digitImage).add(shift).add(new InterpolationNearest())); } COM: <s> returns constant image starting at x offset y offset </s>
funcom_train/22497901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getParagraphElement(final int pos, final boolean noPImplied) { Element element = super.getParagraphElement(pos); if (noPImplied) { while (element != null && element.getName().equalsIgnoreCase("p-implied")) { element = element.getParentElement(); } } return element; } COM: <s> gets the current paragraph element retracing out of p implied if the parameter </s>
funcom_train/17398576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void defineOptionalTypes() throws Exception { // StackOverflowError fix types defineType(LinkedList.class, new LinkedListDefinition()); defineType(HashMap.class, new HashMapDefinition()); defineType(LinkedHashMap.class, new LinkedHashMapDefinition()); } COM: <s> define optional types </s>
funcom_train/11725091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCheckedInUnlock() throws Exception { if (!isSupported(Repository.OPTION_VERSIONING_SUPPORTED)) { throw new NotExecutableException("Repository does not support versioning."); } lockedNode.addMixin(mixVersionable); lockedNode.save(); // lock and check-in lockedNode.checkin(); // do the unlock lockedNode.unlock(); assertFalse("Could not unlock a locked, checked-in node", lockedNode.holdsLock()); } COM: <s> tests if a locked checked in node can be unlocked </s>
funcom_train/31056809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderConnectAgents( Agent s, Agent d ) { // if we are not connecting server agents, then this should // not go through for the actual connection if( !renderCellAgents && ( ( s instanceof CellAgent ) || ( d instanceof CellAgent ) ) ) return; GraphicalConnectionArrow ai = (GraphicalConnectionArrow)layout.arrangeConnectAgents( s, d ); uiCanvas.renderArrow( ai ); uiCanvas.renderUIIcon(); } COM: <s> a method which needs to be implemented when two agents </s>
funcom_train/4467010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetText() { DropdownContainerModule module = createInstance(); module.onModuleLoad(); final DropdownContainer container = module.getDropdownContainer(); final String firstDate = container.getText(); container.addChangeListener(new ChangeListener() { public void onChange(Widget sender) { textChanged = true; assertNotSame(firstDate, container.getText()); } }); container.setText(getText()); assertTrue(textChanged); textChanged = false; } COM: <s> tests the set text and get text methods </s>
funcom_train/46969780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CartPaymentInfo addPaymentAmount(String id, Double amount, String refNum, String authCode, boolean isSingleUse, boolean isPresent, boolean replace) { CartPaymentInfo inf = this.getPaymentInfo(id, refNum, authCode, amount, true); inf.singleUse = isSingleUse; if (replace) { paymentInfo.remove(inf); } paymentInfo.add(inf); return inf; } COM: <s> adds a payment method payment method type </s>
funcom_train/4470143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onClose(CloseEvent<PopupPanel> event) { BodyElement body = Document.get().getBody(); if ( body.isOrHasChild(mask)) { body.removeChild(mask); } //remove the window resize listener if ( resizeRegistration != null) { resizeRegistration.removeHandler(); } } COM: <s> removes the mask when the dialog is closed </s>
funcom_train/46937587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPaneOntology() { if (jScrollPaneOntology == null) { jScrollPaneOntology = new JScrollPane(); jScrollPaneOntology.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); jScrollPaneOntology.setViewportBorder(BorderFactory.createLineBorder(Color.black, 1)); jScrollPaneOntology.setBorder(null); jScrollPaneOntology.setPreferredSize(new Dimension(300, 260)); jScrollPaneOntology.setViewportView(getJTreeOntology()); } return jScrollPaneOntology; } COM: <s> this method initializes j scroll pane ontology </s>
funcom_train/51222557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IShape getShapeAt(int x, int y) { ListIterator< IShape > iterator = this.elements.listIterator( this.elements.size() ); while ( iterator.hasPrevious() ) { IShape shape = iterator.previous(); if (shape.contains(x, y)) { return shape; } } return null; } COM: <s> returns the shape at position x y </s>
funcom_train/6464798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLayer(int index, ILayer layer) throws AILibException { if(layer == null) throw new AILibException(getClass(), "setLayer(int, ILayer)", Messages.get("null.argument")); if(index >=0 && index < layers.length) layers[index] = layer; else throw new AILibException(getClass(), "setLayer(int, ILayer)", new ArrayIndexOutOfBoundsException("(0 <= index < layers.length)")); } COM: <s> replaces the layer designated by the given index by the supplied layer </s>
funcom_train/25311762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(int previous, int current) { if (previous == -1) first = nexts[current]; else nexts[previous] = nexts[current]; if (nexts[current] == -1) last = previous; if (store.level == headsOfEliminatedTuples.stamp()) { nexts[current] = headsOfEliminatedTuples.value(); } else nexts[current] = -1; headsOfEliminatedTuples.update(current); if (tailsOfEliminatedTuples.stamp() < store.level || tailsOfEliminatedTuples.value() == -1) tailsOfEliminatedTuples.update(current); } COM: <s> it removes the tuple which is no longer valid </s>
funcom_train/11012514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBackupRecord() { HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet s = wb.createSheet(); GridsetRecord gridsetRec = s.getSheet().getGridsetRecord(); assertEquals(true, gridsetRec.getGridset()); s.setGridsPrinted(true); assertEquals(false, gridsetRec.getGridset()); } COM: <s> test the gridset field gets set as expected </s>
funcom_train/2581977
/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 == this) { return true; } if (!(obj instanceof Month)) { return false; } Month that = (Month) obj; if (this.month != that.month) { return false; } if (this.year != that.year) { return false; } return true; } COM: <s> tests the equality of this month object to an arbitrary object </s>