__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/31702206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Line2D createMeasureLine(int graphPos, double dX1, double dY1, double dX2, double dY2) { return new Line2D(new double[]{dX1, dX2}, new double[]{dY1, dY2}, Line2D.SOLID, 0.5f, Color.blue.darker().darker(), Point2D.NONE); } COM: <s> creates a line for user distance measuring </s>
funcom_train/12590763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getInstance(String s, String constructorParamDelimiter, String methodParamDelimiter) throws NoSuchMethodException, java.lang.reflect.InvocationTargetException, ClassNotFoundException, InstantiationException, IllegalAccessException { return this.getInstance(s, constructorParamDelimiter, methodParamDelimiter, null,"\"'"); } COM: <s> same as get instance but you can influence the parsing of the string </s>
funcom_train/44431618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getItemCount(Channel channel) { if (activated) throw new IllegalStateException("can't count Items while activated"); int result = 0; synchronized (builder) { try { builder.beginTransaction(); builder.reload(channel); result = channel.getItems().size(); builder.endTransaction(); } catch (ChannelBuilderException e) { e.printStackTrace(); builder.resetTransaction(); } } return result; } COM: <s> return number of items currently in specified channel </s>
funcom_train/38217210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int buildSrcAddress(byte[] b, int offset, IPHeader ipHeader) { byte[] data = new byte[4]; System.arraycopy(b, offset, data, 0, 4); try { Inet4Address src = (Inet4Address) Inet4Address.getByAddress(data); ipHeader.setSrcAddress(src); } catch (UnknownHostException e) { log.warn( "unknown host exception occured during transformation of " + Byter.getHexString(data) + "h to inet address", e); } return offset + 4; } COM: <s> helper method for src address field </s>
funcom_train/3924335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NGObject next() { if ( keyword == null ) throw new NullPointerException( "Null keyword" ); Keyword ret = new Keyword(); ret.setFields( this ); ret.db_id = this.db_id; ret.keyword = this.keyword + "\0"; //Logger.logDebug( "Current keyword "+this+", next keyword "+ret ); return ret; } COM: <s> returns this keyword 0 intended use in sorted set </s>
funcom_train/4917561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNameAwareWorkFactory() throws Exception { // Mock final String WORK_NAME = "WORK"; final NameAwareWorkFactory<?> workFactory = this .createMock(NameAwareWorkFactory.class); // Record providing bound work name workFactory.setBoundWorkName(WORK_NAME); // Test this.replayMockObjects(); this.constructWork(WORK_NAME, workFactory); OfficeFloor officeFloor = this.constructOfficeFloor(); officeFloor.openOfficeFloor(); // Verify functionality this.verifyMockObjects(); } COM: <s> ensure name aware functionality is provided for the </s>
funcom_train/39201302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResourceReference getDojoResourceReference() { if (Application.get().getMetaData(USE_CUSTOM_DOJO_DIST) == null || !(Application.get().getMetaData(USE_CUSTOM_DOJO_DIST) instanceof CompressedResourceReference)){ if (USE_DOJO_UNCOMPRESSED){ return DOJO_UNCOMPRESSED; }else{ return DOJO; } }else{ return (CompressedResourceReference)Application.get().getMetaData(USE_CUSTOM_DOJO_DIST); } } COM: <s> get the reference to the dojo scripts </s>
funcom_train/20535139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getMatricula() { if (Matricula == null) { Matricula = new JButton(); Matricula.setText("Matriculas"); Matricula.setSize(new Dimension(105, 30)); Matricula.setLocation(new Point(125, 78)); Matricula.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { Matricula matricula = new Matricula(control); matricula.setVisible(true); setVisible(false); } }); } return Matricula; } COM: <s> this method initializes matricula </s>
funcom_train/9760287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeFileBufferMapping(Object element, FileInfo info) { Object value= fFileBufferMap.get(info.fTextFileBuffer); if (value == null) return; if (value instanceof List) { List list= (List) value; list.remove(element); if (list.size() == 1) fFileBufferMap.put(info.fTextFileBuffer, list.get(0)); } else if (value == element) { fFileBufferMap.remove(info.fTextFileBuffer); } } COM: <s> removes the relation between the file buffer of the given info and the </s>
funcom_train/648591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnRunNow() { if (btnRunNow == null) { btnRunNow = new JButton(); btnRunNow.setText("Run Now"); btnRunNow.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { runNow(); } }); exceptionList.add(btnRunNow); } return btnRunNow; } COM: <s> this method initializes btn run now </s>
funcom_train/50500299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getEventsByType( String strType ) { ArrayList result = new ArrayList(); Event evt; // current event being processes Iterator li = events.iterator(); while ( li.hasNext() ) { evt = (Event) li.next(); if ( evt.getType().equals( strType ) ) { result.add( evt ); } } return result; } COM: <s> get all events in the collection of the indicated type </s>
funcom_train/44011335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetStartDate() { System.out.println("getStartDate"); CouponBO instance = new CouponBO(); String expResult = ""; String result = instance.getStartDate(); 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 start date method of class edu </s>
funcom_train/45543619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInput(IJSCProject project) { IJSCProject oldProject= fCurrJProject; fCurrJProject= project; if (fContentProvider != null) fContentProvider.inputChanged(fPackageViewer, oldProject, fCurrJProject); fPackageViewer.setInput(new Object[0]); List selectedElements= new ArrayList(); selectedElements.add(fCurrJProject); setSelection(selectedElements); } COM: <s> set the input for the package explorer </s>
funcom_train/18142935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStringValue() { StringBuffer result = new StringBuffer(); switch (type) { case PROPERTY_TYPE_INT: result.append(intValue); break; case PROPERTY_TYPE_BOOLEAN: result.append(booleanValue?"true":"false"); break; case PROPERTY_TYPE_INT_ARRAY: result.append("["); for (int i=0;i<intArrayValue.length;++i) { result.append(intArrayValue[i]); if (i<intArrayValue.length-1) result.append(","); } result.append("]"); break; } return result.toString(); } COM: <s> get the value of this property as a string </s>
funcom_train/3466434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Preferences preferences) { Preferences recentNode = preferences.node(SETTINGS_RECENT_WORKSPACES); try { recentNode.clear(); } catch (BackingStoreException e) { } int count = 0; Iterator it = recentWorkspaces.iterator(); while (it.hasNext()) { String fileName = (String)it.next(); recentNode.put(String.valueOf(count++), fileName); } } COM: <s> save the list of recently used workspaces to the preferences store </s>
funcom_train/13203752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ISupport next() { ISupport ret = null; if (m_root==null) { return null; } if (m_current!=null || (ret=accept(m_root))==null) { // Traversing in descending order while ((m_current=WalkerHelper.descendent(m_root, m_current))!=null && (ret=accept(m_current))==null); if (m_current==null) { ret = null; m_root = null; } } else { m_current = m_root; } return ret; } COM: <s> gets the next object or code null code if the traversal is ended </s>
funcom_train/46761116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PatientListModel getPatientList(final long patientListId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return PatientData.getPatientList(patientListId, chain, call); }}; return (PatientListModel) call(method, call); } COM: <s> same transaction return the single patient list model for the primary key </s>
funcom_train/49426325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float getGFromString(final String color) { if (isShortMode(color)) { return (Integer.valueOf(color.substring(2, 3), HEX_BASE) * SCALE_SHORT_MODE) / MAX_INT_VALUE; } else { return Integer.valueOf(color.substring(3, 5), HEX_BASE) / MAX_INT_VALUE; } } COM: <s> helper to get green from a string value </s>
funcom_train/50613050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void addSupportingViewerMenuItems(ViewerManager manager, JPopupMenu m, Object obj) { Class[] vc = manager.getViewerClassesForClass(obj.getClass()); for (int i = 0; i < vc.length; i++) { ViewerUtil.newMenuItem( new ViewerAction(manager, obj, vc[i]), m, manager.getInfo(vc[i]).getDescription(), "dummy", true); } } COM: <s> adds menu itens for each supporting viewer a given object has </s>
funcom_train/49892733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUrl() { String s = "http://" + getIp() + ":" + getPort(); if (! s.equals(handle.url)) Log.logThis("WARNING_INCONSISTENCY "+s+" <NEQ> "+handle.url); return handle.url; } COM: <s> get the url for this without trailing </s>
funcom_train/3035683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLabelText(Object object) { String result = getNodeName(object); Node node = (Node) object; NamedNodeMap attributes = node.getAttributes(); if(attributes!=null) { Node firstAttribute = attributes.item(0); if(firstAttribute!=null) { return result + " " + firstAttribute.getNodeName() + "=\"" + firstAttribute.getNodeValue() + "\""; } } return result; } COM: <s> fetches the label text specific to this object instance </s>
funcom_train/10659926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetConfiguration() { Configuration.setConfiguration(new ConfTestProvider()); SecurityChecker checker = new SecurityChecker(new AuthPermission( "getLoginConfiguration"), true); System.setSecurityManager(checker); Configuration.getConfiguration(); assertTrue(checker.checkAsserted); checker.reset(); checker.enableAccess = false; try { Configuration.getConfiguration(); fail("No expected SecurityException"); } catch (SecurityException ex) { } } COM: <s> tests that get configuration is properly secured via security manager </s>
funcom_train/38542298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BaseCache getCacheInstance(final int minSize, final int maxSize) { BaseCache result = null; if (this == FIFO) { result = new FIFOCache(minSize, maxSize); } if (this == LUFO) { result = new LUFOCache(minSize, maxSize); } if (this == NONE) { result = new HashCache(minSize, maxSize, this); } return result; } COM: <s> this method provides a new cache that implements the policy </s>
funcom_train/5552063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double cumulativeProbability(int x) throws MathException { double ret; if (x < 0) { ret = 0.0; } else if (x >= getNumberOfTrials()) { ret = 1.0; } else { ret = 1.0 - Beta.regularizedBeta( getProbabilityOfSuccess(), x + 1.0, getNumberOfTrials() - x); } return ret; } COM: <s> for this distribution x this method returns p x le x </s>
funcom_train/10874152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Automaton repeat(Automaton a, int min) { if (min == 0) return repeat(a); List<Automaton> as = new ArrayList<Automaton>(); while (min-- > 0) as.add(a); as.add(repeat(a)); return concatenate(as); } COM: <s> returns an automaton that accepts code min code or more concatenated </s>
funcom_train/12809963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkMarkedContentStart(PdfName ocref) { if (mc_balance > 0) { mc_balance++; return; } PdfDictionary ocdict = properties.getAsDict(ocref); if (ocdict == null) return; PdfString ocname = ocdict.getAsString(PdfName.NAME); if (ocname == null) return; if (ocgs.contains(ocname.toString())) mc_balance++; } COM: <s> keeps track of the marked content state </s>
funcom_train/3099331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createExecutor(Schedule schedule) { Channel executorChannel = new BoundedBuffer(NodeFactory.CHANNEL_CAPACITY); executor = new org.opencyc.elf.bg.executor.Executor(getNode(), executorChannel); executor.initialize((Puttable) schedulerChannel); getLogger().info("Created new executor: " + executor + " for schedule: " + schedule); } COM: <s> creates a new executor for the given schedule </s>
funcom_train/48507810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { int co = super.getDefaultCloseOperation(); switch(co) { case DO_NOTHING_ON_CLOSE: return; case HIDE_ON_CLOSE: super.hide(); break; case DISPOSE_ON_CLOSE: super.dispose(); break; case EXIT_ON_CLOSE: System.exit(0); break; default: throw new IllegalArgumentException("Event not supported by this widget"); } } COM: <s> preform the close event code </s>
funcom_train/9817981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initWireFromRange(Wire original_wire, int upper_bound, int lower_bound) { int num_of_wires = upper_bound - lower_bound + 1; value_array = new ValuePropagater[num_of_wires]; System.arraycopy(original_wire.getValueArray(), lower_bound, value_array, 0, num_of_wires); } COM: <s> sets up a range of a wire </s>
funcom_train/16395625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List<DisplayableInteractionContent> buildInteractionList(HttpServletRequest req, Group group, SortedSet<CommandEntry> sortedCommandEntries,boolean isFragment, boolean expandFragments) { return subInteractionList(req, group,sortedCommandEntries,isFragment, expandFragments, false, false, null,0,new SortLabelStack()); } COM: <s> creates interaction list for displaying </s>
funcom_train/9644308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getDefaultTableCellHeight() { InfoBarDescriptor desc = new InfoBarDescriptor(); desc.setEffectSize(1); desc.setMaxSize(1); desc.setEffectDescription("X"); desc.setDescription("X"); Component prototype = new SGBarCellRenderer() .getTableCellRendererComponent(getTreeTable(), desc, false, false, 1, 1); return (int) (prototype.getPreferredSize().height * 1.1); } COM: <s> gets the default table cell height </s>
funcom_train/37609270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCity() { itct = 0; ccc = new WeakReference<Traffic.OCity>(new OCity(froot)); ccc.get().setXFName(froot); DPoint3.setZoom(1); DPoint3.setDeltaX(0); DPoint3.setDeltaY(0); if (JavaDriver.amI()) JavaDriver.setCity(ccc.get()); else CMapDriver.setCity(ccc.get()); } // end setCity() COM: <s> reload city if user requires </s>
funcom_train/32363043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWindowStateListener(WindowStateListener listener) { FrameListener fl = new FrameListener(control, listener); control.addPropertyChangeListener(JInternalFrame.IS_MAXIMUM_PROPERTY, fl); control.addPropertyChangeListener(JInternalFrame.IS_ICON_PROPERTY, fl); } COM: <s> registers specified listener to receive </s>
funcom_train/3081808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(TreeSelectionEvent e) { // Forces redraw of selected nodes TreePath[] paths = e.getPaths(); for (int i = 0; i < paths.length; i++) { markPathDirty(paths[i], false); } TreeSelectionEvent newE; newE = (TreeSelectionEvent) e.cloneWithSource(Tree.this); fireValueChanged(newE); } COM: <s> invoked by the tree selection model when the selection changes </s>
funcom_train/43607939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node disambiguate(AmbiguityRemover ar) throws SemanticException { Node n = ar.nodeFactory().disamb().disambiguate(this, ar, position(), null, name); if (n instanceof Expr) { return n; } throw new SemanticException("Could not find field or local " + "variable \"" + name + "\".", position()); } COM: <s> disambiguate the expression </s>
funcom_train/29779505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object create() { Reflector target = null; if (targetClass != null) { target = Reflector.getReflector(targetClass); } else { target = Reflector.getReflector(targetInstance.getClass()); } if (targetMethod != null) { return target.invoke(targetInstance, targetMethod, args, null); } else { return target.getField(targetInstance, targetField); } } COM: <s> implementation of the default creation method </s>
funcom_train/2994020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int isSelected(int index) { int k = 0; for (Enumeration e=columns.elements(); e.hasMoreElements(); k++) { if (((Integer)e.nextElement()).intValue() == index) { //System.out.print("... " + index + " is found ..."); return k; } } return -1; } COM: <s> checks whether the argument is a column selected for output </s>
funcom_train/7755584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object go(String dir) throws Exception { WLScriptHelper.ensureConnected(wlctx); ObjectName cmo1 = cmo; ObjectName prevcmo1 = prevcmo; if("-".equals(dir)) { cmo1 = prevcmo1; } else { cmo1 = WLScriptHelper.getObjName(wlctx, dir); } setPointer(cmo1); return pointer(); } COM: <s> can take dir like </s>
funcom_train/39397484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { this.spamatoSettings = SpamatoSettings.getInstance(); this.filterStatistics = FilterStatistics.getInstance(); // init thread pools String processThreads = config.get(SpamatoSettings.INITIAL_PROCESS_THREADS_PROPERTY_NAME); processThreadPool = new BufferedThreadPool(Integer.parseInt(processThreads)); String filterThreads = config.get(SpamatoSettings.INITIAL_FILTER_THREADS_PROPERTY_NAME); filterThreadPool = new BufferedThreadPool(Integer.parseInt(filterThreads)); startStatSaver(); } COM: <s> initializes an instance of spamato </s>
funcom_train/31023316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeFormBeanName(String beanId) throws ApplicationConfigException { FormBeanConfig form = (FormBeanConfig) formBeans.get(beanId); if ( findFormBeanConfig(form.getName()) != null ) { throw new ApplicationConfigException(ApplicationConfigException.EXIST,form); } formBeans.remove(beanId); renameXMLFormBean(beanId,form.getName()); formBeans.put(form.getName(),form); } COM: <s> change formbean id in collection </s>
funcom_train/46825610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh () { if (game != null) { TableList tables = game.getTableList(); int [] tableNums = tables.getTablesNumbers(); Vector listData = new Vector (); for (int i = 0; i < tableNums.length; i++) { Table table = tables.getTable(tableNums[i]); listData.add (table); } //convert to a table at some stage setListData (listData); } } COM: <s> refresh method which updates the visual userlist </s>
funcom_train/29693735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ITerrain enteredTerrain() { int type = Terrains.getType(choTerrainType.getSelectedItem()); int level = Integer.parseInt(texTerrainLevel.getText()); boolean exitsSpecified = cheTerrExitSpecified.getState(); int exits = Integer.parseInt(texTerrExits.getText()); return Terrains.getTerrainFactory().createTerrain(type, level, exitsSpecified, exits); } COM: <s> returns a new instance of the terrain that is currently entered in the </s>
funcom_train/3105591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllDeletedRows() throws IloaException { // Call the fonction removeAllDeletedRows() of the services for (Iterator<IDataStoreService> iter = this.services.iterator(); iter.hasNext();) { IDataStoreService element = iter.next(); element.removeAllDeletedRows(); } // Remove the row in the datastore this.deletedRows = new ArrayList<DataStoreRow>(); this.updateVersion(); } COM: <s> remove all the deleted rows of the datastore </s>
funcom_train/14606984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openRecentFile() { File recentFile = null; if (!_recentlyOpenFiles.isEmpty()) { recentFile = _recentlyOpenFiles.lastElement(); } if (recentFile != null && !FileLockManager.isLocked(recentFile.getAbsolutePath())) { loadWorkspace(recentFile); } } COM: <s> opens the most recently used file if any </s>
funcom_train/178777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Edge prevOutEdge() { if (this != source.firstOutEdge()) { EdgeIterator sourceOuts = source.outEdges(); Edge indexEdge = null; Edge prevEdge = null; Edge currentEdge = null; while (sourceOuts.hasNext()) { prevEdge = currentEdge; currentEdge = sourceOuts.nextEdge(); if (currentEdge == this) { indexEdge = currentEdge; break; } } if (indexEdge != null) return prevEdge; } return null; } COM: <s> returns the predecessor of this edge in the list of outgoing </s>
funcom_train/14653041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createAndShowGUI() { //setTitle("Server [RBot Project - UI, Copyright 2004 (c)]"); //setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); //getContentPane().add(ui(environment)); //addWindowListener(this); //pack(); //setVisible(true); //setLocation(400,800); } COM: <s> create and show gui </s>
funcom_train/42406313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Method findMethod (ClassesEnvironment env, String name, String signature) { HashMap<String, Object> signatures = getMethodNamesSignatures(env).get (name); if (signatures == null) return null; for (Object obj: signatures.values()) { Method m = (Method) obj; if (m.signature.equals(signature)) return m; } return null; } COM: <s> find a method by name and signature </s>
funcom_train/42402143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onMouseClick(final MouseClickEvent event) { // ignore event if menu list is already opened... if (false == this.isDisabled()) { if ("hidden".equals(ComputedStyle.getComputedStyle( this.getMenuList().getElement() ).getString( Css.VISIBILITY))) { this.open(event); } } event.cancelBubble(true); } COM: <s> this event is only fired if the sub menu item is not disabled </s>
funcom_train/21469478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void formatStandaloneMonth(StringBuffer buf, int count, Date date) { int value = date.getMonth(); if (count == 5) { buf.append(dateTimeFormatInfo.monthsNarrowStandalone()[value]); } else if (count == 4) { buf.append(dateTimeFormatInfo.monthsFullStandalone()[value]); } else if (count == 3) { buf.append(dateTimeFormatInfo.monthsShortStandalone()[value]); } else { zeroPaddingNumber(buf, value + 1, count); } } COM: <s> formats standalone month field according to pattern specified </s>
funcom_train/2580786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ItemLabelPosition getSeriesNegativeItemLabelPosition(int series) { // return the override, if there is one... if (this.negativeItemLabelPosition != null) { return this.negativeItemLabelPosition; } // otherwise look up the position list ItemLabelPosition position = (ItemLabelPosition) this.negativeItemLabelPositionList.get(series); if (position == null) { position = this.baseNegativeItemLabelPosition; } return position; } COM: <s> returns the item label position for all negative values in a series </s>
funcom_train/2254403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDoPostWithTimeOutSingleRequest() throws Exception { WebConversation wc = new WebConversation(); WebRequest pollingGetMethodRequest = new GetMethodWebRequest("http://localhost:8080/controller/rest/polling/96e79218965eb72c92a549dd5a330112/3,4"); WebResponse pollingResponse = wc.getResponse(pollingGetMethodRequest); System.out.println(pollingResponse.getText()); } COM: <s> b situation2 b br </s>
funcom_train/9677909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeAddCommandPropertyHackIfNeeded() { String exec = (String) cmd.getProperty("exec"); String from = "add -kb "; String to = "add "; if(exec.indexOf(from) >= 0) { exec = StringUtil.replace(exec, from, to); cmd.setProperty("exec", exec); } } COM: <s> restores add commands confing to what it was before a </s>
funcom_train/21021405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSelectedView() { int index = searchNormal.context.getSelectedIndex(); if (index==posTaxonomy) { return UIDesktopConstants.NAVIGATOR_TAXONOMY; } else if (index==posTemplates) { return UIDesktopConstants.NAVIGATOR_TEMPLATES; } else if (index==posPersonal) { return UIDesktopConstants.NAVIGATOR_PERSONAL; } else if (index==posMail) { return UIDesktopConstants.NAVIGATOR_MAIL; } else { return UIDesktopConstants.NAVIGATOR_TRASH; } } COM: <s> get selected view </s>
funcom_train/24428602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File validatePath(String path) throws IOException { File dir = new File(path.trim()); if (!dir.exists() || !dir.isDirectory() || !dir.canRead()) { throw new IOException("Given path is not a valid directory: " + dir.getAbsolutePath()); } return dir; } COM: <s> validate given path </s>
funcom_train/25125931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getLeafCategoryList(JComboBox list) { list.removeAllItems(); list.addItem(Category.NULL); List<Category> fullList = this.budgetRoot.getAllSubCategories(); for (Category cat : fullList) { if (cat.isLeaf()) { list.addItem(cat); } } } COM: <s> sets list to be a selection from all possible categories a transaction </s>
funcom_train/34858845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compress() { if ( parent == null ) return; if ( children.size() == 1 ) { if ( outer.log.isDebug() ) outer.log.debug("Compressing task "+this); boolean removed = parent.children.remove(this); if ( removed ) { int n=0; for ( Task t : children.iterator().next().children ) { t.parent = parent; parent.children.add(t); n++; } children.clear(); id = -1; parent = null; } else outer.log.warn("Unable to remove task from parent during compress"); } } COM: <s> if a task contains only one seq frame as child the elements </s>
funcom_train/23393660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTaskPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TaskViolation_task_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TaskViolation_task_feature", "_UI_TaskViolation_type"), FactPackage.Literals.TASK_VIOLATION__TASK, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the task feature </s>
funcom_train/40701253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Panel createInputUi () { VerticalPanel vp = new VerticalPanel (); HorizontalPanel p = new HorizontalPanel (); p.setSpacing ( 10 ); p.add ( new FbProfilePic ( apiClient.getLoggedInUser (), FbProfilePic.Size.square ) ); text.setHeight ( "100px" ); text.setWidth ( "400px" ); vp.add ( text ); vp.add ( submitButton ); p.add ( vp ); return p; } COM: <s> create input text area and submit button </s>
funcom_train/14202160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receiveBookingRequest(Job job, ProviderRequestContext context) { log.debug("Calling _fsm:BookingReq in provider " + context.getMyID()); try { _fsm.BookingReq(job, context); } catch (statemap.TransitionUndefinedException e) { //TODO: Send message back over TCP log.debug("Invalid state transition for job " + job.getId() + ": " + e.toString()); } } COM: <s> implementation of the provider event listener interface </s>
funcom_train/3379522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printList() { Object[] total = toArray(); for (int i = 0; i < total.length; i++) { System.out.println("object " + i + ": " + ((AuthTime)total[i]).kerberosTime + "/" + ((AuthTime)total[i]).cusec); } } COM: <s> printes out the debug message </s>
funcom_train/48406371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWorkDefinitionTransitionContextPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WorkDefinition_workDefinitionTransitionContext_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WorkDefinition_workDefinitionTransitionContext_feature", "_UI_WorkDefinition_type"), SpemxtcompletePackage.eINSTANCE.getWorkDefinition_WorkDefinitionTransitionContext(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the work definition transition context feature </s>
funcom_train/28982395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkAccountSettings () { if (okAccountSettings == null) {//GEN-END:|37-getter|0|37-preInit // write pre-init user code here okAccountSettings = new Command ("Ok", Command.OK, 0);//GEN-LINE:|37-getter|1|37-postInit // write post-init user code here }//GEN-BEGIN:|37-getter|2| return okAccountSettings; } COM: <s> returns an initiliazed instance of ok account settings component </s>
funcom_train/5661667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void turnOn() throws OneWireException { state = switchcontainer.readDevice(); int channelNumber = 0; channelNumber = ChannelMask >> 1; //convert from channel mask to number switchcontainer.setLatchState(channelNumber, true, false, state); switchcontainer.writeDevice(state); } COM: <s> puts the switch into the on conducting state </s>
funcom_train/23028905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getTowMagPanel() { if (TowMagPanel == null) { try { minIloscLabel = new JLabel(); minIloscLabel.setText("Ilosc minimalna: "); TowMagPanel = new JPanel(); TowMagPanel.setLayout(new BorderLayout()); TowMagPanel.add(getTextsFields(), BorderLayout.CENTER); TowMagPanel.add(getLabels(), BorderLayout.WEST); } catch (java.lang.Throwable e) { // TODO: Something } } return TowMagPanel; } COM: <s> this method initializes tow mag panel </s>
funcom_train/35095327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component getTopLevelContainer() { Component c = null; if (null != getRootPane()) { if (null != getRootPane().getLayeredPane()) { c = getRootPane().getLayeredPane(); } else if (null != getRootPane().getContentPane()) { c = getRootPane().getContentPane(); } } return c; } COM: <s> returns the top level container or code null code if there is no </s>
funcom_train/39162345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeCamera(String name) throws Exception { CamData camera = cameras.get(name + CAMERA_SUFFIX); if (camera != null) { // if (getActiveCamera() != null && getActiveCamera().equals(name)) { // deactivateCamera(); // } // TODO sceneManager.destroyCamera(name + CAMERA_SUFFIX); cameras.remove(name + CAMERA_SUFFIX); } } COM: <s> detatching from and deletion of node is not done here </s>
funcom_train/50873019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFirstVariable() { OMBinding binding = new OMBinding(); binding.setBody( new OMInteger( "1" ) ); binding.addVariable( new OMVariable( "a" ) ); binding.addVariable( new OMVariable( "b" ) ); assertTrue( ((OMVariable) binding.firstVariable()).getName().equals( "a" ) ); } COM: <s> test of first variable method of class nl </s>
funcom_train/6202825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveWindowLayout() { Preferences.setPreference(Preferences.PROJECT_FILES_WINDOW_WIDTH, getWidth()); Preferences.setPreference(Preferences.PROJECT_FILES_WINDOW_HEIGHT, getHeight()); Preferences.setPreference(Preferences.PROJECT_FILES_WINDOW_X, getX()); Preferences.setPreference(Preferences.PROJECT_FILES_WINDOW_Y, getY()); } COM: <s> saves the size and position of the search window </s>
funcom_train/13427471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDecoratingIEdge(IEdge decoratingEdge) { /* David 06/06/2006: Here we allow the setting of a null decoratingEdge */ if (decoratingEdge != null && decoratingEdge.getDecoratedIEdge() != this) { throw new InvalidIEdgeException( "Error occured in syncornisation of the decorators of the edge " + this.getName()); } this.decoratingIEdge = decoratingEdge; } COM: <s> sets the new decorating upper level of this basic edge element </s>
funcom_train/649061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMessage(String message, SudokuException e1) { setMessageInternal(message, ERROR, e1); Vector coordinates = e1.getCoordinates(); for (int i = 0; i < coordinates.size(); i++) { int row = ((Coordinate) coordinates.elementAt(i)).getRow(); int column = ((Coordinate) coordinates.elementAt(i)).getColumn(); cellElements[row][column].setError(true); } } COM: <s> set the message and extract information from the sudoku exception </s>
funcom_train/41021370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CardList getOpponentPermanentList(int playerID) { CardList permanents = new CardList(); for (Card c : battlefield.values()) { if (c.getControllerID() != playerID && !c.isSuspended()) { permanents.add(c); } } return permanents; } COM: <s> get players opponents permanents </s>
funcom_train/46638694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadState(String prefix, Properties properties) { Set<Object> keySet = properties.keySet(); for (Object key : keySet) { String keyString = (String) key; if(keyString.contains(PERSISTENCE_KEY)){ String labelsFromPropertyValue = properties.getProperty(keyString).trim(); String columnIndexFromKey = keyString.substring(keyString.lastIndexOf(DOT) + 1); registerColumnOverrides(Integer.parseInt(columnIndexFromKey), labelsFromPropertyValue.split(VALUE_SEPARATOR)); } } } COM: <s> load the overrides state from the given properties file </s>
funcom_train/41543647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean input(Instance instance) throws Exception { // check if input format is defined if (getInputFormat() == null) { throw new Exception("No input instance format defined"); } if (m_NewBatch) { resetQueue(); m_NewBatch = false; } if (m_FirstBatchDone) { push(instance); return true; } else { bufferInput(instance); return false; } } COM: <s> input an instance for filtering </s>
funcom_train/50077572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testThreeColumnWithMap() { Cache cache = (Cache) Lookup.getInstance().fetchComponent(DATALOADER_THREE_COLUMN); for(int i = 0; i < 10; i++) { cache.get(new BigDecimal(i)); } assertEquals(this.hashedCached, cache); } COM: <s> test default implementation used for map </s>
funcom_train/31208266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAutoIncrement(int column) throws SQLException { try { if(Trace.isDetailed()) Trace.trace(getId(),column); // checkColumnIndex already calls checkClosed rs.checkColumnIndex(column); return false; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> checks if this an autoincrement column </s>
funcom_train/43084763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Bitmap loadDefaultUrbanRemixImage() { URL defaultURL; try { defaultURL = new URL( "http://gadgetynews.com/wp-content/uploads/2009/04/android-300x300.jpg"); URLConnection defaultConn = defaultURL.openConnection(); defaultConn.connect(); BufferedInputStream bis2 = new BufferedInputStream(defaultConn .getInputStream()); return (BitmapFactory.decodeStream(bis2, null, null)); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } // TODO Instead of returning null, raise toast to say // "Cannot download Image. Try Again later." return null; } COM: <s> loads a default droid bot image after trying to retrieve the original </s>
funcom_train/15625306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append(@NotNull final NamedObject namedObject) throws IllegalNamedObjectException { if (parent != null) { throw new IllegalNamedObjectException("node '" + namedObject.getPath() + "' is not a root node"); } append(namedObject.getPath(), namedObject); } COM: <s> append a node </s>
funcom_train/34641016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String computePackagename(String folderPath){ String packageName = folderPath.replace(Path.SEPARATOR, '.'); if(packageName.contains(SRC_FOLDER)){ //the package name is the the files path in relation to the "src" folder. packageName = packageName.substring(packageName.indexOf(SRC_FOLDER)+SRC_FOLDER.length()); } else{ //if the file is placed within the default package return empty String packageName = ""; } return packageName; } COM: <s> compute the package name for the scanner and parser files </s>
funcom_train/22557262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addObject(final String namespace, long guid, final String content, final String id) throws TENCServerException, HttpException, IOException { final String result = restService.doPost(content, namespace + ":" + guid); checkResult(result); long guidRsp = getGuidFromXMLResponse(result, namespace); if (guid != guidRsp) { throw new TENCServerException(new ErrorMessage("Fedora." + namespace + ".create", id)); } } COM: <s> helper method to add an object user category resource </s>
funcom_train/10280916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMarkingActionStatus(boolean pStatus) { mView.mFileAddMarkedToPlayerMenu.setEnabled(pStatus); mView.mFileDeleteMarkedMenu.setEnabled(pStatus); mView.mFileClearMarkingMenu.setEnabled(pStatus); mView.mFileMarkAllMenu.setEnabled(pStatus); mView.mFileMarkingMenu.setEnabled(pStatus); } COM: <s> the marking actions are not depending on the selection of a file </s>
funcom_train/43221443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GraphNode getNodeNamed(String nname) { Component[] comps = getParent().getComponents(); for (int i = 0; i < comps.length; i++) { Component ge = comps[i]; if (!(ge instanceof GraphNode)) continue; GraphNode gn = (GraphNode) ge; if (gn.model.getName().equals(nname)) return gn; } return null; } COM: <s> gets the node with the given name from the parent container </s>
funcom_train/21845408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SymbolTable findTableContaining(final String symbolName) { Value d; d = table.get(symbolName); if (d != null) { return this; // Found in our symbol table. } // Not in ours, but try up a level if (parentTable != null) return parentTable.findTableContaining(symbolName); // Or no more levels to look, so return null (not found) return null; } COM: <s> method to determine which symbol table a symbol name is found in </s>
funcom_train/27748448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawString(String string, int x, int y, boolean isTransparent) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); //FIXME - need to avoid delimiter and tabs int layout = data.layout; byte[] buffer = Converter.wcsToMbcs(null, string, true); OS.pango_layout_set_text(layout, buffer, buffer.length - 1); OS.gdk_draw_layout(data.drawable, handle, x, y, layout); } COM: <s> draws the given string using the receivers current font and </s>
funcom_train/33768698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GoogleMapsApiUrlBuilder withParameterEnumSet(String name, Set<? extends ValueEnum> enumSet) { Set<String> values = new HashSet<String>(enumSet.size()); for (ValueEnum fieldEnum : enumSet) { values.add(encodeUrl(fieldEnum.value())); } parametersMap.put(name, values); return this; } COM: <s> with parameter enum set </s>
funcom_train/11730751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store(DataStore dataStore) throws RepositoryException { assert dataStore != null; assert type == PropertyType.BINARY; BLOBFileValue v = (BLOBFileValue) val; if (v instanceof BLOBInDataStore) { // already in the data store, OK return; } // store it in the data store val = BLOBInDataStore.getInstance(dataStore, getStream()); } COM: <s> store a value in the data store </s>
funcom_train/33267201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawPolygon(Polygon p, int thickness, int dashOnLen, int dashOffLen) { drawPoly(p.xpoints, p.ypoints, p.npoints, thickness, dashOnLen, dashOffLen, CENTER, true); } COM: <s> draws a polygon defined by the specified point </s>
funcom_train/22742960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void togglePlaylist() { if (ui.getAcPlaylist().isSelected()) { miPlaylist.setState(true); config.setPlaylistEnabled(true); loader.togglePlaylist(true); } else { miPlaylist.setState(false); config.setPlaylistEnabled(false); loader.togglePlaylist(false); } } COM: <s> toggle playlist ui </s>
funcom_train/22045884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OObject permutation( OObject x ){ if( (this instanceof Complex) && (x instanceof Complex) ) { return ((Complex)this).permutation( (Complex)x ); } else if( !((this instanceof Error) || (x instanceof Error)) ){ return new jscicalc.expression.Permutation( this, x ); } return new Error( "OObject permutation( x ) error" ); } COM: <s> permutation function applied to x and this </s>
funcom_train/50509872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDefaultConfigPath() throws Throwable { long startTime = _logger.logStartTime("Starting testDefaultConfigPath."); XMLConfigurationProvider provider = new XMLConfigurationProvider(); Configurator configurator = new Configurator(provider); // setting up the provider provider.setProperty(XMLConfigurationProvider.XMLCONFIG_PATH, "/projects/jvmd/etc/jvmd.conf"); // running the provider Configurable server = configurator.configure(); _logger.logDuration("Finished testDefaultConfigPath", startTime); } COM: <s> running the configuration provider </s>
funcom_train/50465827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String generateDesc() { StringBuffer html = new StringBuffer("<html>"); html.append("Would you like to Grant: <b>(something)</b> to codesource: <br>"); html.append("<b>"+generateShortCodeSource()+"</b><br> for: \"app test\"."); html.append("</html>"); return html.toString(); } COM: <s> generate the description to show on the panel </s>
funcom_train/42902897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDFST() throws Exception { putdata(1, NMAX - 1, a); fftsg.dfst(NMAX, a, t, ip, w); fftsg.dfst(NMAX, a, t, ip, w); double err = errorcheck(1, NMAX - 1, 2.0 / NMAX, a); System.out.printf("dfst err= %g \n", err); assertEquals(0, err); } COM: <s> check of dfst </s>
funcom_train/4533137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseEntered(MouseEvent e) { super.mouseEntered(e); if (reversi.getCurrentPlayer() != otherPlayer && reversi.isValidMove(block.getIndex())) { block.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); block.setBorder(BorderFactory.createLineBorder(Color.WHITE)); } } COM: <s> highlight the block if this block is a valid move </s>
funcom_train/41594076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCharPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StrucDocTr_char_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StrucDocTr_char_feature", "_UI_StrucDocTr_type"), V3Package.eINSTANCE.getStrucDocTr_Char(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the char feature </s>
funcom_train/6452258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(PlanBody bl) { if (term == null) { bl = bl.clonePB(); swap(bl); this.next = bl.getBodyNext(); } else if (next == null) { next = bl; } else { next.add(bl); } return true; } COM: <s> clone the plan body and adds it in the end of this plan </s>
funcom_train/2919436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void trackAltsWithRewrites(GrammarAST altAST, int outerAltNum) { if ( grammar.type==Grammar.TREE_PARSER && grammar.buildTemplate() && grammar.getOption("rewrite")!=null && grammar.getOption("rewrite").equals("true") ) { GrammarAST firstElementAST = (GrammarAST)altAST.getFirstChild(); grammar.sanity.ensureAltIsSimpleNodeOrTree(altAST, firstElementAST, outerAltNum); } altsWithRewrites[outerAltNum] = true; } COM: <s> track which rules have rewrite rules </s>
funcom_train/25187292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetProperties() throws Exception { System.out.println("setProperties"); Map<String, JSchema> properties = new LinkedHashMap<String, JSchema>(); JSchema instance = new JSchema(); instance.setProperties(properties); assertEquals(properties, instance.getProperties()); } COM: <s> test of set properties method of class jschema </s>
funcom_train/2936072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (request instanceof ReconnectRequest) { Object view = ((ReconnectRequest) request).getConnectionEditPart() .getModel(); if (view instanceof View) { Integer id = new Integer(StatemVisualIDRegistry .getVisualID((View) view)); request.getExtendedData().put(VISUAL_ID_KEY, id); } } return super.getCommand(request); } COM: <s> extended request data key to hold editpart visual id </s>
funcom_train/12560920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uCallSizeChanged(int w, int h) { super.uCallSizeChanged(w,h); Displayable returnScreen = alert.getReturnScreen(); if (returnScreen != null) { (returnScreen.displayableLF).uCallSizeChanged(w,h); } } COM: <s> notify return screen about screen size change </s>
funcom_train/640742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchAutoChoice() { if (ExpertView.isAutoChoiceSelected()) { ExpertView.enableForwardButtons(); simulatorBar.enableForwardButtons(); } else { if (followingActivatedTransitions.size() > 1) { ExpertView.disableForwardButtons(); simulatorBar.disableForwardButtons(); } } } COM: <s> enable the forward buttons if disabled because of more then one activated transition </s>
funcom_train/13390730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeValues(Double low, Double high) { if(low==null) throw new NullPointerException("low is null"); if(high==null) throw new NullPointerException("high is null"); removeValues(low.doubleValue(), high.doubleValue()); } COM: <s> remove values with a value between double1 and double2 </s>