__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/17395766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Job getNextJob() { Job jobToRun = null; synchronized (syncObj) { for (Job tmpJob: jobs) { if (tmpJob.canRun() == false) continue; if (jobToRun == null) jobToRun = tmpJob; else if (tmpJob.isUrgent()) { jobToRun = tmpJob; break; } } if (jobToRun != null) jobs.remove(jobToRun); } return jobToRun; } COM: <s> retrieves the next job to be run </s>
funcom_train/26339941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasNationalProject(Improvement improvement) { int improvementId = improvement.getId(); if (improvementId < 28 || improvementId > Protocol.nImp) { throw new IndexOutOfBoundsException(); } return _buf.get(Protocol.TPlayerContext.NatBuilt + improvementId - 28) == 1; } COM: <s> checks whether a national project is built already national projects </s>
funcom_train/40535410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testServletMapping2() { makeAsyncCall(GWT.getModuleBaseURL() + "test/longer", new AsyncCallback() { public void onFailure(Throwable caught) { fail(caught.toString()); } public void onSuccess(Object result) { finishTest(); assertEquals(new Integer(2), result); } }); } COM: <s> should call the implementation that returns 2 </s>
funcom_train/550095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean confirm() { return JOptionPane.showConfirmDialog(null, "The file " + file.toString() + " exists, " + "do you want to overwrite it?", "Alert", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION; } COM: <s> code confirm code a dialog which is used to make the user </s>
funcom_train/26629557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateAndRemoveUser() throws AuthorizationException { User u = getDummyUser(); User newUser = null; newUser = userBiz.storeUser(u,null); assertNotNull("Newly created user should not be null", newUser); assertNotNull("Newly create user should have an ID", newUser.getUserId()); assertTrue("Newly create user should have same login as dummy user", u.getLogin().equals(newUser.getLogin())); } COM: <s> test create remove user </s>
funcom_train/112308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object iO) { if (iO != null) { DocumentType documentType = (DocumentType) iO; if(documentType.name == null) { if(name == null) return true; } else if(name == null) { if(documentType.name == null) return true; } else if(name.equals(documentType.name)) return true; } return false; } COM: <s> indicates whether some other object is equal to this document type </s>
funcom_train/12521118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFieldInfos() { FieldBinding[] syntheticFields = referenceBinding.syntheticFields(); FieldBinding[] fieldBindings = referenceBinding.fields(); for (int i = 0, max = fieldBindings.length; i < max; i++) { addFieldInfo(fieldBindings[i]); } if (syntheticFields != null) { for (int i = 0, max = syntheticFields.length; i < max; i++) { addFieldInfo(syntheticFields[i]); } } } COM: <s> internal use only </s>
funcom_train/2951707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LineBox getLineAt(int offset) { LineBox[] children = this.children; for (int i = 0; i < children.length; i++) { if (children[i].hasContent() && offset <= children[i].getEndOffset()) { return children[i]; } } return this.lastContentLine; } COM: <s> returns the line box at the given offset </s>
funcom_train/17931851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRow(EDocument edoc){ Object[] obj = {new Boolean(false),edoc.getId()+"",edoc.getEleValue("title"), edoc.getAuthorsStr(), edoc.getEleValue("abstract")}; data.addElement(obj); edoclist.put(edoc.getId()+"", edoc); int size = getRowCount(); fireTableRowsInserted(size-1,size-1); } COM: <s> adds an edocument object as a new row </s>
funcom_train/30407239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUser(String email) throws SLAdminException { try{ User user = (User)em.createQuery("from UserImpl u where u.email = :email") .setParameter("email", email) .getSingleResult(); DataInitializer.initialize(user.getOrganization()); DataInitializer.initialize(user.getOrganization().getNickName()); return user; }catch(NoResultException e){ return null; }catch (NonUniqueResultException e) { throw new SLAdminException ("NonUniqueResult"); } } COM: <s> get user from db by email </s>
funcom_train/43444616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMobileWebResult(MobileWebResult param) { if (localMobileWebResult == null) { localMobileWebResult = new MobileWebResult[] {}; } // update the setting tracker localMobileWebResultTracker = true; java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil .toList(localMobileWebResult); list.add(param); this.localMobileWebResult = (MobileWebResult[]) list.toArray(new MobileWebResult[list.size()]); } COM: <s> auto generated add method for the array for convenience </s>
funcom_train/2572982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void error(String msg) { String name = getClass().toString(); name = name.substring(name.lastIndexOf('.') + 1); System.err.println(name + (id != null ? "(" + id + ")" : "") + ": " + msg); } COM: <s> print an error message to stderr prepending the plugin name </s>
funcom_train/32129012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFormParameter(String name, String buf, int iStart) { String param = name + "\""; String value = "value=\""; int iParamName = buf.indexOf(param, iStart); int iParamValue = buf.indexOf(value, iParamName) + value.length(); int iParamValueEnd = buf.indexOf("\"", iParamValue); return buf.substring(iParamValue, iParamValueEnd).replaceAll( "[\n\r\t]", ""); } COM: <s> gets a form parametr out of a string </s>
funcom_train/46790923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void defineEntry(int codepoint, int character, String name) { // byte/name association nameDecoding[codepoint] = name; Integer codePointInteger = new Integer(codepoint); namedEncoding.put(name, codePointInteger); // byte character association indexDecoding[codepoint] = character; indexedEncoding.put(new Integer(character), codePointInteger); // if ((character >= 0) && (character < ARRAY_MAPPING_SIZE)) { fastEncoding[character] = codepoint; } } COM: <s> define an entry that establishes a relationship between codepoint </s>
funcom_train/16695807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(short lineNumber, byte[] b) { if (b.length == 0) return; int ico = this.currentInserter.offset; this.makeSpace(lineNumber, b.length); System.arraycopy(b, 0, this.code, ico, b.length); } COM: <s> inserts a sequence of bytes at the current insertion position </s>
funcom_train/14229124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receiveDTMF(String digits) { // store them for future retrieval StringBuffer sb = this.getDigitBucket(); synchronized (sb) { sb.append(digits); } // act on any RTCs? // act on resource properties if (this.getSendDtmf()) { this.getManager().getListener().mediaSignalDetectorDetected(this.getAddress(), net.sourceforge.gjtapi.media.SymbolConvertor.convert(digits)); } // notify views this.getListener().receiving(digits); } COM: <s> act on incoming dtmf signals </s>
funcom_train/15607156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(GraphicContext gc) { double pixw = gc.pixelWidth(); double pixh = gc.pixelHeight(); Bounds targetBounds = targetBounds(); FastRectGlyph.paint (gc, targetBounds.x - pixw * pixelGap, targetBounds.y - pixh * pixelGap, targetBounds.width + pixw * (2*pixelGap-1), targetBounds.height + pixh * (2*pixelGap-1), null, color); } COM: <s> paint the adornment </s>
funcom_train/1753292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static class App { private static FoldersServiceAsync ourInstance = null; public static synchronized FoldersServiceAsync getInstance() { if (ourInstance == null) { ourInstance = (FoldersServiceAsync) GWT.create(FoldersService.class); ((ServiceDefTarget) ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL() + "folders"); } return ourInstance; } } COM: <s> utility convinience class </s>
funcom_train/48600024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void xmlIn(BufferedReader uri, WriterXML out, boolean validating) { try { xmlIn(new InputSource(uri), out, validating); } catch (SAXException e) { System.err.println(uri.toString()); xmlException(e); } } COM: <s> runs the parser based on a buffered reader </s>
funcom_train/18644399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getParentNameForBoundVariable(String variable) { String ret=null; if (m_variableBindings != null && m_variableBindings.containsValue(variable)) { Iterator iter=m_variableBindings.keySet().iterator(); while (ret == null && iter.hasNext()) { String key=(String)iter.next(); String val=(String)m_variableBindings.get(key); if (val.equals(variable)) { ret = key; } } } return(ret); } COM: <s> this method identifies the name of the parent sessions </s>
funcom_train/10191132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean startsWithIgnoreCase(String s) { for (int k = 0; k < s.length() && (m_nIndex + k) < m_strString.length(); k++) { if (compareIgnoreCase(s.charAt(k), m_strString.charAt(m_nIndex + k)) != 0) { return false; } } return true; } COM: <s> whether next chars equal to a specific string i s i ignoring case </s>
funcom_train/9442722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Keyboard getTypeChangeKeyboard(int type) { try { Keyboard[] kbd = mKeyboard[mCurrentLanguage][mDisplayMode][type][mShiftOn][mCurrentKeyMode]; if (!mNoInput && kbd[1] != null) { return kbd[1]; } return kbd[0]; } catch (Exception ex) { return null; } } COM: <s> get the keyboard changed the specified keyboard type </s>
funcom_train/4744119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeBatch(String instanceID) { ExecuteBatchAction executeBatchAction = actionRegistry .getCoreAction(ExecuteBatchAction.class); executeBatchAction.setProperties(authenticator.getUsername(), authenticator.getHash(), instanceID, batchFile); try { result = null; result = executeBatchAction.call(); } catch (Exception e) { messageHandler.throwExceptionMessage(e); } } COM: <s> execute a batch file </s>
funcom_train/20295463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadRDF() throws ContactServException { InputStream in; in = FileManager.get().open(inputFileName); if (in == null) { throw new ContactServException( ContactServException.RDF_FILE_DOESNOT_EXIST, "File: " + inputFileName + "not found"); } // read the RDF/XML file model.read(in, ""); } COM: <s> load contacts from repository </s>
funcom_train/2289520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsUUID publishResource(String resourcename, boolean publishSiblings, I_CmsReport report) throws Exception { CmsResource resource = readResource(resourcename, CmsResourceFilter.ALL); CmsUUID publishHistoryId = OpenCms.getPublishManager().publishProject(this, report, resource, publishSiblings); OpenCms.getPublishManager().waitWhileRunning(); return publishHistoryId; } COM: <s> publishes a single resource </s>
funcom_train/785588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Index getIndex(String field, Class expType, boolean create) { if ( !expType.equals(getColumnType(field)) ) { // TODO: need more nuanced type checking here? throw new IllegalArgumentException("Column type does not match."); } if ( getIndex(field)==null && create) { index(field); } return getIndex(field); } COM: <s> internal method for index creation and retrieval </s>
funcom_train/28993611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTo(String address, String personal) { try { m_to = new InternetAddress(address, personal); } catch (UnsupportedEncodingException e) { PortalSystem.getTrace().log(TraceCapable.EXCEPTION, "EmailMessageMediator>>#setTo - Exception Occured"); PortalSystem.handle(e); { } } } COM: <s> method set to </s>
funcom_train/32791636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OUT accessExtent(String modelname) throws ModelAccessException { Repository repository = RepositoryManager.getRepository(); OUT modelExtent; try { modelExtent = (OUT) repository.getModel(modelname); } catch (RepositoryException e) { throw new ModelAccessException(ERROR_ACCESS, modelname); } if (modelExtent == null) { throw new ModelAccessException(ERROR_ACCESS, modelname); } return modelExtent; } COM: <s> access a model for the given type name the repository </s>
funcom_train/17914973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMatchDevice_1() { DeviceIdent deviceIdent = new DeviceIdent(); MockHttpRequest request = new MockHttpRequest(); try { deviceIdent.matchDevice(request); fail("failed to throw IllegalState Exception after calling matchDevice before DeviceIdent has been prepared."); } catch(IllegalStateException state) { //OK } catch(UnknownDeviceException ude) { fail("Unexpected UnknownDeviceException."); } } COM: <s> test method string match device request </s>
funcom_train/648466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getJTextPane() { if (jTextPane == null) { jTextPane = new JTextPane(); jTextPane.setContentType("text/plain"); jTextPane.setEditable(false); jTextPane.setBackground(java.awt.SystemColor.control); HTMLEditorKit h = new HTMLEditorKit(); jTextPane.setEditorKit(h); try { h.read(new StringReader(ABOUT_TEXT), jTextPane.getDocument(), 0); } catch (Exception e) { } } return jTextPane; } COM: <s> this method initializes j text pane </s>
funcom_train/38318963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Context parse (LineNumberReader rd, PrintWriter wr) throws BuildException { try { final Context context= new Context(_module, _srcDir); String line= rd.readLine(); while (line != null) { parse(context, line, rd.getLineNumber(), wr); line= rd.readLine(); } return context; } catch (IOException e) { throw new BuildException( "Cannot read input file [" + _inputFile.getAbsolutePath() + "].", e ); } } COM: <s> parses the input and writes the report </s>
funcom_train/1518263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyEvent(KeyEvent e) { // Recall key events based on types if(e.getID() == KeyEvent.KEY_PRESSED) keyPressed(e); else if(e.getID() == KeyEvent.KEY_RELEASED) keyReleased(e); else if(e.getID() == KeyEvent.KEY_TYPED) keyTyped(e); } COM: <s> recalls key events based on type </s>
funcom_train/4305647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAnimationThread(Thread thread) { this.animationThread = thread; if (thread != null) { // For Stage.doDestroy() if (threadGroup == null || !threadGroup.parentOf(thread.getThreadGroup())) { threadGroup = thread.getThreadGroup(); } } } COM: <s> called by the stage </s>
funcom_train/35046004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { if(local_addr != null) down(new Event(Event.REMOVE_ADDRESS, local_addr)); local_addr=null; cluster_name=null; my_view=null; // changed by Bela Sept 25 2003 //if(mq != null && mq.closed()) // mq.reset(); connected=false; } COM: <s> initializes all variables </s>
funcom_train/37448404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getUniqueShortLabel(NewtServerProxy.NewtResponse response) { // Save the computed a short label. String newlabel = computeShortLabel(response.getFullName()); // new label is empty if a label cannot be constructed. if (newlabel.length() == 0) { // Get the default short label from the newt response. return response.getShortLabel(); } return newlabel; } COM: <s> returns a unique short label </s>
funcom_train/45121580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AbstractField_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AbstractField_name_feature", "_UI_AbstractField_type"), DictionaryPackage.Literals.ABSTRACT_FIELD__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DatabasePropertyCategory"), null)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/40613738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Value getDefaultValue(Session session, Column column) { Expression defaultExpr = column.getDefaultExpression(); Value v; if (defaultExpr == null) { v = column.validateConvertUpdateSequence(session, null); } else { v = defaultExpr.getValue(session); } return column.convert(v); } COM: <s> get or generate a default value for the given column </s>
funcom_train/31664383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyFile(File in, File out) throws Exception { FileInputStream filein = new FileInputStream(in); FileOutputStream fileout = new FileOutputStream(out); byte[] buf = new byte[1024]; int i = 0; while ( (i = filein.read(buf)) != -1) { fileout.write(buf, 0, i); } filein.close(); fileout.close(); } COM: <s> copy a file </s>
funcom_train/11771493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextFieldTime getJTextFieldTimeTot() { if (jTextFieldTimeTot == null) { jTextFieldTimeTot = new JTextFieldTime(1, 0, 0); jTextFieldTimeTot.setFont(GuiFont.FONT_PLAIN); } return jTextFieldTimeTot; } COM: <s> this method initializes j text field time race </s>
funcom_train/46377039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void takeControl () { if (app == null) return; if (!app.isInSas()) { if (SwingUtilities.isEventDispatchThread()) { takeControlPerform(); } else { try { SwingUtilities.invokeLater(new Runnable () { public void run () { takeControlPerform(); } }); } catch (Exception ex) { throw new RuntimeException(ex); } } } } COM: <s> tell the arbiter that this user is take control of the app </s>
funcom_train/13546473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean noDuplicateTimes(HashSet instrList, float maxRank) { for (Iterator its = ((HashSet)instrList.clone()).iterator(); its.hasNext(); ) { Instruction inst = (Instruction)its.next(); if(inst.getExecTime() == maxRank) return false; } return true; } COM: <s> this method has something to do with the resource limitations checking </s>
funcom_train/32759447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedDeviceSilently(String strDevId) { ListSelectionListener[] arrLsns = this.lbxDevs.getListSelectionListeners(); for (ListSelectionListener lsn : arrLsns) this.lbxDevs.removeListSelectionListener(lsn); this.lbxDevs.setSelectedValue(strDevId, true); for (ListSelectionListener lsn : arrLsns) this.lbxDevs.addListSelectionListener(lsn); } COM: <s> sets the profile deviced selected </s>
funcom_train/3761193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pageExpires() { response.setDateHeader("Last-Modified", (new java.util.Date()).getTime()); response.setHeader("Pragma", "no-cache"); response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate"); response.setDateHeader("Expires", 0); } COM: <s> sets the no cache criterion for the current page </s>
funcom_train/32220535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getInsertXml() { wrapper = new Envelope(); wrapper.set(versionAddr,version); wrapper.setAttribute("transactionData", "action", "insert"); wrapper.set(submitterIdAddr,submitterId); wrapper.set(submitterGroupAddr,submitterGroup); wrapper.set(contentIdAddr,contentId); wrapper.set(contentUrlAddr,contentUrl); wrapper.set(repositoryIdAddr,repositoryId); insertSecondaryUrls(); wrapper.set(timestampAddr,DateUtil.toString(timestamp)); wrapper.set(metadataSchemaAddr,metadataSchema); insertLom(); return adjustXML(wrapper.marshall()); } COM: <s> return the envelope xml for an insert operation based on the </s>
funcom_train/23182693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disconnect(ConTypes conType) { logger.info("disconnectDbCon(conType) - Entry"); Connection currCon = null; switch (conType) { case DBPOPULATOR: currCon = this.conDbPopulator; break; case DBEXTRACTOR: currCon = this.conDbExtractor; break; case DBCREATOR: currCon = this.conDbCreator; break; } try { if (currCon != null) { currCon.close(); } } catch (SQLException e) { } finally { currCon = null; } logger.info("disconnectDbCon(conType) - Exit"); } COM: <s> this method closes the jdbc connection to the database </s>
funcom_train/9910150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFieldChange(FieldChange pFieldChange) { if (pFieldChange == null) return; if (this.fieldChanges == null) { this.fieldChanges = new ArrayList<FieldChange>(); } if (!this.fieldChanges.contains(pFieldChange)) { this.fieldChanges.add(pFieldChange); } } COM: <s> adds the field change </s>
funcom_train/570952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCalendar(Calendar cal) { _cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH)); _cal.set(Calendar.MONTH, cal.get(Calendar.MONTH)); _cal.set(Calendar.YEAR, cal.get(Calendar.YEAR)); removeAll(); createGUI(); updateUI(); DayLabel dayLabel = (DayLabel) _days.get(cal.get(Calendar.DAY_OF_MONTH) - 1); dayLabel.grabFocus(); setBackground(BACKGROUND_COLOR); } COM: <s> sets the current date using a calendar object </s>
funcom_train/1653721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAttribute() { HTMLNode methodHTMLNode = new HTMLNode(SAMPLE_OKAY_NODE_NAME); assertNull(methodHTMLNode.getAttribute(SAMPLE_OKAY_ATTRIBUTE_NAME)); methodHTMLNode = new HTMLNode(SAMPLE_OKAY_NODE_NAME,SAMPLE_OKAY_ATTRIBUTE_NAME,SAMPLE_ATTRIBUTE_VALUE); assertEquals(SAMPLE_ATTRIBUTE_VALUE,methodHTMLNode.getAttribute(SAMPLE_OKAY_ATTRIBUTE_NAME)); methodHTMLNode = new HTMLNode("#",SAMPLE_OKAY_ATTRIBUTE_NAME,SAMPLE_ATTRIBUTE_VALUE); assertEquals(SAMPLE_ATTRIBUTE_VALUE,methodHTMLNode.getAttribute(SAMPLE_OKAY_ATTRIBUTE_NAME)); methodHTMLNode = new HTMLNode("%",SAMPLE_OKAY_ATTRIBUTE_NAME,SAMPLE_ATTRIBUTE_VALUE); assertEquals(SAMPLE_ATTRIBUTE_VALUE,methodHTMLNode.getAttribute(SAMPLE_OKAY_ATTRIBUTE_NAME)); } COM: <s> tests get attribute method using </s>
funcom_train/17396617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMinTimeNsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Metrics_minTimeNs_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Metrics_minTimeNs_feature", "_UI_Metrics_type"), TracePackage.Literals.METRICS__MIN_TIME_NS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the min time ns feature </s>
funcom_train/3412784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getDataElements(int[] components, int offset, Object pixel) { int rgb = (components[offset+0]<<16) | (components[offset+1]<<8) | (components[offset+2]); if (supportsAlpha) { rgb |= (components[offset+3]<<24); } else { rgb &= 0xff000000; } return getDataElements(rgb, pixel); } COM: <s> returns a data element array representation of a pixel in this </s>
funcom_train/4609631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getObject(String packageContext, String xml) throws JAXBException{ JAXBContext jaxbContext = getJAXBContext( packageContext ); if(jaxbContext==null){ return null; } // Get the xml representation of the objectToBeMarshalled Unmarshaller unMarshaller = jaxbContext.createUnmarshaller(); return unMarshaller.unmarshal(new StringReader(xml)); } COM: <s> this method creates an object from the packge context and xml provided </s>
funcom_train/37205938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void consumeXML(Element element) { Element flattenList = element.getChild(FLATTENLIST, XScufl.XScuflNS); if (flattenList == null) { return; } Attribute depth = flattenList.getAttribute(DEPTH, XScufl.XScuflNS); if (depth == null) { return; } try { setDepth(depth.getIntValue()); } catch (DataConversionException ex) { logger.warn("Invalid depth: " + depth.getValue()); } } COM: <s> extract the lt flattenlist depth x gt number from the extensions </s>
funcom_train/15601457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storeMessage(String property, String contents){ //retreive the current value String oldContents = receivedMessages.containsKey(property) ? receivedMessages.get(property) : ""; //store the new value this.receivedMessages.put(property,contents); //spread the property System.out.println("Ivy "+property + " "+ contents); support.firePropertyChange(property, oldContents, contents); //spread the property } COM: <s> store the value of the property and spread it </s>
funcom_train/33817329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkExibeImagem () { if (okExibeImagem == null) {//GEN-END:|49-getter|0|49-preInit // write pre-init user code here okExibeImagem = new Command ("Exibe imagem", Command.OK, 0);//GEN-LINE:|49-getter|1|49-postInit // write post-init user code here }//GEN-BEGIN:|49-getter|2| return okExibeImagem; } COM: <s> returns an initiliazed instance of ok exibe imagem component </s>
funcom_train/9501712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoPoint Midpoint(GeoPoint P, GeoPoint Q) { boolean oldValue = cons.isSuppressLabelsActive(); cons.setSuppressLabelCreation(true); GeoPoint midPoint = Midpoint(null, P, Q); cons.setSuppressLabelCreation(oldValue); return midPoint; } COM: <s> creates midpoint m p q 2 without label for use as e </s>
funcom_train/4151211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reduce(StageGameState b) { b.removeModel(sections.remove(0)); falling = true; gravitate = true; if (sections.size() > 0) { sections.get(0).trackable = true; sections.get(0).vulnerable = true; for (int i=0; i<sections.size(); i++) sections.get(i).gravitate = true; } else trackable = true; } COM: <s> destroy the lowest rock segment </s>
funcom_train/18318725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GContainer getOuter() { Chain temp = new Chain(tempg); temp = GraphHelper.getInstance() .dfsChainSearchUnOri(tempg, temp, (SimpleVertex) tempg.getVertices().get(0), (SimpleVertex) tempg.getVertices().get(0)); // removing unneeded association tempg.removePropertyAsc(GraphHelper.getInstance()); return temp; } COM: <s> get outer face two set </s>
funcom_train/26345499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ipSync() throws IOException { if (SSL == 0) { byte[] b = new byte[2]; b[0] = -1; b[1] = -12; cbuf.clear(); cbuf.put((char) 255); cbuf.put((char) 244); cbuf.flip(); sc.write(encoder.encode(cbuf)); cbuf.clear(); sc.sendUrgentData(sc.sc, 255); sc.sendUrgentData(sc.sc, 242); // sync (DM) } } COM: <s> sends the import ip sync senquence </s>
funcom_train/28270581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Integer getZoneId(String zoneName) { Integer zoneId = null; zoneName = zoneName.trim().toLowerCase(); List<SelectItem> zones = vars.getZonesMenu(); for (SelectItem item:zones) { String itemValue = (String)item.getLabel().toLowerCase(); if (itemValue.trim().equals(zoneName)) { zoneId = (Integer)item.getValue(); break; } } return zoneId; } COM: <s> gets the zone id </s>
funcom_train/29842707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number getStartValue(final int row, final int column, final int subinterval) { Number result = null; final TaskSeries series = (TaskSeries) this.data.get(row); final int tasks = series.getItemCount(); if (column < tasks) { final Task task = series.get(column); final Task subtask = task.getSubtask(subinterval); result = new Long(subtask.getDuration().getStart().getTime()); } return result; } COM: <s> returns the start value of a sub interval for a given item </s>
funcom_train/48506320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear (String pluginName) { UserContext context = lobby.getUserContext(); // create a message to send to server String msg = "<admin-command version='1.0' id='589a39591271844e3fbe32bbb9281ad9'>"; msg += "<plugin-clear plugin=\"" + pluginName + "\"/>"; msg += "</admin-command>"; Document d = Message.construct(msg); Message m = new Message(d); try { context.getClient().sendToServer(m); } catch(NullPointerException e) { Debug.println("Not connected to a server"); } } COM: <s> clears the stats for given plugin name </s>
funcom_train/41385518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTextBuscar() { if (textBuscar == null) { textBuscar = new JTextField(); textBuscar.setBounds(new Rectangle(60, 15, 180,20)); textBuscar.setText(""); textBuscar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { listener.Action(e); } }); } return textBuscar; } COM: <s> this method initializes text buscar </s>
funcom_train/22483665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void refreshValue(Object object) { if (! internalChange) try { internalChange = true; if (object == null && jToggleButton != null) // Defines the null state to the "dummy" jToggleButton object jToggleButton.setSelected(true); else // Changes the BeanButtonModel state this.setSelected(this.isItemSelected(object)); } finally { internalChange = false; } } COM: <s> updates the bean button model with the specified object state </s>
funcom_train/35281851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVerticalAlignment(BitmapFont.VAlign align) { if (block.getTextBox() == null && align != VAlign.Top) { throw new RuntimeException("Bound is not set"); } block.setVerticalAlignment(align); letters.invalidate(); needRefresh = true; } COM: <s> set vertical alignment </s>
funcom_train/16392671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startGraphElement( Attributes attribs ) { String directed = attribs.getValue( XGMML.DIRECTED_ATTRIBUTE_LITERAL ); if( directed != null && directed.equals( "1" )) this.directed = true; String graphic = attribs.getValue( XGMML.GRAPHIC_ATTRIBUTE_LITERAL ); if( graphic != null && graphic.equals( "1" )) this.graphic = true; } COM: <s> detects if the graph is directed or not </s>
funcom_train/3410251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Window getGlobalActiveWindow() throws SecurityException { synchronized (KeyboardFocusManager.class) { if (this == getCurrentKeyboardFocusManager()) { return activeWindow; } else { if (focusLog.isLoggable(Level.FINER)) { focusLog.log(Level.FINER, "This manager is " + this + ", current is " + getCurrentKeyboardFocusManager()); } throw new SecurityException(notPrivileged); } } } COM: <s> returns the active window even if the calling thread is in a different </s>
funcom_train/9368548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateQueryHint() { if (isShowing()) { String hint = null; if (mSearchable != null) { int hintId = mSearchable.getHintId(); if (hintId != 0) { hint = mActivityContext.getString(hintId); } } mSearchAutoComplete.setHint(hint); } } COM: <s> update the hint in the query text field </s>
funcom_train/38388563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void postUpdateIcon(final IJavaElement element) { postRunnable(new Runnable() { public void run() { // 1GF87WR: ITPUI:ALL - SWTEx + NPE closing a workbench window. Control ctrl= fViewer.getControl(); if (ctrl != null && !ctrl.isDisposed()) fViewer.update(element, new String[]{IBasicPropertyConstants.P_IMAGE}); } }); } COM: <s> updates the package icon </s>
funcom_train/25714571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int queryCache(int namespace, String name, OperatorType type) { Pair<Integer, String> pair = new Pair<Integer, String>(namespace, name + "." + type.toString()); Integer id = cacheIdent.get(pair); return (null == id) ? 0 : id; } COM: <s> query value from cache </s>
funcom_train/18025046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMinimum( double minimum) { if (minimum == this.minimum) { return; } if (minimum > this.maximum) { setPosition(this.maximum, minimum); } else { double oldValue = this.minimum; this.minimum = minimum; firePropertyChange( PROP_MINIMUM, oldValue, minimum); revalidate(); } } COM: <s> set the normal position of the minimum of the row or column </s>
funcom_train/15487641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.setText(Application.messages.getString("CREATION_PANEL_VALIDATE")); jButton.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { onValidate(); } }); } return jButton; } COM: <s> this method initializes j button </s>
funcom_train/10609197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int skipBytes(int count) throws IOException { if (count > 0) { long currentPos = getFilePointer(), eof = length(); int newCount = (int) ((currentPos + count > eof) ? eof - currentPos : count); seek(currentPos + newCount); return newCount; } return 0; } COM: <s> skips code count code number of bytes in this stream </s>
funcom_train/25437852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); jFrame.setLayout(new FlowLayout()); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jFrame.setJMenuBar(getJJMenuBar()); jFrame.setSize(530, 300); jFrame.setContentPane(getJContentPane()); jFrame.setTitle("Rapidant Demo Application"); } return jFrame; } COM: <s> this method initializes j frame </s>
funcom_train/257137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnTypes(Collection cols, int type) { String field; for (Iterator it = cols.iterator(); it.hasNext();) { field = it.next().toString(); int col = getColumnPos(field); this.setColumnType(col, type); } } COM: <s> sets the column type for a set of column names to specified type </s>
funcom_train/3774390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String createPasswordHash(String username, String password) { /* String passwordHash = Util.createPasswordHash(hashAlgorithm, hashEncoding, hashCharset, username, password); return passwordHash; **/ super.log.warn("No hash available!!"); return null; } COM: <s> if hashing is enabled this method is called from code login code </s>
funcom_train/22895459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void requestSend() { Thread.yield(); synchronized(this) { if (this.log.isDebugEnabled()) this.log.debug("## entering requestSend()"); this.dataAvailableFromObol = true; this.notifyAll(); while(false == this.dataReceivedFromObol) { try { this.wait(); } catch (InterruptedException e) { /* ignored */ } } if (this.log.isDebugEnabled()) this.log.debug("## leaving requestSend()"); } } COM: <s> invoked by the obol runtime when it wishes to send data over the </s>
funcom_train/21999310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IMoney getCashValue() { IMoney value = Money.ZERO; for (Iterator iterator = accounts.iterator(); iterator.hasNext();) { Account account = (Account) iterator.next(); if (account.getType() == Account.CASH_ACCOUNT) { CashAccount cashAccount = (CashAccount) account; value = value.add(cashAccount.getValue()); } } return value; } COM: <s> get the cash value of the portfolio on the latest day </s>
funcom_train/14375833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveOptions() { for (int i=0;i<configItems.size();i++) { Object o=configItems.get(i); if (o instanceof HGBaseConfigItem) { HGBaseConfigItem ci=(HGBaseConfigItem)o; ci.saveOption(); } } } COM: <s> saves the options from the menu </s>
funcom_train/20576471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLoadDataModel() { log.debug("loadDataModel"); String modelUrl = "file:/users/twilson/ontologies/mcd/mcd.owl"; String base = mcdUri; GraphStore instance = GraphStore.getInstance(); instance.loadDataModel(modelUrl, base); // log.debug("Data model = " + instance.getDataModel()); assert true; } COM: <s> test of load data model method of class graph store </s>
funcom_train/43337100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Fact getFact(Concept primaryElement, InstanceContext ctx) { Iterator<Fact> factListIterator = factSet.iterator(); while (factListIterator.hasNext()) { Fact currFact = factListIterator.next(); if (currFact.getConcept().equals(primaryElement)) { if (currFact.getInstanceContext().equals(ctx)) { return currFact; } } } return null; } COM: <s> returns the fact for a specific concept and a context </s>
funcom_train/30097075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQueryPrivateCaption() { String msg = null; if (selectedPrivateQuery == null) msg = "Select a search from the list. These are the searches you previously defined" + " and saved."; else msg = "Click the Start Search button to run or modify the " + selectedPrivateQuery + " that you previously created and saved."; return(msg); } //end of getQueryPrivateCaption COM: <s> this method returns the description for the selected user private query </s>
funcom_train/11752134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setElementModelBounds() { for (Object o : getChildren()) { ElementEditPart elementEditPart = (ElementEditPart) o; Figure elementFigure = (Figure) elementEditPart.getFigure(); if (elementFigure != null) { Rectangle bounds = elementFigure.getBounds().getCopy(); ModelElement element = (ModelElement) elementEditPart.getModel(); element.setBounds(bounds); } } return true; } COM: <s> updates the element bounds in the model so that the same bounds </s>
funcom_train/11729174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFrozenUUID() throws Exception { Property p = version.getNode(jcrFrozenNode).getProperty(jcrFrozenUuid); assertEquals("jcr:fronzenUuid should be of type string", PropertyType.TYPENAME_STRING, PropertyType.nameFromValue(p.getType())); } COM: <s> tests if the jcr frozen uuid property has the correct type </s>
funcom_train/1146742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void alertError(String message) { Alert alert = new Alert("Error", message, null, AlertType.ERROR); Display display = Display.getDisplay(this); Displayable current = display.getCurrent(); if (!(current instanceof Alert)) { // This next call can't be done when current is an Alert display.setCurrent(alert, current); } } COM: <s> displays an error message in alert </s>
funcom_train/50139984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getConnection() throws org.jwarp.service.persistence.PersistenceException { try { return jdo.getPersistenceContext().getDriver().getConnection(null); } catch (org.jwarp.persist.PersistenceException pe) { throw new org.jwarp.service.persistence.PersistenceException(pe); } catch (Exception e) { throw new org.jwarp.service.persistence.PersistenceException(e); } } COM: <s> returns a connection from the current driver </s>
funcom_train/47129210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize() throws Exception { Properties props = new Properties(); props.setProperty(VelocityEngine.RESOURCE_LOADER, "classpath"); props.setProperty("classpath." + VelocityEngine.RESOURCE_LOADER + ".class", ClasspathResourceLoader.class .getName()); Velocity.init(props); utility = ClassGeneratorUtility.getInstance(); fitFormatter = new FitFormatter(); } COM: <s> initializes model velocity exporter </s>
funcom_train/37000615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ScriptEngine getEngineByMimeType(String mimeType){ ScriptEngine engine = null; ScriptEngineFactory factory = (ScriptEngineFactory) mimeTypeAssociations.get(mimeType); if (factory != null) { // gets a new instance of the Scripting Engine engine = factory.getScriptEngine(); // sets the GLOBAL SCOPE engine.setBindings(globalscope,ScriptContext.GLOBAL_SCOPE); } return engine; } COM: <s> retrieves new instance the scripting engine for a specifed mime </s>
funcom_train/168056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Document newInstance() { try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); return db.newDocument(); } catch (Exception e) { log.error("Error creating new instance of DOM Document", e); } return null; } COM: <s> create a new instance of dom document </s>
funcom_train/37824820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DrawModule addModule(String name,int x,int y){ String englisch = names.getText(name,false); String german = names.getText(name,true); x /= shrinkFactor; y /= shrinkFactor; DrawModule module = new DrawModule(name,englisch,german); module.setToolTipText(module.getName()); add(module); module.setActionCommand(name); module.addActionListener(this); prepareDND(module); Dimension dim = module.getPreferredSize(); module.setBounds(x,y,dim.width,dim.height); modulesToDraw.put(name,module); module.setState("notstarted"); return module; } COM: <s> add the module htmlbutton at position x y </s>
funcom_train/32061393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Starsystem getFirstStarsystemInList(Vector<SpaceObject> thingslist) { argcheckNull(thingslist, "thingslist"); Starsystem firststarsystem = null; if (!(thingslist.isEmpty())) { for (SpaceObject so : thingslist) { if (so instanceof Starsystem) firststarsystem = (Starsystem) so; } } return firststarsystem; } COM: <s> returns the first starsystem found in the specified list or null if the </s>
funcom_train/39290774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(IPath path) throws IOException { getResource(path); Map options = new HashMap(); options.put(XMLResource.OPTION_DECLARE_XML, Boolean.TRUE); // options.put(BPELResource.OPTION_USE_BPEL_TYPE, Boolean.TRUE); resource.load(options); } COM: <s> loads the content of the model from the file </s>
funcom_train/46884360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Position findPosition(final ReversiBoard board) { int level = BitBoard.countBits(board.getWhite() | board.getBlack()); Map positions = (Map) levels.get(level); Position tmp = new Position(board.getWhite(), board.getBlack(), board.isWtm()); return (Position) positions.get(tmp); } COM: <s> try to find a position </s>
funcom_train/50140969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean unlock(Object key) { Object theLock; synchronized (this) { theLock = locks.get(key); } if (theLock == null) { return true; } else if (this.getCallerId() == theLock) { locks.remove(key); return true; } else { return false; } } COM: <s> unlock the given key </s>
funcom_train/45617190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TagValueEntry getTagValueEntry(String tag) { if (tag == null) { throw new IllegalArgumentException("tag can not be null"); } TagValueEntry tve = values.get(tag.toLowerCase()); if (tve != null) { return tve; } for (BibTeXEntry xref : crossrefs.values()) { tve = xref.getTagValueEntry(tag); if (tve != null) { return tve; } } return null; } COM: <s> get the tag value entry cross references are followed </s>
funcom_train/3549280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDateOfBirth(Date newDateOfBirth) { if (newDateOfBirth != null && dateOfDeath != null) { if (newDateOfBirth.after(dateOfDeath)) { logger.warn("Received dateOfBirth after dateOfDeath, PersonImpl " + getID()); throw new IllegalArgumentException("Person cannot normally pass through time in reverse."); } } dateOfBirth = newDateOfBirth; } COM: <s> sets persons date of birth </s>
funcom_train/32098057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addEmptyColumnToExistingTable(String newFieldName) { /* addEmptyColumnToExistingTable */ String colData[]= new String[this.tRows]; for(int r=0;r<tRows;r++) colData[r]= new String(""); return(addColumnToTable(newFieldName, null, colData)); } /* addEmptyColumnToExistingTable */ COM: <s> add empty column to existing table add empty column to existing table </s>
funcom_train/44286951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageIcon getIconLabel(String label) { ComboItem item; int size = getItemCount(); for (int i = 0; i < size; i++) { item = (ComboItem)getItemAt(i); if (item.label.equals(label)) return item.icon; } return null; } COM: <s> returns the icon associated to the given label </s>
funcom_train/3410353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNotify() { synchronized (getTreeLock()) { Container parent = this.parent; if (parent != null && parent.getPeer() == null) { parent.addNotify(); } if (peer == null) { peer = getToolkit().createWindow(this); } synchronized (allWindows) { allWindows.add(this); } super.addNotify(); } } COM: <s> makes this window displayable by creating the connection to its </s>
funcom_train/19636178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void verify() { super.verify(); Iterator iterator1 = collection.iterator(); Iterator iterator2 = confirmed.iterator(); while (iterator2.hasNext()) { assertTrue(iterator1.hasNext()); Object o1 = iterator1.next(); Object o2 = iterator2.next(); assertEquals(o1, o2); } } COM: <s> runs through the regular verifications but also verifies that </s>
funcom_train/25014626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireChangeEvent(double oldCpu) { if( oldCpu != currentValues[POS_JVM_CPU]) { for(int idx=0,sz=listeners.size(); idx < sz; idx++ ) { ((IValueChangedListener)listeners.get(idx)).valueChanged(METRIC_JVM_CPU, oldCpu, currentValues[POS_JVM_CPU]); } } } COM: <s> notify all listeners of a change events </s>