__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/17674918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addForDelete(OID oid, State state) { if (Debug.DEBUG) { // make sure untyped OIDs are not added if (oid.getAvailableClassMetaData() == null) { BindingSupportImpl.getInstance().internal("oid is untyped: " + oid); } } toBeDeleted.add(oid, state); } COM: <s> add the oid and state for deletion </s>
funcom_train/4446783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void RequestForVoiceChat(Socket ClientSocket,String FromUserName,String ToUserName) { clientobject = GetClientObject(ToUserName); if(clientobject != null) { SendMessageToClient(clientobject.getSocket(),"REQU "+ GetClientObject(FromUserName).getSocket().getInetAddress().getHostAddress() + "~" + FromUserName); } } COM: <s> function to request user for voice chat </s>
funcom_train/12569568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sizeColumnsToEditorWidth() { if (this.fEditor != null) { this.fEditor.cancelEditing(); } Table table = this.fTableViewer.getTable(); table.setRedraw(false); TableColumn[] columns = table.getColumns(); int columnWidth = table.getClientArea().width / columns.length; for (int i = 0; i < columns.length; i++) { columns[i].setWidth(columnWidth); } table.setRedraw(true); } COM: <s> spread the size of the editor for the columns </s>
funcom_train/48406990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addScopePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ContentDescription_scope_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ContentDescription_scope_feature", "_UI_ContentDescription_type"), SpemxtcompletePackage.eINSTANCE.getContentDescription_Scope(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the scope feature </s>
funcom_train/8717407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StateCluster build_SemanticPredicate(GrammarAST pred) { // don't count syn preds if ( !pred.getText().toUpperCase() .startsWith(Grammar.SYNPRED_RULE_PREFIX.toUpperCase()) ) { nfa.grammar.numberOfSemanticPredicates++; } NFAState left = newState(); NFAState right = newState(); Transition e = new Transition(new PredicateLabel(pred), right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; } COM: <s> build what amounts to an epsilon transition with a semantic </s>
funcom_train/37447772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getLocks() { List list = null; try { myRWLock.readLock().acquire(); list = (List) ((ArrayList) myLocks).clone(); } catch (InterruptedException ie) { ourLogger.info(ie); } finally { myRWLock.readLock().release(); } return list; } COM: <s> returns a clone of the current locks </s>
funcom_train/8480995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void populateGameWorld() { factions = new ArrayList<Faction>(); for (Alignment alignment : Alignment.values()) { factions.add(new Faction(alignment.toString(), alignment)); } for (Faction f : factions) { setRelations(f); setBlueprints(f); setStructures(f); } } COM: <s> creates a faction for each alignment </s>
funcom_train/7751169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() throws IOException { if (jPanel == null) { GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.fill = GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; gridBagConstraints.gridheight = 2; gridBagConstraints.weightx = 1.0; jPanel = new JPanel(); jPanel.setLayout(new GridBagLayout()); jPanel.add(getJTabbedPane(), gridBagConstraints); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/22950213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkHiddenLayers(){ ArrayList <NeuronLayer> hiddenLayers = this.hiddenLayers(); Iterator<NeuronLayer> layerIterator = hiddenLayers.iterator(); while (layerIterator.hasNext()){ if (!this.checkHiddenLayer(layerIterator.next())) return false; } return true; } COM: <s> checks consistency of hidden layers of neural network </s>
funcom_train/17620114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException { Graphics2D g2 = (Graphics2D) graphics; g2.translate(-mOrigin.getX(), -mOrigin.getY()); mPainter.print(g2, pageFormat, 1); return PAGE_EXISTS; } COM: <s> prints the page at the specified index into the specified </s>
funcom_train/40449694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getStopCommand() { if (stopCommand == null) {//GEN-END:|55-getter|0|55-preInit // write pre-init user code here stopCommand = new Command("Stop", Command.STOP, 0);//GEN-LINE:|55-getter|1|55-postInit // write post-init user code here }//GEN-BEGIN:|55-getter|2| return stopCommand; } COM: <s> returns an initiliazed instance of stop command component </s>
funcom_train/45038965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCorrectFiles() throws Exception { Start[] asts = OclDirectoryParser.parseDirectory( "test_files" + File.separator + "context_checker"); ContextChecker cc = new ContextChecker(new ExampleTypeFacade()); for (int i = 0; i < asts.length; i++) { Start start = asts[i]; try { cc.checkContext(start); } catch (OclContextException oce) { fail( "Context Exception was thrown while parsing: \nAST:" + asts[i].toString() + "\nException: " + oce.toString()); } } } COM: <s> tests files that are correctly defined </s>
funcom_train/4520049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateSubTreeGreyness(TreePath path) { if (pathHasChildrenWithValue(path, !isPathChecked(path))) { addToGreyedPathsSet(path); } else { removeFromGreyedPathsSet(path); } if (isPathGreyed(path)) { for (TreePath childPath : getChildrenPath(path)) { updateSubTreeGreyness(childPath); } return; } else { ungreySubTree(path); } } COM: <s> updates the greyness of sub tree starting at path </s>
funcom_train/46722583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSelection(Route r) { // get index of route and set as current index currentIndex = GuiObjectManager.getRoutesModel().getIdxForRoute(r); // set selection ListSelectionModel lsm = rtable.getSelectionModel(); lsm.setSelectionInterval(currentIndex, currentIndex); // make selected line visible rtable.scrollRectToVisible(rtable.getCellRect(currentIndex, 0, true)); } COM: <s> set selection in table to specific route </s>
funcom_train/45253317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createContextMenu() { MenuManager menuMgr = new MenuManager(); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager menuMgr) { fillMenu(menuMgr); } }); Menu menu = menuMgr.createContextMenu(this); setMenu(menu); } COM: <s> creates the context menu </s>
funcom_train/17201279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prependDecrement(BasicBlock bb, IR ir) { if (DEBUG) VM.sysWrite("Adding Increment to " + bb + "\n"); RegisterOperand use = cbsReg.copyRO(); RegisterOperand def = use.copyU2D(); Instruction inc = Binary.create(INT_ADD, def, use, IRTools.IC(-1)); bb.prependInstruction(inc); } COM: <s> append a decrement of the global counter to the given basic block </s>
funcom_train/23938688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void task() { Message message = null; while (running) { try { message = (Message) inBoundMessageQueue.take(); if (messageListener != null) { messageListener.onMessage(message); } if (Thread.interrupted()) { running = false; } } catch (InterruptedException ex) { running = false; } } finishShutdown(); } COM: <s> method to process </s>
funcom_train/40001609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void ensureCapacity(int length) { if (v.length < length) { Vector3D[] newV = new Vector3D[length]; System.arraycopy(v,0,newV,0,v.length); for (int i=v.length; i<newV.length; i++) { newV[i] = new Vector3D(); } v = newV; } } COM: <s> ensures this polgon has enough capacity to hold the </s>
funcom_train/27809102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getArtistId( String artist ) throws SQLException { int retVal = 0; Statement s = c.createStatement(); ResultSet rs = s.executeQuery( "select artistId from artists where name=\'" + massageField(artist) + "\'" ); if ( rs.first() ) retVal = rs.getInt( 1 ); return retVal; } COM: <s> gets the artist id from the database </s>
funcom_train/47024064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRandomInt() { Integer newInt = null; do { newInt = new Integer((int) (Math.random() * Integer.MAX_VALUE)); } while(this.previousRandomInts.contains(newInt)); this.previousRandomInts.add(newInt); return newInt.intValue(); } COM: <s> generates a random integer that is unique with respect to the document </s>
funcom_train/39378751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void render(HtmlStringBuffer buffer) { if (getShowBorder()) { renderTagBegin(getTag(), buffer); buffer.closeTag(); if (hasControls()) { buffer.append("\n"); } renderContent(buffer); renderTagEnd(getTag(), buffer); } else { renderChildren(buffer); } } COM: <s> render the html representation of the field set </s>
funcom_train/46011451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleBecomePlayer(HttpServletRequest request) { String sending_page = (String) request.getParameter("sending_page"); if ((sending_page != null) && (sending_page.equalsIgnoreCase("become_player"))) { String actor_id = (String) request.getParameter("actor_id"); String actor_name = (String) request.getParameter("actor_name"); if (actor_id != null) { setActorId(new Long(actor_id)); setActorName(actor_name); tabposition = "1"; } } } COM: <s> called when a player becomes another player </s>
funcom_train/35108746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type getType(String typeName) { // This is not synchronized since having two type objects for the // same logical type is not the end of the world. // Comparison should be through equals() anyway. Type result = map.get(typeName); if (result==null) map.put(typeName, result = new SimpleType(typeName)); return result; } COM: <s> get a type object for the given text description </s>
funcom_train/46743870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOwnerUserRef(DisplayModel ownerUserRef) { if (Converter.isDifferent(this.ownerUserRef, ownerUserRef)) { DisplayModel oldownerUserRef= new DisplayModel(this); oldownerUserRef.copyAllFrom(this.ownerUserRef); this.ownerUserRef.copyAllFrom(ownerUserRef); setModified("ownerUserRef"); firePropertyChange(String.valueOf(ORDERS_OWNERUSERREFID), oldownerUserRef, ownerUserRef); } } COM: <s> user who owns this template </s>
funcom_train/3923627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get( Object obj ) throws Exception { if ( obj==null ) { return null; } ClassDescriptor cd = (ClassDescriptor)rep.getClass(obj.getClass()); long db_id = ClassDescriptor.dbidField.getLong(obj); do { objectHandler.getObject( cd, obj, db_id ); cd = cd.clsDescSuperClass; } while ( cd!=null ); return obj; } COM: <s> retreives an object from the database </s>
funcom_train/48073149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RelatedManyProperty relatedMany(String propPath) throws IllegalArgumentException { IPropertyBinding prop = getPropertyBinding(propPath); if(prop == null) return null; if(prop.getType() != PropertyType.RELATED_MANY) { throw new IllegalArgumentException("Property '" + propPath + "' does not map to a related many property"); } return (RelatedManyProperty) prop; } COM: <s> retrieves a related many property value from the model given a property </s>
funcom_train/25914033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeToParcel(Parcel parcel, int flags) { super.writeToParcel(parcel, flags); parcel.writeString(title_); parcel.writeString(author_); parcel.writeString(fullThumbUrl_); parcel.writeString(cmpThumbUrl_); parcel.writeString(originalUrl_); bitmap_.writeToParcel(parcel, flags); parcel.writeLong(labelId_); } COM: <s> write to parcel </s>
funcom_train/3022825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBeginColumn() { if (beginColumn != -1) { return beginColumn; } else { if ((children != null) && (children.length > 0)) { return ((SimpleNode)children[0]).getBeginColumn(); } else { throw new RuntimeException("Unable to determine begining line of Node."); } } } COM: <s> gets the begin column attribute of the simple node object </s>
funcom_train/12567686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean isDateBetween(GregorianCalendar start, GregorianCalendar finish, GregorianCalendar begin, GregorianCalendar end){ boolean ret= false; if(start.after(end) || start.compareTo(end)==0){ ret=true; } else { if(begin.after(finish) || begin.compareTo(finish)==0){ ret=true; } } if((start.compareTo(begin)==0) && (finish.compareTo(end)==0)) { ret=false; } return ret; } COM: <s> is the given start and finish period with the begin and end </s>
funcom_train/39001724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() { System.out.print('T'); System.out.println('['); for (int loop = 0; loop < routes.length; loop++) { if (routes[loop] != null) { routes[loop].print(); } } System.out.println(']'); } COM: <s> prints the routing table </s>
funcom_train/23779055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int _confirmOverwrite(IFile argFileToOverwrite) { String title = SessionViewMessages.SclSaveAsOverwriteDialog_title; String msg = NLS.bind(SessionViewMessages.SclSaveAsOverwriteDialog_text, argFileToOverwrite.getName()); MessageDialog dialog= new MessageDialog(getShell(), title, null, msg, MessageDialog.QUESTION, CONFIRM_OPTIONS, 2); return dialog.open(); } COM: <s> asks the user to confirm a file overwrite </s>
funcom_train/41752786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String converToBase16(String toBeConvertedString){ //get the bytes of to be converted string byte[] bytes = toBeConvertedString.getBytes(); StringBuffer buffer = new StringBuffer(); //iterate the bytes and convert to each byte into hex string for(byte b :bytes){ int bint = b; buffer.append(Integer.toHexString(bint)); } return buffer.toString(); } COM: <s> converts any string into base16 format </s>
funcom_train/21384901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Combo createCombo(Composite parent) { Combo combo = new Combo(parent, SWT.READ_ONLY); GridData data = new GridData(GridData.FILL_HORIZONTAL); // data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; combo.setLayoutData(data); combo.addTraverseListener(new TraverseListener () { public void keyTraversed(TraverseEvent e) { if(e.detail==SWT.TRAVERSE_RETURN ||e.detail==SWT.TRAVERSE_TAB_NEXT){ e.detail = SWT.TRAVERSE_TAB_NEXT; e.doit=true; }else e.doit=false; } }); return combo; } COM: <s> utility method that creates a combo box </s>
funcom_train/12531445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importRow(Row r) { if (r == null || this == r.getTable()) throw new IllegalArgumentException("Only non-null rows from other tables can be imported"); this.put(r.getParty(), r.getVotes(), r.getSeats()); } COM: <s> fast way to add a row from another table </s>
funcom_train/18060587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XEDataset addElement(XEGraphPoint gp, Object userData) { XEDataset ds = new XEDataset(gp, userData); // make all datasets have the same point count for(XEDataset td : XgDatasetCollection) { if (td.getPointCount() > 0) { ds.forcePointCount(td.getPointCount()); break; } } XgDatasetCollection.addElement(ds); return ds; } COM: <s> add a dataset to the area graph </s>
funcom_train/46328241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPhoneSilent() { AudioManager audioManager =(AudioManager) getSystemService(Context.AUDIO_SERVICE); audioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT); ResultProcessor.process(this, intent, ResultProcessor.RESULT_SUCCESS, getString(R.string.phone_set_silent)); } COM: <s> set the phone to silent </s>
funcom_train/32060414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectNext( boolean up ) { if( up ) { if ( currenthullpartindex == ( hullparts.size() - 1 ) ) { currenthullpartindex = 0; } else { currenthullpartindex++; } } else { if ( currenthullpartindex == 0 ) { currenthullpartindex = hullparts.size() - 1; } else { currenthullpartindex--; } } hullpartsscroller.setBarPos( currenthullpartindex ); } COM: <s> changes the current index to the next </s>
funcom_train/3085084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _datePickerUpdate() { if (! setDateInProgress) { synchronized(this) { try { setDateInProgress = true; if (getDatePicker() != null && isValidDateTime() && ! isExpanded()) { getDatePicker().setSelectedDate(getDate()); getDatePicker().setDisplayedDate(getDate()); } } finally { setDateInProgress = false; } } } } COM: <s> called to update the date picker with the current </s>
funcom_train/32150726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addURIPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UIVocabulary_URI_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UIVocabulary_URI_feature", "_UI_UIVocabulary_type"), UIVocabularyPackage.Literals.UI_VOCABULARY__URI, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the uri feature </s>
funcom_train/31239593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Triangle[] tri, Shader[] sh, int start, int count) { if (numTriangles + tri.length >= maxTriangles) { throw new ArrayIndexOutOfBoundsException("Too many triangles"); } System.arraycopy(tri, start, triangle, numTriangles, count); System.arraycopy(sh, start, shader, numTriangles, count); numTriangles += count; } COM: <s> add a whole load of triangles </s>
funcom_train/44164369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void csSinkColonyShips(Unit attacker, Colony colony, ChangeSet cs) { List<Unit> units = colony.getTile().getUnitList(); while (!units.isEmpty()) { Unit unit = units.remove(0); if (unit.isNaval()) { csSinkShipAttack(attacker, unit, cs); } } } COM: <s> sinks all ships in a colony </s>
funcom_train/29955385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TestOrder getOrder(boolean orderByTime) { if (mRuntimes == null) { throw new RuntimeException("Cannot call getOrder() before the tests have been run"); } if (orderByTime) { return new TestOrder(mTestClasses, mRuntimes); } else { return new TestOrder(mTestClasses); } } COM: <s> returns a test ordering </s>
funcom_train/10802041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SequenceMetaData addSequenceMetaData(String name) { if (_locking) { synchronized (this) { SequenceMetaData meta = newSequenceMetaData(name); _seqs.put(name, meta); return meta; } } else { SequenceMetaData meta = newSequenceMetaData(name); _seqs.put(name, meta); return meta; } } COM: <s> add a new sequence metadata to the repository and return it </s>
funcom_train/21850124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getId() { if (isEmbedded()) { if (m_id == null) m_id = "embedded." + String.valueOf(hashCode()); return m_id; } else { if (m_abspath == null) { if (m_id == null) m_id = "linked." + String.valueOf(hashCode()); return m_id; } else return m_abspath; } } COM: <s> returns a unique id for this form </s>
funcom_train/3102423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createTypeRules(final List<IRule> rules) { Assertion.valid(rules); final IToken number= new Token(new SourcePresentationAttribute(this, UserPreferences.EIFFEL_COLOR_NUMBER)); final IToken type= new Token(new SourcePresentationAttribute(this, UserPreferences.EIFFEL_COLOR_TYPE)); rules.add(new WordRule(new EiffelNumberDetector(), number)); rules.add(new DictionaryBasedWordRule(new EiffelClassDetector(), type)); } COM: <s> creates the necessary rules for type syntax highlighting </s>
funcom_train/1572252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean _isWOTag() { if ((this.idx + 18) >= this.len) /* check whether it is long enough */ return false; if (this.buffer[this.idx] != '<') /* check whether it is a tag */ return false; return this.handler != null && _ucIsCaseEqual(this.buffer, this.idx, "<WEBOBJECT"); } COM: <s> check for lt webobject </s>
funcom_train/51773804
/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 ("SeCSERegistry".equals(portName)) { setSeCSERegistryEndpointAddress(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/37638626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component prepareEditor(GridCellEditor editor, int row, int column) { Object value = gridModel.getValueAt(row, column); CellStyle style = styleModel.getCellStyle(row, column); boolean isSelected = isSelected(row, column); Component editorComponent = editor.getEditorComponent(row, column, value, style, isSelected, this); return editorComponent; } COM: <s> prepares the editor for cell row column </s>
funcom_train/10984087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTemplateNameByRef(String refGroupName, String key) { String templateName = null; Map/*< String, String >*/ templateRefGroup = (Map) _templateRefGroups.get(refGroupName); if (templateRefGroup != null) { templateName = (String) templateRefGroup.get(key); } return templateName; } COM: <s> retrieve a template name from a reference group in url template config </s>
funcom_train/37571946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFilingSubmission() throws Exception { startOpenEFM(); InternalLxmlFiling filing = getInternalLxmlFiling(); StubAdapter adapter = new StubAdapter(); LxmlResponse response = adapter.submitFiling(filing); assertNotNull(response); assertEquals("OK", response.getResponseText()); assertEquals(LxmlResponse.RECEIVED, response.getResponseCode()); } COM: <s> test the submission of filings to the stub adapter </s>
funcom_train/5380330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validateInput() { String errorMessage = null; if (validator != null) { errorMessage = validator.isValid(text.getText()); } // Bug 16256: important not to treat "" (blank error) the same as null // (no error) setErrorMessage(errorMessage); } COM: <s> validates the input </s>
funcom_train/23945243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node splitEdge(int splitInd) { //napravi link s parentom->splitNode parent.next.remove(edge.charAt(0)); Node splitNode = new Node(parent, edge.substring(0, splitInd)); //napravi link splitNode -> this splitNode.prefixCount = prefixCount; splitNode.link(edge.substring(splitInd), this); // System.out.println("Splitnode(" + splitNode.edge // + ")\tchild(" + edge + ")"); return splitNode; } COM: <s> splits edge which connects this node to its parent creating </s>
funcom_train/29020688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocation (int x, int y) { checkWidget (); int flags = OS.SWP_NOSIZE | OS.SWP_NOZORDER | OS.SWP_NOACTIVATE; /* * Feature in WinCE. The SWP_DRAWFRAME flag for SetWindowPos() * causes a WM_SIZE message to be sent even when the SWP_NOSIZE * flag is specified. The fix is to set SWP_DRAWFRAME only when * not running on WinCE. */ if (!OS.IsWinCE) flags |= OS.SWP_DRAWFRAME; setBounds (x, y, 0, 0, flags); } COM: <s> sets the receivers location to the point specified by </s>
funcom_train/34795445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void calculateFitness() { for (IndividualSet individual : individualSets) { int s = 0; for (IndividualSet other : individualSets) { if (individual != other && individual.dominates(other)) { s += other.size(); } } individual.setStrength(s); } for (IndividualSet individual : individualSets) { int f = 0; for (IndividualSet other : individualSets) { if (individual != other && other.dominates(individual)) { f += other.getStrength() * other.size(); } } individual.setFitness(f); } } COM: <s> calculate the fitness </s>
funcom_train/20381658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPieSliceSize(double pieSliceSize) { invalidateDependentSlices(getCurveIndex(getParent())); if (!withinRange(pieSliceSize, 0, 1)) throw new IllegalArgumentException("pieSliceSize=" + pieSliceSize + "; the requirement: " + "0.0 <= pieSliceSize <= 1.0 must be satisfied."); this.pieSliceSize = pieSliceSize; } COM: <s> specifies a value that defines the angular size of any pie slice </s>
funcom_train/40945769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLocation(Widget w) { for (final Iterator i = locationToWidget.keySet().iterator(); i .hasNext();) { final String location = (String) i.next(); if (locationToWidget.get(location) == w) { return location; } } return null; } COM: <s> get the location of an widget </s>
funcom_train/45250652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hookListeners() { IWorkbenchActivitySupport support = PlatformUI.getWorkbench() .getActivitySupport(); IActivityManager activityManager = support.getActivityManager(); activityManager.addActivityManagerListener(activityManagerListener); IPreferenceStore store = WorkbenchPlugin.getDefault() .getPreferenceStore(); store.addPropertyChangeListener(propertyChangeListener); } COM: <s> hook the listener that will respond to any activity state changes </s>
funcom_train/26531196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addExternallyAddedTask(String path) { boolean madeChange = model.addTask(path, dash.getData(), dash .getHierarchy(), dash.getCache(), true); if (madeChange) { treeTable.getTree().expandRow(0); recalcAll(); enableTaskButtons(); } } COM: <s> certain external processes might add a task to this schedule </s>
funcom_train/43672314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addListener(Object listener) { if (listener != null) { synchronized (this) { // since methods executed within the eventProcessor's run method // are possible candidates for calling addListener(), we // postpone // the adding so it is acertained that the getListener() calls // in the eventProcessor's run method won't be disturbed!! collQueue.add(new PostponedAction(listener, true)); EventQueue.invokeLater(this); } } } COM: <s> adds a new listener </s>
funcom_train/651620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Color createColor(String key, Display display) { Color color = null; if (this.fStore.contains(key)) { RGB rgb = null; if (this.fStore.isDefault(key)) { rgb = PreferenceConverter.getDefaultColor(this.fStore, key); } else { rgb = PreferenceConverter.getColor(this.fStore, key); } if (rgb != null) { color = new Color(display, rgb); } } return color; } COM: <s> creates a color from the information stored in the given preference </s>
funcom_train/43540234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoCharactersFile() { try { IUIContext ui = getUI(); diffFiles(ui, "NoCharFile.txt"); //$NON-NLS-1$ fail("We expected an exception because one file has no elements and the other does."); //$NON-NLS-1$ } catch (DifferenceException de) { // Do nothing. We expected an exception } } COM: <s> test no characters file a empty file should throw an exception </s>
funcom_train/13384666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VectorTime getLocalClock() { if (localTimeStamp == null) { String temp = getLocalDAOFactory().getVarDAO().getValue(VAR_LOCALTIME); if (temp == null) { temp = "0"; } localTime = Integer.parseInt(temp); localTime++; localTimeStamp = new VectorTime(); localTimeStamp.add(getHostname(), localTime); getLocalDAOFactory().getVarDAO().setValue(VAR_LOCALTIME, "" + localTime); } return localTimeStamp; } COM: <s> the local time ticks exactly once per application instance </s>
funcom_train/38302512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Connection getOutgoingCommandsConnection() throws ICPException { try { synchronized (outgoingCommandsConnectionLock) { while (outgoingCommandsConnection == null) { outgoingCommandsConnectionLock.wait(OUTGOING_COMMANDS_CONNECTION_TIMEOUT); if (outgoingCommandsConnection == null) { if (frontEndStatus == TERMINATED) { // We terminated in the meanwhile throw new ICPException("Terminated"); } else { // Timeout expired setFrontEndDisconnected(); throw new ICPException("Response timeout"); } } } Connection c = outgoingCommandsConnection; outgoingCommandsConnection = null; return c; } } catch (InterruptedException ie) { throw new ICPException("Interrupted while waiting for outgoing-commands-connection"); } } COM: <s> wait until a connection to deliver commands to the front end is ready </s>
funcom_train/16595159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCmbText() { if (cmbText == null) { cmbText = new JComboBox(); try { mapText=new int[sds.getFieldCount()]; int num=-1; for (int i = 0; i < sds.getFieldCount(); i++) { cmbText.addItem(sds.getFieldName(i)); num++; mapText[i]=num; } //cmbText.addItem("- Defaulf -"); } catch (ReadDriverException e) { e.printStackTrace(); } cmbText.setBounds(new java.awt.Rectangle(15,42,166,20)); } return cmbText; } COM: <s> this method initializes cmb origin </s>
funcom_train/48152587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawBoxPlot(Graphics g, double x, double r, int y){ g.drawRect(getXGraph(x - r), y - 3, getXGraph(x + r) - getXGraph(x - r), 6); g.drawLine(getXGraph(x), y - 6, getXGraph(x), y + 6); } COM: <s> the following method draws a symmetric horizontal boxplot centered at </s>
funcom_train/17542605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Integer getNumberOfPointsInTheTerrain() throws IOException { // Create the stream used to read the input file BufferedReader br = new BufferedReader(new FileReader(m_terrainFilename)); String firstLine = br.readLine(); br.close(); String[] splittedLine = firstLine.split(" "); return Integer.valueOf(splittedLine[1]) * Integer.valueOf(splittedLine[2]); } COM: <s> returns the number of points in the </s>
funcom_train/45622933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNoStandardLibPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CscType_noStandardLib_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CscType_noStandardLib_feature", "_UI_CscType_type"), MSBPackage.eINSTANCE.getCscType_NoStandardLib(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the no standard lib feature </s>
funcom_train/50221548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getGraphInstanceAttribute(String key) { Object res = getGraph().getAttribute(key); if (res == null) { AttributeSpec spec = getGraphTypeSpec(key); if (spec != null) // has a spec so return the default value return spec.value; else return null; } else return res; } COM: <s> return the nominated graph attribute </s>
funcom_train/40403011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClearning() { // create the expandable table. ExpandableFlexTable<TextBox> expandable = new ExpandableFlexTable<TextBox>( injector.mainPanel(), injector.addButton(), injector .removeButtonProvider()); // add two items to it. for (int i = 0; i < 15; i++) { expandable.add(new TextBox()); } expandable.clear(); assertEquals(1, expandable.getMainPanel().getRowCount()); } COM: <s> want to make sure rows are cleaned up after test </s>
funcom_train/35841893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Font getFont(int fontStyle) { if ((fontStyle & Font.ITALIC) != 0) { if ((fontStyle & Font.BOLD) != 0) { return fontBoldItalic; } else { return fontItalic; } } else { if ((fontStyle & Font.BOLD) != 0) { return fontBold; } else { return fontPlain; } } } COM: <s> utility function to convert a font style integer into a font </s>
funcom_train/32968360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValidate() { System.out.println("validate"); LLEvent instance = new LLEvent(); assertEquals(false, instance.validate()); instance.setMsgID(123L); assertEquals(false, instance.validate()); instance.setMsgClass(0); assertEquals(true, instance.validate()); } COM: <s> test of validate method of class org </s>
funcom_train/17922672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateEmptyFile() { System.out.println("createEmptyFile"); String srcfile = "d:/A/armin.txt"; boolean expResult = true; boolean result = FileHandling.createEmptyFile(srcfile); System.out.println("Source: " + srcfile); System.out.println("Created: " + result); assertEquals(expResult, result); } COM: <s> test of create empty file method of class eu </s>
funcom_train/41016591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDataField(String key, byte[] value, String contentType, String filename) { // set encoding type encType = ENCTYPE_MULTIPART; Field f = new Field(key, value); f.contentType = contentType; f.filename = filename; fields.addElement(f); } COM: <s> add a data field </s>
funcom_train/3464280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeSize(int w, int h) { for(int i=0;i<w;i++) { if(i<width) { Vector v = (Vector)data.elementAt(i); for(int j=height;j<h;j++) { v.add(j, null); } } else { Vector v = new Vector(h); data.add(i, v); for(int j=0;j<h;j++) { v.add(j, null); } } } width = w; height = h; } COM: <s> changes the size of the vector to w by h </s>
funcom_train/47553578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConstantValue(Object constantValue) { // if (! (constantValue == null) && // ! (constantValue instanceof Boolean) && // ! (constantValue instanceof Number) && // ! (constantValue instanceof Character) && // ! (constantValue instanceof String)) { // // throw new InternalCompilerError( // "Can only set constant value to a primitive or String."); // } this.constantRef.update(new ConstantValue(constantValue)); } COM: <s> destructive update of constant value </s>
funcom_train/13492402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean unlisten(final Object[] r, final List bindings) { Object[] retobj = new Object[2]; if (((String) r[0]).equals("action")) ((javax.swing.AbstractButton) r[1]).removeActionListener(adaptor); else if (((String) r[0]).equals("change")) ((javax.swing.AbstractButton) r[1]).removeChangeListener(adaptor); retobj[0] = r[0]; retobj[1] = r[1]; bindings.add(retobj); return Boolean.TRUE; } COM: <s> a built in predicate for removing swing adaptor as an action listener </s>
funcom_train/39950729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onClick(ClickEvent event) { // Send a variable change to the server side component so it knows the widget has been clicked String button = "left click"; // The last parameter (immediate) tells that the update should be sent to the server // right away client.updateVariable(paintableId, CLICK_EVENT_IDENTIFIER, button, true); } COM: <s> called when a native click event is fired </s>
funcom_train/1581383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector2DDouble convert(Vector2DDouble point) { double xd = point.getX() - this.center.getX(); double yd = point.getY() - this.center.getY(); double xn = this.cosa * xd + this.sina * yd; double yn = -this.sina * xd + this.cosa * yd; return new Vector2DDouble(xn, yn); } COM: <s> convert given point to the coordinate system of this square </s>
funcom_train/22277216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int minItemWidth() { int i, count, minWidth, width; ListItem item; minWidth = 0; count = items.size(); for (i = 0; i < count; i++) { item = (ListItem)items.elementAt(i); width = item.minWidth(); if (width > minWidth) minWidth = width; } return minWidth; } COM: <s> returns the largest b min width b of all of the list views </s>
funcom_train/20029372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand() { if (okCommand == null) {//GEN-END:|49-getter|0|49-preInit // write pre-init user code here okCommand = new Command("Save", Command.OK, 0);//GEN-LINE:|49-getter|1|49-postInit // write post-init user code here }//GEN-BEGIN:|49-getter|2| return okCommand; } COM: <s> returns an initiliazed instance of ok command component </s>
funcom_train/18513647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(double n, int index) { if (getModelAt(index).getValue() != n) { if (isLinked()) { int linked = getPartner(index); double dx = getValueAt(index) - getValueAt(linked); if ((n - dx) > getMaximumLimit() || (n - dx) < getMinimumLimit()) return; getModelAt(linked).setValue(n - dx); } getModelAt(index).setValue(n); fireStateChanged(); } } COM: <s> sets value for the thumb </s>
funcom_train/43245855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBNCity() { System.out.println("getBNCity"); EmergencyContactDG5Object instance = new EmergencyContactDG5Object(); String expResult = ""; String result = instance.getBNCity(); 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 bncity method of class org </s>
funcom_train/33233712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getFaildC() { if (FaildC == null) {//GEN-END:|92-getter|0|92-preInit // write pre-init user code here FaildC = new Command("Failed", Command.ITEM, 0);//GEN-LINE:|92-getter|1|92-postInit // write post-init user code here }//GEN-BEGIN:|92-getter|2| return FaildC; } COM: <s> returns an initiliazed instance of faild c component </s>
funcom_train/15558797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File createNextMutation() throws IOException { BufferedReader bufferedReader = new BufferedReader(new FileReader(file)); currentMutationParameteres = getNextMutation(); if (currentMutationParameteres == null) { return null; } StringBuffer content = createMutatedCode(bufferedReader, currentMutationParameteres); File fileOut = new File(file.getAbsolutePath() + ".mut"); BufferedWriter bw = new BufferedWriter(new FileWriter(fileOut)); bw.write(content.toString()); bw.close(); return fileOut; } COM: <s> creates one mutation in code file code </s>
funcom_train/4780576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Path findServerPath(String pathString) throws AppException { Path path = null; boolean found = false; if (paths != null) { int size = paths.size(); for (int i = 0; i < size; i++) { path = paths.get(i); if (path.getRepository() == null && path.getPath().equals(pathString)) { found = true; break; } } if (!found) { path = null; } } return path; } COM: <s> locates a server level path </s>
funcom_train/9343538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(MidiMessage msg, long timeStamp){ // No reason to send out too large numbers long now = System.currentTimeMillis(); if ( first == 0 ) { first = now; } long sysTime = now-first; MidiEvent event = new MidiEvent(msg, sysTime); String s = eventToString(event); if ( s == null ) return; // Ignore some messages System.out.println("Sending "+s+" to " + protocol); protocol.send(s); } COM: <s> send midi msg over network in real time </s>
funcom_train/42474692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeReference(Reference reference) { if (reference == null) throw new NullPointerException("Parameter 'reference' must not be null."); for (Iterator<Reference> it = references.iterator(); it.hasNext();) { Reference storedReference = it.next(); if (reference.equals(storedReference)) { references.remove(storedReference); return; } } } COM: <s> removes a reference from the list of references </s>
funcom_train/21935328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LinkedList searchForMessageType(String type) { LinkedList stuff = new LinkedList(); for(int i = 0; i < messages.size(); i++) { if( ((String)messages.get(i)).indexOf( type ) != -1 ) stuff.add( (String)messages.get(i)); } return stuff; } COM: <s> search for a particular message type </s>
funcom_train/45238364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JComboBox getJComboBoxTipoExecucaoParalelo() { if (jComboBoxTipoExecucaoParalelo == null) { jComboBoxTipoExecucaoParalelo = new JComboBox(); jComboBoxTipoExecucaoParalelo.setLocation(new Point(53, 44)); jComboBoxTipoExecucaoParalelo.setSize(new Dimension(112, 20)); jComboBoxTipoExecucaoParalelo.addItem("2"); jComboBoxTipoExecucaoParalelo.addItem("3"); jComboBoxTipoExecucaoParalelo.addItem("4"); } return jComboBoxTipoExecucaoParalelo; } COM: <s> this method initializes j combo box tipo execucao paralelo </s>
funcom_train/33402849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int incrementGlobalTermOccurence (int termId, int freq) { int oldFreq = (int) this.numGlobalTermOccurences.get (termId); this.numGlobalTermOccurences.set (termId, 1.0 * oldFreq + freq); this.numberOfTerms += freq; // count each term as appropriate for a global term count. return (oldFreq + freq); } COM: <s> updates the number of times weve seen a particular term throughout an </s>
funcom_train/19055785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setup(XHeadLocal source) { int size; this.paramListParam_.clear(); size = source.paramListParam_.size(); for (int i = 0;i < size;i++) { addParamListParam((XParamListParam)source.getParamListParam(i).clone()); } } COM: <s> initializes the code xhead local code by the xhead local code source code </s>
funcom_train/44994517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: resolver = new URIResolver() { public Source resolve(String href, String base) throws TransformerException { File file = new File(href); if (!file.isAbsolute()) { String parentDir=null; if(base == null){ parentDir=path; } else{ parentDir=new File(base).getAbsolutePath(); } file = new File(parentDir, href); } try { return new SAXSource(new InputSource(new FileInputStream(file))); } catch (Exception e) { return null; } } }; COM: <s> the href parameter can be either absolute or relative path </s>
funcom_train/18525250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void graphRBtn_ItemStateChanged(ItemEvent itemEvent) { boolean enabled = false; if (getgraphRBtn().isSelected()) { enabled = true; } else { enabled = false; } getgraphTabbedPane().setEnabled(enabled); getgraphTabbedPane().getSelectedComponent().setVisible(enabled); return; } COM: <s> graph rbtn item state changed </s>
funcom_train/7291462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int paragraphLimit(int pos) { int run = fRunArray.findRunContaining(pos-1); if (run == fRunArray.fPosEnd) run = fRunArray.fNegStart; else run++; if (run == fRunArray.getArrayLength()) { return fRunArray.getCurTextLength(); } int start = fRunArray.getLogicalRunStart(run); return start+1; } COM: <s> returns the limit of the paragraph containing offset tt pos tt </s>
funcom_train/10231575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsArc(String fromLabel, String toLabel) { for (Arc arc : arcs) { String aFromLabel = arc.getFromVertex().getLabel(); String aToLabel = arc.getToVertex().getLabel(); if (aFromLabel.equals(fromLabel) && aToLabel.equals(toLabel)) { return true; } } return false; } COM: <s> tests if an arc that connects the vertices with the specified labels is </s>
funcom_train/46437429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isWorkDay(Date date) { String reason = (String) this.getHolidays().get(date); if (isAbsenceReason(reason)) { if (planningSettings.noHolidays && isHolidayReason(reason)) { return true; } return false; } calendarGMT.setTime(date); return planningSettings.noHolidays || isWorkDay(calendarGMT.get(Calendar.DAY_OF_WEEK)); } COM: <s> checks is the given date is a working day </s>
funcom_train/3372825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRowExtentAt(int r, int c) { TableCellElementInfo cell = getCell(r, c); if (cell != null) { int rows = cell.getRowCount(); int delta = 1; while ((r - delta) >= 0 && grid[r - delta][c] == cell) { delta++; } return rows - delta + 1; } return 0; } COM: <s> returns the rowspan of the specified entry </s>
funcom_train/1477163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder buf = new StringBuilder(); buf.append(ll.x).append(",").append(ll.y).append(",").append(ur.x).append(",").append(ur.y); return buf.toString(); } COM: <s> returns the comma separated string with the 4 coordinates of this extent </s>
funcom_train/20876306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void afterAssigned(long iteration, ExamPlacement value) { ExamPlacement p = value; iTable[p.getPeriod().getIndex()].add(value.variable()); iDayTable[p.getPeriod().getDay()].add(value.variable()); } COM: <s> an exam was assigned update student assignment table </s>
funcom_train/47106131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemWeapon13() { JMenuItem menuItem = new JMenuItem(); menuItem.setText(Weapon.W_13.getItemName()); menuItem.setEnabled(false); menuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setPlrReadiedWeapon(Weapon.W_13); } }); return menuItem; } COM: <s> creates the fourteenth choice for the weapon menu </s>