__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4614527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getADC() { byte[] rcv = new byte[2]; try { i2c.read(SLA_MCP3221, rcv, 0, 2); } catch (IOException e) { System.out.println("getADC: " + e); } int temp = (int) (rcv[0] << 8 | (rcv[1] & 0xFF)); return temp; } COM: <s> reads the adc value from mcp3221 12bit adc </s>
funcom_train/48201149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logStrings(String[] strings) { StringBuffer output = new StringBuffer(); for (int i = 0; i < strings.length; i++) { if (i > 0) { output.append(' '); } output.append(strings[i]); } System.out.println(output.toString()); } COM: <s> logs the given strings separated by spaces </s>
funcom_train/36002607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoConfiguration() { ConfigTree config = new ConfigTree("root"); try { new EsbServiceInvokerAction(config); fail(); } catch (ConfigurationException e) { assertEquals("You must specify a service name using the serviceName attribute.", e.getMessage()); } } COM: <s> what happens if no mandatory parameters are passed </s>
funcom_train/2884452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readWireForm(ByteBuffer buf) throws IOException, WireFormException, ClassNotFoundException { super.readWireForm(buf); time = wireForm.getLong(timeIdx); order = wireForm.getLong(orderIdx); sender = Identity.readWireForm(wireForm, identityIdx); address = ConnectionAddress.readWireForm(wireForm, addressIdx); } COM: <s> sets the timed message attributes to the wire form held in a </s>
funcom_train/2880977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRootPath() throws RemoteException, Exception { String path = null; // Locate the parent if (rootTarget != null) { path = rootTarget.sfCompleteName().toString(); if (path.equals("")) { return "ROOT"; } else { return ("ROOT:" + path); } } else { return "ROOT"; } } COM: <s> obtains a full path string making use of the reference to the parent </s>
funcom_train/10363385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAttribute(String attributeName, String attributeValue) { if (attributeValue == null || attributeValue.length() == 0) { setClearAttribute(attributeName); } else { attributes.put(attributeName, attributeValue); // remove attribute from other maps clearAttributes.remove(attributeName); nullAttributes.remove(attributeName); } } COM: <s> this method should be discouraged for usage outside in future as it does </s>
funcom_train/28309759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showCounters(boolean reset, String prefix, PrintWriter printWriter) { if (log.isDebugEnabled()) { log.debug("showCounters() called with prefix: " + prefix + " and reset:" + reset); } Object[][] data = JamonDataHelper.getJamonCountersAndResetIfNeeded(reset); String marshalledData = JarepJamonDataMarshaller.jamonArrayToString(data, prefix); printWriter.println(marshalledData); } COM: <s> creates text from jamondata </s>
funcom_train/23722567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadAll(Document document) { Element root = document.getDocumentElement(); checkDocument(root); types = loadTypes(root); linkTypes = loadLinkTypes(root); resources = loadResources(root); los = loadLinkableObjects(root); notes = loadNotes(root); links = loadLinks(root); } COM: <s> load useful information from the supplied dom </s>
funcom_train/50873457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void filterMultiLineReply(int actualResponseCode) throws IOException { // search the following lines for the end line. while (true) { String response = in.readLine(); int responseCode = 0; try { responseCode = getResponseCode(response); } catch (Throwable t) { // line doesn't have a response code continue; } if (responseCode == actualResponseCode && response.length() > 3 && response.charAt(3) == ' ') { // we found the end line break; } } } COM: <s> method filter multi line reply </s>
funcom_train/15581139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clickLink(String anID) { WebLink link = null; try { link = resp.getLinkWithID(anID); } catch (SAXException e) { throw new RuntimeException(ExceptionUtility.stackTraceToString(e)); } if (link == null) throw new RuntimeException("No Link found with ID \"" + anID + "\""); submitRequest(link); } COM: <s> navigate by submitting a request based on a link with a given id </s>
funcom_train/20741722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(ScmChangeSetTO i_changeSet) { int result = 0; try { // -1 - forces to sort revisions in reverse order result = -1 * (Long.valueOf(m_revision).compareTo(Long.valueOf(i_changeSet.m_revision))); } catch (Exception e) { // revision is null or not number value, so just skip it } return result; } COM: <s> sortes code scm change set to code items in reverse order </s>
funcom_train/29923843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateAuthorizationNullPassword() { System.out.println("NullPass"); try { auth = authFact.createAuthorization("admin", null); fail(); } catch (Exception ex) { System.out.println("Exception thrown: " + ex); assertTrue("null password", true); } } COM: <s> this tests a null password </s>
funcom_train/10591504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFilterConfig(FilterConfig cfg) { filterConfig = cfg; logFilterConfig(); String value; value = filterConfig.getInitParameter(VERBOSE_PARAM); if (value != null) { verbose = ("true".compareToIgnoreCase(value) == 0); } else { verbose = VERBOSE_DEFAULT; } } COM: <s> sets the filter config attribute of the cocoon filter generator impl object </s>
funcom_train/13745634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(){ Session s = HibernateUtil.currentSession(); String query1 = "select dgm.dgmId "+ "from DrugsManufacturer as dgm ORDER BY dgm.dgmId desc" ; Query q = s.createQuery(query1); q.setMaxResults(1); Integer id = (Integer)q.uniqueResult(); if(id == null){ id = 1 ; } Transaction tx = s.beginTransaction(); for(DrugsManufacturer dgm : this.dgmList){ if(dgm.getDgmId() == null){ id++; // set the id before saving dgm.setDgmId(id); s.save(dgm); } } tx.commit(); } COM: <s> this method saves this drugs manufacturer list </s>
funcom_train/3112243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDefaultKeyBindings() { super.addDefaultKeyBindings(); addKeyBinding("C+SPACE", INSERT_STRUCTURE); addKeyBinding("C+v", PASTE); addKeyBinding("C+c", COPY); addKeyBinding("C+x", CUT); } COM: <s> add the default key bindings of the gunner input handler </s>
funcom_train/8345757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertNoText() throws UnableToCompleteException { NoBrainInterpeter<String> nullInterpreter = new NoBrainInterpeter<String>( null); String s = consumeInnerTextEscapedAsHtmlStringLiteral(nullInterpreter); if (!"".equals(s)) { logger.die(this, "Unexpected text in element: \"%s\"", s); } } COM: <s> require that the receivers body is empty of text </s>
funcom_train/43245897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMaritalStatus() { System.out.println("getMaritalStatus"); PatientDataObject instance = new PatientDataObject(); String expResult = ""; String result = instance.getMaritalStatus(); 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 marital status method of class org </s>
funcom_train/26143465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File store(Artifact artifact, File file) throws SavantException { try { FileInputStream stream = new FileInputStream(file); File cached = store(artifact, stream, null, true); stream.close(); return cached; } catch (FileNotFoundException fnfe) { throw new SavantException(fnfe); } catch (IOException ioe) { throw new SavantException(ioe); } } COM: <s> makes a local copy to the local cache location of the file specified </s>
funcom_train/3812991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void growNonEmittingBranches() { for (Iterator<ActiveList> i = activeListManager.getNonEmittingListIterator(); i.hasNext();) { activeList = i.next(); if (activeList != null) { i.remove(); pruneBranches(); growBranches(); } } } COM: <s> grow the non emitting branches until the tokens reach an emitting state </s>
funcom_train/23932995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { swtComposite= new SwtComposite(parent,SWT.NO_BACKGROUND ); // Create the help context id for the viewer's control PlatformUI.getWorkbench().getHelpSystem() .setHelp(swtComposite, "orcajo.azada.chart.viewer"); //hookContextMenu(); //hookDoubleClickAction(); contributeToActionBars(); manager.getOlapModel().addModelChangeListener(this); readSetting(); } COM: <s> this is a callback that will allow us </s>
funcom_train/46455259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintMyDrawableList(DrawingPanel drawingPanel, Graphics g) { ArrayList tempList = (ArrayList) drawableList.clone(); Iterator it = tempList.iterator(); while(it.hasNext()) { Drawable drawable = (Drawable) it.next(); drawable.draw(drawingPanel, g); } } COM: <s> paints the drawable objects onto the image </s>
funcom_train/48249055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(byte[] buffer) { try { mmOutStream.write(buffer); // Share the sent message back to the UI Activity // XXX !!! String buffer2 = new String(buffer); buffer2 = buffer2.substring(0, buffer2.length() - 2); mHandler.obtainMessage(SPRIME.MESSAGE_WRITE, -1, -1, buffer2.getBytes()).sendToTarget(); } catch (IOException e) { Log.e(TAG, "Exception during write", e); } } COM: <s> write to the connected out stream </s>
funcom_train/47542558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void branchChainTo(Label label) { // in order to improve debug attributes for stepping (11431) // we want to inline the jumps to #breakLabel which already got // generated (if any), and have them directly branch to a better // location (the argument label). // we know at this point that the breakLabel already got placed if (this.breakLabel.hasForwardReferences()) { label.appendForwardReferencesFrom(this.breakLabel); } } COM: <s> dispatch the call on its last statement </s>
funcom_train/3114842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float distSquared(MouseEvent evtAA, MouseEvent evtBB) { if (evtAA == null || evtBB == null) { return (0); } float dx = evtAA.getX() - evtBB.getX(); float dy = evtAA.getY() - evtBB.getY(); return (dx*dx + dy*dy); } // of method COM: <s> calculate the distance squared between two mouse events </s>
funcom_train/48269370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNonLayoutSubEvents1NoHint() { LayoutEvent input = createLayoutEvent(200); input.addChild(createParseHtmlEvent(50)); input.addChild(createParseHtmlEvent(50)); input.addChild(createParseHtmlEvent(50)); test.addInput(input); HintletTestHelper.runTest(rule, test); } COM: <s> sub event time should be subtracted so this one should not trigger </s>
funcom_train/21995188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getState() throws RpcException { try { authorize(Scanner.GET_STATE); return getBus().getState(); } catch (JRecSecurityException e) { throw new RpcException("security-problem obtaining scanner state", e); } catch (BusException e) { throw new RpcException("bus-problem obtaining scanner state", e); } } COM: <s> obtain the present state of the scanner </s>
funcom_train/16177751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBounds(int x, int y, int width, int height) { _width = width; _height = height; //_buffer = getGraphicsConfiguration().createCompatibleImage(width, height); _buffer = null; super.setBounds(x, y, _width, _height); } COM: <s> move and resize this component </s>
funcom_train/51716556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getclassestree() { jTree2.setModel(null); if (issourceloader()) { jTree2.setModel(new DefaultTreeModel(loader2tree())); } else { jTree2.setModel(new DefaultTreeModel(Package2tree())); } jList1.setModel(new javax.swing.DefaultListModel()); jTree2.repaint(); } COM: <s> filename filter filter new filename filter </s>
funcom_train/8088246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Instances createInstances(Instances header, Element parent) throws Exception { Instances result; Vector list; int i; result = new Instances(header, 0); list = getChildTags(parent, TAG_INSTANCE); for (i = 0; i < list.size(); i++) result.add(createInstance(result, (Element) list.get(i))); return result; } COM: <s> creates instances from the given xml node </s>
funcom_train/36851192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GenMethod createMethod(int methodAccessFlags, Type returnType, String methodName, Type... args) { GenMethod method = new GenMethod(this, methodAccessFlags, returnType, methodName, args); methodList.add(method); return method; } COM: <s> creates a method </s>
funcom_train/18748328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleOk() { if (options.isSelected(Options.PREVIEW_ON_CLOSE_OPTION) && !editor.handlePreview(null)) { return; } else if (hasErrors()) { JOptionPane.showMessageDialog(this, String.format("Cannot use %s with syntax errors", editor.getRole(false))); } else { ok = true; dispose(); } } COM: <s> implements the effect of pressing the ok button </s>
funcom_train/28688189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void lodsw() throws MemoryException { RealModeAddress address = new RealModeAddress(m_state.getDS(), m_state.getSI()); m_state.setAX(m_memory.readWord(address)); byte diff = (m_state.getDirectionFlag() ? (byte)-2 : (byte)2); m_state.setSI((short)(m_state.getSI() + diff)); } COM: <s> implements the lodsw opcode </s>
funcom_train/9727156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Bounds3D transform(Matrix matrix) { Point oldPoints[] = getCorners(); Bounds3D newBounds = new Bounds3D(); Point unitPoint = matrix.multiply(new Point(1, 1, 1)); for (int i = 0; i < oldPoints.length; i++) { newBounds.extend(matrix.multiply(oldPoints[i])); } return newBounds; } COM: <s> return a bounding box transformed into a new coordinate space </s>
funcom_train/37651121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showUserError(final String message) { Display.getDefault().syncExec(new Runnable() { public void run() { String errTitle = getStringTable().getString(StringKeys.ERROR_TITLE); MessageDialog.openError(Display.getCurrent().getActiveShell(), errTitle, message); } }); } COM: <s> helper method to display a non logged user error </s>
funcom_train/4358235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addResource(ContextResource resource) { if (entries.containsKey(resource.getName())) { return; } else { entries.put(resource.getName(), resource.getType()); } synchronized (resources) { resource.setNamingResources(this); resources.put(resource.getName(), resource); } support.firePropertyChange("resource", null, resource); } COM: <s> add a resource reference for this web application </s>
funcom_train/9532970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeOntology() { //File file = new File("/home/mgibson/p/data/fly/ds868.proforma"); // testing File file = getFileFromUser(); if (file == null) return; // no file selected - cancel try { parseProforma(file); } catch (Exception e) { LOG.error("Proforma file parsing failed "+e); } } COM: <s> a user has requested to make a new ontology from proforma </s>
funcom_train/30136808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OAuthResponseMessage access(OAuthMessage request, ParameterStyle style) throws IOException { HttpMessage httpRequest = request.toHttpRequest(style); HttpResponseMessage httpResponse = http.execute(httpRequest); httpResponse = HttpMessageDecoder.decode(httpResponse); return new OAuthResponseMessage(httpResponse); } COM: <s> send a request and return the response </s>
funcom_train/42291373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getHeaderPanel() { if (headerPanel == null) { headerLabel = new JLabel(); headerLabel.setText("SAFCP - Módulo de Autenticação do candidato aprovado"); headerLabel.setFont(new Font(null, Font.BOLD, 24)); headerPanel = new JPanel(); headerPanel.setLayout(new GridBagLayout()); headerPanel.add(headerLabel, new GridBagConstraints()); headerPanel.setBorder(BorderFactory.createRaisedBevelBorder()); } return headerPanel; } COM: <s> this method initializes header panel </s>
funcom_train/37513868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printAllGF(java.util.Iterator i) { while (i.hasNext()) { MjMethodDoc m = (MjMethodDoc)(i.next()); printTargetHyperLink(pathString(m.cuPackage(), m.gfFileName()), "classFrame", ((MjPackageDoc)(m.cuPackage())).prefix()+m.name()+m.signature()); br(); } } COM: <s> print links for all the gfs </s>
funcom_train/6519889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HierarchicalMap getConstraint(Object key) { if(this.fixedConstraints) { throw new UnsupportedOperationException(this.defaultmessages .getString("MSG_SCHEMA_CONSTRAINT_NOT_EXPOSED")); } return (this.constraints == null)? null : (key == null) ? this.constraints : (HierarchicalMap) this.constraints.get(key + "/_constraints"); } COM: <s> returns a hierarchical map containing constraint for specific node </s>
funcom_train/18524795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JRadioButton getcompRBtn() { if (compRBtn == null) { try { compRBtn = new JRadioButton(); compRBtn.setName("compRBtn"); compRBtn.setFont(ChartConstants.TEXT_FONT); compRBtn.setText("Vergleich"); } catch (Throwable exc) { handleException(exc); } } return compRBtn; } COM: <s> return the comp rbtn property value </s>
funcom_train/43901315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double qsfn(final double sinphi) { final double one_es = 1 - excentricitySquared; if (excentricity >= EPSILON) { final double con = excentricity * sinphi; return (one_es * ((sinphi / (1. - (con * con))) - ((0.5 / excentricity) * Math.log((1. - con) / (1. + con))))); } else { return sinphi + sinphi; } } COM: <s> calculates q snyder equation 3 12 </s>
funcom_train/11301606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append(LoggingEvent event) { //System.out.println("---Vector appender called with message ["+event.getRenderedMessage()+"]."); //System.out.flush(); try { Thread.sleep(100); } catch(Exception e) { } vector.addElement(event); } COM: <s> this method is called by the </s>
funcom_train/3167397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLevel(long level) throws PropertyVetoException { if ( this.level == level ) return; PropertyChangeEvent pce = new PropertyChangeEvent(this, CHANGE_EVENT_LEVEL_CHANGE , new Long(this.level), new Long(level)); this.fireVetoableChangeListenerVetoableChange(pce); this.level = level; this.firePropertyChangeListenerPropertyChange(pce); return; } COM: <s> setter for property level </s>
funcom_train/10357783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(byte [] buffer, int offset, int length) throws IOException { for (int i = 0; i < length; i++) { int ch = decoder.decode(in); if (ch == -1) { return i == 0 ? -1 : i; } buffer[offset + i] = (byte)ch; } return length; } COM: <s> read a buffer of data from the input stream </s>
funcom_train/44810958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createDatabaseSchema() throws DataAccessException { logger.info("Creating database schema for Hibernate SessionFactory"); HibernateTemplate hibernateTemplate = new HibernateTemplate(getSessionFactory()); hibernateTemplate.execute( new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { Connection con = session.connection(); Dialect dialect = Dialect.getDialect(getConfiguration().getProperties()); String[] sql = getConfiguration().generateSchemaCreationScript(dialect); executeSchemaScript(con, sql); return null; } } ); } COM: <s> execute schema creation script determined by the configuration object </s>
funcom_train/24622532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean generateMappingScript(){ serviceAdapter4All = new Mapping(); boolean isScriptEquals = false; try { serviceAdapter4All.generateMappingScript(expectedService, availableService, mappingScriptName); File fileA = new File(mappingScriptName); File fileB = new File(mappingScriptNameTest); lengthB = fileB.length(); lengthA = fileA.length(); if (lengthB == lengthA){ isScriptEquals = true; log.info("GENERATED: " + mappingScriptName); } } catch (Exception e) { e.printStackTrace(); } return isScriptEquals; } COM: <s> use the method </s>
funcom_train/14093039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCalculateSouthEast() { MyTestClass myClass = new MyTestClass(); myClass.setPosition(SOUTH_EAST); Point l = myClass.calculatePoint(new Rectangle(0, 0, 7, 7)); Point v = new Point(7, 7); assertEquals("SouthEast:", v, l); } COM: <s> test calculation of southeast position </s>
funcom_train/8343299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeVisibleColumn(final int modelIndex) { // find the column in our column model with the given model index for (int i = 0; i < theTable.getColumnCount(); i++) { TableColumn theColumn = theTable.getColumn(i); if (theColumn.getModelIndex() == modelIndex) { removeVisibleColumn(theColumn); break; } } } COM: <s> remove the column with the given model index from our view </s>
funcom_train/45692191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReservedBitAfterModDepthPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PartWithCommon_reservedBitAfterModDepth_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PartWithCommon_reservedBitAfterModDepth_feature", "_UI_PartWithCommon_type"), EsxPackage.Literals.PART_WITH_COMMON__RESERVED_BIT_AFTER_MOD_DEPTH, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the reserved bit after mod depth feature </s>
funcom_train/34707503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTable getPickupAlertsTable() { if (alertsTable == null) { IncidentTableModel model = getIncidentPickupTableModel(); alertsTable = new JTable(model); alertsTable.setFont(new Font("Times New Roman", Font.PLAIN, 14)); alertsTable.setGridColor(new Color(159, 138, 153)); } return alertsTable; } COM: <s> this method initializes alerts table </s>
funcom_train/48978551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expression toBasic() { Expression result = new Constant(0); for (Variable variable : getVariables()) { Expression current = new Reference(variable); if (getFactor(variable)!=null) { current = IotaOperationExecutor.multiply(current, getFactor(variable)); } result = IotaOperationExecutor.add(result, current); } if (getOffset()!=null) { result = IotaOperationExecutor.add(result, getOffset()); } return result; } COM: <s> convert this linear expression back to a basic expression </s>
funcom_train/12847420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public short readShort() throws IOException, EOFException { ////#ifdef TRACE0 // Trace.level++; // Trace.trace(Trace.level, "FilePtr.readShort()"); // Trace.level--; ////#endif /* TRACE0 */ return (short)((readByte()<<8)+readUnsignedByte()); } COM: <s> reads a signed short value </s>
funcom_train/47983168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getRadioIdForNetworkName(String networkName) { if (networkName.equals(Const.MOBILIS)) { return R.id.accedit_act_radio_mb; } else if (networkName.equals(Const.FACEBOOK)) { return R.id.accedit_act_radio_fb; } else return -1; } COM: <s> returns the id of the radio button which corresponds to the network name </s>
funcom_train/5233865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Document openDocument(final File inputFile, final String providedPwd) throws PDFException, PDFSecurityException, IOException, NullPointerException { Document retVal = null; retVal = new Document(); retVal.setSecurityCallback(new ModalSecurityCallbak(inputFile, providedPwd)); retVal.setFile(inputFile.getCanonicalPath()); return retVal; } COM: <s> opens the input document with the given password </s>
funcom_train/853990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startListDownload() { synchronized (listDownloadThreadSync) { if (listDownloadThread != null) { Toast.makeText(this, R.string.msg_list_already_downloaded, Toast.LENGTH_LONG).show(); return; } } // remove old data form view dictionaries = new ArrayList<DownloadDictionaryItem>(); exception = null; updateList(); // show progress indicator showActiveListDownload(); listDownloadThread = new ListDownloadThread(getDictionaryListUrl()); listDownloadThread.setOnPostExecutionListener(threadListener); listDownloadThread.start(); } COM: <s> starts the thread to download the list of dictionaries and prepares the </s>
funcom_train/25707289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseMoved(MouseEvent e) { JEditorPane p = (JEditorPane)e.getComponent(); if (p.isEditable()) return; Element c = characterElementAt(e); if (c != null && c.getAttributes().getAttribute(LINK) != null) { p.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); } else { p.setCursor(Cursor.getDefaultCursor()); } } COM: <s> used for display hand cursor </s>
funcom_train/16268797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDoStuffWithMockedClass() throws Exception { BaseClass test = new BaseClass(); BaseClass_duplicate mockTest = new BaseClass_duplicate(); mockTest.setup_getValue(42); MockService.getInstance().addMock(mockTest); assertEquals("Should have been mocked value", 42, test.getValue()); mockTest = null; test = null; } COM: <s> replace method call on class with method call on mock </s>
funcom_train/38578776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createInitialLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); layout.setEditorAreaVisible(false); layout.setFixed(true); // Add the control view layout.addStandaloneView(CrossCALControlView.ID, true, IPageLayout.TOP, 0.5f, editorArea); // Add the log view layout.addStandaloneView(CrossCALLogView.ID, true, IPageLayout.BOTTOM, 0.5f, editorArea); } COM: <s> this class creates and initializes the perspectives for cross cal tool </s>
funcom_train/49637098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FacetStructure getFacet(int facetID) { for (Map.Entry<String, FacetStructure> entry: facets.entrySet()) { if (entry.getValue().getFacetID() == facetID) { return entry.getValue(); } } throw new NullPointerException(String.format( "Could not locate Facet with ID %d", facetID)); } COM: <s> the facet id is specified in </s>
funcom_train/14433636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private byte averageHeightOfCells(List<HeightCell> cells) { byte averageHeight = 0; double sumHeight = 0; if(cells.size() > 0) { for(HeightCell cell : cells) { sumHeight += cell.getHeight(); } averageHeight = (byte) (sumHeight / (double) cells.size()); } return averageHeight; } COM: <s> p calculate the average height of all the height values in the </s>
funcom_train/10357154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setMultipartDataSource(MultipartDataSource mds) throws MessagingException { parts.clear(); contentType = mds.getContentType(); int size = mds.getCount(); for (int i = 0; i < size; i++) { parts.add(mds.getBodyPart(i)); } } COM: <s> initialize this multipart object from the supplied data source </s>
funcom_train/23634307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findUnknownId(String key) { if(closed) throw new IllegalArgumentException("Unknown word "+key+" found in closed model"); if(ukModels == null) return 2; for(int i = 0; i < ukModels.length; i++) { Pattern p = ukModels[i].getRegex(); if(p == null || p.matcher(key).matches()) return i+2; } throw new IllegalArgumentException("No unknown word model found to match "+key); } COM: <s> find the appropriate unknown word model for the key </s>
funcom_train/17848389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCollapseIcon(final Icon collapseIcon) { Icon oldCollapseIcon = this.collapseIcon; this.collapseIcon = collapseIcon; firePropertyChange("collapseIcon", oldCollapseIcon, this.collapseIcon); if (!collapsed) { label.setIcon(this.collapseIcon); } } COM: <s> set the collapse icon for this disclosure triangle container to </s>
funcom_train/3272849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public World initializeGameState() throws Exception{ // Get the input source for the World data InputStream gameStream = getWorldInputStream(); // Construct an XmlParser to read the input data xmlParser = new EleconicsXmlParser(new InputStreamReader(gameStream)); // Populate the World from the data stream. xmlParser.openNode(GAME_TAG); players = new Players(xmlParser); System.out.println("Parsed Players:"); world = new World(xmlParser); xmlParser.closeNode(GAME_TAG); // Release the xml parser's resources xmlParser.close(); return world; } COM: <s> initialize the starting state of the game </s>
funcom_train/23633303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuffer getText() { if (type == TYPE_LITERAL) return new StringBuffer(value); StringBuffer sb = new StringBuffer(); for (int i = 0; i < getChildCount(); i++) { sb.append( getChild(i).getText()); } return sb; } COM: <s> retrieves the transformed text of this node </s>
funcom_train/10747854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildBaseGUI() { final JPanel panel = new JPanel(); okButton.setMnemonic( okButton.getText().charAt( 0 ) ); okButton.addActionListener( this ); panel.add( okButton ); cancelButton.setMnemonic( cancelButton.getText().charAt( 0 ) ); cancelButton.addActionListener( this ); panel.add( cancelButton ); add( panel, BorderLayout.SOUTH ); } COM: <s> builds the graphical user interface of the base dialog </s>
funcom_train/2484765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void goToStateById(String id) { if (!stateMachineDescription.isGoToStateByIdAllowed()) { throw new IllegalStateException( "StateMachineDescription is marked to not allow finding or setting state by id."); } S targetState = stateMachineDescription.findStateById(id); if (targetState == null) { throw new NullPointerException("Could not find state with id '" + id + "'"); } this.currentState = targetState; } COM: <s> transitions this state machine to the state named by the id parameter </s>
funcom_train/22076240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String instance(Map env) { StringBuffer sb = new StringBuffer(); for (Iterator i = string.iterator(); i.hasNext();) { Fragment frag = (Fragment) i.next(); String rep = frag.instance(env); if (rep == null) { if (!isIgnoreMissing()) throw new IllegalArgumentException("Variable " + frag.frag + " has no value in environment"); } else sb.append(rep); } return sb.toString(); } COM: <s> instanciate this given variable string with an environment </s>
funcom_train/33630278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int totalCount(int from, int to) { int count = 0; Set<T> keys = map.keySet(); for (T key : keys) { if (getCount(key) >= from && getCount(key) < to) count += map.get(key); } return count; } COM: <s> total count items those value is between from and to </s>
funcom_train/12899900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IPropertySource getPropertySource(Object object) { IPropertySource result = null; if (propertySourceProvider != null) result = propertySourceProvider.getPropertySource(object); else if (object instanceof IPropertySource) result = (IPropertySource)object; else if (object instanceof IAdaptable) result = (IPropertySource)((IAdaptable)object).getAdapter(IPropertySource.class); return result; } COM: <s> returns a property source for the given object </s>
funcom_train/3860916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component pack() { if (children == null) return this; int n = children.size(); if (n == 0) return this; final Rectangle r = new Rectangle(); final Rectangle r2 = new Rectangle(); for (int i = 0; i < n; i++) { Component c = (Component) children.get(i); r.union(c.getBounds(r2), r); // r.setBounds(r.union(c.getBounds(r2))); } setBounds(r); return this; } COM: <s> makes this component fit its contents </s>
funcom_train/13958727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WOComponent log4jAction() { WOComponent result=null; if (canPerformActionWithPasswordKey("er.extensions.ERXLog4JPassword")) { result=pageWithName("ERXLog4JConfiguration"); session().setObjectForKey(Boolean.TRUE, "ERXLog4JConfiguration.enabled"); } return result; } COM: <s> action used for changing logging settings at runtime </s>
funcom_train/10914954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeClip(Shape s) { if (s == null) { return; } PathIterator iter = s.getPathIterator(IDENTITY_TRANSFORM); if (iter.isDone()) { // no segments available. Not worth doing anything return; } preparePainting(); processPathIterator(iter); // clip area currentStream.write("W\n"); currentStream.write("n\n"); } COM: <s> set the clipping shape for future pdf drawing in the current graphics state </s>
funcom_train/12860931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_negative_SaveNotNillableField() throws Exception { initFieldClass(); beginTransaction(); try { fieldTest.setNillableFalse(null); getEntityManager().persist(fieldTest); commitTransaction(); fail(); } catch (Exception ex) { //expected exception } } COM: <s> save an entity </s>
funcom_train/46991033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireInit(VDCBaseBean bean) { // try { bean.init(); // -- Commenting out - L.A. // } catch (Exception e) { // log(e.getMessage(), e); // ViewHandlerImpl.cache(FacesContext.getCurrentInstance(), e); // } } COM: <s> p fire an init event on an abstract page bean </s>
funcom_train/44704856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupServicePackage() { String url = SERVICE_URL; try { PackageType type = ServiceInstaller.createPackageType(); PackageInstance instance = ServiceInstaller.createPackageInstance(); SiteNode node = ServiceInstaller.mountPackageInstance(instance, url); } catch (DataObjectNotFoundException e) { throw new InitializationException ("Failed to initialize CMS global services package: ", e); } } COM: <s> creates and mounts the cms service package </s>
funcom_train/43340570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTitlePropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_PaintballField_title_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_PaintballField_title_feature", "_UI_PaintballField_type"), FieldPackage.eINSTANCE .getPaintballField_Title(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the title feature </s>
funcom_train/21125488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyTAPreCommit(String taId, String sOriginatingSite, boolean bCommited) { // iterate through listeners for(Iterator it = taCompletedListeners.iterator(); it.hasNext();) { // call notification method ((TACompletedListener) it.next()).taPreCommit(taId, sOriginatingSite, bCommited); } } COM: <s> notifies all transaction listeners that a transaction was pre commited </s>
funcom_train/28262703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(){ pbd=new ProgressBar("send"); pbd.setSize(300,150); pbd.setLocation(FileXchange.f.getLocation()); pbd.setVisible(true); pbd.setTitle("Sending "+Send.displayFileName+" to "+Send.remote_host_display); pbd.run(); } COM: <s> run method to create send bar </s>
funcom_train/46188540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Response getResponse(Blog blog, String responseId) throws BlogServiceException { String blogEntryId = responseId.substring(responseId.indexOf("/")+1, responseId.lastIndexOf("/")); BlogEntry blogEntry = getBlogEntry(blog, blogEntryId); if (blogEntry != null) { return blogEntry.getResponse(responseId); } else { return null; } } COM: <s> gets the blog entry with the specified id </s>
funcom_train/34656507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPattern(int ndx) { // System.out.println("set pattern " + ndx); Pattern pp = training.get(ndx); double[] original = pp.getInput(); for (int ii = 0; ii < original.length; ii++) { pattern[ii] = original[ii]; // System.out.println(ii + " " + original[ii]); if (original[ii] < 0.5) { pixels[ii].setBackground(java.awt.Color.black); } else { pixels[ii].setBackground(java.awt.Color.red); } } } COM: <s> show the pattern used for training </s>
funcom_train/50605549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object readUnaryNot (Builder builder) { if (!skipWhitespace()) throw new ParseException("No NOT term found in '" + data + "' at " + index); boolean not = false; if (data.charAt(index) == '!') { ++index; not = true; } Object value = readStatement(builder); if (not) value = builder.not(value); return value; } COM: <s> reads the value of a unary not </s>
funcom_train/19241395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disposeTextWidget() { if (textEditor != null) { if (controlEditor instanceof TreeEditor) ((TreeEditor) controlEditor).setEditor(null, null); else ((TableEditor) controlEditor).setEditor(null, null, 0); textEditor.dispose(); textEditor = null; } } COM: <s> close the text widget and reset the editor text field </s>
funcom_train/35113148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Value intValue (String name, final int currentValue, final String description) { return new DefaultValue(name, String.valueOf(currentValue)) { public void showDialog () { JSpinner spinner = new JSpinner(new SpinnerNumberModel(currentValue, Short.MIN_VALUE, Short.MAX_VALUE, 1)); if (showValueDialog(spinner, description)) value = String.valueOf(spinner.getValue()); } public Object getObject () { return Integer.valueOf(value); } }; } COM: <s> prompts the user for int value </s>
funcom_train/2311474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toHexString(byte[] bytes) throws UnsupportedEncodingException { byte[] hex = new byte[2 * bytes.length]; int index = 0; for (byte b : bytes) { int v = b & 0xFF; hex[index++] = HEX_CHAR_TABLE[v >>> 4]; hex[index++] = HEX_CHAR_TABLE[v & 0xF]; } return new String(hex, "ASCII"); } COM: <s> takes a byte array and returns it as a hex string </s>
funcom_train/11007532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test44770() throws Exception { try { new SlideShow(_slTests.openResourceAsStream("44770.ppt")); } catch (RuntimeException e) { if (e.getMessage().equals("Couldn't instantiate the class for type with id 1036 on class class org.apache.poi.hslf.record.PPDrawing")) { throw new AssertionFailedError("Identified bug 44770"); } throw e; } } COM: <s> bug 44770 java </s>
funcom_train/39315287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLeft3ActionPerformed() { System.out.println("testLeft3ActionPerformed"); f.left3ActionPerformed(actionEvent); assertEquals(f.curBrush,f.left3); //t.left3ActionPerformed(actionEvent); //assertEquals(t.curBrush,t.left3); assertEquals(f.toolBrush.getBrushType(), f.toolBrush.LEFT3); } COM: <s> test of left3 action performed method of class terp paint </s>
funcom_train/50982862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testService_ObjectStoreExceptionThrown() { final Exception exception = new ObjectStoreException( "foo" ); try { new ExceptionObjectStore( exception ).execute( new FakeObjectStoreCommand() ); fail( "Expected exception" ); } catch( final ObjectStoreException e ) { assertEquals( exception, e ); } } COM: <s> ensure that object store exceptions are not being wrapped </s>
funcom_train/20374638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getInputBrowseButton() { if (inputBrowseButton == null) { inputBrowseButton = new JButton(); inputBrowseButton.setBounds(new Rectangle(510, 5, 30, 20)); inputBrowseButton.setText("..."); inputBrowseButton.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { String path = new FolderChooser().getFolder(); if (!path.equals("")) { inputDirField.setText(path); } } }); } return inputBrowseButton; } COM: <s> input browse button init </s>
funcom_train/9066459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() throws USBException { if (usbDevHandle == 0) { throw new USBException("invalid device handle"); } release_interface(usbDevHandle, dev_interface); if (LibusbJava.usb_reset(usbDevHandle) < 0) { usbDevHandle = 0; throw new USBException("LibusbJava.usb_reset: " + LibusbJava.usb_strerror()); } usbDevHandle = 0; logger.info("device reset"); } COM: <s> sends an usb reset to the device </s>
funcom_train/41071096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProxyPort(Integer proxyPort) throws java.beans.PropertyVetoException { Integer oldProxyPort = this.proxyPort; vetoableChangeSupport.fireVetoableChange(PROP_PROXYPORT, oldProxyPort, proxyPort); this.proxyPort = proxyPort; propertyChangeSupport.firePropertyChange(PROP_PROXYPORT, oldProxyPort, proxyPort); } COM: <s> set the value of proxy port </s>
funcom_train/21612186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParseTree parse(String rootProductionName, String in) throws UNParserException { try { return parser.parse(rootProductionName, in); } catch (ParserException pe) { throw new UNParserException("Error while parsing string: '" + in + "'", pe); } } COM: <s> parses a given string on the specified production of i ungrammar i </s>
funcom_train/14282536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCheck() { boolean okay = false; try { Value value1 = new Value("true"); Or or = new Or(); or.addFunction(value1); or.check(); okay = false; } catch (Exception e) { e.printStackTrace(); } assertFalse("Or check failure", okay); } COM: <s> check that and correctly requires two or more functions </s>
funcom_train/22052130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object o1, Object o2) { if ( (o1 instanceof Vector) && (o2 instanceof Vector)) { if (m_sortAsc) { return sortRow( (Vector)o1, (Vector)o2); } else { return -sortRow( (Vector)o1, (Vector)o2); } } else { // Dunno what to do now! return 0; } } COM: <s> compare two entries </s>
funcom_train/3604261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateProgress(IProgressMonitor progressMonitor, Object node) { if (node instanceof ITypedElement) { String name= ((ITypedElement)node).getName(); String fmt= Utilities.getString("Differencer.progressFormat"); //$NON-NLS-1$ String msg= MessageFormat.format(fmt, new String[] { name }); progressMonitor.subTask(msg); //progressMonitor.worked(1); } } COM: <s> called for every leaf or node compare to update progress information </s>
funcom_train/35085029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItems(String[] items) { Enumeration en = this.bGroup.getElements(); while (en.hasMoreElements()) { JComponent comp = (JComponent) en.nextElement(); this.bGroup.remove((JRadioButton) comp); this.remove(comp); } init(items, null); } COM: <s> set items will set the radio button items </s>
funcom_train/1146377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void prevCurrentCard(GraphicsZone gZone) { int i = 0; if (gZone != null) { if ((gCard != null) || (gZone.getGCardList().size() != 0)) { i = gZone.getGCardList().indexOf(gCard); if (i > 0) i--; else i = 0; gCard = gZone.getGCardList().get(i); gCard.setSelected(true); } } } COM: <s> the previous card becomes the current card </s>
funcom_train/2040290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleMenu(MenuItem item) { switch (item.getItemId()) { case Constants.MENU_ITEM_SETTING: Intent intent = new Intent(); intent.setClass(GroupActivity.this, AppSettingsActivity.class); startActivity(intent); break; case Constants.MENU_ITEM_LOGOUT: doLogout(); break; } } COM: <s> handle default menu setting and logout </s>
funcom_train/43144933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutDown() { senderAlive = false; try { if (server != null) { server.close(); } } catch (IOException e) { System.out.println("IOException in FlightGearServoController::shutDown(): " + e.getMessage()); } finally { server = null; } } COM: <s> disconnects from flight gear </s>