__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/47204537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object execute(Object information, ConcreteOrganism parent) { if (actionScript != null) { try { actionScript.invokeFunction("dance", parent,this); } catch (NoSuchMethodException nsme) { nsme.printStackTrace(); } catch (ScriptException se) { se.printStackTrace(); } } return null; } COM: <s> this method is called to perform lone actions </s>
funcom_train/32085991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLineDash(int[] dashes) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (dashes != null && dashes.length != 0) { byte[] dashList = new byte[dashes.length]; for (int i = 0; i < dashes.length; i++) { dashList[i] = (byte)dashes[i]; } data.dashes = dashList; data.lineStyle = SWT.LINE_CUSTOM; } else { data.dashes = null; data.lineStyle = SWT.LINE_SOLID; } dirtyBits |= DIRTY_LINESTYLE; } COM: <s> sets the receivers line dash style to the argument </s>
funcom_train/12280898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flush() { if (this.output == null) throw new IllegalStateException("Closed"); try { this.output.flush(); } catch (IOException e) { this.abort(); String message = "Unable to flush buffers"; throw new DAVException(507, message, e, this.resource); } } COM: <s> p flush any unwritten data to the disk </s>
funcom_train/19255461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyAllFormattings() { clearPeerFormatting(); for (int i = 0; i < getFormattings().size(); i++) { Formatting f = (Formatting) getFormattings().get(i); setFormattingAttributes(f.offset, f.length, f.attrs); } } COM: <s> loops through the set of formattings applied and re applies them </s>
funcom_train/33972082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchFeed(long rowId) throws SQLException { Cursor mCursor = mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE, KEY_URI, KEY_TYPE, KEY_EXTRA}, KEY_ROWID + "=" + rowId, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } COM: <s> return a cursor positioned at the note that matches the given row id </s>
funcom_train/39243935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllTemplatesByLanguage(final String language) { File path = getPath(); File[] files = path.listFiles(new FilenameFilter() { public boolean accept(File dir, String file) { if (FileUtilities.getFileName(file).endsWith("_" + language)) { return true; } return false; } }); return loadHolders(files); } COM: <s> gets all templates that are written for a certain language </s>
funcom_train/9680780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResultsToTable(List results, BinTreeTableNode rootNode){ for (int i = 0; i < results.size(); ++i) { BinCastExpression foundCast = (BinCastExpression) results.get(i); BinMember parentMember = foundCast.getParentMember(); BinTreeTableNode found = new BinTreeTableNode(parentMember); found.addAst(foundCast.getRootAst()); rootNode.findParent(parentMember.getOwner(), true).addChild(found); } } COM: <s> overrides add results to table from class abstract search </s>
funcom_train/14356843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContentPane(Container contentPanel) { if (contentPanel == null) { throw new IllegalArgumentException("Content pane can't be null"); } if (wrapper != null) { super.remove(wrapper); } wrapper = new WrapperContainer(contentPanel); super.addImpl(wrapper, BorderLayout.CENTER, -1); } COM: <s> sets the content pane of this jcollapsible pane </s>
funcom_train/47891944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitParameterDecl(ParameterDecl pd) { super.visitParameterDecl(pd); // get the parameter type TypeDecl type = pd.getType(); if (type instanceof UserType) { links = links + parameterWeight; if (type.getSource() == null) { if (!counted.contains(type.getSimpleName())) { componentCount++; counted.add(type.getSimpleName()); } } } } COM: <s> visit parameter decl </s>
funcom_train/20889894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkNoise(Noise n, double noiseLevel) { if ((mostSignificantNoise == null) || (mostSignificantNoise.getRssi() < n.getRssi())) { mostSignificantNoise = n; } if ((noiseLevel > 0.0) && (mostSignificantNoise.getRssi() >= noiseLevel)) { return true; } return false; } COM: <s> method to add a new noise event to the noise vector </s>
funcom_train/48664788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleHTMLGenerationFinished(Exception error) { try { getJButtonToggleHTMLGeneration().setSelected(false); getJMenuItemToggleHTMLGen().setSelected(false); if(error != null) { // TODO localize viewContainer.getAppStatusBar().setErrorMessage("Error generating HTML.", error); } } catch(Exception e) { UIExceptionMgr.userException(e); } } COM: <s> invoked when the html generation is finished </s>
funcom_train/21105312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel getPCustRepSum() { if (pCustRepSum == null) { pCustRepSum = new JPanel(); pCustRepSum.setLayout(new BorderLayout()); pCustRepSum.setPreferredSize(new Dimension(10, 100)); pCustRepSum.add(getJScrollPane4(), null); } return pCustRepSum; } COM: <s> this method initializes p cust rep sum </s>
funcom_train/7518257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Passaporte entity) { EntityManagerHelper.log("saving Passaporte 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 passaporte entity </s>
funcom_train/10204924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMExceptionsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MOperation_mExceptions_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MOperation_mExceptions_feature", "_UI_MOperation_type"), ClassDiagramPackage.Literals.MOPERATION__MEXCEPTIONS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the mexceptions feature </s>
funcom_train/49318910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _makeDragInteractor() { _dragInteractor = new DragInteractor(); _dragInteractor.addLayerListener(new LayerAdapter() { public void mouseReleased(LayerEvent e) { Figure fig = e.getFigureSource(); if (fig instanceof CanvasFigure) { ((CanvasFigure) fig).fireCanvasFigureEvent(CanvasFigure.MOVED); } } }); } COM: <s> make the drag interactor for figures that may be dragged </s>
funcom_train/27790910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getPassword(String username) { System.out.println(" +++ MDVReal: getPassword " + username); return ""; /* GenericPrincipal principal = (GenericPrincipal) principals.get(username); if (principal != null) { return (principal.getPassword()); } else { return (null); } */ } COM: <s> return the password associated with the given principals user name </s>
funcom_train/42281300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyLayoutNode(boolean size) { if(size) { //dont use the node, because heights would be equalled IFigure figure = getFigure(); figure.setSize(figure.getPreferredSize()); } //DiagramPart will be notified through property event getModelDTable().setLocation(new Point(node.x, node.y)); } COM: <s> apply the computed layout by setting the location to the coordinates </s>
funcom_train/36048993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int mouseWheelUp(int x, int y, int modifiers, int count, String wait) throws IOException { return mouseEvent("wheelup", modifiers, MouseEvent.BUTTON2, null, new Point(x, y), count, wait); } COM: <s> p scroll up the mouse wheel on the current desktop </s>
funcom_train/7982350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long extend8(long f, String s) { int n = s.length(); for (int i = 0; i < n; i++) { int x = (int) s.charAt(i); f = extend_byte(f, x); } return reduce(f); } COM: <s> extends fingerprint code f code by adding the lower eight </s>
funcom_train/16428249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void transmitLogoff() throws IOException { PacketBodyBuffer body = new PacketBodyBuffer(); body.addElement("0", loginID.getId()); // Is this only in for HTTP? sendPacket(body, ServiceType.LOGOFF); // 0x02 ipThread.stopMe(); network.close(); } COM: <s> transmit a logoff packet which should exit us from yahoo im </s>
funcom_train/21160361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCancelButton() { if (CancelButton == null) { CancelButton = new JButton(); CancelButton.setText(LanguageResource.getString("CANCELBUTTON_STR") ); CancelButton.setMinimumSize(new Dimension(50, 14)); CancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setVisible(false); } }); } return CancelButton; } COM: <s> this method initializes cancel button </s>
funcom_train/26475860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set( int idx, Class f ) { // need some space? if (idx==size) { Class[] new_data=new Class[size+1]; System.arraycopy(data, 0, new_data, 0, size); data=new_data; size++; } data[idx]=f; } COM: <s> set an element of the data array </s>
funcom_train/8077283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetOptions() { m_removeMissingCols = false; m_verbose = false; m_delta = 0.05; m_minMetric = 0.90; m_numRules = 10; m_lowerBoundMinSupport = 0.1; m_upperBoundMinSupport = 1.0; m_significanceLevel = -1; m_outputItemSets = false; } COM: <s> resets the options to the default values </s>
funcom_train/20899598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toDebugString() { StringBuffer buf = new StringBuffer(); for (int idx = 0; idx < size;) { buf.append(Move.getDebugNotation(elements[idx])); if (++idx < size) { buf.append(", "); } } return buf.toString(); } COM: <s> returns a longer string representation of the move list than the </s>
funcom_train/50154270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HashMap getExceptionClassMap() { HashMap map = new HashMap(); ExceptionClass[] exceptions = getExceptionClasses(); if (exceptions != null) { for (int i = 0; i < exceptions.length; i++) { map.put(exceptions[i].getType(), exceptions[i]); } } return map; } COM: <s> method get exception class map </s>
funcom_train/10357249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof InternetAddress)) return false; InternetAddress other = (InternetAddress) o; String myAddress = getAddress(); return myAddress == null ? (other.getAddress() == null) : myAddress.equalsIgnoreCase(other.getAddress()); } COM: <s> compares two addresses for equality </s>
funcom_train/624417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getModelElement() { Collection cla = uml.getCore().refAllClasses(); Iterator itcl = cla.iterator(); while (itcl.hasNext()) { Object obj = itcl.next(); if (obj instanceof ModelElementClass) { ModelElementClass umlcc = (ModelElementClass) obj; parseModelElementClass(umlcc); } } } COM: <s> this method reads all model elements in the model </s>
funcom_train/32760668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startMonitor( final Channel channel ) { synchronized ( CHANNEL_LOCK ) { final Monitor oldMonitor = _monitor; if ( oldMonitor == null ) { try { _monitor = channel.addMonitorValue( MONITOR_HANDLER, Monitor.VALUE ); Channel.flushIO(); } catch ( Exception exception ) { Logger.getLogger("global").log( Level.WARNING, "Exception attempting to create a monitor on channel: " + channel.getId(), exception ); } } } } COM: <s> start monitoring the specified channel </s>
funcom_train/15490979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PointRoi subtractPoints(Roi roi) { Polygon points = getPolygon(); Polygon poly = roi.getPolygon(); Polygon points2 = new Polygon(); for (int i=0; i<points.npoints; i++) { if (!poly.contains(points.xpoints[i], points.ypoints[i])) points2.addPoint(points.xpoints[i], points.ypoints[i]); } if (points2.npoints==0) return null; else return new PointRoi(points2.xpoints, points2.ypoints, points2.npoints); } COM: <s> subtract the points that intersect the specified roi and return </s>
funcom_train/25523609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDate(int d, int M, int y, int h, int m, int s) { // Sanitise the input data before assigning to fields // Note that this is the correct logical sequence for // sanitisation - do not change! month = monthSanitiser(M); year = yearSanitiser(y); hour = hourSanitiser(h); minute = minuteSecondSanitiser(m); second = minuteSecondSanitiser(s); // Need to pass the pre-sanitised fields to this one day = daySanitiser(d, month, year); } COM: <s> set the date </s>
funcom_train/5594610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuLoadCreature() { if (menuLoadCreature == null) { menuLoadCreature = new JMenuItem(); menuLoadCreature.setText("Load One Creature"); menuLoadCreature.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { loadCreature(); } }); } return menuLoadCreature; } COM: <s> this method initializes menu load creature </s>
funcom_train/18812389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { System.out.println("Hardware reset"); for (int r = 0; r < 0xFF; r++) { ioWrite(r, (short) 0x00); } ioWrite(0x40, (short) 0x91); ioWrite(0x0F, (short) 0x01); hdmaRunning = false; } COM: <s> initialize io to initial power on state </s>
funcom_train/1937097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public int read() throws IOException { while (true){ synchronized (CircularByteBuffer.this){ if (inputStreamClosed) throw new IOException("InputStream has been closed; cannot read from a closed InputStream."); int available = CircularByteBuffer.this.available(); if (available > 0){ int result = buffer[readPosition] & 0xff; readPosition++; if (readPosition == buffer.length){ readPosition = 0; } ensureMark(); return result; } else if (outputStreamClosed){ return -1; } } try { Thread.sleep(100); } catch(Exception x){ throw new IOException("Blocking read operation interrupted."); } } } COM: <s> read a single byte </s>
funcom_train/22528024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayDefaultObject() { if(!fLearningObjects.isEmpty()) { displayObject(fLearningObjects.get(0)); } else if(!fServices.isEmpty()) { displayObject(fServices.get(0)); } else { fPreview.getBrowser().setText(Messages.AbstractActivityPreview_2); } } COM: <s> display the default first object in the environment </s>
funcom_train/29617686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJNotesScrollPane() { if (jNotesScrollPane == null) { jNotesScrollPane = new JScrollPane(); jNotesScrollPane.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); jNotesScrollPane.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); jNotesScrollPane.setBounds(new java.awt.Rectangle(119,164,250,86)); jNotesScrollPane.setViewportView(getJNotesTextArea()); } return jNotesScrollPane; } COM: <s> this method initializes j notes scroll pane </s>
funcom_train/47287441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWrapS(int wrap_s){ this.wrap_s= wrap_s; bindColorTexture(); gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, wrap_s); bindDepthTexture(); gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, wrap_s); unbind(); } COM: <s> sets the wrap parameter for texture coordinate s </s>
funcom_train/12162240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testControlSingleSelectOptionsSelected() throws Exception { privateSetUp(); boolean[] selected = {true, false, false}; boolean multiple = false; boolean vertical = false; boolean alignright = true; int optGroupCount = 0; doTestControlSelect(selected, multiple, vertical, alignright, optGroupCount); } COM: <s> test the output for a single control select with an option selected </s>
funcom_train/33776022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdAbout () { if (cmdAbout == null) {//GEN-END:|131-getter|0|131-preInit // write pre-init user code here cmdAbout = new Command ("A propos de", Command.HELP, 3);//GEN-LINE:|131-getter|1|131-postInit // write post-init user code here }//GEN-BEGIN:|131-getter|2| return cmdAbout; } COM: <s> returns an initiliazed instance of cmd about component </s>
funcom_train/32723008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void prepareArguments(PersistentObject parentPO) { for (int i = 0; i < specs.size(); i++) { ColumnSpec colSpec = (ColumnSpec) specs.get(i); Object argument = getProperty(parentPO,colSpec.getPropertyName()); args.set(i,argument); } } COM: <s> prepares arguments for fetch or delete by setting prepared statement parameters </s>
funcom_train/12187573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasResource(String url) { List resourceSuffixes = configuration.getContextChangingResourceSuffixes(); boolean hasResource = false; int size = resourceSuffixes.size(); for (int i = 0; i < size && !hasResource; i++) { hasResource = url.endsWith((String) resourceSuffixes.get(i)); } return hasResource; } COM: <s> determine if a url has a resource part </s>
funcom_train/9887127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double RatioBPrior(BetaPrior B1, BetaPrior B2) { double v1,v2; v1 = (double) B1.success; v2 = (double) B2.success; v1 = LnBeta(v1+B1.alpha,B1.N - v1 + B1.beta)- LnBeta(B1.alpha,B1.beta); v2 = LnBeta(v2+B2.alpha,B2.N - v2 + B2.beta)- LnBeta(B2.alpha,B2.beta); return Math.exp(v1 - v2); } COM: <s> return the ratio of new to old </s>
funcom_train/46416831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadKs(String s){ this.loadedWindowsKs=false; this.loadedMozillaKs=false; this.loadedMacKs =false; if (s.equals("Windows"))loadedWindowsKs=true; if (s.equals("Mozilla"))loadedMozillaKs=true; if (s.equals("Mac")) loadedMacKs =true; } COM: <s> indicates which keystore is loaded in the cert sel cb combo </s>
funcom_train/4753720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyPatternValuesFromPatternMatcher(final PatternMap patternMap) { for (IPatternObject pattern : patternMap.fPatternIndexMap.keySet()) { if (pattern.getSymbol() != null) { Integer indx = getIndex(pattern); if (indx != null) { fPatternValuesArray[indx.intValue()] = patternMap.getValue(pattern); } } } } COM: <s> copy the found pattern matches from the given code pattern map code back </s>
funcom_train/51144412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double toDegree() { if( ARCSECOND.equals(unit) ) { value = value / 60 / 60; unit = Angle.DEGREE; return value; } if( ARCMINUTE.equals(unit) ) { value = value / 60; unit = Angle.DEGREE; return value; } if( RADIANT.equals(unit) ) { value = value * 180 / Math.PI; unit = Angle.DEGREE; return value; } return value; } COM: <s> converts and sets this angles value and unit to an angle given in </s>
funcom_train/1841391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof Location)) return false; Location pn = (Location)o; return (pn.getX() == this.getX()) && (pn.getY() == this.getY()) && (pn.getHeight() == this.getHeight()); } COM: <s> return whether this is equal to another object </s>
funcom_train/15811217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String quotedString() throws ParseException { int startIdx = ptr + 1; if (lookAhead(0) != '\"') return null; consume(1); while (true) { char next = getNextChar(); if (next == '\"') { // Got to the terminating quote. break; } else if (next == '\0') { throw new ParseException( this.buffer + " :unexpected EOL", this.ptr); } else if (next == '\\') { consume(1); } } return buffer.substring(startIdx, ptr - 1); } COM: <s> parse a comment string cursor is at a </s>
funcom_train/28342689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean publish( final Connection connection, final List<TripRecord> tripRecords ) { try { final PreparedStatement TRIPS_INSERT = connection.prepareStatement( INSERT_SQL ); for ( final TripRecord record : tripRecords ) { TRIPS_INSERT.setString( 1, record.getPV() ); TRIPS_INSERT.setTimestamp( 2, record.getSQLTimestamp() ); TRIPS_INSERT.addBatch(); } TRIPS_INSERT.executeBatch(); connection.commit(); return true; } catch( Exception exception ) { exception.printStackTrace(); return false; } } COM: <s> publish the trip records </s>
funcom_train/33860013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getQuantificationsAHeadTextField() { if (quantificationsAHeadTextField == null) { quantificationsAHeadTextField = new JTextField(); quantificationsAHeadTextField.setBackground(new Color(255, 255, 102)); quantificationsAHeadTextField.setHorizontalAlignment(JTextField.LEFT); quantificationsAHeadTextField.setFont(new Font("Serif", Font.BOLD, 14)); quantificationsAHeadTextField.setEditable(true); } return quantificationsAHeadTextField; } COM: <s> this method initializes quantifications ahead text field </s>
funcom_train/180907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void simpleContent(Object value) throws java.io.IOException { if (value instanceof String) { nativeContent(encodeString((String)value)); } else if (value instanceof Boolean) { nativeContent(encodeBoolean((Boolean)value)); } else if (value instanceof Number) { out.write(encodeNumber((Number)value)); } else if (value instanceof java.util.Date) { nativeContent(encodeDate((java.util.Date)value)); } else { nativeContent(value.toString()); } } COM: <s> write simple content to xml stream </s>
funcom_train/5342350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void compile() throws OSAException, IllegalStateException { if (ptr == 0) { throw (new IllegalStateException()); } int errorCode = CompileOSAScript(ptr); if (errorCode < 0) { String msg = GetErrorMessage(ptr); int errorNum = GetErrorNumber(ptr); throw (new OSAException(msg, errorNum, errorCode)); } } COM: <s> compiles the script </s>
funcom_train/12807862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float writeSelectedRows(final int rowStart, final int rowEnd, final float xPos, final float yPos, final PdfContentByte[] canvases) { return writeSelectedRows(0, -1, rowStart, rowEnd, xPos, yPos, canvases); } COM: <s> writes the selected rows to the document </s>
funcom_train/39912364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object transform(Object target) { Date date; try { date = (Date) target; } catch(ClassCastException cce) { date = ((Calendar)target).getTime(); } String[] sarr = new String[4]; df = DateFormat.getDateInstance(); sarr[0] = df.format(date); StringTokenizer st = new StringTokenizer(sarr[0]); sarr[2] = st.nextToken(); sarr[3] = st.nextToken(" ,"); sarr[1] = st.nextToken(); return sarr; } COM: <s> returns the specified calendar argument as an array of strings </s>
funcom_train/22508030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseInputFile() throws Exception { String fileName = null; fileName = zkFileDirectory + zkFileName; SAXBuilder builder = new SAXBuilder(); try { Document doc = builder.build(fileName); Element root = doc.getRootElement(); this.processDocument(root, 0); } // indicates a well-formedness error catch (JDOMException e) { System.out.println(fileName + " is not well-formed."); System.out.println(e.getMessage()); } catch (IOException e) { System.out.println(e); } } COM: <s> method parse input file </s>
funcom_train/48792390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void takeInventory(int numComponents) { if (debugging) debug.println(3, "takeInventory"); InventoryEnt inventoryEnt; try { getInventory().take(numComponents); } catch (FinderException e) { debug.printStackTrace(e); throw new EJBException(e); } catch (RemoteException e) { debug.printStackTrace(e); throw new EJBException(e); } } COM: <s> method to take components of this type from the inventory </s>
funcom_train/39216758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected WindowFactory createWindowFactory(Properties properties) throws Exception { final String windowFactory = properties.getProperty(WINDOW_FACTORY); if (windowFactory == null) throw new IllegalArgumentException( "There's no init parameter 'windowFactory' in servlet configuration. Please add it."); return (WindowFactory) Class.forName(windowFactory).newInstance(); } COM: <s> you can override this method for your own window factory </s>
funcom_train/1344077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleClientLeaving( final ClientContact clientContact ) { clientContacts.remove( clientContact ); clientContact.connectionStub.close(); broadcastCommand( Client.Commands.A_CLIENT_HAS_LEFT_THE_GAME.ordinal() + GENERAL_SEPARATOR_STRING ); broadcastMessage( SERVER_CHAT_NAME + clientContact.publicClientOptions.clientName + " has left the game." ); } COM: <s> handles a client when it leaves the game </s>
funcom_train/50140425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReferencingFieldNames(String[] referencingFieldNames) { if (referencingFieldNames == null) { throw new IllegalArgumentException("Can not set referencing field names to null."); } if (referencingFieldNames.length == 0) { throw new IllegalArgumentException("Referencing field names must contain one element in minimum."); } this.referencingFieldNames = referencingFieldNames; } COM: <s> set the field names to be referenced within the foreign table </s>
funcom_train/12867974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String renderPage() throws SoapClientException{ RemotePage page = null; String space = config.getAsString("space"); String title = config.getAsString("title"); String content = null; page = getPage(title, space); try { content = service.getConfluenceSoapService().renderContent( service.getToken(), space, page.getId(), null); } catch (Exception e) { throw new SoapClientException(e); } return content; } COM: <s> renders the content of a page </s>
funcom_train/648414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnMoveDown() { if (btnMoveDown == null) { btnMoveDown = new JButton(); btnMoveDown.setText("Down"); btnMoveDown.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { moveSelectedFolderDown(); } }); } return btnMoveDown; } COM: <s> this method initializes j button7 </s>
funcom_train/37615609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMessage (BidAckMsg msg) { // ensure that any previously received messages have // already been processed if(receivedMsg.getMessage() == MsgType.I_NO_MSG) { receivedMsg.update(msg); } else { throw new MultipiException(ErrorType.BID_UNCONSUMED_MSG_ERROR); } } COM: <s> p updates the input message area with the incoming parameter message </s>
funcom_train/35715052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifyAnnotations(Annotation[] deletions, Map additions, Annotation[] modifications) { try { replaceAnnotations(deletions, additions, false); if (modifications != null) { for (int i= 0; i < modifications.length; i++) modifyAnnotation(modifications[i], false); } } catch (BadLocationException x) { } fireModelChanged(); } COM: <s> modifies the annotation model </s>
funcom_train/50747169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection findAllProcessNames() throws ServiceException, RemoteException { Call call = getCall(); log.debug("Getting all process deployed"); call.setOperationName("findAllProcessName"); Collection resultColl = invoke(call); log.debug("Got all process deployed"); return resultColl; } COM: <s> returns the names of all processes deployed in twister </s>
funcom_train/28672814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAutowireCandidatePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BeanType_autowireCandidate_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BeanType_autowireCandidate_feature", "_UI_BeanType_type"), BeansPackage.Literals.BEAN_TYPE__AUTOWIRE_CANDIDATE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the autowire candidate feature </s>
funcom_train/40944642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeComponent(int column, int row) { // Finds the area for (final Iterator i = areas.iterator(); i.hasNext();) { final Area area = (Area) i.next(); if (area.getColumn1() == column && area.getRow1() == row) { removeComponent(area.getComponent()); return; } } } COM: <s> removes the component specified with its cell index </s>
funcom_train/6493927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unlockProject(CmsProject project) { // unlock all resources in the project m_lockManager.removeResourcesInProject(project.getUuid(), false); clearResourceCache(); OpenCms.getMemoryMonitor().flushProjects(); // we must also clear the permission cache OpenCms.getMemoryMonitor().flushPermissions(); } COM: <s> unlocks all resources in the given project </s>
funcom_train/5345276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeOutgoing() throws IOException { //1. Send "GNUTELLA CONNECT/0.6" and headers writeLine(GNUTELLA_CONNECT_06+CRLF); sendHeaders(REQUEST_HEADERS); //conclude the handshake (This may involve exchange of //information multiple times with the host at the other end). concludeOutgoingHandshake(); } COM: <s> sends and receives handshake strings for outgoing connections </s>
funcom_train/13875203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsCompositePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Property_isComposite_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Property_isComposite_feature", "_UI_Property_type"), EmofPackage.Literals.PROPERTY__IS_COMPOSITE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is composite feature </s>
funcom_train/36165895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getLastLineNumber() { if (text != null) { int end = text.getText().length(); Element rootElement = text.getDocument().getDefaultRootElement(); int lineNumber = rootElement.getElementIndex(end); return lineNumber + 1; } return -1; } COM: <s> tries to determine the last line number in the file </s>
funcom_train/3004379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getFloat(String key, float def) { float result = def; try { String value = get(key, null); if (value != null) result = Float.parseFloat(value); } catch (NumberFormatException e) { // Ignoring exception causes specified default to be returned } return result; } COM: <s> implements the tt get float tt method as per the specification in </s>
funcom_train/51272860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String eventsToXML(XDMIterator resIter) throws MXQueryException { ByteArrayOutputStream bout = new ByteArrayOutputStream(); //ByteArrayOutputStream bout = new DummyOutputStream(); try { eventsToXML(bout, resIter); return PlatformDependentUtils.printByteArrayOutputStream(bout,"UTF-8"); } catch (UnsupportedEncodingException ue) { throw new MXQueryException(ErrorCodes.A0009_EC_EVALUATION_NOT_POSSIBLE,"Cannot serialize",null); } } COM: <s> serialize the xdm instance generated by res iter into a string </s>
funcom_train/12559326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() throws IOException { if (buffer != null) { if (mark < 0) { throw new IOException(); } pos = mark; return; } if (fileDecoder == null || savedDecoder == null) { throw new IOException(); } fileDecoder = clone(savedDecoder); } COM: <s> repositions this stream to the position at the time the </s>
funcom_train/18874806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image loadImage(Landscape land) { return new ImageIcon(mWorkdir + mPathSeperator + "classes" + mPathSeperator + "images" + mPathSeperator + "landscape" + mPathSeperator + land.getMType() + mPathSeperator + land.getMName() + ".png").getImage(); } COM: <s> method load image </s>
funcom_train/49331336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean check(boolean throwException) { if (invalidated != null) { if (throwException) { throw new BugException(monitorable + ": This object has been invalidated", invalidated); } else { log.warn(1, monitorable + ": This object has been invalidated", new TraceException("Usage was attempted here", invalidated)); } return false; } return true; } COM: <s> check whether the object has been invalidated </s>
funcom_train/21845588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isWhere(final String p, final int i) { boolean b_line = false; boolean b_pgm = true; if (program != null) if (p != null) b_pgm = p.equalsIgnoreCase(program); if ((line > 0) && (i == line)) b_line = true; final boolean stop = b_line && b_pgm; if (stop) alreadySignalled = true; return stop; } COM: <s> determine if this breakpoint has been hit based on the current location </s>
funcom_train/38949711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ValueWithName findIfStored(String s){ int bucket = generateHash(s); ValueWithName tempElm; for (int i = 0; i < elmTable[bucket].size(); i++) { tempElm = elmTable[bucket].get(i); if (s.equals(tempElm.getName())) { // String represents a previously stored Elm, which is // returned return tempElm; } } return null; } COM: <s> returns the element represented by the string parameter if it is stored </s>
funcom_train/43410089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPackagingMaterialTypePanel() { if (jPackagingMaterialTypePanel == null) { jPackagingMaterialTypePanel = new JPanel(); jPackagingMaterialTypePanel.setLayout(new BorderLayout()); jPackagingMaterialTypePanel.add(getJPackagingMaterialTypeInnerPanel(), java.awt.BorderLayout.CENTER); } return jPackagingMaterialTypePanel; } COM: <s> this method initializes j packaging material type panel </s>
funcom_train/42715330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLanguage(String language) { if (language.equals("2")) { lang_value = "2"; Kuix.initI18nSupport("de"); } else if (language.equals("1")) { lang_value = "1"; Kuix.initI18nSupport("en"); } else { Kuix.initI18nSupport(); } leftmenu_title = Kuix.getMessage("EXIT"); } COM: <s> sets creates a language for the midlet </s>
funcom_train/4375894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getResponse() { byte[] resp; if (currentResponse.length > currentPosition) { byte[] tmp = new byte[currentPosition]; for (int i = 0; i < currentPosition; i++) { tmp[i] = currentResponse[i]; } resp = tmp; } else { resp = currentResponse; } return EncodingUtil.getAsciiString(Base64.encodeBase64(resp)); } COM: <s> returns the response that has been generated after shrinking the array if </s>
funcom_train/7623174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStepSize(float stepSize) { if (stepSize <= 0) { return; } final float newMax = mNumStars / stepSize; final int newProgress = (int) (newMax / getMax() * getProgress()); setMax((int) newMax); setProgress(newProgress); } COM: <s> sets the step size granularity of this rating bar </s>
funcom_train/8065801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getNodes() { // needs-more-work: should just do getGraphModel().getNodes() // but that is not updated when the diagram is loaded List nodes = new ArrayList(); List<? extends Fig> figs = getLayer().getContents(); for (Fig fig : figs) { if (fig instanceof FigNode) { nodes.add(fig.getOwner()); } } return nodes; } COM: <s> get all the model elements that are represented as a node </s>
funcom_train/40621513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onSortingComplete() { // Reselect things that need reselecting for (int i = 0; i < selectedRows.length; i++) { int rowIndex = getRowIndex(selectedRows[i]); if (rowIndex >= 0) { selectRow(rowIndex, false); } } fireColumnSorted(); } COM: <s> trigger the callback but do not change the ordering of the rows </s>
funcom_train/47603471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getPhoneTextField() { if (phoneTextField == null) {//GEN-END:|79-getter|0|79-preInit // write pre-init user code here phoneTextField = new TextField("\u0422\u0435\u043B\u0435\u0444\u043E\u043D", null, 32, TextField.ANY);//GEN-LINE:|79-getter|1|79-postInit // write post-init user code here }//GEN-BEGIN:|79-getter|2| return phoneTextField; } COM: <s> returns an initiliazed instance of phone text field component </s>
funcom_train/39067120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveDebugFiltersPreference(String[] filters) { IPreferenceStore store = getPreferenceStore(); if (filters == null) { store.setValue(DEBUG_FILTERS_PREFERENCE, ""); return; } String filterString = filters[0]; for (int i = 1; i < filters.length; i++) { filterString = filterString + ";" + filters[i]; } store.setValue(DEBUG_FILTERS_PREFERENCE, filterString); } COM: <s> saves a list of debug filters to the preference store </s>
funcom_train/9350997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sort(SortType sortOption) { if (sortOption.equals(SortType.DUE_DATE)) { Collections.sort(books, new DueDateComparator()); } else if (sortOption.equals(SortType.LIBRARY)) { Collections.sort(books, new LibraryComparator()); } else if (sortOption.equals(SortType.TITLE)) { Collections.sort(books, new TitleComparator()); } } COM: <s> sorts book list according to sort option </s>
funcom_train/3904996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRelativeURL_WebLink() throws Exception { loadContentPackage1(); Element element = cpCore.getElementByIdentifier(cpCore.getRootManifestElement(), CP_Package1.ITEM3_ID); String url = cpCore.getRelativeURL(element); assertEquals("Relative URL not correct", "http://" + CP_Package1.ITEM3_HREF, url); } COM: <s> ensure relative url gets http prepended </s>
funcom_train/41980119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bind( final File xmlFile ) throws BindException { if( xmlFile == null ) { throw new BindException(); } try { bind( new FileReader( xmlFile ) ); } catch( final FileNotFoundException e ) { System.err.println( e ); throw new BindException( e ); } } COM: <s> binds components from </s>
funcom_train/6472067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T add(T _element) { // TODO consider optimization String on = null; if (_element instanceof Folder) { on = ((Folder)_element).name; ((Folder)_element).parentTo(this); } // TODO do not allow name duplication even when content is different if (content.contains(_element) == false) { content.add(_element); return _element; } if (_element instanceof Folder) ((Folder)_element).name = on; return null; } COM: <s> adds an element in a folder </s>
funcom_train/27865720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSkyFitsImage getSnapCandidate(JSkyFitsImage image){ final double SNAP_DISTANCE = 90; //pixels JSkyFitsImage retval = null; for(JSkyFitsImage candidate: images){ if((candidate != image) && (distance(candidate, image) <= SNAP_DISTANCE)){ retval = candidate; } } return retval; } COM: <s> returns the first snap candidate </s>
funcom_train/8672765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected OMNode createOMText(int textType) throws OMException { OMNode node; if (lastNode == null) { return null; } else if (!lastNode.isComplete()) { node = createOMText((OMElement) lastNode, textType); } else { node = createOMText(lastNode.getParent(), textType); } return node; } COM: <s> method create omtext </s>
funcom_train/21105413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MJButton getBtAddParam() { if (btAddParam == null) { btAddParam = new MJButton(); btAddParam.setText("Add Param"); btAddParam.setMnemonic(KeyEvent.VK_A); btAddParam.setPreferredSize(new java.awt.Dimension(100, 26)); } return btAddParam; } COM: <s> this method initializes bt add param </s>
funcom_train/1683902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLogged(boolean logged) { if(logged==true){ CountryModel otherLogged= mapModel.getLoggedCountry(); if(otherLogged!=null){ otherLogged.setLogged(false); } } this.logged = logged; this.setChanged(); this.notifyObservers(); } COM: <s> sets the selected status of this country and notifies observers </s>
funcom_train/20885095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWithDepth2Elements() { ListWithDepth2Elements list = new ListWithDepth2Elements(); list.list = new ArrayList<Depth2DTO>(); for (int i = 0; i < 10; i++) { list.list.add(createDepth2DTO()); } JSefaTestUtil.assertRepeatedRoundTripSucceeds(XML, list); } COM: <s> tests a list with code depth2 dto code elements </s>
funcom_train/42068286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addChunkTypeIDPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Chunk_chunkTypeID_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Chunk_chunkTypeID_feature", "_UI_Chunk_type"), WavPackage.Literals.CHUNK__CHUNK_TYPE_ID, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the chunk type id feature </s>
funcom_train/20433519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveManTo(Point manPoint, Direction direction, Color color) { men[manPoint.x][manPoint.y].setColor(color); men[manPoint.x][manPoint.y].setVisible(true); int position = -1; switch (direction) { case HORIZONTAL_LEFT: case HORIZONTAL_RIGHT: position = manPoint.x; break; case VERTICAL_DOWN: case VERTICAL_UP: position = manPoint.y; break; } moveArrowTo(direction, position); repaint(); } COM: <s> this method makes the man that is located in the position pointed with </s>
funcom_train/24512426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeHighlighter(Highlighter hl) { boolean success = highlighters.remove(hl); // System.out.println(" hilite successfully removed" ); if (success) { /* PENDING: duplicates? */ hl.removeChangeListener(getHighlighterChangeListener()); fireStateChanged(); } /* should log if this didn't succeed. Maybe */ } COM: <s> removes a highlighter from the pipeline </s>
funcom_train/26551319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addField(Field field) { if (field == null) { throw new IllegalArgumentException("field cannot be null"); } else if (fields.indexOf(field) != -1) { throw new IllegalArgumentException("a field with the name '" + field.getName() + "' already exists in this table"); } this.fields.addElement(field); } COM: <s> adds the given field to the vector of fields </s>
funcom_train/50774438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean panelDeactivated(boolean toNextPanel) { // if switching to previous panel, no veto checking is needed if (!toNextPanel) return false; // Update and Lock the FrmMain mainWindow.setWaitCursor(); mainWindow.setEnabled(false); // Parse the Script Files veto = !scriptSources.check(); // Update and Unlock the FrmMain mainWindow.setEnabled(true); mainWindow.toFront(); mainWindow.setDefaultCursor(); return veto; } COM: <s> called if panel is to be deactivated </s>
funcom_train/16770681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readString(Type target) { int len = 0; switch (currentDataType) { case AMF.TYPE_LONG_STRING: len = buf.getInt(); break; case AMF.TYPE_STRING: len = buf.getUnsignedShort(); break; default: log.debug("Unknown AMF type: {}", currentDataType); } int limit = buf.limit(); log.debug("Limit: {}", limit); String string = bufferToString(buf.buf(), len); buf.limit(limit); // Reset the limit return string; } COM: <s> reads a string </s>
funcom_train/7427790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clip(final Shape s) { final Rectangle2D clipBds = s.getBounds2D(); SWTShapeManager.transform(clipBds, transform); SWTShapeManager.awtToSWT(clipBds, SWT_RECT); org.eclipse.swt.graphics.Rectangle clip = gc.getClipping(); clip = clip.intersection(SWT_RECT); gc.setClipping(SWT_RECT); } COM: <s> this method isnt really supported by swt so will use the shape bounds </s>
funcom_train/38786373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Zahl gcd_coeff() throws JasymcaException{ Zahl gcd; if(a[0] instanceof Zahl) gcd = (Zahl)a[0]; else if(a[0] instanceof Polynomial) gcd = ((Polynomial)a[0]).gcd_coeff(); else throw new JasymcaException("Cannot calculate gcd from "+this); for(int i=1; i<a.length; i++){ if(a[i] instanceof Zahl) gcd = gcd.gcd((Zahl)a[i]); else if(a[i] instanceof Polynomial) gcd = gcd.gcd(((Polynomial)a[i]).gcd_coeff()); else throw new JasymcaException("Cannot calculate gcd from "+this); } return gcd; } COM: <s> numeric reatest common denominator of all coefficients </s>