__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10010379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void normalize() { double totalProbability = 0.0f; for (TargetData data : translationList) { totalProbability += data.getProbability(); } int index = 0; for (TargetData data : translationList) { double newProbability = data.getProbability() / totalProbability; TargetData newData = new TargetData(data.getWid(), newProbability); translationList.set(index, newData); ++index; } } COM: <s> normalizes translation probabilities so they sum up to one </s>
funcom_train/29063152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAspectPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PointcutReference_aspect_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PointcutReference_aspect_feature", "_UI_PointcutReference_type"), AspectxPackage.eINSTANCE.getPointcutReference_Aspect(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the aspect feature </s>
funcom_train/9032355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getAverageDelay(int flowId) { if (flowsStatistics.get(new Integer(flowId)) != null) { return ((double)flowsStatistics.get(new Integer(flowId)).getTotalDelay()) / (double)flowsStatistics.get(new Integer(flowId)).getPacketsCounter(); } else return 0; } COM: <s> returns average delay value for flow id </s>
funcom_train/44705941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUsers(PageState state, OptionGroup target) { DataQuery dq = (DataQuery) m_query.get(state); while ( dq.next() ) { BigDecimal userId = (BigDecimal) dq.get(DQ_USER_ID); String name = (String) dq.get(DQ_NAME); target.addOption(new Option(userId.toString(), name)); } } COM: <s> adds users to the option group </s>
funcom_train/31153382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Classes getClasses() { List classList = new ArrayList(); Enumeration classes = compilationUnit.getClassDeclarations(); while (classes.hasMoreElements()) { classList.add(new JJTreeClassInfo(jane, compilationUnit, (JavaClassDeclaration) classes.nextElement())); } return new SimpleClasses(classList); } COM: <s> returns the classes in this source tree </s>
funcom_train/13402373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EmpRow select(int empNo) throws SQLException { /** * SELECT &FIELDS * FROM EMP E1, EMP E2 * WHERE E1.MGR=E2.EMP_NO(+) * AND E1.EMP_NO=:empNo */ @Prepare PreparedStatement stmt = null; return singleRowQuery(stmt, EmpRow.class); } COM: <s> selecting one employee </s>
funcom_train/1723239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void testChangedTooSoon() { // expect(mClock.getCurrentTime()).andReturn(500L); // mProvider.setCenter(1, 1); // PowerMock.replayAll(); // // CachesProviderLazy lazy = new CachesProviderLazy(mProvider, MINDIST, MINTIME, mClock); // lazy.resetChanged(); // lazy.setCenter(1, 1); // assertFalse(lazy.hasChanged()); // PowerMock.verifyAll(); // } COM: <s> not enough time passed for the change to become visible </s>
funcom_train/13675492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(int[] msgsnums) { for (Iterator iter = iterator(); iter.hasNext();) { int num = ((JwmaMessageInfoImpl) iter.next()).getMessageNumber(); for (int n = 0; n < msgsnums.length; n++) { if (num == msgsnums[n]) { iter.remove(); } } } }//remove COM: <s> removes the items with the given numbers from this list </s>
funcom_train/5437247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyListeners(int event, Object payload) { PacketCaptureEvent pcEvent = new PacketCaptureEvent(event, this, payload); for(int i = 0; i < listeners.size(); i++) { PacketCaptureListener listener = (PacketCaptureListener)listeners.elementAt(i); try { listener.processEvent(pcEvent); } catch (Throwable e) { // Drop it. } } } COM: <s> notify all listeners of the given event </s>
funcom_train/1720213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isExceptionClass(PsiClass clazz) { PsiClass[] supers = clazz.getSupers(); for (PsiClass sup : supers) { if ("java.lang.Throwable".equals(sup.getQualifiedName())) { return true; } else if (isExceptionClass(sup)) { return true; } } return false; } COM: <s> is the class an exception extends throwable will check super </s>
funcom_train/22338629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { final FlowLayout flowLayout = new FlowLayout(); flowLayout.setHgap(10); flowLayout.setVgap(10); this.setLayout(flowLayout); this.setBounds(new Rectangle(0, 0, 457, 300)); final GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); gridBagConstraints1.gridx = -1; gridBagConstraints1.weightx = 0.1D; gridBagConstraints1.weighty = 0.1D; gridBagConstraints1.gridy = -1; this.add(getThumbnailDBOptions(), null); this.add(getJdbcParamPanel(), null); } COM: <s> this method initializes this </s>
funcom_train/48074039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { if(log.isInfoEnabled()) { log.info("Clearing db: " + dbName + "..."); } try { ClassPathResource resource = new ClassPathResource(dbDataDeleteFileName); executeSqlCommandsFromFile(dataSource, resource.getFile()); } catch(DataAccessException dae) { if(!exceptionTranslator.isDropNonExistant(dae)) { throw dae; } } catch(IOException e) { throw new SystemError(e.getMessage(), e); } } COM: <s> clears the database of all data </s>
funcom_train/51792490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawVString(Graphics g, int x, int y, String str) { int strLength = str.length(); for (int idx = 0; idx < strLength; idx++) { drawChar(g, x, y, str.charAt(idx)); y += getCharHeight(str.charAt(idx)); } } COM: <s> draw string vertically at given coordinates </s>
funcom_train/35280291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPitch(float pitch) { if (pitch < 0.5f || pitch > 2.0f) { throw new IllegalArgumentException("Pitch must be between 0.5 and 2.0"); } this.pitch = pitch; if (channel >= 0) getRenderer().updateSourceParam(this, AudioParam.Pitch); } COM: <s> set the pitch of the audio also the speed of playback </s>
funcom_train/3329347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createFromJavaObjectCode(String variableName) { StringBuffer sb = new StringBuffer("((Double)"); sb.append(variableName); sb.append(")"); if (!_asWrapper) { sb.append(".doubleValue()"); } return sb.toString(); } //-- fromJavaObject COM: <s> returns the string necessary to convert an object to </s>
funcom_train/17561231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void orderPopulation() { Collections.sort(population,new Comparator<TSPChromosome>() { public int compare(TSPChromosome o1, TSPChromosome o2) { double cost1=o1.getTotalCost(); double cost2=o2.getTotalCost(); return (cost1<cost2 ? -1 : (cost1>cost2?1 : 0)); } }); } COM: <s> orders population of chromosomes according to the costs of chromosomes </s>
funcom_train/44591095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArray(Expression expression) { if (expression == null) { throw new IllegalArgumentException(); } // an ArrayAccess may occur inside an Expression // must check cycles ASTNode oldChild = this.arrayExpression; preReplaceChild(oldChild, expression, ARRAY_PROPERTY); this.arrayExpression = expression; postReplaceChild(oldChild, expression, ARRAY_PROPERTY); } COM: <s> sets the array expression of this array access expression </s>
funcom_train/7640259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IClassDescriptor _findLayoutParams(Class<?> groupClass) throws Exception { Method method = LayoutParamsParser.class.getDeclaredMethod("findLayoutParams", //$NON-NLS-1$ IClassDescriptor.class); method.setAccessible(true); return (IClassDescriptor) method.invoke(mParser, new ClassWrapper(groupClass)); } COM: <s> calls the private find layout params of the parser </s>
funcom_train/2286955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getDateExpires() { int pos = m_flexContextInfoList.size() - 1; if (pos < 0) { // ensure a valid position is used return CmsResource.DATE_EXPIRED_DEFAULT; } return ((CmsFlexRequestContextInfo)m_flexContextInfoList.get(pos)).getDateExpires(); } COM: <s> returns the combined expires date for all resources read during this request </s>
funcom_train/25656730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized private void waitForStartup() { while (this.getExecutionStatus() != DeterministicPlanner.s_status_running) { if (this.getExecutionStatus() == DeterministicPlanner.s_status_stopped) throw new RuntimeException( "Waiting for startup when planner is stopped."); try { this.wait(); } catch (InterruptedException e) { } } } COM: <s> this method waits until the server is started up </s>
funcom_train/31487229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateStatus(boolean b, String tooltip) { // both null, or same if((lastTooltip!=null && tooltip == null) || (tooltip != null && !tooltip.equals(lastTooltip))) { firePropertyChange(JComponent.TOOL_TIP_TEXT_KEY, null, tooltip); lastTooltip = tooltip; } return b; } COM: <s> set the enablement state of action </s>
funcom_train/31185147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String buildPath (Url[] urls) { StringBuffer path = new StringBuffer(); for (int i = 0; i < urls.length; i++) { path.append(urls[i].getFileObject().getAbsolutePath()); if (i < urls.length - 1) //if its not the last url of the array insert the seperator path.append(File.pathSeparatorChar); } return path.toString(); } COM: <s> build a valid path from url </s>
funcom_train/51709087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTargetPropertyPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Assignment_targetProperty_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Assignment_targetProperty_feature", "_UI_Assignment_type"), QvtcorePackage.Literals.ASSIGNMENT__TARGET_PROPERTY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the target property feature </s>
funcom_train/42710318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextField getTfPosInvoiceReadOnlyNr() { if (tfPosInvoiceReadOnlyNr == null) { tfPosInvoiceReadOnlyNr = new JTextField(); tfPosInvoiceReadOnlyNr.setEnabled(false); tfPosInvoiceReadOnlyNr.setBounds(new Rectangle(130, 30, 321, 21)); tfPosInvoiceReadOnlyNr.setEditable(false); } return tfPosInvoiceReadOnlyNr; } COM: <s> this method initializes tf pos invoice read only nr </s>
funcom_train/33734536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveBytesToCache(String fileName, ByteArrayBuffer bytes) throws Exception { FileOutputStream output = null; try { output = this.context.openFileOutput(fileName, Context.MODE_PRIVATE); output.write(bytes.toByteArray()); } catch(Exception ex) { log.error("Could not cache image bytes", ex); throw ex; } finally { if(output != null) { output.flush(); output.close(); } } } COM: <s> method to cache an images byte array </s>
funcom_train/43327869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stripLeading0() { String newNumber = null; StringTokenizer st = new StringTokenizer(number,"."); int rv = 0; try { while (st.hasMoreTokens()) { int n = StringUtil.atoi(st.nextToken()); if (newNumber==null) newNumber = String.valueOf(n); else newNumber = newNumber+"."+String.valueOf(n); } } catch (NoSuchElementException e) { } number = newNumber; } COM: <s> strip leading 0s from the number </s>
funcom_train/14214832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map finalizeOrderEntryPayment(String checkOutPaymentId, Double amount, boolean singleUse, boolean append) { Map result = ServiceUtil.returnSuccess(); if (UtilValidate.isNotEmpty(checkOutPaymentId)) { if (!append) { cart.clearPayments(); } cart.addPaymentAmount(checkOutPaymentId, amount, singleUse); } return result; } COM: <s> sets the payment id to use during the checkout process </s>
funcom_train/48406342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsDerivedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Association_isDerived_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Association_isDerived_feature", "_UI_Association_type"), SpemxtcompletePackage.eINSTANCE.getAssociation_IsDerived(), true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is derived feature </s>
funcom_train/50504919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadPlugin() { log.info("Activating ejbDoclet general task for project: " + project); this.project.addSettings(RoleManager.class, new RoleManager(project)); this.project.addSettings(TARequirement.class, TARequirement.NONE); super.loadPlugin(); } COM: <s> loads this task into the task manager </s>
funcom_train/15625090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean selectAbove(final boolean performAction) { if (mapSquare == null || gameObject == null) { return false; } final G newGameObject = mapSquare.getPrev(gameObject); if (newGameObject == null) { return false; } if (performAction) { beginTransaction(); try { gameObject = newGameObject; } finally { endTransaction(); } } return true; } COM: <s> moves the selected </s>
funcom_train/20896095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRoles() { System.out.println("getRoles"); ForumUser instance = null; LinkedList expResult = null; LinkedList result = instance.getRoles(); 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 roles method of class it </s>
funcom_train/17915301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(CDRArchive cdrar) { if(cdrar == null) { throw new IllegalArgumentException("null 'cdrar' arg in method call."); } cdrars.addElement(cdrar); // Load all the CdrarEntries into a cache for speedy access. Enumeration cdrarEntries = cdrar.getEntries(); while(cdrarEntries.hasMoreElements()) { CDRArchiveEntry entry = (CDRArchiveEntry)cdrarEntries.nextElement(); loadedCdrarEntries.addElement(entry); } } COM: <s> load a preconstructed cdrarchive instance </s>
funcom_train/31357212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String decryptPassword(String passKey, String secure) { // Variables byte[] generated; Cipher cipher; // Get Cipher Instance // cipher = createCipher(Cipher.DECRYPT_MODE, passKey); cipher = createCipher(Cipher.DECRYPT_MODE, key); if (cipher == null) { return ""; } // if try { // Decrypt PassKey generated = cipher.doFinal(decodePassword(secure)); // Return Decrypted PassKey return new String(generated); } catch (Exception e) { return ""; } // try } // encryptPassword() COM: <s> decrypt a passkey </s>
funcom_train/41461854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPeer(InetAddress address, int port) throws IOException { rtpRemoteAddress = new InetSocketAddress(address, port); rtpChannel.connect(rtpRemoteAddress); rtcpRemoteAddress = new InetSocketAddress(address, port + 1); rtcpChannel.connect(rtcpRemoteAddress); factory.registerQueue.offer(this); // Add RtcpSendStream to scheduler to send RTCP Report every 5 secs this.rtcpSenderWorker = scheduler.execute(rtcpSendStream); } COM: <s> assigns remote end </s>
funcom_train/51101798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { if (sharedSnapshotCache != null) { this.sharedSnapshotCache.shutdown(); } Collection dataNodes = getDataNodes(); for (Iterator i = dataNodes.iterator(); i.hasNext();) { DataNode node = (DataNode) i.next(); try { node.shutdown(); } catch (Exception ex) { } } } COM: <s> shutdowns all owned data nodes </s>
funcom_train/212597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Transferable createTransferable(JComponent dragComponent) { if (dragComponent.getParent() instanceof CoGTop) { iconGroup = ((DesktopIcon) dragComponent).getDesktop().getSelectedIcons(); } else if (dragComponent.getParent() instanceof DesktopToolBar) { iconGroup = new DesktopIconGroup(); iconGroup.addElement(((DesktopIcon) dragComponent)); } return new DesktopIconTransferable(iconGroup); } COM: <s> third method called during drag and drop </s>
funcom_train/1711321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public int getMediaBoxWidth(int pageNumber) { //check values correctly set setSizeForPage(pageNumber); if((debug)&&(mediaBoxWidths.elementAt(pageNumber)!=mediaBoxW)){ System.out.println("Wrong w "+mediaBoxWidths.elementAt(pageNumber)+" "+mediaBoxW); System.exit(1); } return mediaBoxW; } COM: <s> return width of media box </s>
funcom_train/33826365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectCells(final JTable table, final TableCell[] cells) { validateCellsToSelect(cells); new MultipleSelectionTemplate(robot) { int elementCount() { return cells.length; } void selectElement(int index) { selectCell(table, cells[index]); } }.multiSelect(); } COM: <s> selects the given cells of the code </s>
funcom_train/33598654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getPlay() { if (play == null) {//GEN-END:|51-getter|0|51-preInit // write pre-init user code here play = new Command("play", Command.OK, 0);//GEN-LINE:|51-getter|1|51-postInit // write post-init user code here }//GEN-BEGIN:|51-getter|2| return play; } COM: <s> returns an initiliazed instance of play component </s>
funcom_train/35838680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean purgeHomeView(PCSession session, String sNodeID) throws SQLException { // DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()); // // boolean deleted = DBNode.purgeHomeView(dbcon, sNodeID, session.getUserID()); // // getDatabaseManager().releaseConnection(session.getModelName(),dbcon); return true; } COM: <s> purges a home view node from the database and returns true if successful </s>
funcom_train/31186631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replace( PathEditItem oldItem, PathEditItem newItem ) { int i = pathList.indexOf(oldItem); if ( i < 0 ) pathList.add(newItem); else { pathList.add(i, newItem); pathList.remove(oldItem); } } COM: <s> replaces the specified item with the new item </s>
funcom_train/23635964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBomEntriesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Product_bomEntries_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Product_bomEntries_feature", "_UI_Product_type"), CescsmodelPackage.Literals.PRODUCT__BOM_ENTRIES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the bom entries feature </s>
funcom_train/41683480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void applyChooseRule( Individual x ) { if( !x.canApply( Individual.MAX ) || blocking.isIndirectlyBlocked( x ) ) return; List maxCardinality = x.getTypes( Node.MAX ); Iterator j = maxCardinality.iterator(); while( j.hasNext() ) { ATermAppl maxCard = (ATermAppl) j.next(); applyChooseRule( x, maxCard ); } } COM: <s> apply max rule to the individual </s>
funcom_train/35203206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString () { StringBuffer rep = new StringBuffer("[ICCProfile:"); StringBuffer body = new StringBuffer(); body.append(eol).append(header); body.append(eol).append(eol).append(tags); rep.append(ColorSpace.indent(" ", body)); return rep.append("]").toString(); } COM: <s> provide a suitable string representation for the class </s>
funcom_train/49124203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getDefaultTabLayout(MultiHashMap layoutMap) { Map resultMap = new HashMap(); if(layoutMap == null){ layoutMap = this.tabLayoutDAO.getTabLayout(null); // layoutMap = TabLayoutDAO.newInstance().getTabLayout(null); } Iterator ite = layoutMap.keySet().iterator(); while(ite.hasNext()){ String key = (String)ite.next(); List tabList= (List)layoutMap.get(key); putDefaultTabLayout(key, tabList, resultMap); } return resultMap; } COM: <s> obtain default tablayout information </s>
funcom_train/10661396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParseInfinityBigDecimalFalse() { // Regression test for HARMONY-106 DecimalFormat format = (DecimalFormat) DecimalFormat.getInstance(); DecimalFormatSymbols symbols = new DecimalFormatSymbols(); Number number = format.parse(symbols.getInfinity(), new ParsePosition(0)); assertTrue(number instanceof Double); assertTrue(Double.isInfinite(number.doubleValue())); } COM: <s> test whether decimal format can parse positive infinity correctly </s>
funcom_train/15487492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setLayout(new BorderLayout()); this.setSize(new java.awt.Dimension(290,300)); this.setBorder(BorderFactory.createTitledBorder(Application.messages.getString("TITLE_EXPORT"))); this.add(getJPanel(), java.awt.BorderLayout.CENTER); } COM: <s> this method initializes this </s>
funcom_train/21847663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean extend(MarkBlock blk, boolean concat) { try { return extend(blk.startMark.getOffset(), blk.endMark.getOffset(), concat); } catch (BadLocationException e) { if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N e.printStackTrace(); } } catch (InvalidMarkException e) { if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N e.printStackTrace(); } } return false; } COM: <s> extend this mark block by some other block </s>
funcom_train/41077607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRadius () { if (getPropertyValue(RADIUS) == null) { // Look for a fgcolor in the stylesheet... if (getStyle() != null) { return getStyle().getAttributeInteger( getStyle().ATTRIBUTE_radius, DEFAULT_RADIUS, true); } } return getIntValue(RADIUS, DEFAULT_RADIUS ); } COM: <s> getter for property radius </s>
funcom_train/49262291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDialog() { if (parent == null) { shell = new Shell(display); } else { shell = new Shell(parent, SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM | SWT.RESIZE); } if (title != null) { shell.setText(title); } else { shell.setText(Language.getInstance().get(this, "defaultTitle")); //$NON-NLS-1$ } createContent(); pack(); locate(); } COM: <s> creates shell composite setting content location and size </s>
funcom_train/34342413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getVolverComando() { if (volverComando == null) {//GEN-END:|27-getter|0|27-preInit // write pre-init user code here volverComando = new Command("Volver", Command.EXIT, 0);//GEN-LINE:|27-getter|1|27-postInit // write post-init user code here }//GEN-BEGIN:|27-getter|2| return volverComando; } COM: <s> returns an initiliazed instance of volver comando component </s>
funcom_train/17849313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void editPressed() { WebAddress seladr = (WebAddress) mAddressList.getSelectedValue(); if (!seladr.isUserEntry()) { return; } Window parent = UiUtilities.getLastModalChildOf(mParent); WebAddressEditDialog editor = new WebAddressEditDialog(parent, seladr); UiUtilities.centerAndShow(editor); mAddressList.repaint(); } COM: <s> edit was pressed </s>
funcom_train/2292586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String resolveOnClic(CmsWorkplace wp) { return "listIndepAction('" + getListId() + "','" + getId() + "', '" + CmsStringUtil.escapeJavaScript(wp.resolveMacros(getConfirmationMessage().key(wp.getLocale()))) + "');"; } COM: <s> help method to resolve the on clic text to use </s>
funcom_train/268894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void requestTime() throws FeatureNotSupportedException, IOException { currentTask = GarminFactory.Get().getCommandId( GarminFactory.CmndTransferTime); try { output.write(GarminRawPacket.createCommandPacket(currentTask)); } catch (InvalidPacketException e) { throw new FeatureNotSupportedException(); } } COM: <s> makes a request for the specified data to the gps </s>
funcom_train/28741353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getSampleInfosForProcedureType(int procedureType, String status) throws LimsException { Collection infos; try { infos = controller.getSampleInfosForProcedureType(procedureType, status); } catch (Exception ex) { LogManager.logMessage("getting objects for procedureType..", ex); throw new LimsException(); } return infos; } COM: <s> this method get sample list for a procedure type in its workflow </s>
funcom_train/31349853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean createStatus(Variables var){ if(var.getOperator().canAdminCSR()){ CSRTicketStatus ts = new CSRTicketStatus(); ts.setTicketStatusDescription(var.getCSRTicketStatusDescr()); ts.setTicketStatusName(var.getCSRTicketStatusName()); ts.write(); return true; } else{ return false; } } COM: <s> checks for permission and then creates a status code </s>
funcom_train/43191806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOpenTransactionButton() { if (openTransactionButton == null) { openTransactionButton = new JButton(); openTransactionButton.setBounds(new Rectangle(70, 120, 161, 21)); openTransactionButton.setText("Open Transaction"); openTransactionButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ClientController.getInstance().openTransaction(); } }); } return openTransactionButton; } COM: <s> this method initializes open transaction button </s>
funcom_train/17680309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void markSubclassColumnsShared(String columnName) { if (cmd.pcSubclasses == null) return; for (int i = cmd.pcSubclasses.length - 1; i >= 0; i--) { JdbcClass jc = (JdbcClass)cmd.pcSubclasses[i].storeClass; jc.markColumnsShared(columnName, table); jc.markSubclassColumnsShared(columnName); } } COM: <s> find any columns in any of our subclasses and recursively their </s>
funcom_train/15908699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mutate() { // SlotType is given by the output slot //int outType = out.getConnectedType(); int outType = type; // Check if this is a recognized type switch (type) { case SlotType.BOOLEAN : case SlotType.INT : case SlotType.LONG : case SlotType.DOUBLE : case SlotType.STRING : case SlotType.OBJECT : { break; } default : { outType = SlotType.ANY; } } out.setType(outType); } COM: <s> this method is only called by this </s>
funcom_train/18050914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getSvEditCopyMenuItem() { if (svEditCopyMenuItem == null) { svEditCopyMenuItem = new JMenuItem(); svEditCopyMenuItem.setText("Copy"); svEditCopyMenuItem .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { copyAction(); } }); } return svEditCopyMenuItem; } COM: <s> this method initializes sv edit copy menu item </s>
funcom_train/19217995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshView() { ModelNode lastSelected = null; if (_lastSelected != null) { lastSelected = _lastSelected.getModelNode(); _lastSelected = null; } _tree.setRootNode((GroupNode) NodeFactory.create(_doc.getGroups())); if (lastSelected != null) { _tree.found(lastSelected); } } COM: <s> repaints the treeview </s>
funcom_train/7412676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHeaders() { String value = ""; Entry<String, String> entry; value += "Status: " + this.status + "\r\n"; if (this.reason != null) { value += "Reason: " + this.reason + "\r\n"; } Iterator<Entry<String, String>> iterator = this.hashmap.entrySet() .iterator(); while (iterator.hasNext()) { entry = iterator.next(); value += entry.getKey() + ": " + entry.getValue() + "\r\n"; } return value + "\r\n"; } COM: <s> it organizes the header value as header value and returns the string </s>
funcom_train/43176592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showAncestor(boolean b) { Object newRoot = null; TreePath path = getSelectionModel().getSelectionPath(); if (path != null) { newRoot = path.getLastPathComponent(); } ((ArbolGenealogicoModelo)getModel()).showAncestor(b, newRoot); } COM: <s> get the selected item in the tree and call show ancestor with this </s>
funcom_train/17676971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addClsIdCount() { if (finished) { throw BindingSupportImpl.getInstance().internal("The FgDs is already finished"); } if (clsIdAdded) { throw BindingSupportImpl.getInstance().internal("ClsId already added"); } clsIdAdded = true; columnSkipCount++; } COM: <s> notify that a class id col was added </s>
funcom_train/3330289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeComplexType(ComplexType complexType) { if (complexType.isTopLevel()) { if (_complexTypes.contains(complexType)) { _complexTypes.remove(complexType.getName()); complexType.setParent(null); return true; } } return false; } //-- removeComplexType COM: <s> removes the given top level complex type from this schema </s>
funcom_train/16683544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FxPK getApplicationPk() { if (this.applicationPk == null || this.applicationPk.isNew()) { this.applicationPk = new FxPK(applicationId, FxPK.LIVE); } if (applicationPk.isNew()) { throw new FxApplicationException("universal.error.instancePkNotSpecified").asRuntimeException(); } return applicationPk; } COM: <s> returns the pk of application from which is or was instance created </s>
funcom_train/37125355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void isClosing() { boolean oldWindowCloseState = m_isClosing ; m_isClosing = true ; firePropertyChange("isClosing", oldWindowCloseState, m_isClosing) ; m_isClosing = false ; firePropertyChange("isClosing", true, m_isClosing) ; } COM: <s> notify that the window was closed </s>
funcom_train/17026963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sameAs() { Model data = getModel(); InfModel infModel = ModelFactory.createRDFSModel(data); Resource resource = infModel.getResource(johnPrimeURI); printStatements("John Smith RDFS Reasoned:", infModel, resource, null, null); runTestQuery(infModel); } COM: <s> play with see as reasoning </s>
funcom_train/42397500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void copy0(final NewConstructor constructor) { final Iterator parameters = this.getParameters().iterator(); while (parameters.hasNext()) { final ConstructorParameter parameter = (ConstructorParameter) parameters.next(); constructor.addParameter(parameter.copy()); } final Iterator thrownTypes = this.getThrownTypes().iterator(); while (thrownTypes.hasNext()) { constructor.addThrownType((Type) thrownTypes.next()); } constructor.setVisibility(this.getVisibility()); } COM: <s> copies the parameters of this constructor to the given constructor </s>
funcom_train/21656403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtAgregarCanerias() { if (btAgregarCanerias == null) { btAgregarCanerias = new JButton(); btAgregarCanerias.setBounds(new Rectangle(755, 126, 43, 25)); btAgregarCanerias.setText("+"); btAgregarCanerias.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ControladorPrincipal.mostrarAgregarCanieria(); } }); } return btAgregarCanerias; } COM: <s> this method initializes bt agregar canerias </s>
funcom_train/16774111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasTestedPage(String pagePath, String criticalTestType) { if (pagePath.endsWith("index.root")){ pagePath = pagePath.substring(0, pagePath.indexOf("index.root")); } if(encrypt){ pagePath = Utils.getHash(pagePath); } return (session.createCriteria(Paginas.class). add(Restrictions.eq(Paginas.NAME_paginas, pagePath)). add(Restrictions.isNotNull(criticalTestType)). setProjection(Projections.property(Paginas.NAME_ID)). uniqueResult() != null); } COM: <s> returns true if a page with that name already exists false otherwise </s>
funcom_train/9664891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawCell(EditableModelEvent event) { Editable source = event.getSource(); if (source == getModel()) { Object data = source.getRow(event.getRow()).getData()[event.getColumn()]; getGridRenderer().drawCell(data, getRowByModelRow(event), event.getColumn(), false); } } COM: <s> this method draws a concrete cell </s>
funcom_train/35670189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializePackageContents() { if (isInitialized) return; isInitialized = true; // Initialize package setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); // Initialize data types initEDataType(preferenceExceptionEDataType, PreferenceException.class, "PreferenceException", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); initEDataType(preferenceEvaluationExceptionEDataType, PreferenceEvaluationException.class, "PreferenceEvaluationException", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); } COM: <s> complete the initialization of the package and its meta model </s>
funcom_train/20978959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JEditorPane getEdAbotText() { if (edAbotText == null) { edAbotText = new JEditorPane(); edAbotText.setEditable(false); edAbotText.setContentType("text/html"); edAbotText.setOpaque(false); } return edAbotText; } COM: <s> this method initializes ed abot text </s>
funcom_train/8692548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(Document document) throws SAXException { if (document != null) { XMLReader reader = getXMLReader(); if (errorHandler != null) { reader.setErrorHandler(errorHandler); } try { reader.parse(new DocumentInputSource(document)); } catch (IOException e) { throw new RuntimeException("Caught and exception that should " + "never happen: " + e); } } } COM: <s> validates the given code document code by writing it to a validating </s>
funcom_train/48397477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void changeNeuronWeight(int neuronNumber, double[] vector, int iteration, int distance){ super.changeNeuronWeight(neuronNumber,vector,iteration,distance); TiredNeuronModel tempNeuron = (TiredNeuronModel) networkModel.getNeuron(neuronNumber); int tiredness = tempNeuron.getTiredness(); tempNeuron.setTiredness(tiredness - 2); } COM: <s> change neuron weights for specified neuron number iteration input data vector and distance </s>
funcom_train/274520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void testDateintintint() { Date d = new Date(2000, Calendar.FEBRUARY, 25); Calendar c = d.getCalendar(); assertEquals(2000, c.get(Calendar.YEAR)); assertEquals(Calendar.FEBRUARY, c.get(Calendar.MONTH)); assertEquals(25, c.get(Calendar.DAY_OF_MONTH)); } COM: <s> test for void date int int int </s>
funcom_train/3721663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection getRemoteConnection(String IP) { Connection conn = null; while (conn == null) { // check all connections ... int c = 0; synchronized (this) { while (conn == null && c < connections.size()) { Connection nextConn = (Connection) connections.get(c); if (nextConn.getRemoteAddress().getHostAddress().equals(IP)) conn = nextConn; c++; } } if (conn == null) { try { Thread.sleep(100); } catch (InterruptedException e) { } } } return conn; } COM: <s> returns a connection to a remote host that was initiated by the given </s>
funcom_train/6203183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fatalError(SAXParseException exception) throws SAXException { Log.logErrorRB( "TMXR_FATAL_ERROR_WHILE_PARSING", new Object[] { String.valueOf(exception.getLineNumber()), String.valueOf(exception.getColumnNumber()) }); Log.log(exception); } COM: <s> receives notification of a fatal xml parsing error </s>
funcom_train/12604872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getPower() { int count = 0; double total = 0; for(Double d : list) { count++; total += d; } if(count == 0 || getHigh() == 0) return 0; return (new BigDecimal(total).divide(new BigDecimal(count), 5, RoundingMode.HALF_UP)).divide( new BigDecimal(getHigh()), 5, RoundingMode.HALF_UP).doubleValue(); } COM: <s> gets the average power as a decimal value between 0 and 1 with </s>
funcom_train/45236995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBtnConectarServidor() { if (btnConectarServidor == null) {//GEN-END:|29-getter|0|29-preInit // write pre-init user code here btnConectarServidor = new Command("Servidor", Command.BACK, 0);//GEN-LINE:|29-getter|1|29-postInit // write post-init user code here }//GEN-BEGIN:|29-getter|2| return btnConectarServidor; } COM: <s> returns an initiliazed instance of btn conectar servidor component </s>
funcom_train/15411714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean useAutoFetch(SpiQuery<?> query) { if (query.isLoadBeanCache()){ // when loading the cache don't tune the query // as we want full objects loaded into the cache return false; } Boolean autoFetch = query.isAutofetch(); if (autoFetch != null) { // explicitly set... return autoFetch.booleanValue(); } else { // determine using implicit mode... switch (mode) { case DEFAULT_ON: return true; case DEFAULT_OFF: return false; case DEFAULT_ONIFEMPTY: return query.isDetailEmpty(); default: throw new PersistenceException("Invalid autoFetchMode " + mode); } } } COM: <s> return true if we should try to use auto fetch for this query </s>
funcom_train/9499673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoConic Ellipse(String label, GeoPoint A, GeoPoint B, GeoPoint C) { AlgoEllipseFociPoint algo = new AlgoEllipseFociPoint(cons, label, A, B, C); GeoConic ellipse = algo.getEllipse(); return ellipse; } COM: <s> ellipse with foci a b passing thorugh c michael borcherds 2008 04 06 </s>
funcom_train/35947208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(InputStream in, String encoding) throws IOException, SAXException { try { _xmlReader.setInput(in, encoding); parseAll(); } catch (XMLStreamException e) { if (e.getNestedException() instanceof IOException) throw (IOException)e.getNestedException(); throw new SAXException(e.getMessage()); } finally { _xmlReader.reset(); } } COM: <s> parses an xml document from the specified input stream and encoding </s>
funcom_train/3411311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeNoInvalidate(int position) { pItems.removeElementAt(position); ChoicePeer peer = (ChoicePeer)this.peer; if (peer != null) { peer.remove(position); } /* Adjust selectedIndex if selected item was removed. */ if (pItems.size() == 0) { selectedIndex = -1; } else if (selectedIndex == position) { select(0); } else if (selectedIndex > position) { select(selectedIndex-1); } } COM: <s> removes an item from the code choice code at the </s>
funcom_train/36073921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ready() throws RemoteException { checkIfGameExists(); if (!isReadyToInitialize()) { throw new IllegalStateException("Is not initialized yet"); } logger.info(String.format("Player %s is ready to start the game!", getID())); ready = true; game.start(); } COM: <s> a client calls this method if he is ready to start the game </s>
funcom_train/3079985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getOnChangeScript() { StringBuffer sb = new StringBuffer(ClientObjects.STD_PREFIX); sb.append("listSelectionChanged(\'"); sb.append(getId().toString()); sb.append("\', this);"); return sb.toString(); } COM: <s> returns the java script method call that will be invoked when the state </s>
funcom_train/3711878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayShapeIdentifier(Point pos) { DataSet ds = getDataSetAtPosition(pos); if (ds != null) { mouse_click_enabled = false; String id = ds.getID(); if (id.length() > 50) { id = id.substring(0, 50); } ttt = id; WCSCursor.getInstance().update(ds.getID()); } } COM: <s> displays the identifier of the code data set code </s>
funcom_train/36933075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void colorToBuffer(CCColor theColor, LongBuffer theBuffer, int theIndex) { for(int i = 0; i < _myPixelFormat.numberOfChannels;i++) { theBuffer.put( theIndex + _myPixelFormat.offsets[i], (long)(colorChannel(theColor, color_indices[_myPixelFormat.numberOfChannels - 1][i])*255) ); } } COM: <s> writes a color into a long buffer </s>
funcom_train/3721569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addChildren(Composite messParent, MutableTreeNode treeParent) { Type[] components = messParent.getComponents(); for (int i = 0; i < components.length; i++) { DefaultMutableTreeNode newNode; newNode = new DefaultMutableTreeNode(getLabel(components[i])); addChildren(components[i], newNode); treeParent.insert(newNode, i); } } COM: <s> adds components of a composite to the tree </s>
funcom_train/36060637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displaySearch() { startManagingCursor(mResults); mAdapter = new SimpleCursorAdapter(this, R.layout.ingredient_row, mResults, new String[] { IngredientDbAdapter.KEY_NAME }, new int[] { R.id_IngredientFinder.ingredient }); setListAdapter(mAdapter); mMatchText.setText(Integer.toString(mResults.getCount()) + " Matches"); } COM: <s> display the results of a search </s>
funcom_train/49049997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List validateVcards() { List invalidVcards = new ArrayList(); List vcards = getEntityStrings(); for (Iterator i = vcards.iterator(); i.hasNext();) { String vcard = (String)i.next(); if (!isValidVcard(vcard)) { invalidVcards.add(vcard); } } return invalidVcards; } COM: <s> validate the v card for each code centity code in this </s>
funcom_train/550195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeColumn(String name) { boolean found = false; int i = 0; while (!found && i < getColumnCount()) { found = name.equalsIgnoreCase(columnIdentifiers.get(i).toString()); if (!found) i++; } if (found) columnIdentifiers.remove(i); putIndex(name, -1); } COM: <s> removes a column from table </s>
funcom_train/32057086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToString() { System.out.println("testToString"); GPBarEntry be = new GPBarEntry( "barkey", 10, "barvalue" ); String str = be.toString(); assertEquals( str, "GPBarEntry: barKey=barkey; pos=10; barValue=barvalue" ); } COM: <s> test of to string method of class gpbar entry </s>
funcom_train/46015411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAttempsLeft(String left) { currentAttempsLeft.setText(left); URL imgURL = ClassLoader.getSystemResource("images/hangman"+left+".GIF"); ImageIcon picture = new ImageIcon(imgURL); ImageIcon resized = new ImageIcon(picture.getImage().getScaledInstance(300, 300, Image.SCALE_FAST)); currentPicture.setIcon(resized); this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); repaint(); currentPicture.setVisible(true); } COM: <s> sets the number of attempts left </s>
funcom_train/4728648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintWeaponBullet(Graphics g) { for (int i = 0; i < bullet.length; i++) { if (bullet[i] != null) { bullet[i].paint(g); } } // for (int i = 0; i < rocket.length; i++) { // if (rocket[i] != null) { // rocket[i].paint(g); // } // } } COM: <s> paint bullet of boss </s>
funcom_train/50925836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CMLArray createStringArray(String name, String[] values) { EntryTool.checkEmptyName(name); CMLArray array = new CMLArray(); if (prefix != null) { array.setDictRef(prefix + S_COLON + name.toLowerCase()); } array.setDataType(XSD_FLOAT); array.setArray(values); return array; } COM: <s> add string array to a cmlelement </s>
funcom_train/46188118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File getLockFile(StaticPage staticPage) { StringBuffer buf = new StringBuffer(); buf.append(staticPage.getBlog().getRoot()); buf.append(File.separator); buf.append(STATIC_PAGES_DIRECTORY_NAME); buf.append(File.separator); buf.append(staticPage.getId()); buf.append(STATIC_PAGE_LOCK_EXTENSION); return new File(buf.toString()); } COM: <s> given a static page this method determines the path where </s>
funcom_train/36836373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createInputFile() throws Exception { File inputFile = getInputFile(); inputFile.createNewFile(); FileWriter fw = new FileWriter(inputFile); fw.write("Replace this file with your csv. The first row should have the field names."); fw.write("Make sure to update the sdl file also " + getSdlFile().getAbsolutePath()); fw.flush(); fw.close(); }; COM: <s> creates a place holder csv file in the read directory </s>
funcom_train/37836551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createAndSendMoveToAction(final Point2D point, boolean doubleClick) { final RPAction action = new RPAction(); action.put("type", "moveto"); action.put("x", (int) point.getX()); action.put("y", (int) point.getY()); if (doubleClick) { action.put("double_click", ""); } Direction dir = calculateZoneChangeDirection(point); if (dir != null) { action.put("extend", dir.ordinal()); } client.send(action); } COM: <s> send a move to command to the server </s>