__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/47314664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getExitMenuItem() { if (exitMenuItem == null) { exitMenuItem = new JMenuItem(); exitMenuItem.setText(localization .getProperty("loc-Gui2007-exitMenuItem")); exitMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { exitGui(0); } }); } return exitMenuItem; } COM: <s> this method initializes exit menu item </s>
funcom_train/48390938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addEditorEnterHandler(com.smartgwt.client.widgets.grid.events.EditorEnterHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.grid.events.EditorEnterEvent.getType()) == 0) setupEditorEnterEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.EditorEnterEvent.getType()); } COM: <s> add a editor enter handler </s>
funcom_train/28298586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawSingleConnection(int x1,int y1,int x2,int y2,Graphics g) { if (map!=null) { drawSingleConnection(x1,y1,x2,y2,TransBaseSettings.sizeSingle,g); } } COM: <s> draw the single connection between two points </s>
funcom_train/39314385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBold() { System.out.println("testGetBold"); Frame f=new Frame("hello"); Text myText=new Text(f, true, 10, 10); assertEquals(myText.getBold(),"bold"); System.out.println(myText.getBold()); } COM: <s> test of get bold method of class text </s>
funcom_train/19434911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DBuf load(File file) throws IOException { long size = file.length(); if (size < maxHeap) { return loadHeap(file, order); } else if (size < maxMemMap) { return loadMemMap(file, order); } else { return loadChannel(file, order); } } COM: <s> load a file </s>
funcom_train/37519645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitSwitchGroup(/*@non_null@*/ JSwitchGroup self ) { JSwitchLabel[] labels = self.labels(); JStatement[] stmts = self.getStatements(); for (int i = 0; i < labels.length; i++) { labels[i].accept(this); } pos += TAB_SIZE; for (int i = 0; i < stmts.length; i++) { newLine(); stmts[i].accept(this); } pos -= TAB_SIZE; } COM: <s> prints a switch group </s>
funcom_train/27825831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(Object object) { if (m_set!=null) m_set.remove(object); else { if (m_addBackLog!=null) m_addBackLog.remove(object); if (m_removeBackLog==null) m_removeBackLog=new HashSet(); m_removeBackLog.add(object); } } COM: <s> removes an element from this set </s>
funcom_train/8984013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getResultList(String[] args,String boxType){ AutoCompleteInputBoxManagerFactory autoCompleteInputBoxManagerFactory = AutoCompleteInputBoxManagerFactory.getInstance(); if (autoCompleteInputBoxManagerFactory.getBoxTypeExists(boxType)){ AutoCompleteInputBoxManager autoCompleteInputBoxManager = autoCompleteInputBoxManagerFactory.getAutoCompleteInputBoxManager(boxType); return autoCompleteInputBoxManager.retrieveInformation(args,this.getSessionContainer()); } return null; } COM: <s> get auto suggest value </s>
funcom_train/19063818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecuteSignInputStreamString() throws Exception { JSCFConnection pgpCon = null; JSCFResultSet res = null; pgpCon = JSCFDriverManager .getConnection("jscf:gpg::/usr/bin/gpg:testid"); JSCFStatement stmt = pgpCon.createStatement(); ByteArrayInputStream message = new ByteArrayInputStream("testmessage" .getBytes()); res = stmt.executeSign(message, "test"); assertEquals(0, ((GPGResultSet) res).getReturnValue()); assertEquals(true, (res.getResultStream() != null)); } COM: <s> tests if xecute sign input stream string works as expected </s>
funcom_train/5373283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deselectAll () { checkWidget (); /* LVITEM lvItem = new LVITEM (); lvItem.mask = OS.LVIF_STATE; lvItem.stateMask = OS.LVIS_SELECTED; ignoreSelect = true; OS.SendMessage (handle, OS.LVM_SETITEMSTATE, -1, lvItem); ignoreSelect = false; */ TableItem[] items = getSelection(); for (int i = 0; i < items.length; i++) { items[i].showSelection(false); } selection = new TableItem[0]; } COM: <s> deselects all selected items in the receiver </s>
funcom_train/46975003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* public boolean setMetricsEventsListener (EventListenerOperations listenerToSet) { boolean isSetAsListener = false; try { //get listener which we set to ourselves listenerToSet = new EventListenerPOATie(listenerToSet, POAHelper.narrow (_orb.resolve_initial_references("RootPOA")))._this(_orb); isSetAsListener = true; } catch (InvalidName e) { e.printStackTrace(); } return isSetAsListener; }*/ COM: <s> sets a class implementing event listener operations to listen for events </s>
funcom_train/45401064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize () { IVirtualDirectory webInf = this.ctx.getApplication().getRoot().getDirectory("WEB-INF"); if (webInf != null) { IVirtualDirectory classes = webInf.getDirectory("classes"); if (classes != null) this.nonPackageResources.add( new VirtualDirectoryClassSource(classes) ); IVirtualDirectory lib = webInf.getDirectory("lib"); if (lib != null) this.nonPackageResources.add(new LibDirectoryClassSource(lib, false)); } } COM: <s> this will initialize the class loader </s>
funcom_train/24595905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void valueToBits() { for(int i = getSize() - 1; i >= 0; i--) { long onebit = value & (long) Math.pow(2, i); onebit = onebit >>> i; // bits[0] = 1. bit, ..., bits[7] = 8. bit bits[i] = (onebit == 1) ? true : false; } } COM: <s> converts the value attribute in bits boolean array </s>
funcom_train/41661491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getAboutContentPane() { if (aboutContentPane == null) { labelAuthor = new JLabel(); labelAuthor.setText("作者:麦廷琮(smart)"); aboutContentPane = new JPanel(); aboutContentPane.setLayout(new BorderLayout()); aboutContentPane.add(getAboutVersionLabel(), BorderLayout.CENTER); aboutContentPane.add(labelAuthor, BorderLayout.SOUTH); } return aboutContentPane; } COM: <s> this method initializes about content pane </s>
funcom_train/44451611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void serverDisconnected() { System.out.println( "NotificationServerConnector.serverDisconnected() - Notification server disconnected..." ); synchronized( this ) { notifyAll(); } if( !bLoggedIn ) MessengerServerManager.getInstance().fireLoginError(); bLoggedIn = false; // Fire the client listener MessengerServerManager.getInstance().fireServerDisconnected(); } COM: <s> this connector does not do anything when the service is disconnected </s>
funcom_train/28262628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String get(String key) { /* * For the 7DS BBS client, the key values are the index of each item. * User can see the index given to each item by calling remote item list * requesting method. */ String result = new String(""); result = list.get((Object) key); return result; } COM: <s> get the value for the given key </s>
funcom_train/50093185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IMolecule getMolecule1()throws Exception { IMolecule molecule = builder.newMolecule(); molecule.addAtom(builder.newAtom("C")); molecule.getAtom(0).setFormalCharge(1); molecule.addAtom(builder.newAtom("C")); molecule.addBond(0, 1, IBond.Order.SINGLE); molecule.addAtom(builder.newAtom("C")); molecule.addBond(1, 2, IBond.Order.DOUBLE); molecule.addAtom(builder.newAtom("C")); molecule.addBond(2, 3, IBond.Order.SINGLE); addExplicitHydrogens(molecule); return molecule; } COM: <s> get the molecule 1 c c c c </s>
funcom_train/44992494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadClass() { Thread current = Thread.currentThread(); ClassLoader oldLoader = current.getContextClassLoader(); try { ClassLoader thisLoader = getClass().getClassLoader(); thisLoader.loadClass("org.apache.struts.config.impl.DefaultModuleConfigFactory"); current.setContextClassLoader(thisLoader); } catch (ClassNotFoundException e) { e.printStackTrace(); } } COM: <s> load the default module config factory class programmatically </s>
funcom_train/15490384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSlice(String sliceLabel, ImageProcessor ip) { if (ip.getWidth()!=width || ip.getHeight()!=height) throw new IllegalArgumentException("Dimensions do not match"); if (nSlices==0) { cm = ip.getColorModel(); min = ip.getMin(); max = ip.getMax(); } addSlice(sliceLabel, ip.getPixels()); } COM: <s> adds the image in ip to the end of the stack </s>
funcom_train/3077044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void targetStarted(BuildEvent event) { if (Project.MSG_INFO <= this.msgOutputLevel && !event.getTarget().getName().equals("")) { String msg = StringUtils.LINE_SEP + event.getTarget().getName() + ":"; printMessage(msg, this.out, event.getPriority()); } } COM: <s> logs a message to say that the target has started if this </s>
funcom_train/3526816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWorkspaceName() { UriHandler wspathHandler = WorkspacePathHandler.getWorkspacePathHandler(); String[] wspathTokens = wspathHandler.getUriTokens(); if( !isWorkspaceUri() ) throw new IllegalStateException( "URI "+uri+" is not a workspace URI" ); return uriTokens[wspathTokens.length]; } COM: <s> returns the workspace identifier from the uri </s>
funcom_train/2288042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllManageableProjects(CmsObject cms, String ouFqn, boolean includeSubOus) throws CmsException { CmsOrganizationalUnit orgUnit = readOrganizationalUnit(cms, ouFqn); return (m_securityManager.getAllManageableProjects(cms.getRequestContext(), orgUnit, includeSubOus)); } COM: <s> returns all manageable projects of the given organizational unit </s>
funcom_train/29538428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonGreedy() { if (jButtonGreedy == null) { jButtonGreedy = new JButton(); jButtonGreedy.setPreferredSize(new Dimension(18, 18)); jButtonGreedy.setIcon(new ImageIcon(getClass().getResource("/g/greedy.png"))); jButtonGreedy.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { toolbarHandler.buttonPressed(Button.Greedy); } }); } return jButtonGreedy; } COM: <s> this method initializes j button greedy </s>
funcom_train/22286624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PersistentObject loadPersistentObject(FastInputStream in) throws SyntaxError { int v = in.readInt(); if (v != MAGIC_NUMBER) { throw new SyntaxError("bad magic number: " + v); } v = in.read(); if (v != MAJOR_VERSION) { throw new SyntaxError("incompatible major version: " + v); } v = in.read(); return loadObj(in); } COM: <s> load state from a stream </s>
funcom_train/9277019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOnceCommitedAndRollbacked() throws SQLException { commit(); insertIntoTestTable(1001, 999); rollback(); assertShutdownOK(); Statement st = createStatement(); JDBC.assertSingleValueResultSet(st.executeQuery("select " + "count(*) " + "from " + "TEST_TABLE "), "1000"); st.close(); } COM: <s> tests shutdown with the transaction was commited and next transaction was rollbacked </s>
funcom_train/5658575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getInfo() { String result = super.getInfo(); result += String.format(i18n.getString("I18N_ARYREF_COLS" /*NOI18N*/), getColumns()); result += String.format(i18n.getString("I18N_ARYREF_ROWS" /*NOI18N*/), getRows()); return result; } COM: <s> returns a textual representation of the array information </s>
funcom_train/2889527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDocCreation() throws Exception { ParseContext context = new ParseContext(new ClasspathResolver(), null); assertNotNull(context.getImportResolver()); CdlDocument doc = context.createRootDocument(); assertNotNull(doc); assertEquals(context, doc.getParseContext()); assertEquals(doc, context.getDocument()); } COM: <s> test that we can create a doc </s>
funcom_train/5445118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFieldRef_ClassName(int Index) { if ((Index < 1) || (Index >= ItemType.length) || (ItemType[Index] != CONSTANT_FIELD_REF)) throw new ClassFormatError("Constant pool item does not exist"); return getClass(((Integer)ItemValue1[Index]).intValue()); } COM: <s> get the class name from a field ref constant </s>
funcom_train/25564667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRenameListener(DataRenameListener listener) { getTree().setEditable(true); getModel();//initializes choiceModel if needed choiceModel.initTreeModelListening();//before: check on null is inside if(renameListeners==null) renameListeners = new javax.swing.event.EventListenerList(); renameListeners.add(DataRenameListener.class, listener); } COM: <s> cant remove added listener but you can set tree non editable </s>
funcom_train/21875735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String retrieveError() throws JspException { ActionErrors errors = (ActionErrors) pageContext.getAttribute(Action.ERROR_KEY, PageContext.REQUEST_SCOPE); String error = null; if (errors!=null && !errors.empty()) { Iterator it = errors.get(property); if (it.hasNext()) { ActionError report = (ActionError) it.next(); error = LayoutUtils.getLabel(pageContext, report.getKey(), report.getValues()); } } return error; } COM: <s> retrieve the first error associated with the current property if there is one </s>
funcom_train/22184844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateLayoutWithoutScaling(VisualizationViewer vv, Layout layout) { // store the old scale data double vvScaleX = vv.getViewTransformer().getScaleX(); double vvScaleY = vv.getViewTransformer().getScaleY(); Point2D vvCenter = vv.getCenter(); // set new layout vv.setGraphLayout(layout); // restore the old scale date vv.getViewTransformer().setScale(vvScaleX, vvScaleY, vvCenter); } COM: <s> updates the visualisation viewers graph laout without rescaling </s>
funcom_train/11647702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void expressElementEnd(String qualifiedName) throws IOException { if (qualifiedName == null) { // XXX this indicates a programming error log.fatal( "[expressElementEnd]Qualified name is null." ); throw new RuntimeException( "Qualified name is null." ); } writer.write( "</" ); writer.write( qualifiedName ); writer.write( '>' ); } COM: <s> write an element end tag to the stream </s>
funcom_train/23944258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(Object... nameValues) { if (nameValues.length % 2 != 0) { throw new IllegalArgumentException("Names and values must be in pairs"); } for (int i = 0; i < nameValues.length; i += 2) { set((String)nameValues[i], nameValues[i + 1]); } } COM: <s> set a multitude of attribute names and values </s>
funcom_train/4757463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printErr(final String s) { if (s == null) { return; } try { jOutputDoc.insertString(0, s + "\n", ERROR_ATTR); setCaretPosition(0);// jOutputDoc.getLength()); } catch (final BadLocationException ble) { System.out.println("Couldn't write to Output Pane"); } } COM: <s> print text to error pane </s>
funcom_train/26202172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void navLinkNext() { if (next == null) { printText("doclet.Next_Package"); } else { String path = DirectoryManager.getRelativePath(packagedoc.name(), next.name()); printHyperLink(path + "package-summary.html", "", getText("doclet.Next_Package"), true); } } COM: <s> print next package link in the navigation bar </s>
funcom_train/42982200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUnitName(int unitId, String name) { int index = unitList.indexOf(new Unit(unitId)); if (index != -1) { Unit unit = unitList.get(index); unit.setName(name); unitDao.updateUnit(unit); } } COM: <s> sets the name of a unit </s>
funcom_train/24607276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _generateAProf(int index) { writer_.startSection(CS_C_PROF, _getId(CS_C_PROF, index)); _generateAProf_a(CS_C_PROF, index); writer_.endSection(CS_C_PROF); } COM: <s> generates a professor instance </s>
funcom_train/4284036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUsedPackagePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypedModel_usedPackage_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TypedModel_usedPackage_feature", "_UI_TypedModel_type"), QVTBasePackage.Literals.TYPED_MODEL__USED_PACKAGE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the used package feature </s>
funcom_train/41332108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void installUI(JComponent c) { super.installUI(c); root = (JRootPane) c; updateTextured(); int style = root.getWindowDecorationStyle(); Container parent = root.getParent(); if (parent != null && (parent instanceof JFrame || parent instanceof JDialog) && style != JRootPane.NONE) { installClientDecorations(root); } } COM: <s> invokes supers implementation of code install ui code to install the </s>
funcom_train/15516795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Method getAccessiblePrefillSmtpConnectionMethod() throws Exception { // Get the private method and set it accessible Class<?>[] parameterTypes = { SmtpConnectionBean.class, LoginDataBean.class }; Method prefillSmtpConnectionMethod = LogonController.class.getDeclaredMethod("prefillSmtpConnection", parameterTypes); prefillSmtpConnectionMethod.setAccessible(true); return(prefillSmtpConnectionMethod); } COM: <s> gets a accessible prefill smtp connection method </s>
funcom_train/36996042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndex( int ch ) { try { int idx = ch - ' ' + blankPos; if( codeTable[idx] == ch ) return idx; } catch( ArrayIndexOutOfBoundsException e ) { } for( int i = 0; i<codeTable.length; i++ ) { if( ch == codeTable[i] ) return i; } return -1; } COM: <s> returns index of specified character in codetable </s>
funcom_train/33353057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getSunSetButton() { if (sunSetButton == null) { sunSetButton = new JButton(); sunSetButton.setText("Sunset"); sunSetButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() } }); } return sunSetButton; } COM: <s> this method initializes sun set button </s>
funcom_train/41024191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJStrokeCheckBox() { if (jStrokeCheckBox == null) { jStrokeCheckBox = new JCheckBox(); jStrokeCheckBox.setText("Show ideal paths (original strokes)"); jStrokeCheckBox.setSelected(isShowingIdealPaths); jStrokeCheckBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { setShowingIdealPaths(jStrokeCheckBox.isSelected()); } }); } return jStrokeCheckBox; } COM: <s> this method initializes j stroke check box </s>
funcom_train/25472111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CaptMsg removeUser(CaptMsg msg) { if (transcribers.remove(msg.name)) { System.out.println("Removed transcriber: " + msg.name); msg = CaptMsg.success(); } else { msg = CaptMsg.failure(CaptMsg.USER_DOES_NOT_EXIST); } return msg; } COM: <s> removes a registered transcriber </s>
funcom_train/32769826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToggleButton getJToggleButton() { if (jToggleButton == null) { jToggleButton = new JToggleButton(); jToggleButton.setText(OpenJCADLanguage.getString("_ortho_")); // Generated jToggleButton.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { design.setOrtho(jToggleButton.isSelected()); } }); } return jToggleButton; } COM: <s> this method initializes j toggle button </s>
funcom_train/10526018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeParameter(String name) { if (_orderedQueryParameters == null || _orderedQueryParameters.size() == 0) return; if (name == null) return; for (int i = 0; i < _orderedQueryParameters.size(); i++) { Parameter param = (Parameter) _orderedQueryParameters.get(i); if (param.name.equals(name)) _orderedQueryParameters.remove(param); } } COM: <s> remove all of the query string parameters associated with the given name </s>
funcom_train/4942313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMode(int mode) { if(!(mode==ColorPicker.HUE || mode==ColorPicker.SAT || mode==ColorPicker.BRI || mode==ColorPicker.RED || mode==ColorPicker.GREEN || mode==ColorPicker.BLUE)) throw new IllegalArgumentException("The mode must be HUE, SAT, BRI, RED, GREEN, or BLUE."); if(this.mode==mode) return; this.mode = mode; regenerateImage(); regeneratePoint(); } COM: <s> set the mode of this panel </s>
funcom_train/28362525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public double deceleratingSatisfaction( final double value, final double minValue, final double maxValue, final double startSlope ) { return startSlope >= 0.0 ? 1.0 - Math.pow( 1.0 - linearRisingSatisfaction( value, minValue, maxValue ), startSlope ) : 1.0 - deceleratingSatisfaction( value, minValue, maxValue, -startSlope ); } COM: <s> generate a satisfaction curve which decelerates and begins with the specified slope </s>
funcom_train/785908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TableTuple newTuple(int row) { try { TableTuple t = (TableTuple)m_tupleType.newInstance(); t.init(m_table, m_graph, row); return t; } catch ( Exception e ) { Logger.getLogger(getClass().getName()).warning( e.getMessage()+"\n"+StringLib.getStackTrace(e)); return null; } } COM: <s> instantiate a new tuple instance for the given row index </s>
funcom_train/38346367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean compare_to_string(String str) { byte [] sbytes = str.getBytes(); if (sbytes.length > length) { return false; } for (int i = 0; i < sbytes.length; i++) { if (data[offset + i] != sbytes[i]) { return false; } } return true; } COM: <s> compares this byte array to a given string assuming all </s>
funcom_train/29583380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException { TreePath selPath = event.getPath(); DefaultMutableTreeNode parent = ((DefaultMutableTreeNode)event.getPath().getLastPathComponent()); if (!tree.isExpanded(selPath)) { try { expandCollection(parent); } catch (HTTPMessageException e) { e.printStackTrace(); throw new ExpandVetoException(event, e.getErrorMessage()); } } } COM: <s> updates the tree structure when the tree is about to expand i </s>
funcom_train/26481635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Book registerBook(String id, String nickname, String type, String source, String registrationid) throws LowlevelLedgerException { try { return (Book) prevayler.execute(new RegisterBook(id, nickname, type, source, registrationid)); } catch (Exception e) { if (e instanceof LowlevelLedgerException) throw (LowlevelLedgerException) e; throw new LowlevelLedgerException(e); } } COM: <s> register a book in the system </s>
funcom_train/25422338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FeedbackMessage getFeedbackMessage() { if (_feedbackMessage == null) { RequestContext context = extractRequestContext(); _feedbackMessage = new FeedbackMessage(); //_feedbackMessage.setFromName(context.getUser().getName()); _feedbackMessage.setFromAddress(context.getUser().getProfile().getEmailAddress()); } return _feedbackMessage; } COM: <s> gets the message associated with user feedback </s>
funcom_train/44802313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LinguisticVariable copy() { // Create new LV LinguisticVariable tempLV = new LinguisticVariable(this.getLVName()); // Copy membership functions for (Enumeration e = this.storage.elements(); e.hasMoreElements();) { tempLV.add((MembershipFunction) e.nextElement()); } // Copy input value tempLV.setInputValue(this.input_value); return tempLV; } COM: <s> return an exact copy of itself </s>
funcom_train/19259265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // Lower the priority of this thread. Thread me = Thread.currentThread(); me.setPriority(Thread.MIN_PRIORITY); try { // Loop until uiUpdater is no longer equal to this thread. while (me == uiUpdater) { // Sleep for a bit. Thread.sleep(500); // Update the user interface. updateUI(); // Now go back to sleep. } } catch (InterruptedException e) { // Do nothing except exit the thread. uiUpdater = null; } } COM: <s> called automatically by the thread start method </s>
funcom_train/36112557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void rotatePreviousSteps() { final double[] rolled = previousF[previousT.length - 1]; for (int k = previousF.length - 1; k > 0; --k) { previousT[k] = previousT[k - 1]; previousF[k] = previousF[k - 1]; } previousF[0] = rolled; } COM: <s> rotate the previous steps arrays </s>
funcom_train/49029653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String testPropertyFile(String aPropertyFileName) { Properties prop = new Properties(); String result = null; try { prop.load(new FileInputStream(aPropertyFileName)); String importName = doSubstitutions(prop.getProperty(importKey)); result = (importName != null) ? importName : aPropertyFileName; } catch (IOException ioe) {} return result; } COM: <s> once the property file search has expanded beyond the current </s>
funcom_train/2583681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translate(int x, int y) { Transform swtTransform = new Transform(this.gc.getDevice()); this.gc.getTransform(swtTransform); swtTransform.translate(x, y); this.gc.setTransform(swtTransform); swtTransform.dispose(); } COM: <s> applies a translation </s>
funcom_train/43345755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { cancelRetriever(); mContainer.removeAll(); mNumContainers = 0; mIsLoaded = false; mBeingLoaded = false; mCountLabel.setText(""); mLoadingStatusLabel.setText(mResources.getString("gui.image.display.container.loading.label.idle.text")); } COM: <s> this method will clear the panel of any panels it has in it </s>
funcom_train/42777866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void beforeInvoke(TiiraCallParam callContext) { callLevel.set(callLevel.get()+1); if (isTransactional(callContext)) { int level = transactionHandlerLevel.get(); if (level == 0) { transactionHandlerLevel.set(callLevel.get()); currentStatus.set(beginTransaction(callContext)); } } } COM: <s> starts transaction if one does not already exist </s>
funcom_train/19843730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResourceSetPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NO2Model_resourceSet_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NO2Model_resourceSet_feature", "_UI_NO2Model_type"), ModelPackage.Literals.NO2_MODEL__RESOURCE_SET, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the resource set feature </s>
funcom_train/3338920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setVariable(String name, String value) { value.length(); // Check that the value is non-null. VariableSlot var = variables.get(name); if (var == null) { variables.put(name, new VariableSlot(name, value, false)); } else if (!var.isReadOnly()) { var.setValue(value); } } COM: <s> this method implements name value </s>
funcom_train/51193632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConversationStateMachine getStateMachine() { if (conversationStateMachine == null) { conversationStateMachine = new org.nexuse2e.messaging.impl.ConversationStateMachineImpl(); conversationStateMachine.initialize(conversation, messagePojo, participant.getConnection().isReliable()); } return conversationStateMachine; } COM: <s> gets the code conversation state machine code that shall be used for </s>
funcom_train/29269732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Set createSetOfExplicitURIs(AttributeSG[] pAttributes) { Set result = new HashSet(); for (int i = 0; i < pAttributes.length; i++) { AttributeSG attr = pAttributes[i]; if (!attr.isWildcard()) { String uri = attr.getName().getNamespaceURI(); if (uri == null) { uri = ""; } result.add(uri); } } return result; } COM: <s> returns the set of namespace uris in code p attributes code </s>
funcom_train/17733120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetAllValuesForType_NoWriteMethod() throws Exception { logger_.info("Running testSetAllValuesForType_NoWriteMethod..."); MockNoWriteMethodBean javaBean = new MockNoWriteMethodBean(); BeanUtil.setAllValuesForType(javaBean, Integer.class, new Integer(3)); assertEquals(new Integer(23), javaBean.getAge()); } COM: <s> set all integer values in bean where the write method is missing </s>
funcom_train/37034986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void begin(Attributes attributes) throws Exception { String username = attributes.getValue("name"); if (username == null) { username = attributes.getValue("username"); } String password = attributes.getValue("password"); String roles = attributes.getValue("roles"); MemoryRealm realm = (MemoryRealm) digester.peek(digester.getCount() - 1); realm.addUser(username, password, roles); } COM: <s> process a code lt user gt code element from the xml database file </s>
funcom_train/3072319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getConfigFileURL() throws SAXException, IOException{ getAppFilesToInstall();//ensure table init File rdfFile= new File( installDir, (String)appFileTable.get("configFile")); return rdfFile.toURI().toURL().toString(); } COM: <s> gets the url of the local config file as string </s>
funcom_train/48560354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem16() { if (stringItem16 == null) {//GEN-END:|368-getter|0|368-preInit stringItem16 = new StringItem("\u041D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430", null);//GEN-LINE:|368-getter|1|368-postInit }//GEN-BEGIN:|368-getter|2| return stringItem16; } COM: <s> returns an initiliazed instance of string item16 component </s>
funcom_train/22526474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FoldedRolePart createFoldedRolePart(IRolePartModel rolePartModel) { FoldedRolePart foldedRolePart = new FoldedRolePart(fAct.getRolePartsModel()); foldedRolePart.setComponent(rolePartModel.getComponent()); foldedRolePart.addRole(rolePartModel.getRole()); fFoldedRoleParts.add(foldedRolePart); return foldedRolePart; } COM: <s> create a folded role part </s>
funcom_train/7272444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUnsorted(I o) { if (TABLE.isEditing()) { CellEditor editor = TABLE.getCellEditor(); editor.cancelCellEditing(); } boolean inView = TABLE.isSelectionVisible(); int addedAt = DATA_MODEL.add(o); fixSelection(addedAt, inView); } COM: <s> forces the object to be added unsorted </s>
funcom_train/7438202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void flushResponse(HttpServletResponse response,String responseContent)throws IOException{ response.setCharacterEncoding("UTF-8"); PrintWriter writer=response.getWriter(); //response.setContentLength(responseContent.length()); writer.write(responseContent); writer.flush(); writer.close(); } COM: <s> method to flush a string as response </s>
funcom_train/35283930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String codeToString(int code) { char c1 = (char) ((code & 0xFF000000) >> 24); char c2 = (char) ((code & 0xFF0000) >> 16); char c3 = (char) ((code & 0xFF00) >> 8); char c4 = (char) (code & 0xFF); return String.valueOf(c1) + c2 + c3 + c4; } COM: <s> this method transforms the coded bloch id into a string value </s>
funcom_train/13674936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { //System.out.println("Running PoolThread"); do { try { //System.out.println(this.toString()); ((Runnable) m_TaskPool.take()).run(); } catch (Exception ex) { //FIXME: Handle somehow!? ex.printStackTrace(); } } while (true); } COM: <s> runs the tt pool thread tt </s>
funcom_train/874946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("SupplierA".equals(portName)) { setSupplierAEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/22347417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initPager() { Element pagerEl = tableEl.element("pager"); if(pagerEl != null) { paged = true; rowsperpage = Integer.parseInt(pagerEl .attributeValue("rowsperpage")); pagesframe = Integer.parseInt(pagerEl.attributeValue("pagesframe")); } else { paged = false; pagesframe = 0; rowsperpage = 0; } /*log.debug("Init pager: paged=" + paged + ", rowsperpage=" + rowsperpage + ", pagesframe=" + pagesframe);*/ } COM: <s> init rows per page and pages frame constants from tile element </s>
funcom_train/32355085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Root constructRoot() { try { prop = new Properties(); prop.load(ClassPathUtils.locateClasspathResourceAsStream(ApplicationConstants.CONFIG_FILE)); } catch (java.io.FileNotFoundException e) { new RemoteStorageException(e); } catch (IOException e) { new RemoteStorageException(e); } // create a root with these children root = new Root("Server", "user", "password", prop.getProperty("host")); loggedUser = LoginController.getLoggedUser(); return root; } COM: <s> constructs the root of the tree </s>
funcom_train/4881685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getVoltarMenu1 () { if (voltarMenu1 == null) {//GEN-END:|152-getter|0|152-preInit // write pre-init user code here voltarMenu1 = new Command ("OK", "Salvar e ir para o Menu", Command.ITEM, 0);//GEN-LINE:|152-getter|1|152-postInit // write post-init user code here }//GEN-BEGIN:|152-getter|2| return voltarMenu1; } COM: <s> returns an initiliazed instance of voltar menu1 component </s>
funcom_train/16219437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel getResultPanel() { // Initialize layout builder FormLayout layout = new FormLayout( "10dlu, 50dlu, pref:grow, 10dlu, pref, pref:grow, 10dlu, pref, 10dlu", "10dlu, pref, 10dlu, pref"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); // TODO Add necessary implementation return builder.getPanel(); } COM: <s> incomplete function returns a panel containing the results of a </s>
funcom_train/21508695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDataToString(List<?> data) { // Convert data to data point. String dataPoint = data.toString(); dataPoint = dataPoint.replace("]", ""); dataPoint = dataPoint.replace("[", ""); dataPoint = dataPoint.replace(", ", ""); return dataPoint; } COM: <s> converts data to chart string </s>
funcom_train/31928952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void spillAllRegisters() { for (int r = 0; r < 32; r++) { spillGPRegister(r); } for (int r = 0; r < 32; r++) { spillFPRegister(r); } for (int crf = 0; crf < 8; crf++) { spillCRRegister(crf); } spillCTRRegister(); spillXERRegister(); spillLRRegister(); spillFPSCRRegister(); // spillPC(pc); } COM: <s> spill all the registers </s>
funcom_train/51226411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(){ getContentPane().setLayout(new BorderLayout()); GraphCanvas canvas3d = new GraphCanvas(800, 600); canvas3d.createEmptyUniverse(); Gui theGui = null; //canvas3d.startVisualisation("196735", 11672, 0, 1, true); canvas3d.startVisualisation("11672", 50000, 2, true, false, true, theGui); getContentPane().add("Center", canvas3d); } COM: <s> initialize the layout create a </s>
funcom_train/4509748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateProfiles(Element profilesUpdateParams) { // Try to save the profile changes try { String path = PROFILE_URL_PREFIX + "profiles"; ClearspaceManager.getInstance().executeRequest(POST, path, profilesUpdateParams.asXML()); } catch (Exception e) { // It is not supported exception, wrap it into an UnsupportedOperationException throw new UnsupportedOperationException("Unexpected error", e); } } COM: <s> makes the request to the webservice of clearspace to update the profiles information </s>
funcom_train/48910185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextField getTxfCantidad() { if (txfCantidad == null) { txfCantidad = new JTextField(); txfCantidad.setBounds(new Rectangle(82, 50, 127, 20)); txfCantidad.setText("0"); txfCantidad.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent e) { calcularTotalImporte(); } }); } return txfCantidad; } COM: <s> this method initializes txf cantidad </s>
funcom_train/4757079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean strictlyNegative() { if (isNaN()) { field.setIEEEFlagsBits(DfpField.FLAG_INVALID); dotrap(DfpField.FLAG_INVALID, LESS_THAN_TRAP, this, newInstance(getZero())); return false; } return (sign < 0) && ((mant[mant.length - 1] != 0) || isInfinite()); } COM: <s> check if instance is strictly less than 0 </s>
funcom_train/27674165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getExpanded() { Element expanded = new Element("expandedServices"); for (Enumeration e = htExpanded.keys(); e.hasMoreElements(); ) { Integer serviceId = (Integer)e.nextElement(); boolean ex = ((Boolean)htExpanded.get(serviceId)).booleanValue(); expanded.addContent(new Element("service") .setAttribute("id", serviceId.toString()) .setAttribute("expanded", ex ? "true" : "false")); } return expanded; } COM: <s> returns an element containing informations about the expanded or collapsed </s>
funcom_train/45910628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean within(double rx, double ry, double width, double height) { int w = get().getWidth(); int h = get().getHeight(); return (rx <= x - w / 2 && x - w / 2 + w < rx + width) && (ry <= y - h / 2 && y - h / 2 + h < ry + height); } COM: <s> test if the object is completely within the specified bounds </s>
funcom_train/21727748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect() { if (host == null || port == 0) return; else { try { socket.connect(new InetSocketAddress(host, port), 10*1000); //timeout is in milliseconds. in = new BufferedReader(new InputStreamReader(socket.getInputStream())); out = new PrintWriter(socket.getOutputStream(), true); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } COM: <s> method that connects the client to a server </s>
funcom_train/3843248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setControlsEnabled(Composite root, boolean enabled) { Control[] children = root.getChildren(); for (int i = 0; i < children.length; i++) { Control child = children[i]; if (!(child instanceof CTabFolder) && !(child instanceof TabFolder) && !(child instanceof PageBook)) child.setEnabled(enabled); if (child instanceof Composite) setControlsEnabled((Composite) child, enabled); } } COM: <s> enables or disables a tree of controls starting at the specified root </s>
funcom_train/20575960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { History.addValueChangeHandler(new ValueChangeHandler<String>() { public void onValueChange(ValueChangeEvent<String> event) { String currentUserEmailId = UserUtil.getCurrentUserEmailId(); if (null == currentUserEmailId) { Layout.showLandingPage(); } else { Layout.showApplicationPage(currentUserEmailId); } } }); History.fireCurrentHistoryState(); } COM: <s> the entry point method </s>
funcom_train/2583027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number getEndValue(Comparable series, Comparable category) { int seriesIndex = getSeriesIndex(series); if (seriesIndex < 0) { throw new UnknownKeyException("Unknown 'series' key."); } int itemIndex = getColumnIndex(category); if (itemIndex < 0) { throw new UnknownKeyException("Unknown 'category' key."); } return getEndValue(seriesIndex, itemIndex); } COM: <s> returns the end data value for one category in a series </s>
funcom_train/44118385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFirstChar() { Iterator i = _characterSets.values().iterator(); if (i.hasNext()) { CharacterSet csm = (CharacterSet) i.next(); return csm.getFirstChar(); } else { String msg = "getFirstChar() - No character set found for font:" + _name + " weight:" + _weight + " style:" + _style; LOGGER.error(msg); throw new FontRuntimeException(msg); } } COM: <s> get the first character in this font </s>
funcom_train/8718812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // Loop until the termination semaphore is set while (!threadDone) { // Wait for our check interval threadSleep(); // Check for included files which are newer than the // JSP which uses them. try { checkCompile(); } catch (Throwable t) { log.error("Exception checking if recompile needed: ", t); } } } COM: <s> the background thread that checks for changes to files </s>
funcom_train/12187114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStackTrace(PrintStream ps) { synchronized (ps) { super.printStackTrace(ps); for (int i = 0; i < throwables.length; i++) { Throwable throwable = throwables[i]; ps.println(); ps.print("Exception[" + (i + 1) + "]: "); throwable.printStackTrace(ps); } } } COM: <s> prints the exception and the composite exceptions to the specified </s>
funcom_train/13210828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetClient() { setServerIP(""); setClientName(""); setClientId(-1); setClientNr(-1); setClientIP(""); setState(NetworkConnection.DISCONNECTED); setSocket(null); setOutStream(null); setInStream(null); } COM: <s> resets all client information </s>
funcom_train/20340588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getFormUrl(String content) throws ContactListImporterException { int begin = content.indexOf("<form")+5; int end = content.indexOf("</form>", begin); content = content.substring(begin, end); String[] attributes = content.split("\\s+"); Pattern p = Pattern.compile("action=\"([^\\s\"]+)\""); for(int i = 0; i < attributes.length ; i++) { Matcher matcher = p.matcher(attributes[i]); if(matcher.find()) { return matcher.group(1); } } throwProtocolChanged(); // return statement required but never reachable return null; } COM: <s> retrieve the action attribute value of a html form </s>
funcom_train/33519414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String formatStanding(Long numberOfWins, Long numberOfLosses) throws InvalidParameterException { String exp = ""; int i = 0; while (i < standingsExpression.length()){ index = 0; String carac = String.valueOf(standingsExpression.charAt(i)); if (LeagueUtil.STANDINGS_EXPRESSION_ELEMENTS.contains(carac)){ exp+= carac; i++; }else { index = i; exp+= findReservedWord(standingsExpression.substring(i), index, numberOfWins, numberOfLosses); i = index; } } return exp; } COM: <s> this method is responsible for format the standing expression </s>
funcom_train/21466002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public Attribute convertToWekaAttribute(DSAttribute attribute){ // //build string vector with attribute values // FastVector values = new FastVector(attribute.getPossibleValuesSize()); // for(int i = 0; i != values.size(); ++i){ // values.addElement(jsonParser.toJson(attribute.getPossibleValueAt(i))); // } // return new Attribute(attribute.getName(), values); // } COM: <s> converts a dsattribute to a weka attribute </s>
funcom_train/48151490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDistribution() { dist.setParameters(k, 1 / r); arrivalTime.setName("T(" + String.valueOf(k) + ")"); timeline.setRange(dist.getDomain().getLowerBound(), dist.getDomain() .getUpperBound(), dist.getDomain().getWidth()); } COM: <s> this method sets the parameters of the distribution </s>
funcom_train/35461072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStructureWithMultipleItems() { assertEquals("[name : A, alignment : FULLWORD, offset : 3, length : 13, padding : 0]", mapMinorStructure("dcl 1 A," + " 2 B char(1)," + " 2 C float decimal(2)," + " 2 D character(5)," + " 2 E bin fixed(15);")); } COM: <s> map a structure with a multiple item </s>
funcom_train/19895301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStartTime(Date start_time) throws Exception { //Theoretically submitting a job before 01 jan 2008 is impossible. //Note: MR Grid has not been tested at speeds of 88 mph or above. if(start_time.getTime() > 1199163600) this.start_time = start_time; else throw new Exception("start_time must be a Date greater than midnight on 01 jan 2008"); } COM: <s> sets the date time the job was started by the grid </s>