__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/7637598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNamespace() { if (mNamespace == null) { IFile manifestFile = AndroidManifestParser.getManifest(mProject); try { AndroidManifestParser data = AndroidManifestParser.parseForData(manifestFile); String javaPackage = data.getPackage(); mNamespace = String.format(AndroidConstants.NS_CUSTOM_RESOURCES, javaPackage); } catch (CoreException e) { } } return mNamespace; } COM: <s> returns the namespace for the project </s>
funcom_train/1616778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mark(int readAheadLimit) throws IOException { if (readAheadLimit < 0) { throw new IllegalArgumentException("Read-ahead limit < 0"); } synchronized (lock) { ensureOpen(); this.readAheadLimit = readAheadLimit; markedChar = nextChar; markedSkipLF = skipLF; } } COM: <s> marks the present position in the stream </s>
funcom_train/33831705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ThrowableAssert hasNoCause() { isNotNull(); Throwable actualCause = actual.getCause(); if (actualCause != null) fail(concat("expected exception without cause, but cause was:", inBrackets(actualCause.getClass()))); return this; } COM: <s> verifies that the actual code throwable code does not have a cause </s>
funcom_train/20829779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PhotogalData parseData(MultipartFile importFile) throws IOException { PhotogalData retval; final InputStream importFileStream = importFile.getInputStream(); try { final Reader reader = new InputStreamReader(importFileStream, "UTF-8"); retval = getImporter().importData(reader); } finally { IOUtils.closeQuietly(importFileStream); } return retval; } COM: <s> parses an import file </s>
funcom_train/46857878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderUnit(Graphics2D g, Unit unit, boolean fogged) { if (unit == null || fogged) { return; } Color col; col = unit.getOwner().getColor(); if (col == null) { col = Color.BLACK; } g.setColor(col); g.fillRect(0, 0, tileSize, tileSize); } COM: <s> render each unit in the map </s>
funcom_train/36259189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String showNewDatabaseNameDialog(@NotNull final String oldName) { return (String) JOptionPane.showInputDialog(null /*this*/, actionBuilder.getString("renameDatabase.enter.name"), actionBuilder.getString("renameDatabase.title"), JOptionPane.PLAIN_MESSAGE, null, null, oldName); } COM: <s> display a dialog to enter a new database name for renaming </s>
funcom_train/20271323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node tryReplaceUndefined(Node n) { // TODO(johnlenz): consider doing this as a normalization. if (isASTNormalized() && NodeUtil.isUndefined(n) && !NodeUtil.isLValue(n)) { Node replacement = NodeUtil.newUndefinedNode(n); n.getParent().replaceChild(n, replacement); reportCodeChange(); return replacement; } return n; } COM: <s> use void 0 in place of undefined </s>
funcom_train/5662693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addShowingActivityDetailPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_View_showingActivityDetail_feature"), getString("_UI_PropertyDescriptor_description", "_UI_View_showingActivityDetail_feature", "_UI_View_type"), ViewPackage.eINSTANCE.getView_ShowingActivityDetail(), true, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the showing activity detail feature </s>
funcom_train/41836938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshOrStopRefreshClosestStations(View v) { MyLog.v(TAG, "refreshOrStopRefreshClosestStations()"); // IF the task is running DO if (this.closestStationsTask != null && this.closestStationsTask.getStatus().equals(AsyncTask.Status.RUNNING)) { // stopping the task this.closestStationsTask.cancel(true); this.closestStationsTask = null; setClosestStationsCancelled(); } else { // refreshSubwayStatus(); refreshClosestStations(); } } COM: <s> refresh or stop refresh the closest stations depending if running </s>
funcom_train/3595934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeVirtualResource(OutputStreamWriter out, NVirtualResource vres) throws java.io.IOException { if (vres==null) { return; } List arr = getCommonResourceAttributes(vres); writeXMLElement(out, NiteMetaConstants.virtualResource, arr, 2, START); writeDependencies(out, vres.getDependencies()); writeXMLElement(out, NiteMetaConstants.virtualResource, null, 2, END); } COM: <s> write a single virtual resource </s>
funcom_train/29716813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SVGEntity getSVGEntity(DiagramElement e) { for (int i = 0; i < objects.size(); i++) { SVGEntity en = (SVGEntity) objects.get(i); if (en.getEntity().getName().equals(e.getName())) return en; } return null; } COM: <s> returns the svgentity wrapper for a diagram element </s>
funcom_train/4715445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void bindCommonsData(LinearLayout viewP, final Detail detailP) { // The name of the detail TextView name = (TextView) viewP.findViewById(R.id.id_detail_name); name.setText(detailP.getName()); // The action's image ImageView img = (ImageView) viewP.findViewById(R.id.id_detail_action); if (detailP.getAction() != null) { img.setVisibility(View.VISIBLE); } else { img.setVisibility(View.INVISIBLE); } } COM: <s> bind commons torrents data with widget </s>
funcom_train/5737338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void deactivate(String id){ WorkflowEventHandler[] handlers = (WorkflowEventHandler[])handlerMap.get(id); if(handlers!=null){ for(int i=0; i<handlers.length; i++){ handlers[i].deactivate(); } handlerMap.remove(id); } } COM: <s> unsubscribe the event handlers for a workflow at the end of its life </s>
funcom_train/15406877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OnQueryOnly getOnQueryOnly(String onQueryOnly, DataSource ds) { if (onQueryOnly.equals("COMMIT")){ return OnQueryOnly.COMMIT; } if (onQueryOnly.startsWith("CLOSE")){ if (!isReadCommitedIsolation(ds)){ String m = "transaction.queryonlyclose is true but the transaction Isolation Level is not READ_COMMITTED"; throw new PersistenceException(m); } else { return OnQueryOnly.CLOSE_ON_READCOMMITTED; } } // default to rollback return OnQueryOnly.ROLLBACK; } COM: <s> return the behaviour to use when a query only transaction is committed </s>
funcom_train/41299644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getSnapBtns() { if (snapBtns == null) { snapBtns = new JPanel(); snapBtns.setLayout(new BoxLayout(getSnapBtns(), BoxLayout.X_AXIS)); snapBtns.setBounds(new Rectangle(6, 4, 254, 40)); snapBtns.add(getSnapDir(), null); snapBtns.add(getAddSnapshot(), null); snapBtns.add(getUpdateB(), null); snapBtns.add(getDeleteSnapshot(), null); } return snapBtns; } COM: <s> this method initializes snap btns </s>
funcom_train/51537863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showAboutBox() { Image logo = getSystemImage("about.png"); // Shows About Box as a preempting Alert SystemAlert about = new SystemAlert(displayEventHandlerImpl, aboutCommand.getLabel(), Resource .getString(ResourceConstants.AMS_PROJECT_NAME) + "\n\n" + Resource.getString(ResourceConstants.AMS_COPYRIGHT_LONG), logo, null); } COM: <s> show about box as a preempting alert </s>
funcom_train/13874578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUpperPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MultiplicityElement_upper_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_upper_feature", "_UI_MultiplicityElement_type"), EmofPackage.Literals.MULTIPLICITY_ELEMENT__UPPER, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the upper feature </s>
funcom_train/45251717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Group createButtonGroup(Composite composite, String title) { Group buttonComposite = new Group(composite, SWT.NONE); buttonComposite.setText(title); FormLayout layout = new FormLayout(); layout.marginWidth = 5; // same as GridData default layout.marginHeight = 5; // same as GridData default buttonComposite.setLayout(layout); buttonComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); return buttonComposite; } COM: <s> create a composite that for creating the tab toggle buttons </s>
funcom_train/11728502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDocOrderLastFunction() throws Exception { String xpath = xpathRoot + "/*[position()=last()]"; String resultPath = ""; for (NodeIterator nodes = testRootNode.getNodes(); nodes.hasNext();) { resultPath = nodes.nextNode().getPath(); } docOrderTest(new Statement(xpath, Query.XPATH), resultPath); } COM: <s> tests the code last code function </s>
funcom_train/3619363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UseCase_id_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UseCase_id_feature", "_UI_UseCase_type"), EclipsesrsPackage.Literals.USE_CASE__ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the id feature </s>
funcom_train/33233467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand2() { if (exitCommand2 == null) {//GEN-END:|65-getter|0|65-preInit // write pre-init user code here exitCommand2 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|65-getter|1|65-postInit // write post-init user code here }//GEN-BEGIN:|65-getter|2| return exitCommand2; } COM: <s> returns an initiliazed instance of exit command2 component </s>
funcom_train/28471812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetOwner() { Subscription testSubscri = new Subscription(); User testUser1 = new User(); User testUser2 = new User(); testSubscri.setOwner(testUser1); assertTrue(testSubscri.getOwner() == testUser1); testSubscri.setOwner(testUser2); assertTrue(testSubscri.getOwner() == testUser2); } COM: <s> tries to get and to set an user into subscription </s>
funcom_train/5862308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEventInterceptor(EventInterceptor ei) { if (ei == null) throw new IllegalArgumentException(); //For better performance (of invoking beforeSendEvent and others //we make a copy first final List eilst = new LinkedList(); final EventInterceptor[] eis = _eis; if (eis != null) { for (int j = 0; j < eis.length; ++j) eilst.add(eis[j]); } eilst.add(ei); _eis = (EventInterceptor[]) eilst.toArray(new EventInterceptor[eilst.size()]); } COM: <s> adds an event interceptor </s>
funcom_train/12831747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadSettings(final Decryption decryption) throws Exception { xmlDocument = new File(decryption.getFile()); keyFile = decryption.getKeyStore(); encryptionId = decryption.getEncryptionId(); keyStorePassword = decryption.getKeyStorePassword(); keyName = decryption.getKeyName(); keyPassword = decryption.getKeyPassword(); } COM: <s> loads the settings from the i xml decryption wizard i out of the </s>
funcom_train/2693931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(int index, E item) { if (item == null) { throw new ArgumentNullPointerException( "item" ); } Element originalItemElement = getObjectElement(item, true ); Element elementInCollection = this.elements.insertCopy(index, originalItemElement); this.objectsRegistry.bindObject( elementInCollection, item ); } COM: <s> insert item in specified place </s>
funcom_train/32055074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { String name = getCurrentDocument().getLibraryPanel().getPanel().toString(); name = JOptionPane.showInputDialog(graphpad.getFrame(), "Rename " + name); if (name != null && name.length() > 0) { getCurrentDocument().getLibraryPanel().getPanel().setName(name); graphpad.repaint(); } else graphpad.error("Illegal name"); } COM: <s> renames an existed library new name must be legal </s>
funcom_train/21995443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rec getRec(String filter, Hashtable args) throws DatabaseException { ConnectionPool pool = null; Connection conn = null; try { pool = ConnectionPool.getInstance(); conn = pool.getConnection(); return getRec(conn, filter, args); } finally { if (pool != null) pool.releaseConnection(conn); } } COM: <s> obtain a single rec for the key filter </s>
funcom_train/7927731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBuildFeedStringReader() throws ParseException, IOException { this.reader = new FileReader(incomingFeed); BaseFeed feed = GDataEntityBuilder.buildFeed(this.reader,this.config); assertNotNull(feed); assertEquals("feed title",feed.getTitle().getPlainText(), feedTitleFromXML); } COM: <s> test method for org </s>
funcom_train/24927430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyRemote(String uuid, HttpServletRequest request) { if (!Is.emptyString(uuid)) { RemoteClient client = getRemoteClientManager(request).getRemoteClient(uuid); if (client == null) { client = new RemoteClient(); client.setComputerName(request.getRemoteAddr()); getRemoteClientManager(request).addRemote(uuid, client); } client.setLastAccessedTime(new Date().getTime()); } } COM: <s> notify the remote object about access to it </s>
funcom_train/15723371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String fitString(String s, int width, Font font) { if (s.length() == 0) { return ""; } FontMetrics metrics = getFontMetrics(Settings.getInstance().getFont()); char[] chars = new char[s.length()]; s.getChars(0, s.length(), chars, 0); int count = 0; int totalWidth = metrics.charWidth(chars[0]); while (totalWidth < width) { count++; totalWidth += metrics.charWidth(chars[count]); } return s.substring(0, count); } COM: <s> cuts string to make its width equal to specified </s>
funcom_train/25871682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SessionFactory lookupSessionFactory() { if (logger.isDebugEnabled()) { logger.debug("Using SessionFactory '" + getSessionFactoryBeanName() + "' for OpenSessionInViewFilter"); } ApplicationContext ctx = ApplicationContextUtils.getWebContext(getServletContext()); return ctx.getBean(getSessionFactoryBeanName(), SessionFactory.class); } COM: <s> look up the session factory that this filter should use </s>
funcom_train/50862421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getGeneratedPower() { double result = 0D; // Building should only produce power if it has no current malfunctions. if (!getBuilding().getMalfunctionManager().hasMalfunction()) { Iterator<PowerSource> i = powerSources.iterator(); while (i.hasNext()) { result += i.next().getCurrentPower(getBuilding()); } } return result; } COM: <s> gets the amount of electrical power generated </s>
funcom_train/28529226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "({\"tell\",5,\"" + Server.getMudName() + "\",\"" + sender_name + "\",\"" + target_mud + "\",\"" + target_name + "\",\"" + sender_visible_name + "\",\"" + message + "\",})"; } COM: <s> this method is used by the i3 system to turn the packet </s>
funcom_train/23058034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetInsertSQL() { System.out.println("getInsertSQL"); final VarsMapper instance = new VarsMapper(); final String expResult = ""; final String result = instance.getInsertSQL(); 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 insert sql method of class vars mapper </s>
funcom_train/3312703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActive(CDCover c){ if(activeCover != c){ //check if the user is in textMode if(activeCover.getDrawingPane().isTextEnabled()){ if(cdoxFrame.getTextEnabled()){ cdoxFrame.updateTextBar("cover"); } } //if the user was in textMode and decided that he/she wanted to continue //typing text the textEnabled is still on in cFrame. if(!cdoxFrame.getTextEnabled()){ activeCover.setActive(false); activeCover = c; activeCover.setActive(true); } } } COM: <s> this method is called when on a cddrawingpane is </s>
funcom_train/22649051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void emitWrapperRegistration() throws IOException { out.append(C.BEGIN_WRAPPER + "[__INIT_" + object.getcClassName() + "]" + C.N); out.append("xmlvm_register_wrapper_creator(__WRAPPER_CREATOR);" + C.N); out.append(C.END_WRAPPER + C.N); } COM: <s> the wrapper creator of the particular class has to be registered </s>
funcom_train/27905539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void check_all_variables() { for (Enumeration e = variables.elements() ; e.hasMoreElements() ;) { TracedVariable v = (TracedVariable)e.nextElement(); if(v.last_use >= op_count) { // v.show();JDDConsole.out.println(); // bdd.check_node(v.bdd, v.name); // DEBUG } } } COM: <s> check if the variables to be used are ok </s>
funcom_train/38810474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_TCM__String_getChildTextTrim_String_OrgJdomNamespace() { Element element = new Element("element"); Namespace ns = Namespace.getNamespace("urn:test:foo"); Element child = new Element("child", ns); child.addContent(" some text \n "); element.addContent(child); assertEquals("incorrect text returned", "some text", element .getChildTextTrim("child", ns)); } COM: <s> test the convience method for retrieving trimmed child text for the child </s>
funcom_train/28403468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRole(String role) { if (role != null && role.trim().length() > 0) { String[] rolesStrings = role.split("\\s*,\\s*"); roles = new HashSet<String>(); for (int i = 0; i < rolesStrings.length; i++) { roles.add(rolesStrings[i]); } } else { roles = null; } } COM: <s> sets the value of the role property </s>
funcom_train/22706170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCoverableItemCount(TestCase testCase) { if (testCase == null) { throw new NullPointerException("testCase == null"); } Integer result = this.coverableItemCounts.get(testCase); if (result == null) { throw new IllegalArgumentException("Testcase was not part of " + "correlation computation"); } return result.intValue(); } COM: <s> gets the total number of </s>
funcom_train/17003690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDurationPassed(GDuration duration){ Date currentTime = new Date(); GDuration currentDuration = new GDuration(+1, currentTime.getYear(), currentTime.getMonth(), currentTime.getDate(), currentTime.getHours(), currentTime.getMinutes(), currentTime.getSeconds(), null); int comparison = currentDuration.compareToGDuration(duration); if(comparison < 0){ return false; }else{ return true; } } COM: <s> checks the validity of group max idle duration </s>
funcom_train/14462539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AxisParent getAxisParent() { for (int i=0;i<chartArr.size();i++) { BiffRec b = (BiffRec)chartArr.get(i); if (b.getOpcode()==AXISPARENT) { AxisParent axis = (AxisParent) b; return axis; } } return null; } COM: <s> get the axis parent record which contains formatting and label information for the </s>
funcom_train/42577658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isStraight() { int prime = 1; // calculate the combined prime of the hand for(Card c : orderedFiveCards) prime *= c.getRank().getPrime(); // see if it's a straight prime for(int p : STRAIGHT_PRIMES) { if(prime==p) return true; } return false; } COM: <s> using cactus kevs prime number straight evaluation idea </s>
funcom_train/33001124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getInfo() { return "WebLogURL:\n" + " server : " + server + "\n" + " port : " + port + "\n" + " protocol : " + protocol + "\n" + " path : " + path + "\n" + " action : " + action + "\n" + " parameters: " + parameters + "\n"; } COM: <s> gets the url data information </s>
funcom_train/15927913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IMethodInfo findOverridingMethodInType(ITypeInfo overridingType, IMethodInfo overridden) throws ModelException { IMethodInfo[] overridingMethods= SearchUtils.getMethods(overridingType); for (int i= 0; i < overridingMethods.length; i++) { if (isSubsignature(overridingMethods[i], overridden)) { return overridingMethods[i]; } } return null; } COM: <s> finds an overriding method in a type </s>
funcom_train/8656897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (object instanceof QName) { QName qname = (QName)object; if (qname.uri != null) { return uri == qname.uri && localpart == qname.localpart; } else if (uri == null) { return rawname == qname.rawname; } // fall through and return not equal } return false; } // equals(Object):boolean COM: <s> returns true if the two objects are equal </s>
funcom_train/23789067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResponseAPDU selectFID(byte p1, byte p2, String fid) { lt.info("called method selectFID(p1:"+HexString.hexify(p1)+", p2:"+HexString.hexify(p2)+", fid:"+fid+")",this); return selectFID(p1, p2, JSmexTools.parseHexString(fid)); } COM: <s> this method selects a ef df or aid </s>
funcom_train/34341279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCodUsuario() { if (CodUsuario == null) {//GEN-END:|31-getter|0|31-preInit // write pre-init user code here CodUsuario = new TextField("Cod Usuario", null, 5, TextField.ANY);//GEN-LINE:|31-getter|1|31-postInit // write post-init user code here }//GEN-BEGIN:|31-getter|2| return CodUsuario; } COM: <s> returns an initiliazed instance of cod usuario component </s>
funcom_train/32778542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calcConfidenceIntervalHalfWidth() { if (this.getObservations() < 2) return UNDEFINED; double n = getObservations(); double s = getStdDev(); _tDistribution.setDegreesOfFreedom(n - 1); double z = Double.NaN; try { z = _tDistribution.inverseCumulativeProbability( 0.5 + _confidenceLevel/2); } catch (MathException e) { return UNDEFINED; } return z * s / Math.sqrt(n); } COM: <s> internal helper method to determine the confidence interval half width </s>
funcom_train/43850157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Connection getConnFromPool(){ Connection conn = null; try{ Context context = new InitialContext(); DataSource ds = (DataSource)context.lookup(Lookup); conn = ds.getConnection(); }catch(NamingException namingEx){ Log.writeDBMiddleLayerLog(this.getClass()+"从数据池得到连接错误", namingEx); }catch(SQLException ex){ Log.writeDBMiddleLayerLog(this.getClass()+"从数据池得到连接错误", ex); } return conn; } COM: <s> create connection use db connection pool </s>
funcom_train/6290055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void waitForTerminatingTasksIsEnabled() { try { synchronized(enableTerminatingTasksNotifier) { if (enableTerminatingTasks) return; enableTerminatingTasksNotifier.wait(); } waitForTerminatingTasksIsEnabled(); } catch (Exception e) { System.out.println(e.toString()); e.printStackTrace(); } } COM: <s> waits until terminating of tasks is enabled </s>
funcom_train/50849358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getNextGID() { /* * get the next gid */ java.util.StringTokenizer stok; String[] cmdstr = new String[1]; cmdstr[0] = "COE_COMP/OS/bin/OS_get_next_gid"; System.out.println("UAM_EditGroups::getNextGID: " + cmdstr[0] + " "); _OpenCOECmdExec OS_get_group_data = new _OpenCOECmdExec(cmdstr); tmp = OS_get_group_data.getOutput(); return (String) tmp.get(0); } COM: <s> gets the next gid attribute of the uam edit group object </s>
funcom_train/945058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void substituteResource(String oldURI, String newURI) { QuadConnection conn = this.getQuadConnection(); Collection modifiedNeighbors = conn.substituteResource(this.getBaseModel(), null, oldURI, newURI); for (Iterator it = modifiedNeighbors.iterator(); it.hasNext();) { String neighborURI = (String) it.next(); Term neighbor = getTermForURI(neighborURI); neighbor.fireDataChanged(); } } COM: <s> remove all quads containing old uri and replace them with quads </s>
funcom_train/32965553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DocBase createNewDocument(String mediaType, String namespace, AccountUser accountUser) { DocBase doc = getDocTypeFactory().createNewDocument(mediaType, namespace); doc.setAccount(accountUser.getAccount()); doc.setAuthor(accountUser.getUser()); doc.setStatus(Status.NEW.value()); em.persist(doc); return doc; } COM: <s> create a new document of the given media type </s>
funcom_train/19285537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(Admin admin) { boolean[] userperms = table.get( new Integer(admin.getId()) ); if(userperms == null) { /* permissions not already existing, create them */ userperms = new boolean[SurveyStorage.PERMS.length]; } Arrays.fill(userperms, true); table.put( new Integer(admin.getId()), userperms ); permissionsHaveBeenModified=true; } COM: <s> sets all permission values for this survey for a particular user </s>
funcom_train/8145723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean fireBeforeTabSelected(SourcesTabbedEvents sender, int tabIndex) { for (Iterator it = iterator(); it.hasNext();) { TabbedListener listener = (TabbedListener) it.next(); if (!listener.onBeforeTabSelected(sender, tabIndex)) return false; } return true; } COM: <s> fires a before tab selected event to all listeners </s>
funcom_train/33723880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSortable(boolean newValue) { boolean oldValue = this.sortable; if (oldValue == newValue) { return; } this.sortable = newValue; if (isConnected()) { disconnect(); connect(); } this.firePropertyChange("sortable", oldValue, newValue); } COM: <s> sets whether or not this table is sortable </s>
funcom_train/8690874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties getPropertiesFromFile (String fileName) { FileInputStream in = null; Properties props = new Properties(); try { in = new FileInputStream(fileName); props.load(in); } catch (IOException ioe) { ioe.printStackTrace(); } finally { FileUtils.close(in); } return props; } COM: <s> returns properties from a specified properties file </s>
funcom_train/37409837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void textModified(int index) { /*String error=validateField(value, index); if(error != null) { setErrorMessage("Field "+fields[index].label.getText()+" "+ error); this.valid=false; } else{ validateFields(); }*/ validateField(index); } COM: <s> mark a field as having been modified by the user </s>
funcom_train/17846467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeFormatter getNodeFormatter(boolean isWeekNodesEnabled) { if (mNodeFormatter != null) { return mNodeFormatter; } Node parentNode = (Node)getParent(); if (parentNode != null) { return parentNode.getNodeFormatter(); } return isWeekNodesEnabled ? mDefaultDateNodeFormatter : mDefaultNodeFormatter; } COM: <s> gets the node formatter for this node </s>
funcom_train/19826353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int dropIndexOfPoint(Point p) { Point p2 = toDropPoint(p); int max = displayer.getModel().size(); for (int i=0; i < max; i++) { Rectangle r = getTabRect (i, null); if (r.contains(p2)) { return i; } } return -1; } COM: <s> a very basic implementation of drop index of point which simply iterates </s>
funcom_train/35321638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(int index, E element) { rangeCheckForAdd(index); ensureCapacityInternal(size + 1); // Increments modCount!! System.arraycopy(elementData, index, elementData, index + 1, size - index); elementData[index] = element; size++; } COM: <s> inserts the specified element at the specified position in this </s>
funcom_train/12811845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int parseInverseType(Node start_node) throws SaadaException { debugPrint("Inverse"); buffer += "not "; NodeList children = start_node.getChildNodes(); for (int i = 0; i < children.getLength(); ++i) { if (children.item(i).getNodeName().equals("Condition")) { return parseCondition(children.item(i), NO_CONDITION); } } return UT_UNKNOWN; } COM: <s> parse the not keyword </s>
funcom_train/21888556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPane() { if (jTabbedPane == null) { jTabbedPane = new JTabbedPane(); jTabbedPane.add(getbelongstoEditor(), "belongs to classes"); jTabbedPane.add(getsuperEditor(), "super-property of"); jTabbedPane.add(getsubEditor(), "sub-property of"); } return jTabbedPane; } COM: <s> this method initializes j tabbed pane </s>
funcom_train/7507816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertValidHTTPRequestParameterSet(String context, HttpServletRequest request, Set<String> required, Set<String> optional, ValidationErrorList errors) throws IntrusionException { try { assertValidHTTPRequestParameterSet(context, request, required, optional); } catch (ValidationException e) { errors.addError(context, e); } } COM: <s> validation error list variant of assert is valid httprequest parameter set </s>
funcom_train/29616487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int ckw02(int[]handle, double[]begtim, double[]endtim, int[]inst, byte[]ref, byte[]segid, int[]nrec, double[]start, double[]stop, double[]quats, double[]avvs, double[]rates) throws Exception { return(perror(jspice_ckw02(handle, begtim, endtim, inst, ref, segid, nrec, start, stop, quats, avvs, rates))); } COM: <s> write a type 2 segment to a c kernel </s>
funcom_train/13491282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Rule orRule(Fact prerequisite1, Fact prerequisite2, Fact prerequisite3, Fact prerequisite4, Fact conclusion) { Vector body = new Vector(); body.add(fact2prereq(prerequisite1)); body.add(fact2prereq(prerequisite2)); body.add(fact2prereq(prerequisite3)); body.add(fact2prereq(prerequisite4)); return lfactory.createRule(body, conclusion, true); } COM: <s> create a rule with four prerequisites </s>
funcom_train/39403055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldCorneaDistance() { if (jTextFieldCorneaDistance == null) { jTextFieldCorneaDistance = new JTextField(); jTextFieldCorneaDistance.setPreferredSize(new Dimension(text_field_max_width,20)); jTextFieldCorneaDistance.addFocusListener(new FocusStyle()); jTextFieldCorneaDistance.setEnabled(false); jTextFieldCorneaDistance.setToolTipText(getMainFrame().getI18N().translate("Hoornvliesafstand")); jTextFieldCorneaDistance.setHorizontalAlignment(SwingConstants.RIGHT); } return jTextFieldCorneaDistance; } COM: <s> this method initializes j text field segment height </s>
funcom_train/11686361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(SynapseEnvironment se) { // check whether we shall try to lookup an existing data source or create a new custom data source if (dataSourceName != null) { dataSource = lookupDataSource(dataSourceName, jndiProperties); } else if (dataSourceInformation != null) { dataSource = createCustomDataSource(dataSourceInformation); } } COM: <s> initializes the mediator either an existing data source will be looked up </s>
funcom_train/20111919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SakaiSiteService getSiteServiceDelegateForConfigScopeID(String configScopeID) { SakaiServiceContext userContext = new SakaiServiceContextImpl(); userContext.setUserID("sakaiuserID"); userContext.setConfigScopeID(configScopeID); SakaiSiteService delegate = getSiteServiceDelegateForContext(userContext); return delegate; } COM: <s> helper method for instantiating a sakai service context and passing it to </s>
funcom_train/23698733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDomainZoomable(boolean flag) { if (flag) { Plot plot = this.chart.getPlot(); if (plot instanceof Zoomable) { Zoomable z = (Zoomable) plot; this.domainZoomable = flag && (z.isDomainZoomable()); } } else { this.domainZoomable = false; } this.zoomRectangle = null; this.zoomArea = null; repaint(); } COM: <s> sets the flag that controls whether or not zooming is enable for the </s>
funcom_train/10562738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Model getModel(String ontologyURI) { MGraph graph; if (modelExists(ontologyURI)) { graph = tcManager.getMGraph(new UriRef(ontologyURI)); } else { graph = tcManager.createMGraph(new UriRef(ontologyURI)); } JenaGraph jenaGraph = new JenaGraph(graph); Model model = ModelFactory.createModelForGraph(jenaGraph); return model; } COM: <s> gets the ontology specified with code ontology uri code through </s>
funcom_train/24039266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toEditFormatString() { double seconds = time; double dhours = Math.floor(seconds / 3600d); seconds -= 3600d*dhours; double dmins = Math.floor(seconds / 60d); seconds -= 60d*dmins; int hours = (int)dhours; int mins = (int)dmins; return (hours < 10 ? "0" : "") + hours + ":" + (mins < 10 ? "0" : "") + mins + ":" + (Math.round(seconds) < 10 ? "0" : "") + Math.round(seconds); } COM: <s> returns time in db format </s>
funcom_train/18288378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateMidletProperties() { userDefinedProperties.clear(); ManifestPreferenceStore store = (ManifestPreferenceStore) getPreferenceStore(); String[] names = store.preferenceNames(); for (int i = 0; i < names.length; i++) { String propName = names[i]; if (isUserDefinedPropertyKey(propName)) { userDefinedProperties.add(new KeyValuePair( propName, store.getString(propName))); } } if (tableViewer != null) tableViewer.refresh(); } COM: <s> update the user properties from the current </s>
funcom_train/50925957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CMLVector3 createVector3(String name, String value) { EntryTool.checkEmptyName(name); RealArray array = new RealArray(value.split(this.getDelimiter())); CMLVector3 vector3 = new CMLVector3(array.getArray()); if (prefix != null) { vector3.setDictRef(prefix + S_COLON + name.toLowerCase()); } return vector3; } COM: <s> create vector3 from string </s>
funcom_train/9726943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(String s) { if (col == 0) { col += indent.length(); out.print(indent); } if (col + s.length() > maxCol) { println(); out.print(indent); col += indent.length(); } out.print(s); col += s.length(); } COM: <s> print a string </s>
funcom_train/31302109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getClassSubTitle(Object object) { Collection tags = getTaggedValues(object); String subTitle = findTagValue(tags, MMBaseUMLProfile.TAGGED_VALUE_CLASS_SUBTITLE); if (subTitle != null) { subTitle = javaDocToText(subTitle); subTitle = getDocumentationHelper().getXML(subTitle); } return subTitle; } COM: <s> returns the tagged value of title on a class </s>
funcom_train/22030108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RemoteAgentContactImpl getRemoteAgentContact(Object obj) { // System.out.println("NodeAgent.getRemoteAgentContact start Thread"); object = obj; agentThread = new Thread(this); agentThread.start(); try { contact = new RemoteAgentContactImpl(this); return contact; } catch (RemoteException e) { return null; } } COM: <s> create and start thread and return contact </s>
funcom_train/39269432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String date() { Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); int day = calendar.get(Calendar.DAY_OF_MONTH); String month = calendar.getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.getDefault()); int year = calendar.get(Calendar.YEAR); return new StringBuffer().append(month).append(" ").append(day).append(", ").append(year).toString(); } COM: <s> get the current date </s>
funcom_train/8242848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGpsName(String name) { if (name == null || name.equals("")) { gpsName = "-"; } else { gpsName = name; } try { set(0, "GPS: " + gpsName, Image.createImage(this.getClass().getResourceAsStream("/res/gps.png"))); } catch (Exception e) { } } COM: <s> set the name of the gps device </s>
funcom_train/22338905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getSelectedKeyWordsList() { if (this.selectedKeyWordsList == null) { this.selectedKeyWordsList = new JList(); this.selectedKeyWordsList.setModel(new KeyWordListModel(new ArrayList())); this.selectedKeyWordsList.setSize(new Dimension(266, 154)); this.selectedKeyWordsList.setLayoutOrientation(JList.VERTICAL_WRAP); } return this.selectedKeyWordsList; } COM: <s> this method initializes selected key words list </s>
funcom_train/9436845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lookupMailboxType(long accountId, int mailboxType) { android.os.Message msg = android.os.Message.obtain(); msg.what = MSG_LOOKUP_MAILBOX_TYPE; msg.arg1 = mailboxType; msg.obj = Long.valueOf(accountId); sendMessage(msg); } COM: <s> called from any thread to look for a mailbox of a specific type </s>
funcom_train/18098280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getRowIndex( int relY ) { if (this.rowHeights == null) { return -1; } relY -= this.yOffset; relY -= this.contentY; int h = 0; for (int row = 0; row < this.rowHeights.length; row++ ) { int rh = this.rowHeights[row]; if (relY >= h && relY <= h + rh) { return row; } h += rh; } return -1; } COM: <s> retrieves the row index for the given y position </s>
funcom_train/42398372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void overrideObjectReaderNewInstanceMethod(final Type type, final NewConcreteType reader) { while (true) { if (type.isArray()) { this.overrideObjectReaderNewInstanceMethodForArrayType(type, reader); break; } if (false == type.hasNoArgumentsConstructor()) { break; } if (type.isAbstract()) { break; } this.overrideObjectReaderNewInstanceMethodForNonArrayType(type, reader); break; } } COM: <s> overrides the abstract </s>
funcom_train/1483077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long readVLong() throws IOException { byte b = readByte(); long i = b & 0x7F; for (int shift = 7; (b & 0x80) != 0; shift += 7) { b = readByte(); i |= (b & 0x7FL) << shift; } return i; } COM: <s> reads a long stored in variable length format </s>
funcom_train/39274640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBSH(Object bshObj) { String script = getString(bshObj, "text"); String serverKey = (String) getProperty(bshObj, "serverKey"); prevayler.execute(new SetBSHTransaction(script, serverKey)); // remove the dialog box remove(currentDialog); currentDialog = null; // don't have to do anything visually } COM: <s> called from the new bean shell dialogue </s>
funcom_train/46811656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillGeneralFields(Material material) { modelTf.setText(material.getModel()); manufacturerTf.setText(material.getManufacturer()); commentTextArea.setText(material.getComment()); purchaseDatePicker.setDate(material.getPurchaseDate()); activeCb.setSelected(material.isActive()); priceTf.setText(String.valueOf(material.getPurchasePrice())); } COM: <s> fills the gui components with the values of the material caracteristics </s>
funcom_train/34671927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document getXmlDocument() throws SAXException { if (xmlDocument==null) { StringReader in=new StringReader(this.toString()); try { xmlDocument=getDocumentBuilder().parse(new InputSource(in)); } catch(IOException e) { // ignore, we're always reading a StringReader so this'll never happen. } } return xmlDocument; } COM: <s> return the document object representing this xmlstring </s>
funcom_train/7276431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanupBrokenFetchedConnection(RoutedConnection mc) { synchronized (this) { _initializingFetchedConnections.remove(mc); removeInternal(mc); // We've removed a connection, so the need for connections went // up. We may need to launch a fetcher. adjustConnectionFetchers(); } processConnectionHeaders(mc); } COM: <s> cleans up references to the given connection </s>
funcom_train/33606025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ if(p==null||p.length<2){return "()";} String s="("+p[1]; for(int i=2;i<p.length;i++){s+=" "+p[i];} return s+")"; } COM: <s> outputs string representation </s>
funcom_train/27827726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateSorting() { SortableTableHeader header=(SortableTableHeader)m_oimodelInfoTable.getTableHeader(); if (header.getSortedColumn()!=null) m_oimodelInfoTableModel.sortModel(header.getSortedColumn().getModelIndex(),header.getSortAscending()); updateActions(); } COM: <s> updates the sorting of the model </s>
funcom_train/36431173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean writeMessage(String message) { DataBlock dataBlock = new DataBlock(); dataBlock.setEOF(true); ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(message.getBytes()); dataBlock.setBlock(buffer); ChannelFuture future; try { future = Channels.write(dataChannel, dataBlock).await(); } catch (InterruptedException e) { return false; } return future.isSuccess(); } COM: <s> write a simple message like list and wait for it </s>
funcom_train/18513328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAttributeDisplayed(String elementName, String attributeName) { Element element = (Element) elements.get(elementName); if (element != null) { Attribute attribute = (Attribute) element.attributes .get(attributeName); if (attribute != null) { return attribute.getDisplayed(); } } // in all bad cases, ie if the dtd does not give the answer, returns // true return true; } COM: <s> says whether the attribute attribute name of element element name should be </s>
funcom_train/39137870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document getJobDescriptionDocument(InputSource xInputSource) { try { SAXReader xReader = new SAXReader(); Document tmpDoc = xReader.read(xInputSource); return tmpDoc; } catch (DocumentException xEx) { throw new IllegalStateException("Message from JSDLUtility : JSDL is not Valid. \nError: " + xEx.getMessage()); } } COM: <s> to load the jsdl file into the xml docement object via inputsource </s>
funcom_train/45504622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rebuild() { ArrayList<FlowData> newData = new ArrayList<FlowData>(); for( FlowData f : flowDatas ) newData.add( new FlowData( f.startTime, f.endTime, f.inflow, f.waittime, capacity, transitTime, corridorCapacity, exitPositionRelative, f.iteration, f.globalStart, f.globalEnd ) ); flowDatas.clear(); flowDatas = newData; } COM: <s> recomputes the flow data </s>
funcom_train/17201773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder buf = new StringBuilder(""); if (first == null) { buf.append("empty"); } else { LiveSetElement ptr = first; while (ptr != null) { buf.append(ptr.getRegisterOperand()).append(" "); ptr = ptr.getNext(); } } return buf.toString(); } COM: <s> string i fy the current list </s>
funcom_train/18895614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Query buildQuery(String query) throws InvalidQuerySyntaxException { MethodParameterUtil.checkNotEmptyString("query", query); try { return new ItqlInterpreter(new HashMap()).parseQuery(query); } catch (Exception e) { throw new InvalidQuerySyntaxException("Unable to build query from string: "+query, e); } } COM: <s> builds an i tql query in </s>
funcom_train/21508598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDetail(Texture detailmap, Texture alphamap, int tileScale){ if (alphamap == null){ base = new BaseLayer(detailmap); if (tileScale != -1) base.setScale(tileScale); }else{ AlphaDetailLayer adl = new AlphaDetailLayer(detailmap,alphamap); if (tileScale != -1) adl.setScale(tileScale); detail.add(adl); } } COM: <s> adds a detailmap using the specified alphamap for blending </s>
funcom_train/35669713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBaseLinguisticSubsetPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LinguisticSubsetFragment_baseLinguisticSubset_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LinguisticSubsetFragment_baseLinguisticSubset_feature", "_UI_LinguisticSubsetFragment_type"), FragmentsPackage.Literals.LINGUISTIC_SUBSET_FRAGMENT__BASE_LINGUISTIC_SUBSET, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the base linguistic subset feature </s>
funcom_train/37482889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Direction rotateFrameY(Amount<Angle> angle) { final Direction rval; if (angle.approximates(ZERO)) { rval = copy(); } else { final double angRad = angle.doubleValue(SI.RADIAN); final Amount<Dimensionless> c = Amount.valueOf(Math.cos(angRad), Unit.ONE); final Amount<Dimensionless> s = Amount.valueOf(Math.sin(angRad), Unit.ONE); rval = new Direction(c.times(x).minus(s.times(z)).to(Unit.ONE), y, s.times(x).plus(c.times(z)).to(Unit.ONE)); } return rval; } COM: <s> return a new direction object resulting from this objects reference </s>