__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/17944299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reload() { timer.cancel(); timer = new Timer(); for (int i = 0; i < Main.getAlarmList().size(); i++) { Alarm alarm = Main.getAlarmList().getAlarm(i); if (alarm.isActive()) { timer.schedule(new AlarmTask(alarm), alarm.getTime().toDate()); } } } COM: <s> rescheduls all alarms </s>
funcom_train/4518068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMinutes(int minutes) { if (minutes > 59) { throw new IllegalArgumentException("minutes must not exceed 59"); } Calendar cal = getCalendar(); cal.set(Calendar.MINUTE, minutes); _date.setTime(cal.getTimeInMillis()); firePropertyChange(); } COM: <s> set the minutes in the date </s>
funcom_train/1382352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnArrivi() { if (btnArrivi == null) { btnArrivi = new JButton(); btnArrivi.setText("Arrivi"); btnArrivi.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { visualizzaArrivi(); // TODO Auto-generated Event stub // actionPerformed() } }); } return btnArrivi; } COM: <s> this method initializes btn arrivi </s>
funcom_train/41719338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BoundingBox getBoundingBox() { int minX = this.getX(); int maxX = this.getX() + this.getWidth() -1; int minY = this.getY(); int maxY = this.getY() + this.getHeight() -1; return new BoundingBox(minX, minY, maxX, maxY); } COM: <s> returns the bounding box for this basic shape </s>
funcom_train/49317379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setListData(JList jList, List<String> list) { DefaultListModel model = (DefaultListModel) jList.getModel(); model.removeAllElements(); if (list != null) { int n = list.size(); for (int i = 0; i < n; i++) { model.addElement(list.get(i)); } } } COM: <s> set the contents of the given jlist to the given list </s>
funcom_train/439331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { // Register Global Event Handler GlobalEventHandler globalEventHandler = new GlobalEventHandler(); S2d.mainContainer.setGlobalEventHandler(globalEventHandler); // Register EventContainerSprites RegisteredEC gameEC = S2d.mainContainer.registerEC(GameEC.class); S2d.mainContainer.registerEC(BoardEC.class, gameEC); // Adding EventContainerSprite to MainContainer new GameEC(S2d.mainContainer); } COM: <s> this should be used to initalize all game specific code </s>
funcom_train/10980978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSimpleLong() { Object value = dynaForm.get("longProperty"); assertNotNull("Got a value", value); assertTrue("Got correct type", (value instanceof Long)); assertEquals("Got correct value", ((Long) value).longValue(), (long) 321); } COM: <s> test get simple property on a long property </s>
funcom_train/9233055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSmallZoomControlVisible(boolean on) { if (on) { execute("map.smallZoomControl = new GSmallZoomControl(); map.addControl(map.smallZoomControl);"); } else { execute("if(map.smallZoomControl) {map.removeControl(map.smallZoomControl); delete map.smallZoomControl;}"); } } COM: <s> shows hieds the small zoom map control no panning control </s>
funcom_train/3350261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMode(int dmanr, int mode) throws DMAException { mode |= (dmanr & 3); if (dmanr <= 3) { dma1IO.outPortByte(DMA1_MODE_REG, mode); } else { dma2IO.outPortByte(DMA2_MODE_REG, mode); } } COM: <s> program the mode register for a given channel </s>
funcom_train/4187466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void startVDMQuoteCommentsList(VDMQuoteCommentsList.requestType type){ //If the Activity was not already instanciated if (this.vdmQuoteCommentsList == null){ this.vdmQuoteCommentsList = new Intent(this,VDMQuoteCommentsList.class); } this.vdmQuoteCommentsList = this.vdmQuoteCommentsList.putExtra("com.ovhoo.vdm.vdm.VDM_QUOTE_COMMENTS_LIST_TYPE", type.ordinal()); startActivity(this.vdmQuoteCommentsList); } COM: <s> start a vdmquote comments list with the specified parameter </s>
funcom_train/8232426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem4() { if (stringItem4 == null) {//GEN-END:|115-getter|0|115-preInit // write pre-init user code here stringItem4 = new StringItem("", "");//GEN-LINE:|115-getter|1|115-postInit // write post-init user code here }//GEN-BEGIN:|115-getter|2| return stringItem4; } COM: <s> returns an initiliazed instance of string item4 component </s>
funcom_train/34673482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValidatorServiceRegExpSuccess() throws Exception { // set up key & value & validation String key = "TestForm"; TestTypesObject value = new TestTypesObject(); value.setStringValue1("file.txt"); String validationXml = getCore().getParameterValue("ServiceRegExpValidationSpec",""); String error = testValidatorServiceGeneric(key, value, validationXml); if(error.equals("")){ // success - no errors return; } System.out.println(); System.out.println("testValidatorServiceInRangeSuccess"); System.out.println(error); fail(error); } COM: <s> test validator service regular expression validation </s>
funcom_train/13675165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String makeFrom(String username) { if (isVirtual()) { return username; } else { int idx = username.indexOf("@"); if (idx > 0) { username = username.substring(0, idx); } username = username + "@" + getReplyToDomain(); return username; } }//makeFrom COM: <s> returns the from address for a given username </s>
funcom_train/51539744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SDLPoint getCenter() { int cX = x + (int)Math.floor(width / 2 + 0.5d); int cY = y + (int)Math.floor(height / 2 + 0.5d); // int cX = x + (Math.round(width / 2)); // int cY = y + (Math.round(height / 2)); return new SDLPoint(cX, cY); } COM: <s> gets the point at the center of the rectangle </s>
funcom_train/4614840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String printEntryLine() { Date time = new Date(super.timestamp); //SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd '\t' HH:mm:ss.SSS"); return time + "\t" + new IEEEAddress(super.senderAddress).asDottedHex() + "\t" + latitude + "\t" + longitude + "\t" + hdop; } COM: <s> a string representation of this gpspacket for writing records </s>
funcom_train/644399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean includesParentheses(String input) { int length = input.length(); String currentChar; for (int i = 0; i < length; i++) { currentChar = String.valueOf(input.charAt(i)); if (currentChar.equals("(")) { return true; } if (currentChar.equals(")")) { return true; } } return false; } COM: <s> checks if the string contains parentheses like or </s>
funcom_train/2360218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexOfChild(Object parent, Object child) { Element element = (Element) parent; if (showforefathers) { int count = 0; if (element.getParentElement() != null) { count++; if (element == element.getParentElement()) return 0; return -1; } } return element.getChildren().indexOf(child); } COM: <s> returns the index of child in parent </s>
funcom_train/37420612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeFromBucket(K key, V value) { LinkedList<V> l; if (super.containsKey(key)) { l = get(key); boolean succes = l.remove(value); if (succes && l.isEmpty()) { super.remove(key); } return succes; } else { return false; } } COM: <s> if the last element from a linked list is removed the key </s>
funcom_train/50313252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear (int index) { checkWidget (); if (!(0 <= index && index < itemsCount)) error (SWT.ERROR_INVALID_RANGE); Rectangle bounds = items [index].getBounds (); int oldRightX = bounds.x + bounds.width; items [index].clear (); if (columns.length == 0) updateHorizontalBar (0, -oldRightX); redrawItem (index, false); } COM: <s> clears the item at the given zero relative index in the receiver </s>
funcom_train/46575731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startCONSTRAINTS(NamedNodeMap nnm) { x = getAttributeInt(nnm, "x", 0); y = getAttributeInt(nnm, "y", 0); w = getAttributeInt(nnm, "width", 0); h = getAttributeInt(nnm, "height", 0); ((Component)ctx.control).setBounds(x, y, w, h); } COM: <s> read the constraints and apply to the current control </s>
funcom_train/31658599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Database setup(String databaseName) throws SQLite.Exception{ Database db = new Database(); TableResult result = new TableResult(); db.open(databaseName,0); /* Create main formlet table */ db.exec("create table formlets (" + "name TEXT CONSTRAINT textnotnull NOT NULL," + "format TEXT CONSTRAINT formatnotnull NOT NULL," + "formlet TEXT CONSTRAINT formletnotnull NOT NULL," + "primary key (name,format))",result); return db; } COM: <s> creates a new empty formlet database in the file code database name code </s>
funcom_train/4095029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addProviderPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EconomicEvent_provider_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EconomicEvent_provider_feature", "_UI_EconomicEvent_type"), ReamodelPackage.Literals.ECONOMIC_EVENT__PROVIDER, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the provider feature </s>
funcom_train/20767297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPaused (boolean yes){ boolean old = paused; paused = yes; support.firePropertyChange(paused ? EVENT_PAUSED : EVENT_RESUMED,old,paused); if ( yes ){ pausePlayAction.setPlayAction(); } else{ pausePlayAction.setPauseAction(); } } COM: <s> pauses unpauses playback </s>
funcom_train/43397775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LimitDenotator internalRemoveNote(NotePath notePath) { try { int[] powersetPath = notePath.getPowersetPath().toIntArray(); int noteIndex = notePath.getNoteIndex(); PowerDenotator powerset = (PowerDenotator)this.score.get(powersetPath); return (LimitDenotator) powerset.removeFactor(noteIndex); } catch (RubatoException e) { e.printStackTrace(); return null; } } COM: <s> removes a specific node from its containing soundscore or </s>
funcom_train/8568231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cancelAction() { if (mIsActivityStartedFlag) { AsyncCallback lCancelActionCallback = new AsyncCallback() { public void onSuccess(Object pResult) { resetExecutionPanel(); } public void onFailure(Throwable pCaught) { Window.alert(mConstants.asynchronousCommunicationError() + "\n" + pCaught.getLocalizedMessage()); resetExecutionPanel(); } }; mDataService.cancelAction(lCancelActionCallback); } } COM: <s> performing cancel action </s>
funcom_train/3389852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Identifier getFlatName() { if (isQualified()) { return getName().getFlatName(); } if (ipos > 0 && name.charAt(ipos-1) == '.') { if (ipos+1 == name.length()) { // last component is idNull return Identifier.lookup(name.substring(0,ipos-1)); } String n = name.substring(ipos+1); String t = name.substring(0,ipos); return Identifier.lookup(t+n); } // Not inner. Just return the same as getName() return this; } COM: <s> return the class name without its qualifier </s>
funcom_train/19378084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTranslator(String translatorClass) { String methodName = "setTemplateEngine"; try { ComponentContainer.instance().registerDefaultComponent( Translator.class, ClassUtils.loadClass(translatorClass)); } catch (Throwable th) { String errMsg = "Error performing " + methodName; logger.error(errMsg, th); throw new LibraryException(errMsg, th); } } COM: <s> sets the translator class that will perform </s>
funcom_train/43235435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addPosition(char key) { position[positionEnd].key = key; position[positionEnd].state = SP_STATE_N; position[positionEnd].morphCount = 0; position[positionEnd].nextPosition = 0; position[positionEnd].sIndex = 0; position[positionEnd].uIndex = 0; position[positionEnd].nIndex = 0; return positionEnd++; } COM: <s> adds new segment position </s>
funcom_train/50592318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeClassFile(String classFileName) { for(int i=0;i<classFiles.size();i++){ File classFile = (File)classFiles.get(i); if( classFile.getName().equals(classFileName) ) classFiles.remove(classFile); } } COM: <s> remove class file from the list </s>
funcom_train/49318541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getCompositeName(Composite composite) { Composite[] ar = CanvasDraw.COMPOSITES; int n = ar.length; for (int i = 0; i < n; i++) { if (ar[i] == composite) { return CanvasDraw.COMPOSITE_NAMES[i]; } } return CanvasDraw.COMPOSITE_NAMES[0]; } COM: <s> return the name corresponding to the given composite </s>
funcom_train/19214744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object o1, Object o2) { if (logger.isDebugEnabled()) { logger.debug("compare(Object, Object) - start"); //$NON-NLS-1$ } int returnint = updown * ((CridInfo) o1).getCridStartDate().compareTo(((CridInfo) o2).getCridStartDate()); if (logger.isDebugEnabled()) { logger.debug("compare(Object, Object) - end"); //$NON-NLS-1$ } return returnint; } COM: <s> vergleicht zwei uebergebene code crid info code auf ihre chronologisch reihenfolge </s>
funcom_train/2811621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addAllToQueue (Collection pQueueList) { if (pQueueList == null) { throw new RuntimeException("Attempted to add null container to Scheduler#Queue!"); } int lInserted=0; for(Iterator it = pQueueList.iterator(); it.hasNext(); ) { try { WFExecutionObject lQueue = (WFExecutionObject)it.next(); addQueue( lQueue ); ++lInserted; } catch(Throwable t) { continue; } } return lInserted; } COM: <s> adds all elements in p queue list to association queue </s>
funcom_train/31155812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadJPEGImage(String path) { // image file type: jpg //setImage(Utilities.getBufferedImageFromJPEGFile(path)); BufferedImage img = Utilities.getBufferedImageFromJPEGFile(path); if (img != null) { _positionedImages.add((PosBuffImage) new PosBuffImage(img, 0, 0)); setImage(img); } } COM: <s> loads a jpeg image from the given path </s>
funcom_train/40926860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getActivacionActivarCommand() { if (activacionActivarCommand == null) {//GEN-END:|128-getter|0|128-preInit // write pre-init user code here activacionActivarCommand = new Command("ACTIVAR", Command.OK, 0);//GEN-LINE:|128-getter|1|128-postInit // write post-init user code here }//GEN-BEGIN:|128-getter|2| return activacionActivarCommand; } COM: <s> returns an initiliazed instance of activacion activar command component </s>
funcom_train/12751653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receiveData(DataFrame frame, Participant p) { /** * This concatenates all received packets for a single timestamp * into a single byte[] */ byte[] data = frame.getConcatenatedData(); /** * This returns the CNAME, if any, associated with the SSRC * that was provided in the RTP packets received. */ String cname = p.getCNAME(); System.out.println("Received data from " + cname); System.out.println(new String(data)); } COM: <s> used to receive data from the rtp library </s>
funcom_train/20883250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireWordStarted(SpeakableEvent event) { if (listener != null) { listener.wordStarted(event); } Enumeration E; if (synth.speakableListeners != null) { E = synth.speakableListeners.elements(); while (E.hasMoreElements()) { SpeakableListener sl = (SpeakableListener) E.nextElement(); sl.wordStarted(event); } } } COM: <s> utility function that sends a code word started code event </s>
funcom_train/13366066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl() { viewer = new TreeViewer(this, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); viewContentProvider = new DSTreeViewContentProvider(viewedDatasourceDefinitions); viewer.setContentProvider(viewContentProvider); viewer.setLabelProvider(new DSTreeViewLabelProvider()); viewer.setInput(this); hookContextMenu(); } COM: <s> this is a callback that will allow us </s>
funcom_train/21016915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setForegroundEditingTool(IEditingTool editingTool) { requireNotNull(editingTool, "@require (editingTool != null)"); IEditingContext context = new DefaultEditingContext( _foregroundEditManager, _tooltipManager, _clipboardManager, _cursorManager); _foregroundEditingTool.deactivate(context); _foregroundEditingTool = editingTool; _foregroundEditingTool.setRenderingSystem(_renderingSystem); _foregroundEditingTool.activate(context, null); } COM: <s> sets the foreground editing tool </s>
funcom_train/46841036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsParam(String name) { // System.out.println("K3Element: containsParam(): " + m_id + " / " + name); if (super.containsParam(name)) { return true; } if (m_baseElement != null) { return m_baseElement.containsParam(name); } return false; } COM: <s> this method overrides method in super class </s>
funcom_train/19423021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MenuItem addOption(MenuItem item) { MenuItem[] oldOptions = options; if (oldOptions == null) { options = new MenuItem[1]; } else { options = new MenuItem[oldOptions.length + 1]; for (int i=0; i<oldOptions.length; i++) { options[i] = oldOptions[i]; } } item.setSequence(options.length - 1); options[options.length - 1] = item; return item; } COM: <s> p adds the passed menu item to the list of options </s>
funcom_train/21173445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDate () { int actualMonth = monthBox.getSelectedIndex() + 1; int actualDay = dayBox.getSelectedIndex() + 1; Integer actualYear = (Integer) yearBox.getSelectedItem (); StringBuffer result = new StringBuffer (10); if (actualMonth < 10) { result.append (0); } result.append (actualMonth); result.append ("/"); if (actualDay < 10) { result.append (0); } result.append (actualDay); result.append ("/"); result.append (actualYear); return (result.toString()); } COM: <s> retrieve the date represented by the currently selected items </s>
funcom_train/37655227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSourceFileScope(ASTCompilationUnit node) { // When we do full symbol resolution, we'll need to add a truly top-level GlobalScope. Scope scope; ASTPackageDeclaration n = node.getPackageDeclaration(); if (n != null) { scope = new SourceFileScope(n.jjtGetChild(0).getImage()); } else { scope = new SourceFileScope(); } scopes.push(scope); node.setScope(scope); } COM: <s> creates a new global scope for an ast node </s>
funcom_train/870612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static protected void badUsage(String message) { if (!"".equals(message)) { System.err.println(message); } System.err.println("Command line usage: java org.xbrlapi.impl.LoaderImpl [parameters]"); System.err.println("Parameters: "); System.err.println(" -f path and filename, in local filesystem, of file to be analysed"); System.err.println(" -u URI of file to be analysed"); if ("".equals(message)) { System.exit(0); } else { System.exit(1); } } COM: <s> report incorrect usage of the command line xlink validator </s>
funcom_train/9919226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadVertices(String filename) { float[] tmp = new float[4 * size]; for (int i = 0; i < size; i++) tmp[4 * i + 3] = 1.0f; beginUpdateVertices(); loadFloatArrayFromBinary(filename, tmp, size, 4, 3); vertices.put(tmp); endUpdateVertices(); } COM: <s> loads vertices from binary file into model </s>
funcom_train/17893221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getScrollableTracksViewportHeight() { // fetch the table's parent Container viewport = getParent(); // if the parent is not a viewport, calling this isn't useful if (!(viewport instanceof JViewport)) { return false; } // return true if the table's preferred height is smaller // than the viewport height, else false return getPreferredSize().height < viewport.getHeight(); } COM: <s> make jtable expand to fill viewport height </s>
funcom_train/2586043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDayCount3030E() { final SerialDate d1 = SerialDate.createInstance(1, MonthConstants.APRIL, 2002); final SerialDate d2 = SerialDate.createInstance(2, MonthConstants.APRIL, 2002); final int count = SerialDateUtilities.dayCount30E(d1, d2); assertEquals(1, count); } COM: <s> problem 30 e 360 day count </s>
funcom_train/24378484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void callGetMQTemplateBlock(TemplateBlockType templateBlockType) { MQMain.logger.debug("MQModel: callGetMQTemplateBlock"); String templateBlock; templateBlock = mathqurateObjectFactory.getTypeAsXML(templateBlockType); MQTemplateBlock templateBlockHelper = new MQTemplateBlock(templateBlockType, templateBlock); firePropertyChange(DefaultController.GET_MQTEMPLATEBLOCK_PROPERTY, "", templateBlockHelper); } COM: <s> calls the get mq template block </s>
funcom_train/23347230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetAllowUndeclared() { jep.initSymTab(); // clear the Symbol Table jep.setAllowUndeclared(true); jep.parseExpression("x"); SymbolTable st = jep.getSymbolTable(); int i = 0; // should only contain a single variable x for (Enumeration e = st.elements(); e.hasMoreElements(); ) { Variable var = (Variable) e.nextElement(); Assert.assertTrue(var.getName().equals("x")); i++; } Assert.assertTrue(i==1); } COM: <s> tests bug 1585128 set allow undeclared does not work </s>
funcom_train/1472171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Clients listClients(int page, Integer perPage, String username, String email) throws ApiException, IOException { Request request = new Request(RequestMethod.CLIENT_LIST); request.setPage(page); request.setPerPage(perPage); request.setUsername(username); request.setEmail(email); return performRequest(request).getClients(); } COM: <s> get a list of clients </s>
funcom_train/4206436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelected(boolean isSelected) { this.isSelected = isSelected; if (selectionMode == DIG_IN_SELECTION && children != null) { Enumeration nodeEnum = children.elements(); while (nodeEnum.hasMoreElements()) { CheckNode node = (CheckNode)nodeEnum.nextElement(); node.setSelected(isSelected); } } } COM: <s> selects or deselects node </s>
funcom_train/10522759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testArrayReturnType() throws Exception { ResultsTestCtrl.Customer[] customers = testCtrl.getCustomerArray(); assertNotNull(customers); assertEquals(4, customers.length); assertEquals("tester1", customers[0].getFname()); assertEquals(24, customers[3].userid); } COM: <s> test array return type </s>
funcom_train/24622130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private mxUndoManager getCurrentUndoManager() { int selIndex = MainWindow.instance.getCenterPane().getSelectedIndex(); if ( selIndex < 0 || selIndex >= MainWindow.instance.getCenterPane().getTabCount() ) return null; Component component = MainWindow.instance.getCenterPane().getTabComponentAt(selIndex); if ( component instanceof PipelineTabComponent ) { return ((PipelineTabComponent)component).getUndoManager(); } return null; } COM: <s> gets the undo manager of the currently open pipeline graph </s>
funcom_train/36776002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIOWDFlag(){ String hex = Integer.toHexString(reg); // In case the hex string began with 0's, in which case they were cut off while (hex.length() < 8) { String temp = new String(hex); hex = new String("0" + temp); } return Integer.parseInt(hex.substring(3,4), 16)/4; } COM: <s> gets the iowd flag of the register </s>
funcom_train/39305520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int rowIndex, int columnIndex) { CustomTableRow row = data.get(rowIndex); if (columnIndex == 0) { return row.getId(); } else if (columnIndex == 1) { return row.getStatus().toString(); } else if (columnIndex == 2) { return row.getStartTime(); } else if (columnIndex == 3) { return row.getEndTime(); } return null; } COM: <s> returns the value for the cell at column index and row index </s>
funcom_train/8076183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInstances(Instances newInst) { m_data = newInst; setPercent(); setupAttribLists(); m_rseed.setText("1"); origDist.setSelected(true); initInternalFields(); m_cp.setInstances(m_data); m_cp.setCindex(m_classIndex); m_updateBt.doClick(); } COM: <s> this method changes the instances object of this class to a new one </s>
funcom_train/17576809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getHelpCommandsMenuItem() { if (helpCommandsMenuItem == null) { helpCommandsMenuItem = new JMenuItem(); helpCommandsMenuItem.setText("Commands"); helpCommandsMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JFrame frame = new JFrame("Help - Commands"); frame.setSize(500,390); HtmlPanel hp = new HtmlPanel(Constants.HELP_COMMANDS); frame.setContentPane(hp); frame.setVisible(true); hp.scrollToTop(); } }); } return helpCommandsMenuItem; } COM: <s> this method initializes help menu item </s>
funcom_train/25707660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAllBoardsButton_actionPerformed(final ActionEvent e) { final List<Board> boards = ((TofTreeModel) tofTree.getModel()).getAllBoards(); for( final Board board : boards ) { if( board.isManualUpdateAllowed() ) { tofTree.updateBoard(board); } boardTableModel.fireTableDataChanged(); } } COM: <s> tries to start update for all allowed boards </s>
funcom_train/25870416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void debit(int userAccountNumber, double amount) { double availableBalance = getBalanceAfterDebit(userAccountNumber, amount); //insert Transaction info TransactionVO transaction = new TransactionVO(userAccountNumber, TransactionVO.WITHDRAW_TYPE, amount, availableBalance, ATMUtils.getCurrentDateTime()); insertTransaction(transaction); } COM: <s> withdraw debit an amount from of account with specified account number </s>
funcom_train/7728022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAlignments(String encodedAlignments) { StringTokenizer tokenizer = new StringTokenizer(encodedAlignments, " ,"); hAlign = decodeAlignment(tokenizer.nextToken()); vAlign = decodeAlignment(tokenizer.nextToken()); ensureValidOrientations(hAlign, vAlign); } COM: <s> decodes a string description for the horizontal and vertical alignment </s>
funcom_train/41880332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setQueryWherePool(String value) { String prefix = value.substring(0, StaticInformation.SOBJECT_PREFIX_SIZE); String sobject = SObjectDB.KEYPREFIX_SOBJECT.get(prefix); Log.v(TAG, "SObject with prefix:" + sobject + "-" + prefix); // exttract refid StringBuffer refId = SObjectDB.WHERE_HOLDER.get(sobject); refId.append(value); // set refid SObjectDB.WHERE_HOLDER.put(sobject, refId); } COM: <s> analyze sobject type to analyze first 3 digits and set query where pool </s>
funcom_train/51375130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws AxisFault { try { embedded = new SimpleHttpServer(port, this.threadPool); embedded.setRequestHandler(new HTTPWorker(configurationContext, contextPath)); } catch (IOException e) { log.error(e); throw new AxisFault(e); } } COM: <s> start this server as a non daemon </s>
funcom_train/51417727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveToPositionPos(Point3D mark, Point3D dir, Point3D up, boolean lowerquality) { dir = (dir.minus(gSphere.getPoint(new Point2D(mark.x, mark.y), mark.z))).normalize(); /* get intersection point with sphere */ dir = getEarthIntersection(dir, gSphere.getPoint(new Point2D(mark.x, mark.y), mark.z)); moveToPosition(mark, dir, up, lowerquality); } COM: <s> starts an animated movement to the given position </s>
funcom_train/28114132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Ann createAnno(info inf,int index){ WayPoint wp=(WayPoint)inf; Ann anno=new Ann(wp,this,index,draw,0,((WayPoint)wp).name,wpAnColor,wpAnLtColor,wpAnFont); //wp.annoNum=0; wp.anno=anno; return anno; } COM: <s> creates an ann on a way point in the wpc </s>
funcom_train/46144280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Surgery getStaticLocationById(String locationId) { if (locationId != null) { for (Surgery s : availableLocations) { if (locationId.equals(s.getSurgeryId())) { return s; } } } // No match, just return an empty surgery so the GUI doesn't get null pointer. Surgery s = new Surgery(); s.setSurgeryId(""); s.setSurgeryName(""); s.setSurgeryAddress(""); return s; } COM: <s> used to retrieve a </s>
funcom_train/27675654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConditionWhere() { CompilerState state = forloopPackage.getCompilerState(); Object result = state.compileExprToValue( new ApplyExpr( new NameExpr( "conditionWhere1" ), new SkipExpr() ) ); assertTrue( result instanceof Maplet ); Maplet testResult = (Maplet)result; assertEquals( new Integer( 15 ), testResult.getValue() ); assertEquals( new Integer( 25 ), testResult.getKey() ); } COM: <s> checks for the tt where lt expr gt tt condition </s>
funcom_train/35442810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEsNumero() { System.out.println("esNumero"); char letra1 = '4'; char letra2 = 'h'; Fide instance = new Fide(); boolean expResult1 = true; boolean expResult2 = false; boolean result1 = instance.esNumero(letra1); boolean result2 = instance.esNumero(letra2); assertEquals(expResult1, result1); assertEquals(expResult2, result2); } COM: <s> test of es numero method of class controller </s>
funcom_train/44772577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasNonVirtualItemState(ItemId id) { if (cache.isCached(id)) { return true; } try { if (id.denotesNode()) { return persistMgr.exists((NodeId) id); } else { return persistMgr.exists((PropertyId) id); } } catch (ItemStateException ise) { return false; } } COM: <s> checks if this item state manager has the given item state without </s>
funcom_train/3524450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateComponentForBad1() throws Exception { setupTestPage("TestPage1.html"); Component component = factory.createComponentForElement("__", container .getDocumentAdapter().getElementById("__"), holders); assertNull("Expected null", component); } COM: <s> test method create component for element case p invalid id </s>
funcom_train/5395489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEncodeDouble() { System.out.println("encodeDouble"); double value = 0.0; byte[] expResult = null; byte[] result = DecodeEncodePrimitives.encodeDouble(value); 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 encode double method of class org </s>
funcom_train/14457067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getOnlyChildElement(Element parent, String name) throws NoOnlyChildException { NodeList nodes = parent.getElementsByTagName(name); if(nodes.getLength() != 1) { throw new NoOnlyChildException(parent.getNodeName(), name); } return (Element)nodes.item(0); } COM: <s> gets the only child with name code name code from code parent code </s>
funcom_train/11104331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuffer getIsAClientId() { StringBuffer id = new StringBuffer(); ComponentBean parent = getIsAParent(); while (parent != null) { id.insert(0, parent.getJsfid() + (id.length() > 0 ? ":" : "")); parent = parent.getIsAParent(); } parent = null; return id; } COM: <s> p returns an xpath like string that describes the heritage </s>
funcom_train/40451151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdVerPedidoVisita() { if (cmdVerPedidoVisita == null) {//GEN-END:|119-getter|0|119-preInit cmdVerPedidoVisita = new Command("Ver Pedido", Command.OK, 0);//GEN-LINE:|119-getter|1|119-postInit }//GEN-BEGIN:|119-getter|2| return cmdVerPedidoVisita; } COM: <s> returns an initiliazed instance of cmd ver pedido visita component </s>
funcom_train/44544612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCheckNullFileThrowsFileNotFoundException() { try { Utils.checkFile(null, ""); fail("expected an exception given a null file"); } catch (IOException ioex) { assertTrue("wrong exception thrown.", ioex instanceof FileNotFoundException); } } COM: <s> tests that passing a null file to check file throws a </s>
funcom_train/19061808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageIcon getImageIcon(String contentType, String contentSubtype) { StringBuffer buf = new StringBuffer(); buf.append("gnome-"); buf.append(contentType); buf.append("-"); buf.append(contentSubtype); buf.append(".png"); ImageIcon icon = ImageLoader.getMimetypeIcon(buf.toString()); if (icon == null) { icon = ImageLoader.getMimetypeIcon("gnome-" + contentType + ".png"); } if (icon == null) { icon = ImageLoader.getMimetypeIcon("gnome-text.png"); } return icon; } COM: <s> returns the image icon for the content type </s>
funcom_train/13259652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClassSwitchMatrix(Object stationKey, Object classInKey, Object classOutKey, float val) { if(val != getClassSwitchMatrix(stationKey, classInKey, classOutKey)) save = true; StationClassData current = (StationClassData) stationDetailsBDM.get(classInKey, stationKey); ClassSwitch row = (ClassSwitch) current.classSwitchProb; row.setValue(classInKey, classOutKey, val); } COM: <s> it sets to </s>
funcom_train/46857399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SimTimeEdit getSteTimeOpening() { if (steTimeOpening == null) { steTimeOpening = new SimTimeEdit(); steTimeOpening.setPreferredSize(new Dimension(166, 45)); steTimeOpening.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { currentSchool.setTimeOpening(steTimeOpening.getValue()); } }); } return steTimeOpening; } COM: <s> this method initializes ste time opening </s>
funcom_train/12213630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isNode(){ if(type.equals("G") || type.equals("L") || type.equals("I") || type.equals("D") || type.equals("E") || type.equals("R") || type.equals("C") || type.equals("A") || type.equals("O")) return true; return false; } COM: <s> return if the symbol is a galatea node or not </s>
funcom_train/13211180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showPlayerProfilesDialog(MainFrame mainFrame, PlayerProfiles profiles) { JPanel pnDialog = getPlayerProfilesPanel(profiles); HGBaseDialog.showOkDialog(mainFrame, pnDialog, HGBaseText.getText("file.profiles").replace('.',' ')); } COM: <s> shows the dialog for managing the player profiles </s>
funcom_train/2610049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addValidRemoteCandidate(TransportCandidate remoteCandidate) { // Add the candidate to the list if (remoteCandidate != null) { synchronized (validRemoteCandidates) { System.out.println("ADDED Valid Cand: " + remoteCandidate.getIp() + ":" + remoteCandidate.getPort()); validRemoteCandidates.add(remoteCandidate); } } } COM: <s> add a valid remote candidate to the list </s>
funcom_train/1711837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeWord(String i, ByteArrayOutputStream bos) { int value=0; //allow decimal,octal or hex if(i.endsWith("h")) value=Integer.parseInt(i.substring(0,i.length()-1),16); else if(i.endsWith("o")) value=Integer.parseInt(i.substring(0,i.length()-1),8); else value=Integer.parseInt(i); bos.write((value>>8)); //high byte bos.write(value & 0xFF); //low byte } COM: <s> write word 2 bytes to stream </s>
funcom_train/46761094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EnvironmentModel getEnvironment(final long environmentId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { if (call.isStoreAudit()) { BaseData.getSecurity().storeAudit(call.getUserRefId(), environmentId, "Viewed Environment", call); } return SystemData.getEnvironment(environmentId, call); }}; return (EnvironmentModel) call(method, call); } COM: <s> return the single environment model for the primary key </s>
funcom_train/39343141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPropertyEditor(String propName, Class editClass) { java.util.Enumeration enum = m_PropertyDescriptors.elements(); while (enum.hasMoreElements()) { PropertyDescriptor pd = (PropertyDescriptor)enum.nextElement(); if (pd.getName().equals(propName)) pd.setPropertyEditorClass(editClass); } } COM: <s> method to set a property editor class for a property </s>
funcom_train/28750703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumOfSamplesForProcedureType(int procedureType, String status) throws SimsException { //Get the Collection of WorkflowLocal objects. //return this.getWorkflowDetailLocalsForProcedureType(procedureType, status).size(); //Use select method. return wfdCRUD.getNumByProcedureTypeInStatus(procedureType, status); } COM: <s> get the number of samples for a procedure type on the specified status </s>
funcom_train/14371791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean connectDataSource() { final DataGrid dg = DataGrid.getInstance(); // getUI().showProgressDialog("Connecting to server . . ."); boolean connectState = dg.connectDataInterface(mainFrame); // getUI().destroyProgressDialog(); if (connectState == false) return false; this.dataGrid = dg; AccordionDrawer.loaded = false; initLRD(); // Initialize AD and data store dg.setLrd(getLrd()); dg.resetDisplay(); drawPanel.repaint(); return true; } COM: <s> initialize all data structures and call the connection method in the data grid </s>
funcom_train/50067324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printUnit(TopLevel tree, ClassDef cdef) { docComments = tree.docComments; printDocComment(tree); if (tree.pid != null) { print("package "); printExpr(tree.pid); print(";"); println(); } for (List l = tree.defs; l.nonEmpty() && (cdef == null || ((Tree) l.head).tag == Tree.IMPORT); l = l.tail) { printStat((Tree) l.head); println(); } if (cdef != null) { printStat(cdef); println(); } } COM: <s> print unit consisting of package clause and import statements in </s>
funcom_train/51101024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isContainingListProperties() { if (entity == null) { return false; } Iterator it = entity.getRelationships().iterator(); while(it.hasNext()) { Relationship r = (Relationship) it.next(); if(r.isToMany()) { return true; } } return false; } COM: <s> returns true if current entity contains at least one list property </s>
funcom_train/46837555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckPrint() { if (jCheckPrint == null) { jCheckPrint = new JCheckBox(); jCheckPrint.setBounds(new Rectangle(254, 23, 110, 20)); jCheckPrint.setText(EBIPGFactory.getLANG("EBI_LANG_PRINT")); } return jCheckPrint; } COM: <s> this method initializes j check print </s>
funcom_train/19715551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(ServiceDefinition other) { if(name == null) { if(other.name == null) { return 0; } else { return -1; } } else { if(other.name == null) { return 1; } else { return name.compareTo(other.name); } } } COM: <s> compare based on name </s>
funcom_train/43245182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNOKOneName() { System.out.println("getNOKOneName"); EmergencyContactObject instance = new EmergencyContactObject(); String expResult = ""; String result = instance.getNOKOneName(); 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 nokone name method of class org </s>
funcom_train/44432425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { log.severe("Executing Model Persister."); Thread.currentThread().setName("BB Model Persister"); synchronized (theModel.getFeedStatCollection()) { GlobalController.SINGLETON.persistAsXML(); } log.config("Model Persister completed."); } COM: <s> run produces a single file in the preferences area which will </s>
funcom_train/3832630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float calcResolution(GM_Surface surf, int width, int height){ float f = (float)(surf.getEnvelope().getWidth() * surf.getEnvelope().getHeight())/(width * height); f = (float) Math.sqrt(f); return f; } COM: <s> calculates the resolution based on the surface size and the dimensions </s>
funcom_train/50313249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map readProperties(String resource, boolean search) throws CmsException { return m_rb.readProperties(m_context.currentUser(), m_context.currentProject(), m_context.getSiteRoot(resource), m_context.getSiteRoot(), search); } COM: <s> looks up all properties for a resource with optional direcory upward cascading </s>
funcom_train/4742411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reloadPluginsFromFiles(ArrayList<File> pluginFiles) { this.plugins = new ArrayList<PluginInformation<T>>(); for (File file : pluginFiles) { T plugin = this.loadPluginFromFile(file); if (plugin != null) this.plugins.add(new PluginInformation<T>(plugin, file .getName())); } } COM: <s> reinitializes list of plug ins by loading them </s>
funcom_train/14660966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getReportCheckBox() { if (reportCheckBox == null) { reportCheckBox = new JCheckBox(); reportCheckBox.setText("Show report"); reportCheckBox.setSelected(true); reportCheckBox.setPreferredSize(new Dimension(95, 26)); } return reportCheckBox; } COM: <s> this method initializes report check box </s>
funcom_train/45865307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeRatings( Set<TeeSet> teeSets ) { for ( TeeSet teeSet : teeSets ) { if ( teeSet.getMensRating() == null ) { teeSet.setMensRating( new USGARating() ); } if ( teeSet.getLadiesRating() == null ) { teeSet.setLadiesRating( new USGARating() ); } } } COM: <s> since usgarating is an embeddable class and hibernate does not </s>
funcom_train/7980345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float congestionRatio() { // While shouldrun is true we can use info direct from the crawler. // After that our last snapshot will have to do. return shouldrun && this.controller != null && this.controller.getFrontier() != null ? controller.getFrontier().congestionRatio() : congestionRatio; } COM: <s> ratio of number of threads that would theoretically allow </s>
funcom_train/6202779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displaySearchResult(List<SearchResultEntry> entries, int numberOfResults) { UIThreadsUtil.mustBeSwingThread(); this.numberOfResults = numberOfResults; currentlyDisplayedMatches = null; m_entryList.clear(); m_offsetList.clear(); if (entries == null) { // empty marks - just reset setText(""); return; } currentlyDisplayedMatches = new DisplayMatches(entries); } COM: <s> show search result for user </s>
funcom_train/12103492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLeafClusters(TreeBranchModel parentBranch) { leafClusters.add( new LeafClusterModel(0, parentBranch, this) ); leafClusters.add( new LeafClusterModel(120, parentBranch, this) ); leafClusters.add( new LeafClusterModel(240, parentBranch, this) ); } COM: <s> adds leaf clusters to the tree foliage </s>
funcom_train/21508658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onSubmit() { SUBSOURCES.modelChanged(); DESCRIPTION.modelChanged(); OWNER.modelChanged(); LOCATION.modelChanged(); COORDINATES.modelChanged(); PROPERTIES.modelChanged(); EARLIEST_DATA.modelChanged(); LATEST_DATA.modelChanged(); TOTAL_DATA_POINTS.modelChanged(); } COM: <s> updates the page and displays information about a power source </s>
funcom_train/44458970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidDataSection() throws Exception { try { _capi.callDataSection("hello"); fail("Expected UnacceptableResultXINSCallException"); } catch (UnacceptableResultXINSCallException exception) { // as expected } catch (Exception exception) { exception.printStackTrace(); fail("The result is invalid, the function should throw an UnacceptableResultXINSCallException exception"); } } COM: <s> tests that the required returned attribute are checked </s>