__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/22548218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanupBrokenFetchedConnection(ManagedConnection 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/21643402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getRobocodeEditorContentPane() { if (robocodeEditorContentPane == null) { robocodeEditorContentPane = new JPanel(); robocodeEditorContentPane.setLayout(new BorderLayout()); robocodeEditorContentPane.add(getDesktopPane(), "Center"); robocodeEditorContentPane.add(getStatusBar(), "South"); } return robocodeEditorContentPane; } COM: <s> return the robocode editor content pane </s>
funcom_train/50940472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copy(Transaction t) { super.copy(t); if ( t instanceof Payment) { Payment p = (Payment)t; this.setFromEntity(p.getToEntity()); } else if ( t instanceof Versement) { Versement v= (Versement)t; this.setFromEntity(v.getFromEntity()); this.getCategoryPair().copy(t.getCategoryPair()); } } COM: <s> not a real copy constructor but a convertor </s>
funcom_train/23467541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHasDataFromTemplatePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Perform_hasDataFromTemplate_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Perform_hasDataFromTemplate_feature", "_UI_Perform_type"), TemplatePackage.Literals.PERFORM__HAS_DATA_FROM_TEMPLATE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the has data from template feature </s>
funcom_train/29716733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getFile(Entity e) { // Make namespace directory f = new File(Settings.getOutputDir() + namespace.replace('.', File.separatorChar)); f.mkdirs(); // Name of our new file f = new File(Settings.getOutputDir() + namespace.replace('.', File.separatorChar) + File.separator + e.getName() + ".java"); } COM: <s> figures out the filename for the current entity and creates </s>
funcom_train/11345724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getHandlerInfo() { Element root = super.getHandlerInfo(); if (m_subscribersDescriptions != null) { for (int i = 0; i < m_subscribersDescriptions.length; i++) { Element description = m_subscribersDescriptions[i]; root.addElement(description); } } return root; } COM: <s> gets the handler info </s>
funcom_train/33986015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDOMTree(){ //create the root element <Books> Element rootEle = dom.createElement("flexulous"); dom.appendChild(rootEle); //No enhanced for Iterator it = targets.iterator(); while(it.hasNext()) { FlexulousTarget t = (FlexulousTarget)it.next(); //For each Target object create <target> element and attach it to root Element targetEle = t.toXML(dom); rootEle.appendChild(targetEle); } } COM: <s> the real workhorse which creates the xml structure </s>
funcom_train/45715959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initAfterUnmarshalling(IBaseOJ parent) { super.initAfterUnmarshalling(parent); if (images == null) { images = new Hashtable(); imagesKeys = new ArrayList(); } for (int i = 0; i < images.size(); i++) { getImageByIndex(i).initAfterUnmarshalling(this); } } COM: <s> hierachically propagates to all individual images </s>
funcom_train/32185712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModal(boolean modal) { if (this.isVisible()) throw new IllegalStateException("You cannot change the modal state of a visible Dialog"); boolean oldModal = this.modal; this.modal = modal; firePropertyChange(this, PROPERTY_MODAL, oldModal, this.modal); } COM: <s> set whether the dialog is modal </s>
funcom_train/40311029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void delayedLoad(int nextReg, int nextValue) { registers[registers[LoadReg].intValue()] .setValue(registers[LoadValueReg].getValue()); registers[LoadReg].setValue(nextReg); registers[LoadValueReg].setValue(nextValue); registers[0].setValue(0); // and always make sure R0 stays zero. } COM: <s> delayed load simulate effects of a delayed load </s>
funcom_train/17002293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int incrementConnectionEdgeCount(Connection connection) { int edgeCount = ((Integer) connectionEdges.get(connection)).intValue(); edgeCount++; connectionEdges.put(connection, new Integer(edgeCount)); System.out.println("Edge count for connection [" + connection + "] = " + edgeCount); return edgeCount; }/* end increment edge count */ COM: <s> increment the edge count associated with a connection edge </s>
funcom_train/25365693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsItemusedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RoomEvent_isItemused_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RoomEvent_isItemused_feature", "_UI_RoomEvent_type"), LeveleditorPackage.Literals.ROOM_EVENT__IS_ITEMUSED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is itemused feature </s>
funcom_train/13346921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calcMem() { currFreeMem = rt.freeMemory(); currTotalMem = rt.totalMemory(); currMemUsed = currTotalMem - currFreeMem; deltaMemUsed = currMemUsed - prevMemUsed; prevFreeMem = currFreeMem; prevTotalMem = currTotalMem; prevMemUsed = currMemUsed; } COM: <s> refreshes this objects data from the runtime </s>
funcom_train/36851439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Assigner create(final Class<?> fromClass, final Class<?> toClass) throws Exception { AssignerGenerator generator = new AssignerGenerator(fromClass, toClass); Class<?> generated = Loader.createClass(generator, "Assigner", fromClass, toClass); return (Assigner) generated.newInstance(); } COM: <s> craetes an instance </s>
funcom_train/32056560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInsert() { System.out.println("testInsert"); DefaultGraphModel dgm = new DefaultGraphModel(); Object[] o = new Object[5]; Map map = null; ConnectionSet cs = new ConnectionSet(); ParentMap pm = new ParentMap(); UndoableEdit[] ue = new UndoableEdit[5]; dgm.insert(o, map, cs, pm, ue); } COM: <s> this function tests insert function of default graph model class </s>
funcom_train/22467991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putInterests(UserId userId, Collection<Interest> interests) { if (cache != null) { try { cache.put(userId, new UserInterests(userId, interests)); } catch (DuineException ex) { log.fatal("Problem while writing in Interest Cache", ex); } } return; } COM: <s> puts the interests in the cache </s>
funcom_train/49651291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getScreenCommand() { if (screenCommand == null) {//GEN-END:|97-getter|0|97-preInit // write pre-init user code here screenCommand = new Command("Screen", Command.SCREEN, 0);//GEN-LINE:|97-getter|1|97-postInit // write post-init user code here }//GEN-BEGIN:|97-getter|2| return screenCommand; } COM: <s> returns an initiliazed instance of screen command component </s>
funcom_train/3153919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testURLFunctionality() { ProductRef prod = new ProductRef(_url); // toString wurde wegen Performancesteigerung bei URL vergleichen verwendet assertEquals(_url.toString(), prod.getURL().toString()); assertEquals("bla.test", prod.getFilePath()); } COM: <s> tests the url functionality </s>
funcom_train/12395426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_getResourceAsStream() { InputStream in = this.getClass().getClassLoader().getResourceAsStream( "tests/api/java/net/test%.properties"); assertNotNull(in); in = this.getClass().getClassLoader().getResourceAsStream( "tests/api/java/net/test%25.properties"); assertNull(in); } COM: <s> regression test for harmony 2255 </s>
funcom_train/25472084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CaptMsg register(CaptMsg msg) { if (!msg.password.equals("null")) { if (transcribers.add(msg.name, msg.password)) { System.out.println("Registered transcriber: " + msg.name); msg = CaptMsg.success(); } else { msg = CaptMsg.failure(CaptMsg.USER_ALREADY_EXISTS); } } else { msg = CaptMsg.failure(CaptMsg.BLANK_PASSWORD); } return msg; } COM: <s> register a transcriber </s>
funcom_train/39109934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void set(int x, int y) throws ArrayIndexOutOfBoundsException { if (x >= dim[0] || y >= dim[1]) { throw new ArrayIndexOutOfBoundsException("("+x+','+y+')'); } else { matrix.put(makeKey(x,y), new int [] { x, y }); } } COM: <s> sets the element x y </s>
funcom_train/29572867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRgroupQuery2_occR1_1_occR2_1() throws Exception { String modifiedQuery=RGROUP_QUERY_2.replace( "M LOG 1 1 0 0 0,1", "M LOG 1 1 0 0 1"); modifiedQuery=modifiedQuery.replace( "M LOG 1 2 0 0 0,1", "M LOG 1 2 0 0 1"); performQuery(modifiedQuery, "N", 38); } COM: <s> test r group query 2 wih modified occurrences </s>
funcom_train/22523353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createCmbLicense() { GridData gridData4 = new GridData(); gridData4.horizontalAlignment = GridData.FILL; // Generated gridData4.horizontalSpan = 2; // Generated gridData4.verticalAlignment = GridData.CENTER; // Generated cmbLicense = new Combo(this, SWT.BORDER); cmbLicense.setText("< select license >"); // Generated cmbLicense.setLayoutData(gridData4); // Generated } COM: <s> this method initializes cmb license </s>
funcom_train/50465102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initTree(final Window blockingWindow, final boolean launchStartupApps) { AppStoreFetchWorker worker = new AppStoreFetchWorker(blockingWindow, tree); worker.addBusyWorkerListener(new BusyWorkerAdapter() { @Override public void workerFinished(BusyWorker worker) { if(launchStartupApps) launchStartup(); } }); worker.invokeLater(); } COM: <s> initialize the applications in the tree </s>
funcom_train/7759865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveConnections(Preferences prefs) { List<String> conns = new ArrayList<String>(connections.size()); for (int i = 0; i < connections.size(); i++) { conns.add(getConnectionAsString(connections.get(i))); } putStringList(prefs, KEY_CONNECTIONS, conns); } COM: <s> save all connection params to nb preferences </s>
funcom_train/18052111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getSvFileCloseMenuItem() { if (svFileCloseMenuItem == null) { svFileCloseMenuItem = new JMenuItem(); svFileCloseMenuItem.setText("Close"); svFileCloseMenuItem .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { closeAction(); } }); } return svFileCloseMenuItem; } COM: <s> this method initializes svfile close menu item </s>
funcom_train/44869007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMVariableJSliderBean getTslider() { if (tslider == null) { tslider = new WCMVariableJSliderBean(); tslider.setBackground(new Color(238, 238, 238)); tslider.setMin(getLcp().getTMinValue()); tslider.setMax(getLcp().getTMaxValue()); tslider.setPaintLabels(true); tslider.setIntervalsValue(getLcp().getTIntervalsValue()); } return tslider; } COM: <s> this method initializes tslider </s>
funcom_train/19351769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createOntology(URI id, URI physicalURI) throws OWLException { logger.fine("connection " + connection); owlDataFactory = connection.getDataFactory(); if (id == null) id = URI.create("urn:defaultOntologyUri"); owlOntology = owlDataFactory.getOWLOntology(id, physicalURI); changeVisitor = connection.getChangeVisitor(owlOntology); } COM: <s> creates an ontology identified by code id code together </s>
funcom_train/24316167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadProperties(InputStream is) { if (is != null) { try { properties = new Properties(); properties.load(is); is.close(); } catch (Exception ex) { ex.printStackTrace(); if (logChannel != null) logChannel.write(Logger.ERROR, "Can't load properties from InputStream!!! "); } } else loadProperties(); } COM: <s> loading properties from input stream </s>
funcom_train/44704850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setVersion(final String version) { Assert.exists(version, String.class); if (PENDING.equals(version)) { s_log.warn("Caller tried to set the bundle's version " + "tag to pending; instead setting it to live"); super.setVersion(LIVE); } else { super.setVersion(version); } } COM: <s> set the version tag of the content bundle and its primary </s>
funcom_train/20644063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WorkSheet getWorkSheetAtIndex(int index) { WorkSheet ws = null; OptionCase option = getOptionCase(); if (option != null) { String key = option.getKeyForPos(index); if (key != null) { ws = getWorkSheetAt(key); } } return ws; } COM: <s> method used by the graphic version of the dispatcher to </s>
funcom_train/18229823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Enumeration searchClass(Node n, Class clazz) { if (clazz != null) { n = classToNode(n, clazz); } if (n == null) { // not for us return org.openide.util.Enumerations.empty(); } else { return nodeToEnum(n); } } COM: <s> search for a requested class </s>
funcom_train/50152758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static private void recordSize(Component c, PrefName pn) { String s = Prefs.getPref(pn); ViewSize vs = ViewSize.fromString(s); vs.setX(c.getBounds().x); vs.setY(c.getBounds().y); vs.setWidth(c.getBounds().width); vs.setHeight(c.getBounds().height); JFrame v = (JFrame) c; vs.setMaximized(v.getExtendedState() == Frame.MAXIMIZED_BOTH); Prefs.putPref(pn, vs.toString()); } COM: <s> store the window size position and maximized status in a preference </s>
funcom_train/49938411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void signParameters(final Map<String, String> pParameters, final String pSecret) { if (pParameters == null) { throw new IllegalArgumentException("Can't sign: no parameters"); } if (pSecret == null) { throw new IllegalArgumentException("Can't sign: invalid secret"); } pParameters.put("sig", signature(pParameters, pSecret)); // Add signature } COM: <s> p sign a set of parameters </s>
funcom_train/2579997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRangeAxis(ValueAxis axis) { if (axis != null) { axis.setPlot(this); axis.addChangeListener(this); } // plot is likely registered as a listener with the existing axis... if (this.rangeAxis != null) { this.rangeAxis.removeChangeListener(this); } this.rangeAxis = axis; fireChangeEvent(); } COM: <s> sets the range axis for the plot </s>
funcom_train/48024197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONArray put(int index, Object value) throws JSONException { JSONObject.testValidity(value); if (index < 0) { throw new JSONException("JSONArray[" + index + "] not found."); } if (index < length()) { myArrayList.setElementAt(value, index); } else { while (index != length()) { put(JSONObject.NULL); } put(value); } return this; } COM: <s> put or replace an object value in the jsonarray </s>
funcom_train/21042093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getSize() { double size = 0; size = (4 * 5) + (strIndentAdd.length() * 2) + (strIndentLang.length() * 2) + (strIndentOnto.length() * 2) + (strIndentProto.length() * 2) + (leaseTime.length() * 2); return size; } COM: <s> to claculate the size of data that cacn be stored in to cache </s>
funcom_train/8064936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getPortFigs() { ArrayList portFigs = new ArrayList(); int figCount = getFigCount(); for (int figIndex = 0; figIndex < figCount; ++figIndex) { Fig f = getFigAt(figIndex); if (isPortFig(f)) { portFigs.add(f); } } return portFigs; } COM: <s> get all the figs that have some port as their owner </s>
funcom_train/43913990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean allSameType(FeatureTypeInfo[] infos) { boolean sameType = true; if (infos.length == 0) { return false; } FeatureTypeInfo first = infos[0]; for (int i = 0; i < infos.length; i++) { FeatureTypeInfo ftInfo = infos[i]; if (!first.getNameSpace().equals(ftInfo.getNameSpace())) { return false; } } return sameType; } COM: <s> checks that the collection of feature type names all have the same prefix </s>
funcom_train/5019759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTaskDetails(String taskUUID) { TransientTask newTask = (TransientTask) getVisitState().getSessionDS().getTransientElement(taskUUID); if (newTask != null) { newTask.resetFormFields(); newTask.validate(getValidationDelegate()); setTask(newTask); } } COM: <s> refresh the task details </s>
funcom_train/24111763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isCompatible() { final String compString = ticketHandler.executeScript( "isCompatibleTicket(" + TicketHandler.TICKET_ID_PLACEHOLDER + ")", 10000); //$NON-NLS-1$ //$NON-NLS-2$ return Boolean.parseBoolean(compString); } COM: <s> returns whether or not the google maps widget is compatible to this </s>
funcom_train/24117573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRow(Object[] row) { int len = row.length; ArrayList<Object> data = new ArrayList<Object>(len); ArrayList<Boolean> state = new ArrayList<Boolean>(len); for (int i = 0; i < len; i++) { data.add(row[i]); state.add(tableColumnState.get(i)); } tableData.add(data); tableState.add(state); this.fireTableRowsInserted(tableData.size() - 1, tableData.size() - 1); } COM: <s> add a new row to the end of the data model </s>
funcom_train/37764612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getYearlyOn() { Recurrence r = ((TaskMaintenanceComponent) getComponent()).getRecurrence(); Recurrence.Month yearlyOn = r != null && r instanceof Recurrence.Yearly ? ((Recurrence.Yearly) r).getOn() : null; return yearlyOn != null ? yearlyOn.toString() : null; } COM: <s> getter for property yearly on </s>
funcom_train/34422856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void provide(ResultSet rs, int iFld) { ResultSetMetaData rsmd; try { rsmd = rs.getMetaData(); String fn = rsmd.getColumnName(iFld); for (Binding binding : binder) { if (fn.equals(binding.getField())) { provide(rs, rsmd, binding, iFld); } } } catch (SQLException e) { for (Binding b : binder) { b.warn(e); } } } COM: <s> this provide method supplies data from a field to its bound views </s>
funcom_train/24211081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFlowControl(int flowControlPosition) { this.flowControlPosition = flowControlPosition; switch (flowControlPosition) { case 0: case 1: case 2: this.flowControlValue = flowControlPosition; break; case 3: this.flowControlValue = 4; break; case 4: this.flowControlValue = 8; break; } } // public void setFlowControl(int flowControlPosition) COM: <s> setzen der position der jcombo box jcbflow control </s>
funcom_train/50043385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sortRows() { Comparator<Row> c = new Comparator<Row>() { public int compare(GCTDatasetParser.Row arg0, GCTDatasetParser.Row arg1) { return arg0.start - arg1.start; } }; for (List<Row> rows : rowMap.values()) { Collections.sort(rows, c); } } COM: <s> sort all row collections by ascending start location </s>
funcom_train/41070944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAuthorLabelFontSize(int authorLabelFontSize) throws java.beans.PropertyVetoException { int oldAuthorLabelFontSize = this.authorLabelFontSize; vetoableChangeSupport.fireVetoableChange(PROP_AUTHORLABELFONTSIZE, oldAuthorLabelFontSize, authorLabelFontSize); this.authorLabelFontSize = authorLabelFontSize; propertyChangeSupport.firePropertyChange(PROP_AUTHORLABELFONTSIZE, oldAuthorLabelFontSize, authorLabelFontSize); } COM: <s> set the value of author label font size </s>
funcom_train/6282679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHandler(ElvisHandler handler) { if ( !this.isTheOneTrueElvis() ) { throw new ElvisException ( "We are not the One True Elvis" ); } if ( this.hasLeftTheBuilding() ) { throw new ElvisException ( "Elvis has left the building" ); } setHandlerInternal ( handler ); } COM: <s> set the handler for this elvis </s>
funcom_train/24927166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getPrintServiceNameCommand(String uuid, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); String jobId = request.getParameter(ParameterKeys.PRINT_JOB_ID); PrintWriter writer = response.getWriter(); IRemotePrintJobManager manager = RemotePrintJobManagerFactory.getRemotePrintJobManager(); RemotePrintJob printJob = manager.getRemotePrintJob(Long.parseLong(jobId)); writer.print(printJob.getPrintServiceName()); } COM: <s> returns the name of the print service name </s>
funcom_train/35516710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test10DaysFromDate() { GregorianCalendar c = new GregorianCalendar(2005, Calendar.MAY, 2, 4, 10, 59); GregorianCalendar c2 = new GregorianCalendar(2005, Calendar.MAY, 12, 4, 10, 59); assertTrue(c2.getTime().equals(BaseCalendar.addDays(c.getTime(),10))); } COM: <s> tests the function of advancing dates or retroceding days on the calendar </s>
funcom_train/10873816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copy(CharsRef other) { if (chars == null) { chars = new char[other.length]; } else { chars = ArrayUtil.grow(chars, other.length); } System.arraycopy(other.chars, other.offset, chars, 0, other.length); length = other.length; offset = 0; } COM: <s> copies the given </s>
funcom_train/443227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedStrings(String[] strings) { int num_selected_strings = 0; for (int i = strings.length - 1; i >= 0; i--) { int index = _string_list.indexOf(strings[i]); if (index >= 0) { _string_list.remove(index); _string_list.addFirst(strings[i]); num_selected_strings++; } } _first_deselected_index = num_selected_strings; fireTableRowsUpdated(0, getRowCount() - 1); } COM: <s> mark a set of strings as selected </s>
funcom_train/15408507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isIncludeBean(String prefix, BeanPropertyAssocOne<?> prop) { if (queryDetail.includes(prefix)) { // explicitly included summary.append(", ").append(prefix); String[] splitNames = SplitName.split(prefix); queryDetail.includeBeanJoin(splitNames[0], splitNames[1]); return true; } return false; } COM: <s> test to see if we are including this node into the query </s>
funcom_train/19836063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int _playSoundPool(int soundId) { int streamId = mSoundPool.play( soundId, 1, //leftVolume 1, //rightVolume 0, //priority (0==lowest), 0, //loop (0=no loop, 1=twice, -1=forever) 1); //playback rate (1=normal) return streamId; } COM: <s> wrapper aroundm sound pool </s>
funcom_train/12565393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteWhereNoneAdded() { if (deleteThem.size() == 0) return; TreeSet<String> additionallyProcess = new TreeSet<String>(); Iterator<String> iter = deleteThem.iterator(); String item; String archive; int p; while (iter.hasNext()) { item = iter.next(); p = item.indexOf('!'); if (p > 0) { archive = item.substring(0, p); additionallyProcess.add(archive); } } iter = additionallyProcess.iterator(); while (iter.hasNext()) { archive = iter.next(); updateArchive(new File(applicationDirectory, archive)); } } COM: <s> delete items from archives where no new files were added </s>
funcom_train/36189698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load() { try { m_clazz = m_factory.loadClass(m_className); } catch (ClassNotFoundException e) { m_factory.getLogger().log( PSSLogger.ERROR, "[" + m_name + "] Class not found during the loading phase : " + e.getMessage()); stop(); return; } } COM: <s> loads the manipulated class </s>
funcom_train/25099370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWirePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LogicalBus_wire_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LogicalBus_wire_feature", "_UI_LogicalBus_type"), HardwaremodelingPackage.Literals.LOGICAL_BUS__WIRE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the wire feature </s>
funcom_train/18480686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void transientStateChanged() { for(Controller<?,?> child: getChildren()) { if (child instanceof MatGroup.Ctrl<?,?>) { MatGroup.Ctrl<?,?> glmat = (MatGroup.Ctrl<?,?>)child ; glmat.getView().setTempAppearance(lowRes() ? temp_app : null) ; } } } COM: <s> called when an aspect of the transient editting state has changed </s>
funcom_train/3496471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean wouldCreateHierarchyLoop(IHasHierarchy parent, IHasHierarchy child) { IHasHierarchy currentAncestor = getParent(parent); do{ if (currentAncestor == child) return true; // if parent is orphan if (null == currentAncestor) return false; // else - go up one level currentAncestor = getParent(currentAncestor); } while (null != currentAncestor); return false; } COM: <s> check whether passed code child code appears on the </s>
funcom_train/41165862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoParagraphTeacher3 entity) { EntityManagerHelper.log("saving CoParagraphTeacher3 instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co paragraph teacher3 </s>
funcom_train/36060635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long createEtract(String name, String description, float extract, float color, boolean liquid) { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_NAME, name); initialValues.put(KEY_DESCRIPTION, description); initialValues.put(KEY_EXTRACT, extract); initialValues.put(KEY_COLOR, color); initialValues.put(KEY_LIQUID, liquid); return mDb.insert(EXTRACT_TABLE, null, initialValues); } COM: <s> create a new extract </s>
funcom_train/39407535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelPassword() { if (jPanelPassword == null) { jPanelPassword = new JPanel(); FlowLayout fl = new FlowLayout(); fl.setAlignment(FlowLayout.LEFT); jPanelPassword.setLayout(fl); jPanelPassword.add(getJButtonChangePassword(), null); jPanelPassword.add(getJCheckBoxCheckPassword(), null); } return jPanelPassword; } COM: <s> this method initializes j panel password </s>
funcom_train/43667172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getReportMenu() { if (reportMenu == null) { reportMenu = new JMenu("Report"); reportMenu.setFont(new Font(Constants.FONT, Constants.FONT_STYLE_TOOL, 12)); reportMenu.setMnemonic(KeyEvent.VK_R); reportMenu.add(getAdherenceRateItem()); reportMenu.add(getGraphicItem()); reportMenu.add(getQuestionsItem()); reportMenu.add(getRecommendationsItem()); } return reportMenu; } COM: <s> this method initializes report menu </s>
funcom_train/18265688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Location findRandom(Location exclude, Conditional condition) { Iterator it = safeRandomIterator(); while (it.hasNext()) { Object agent = it.next(); if (condition.meetsCondition(agent) && ((Location) agent).getCoordinate() != exclude.getCoordinate()) { return (Location) agent; } } return null; } COM: <s> returns an agent randomly that matches a condition excluding the </s>
funcom_train/9805698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNode(Object node, boolean removeAllEdges) { // Simply remove the node from each of the edgeMaps super.removeNode(node, removeAllEdges); // Attempt to remove the node from the top level port // It doesn't matter if it isn't a top level port _topLevelPortNodes.remove(node); } COM: <s> removes the given node object from the graph </s>
funcom_train/41452639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processSipApplicationSessionReplication() { // Replicate the session. if (log.isDebugEnabled()) { log .debug("processSipApplicationSessionReplication(): session is dirty. Will increment " + "version from: " + getVersion() + " and replicate."); } version.incrementAndGet(); O outgoingData = getOutgoingSipApplicationSessionData(); distributedCacheManager.storeSipApplicationSessionData(outgoingData); sessionAttributesDirty = false; sessionMetadataDirty = false; isNew = false; metadata.setNew(isNew); lastReplicated = System.currentTimeMillis(); } COM: <s> increment our version and propagate ourself to the distributed cache </s>
funcom_train/44158252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Class getRmiEnrichedInterface(Class serviceInterface) { /** * Get the context class loader from current thread. */ ClassLoader cl = Thread.currentThread().getContextClassLoader(); /** * Add rmi needs to interface. */ InterfaceEnricher interfaceIndirector = new InterfaceEnricher(); EnrichmentDecorator interfaceDecorator; if (isExceptionTranslationEnabled()) { interfaceDecorator = new SoapRmiEnrichmentDecorator(); } else { interfaceDecorator = new RmiEnrichmentDecorator(); } Class serviceInterfaceRmi = interfaceIndirector .createShadowInterfaceAndLoadItDirectly( serviceInterface, interfaceDecorator, cl); return serviceInterfaceRmi; } COM: <s> this method is used to enrich the given interface that the new interface </s>
funcom_train/22234182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getShortInt() throws ParsingErrorException { int i = 0; try { i = read(); i = (i << 8) | read(); // Sign extension if ((i & 0x8000) != 0) i |= 0xffff0000; } catch (IOException e) { debugOutputLn(EXCEPTION, "getShortInt: " + e); throw new ParsingErrorException(e.getMessage()); } return i; } // End of getShortInt COM: <s> reads two bytes from the file and returns their integer value </s>
funcom_train/33393028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isManyToOne() { StackTraceElement[] trace = Thread.currentThread().getStackTrace(); if (trace.length >= 7) { for (int i = 5; i <= 7; i++) { if (trace[i].getMethodName().equals("bindManyToOne")) { return true; } } } return false; } COM: <s> many to one </s>
funcom_train/20904784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSpinner getSpinParameterIndex() { if (spinParameterIndex == null) { spinParameterIndex = new JSpinner(new SpinnerNumberModel(1,1,UplParameterValue.PARAMET_COUNT,1)); spinParameterIndex.addChangeListener(new ChangeListener(){ public void stateChanged(ChangeEvent e) { getRdFromParameter().doClick(); } }); } return spinParameterIndex; } COM: <s> this method initializes spin parameter index </s>
funcom_train/32051856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOutput(String outputFile) { output = new File(getProject().getBaseDir(), outputFile); if (output.exists() && output.isFile() && !output.delete()) { throw new BuildException("Could not delete file '" + output + "'."); } } COM: <s> sets the output file to write results to </s>
funcom_train/34523286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == this) { return true; } else if (obj instanceof TimePeriod) { TimePeriod that = (TimePeriod)obj; return startTime.equals(that.getStartTime()) && endTime.equals(that.getStartTime()); } else { return false; } } COM: <s> compares this object against the specified object </s>
funcom_train/20827814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDevouts(Vector<Person> devouts) { devoutIDs = new int[devouts.size()]; Iterator<Person> dit = devouts.iterator(); int i = 0; while (dit.hasNext()) { devoutIDs[i] = dit.next().getID(); i++; } System.out .println(" ------------------------------------DEVOUTS SET"); } COM: <s> called whenever this players devouts has changed </s>
funcom_train/22360620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Unique o1, Unique o2) { if (o1.getID().getClass() != o2.getID().getClass()) throw new AssertionError("comparing different ID types"); int result = o1.getID().compareTo(o2.getID()); if (inverse) return -result; else return result; } COM: <s> compares its two arguments for order according to their ids </s>
funcom_train/2466848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openGroup() { Object selectedValue = this.contactList.getSelectedValue(); if (selectedValue instanceof MetaContactGroup) { MetaContactGroup group = (MetaContactGroup) selectedValue; ContactListModel model = (ContactListModel) contactList.getModel(); if (model.isGroupClosed(group)) { model.openGroup(group); } } } COM: <s> opens a group when its closed </s>
funcom_train/32374899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LocalVerticalManager getVerticalManager(){ LocalVerticalManager localVerticalMgr = null; try{ LocalVerticalManagerHome localVerticalMgrHome = (LocalVerticalManagerHome) serviceLocator.getEJBLocalHome(JNDINames.VERTICAL_MANAGER); localVerticalMgr = (LocalVerticalManager) localVerticalMgrHome.create(); } catch(NamingException ne){ logger.error("NamingException"+ne.getMessage()); } catch(CreateException ce){ logger.error("Could not create LocalRelationshipManager"+ce.getMessage()); } return localVerticalMgr; } COM: <s> method return a local vertical manager </s>
funcom_train/50527528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL resolveLiveModuleRoot(URL url, String path) throws Exception { if (path.startsWith("/")) { path = path.substring(1); } File moduleRoot = getLiveJarInfo().getLiveModuleRoot(url, path); if (moduleRoot != null) { return moduleRoot.toURI().toURL(); } return null; } COM: <s> resolves the module base </s>
funcom_train/175108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int hashCode = 1; Object[] elements = getArray(); int len = elements.length; for (int i = 0; i < len; ++i) { Object obj = elements[i]; hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode()); } return hashCode; } COM: <s> returns the hash code value for this list </s>
funcom_train/42225926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getShowListCommand() { if (showListCommand == null) {//GEN-END:|35-getter|0|35-preInit // write pre-init user code here showListCommand = new Command("Ir", Command.OK, 0);//GEN-LINE:|35-getter|1|35-postInit // write post-init user code here }//GEN-BEGIN:|35-getter|2| return showListCommand; } COM: <s> returns an initiliazed instance of show list command component </s>
funcom_train/11386225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SecretKey retrieveTokenSecret(String jobId) throws InvalidToken { SecretKey tokenSecret = null; synchronized (currentJobTokens) { tokenSecret = currentJobTokens.get(jobId); } if (tokenSecret == null) { throw new InvalidToken("Can't find job token for job " + jobId + " !!"); } return tokenSecret; } COM: <s> look up the token password secret for the given job id </s>
funcom_train/47138382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int insert(final JournalEntry entry) { Object[] params = new Object[] { new Long(entry.getId()), entry.getUsername(), entry.getCategory(), entry.getText(), entry.getCreated() }; return update(params); } COM: <s> insert journal entry into database </s>
funcom_train/41766640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStyle(Style style) { if (this.style != null) { this.style.removeStyleListener(this); } this.style = style; this.style.addStyleListener(this); if (this.style.getBgPainter() == null) { this.style.setBgPainter(new BGPainter()); } setShouldCalcPreferredSize(true); checkAnimation(); } COM: <s> changes the component style by replacing the component style with the given style </s>
funcom_train/21662779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void repairConnection(Connection conn) throws ConnectionPoolException { try { conn.getMetaData(); } catch (Exception ex) { if (!(conn instanceof PooledConnection)) { throw new ConnectionPoolException("The connection was not create by this pool, we can't repair it."); } // Perform reconnect on PooledConnection. ((PooledConnection)conn).reconnect(); } } COM: <s> if the given connection is broken well try to repair it </s>
funcom_train/30005956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getInfoArea() { if (infoArea == null) { infoArea = new JTextArea(); infoArea.setOpaque(false); infoArea.setEditable(false); infoArea.setLineWrap(true); infoArea.setWrapStyleWord(true); } return infoArea; } COM: <s> gets the info area </s>
funcom_train/25028642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyAutoIndent() { // TODO: commenting out for now as visual indentation not currently // working with WrappedPlainView, and calls to paragraph attributes // causing crash on loading and extremely long loading times // when mixed with syntax highlighting // if (autoIndent) { // setIndentTabs(getTabSize()); // setNoTabs(); // } else { // setDefaultTabs(getTabSize()); // } } COM: <s> visually indents the tabs and word wrapped lines </s>
funcom_train/8742554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MapLayer getMapLayerByUriAndLayer(PortalSession portalSession, String uri, String layer) { MapLayer found = null; int i = 0; while (found == null && i < portalSession.getMapLayers().size()) { MapLayer search = portalSession.getMapLayers().get(i); found = search.findByUriAndLayer(uri, layer); i++; } return found; } COM: <s> get a map layer by uri and layer </s>
funcom_train/7674596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void visit(Insn insn) { RegisterSpec result = insn.getResult(); if (result != null) { processReg(result); } RegisterSpecList sources = insn.getSources(); int sz = sources.size(); for (int i = 0; i < sz; i++) { processReg(sources.get(i)); } } COM: <s> helper for all the code visit code methods </s>
funcom_train/38595534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContentValid( final boolean is_valid ) { if ( !SwingUtilities.isEventDispatchThread() ) { SwingUtilities.invokeLater( new Runnable() { @Override public void run() { setContentValid( is_valid ); } } ); return; } getRootPane().setDefaultButton( is_valid ? ok_button : null ); ok_button.setEnabled( is_valid ); } COM: <s> should be called when the contents of the dialog become valid or invalid </s>
funcom_train/23716444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color color() { switch (this) { case FATAL: { Color c = UIManager.getColor("nb.errorForeground"); //NOI18N if (c == null) { c = Color.RED.darker(); } return c; } case WARNING: return Color.BLUE.darker(); case INFO: return UIManager.getColor("textText"); default: throw new AssertionError(); } } COM: <s> get a suitable color for displaying problem text </s>
funcom_train/46885128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCompare() { Long one = new Long(1); Long five = new Long(2); Comparator c = new ComparableComparator(); assertTrue(c.compare(one, five) < 0); assertTrue(c.compare(five, one) > 0); assertTrue(c.compare(one, one) == 0); } COM: <s> test the compare method </s>
funcom_train/4237288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPrecio() { System.out.println("getPrecio"); Platillo instance = new Platillo(1, "Sopa", 22.00, "Pastas"); instance.setPrecio(22.00); double expResult = 22.0; double result = instance.getPrecio(); assertEquals(expResult, result); } COM: <s> test of get precio method of class data </s>
funcom_train/42524989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T createExpandBar() { final T newBuilder = copy(); final int style = computeStyle(defaultStyles.getExpandBarStyle()); newBuilder.composite = initializeComposite(new ExpandBar(composite, style), false); newBuilder.initNew(); return newBuilder; } COM: <s> creates an expand bar control </s>
funcom_train/5402755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsKey(String key) { for (Iterator iter = bundles.keySet().iterator(); iter.hasNext();) { Locale locale = (Locale) iter.next(); BundleEntry entry = getBundleEntry(locale, key); if (entry != null) { return (true); } } return (false); } COM: <s> returns true if the supplied key is already existing in this group </s>
funcom_train/1295806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T getAssigns(EObject theEObject) { AssignAction assignAction = new AssignAction(); assignList = new ArrayList<Assign>(); assignAction.setAssignList(assignList); addSwitchAction(assignAction); T t = doSwitch(theEObject.eClass(), theEObject); // reset assign action, so that subsequent doSwitch calls // do not execute it without explicitly setting it // assignAction = null; actionList.clear(); return t; } COM: <s> returns all assigns contained inside that process </s>
funcom_train/31208309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws SQLException { try { if(Trace.isEnabled()) Trace.trace(getId()); if(!closed) { try { conn.rollback(); } catch(SQLException e) { // not valid - ok ignore } closed=true; conn.close(); } } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> closes this connection </s>
funcom_train/2293034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEditorDisplayOptions(CmsEditorDisplayOptions clazz) { m_editorDisplayOptions = clazz; if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key( Messages.INIT_EDITOR_DISPLAY_OPTS_1, m_editorAction.getClass().getName())); } } COM: <s> sets the editor display option class </s>
funcom_train/24080299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Alternatives readAllAlternatives(final List<org.decisiondeck.xmcda_2_0_0.Alternatives> altsList) { final Alternatives allAlternatives = new Alternatives(); for (final org.decisiondeck.xmcda_2_0_0.Alternatives alts : altsList) { final Set<Alternative> outAlternatives = readAlternatives(alts); allAlternatives.addAll(outAlternatives); } return allAlternatives; } COM: <s> returns all the alternatives it finds in the given xml tag </s>
funcom_train/20999028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int checkLogin(){ int loginStatus; csControl = new ClientServerControl(); csControl.connect(); loginStatus = csControl.checkLogin(request.getParameter("user"), request.getParameter("pword")); HttpSession session = request.getSession(); session.setMaxInactiveInterval(720);//Turning of session after 20 min. of inactivity session.setAttribute("Login", loginStatus);//0=ok, 51 = couldnt login return loginStatus; } COM: <s> starts login procedures </s>
funcom_train/18888092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void selectNameSpace(String en){ if (en == null) throw new IllegalArgumentException("namespace name can't be null"); iter_type = NAME_SPACE; ft = true; size = vn.getTokenCount(); name = en; if (!en.equals("*")) name2="xmlns:"+en; if (fib==null) fib = new FastIntBuffer(4); else fib.clear(); } COM: <s> select the name space nodes as defined in xpath </s>
funcom_train/9143541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void build(ArrayList<String[]> list, int deep, MethodNode method) { if (deep == 0) return; Set<MethodNode> methods = method.getCallerMethods(); for (MethodNode methodBL : methods) { String[] pair = new String[2]; pair[0] = method.getName(); pair[1] = methodBL.getName(); list.add(pair); build(list,deep-1,methodBL); } } COM: <s> build the trace of a method </s>