__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/12651666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getCriterionLibraryName(EligibilityCriterion eligibilityCriterion) { // Look up the logic's first abstract criterion in the library AbstractCriterion firstCriterion = (eligibilityCriterion == null) || eligibilityCriterion.getCriterion() == null ? null : eligibilityCriterion.getCriterion().getFirstCriterion(); return (firstCriterion == null) ? null : userInterface.getLibraryName(firstCriterion); } COM: <s> returns the library of the eligibility criterions first criterion </s>
funcom_train/49608911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onInsertRecord(String username, Object o) { if (o instanceof LogFields) { LogFields logVO = (LogFields)o; if (logVO.getCreateDate()==null) logVO.setCreateDate(new java.sql.Timestamp(System.currentTimeMillis())); logVO.setCreateUser(username); logVO.setRowVersion(1L); } if (o instanceof LogicalDelete) { LogicalDelete delVO = (LogicalDelete)o; delVO.setDeleted(Consts.FLAG_N); } return true; } COM: <s> called before a record insert </s>
funcom_train/7684893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void finish(Intent intent, String title) { // Give back what was given to us (it will have the shortcut, for example) intent.putExtras(getIntent()); // Put our information intent.putExtra(EXTRA_TITLE, title); setResult(RESULT_OK, intent); finish(); } COM: <s> finishes the activity and returns the given data </s>
funcom_train/29618467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJActionBox() { if (jActionBox == null) { Vector actionOptions = new Vector(); actionOptions.add(AppTextsDAO.get("LABEL_VIEW")); actionOptions.add(AppTextsDAO.get("LABEL_EXPORT")); actionOptions.add(AppTextsDAO.get("LABEL_PRINT")); jActionBox = new JComboBox(actionOptions); jActionBox.setBounds(new java.awt.Rectangle(207,87,108,24)); jActionBox.setFont(MgisLabel.m_font.deriveFont(java.awt.Font.BOLD)); } return jActionBox; } COM: <s> this method initializes j combo box </s>
funcom_train/2496960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("RegexValidator{"); for (int i = 0; i < patterns.length; i++) { if (i > 0) { buffer.append(","); } buffer.append(patterns[i].pattern()); } buffer.append("}"); return buffer.toString(); } COM: <s> provide a string representation of this validator </s>
funcom_train/44840566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if (other == null || !(other instanceof QValue)) { return false; } else { //fields should not be null QValue otherQValue = (QValue) other; if (this._value.equals(otherQValue._value) && this._provenance.equals(otherQValue._provenance) && this._timestamp.equals((otherQValue._timestamp))) { return true; } else return false; } } COM: <s> qvalue objects are equal if both the value the provenance and the </s>
funcom_train/16797311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(ImageProcessor ip) { if (isRGB && !separateColors) rollingBallBrightnessBackground((ColorProcessor)ip, radius, createBackground, lightBackground, useParaboloid, doPresmooth, true); else rollingBallBackground(ip, radius, createBackground, lightBackground, useParaboloid, doPresmooth, true); if (previewing && (ip instanceof FloatProcessor || ip instanceof ShortProcessor)) { ip.resetMinAndMax(); } } COM: <s> background for any image type </s>
funcom_train/9441468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onOtaCloseFailureNotice() { if (DBG) log("onOtaCloseFailureNotice()..."); if (mOtaWidgetData.otaFailureDialog != null) { mOtaWidgetData.otaFailureDialog.dismiss(); mOtaWidgetData.otaFailureDialog = null; } otaShowActivateScreen(); } COM: <s> handle ota unsuccessful notice expiry </s>
funcom_train/9559038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getModelObject(Object modelObject, VariablePath variablePath) { if (variablePath.size() == 0) { return modelObject; } if (modelObject instanceof MyParent) { MyParent myParent = (MyParent) modelObject; Object child = myParent.get(variablePath.getFirstPathElement()); if (child == null) { return null; } return getModelObject(child, variablePath.removeFirstPathElement()); } return null; } COM: <s> get the model object at given path </s>
funcom_train/17893214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean hasModifier(String propertyName, Class... parameterTypes) { boolean found = false; try { Method mod = getSubject().getClass().getMethod(INITL_MODIFIER_NAME_WORD + propertyName, parameterTypes); if(mod != null) { found = true; } } catch(NoSuchMethodException e) { /* we're genuinely swallowing this one */ } return found; } COM: <s> is there an associated setter for this bean property </s>
funcom_train/42637083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number calculate(Number x) { if(x.compareTo(0)>=0 && x.compareTo(PI/8)<=0){return tan2(x);} else{ boolean negative=false; if(x.compareTo(0)<0){ x = x.minus(); negative=true; } Number result = getSin().sin0(x).divide(getCos().cos0(x)); if(negative) result = result.setMinus(); return result; } } COM: <s> pi 2 pi 2 see constructor </s>
funcom_train/12786845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSocketExampleAPMustMustNot() throws SafeException, Exception { if (isPreCommit()) { return; } TypestateRegressionUnit test = new TypestateRegressionUnit("j2se.typestate.socket.Sender", 0); test.selectTypestateRule("Socket"); test.selectAPMustMustNotTypestateSolver(); SafeRegressionDriver.run(test); } COM: <s> expected result no alarms reported </s>
funcom_train/14094392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getDebug() { Object str = getProperty(DEBUG); if (str instanceof String) { return Boolean.valueOf((String) str).booleanValue(); } else if (str instanceof Boolean) { return ((Boolean) str).booleanValue(); } return (m_propertyCache.get(DEBUG) != null); } COM: <s> get the debug state </s>
funcom_train/44921266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void neonatalCare() throws FitnessException { final Collection<Organism> neonates = new ArrayList<Organism>(); for (final Organism organism : getOrganisms()) { if (organism.getAge() == 0) neonates.add(organism); } getPopulation().getTaxon().registerBirths(this, neonates); markDeadOrganisms(new Viability_Fitness(this, LOG, new MortalityStats(this), true)); } COM: <s> register all births with the registry if any mark dead organisms with </s>
funcom_train/35883118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Link findLinkByID(String aID) { Link theA = null; List<Link> theLinksVector = getLinks(); ListIterator<Link> theListIterator = theLinksVector.listIterator(); while (theListIterator.hasNext()) { Link theCurrentA = (Link) theListIterator.next(); String theID = theCurrentA.getID(); if (theID.equals(aID)) { theA = theCurrentA; break; } } return theA; } COM: <s> finds a specific link based on the id attribute of the url </s>
funcom_train/3863189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { buildGUI(jFrame.getContentPane()); /* REVIEW reimplement sounds later * - should either be controlled by one class only * - or stoppped by each * * I think first would do better, since there are no sound interruptions * MidiManager could be implemented as daemon and/or singleton */ // player.start(); // player.play(true); } COM: <s> starts single player game </s>
funcom_train/26602112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ProductionRules processingForRestElementsInStack(DBStack stack, ArrayList list, int type) { if (list.size() > 1) { String[] array = gettingNames(list, type); return checkingForHashMap(array[0], list, type, array[1]); } return null; } COM: <s> this method is used for processing rest of elements in stack </s>
funcom_train/7817245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getResponseString() throws IOException { InputStream responseStream = this.getResponseStream(); StringBuilder sb = new StringBuilder(); BufferedReader reader = new BufferedReader( new InputStreamReader(responseStream)); String line = null; while ((line = reader.readLine()) != null) { sb.append(line); } responseStream.close(); return sb.toString(); } COM: <s> after executing the request transforms response output contained in the </s>
funcom_train/37088525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(Point3f center, float radius) { //this.center = center; this.radius = radius; tHemisphere = false; cx = centerValues[0] = center.x; cy = centerValues[1] = center.y; cz = centerValues[2] = center.z; leaf = null; stack[0] = bspt.eleRoot; sp = 1; findLeftLeaf(); } COM: <s> initialize to return all points within the sphere defined </s>
funcom_train/49263059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createLabel(final Composite parent, final SqlObject<?, ?> object) { //Controls Composite container = createComposite(parent); createLabel(container, IconFactory.getInstance().getIcon(object)); createLabel(container, object.getDescription()); //Layout GridLayout gl = new GridLayout(2, false); gl.verticalSpacing = 0; gl.marginWidth = 0; gl.marginTop = EXP.DEFAULT_INSET; gl.marginHeight = 0; container.setLayout(gl); } COM: <s> creates a label with icon to describe the given object </s>
funcom_train/43245084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetWhoseInsuranceOptions() throws Exception { System.out.println("getWhoseInsuranceOptions"); String securitytoken = secToken; org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl instance = new org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl(); String[] expResult = null; String[] result = instance.getWhoseInsuranceOptions(securitytoken); assertTrue(result.length>0); } COM: <s> test of get whose insurance options method of class org </s>
funcom_train/7660416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddAll2_IndexOutOfBoundsException() { try { LinkedList l = new LinkedList(); l.add(new Object()); LinkedList m = new LinkedList(); m.add(new Object()); l.addAll(4,m); shouldThrow(); } catch(IndexOutOfBoundsException success) {} } COM: <s> add all with too large an index throws ioobe </s>
funcom_train/47415365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fadeIn(String color, float speed, int delta){ if(blackFilter.a == 0f && fadedIn == false && backgroundFilter.a == 0f) blackFilter.a = 1f; backgroundFilter.a = 1f; if (blackFilter.a > 0f) { blackFilter.a -= delta * speed; if (blackFilter.a < 0f) blackFilter.a = 0f; } else if (blackFilter.a == 0f) fadedIn = true; } COM: <s> fade the screen in from black or white </s>
funcom_train/45121325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void isFileExists(String fileName) throws Exception { // Creating command CliCommand command = new CliCommand("dir"); command.addErrors("is not recognized as an internal or external command"); command.addMusts(new String[] { "Directory of" }); // Invoking command cliConnection.handleCliCommand("Searching for " + fileName, command); // Analyzing result setTestAgainstObject(cliConnection.getTestAgainstObject()); FindText findText = new FindText(fileName); analyze(findText); } COM: <s> asserting that file file name exists in the current directory </s>
funcom_train/5584082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encrypt(StreamBlockReader input, StreamBlockWriter output, Key key, Mode mode) throws Exception { this.calcKeyParts((SingleKey)key); TripleDESMode tdesmode = (TripleDESMode) mode; Block plainblock = new Block(64); Block cryptblock = new Block(0); while (true) { plainblock = input.read(64); if (plainblock.getLength() < 64) break; cryptblock = tdesmode.encryptBlock(plainblock); output.write(cryptblock); } plainblock = tdesmode.encryptPadding(plainblock); cryptblock = tdesmode.encryptBlock(plainblock); output.write(cryptblock); } COM: <s> encrypt a inputstream to an outputstream using a key with a special mode </s>
funcom_train/20079440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void size(int width, int height) { if (running) return; Effect we = new Effect(elem, "width", MyDOM.getWidth(elem), width); Effect he = new Effect(elem, "height", MyDOM.getHeight(elem), height); start(new Effect[] {we, he}); } COM: <s> changes the size of the element </s>
funcom_train/3272951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int popChar() throws IOException { // If the last-read char has not yet been // popped from the stream, pop it from the // stream. if (currentCharValid) { currentCharValid = false; return currentChar; } // Else, parse the next character in the stream // and pop it. currentChar = read(); advancePosition(currentChar); return currentChar; } COM: <s> pop the next character from the stream </s>
funcom_train/51412473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { JPanel pTitle = new JPanel(); FlowLayout fl = new FlowLayout(); fl.setAlignment(FlowLayout.LEFT); pTitle.setLayout(fl); JLabel labTitle = new JLabel(Lang.getLang().getString(LangItems.CMNAVTREE_NODE_TABLES_LOGGING)); labTitle.setFont(new Font("Courier New", Font.BOLD, 24)); pTitle.add(labTitle); setLayout(new BorderLayout()); add(pTitle, BorderLayout.NORTH); } COM: <s> initializing the whole panel </s>
funcom_train/48338775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getQueueSize() { synchronized (monitor) { if (TERMINATED == status) { throw new IllegalStateException("Thread pool terminated"); } if (-1 == tail) { return 0; } else if (head == tail) { return handlers.length; } else if (tail > head) { return (tail - head); } else { return (handlers.length - (head - tail)); } } } COM: <s> get the current size of this thread pools queue </s>
funcom_train/13865081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void formatAmPm(StringBuffer buf, int count, Date date) { if (date.getHours() >= 12 && date.getHours() < 24) { buf.append(dateTimeConstants.ampms()[1]); } else { buf.append(dateTimeConstants.ampms()[0]); } } COM: <s> formats am pm field according to pattern specified </s>
funcom_train/1169805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getJLabel6x() { if (jLabelInstant == null) { jLabelInstant = new JLabel(); jLabelInstant.setText("Instant:"); jLabelInstant.setLayout(null); jLabelInstant.setBounds(10, 105, 127, 14); } return jLabelInstant; } COM: <s> p get jlabel6x </s>
funcom_train/42480748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenuItem getMiHelpHelp() { if (miHelpHelp == null) { miHelpHelp = new JMenuItem(); miHelpHelp.setToolTipText(Msg.getString("label.help.help")); //$NON-NLS-1$ miHelpHelp.setText(Msg.getString("label.help.help.tooltip")); //$NON-NLS-1$ } return miHelpHelp; } COM: <s> this method initializes mi help help </s>
funcom_train/3151990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BrowseView (List header) { super(); this.header = header; setLayout (new javax.swing.BoxLayout(this, javax.swing.BoxLayout.Y_AXIS)); Processor p = new Processor() { public void run (Event e) { if (e.getData () instanceof List) reload (((List) e.getData ())); } }; this.register (DefaultEventType.SET, p); initUi (); } COM: <s> creates a new instance of products view </s>
funcom_train/10449245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSocket(NioChannel socket) { this.socket = socket; socketReadBufferSize = socket.getBufHandler().getReadBuffer().capacity(); int bufLength = skipBlankLinesSize + headerBufferSize + socketReadBufferSize; if (buf == null || buf.length < bufLength) { buf = new byte[bufLength]; } } COM: <s> set the underlying socket </s>
funcom_train/50575364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doneStatus() { System.out.println("doneStatus"); if (SwingUtilities.isEventDispatchThread() || Tuneology.isMainThread()) int_close(); else SwingUtilities.invokeLater(new Runnable() { public void run() { int_close(); } } ); } COM: <s> close the status dialog </s>
funcom_train/124802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTablePopup(JPopupMenu menu) { tablePopup = menu; if (tablePopup == null) removeMouseListener(triggerPopUp); else { triggerPopUp = new MouseAdapter() { public void mouseReleased(MouseEvent e) { tablePopup.processMouseEvent(e, null, null); } }; addMouseListener(triggerPopUp); } } COM: <s> sets the code right code mouse popup for the table </s>
funcom_train/8629307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expression getCheckConstraint(Session session, String asColumnName) throws SQLException { if (checkConstraint == null) { return null; } Parser parser = new Parser(session); String sql; synchronized (this) { String oldName = name; name = asColumnName; sql = checkConstraint.getSQL(); name = oldName; } Expression expr = parser.parseExpression(sql); return expr; } COM: <s> get the check constraint expression for this column if set </s>
funcom_train/46439617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveFeedFile(FeedJob feedJob, String sourceDir, String destDir) { final FeedFile feedFile = feedJob.getFeedFile(); final String fileName = feedFile.getFeedFileName(); final String homeDir = getHomeDirectory(feedFile.getFeed()); FileMoveHelper.moveFromDirToDir(homeDir, fileName, fileName, sourceDir, destDir); } COM: <s> moves the feed file associated to the given feed job from the specified </s>
funcom_train/39810837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllForCompany(int id) throws SQLException { List retList = new ArrayList(); try { this.conn = this.openConnection(); PreparedStatement ps = conn.prepareStatement(UserSQL.GET_ALL_FOR_COMPANY); ps.setInt(1, id); ResultSet rs = ps.executeQuery(); while (rs.next()) { UserVO newUser = new UserVO(rs); retList.add(newUser); } } finally { this.closeConnection(); } return retList; } COM: <s> used to retrieve all users for a given company </s>
funcom_train/13992334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public myXML getElement(int index) { if (element == null) return null; if (element.getClass() != Vector.class) return null; Vector v = (Vector)element; if (index > v.size()) return null; if (index < 0) return null; return(myXML)v.get(index); } COM: <s> retrieve the element object at the specified b index b </s>
funcom_train/8065622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Layer findLayerNamed(String aName) { int count = _layers.size(); for (int layerIndex = 0; layerIndex < count; ++layerIndex) { Layer curLayer = (Layer) _layers.get(layerIndex); if (aName.equals(curLayer.getName())) return curLayer; } return null; } COM: <s> find a layer with the given name somewhere in the layer tree </s>
funcom_train/806547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean createEmptyResource() { String extension=getExtension(); IBioResource br=parentFolder.createChildResource(getSequenceName() + extension,""); if (br==null){ System.out.println("Error creating empty resource"); return false; } BiojavaResource bjbr = (BiojavaResource) br; IBioResourceFormat format=getFormat(); bjbr.saveInFormat(format); BioResourceView.executeDoubleClick(bjbr); // BioResourceView.refreshFromItem(br.getParent()); return true; } COM: <s> generate an empty biojava resource </s>
funcom_train/8988189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String newCondition(String language, boolean isAnd){ StringBuffer buffer = new StringBuffer(); this.displayCondPlus = false; if (!Utility.isEmpty(condDescArr[0])) { this.recordCondition(); } condDescArr[0] = this.getSelectCondition(language); return this.getOldCondition(isAnd); } COM: <s> new a condition </s>
funcom_train/36683737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoIntersections1() { GeometricParameters bodyA = new GeometricParameters(new Circle(1), new Vector2f(1, 1)); GeometricParameters bodyB = new GeometricParameters(new Circle(5), new Vector2f(0, 0)); CircleCircleIntersector intersector = new CircleCircleIntersector( bodyA, bodyB); List<Vector2f> list = intersector.findIntersections(); Assert.assertEquals(list.size(), 0); } COM: <s> test if one circle is inside another </s>
funcom_train/18241597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean shouldReorient(Object pSource, Object pClient) { // We know our client is the supporting sequences panel. It // should not reorient itself if the source is either the // consensus segment panel or itself. boolean ret = (pSource != this.consensusPanel && pSource != this.supportingSequencesPanel); return ret; } COM: <s> code ionscreen location manager code method </s>
funcom_train/32908177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectToAccessDatabase(String fileName, String user, String password) throws ClassNotFoundException, SQLException{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); conn = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" + fileName, user, password); isAccess = true; } COM: <s> connect to a microsoft access database using jdbc odbc </s>
funcom_train/45075675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PolicyDecisionEvaluators getPolicyDecisionEvaluators() { NamedPolicyEvaluator[] npe = new NamedPolicyEvaluator[evaluators.size()]; for (int i = 0; i < evaluators.size(); i++) npe[i] = evaluators.get(i).getNamedPolicyEvaluator(); PolicyDecisionEvaluators pde = new PolicyDecisionEvaluators(npe, combinator); return pde; } COM: <s> convert the list to a policy decision evaluators object </s>
funcom_train/2369832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Player nextPlayer() { synchronized (this) { if (this.currentPlayer != null) { int index = this.players.indexOf(this.getCurrentPlayer()) + 1; index %= this.players.size(); this.currentPlayer = this.players.get(index); this.fireChange(); } } return this.currentPlayer; } COM: <s> switches to the next player </s>
funcom_train/2489191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveValues () { Hashtable hash = new Hashtable(); hash.put("buildFile", buildFile.getText()); hash.put("compileStr", compileStr.getText()); hash.put("cleanStr", cleanStr.getText()); ant.saveSettings( hash ); } COM: <s> pass the values entered to the settings object for saving </s>
funcom_train/25072246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeCurrentForm(Attributes attributes) { form.setId(Byte.parseByte(attributes.getValue("id"))); form.setAppId(Byte.parseByte(attributes.getValue("application"))); form.setOpId(Integer.parseInt(attributes.getValue("operation"))); form.setName(attributes.getValue("name")); } COM: <s> initializes the current code form code being read in the application </s>
funcom_train/37721303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Container createWesternPanel(Dimension size) { tableModel= new ColumnTableModel(); table = new JTable(tableModel); table.getTableHeader().setReorderingAllowed(false); table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); table.getColumnModel().getColumn(1).setCellEditor(new DefaultCellEditor(fieldType)); table.setPreferredScrollableViewportSize(size); return new JScrollPane(table); } COM: <s> create a western panel </s>
funcom_train/31414611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getHexString(byte val) { String hexString; if (val < 0) hexString = Integer.toHexString(val + 256); else hexString = Integer.toHexString(val); if (hexString.length()<2) return "0" + hexString.toUpperCase(); return hexString.toUpperCase(); } COM: <s> calculates the hex string from a byte </s>
funcom_train/13395187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List selectUserByCreateTime(Date begin_time, Date end_time) { String[] param = new String[] { "begin_time", "end_time" }; Object[] value = new Object[] { begin_time, end_time }; String sql = "from RegisterUser _user where _user.createTime between :begin_time and :end_time "; return (getHibernateTemplate().findByNamedParam(sql, param, value)); } COM: <s> example user hibernate template </s>
funcom_train/47673445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getOsValue() { ObjectName objectName = null; try { objectName = new ObjectName(muleDomain + ":type=org.mule.MuleContext,name=MuleServerInfo"); return (String) server.getAttribute(objectName, "OsVersion"); } catch (Exception ex) { return "ERROR"; } } COM: <s> gets the os version from mules mbean server </s>
funcom_train/21105419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MJButton getBtModParam() { if (btModParam == null) { btModParam = new MJButton(); btModParam.setMnemonic(KeyEvent.VK_M); btModParam.setPreferredSize(new java.awt.Dimension(100, 26)); btModParam.setText("Modify Par."); } return btModParam; } COM: <s> this method initializes bt mod param </s>
funcom_train/47089417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadXML(String filename) { try { xmlFile = new File(filename); DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); Document doc = docBuilder.parse(xmlFile); doc.getDocumentElement().normalize(); NodeList commandList = doc.getElementsByTagName("command"); addCommands(commandList); } catch (Exception ex) { ex.printStackTrace(); } } COM: <s> load and parse the xml containing the commands documentation </s>
funcom_train/20884893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPadCharacterDTO() { TestDTO dto = createPadCharacterDTO("value", "value2"); assertTrue(JSefaTestUtil.serialize(FLR, dto).toString().equals("value##########$$value2" + LINE_BREAK)); } COM: <s> test to test the flr serialization deserialization with focus on the pad character </s>
funcom_train/38413952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPingListener( NetPingListener pListener ) { if(pListener==null) return; if( pingLock!=null ) synchronized( pingLock ) { if( pingThread==null ) return; // No longer living net connnection // just swap the listener pingThread.pListener = pListener; return; } // Ping Thread Creation pingLock = new Object(); pingThread = new PingThread(pListener); pingThread.start(); } COM: <s> to set a ping listener for this network connection </s>
funcom_train/15557419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add( FuncBinding binding ) throws CompileError { if ( !isGlobal() ) throw new CompileError( "Function definition is allowed only in the global scope" ) ; if ( funcs.containsKey( binding.getName() ) ) { throw new CompileError( "function " + binding.getName() + " is already defined" ) ; } funcs.put( binding.getName(), binding ) ; } COM: <s> add a new function binding to the table </s>
funcom_train/20205877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void renderPagingLinkContainer(HtmlStringBuffer buffer, int pageNumber) { if (pageNumber - 1 == getCurrentPage()) { buffer.append("<li class=\"active\">"); } else { buffer.append("<li>"); } renderPagingLink(buffer, pageNumber); buffer.append("</li>"); buffer.append("\n"); } COM: <s> render the page link container </s>
funcom_train/46760773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InvoiceModel getInvoice(final long invoiceId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { if (call.isStoreAudit()) { BaseData.getSecurity().storeAudit(call.getUserRefId(), invoiceId, "Viewed Invoice", call); } return BillingData.getInvoice(invoiceId, call); }}; return (InvoiceModel) call(method, call); } COM: <s> return the single invoice model for the primary key </s>
funcom_train/50774174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateComponentUI(JComponent component) { component.updateUI(); Component[] components = component.getComponents(); for (int i=0; i<components.length; i++) { if(components[i] instanceof JComponent) { updateComponentUI((JComponent) components[i]); } } } COM: <s> updates the look feel of the given component </s>
funcom_train/4718788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static class Util { private static UserLoginRpcAsync instance; public static UserLoginRpcAsync getInstance() { if (instance == null) { UserLoginRpcAsync service = (UserLoginRpcAsync) GWT.create(UserLoginRpc.class); ServiceDefTarget endpoint = (ServiceDefTarget) service; String moduleRelativeURL = GWT.getModuleBaseURL(); moduleRelativeURL += "../userLogin.rpc"; endpoint.setServiceEntryPoint(moduleRelativeURL); instance = service; } return instance; } } COM: <s> utility class for simplifing access to the instance of async service </s>
funcom_train/6205895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean idExists(String id) { Iterator it = getValidationSteps().iterator(); while (it.hasNext()) { IValidationStepData step = (IValidationStepData) it.next(); if (id.equals(step.getId())) { return true; } } return false; } COM: <s> check if a given id is being used </s>
funcom_train/46379133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String restoreWFSName(String fileName) throws IOException { File wfsFile = new File(getBaseDir(), fileName); if (!wfsFile.exists()) { return null; } BufferedReader br = new BufferedReader(new FileReader(wfsFile)); return br.readLine(); } COM: <s> restore a wfs url from disk </s>
funcom_train/14141800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double variance( int col ) { double sum = 0.0; int rowCount = getRowCount(); double colTotal = columnTotal( col ); double mean = colTotal / rowCount; Object value; for( int i = 0; i < rowCount; i++ ) { value = getValueAt( i, col ); try { sum += Math.pow( Double.parseDouble( value.toString() ) - mean, 2 ); } catch( NumberFormatException e ) { } } return sum / rowCount; } COM: <s> returns the mathematical variance of the values in the specified column </s>
funcom_train/4864814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuffer toStringBuffer(StringBuffer in) { if (in == null) { in = new StringBuffer(32); } else { in.ensureCapacity(in.length() + 32); } in.append("{ Holder: o = "); in.append(o); in.append(" }"); return in; } COM: <s> appends a string representation of this object to the given </s>
funcom_train/17117779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean determinePromtScheduled(long promt_id) { List sampleIDs = findSampleIDsByPromtID(promt_id); Iterator iterator = sampleIDs.iterator(); while (iterator.hasNext()) { int sampleID = Integer.parseInt(iterator.next() + ""); if (determineSampleScheduled(sampleID)) { // as soon as I find ONE return true return true; } } return false; } COM: <s> findout if b any b of the samples have been scheduled </s>
funcom_train/46623138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resolveAllProperties(Properties props) throws BuildException { for (Enumeration e = props.keys(); e.hasMoreElements();) { String name = (String) e.nextElement(); Stack referencesSeen = new Stack(); resolve(props, name, referencesSeen); } } COM: <s> resolve properties inside a properties hashtable </s>
funcom_train/50343830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JComboBox getConsistComboBox(){ JComboBox box = new JComboBox(); box.addItem(""); List<String> consistNames = getConsistNameList(); for (int i=0; i<consistNames.size(); i++) { box.addItem(consistNames.get(i)); } return box; } COM: <s> creates a combo box containing all of the consist names </s>
funcom_train/35682120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LegStarRequest createT1sleeptRequest() throws HostAccessStrategyException { try { LegStarAddress address = new LegStarAddress("TheMainframe"); LegStarRequest request = new LegStarRequest("Request01", address, getT1sleeptRequestMessage()); return request; } catch (HeaderPartException e) { throw new HostAccessStrategyException(e); } } COM: <s> create a long request over 4 secs </s>
funcom_train/3427555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findTemplates(Dictionary templates) { if (_default != null) { templates.put(_default, this); } for (int i = 0; i < _patterns.size(); i++) { final LocationPathPattern pattern = (LocationPathPattern)_patterns.elementAt(i); templates.put(pattern.getTemplate(), this); } } COM: <s> returns by reference the templates that are included in </s>
funcom_train/49206585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLabelToJob(String label, JobId jobId) { if (StringUtils.isEmpty(label) || jobId == null) { return; } label = formatLabel(label); labelJobsMap.put(label, jobId); jobLabelsMap.put(jobId, label); // set new label as included if (!labelsMap.containsKey(label)) { labelsMap.put(label, Boolean.TRUE); } notifyLabelsChangeEvent(); LabelsPersistenceHelper.persist(); } COM: <s> adds the label to job </s>
funcom_train/1905044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadXMLDocumentZipFormat() throws PropertyNotFoundException { debug("\nRunning: testReadXMLDocumentZipFormat test"); String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber + PropertyService.getProperty("document.accNumSeparator") + "1"; assertTrue(handleReadAction(name, "zip")); } COM: <s> test read a xml document in zip format successfully </s>
funcom_train/49409699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setArcReaderID(String name) { String ext = "arc"; name = name.substring(0, name.length() - ext.length()); arcReaderID = name.substring(name.lastIndexOf(System.getProperty("file.separator")), name.length()); } COM: <s> called by constructor to set arcid for arc reader instance </s>
funcom_train/18728127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMode(final int newMode) { if (newMode != currentMode) { final int old = currentMode; currentMode = newMode; if (currentMode == JaxoConstants.VERTEX) { currentMode = vertexType; } thePanel.distributePropertyChange("Jaxo.mode", old, currentMode); } } COM: <s> sets the current drawing edit mode </s>
funcom_train/32711667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void feedForward() { int x, y; for (x = 0; x < this.neurons.size(); x++) for (y = 0; y < getNeuron(x).synapses.size(); y++) getNeuron(x).getSynapse(y).first.input += getNeuron(x).output * getNeuron(x).getSynapse(y).second; } COM: <s> feedforwards the values until they reach the last layer </s>
funcom_train/44707150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWidgets() { super.addWidgets(); add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.government_uid"))); ParameterModel governmentUIDParam = new StringParameter(GOVERNMENT_UID); TextField governmentUID = new TextField(governmentUIDParam); governmentUID.setSize(30); add(governmentUID); } COM: <s> adds widgets to the form </s>
funcom_train/32965623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBindingContext() { String ns =getXmlNS(); if (ns==null) throw new IllegalArgumentException( "Namespace required to determine binding context" ); if ("urn:astm-org:CCR".equals(ns)) return "org.tolven.ccr"; if ("urn:tolven-org:trim:4.0".equals(ns)) return "org.tolven.trim"; return null; } COM: <s> when non null specifies the xml to java binding context </s>
funcom_train/12810471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onParagraph(PdfWriter writer, Document document, float position) { n++; PdfContentByte cb = writer.getDirectContent(); PdfOutline root = cb.getRootOutline(); PdfDestination destination = new PdfDestination(PdfDestination.FITH, position); if (named) { cb.localDestination("p" + n, destination); new PdfOutline(root, PdfAction.gotoLocalPage("p" + n, false), "paragraph " + n); } else { new PdfOutline(root, destination, "paragraph " + n); } } COM: <s> adds an outline for every new paragraph </s>
funcom_train/48493646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addImage(String tileSet, String tileName, BufferedImage image, boolean xReflect, boolean yReflect) { if (image == null) { logger.error("Image cannot be null"); return; } String name = tileSet + "$" + tileName; images.put(name, new TileImage(image, xReflect, yReflect)); } COM: <s> adds an image to the set of images </s>
funcom_train/38157513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showMetadata() { int row = resultTable.getSelectedRow(); if(row < 0) { return; } TreePath path = resultTable.getTree().getSelectionPath(); SearchResult result = (SearchResult) path.getLastPathComponent(); new MetadataDialog(result).show(); } COM: <s> display the metadata of the currently selected file </s>
funcom_train/51130016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTargetsOfWaitingPlayers() { for (MatchFieldPlayer p : currentBlock) { if (p.getFsm().isInState(FieldPlayerStateWait.getInstance()) || p.getFsm().isInState(FieldPlayerStateReturnToHomeRegion.getInstance())) { p.getSteering().setTarget(p.getHomeRegion().getCenter()); } } } COM: <s> update targets of waiting players </s>
funcom_train/43895769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator iterator() { final Iterator iterator = contents.values().iterator(); return new Iterator() { Feature currFeature = null; public boolean hasNext() { return iterator.hasNext(); } public Object next() { currFeature = (Feature) iterator.next(); return currFeature; } public void remove() { iterator.remove(); fireChange(currFeature, CollectionEvent.FEATURES_REMOVED); } }; } COM: <s> returns an iterator over the elements in this collection </s>
funcom_train/39366935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write() throws SeisException { String filePath = _datasetPath + File.separator + Seisio.FILE_PROPERTIES_XML; try { ParameterSetIO.writeFile(_rootParameterSet, filePath); } catch (IOException e) { throw new SeisException("Error writing file XML file '" + filePath + "'"); } } COM: <s> writes the properties tree to disk </s>
funcom_train/30041745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Subscription verifySubscription(Subscribable subscribable, CommunicatorID communicator) throws NotFoundException { Subscription subscription = _subscriptionDao.findSubscription(subscribable, communicator); if(null == subscription) { throw new NotFoundException( "Subscription " + "destination [" + subscribable + "] " + "communicator [ " + communicator + "] not found."); } return subscription; } COM: <s> gets the subscription </s>
funcom_train/13316768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean evaluate(Object o) { boolean rc = false; try { java.util.Vector params = ((com.objectmentors.state.Event) o).getParameters(); String str = (String) params.elementAt(0); if (Value.equals(str)) { rc = true; } } catch (ClassCastException ex) { ex.printStackTrace(); } return rc; } COM: <s> insert the methods description here </s>
funcom_train/23442714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addElementFormDefaultPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SchemaType_elementFormDefault_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SchemaType_elementFormDefault_feature", "_UI_SchemaType_type"), SchemaPackage.Literals.SCHEMA_TYPE__ELEMENT_FORM_DEFAULT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the element form default feature </s>
funcom_train/29719809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEligibleForMovement() { // check if entity is offboard if (isOffBoard() || isAssaultDropInProgress()) { return false; } // check game options if (!game.getOptions().booleanOption("skip_ineligable_movement")) { return true; } // must be active if (!isActive() || isImmobile()) { return false; } return true; } COM: <s> pretty much anybodys eligible for movement </s>
funcom_train/8408514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(int index, Collection collection) { if (fast) { synchronized (this) { ArrayList temp = (ArrayList) list.clone(); boolean result = temp.addAll(index, collection); list = temp; return (result); } } else { synchronized (list) { return (list.addAll(index, collection)); } } } COM: <s> insert all of the elements in the specified collection at the specified </s>
funcom_train/13524177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetObservations() { String [] obs = contr.getObservations(); assertTrue(obs.length == 4); for (int i = 0;i<4;i++) { assertTrue(obs[i].equals("obs1.txt") || obs[i].equals("obs2.txt") || obs[i].equals("obs3.txt") || obs[i].equals(ControllerImpl.ALLOBSERVATIONS)); } } COM: <s> test get observations </s>
funcom_train/51616105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void applyParameters(TransformerHandler handler) { Transformer transformer = handler.getTransformer(); Iterator i = parameters.entrySet().iterator(); while (i.hasNext()) { Map.Entry parameter = (Map.Entry)i.next(); transformer.setParameter(parameter.getKey().toString(), parameter.getValue()); } } COM: <s> apply parameter values to a handler </s>
funcom_train/48738688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() throws JspException { // Render any previously accumulated body content if (bodyContent != null) { try { JspWriter out = getPreviousOut(); out.print(bodyContent.getString()); } catch (IOException e) { throw new JspException (messages.getMessage("common.io", e.toString())); } } // Continue processing this page return (EVAL_PAGE); } COM: <s> clean up after processing this enumeration </s>
funcom_train/41666485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void add(DefaultMutableTreeNode parent, List<IEntity> sub) { Iterator<IEntity> i = sub.iterator(); for (IEntity entity : sub) { DefaultMutableTreeNode child = new DefaultMutableTreeNode(entity); parent.add(child); List<IEntity> subEntitiesList = entity.getChildNeighbor(code) .getList(); if (!subEntitiesList.isEmpty()) { add(child, subEntitiesList); } } } COM: <s> adds a child to a parent </s>
funcom_train/12279128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMenuItem(String parentId, MenuItem menuItem) { MenuItem parent = parentId == null ? null : (MenuItem) menuMap.get(parentId); if (parent != null) { menuItem.setParent(parent); parent.addChild(menuItem); } else { menus.add(menuItem); } menuMap.put(menuItem.getId(), menuItem); } COM: <s> add a menu item to the menu tree </s>
funcom_train/3168382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XnRegion chooseMany(XnRegion region, IntegerValue n) { return arrange(region).keysOf(0, n.asInt32()); /* udanax-top.st:30932:IntegerUpOrder methodsFor: 'accessing'! {XnRegion} chooseMany: region {XnRegion} with: n {IntegerVar} "Return the first n positions in the region according to my ordering." ^(self arrange: region) keysOf: Int32Zero with: n DOTasLong! */ } COM: <s> return the first n positions in the region according to my ordering </s>
funcom_train/4970280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveValues(TransformerHandler handler) throws SAXException { Attributes2Impl atts = new Attributes2Impl(); handler.startElement("", "", "xuw", atts); for (ParameterSection section : sections) { section.saveValues(handler); } handler.endElement("", "", "xuw"); } COM: <s> saves all registered parameters in all sections to xml using the given </s>
funcom_train/1658519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClientPutDir insert(File dir, String defaultName, FreenetURI insertURI) throws FileNotFoundException, IdentifierCollisionException, MalformedURLException{ FCPClient client = fcpServer.getGlobalClient(); clientPutDir = new ClientPutDir( client, insertURI, "echo-" + System.currentTimeMillis(), Integer.MAX_VALUE, RequestStarter.BULK_SPLITFILE_PRIORITY_CLASS, ClientRequest.PERSIST_FOREVER, null, false, false, -1, dir, defaultName, false, true, false); clientPutDir.start(); fcpServer.forceStorePersistentRequests(); return clientPutDir; } COM: <s> inserts a directory on freenet </s>
funcom_train/13515728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONArray toJSONArray(JSONArray names) throws JSONException { if (names == null || names.length() == 0) { return null; } JSONArray ja = new MJSONArray(); for (int i = 0; i < names.length(); i += 1) { ja.put(this.opt(names.getString(i))); } return ja; } COM: <s> produce a jsonarray containing the values of the members of this </s>
funcom_train/37646378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTempConnection() { //get the X-Temp-Connection from either the headers received String value=getProperty(ConnectionHandshakeHeaders.X_TEMP_CONNECTION); //if X-Temp-Connection header is not received, return false, else //return the value received if(value == null) return false; else return Boolean.valueOf(value).booleanValue(); } COM: <s> returns true iff this connection is a temporary connection as per </s>