__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4509657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAdminAccount(JID jid) { if (adminList == null) { loadAdminList(); } JID bareJID = new JID(jid.toBareJID()); if (!adminList.contains(bareJID)) { return; } // Remove user from admin list cache. adminList.remove(bareJID); // Store updated list of admins with provider. provider.setAdmins(adminList); } COM: <s> removes an account from the list of admin accounts based off jid </s>
funcom_train/40296366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getContent(Idea idea, String fieldName) { String content = null; try { content = (String) ClassUtility.getObject(idea, fieldName); } catch (Exception e) { LOG.error("Error occure during getting value from idea for field : " + fieldName); } return content; } COM: <s> this method fetch the value of different attribute of idea </s>
funcom_train/8627810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeLast(boolean trimToSize) { int i = records.size() - 1; UndoLogRecord r = (UndoLogRecord) records.remove(i); if (!r.isStored()) { memoryUndo--; } if (trimToSize && i > 1024 && (i & 1023) == 0) { records.trimToSize(); } } COM: <s> remove the last record from the list of operations </s>
funcom_train/3785463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clean() { /* clean */ if(nSpots>0) { /* Clear spotList[0:nSpots-1] */ /* Prompt "are you sure" and clear spot list if 'yes' */ clearSpotList(); } spotListBkup= null; /* will be created when do backup */ nSpotsBackup= 0; } /* clean */ COM: <s> clean cleanup the instance </s>
funcom_train/25332957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSequenceDAO() throws Exception { DBDAOSingleSpeciesCoreFactory instance = new DBDAOSingleSpeciesCoreFactory(); DBSpecies sp = new DBSpecies(); instance.setSpecies(sp); DBDNASequenceDAO result = instance.getSequenceDAO(); assertNotNull(result); assertTrue(result.getFactory()==instance); assertTrue(result.getSpecies()==sp); } COM: <s> test of get sequence dao method of class dbdaosingle species core factory </s>
funcom_train/29922486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOwner(UserDO user, ResourceDO resource, UserGroupDO newOwner)throws ResourceStoreAuthorisationException { //verify method attribute this.verifyAttribute(resourceOwnerAttr); //checking user is valid this.authenticatedCheck(user); this.administratorCheck(user,resource); //adding attribute to user or group this.grantAttribute(newOwner,resourceOwnerAttr,resource); }//end method COM: <s> adds an owner to the resource </s>
funcom_train/35947731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Text trimStart() { int first = 0; // First character index. int last = length() - 1; // Last character index. while ((first <= last) && (charAt(first) <= ' ')) { first++; } return subtext(first, last + 1); } COM: <s> returns a copy of this text with leading whitespace omitted </s>
funcom_train/21953581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { if (o instanceof SearchTermIcon) { int otherValue= ((SearchTermIcon) o).getIntValue(); if ( getIntValue() < otherValue) return -1; else if (getIntValue() == otherValue) return 0; else return 1; } throw new ClassCastException("object is not a SearchTermIcon."); } COM: <s> compares this search term icon to another search term icon </s>
funcom_train/12158110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeGetProjectName(boolean fromObject) { out.println (); if (fromObject) { out.println(" RepositoryObjectIdentity identity = " + "object.getIdentity();"); } out.println (" String projectName = " + "jdbcConnection.getProjectName(identity);"); } COM: <s> write code which gets the project name from an object or identity using </s>
funcom_train/21656273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtFechaFin() { if (BtFechaFin == null) { BtFechaFin = new JButton(); BtFechaFin.setBounds(new Rectangle(270, 210, 40, 25)); BtFechaFin.setText("..."); BtFechaFin.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { seleccionarFechaFin(); } }); } return BtFechaFin; } COM: <s> this method initializes bt fecha fin </s>
funcom_train/40560430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeleteInvalidTable() { SQLDelete insert; // create with null table. try { insert = new SQLDelete(conn, null); fail("Creating with nulls should have generated an " + "IllegalArgumentException"); } catch (IllegalArgumentException e) { assertTrue(true); } // create with null table. try { insert = new SQLDelete(conn, ""); fail("Creating with an empty table name should have generated an " + "IllegalArgumentException"); } catch (IllegalArgumentException e) { assertTrue(true); } } COM: <s> test creating a sqldelete object with a null and empty table </s>
funcom_train/48153560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setQuantiles(){ double p; testVariable.reset(); testGraph.reset(); quantileTable.setDistribution(testVariable.getDistribution()); quantileTable.setCount(sampleSize); for (int i = 0; i < sampleSize; i++) testVariable.setValue(quantileTable.getQuantile(i)); testGraph.repaint(); probabilityPlot.resetData(); if (getTime() > 0) for (int i = 0; i < sampleSize; i++) probabilityPlot.addPoint(orderStatistics[i], quantileTable.getQuantile(i)); probabilityPlot.repaint(); } COM: <s> this method sets the quantiles of the test distribution </s>
funcom_train/12156229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Project createDestinationXMLProject(LocalRepository repository) { String dirName = args.getValue(DESTINATION_DIR); File dir = new File(dirName); ProjectFactory factory = ProjectFactory.getDefaultInstance(); ProjectConfiguration configuration = factory.createProjectConfiguration(); configuration.setRepository(repository); configuration.setDeleteProjectContents(args.contains(REPLACE)); configuration.setPolicyLocation(dir.getAbsolutePath()); return factory.createProject(configuration); } COM: <s> create a destination xml repository </s>
funcom_train/9043100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int binarySearch(String field, Object key) { Fields row = new Fields(); int index = fields.indexOf(field); // padding by irrelevant fields, could also be done by another // Comparator row.addAll(Collections.nCopies(index, null)); row.add(key); return Collections.binarySearch(this, row, new FieldComparator(index, false)); } COM: <s> perform a binary search on the field </s>
funcom_train/34015253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int search( String[] array, String element ) { int index = -1; int length = array == null ? 0 : array.length; for( int i = 0; i < length; i++ ) { if( element == null ) { if( array[i] == null ) { index = i; break; } } else if( element.equals( array[i] ) ) { index = i; break; } } return index; } COM: <s> searches the element in the string array </s>
funcom_train/17901634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteChar() { try { int pos = textArea.getCaretPosition(); if (pos == outputDocument.getLength()) return; if (pos < typingLocation && pos >= userLimit) { outputDocument.remove(pos, 1); typingLocation--; } } catch (BadLocationException ble) {} } COM: <s> delete a char from command line </s>
funcom_train/4916108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void linkProcess(int index, F key, String workName, String taskName) { // Create the managed object flow configuration ManagedObjectFlowConfiguration<F> flow = new ManagedObjectFlowConfigurationImpl( key, null, new TaskNodeReferenceImpl(workName, taskName, null)); // Register the flow at its index this.flows.put(new Integer(index), flow); } COM: <s> links in a </s>
funcom_train/18479607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EndPoint impute(double t) { double interp = (t - e0.t) / (e1.t - e0.t) ; return new EndPoint(t,PolyPt.interp(e0.p,e1.p,interp),e0.iter + (e1.iter - e0.iter) * interp) ; } COM: <s> interpolates an end point between the existing endpoints </s>
funcom_train/32057100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRenderer() { System.out.println("testGetRenderer"); Object obj = new Object(); JGraph jgraph = new JGraph(); CellMapper cellmapper = null; PortView pView = new PortView(obj, jgraph, cellmapper); assertTrue(pView.getRenderer() != null); } COM: <s> this function tests get renderer function of port view class </s>
funcom_train/31127341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSteering() { // [EP] 17-Jan-10: // changed byte count to 1 since register is a single byte one int ret = getData(LL_READ_STEERING, buf, 1); int steering = 0; // [EP] 17-Jan-10: // steering is signed => no mask should be applied // In addition negative values are a valid result, so we cannot use -1 // as an error notification steering = (ret == 0) ? buf[0] : Integer.MIN_VALUE; return steering; } COM: <s> get the steering value </s>
funcom_train/9449437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String name, double value) throws IllegalArgumentException { ObjectSlot slot = findSlot(name, Double.TYPE); if (slot == null) { throw new IllegalArgumentException("no double field '" + name + "'"); } slot.fieldValue = Double.valueOf(value); slot.defaulted = false; // No longer default value } COM: <s> find and set the double value of a given field named </s>
funcom_train/37757657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPropertyKey2() { assertEquals("Failed to get key2", "key2 value", config.getProperty("key2", null, "A")); assertEquals("Failed to get key2", "key2 value", config.getCategory("A").getProperty("key2")); } COM: <s> needs patch to work </s>
funcom_train/40226626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelDataPayload loadModelData(final ModelDataRequest request) { final ModelDataPayload payload = new ModelDataPayload(); if(validateModelDataRequest(request, payload)) { try { getModelData(context, request, payload); } catch(final RuntimeException se) { RpcServlet.exceptionToStatus(se, payload.getStatus()); context.getExceptionHandler().handleException(se); } } return payload; } COM: <s> loads auxiliary data </s>
funcom_train/39375994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void flushPanels() { resumeGame(); t.stop(); setCaller = null; for (int i=0; i<cardsCallingSet.size(); i++) { JPanel panel = (JPanel)cardsCallingSet.get(i); panel.setBackground(BACKGROUND); } cardsCallingSet = new ArrayList(); } COM: <s> called when a player has called a set </s>
funcom_train/30225530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Connection connect(String url, String login, String password) { Properties p = new Properties(); if ("".compareTo(login) != 0) p.setProperty("user", login); if ("".compareTo(password) != 0) p.setProperty("password", password); Connection cn = null; try { cn = DriverManager.getDriver(url).connect(url, p); } catch (SQLException e) { throw new CodeGenException("Unable to open connection!", e); } return cn; } COM: <s> connects to database specified and creates code connection code object </s>
funcom_train/37074638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getPrefix(String idFormat) { // Heuristic: prefix is the (first) portion of the idFormat that // consists entirely of letters (e.g. CG, FBti) int i; for (i=0; i < idFormat.length() && Character.isLetter(idFormat.charAt(i)); i++) ; return(idFormat.substring(0, i)); } COM: <s> given a format string e </s>
funcom_train/25418274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFirstStoreableValue(String name) { IStoreable storeable = this.getStoreables().get(name); if (storeable != null) { Object[] values = storeable.getValues(); if ((values != null) && (values.length > 0) && (values[0] != null)) { return values[0].toString(); } } return null; } COM: <s> gets the first storeable value associated with a property meaning name </s>
funcom_train/16529918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean saveCurnitAs() { try { forceAuthoringOff(); boolean savedSuccessfully = sessionManager.saveAs(workingCurnit); if(savedSuccessfully) { //popup to notify user save was successful JOptionPane.showMessageDialog(this.getMainAuthoringFrame(), "Project has been saved."); } else { JOptionPane.showMessageDialog(this.getMainAuthoringFrame(), "Project did not save."); } } catch (IOException e) { e.printStackTrace(); return false; }// try return true; } COM: <s> save the curnit the curnit </s>
funcom_train/4412519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String translate(String str, MatchMode mode) { String ret; if ("".equals(str)) { return ""; } switch (mode) { case GREEDY: ret = translateGreedy(str); break; case RELUCTANT: ret = translateReluctant(str); break; default: throw new IllegalArgumentException("Unknown mode: " + mode); } if (ret==null) { throw new IllegalArgumentException("String could not be translated: '" + str + "'"); } return ret; } COM: <s> translates the given string with the specified match mode </s>
funcom_train/3331262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buf = new StringBuffer("XPATH: "); for (int i = 0; i < path.size(); i++) { if (i > 0) buf.append('/'); buf.append((String)path.elementAt(i)); } return buf.toString(); } //-- toString COM: <s> returns the string representation of this xpath location </s>
funcom_train/34105123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkExpression() { if ( isBooleanTerm() ){ return; } checkArithmeticExpression(); if (isOperand()){ String symbol = peekToken().getToken(); checkCompositeExpression(); semanticAnalyser.verifyRelationalTypeCompatibility(); //Code Generation action to a relational expression String result = codeGenerator.makeTemp(); codeGenerator.emit(result, symbol, codeGenerator.pop(CodeGenerator.Stack.PcO), peekToken().getToken()); codeGenerator.push(CodeGenerator.Stack.PcO, result); asPushType(KeyWord.BOOLEAN); pushNewToken(); }else{ return; } } COM: <s> check if the next construction in the source code is a logic expression </s>
funcom_train/35184747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAppletPane(AppletPane appletPane) { synchronized (JPAZUtilities.getJPAZLock()) { if (this.appletPane != appletPane) { if (this.appletPane != null) this.appletPane.setParentApplet(null); this.appletPane = appletPane; appletPane.setParentApplet(this); appletPane.appletResize(drawPanel.getWidth(), drawPanel .getHeight()); drawPanel.repaint(); } } } COM: <s> sets the applet pane to be displayed in this applet </s>
funcom_train/44724021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getPKMembers() { if (this.pkMembers == null) { List members = this.getMembers(); pkMembers = new ArrayList(); for (int i = 0; i < members.size(); i++) { Member currentMember = (Member) members.get(i); if (currentMember.isPKField()) { pkMembers.add(currentMember); } } } return pkMembers; } COM: <s> get all primary key members </s>
funcom_train/18460723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstant_4() { Vector elements = new Vector(); Term element = new Term(1, "-I", 1, '*'); elements.add(element); String formula = getFormula(elements); int i = Integer.parseInt(formula.substring(5)); assertTrue(i<0); } COM: <s> the placeholder is expected to be replaced by a negative integer </s>
funcom_train/23716412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SVGImage getSvgImage () { if (svgImage == null) {//GEN-END:|57-getter|0|57-preInit // write pre-init user code here svgImage = SVGImage.createEmptyImage (null);//GEN-LINE:|57-getter|1|57-postInit // write post-init user code here }//GEN-BEGIN:|57-getter|2| return svgImage; } COM: <s> returns an initiliazed instance of svg image component </s>
funcom_train/1005590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Rectangle2D r) { double x1 = Math.min(getMinX(), r.getMinX()); double x2 = Math.max(getMaxX(), r.getMaxX()); double y1 = Math.min(getMinY(), r.getMinY()); double y2 = Math.max(getMaxY(), r.getMaxY()); setRect(x1, y1, x2 - x1, y2 - y1); } COM: <s> adds a code rectangle2 d code object to this </s>
funcom_train/41450367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void unloadedSessionChanged(String realId, String dataOwner) { Object obj = unloadedSessions_.put(realId, new OwnedSessionUpdate( dataOwner, System.currentTimeMillis())); if (logger.isDebugEnabled()) { if (obj == null) { log_.debug("New session " + realId + " added to unloaded session map"); } else { log_.debug("Updated timestamp for unloaded session " + realId); } } } COM: <s> callback from the cache listener to notify us that a session we havent </s>
funcom_train/6436037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean matchPostagRegexp(AnalyzedTokenReadings aToken, Pattern pattern) { boolean matches = false; final int readingsLen = aToken.getReadingsLength(); for (int i = 0; i < readingsLen; i++) { final String posTag = aToken.getAnalyzedToken(i).getPOSTag(); if (posTag != null) { final Matcher m = pattern.matcher(posTag); if (m.matches()) { matches = true; break; } } } return matches; } COM: <s> match pos tag with regular expression </s>
funcom_train/18703181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IDialogSettings getDialogSettings() { if (historySettings == null) { historySettings = new DialogSettings("history"); try { historySettings.load( ContextManagerPlugin .getDefault() .getStateLocation() .append(HISTORY_FILENAME) .toString()); } catch (IOException e) { Logger.error("error loading " + HISTORY_FILENAME, e); } } return historySettings; } COM: <s> gets the current dialog history settings </s>
funcom_train/29925201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(SaxContext context) throws Exception { int top = context.getTagCount() - 1; AttributeList attributes = context.getAttributeList(top); String username = attributes.getValue("name"); String password = attributes.getValue("password"); String roles = attributes.getValue("roles"); SSAuthRealm realm = (SSAuthRealm) context.getRoot(); realm.addUser(username, password, roles); } COM: <s> process a code lt user gt code element from the xml database file </s>
funcom_train/44459573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLocale(Locale locale) { // Load resource bundle for that locale LOG.debug("Retrieving translations for locale \"" + locale + "\"."); _resourceBundle = ResourceBundle.getBundle("org.xins.gui.resources.TranslationBundle", locale); LOG.info("Translations for locale \"" + locale + "\" are now active."); } COM: <s> activates the specified locale </s>
funcom_train/3863389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImage(String fileName) { Toolkit toolkit = Toolkit.getDefaultToolkit(); MediaTracker mediaTracker = new MediaTracker(this); Image image = toolkit.getImage(fileName); mediaTracker.addImage(image, 0); try { mediaTracker.waitForID(0); } catch (InterruptedException ie) { System.err.println(ie); System.exit(1); } return image; } COM: <s> loads an image from disk </s>
funcom_train/2888464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element createElementWithAttrs(String tagName, Hashtable attrs) { if (null == attrs) { log.error("No attributes defined."); return null; } Element element = doc.createElement(tagName); Enumeration e = attrs.keys(); while (e.hasMoreElements()) { String name = (String)e.nextElement(); String value = (String)attrs.get(name); element.setAttribute(name, value); } return element; } COM: <s> creates an element with attribute names and values defined in the hashtable </s>
funcom_train/49671411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent e) { Point p = constrainPoint(new Point(e.getX(), e.getY())); fLastClick = new Point(e.getX(), e.getY()); editor.tool().mouseDown(e, p.x, p.y); checkDamage(); } COM: <s> handles mouse down events </s>
funcom_train/34781498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initDeployProgressListeners () { if (deployProgressListeners == null && progressListenerFactory != null) { deployProgressListeners = progressListenerFactory .createDeployProgressListeners(command, this, this); } else if (deployProgressListeners == null) { deployProgressListeners = new ArrayList<ProgressListener>(); } } COM: <s> init deploy progress listeners </s>
funcom_train/4906286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTask(Task item) { if (tasksSection.getClient() == null) { tasksSection.setClient(createBackupComposite(tasksSection)); } else { TaskWidget taskWidget = new TaskWidget((Composite) tasksSection.getClient(), SWT.NULL, toolkit); taskWidget.setTask(item); taskWidgets.add(taskWidget); } ((Composite) tasksSection.getClient()).layout(true); //form.layout(true); form.reflow(true); } COM: <s> update the tasks displayed in the backup section by adding a task </s>
funcom_train/11004907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getMarginLeft(){ EscherOptRecord opt = (EscherOptRecord)getEscherChild(_escherContainer, EscherOptRecord.RECORD_ID); EscherSimpleProperty prop = (EscherSimpleProperty)getEscherProperty(opt, EscherProperties.TEXT__TEXTLEFT); int val = prop == null ? EMU_PER_INCH/10 : prop.getPropertyValue(); return (float)val/EMU_PER_POINT; } COM: <s> returns the distance in points between the left edge of the text frame </s>
funcom_train/9278327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testISOFormat_MoreThanMicroseconds() throws SQLException{ Statement st = createStatement(); assertStatementError("22007", st, "insert into ts (ts1) values " + "('2003-03-05-17.05.43.999999999')"); assertStatementError("22007", st, " insert into ts (ts1) values " + "('2003-03-05-17.05.43.999999000')"); st.close(); } COM: <s> dont allow more than microseconds in iso format cloudscape rejects </s>
funcom_train/42644842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEmphStringPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EmphasizedString_emphString_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EmphasizedString_emphString_feature", "_UI_EmphasizedString_type"), EmbryomodelPackage.Literals.EMPHASIZED_STRING__EMPH_STRING, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the emph string feature </s>
funcom_train/12895997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GenericValue getRunGroupName(long runGroupId) { try { GenericValue taskGroup = getDelegator().findByPrimaryKey(PROJECT_TASK_GROUP, UtilMisc.toMap("id", runGroupId)); return taskGroup; } catch (Exception e) { _log.error("Error fetching task group name", e); } return null; } COM: <s> returns the name of a run group using the primary key </s>
funcom_train/33734386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setApiKey(String apiKey) throws IllegalArgumentException { if(apiKey == null) { log.error("The flickr api key cannot be null"); throw new IllegalArgumentException("The flickr api key cannot be null"); } if(apiKey.trim().length() == 0) { log.error("The flickr api key cannot be empty"); throw new IllegalArgumentException("The flickr api key cannot be empty"); } this.apiKey = apiKey; } COM: <s> setter of the api key </s>
funcom_train/41595212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addListTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StrucDocList_listType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StrucDocList_listType_feature", "_UI_StrucDocList_type"), V3Package.eINSTANCE.getStrucDocList_ListType(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the list type feature </s>
funcom_train/44771365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void skip(long skipNum) throws NoSuchElementException { if (skipNum < 0) { throw new IllegalArgumentException("skipNum must not be negative"); } if ((pos + skipNum) > uuids.length) { throw new NoSuchElementException(); } if (skipNum == 0) { // do nothing } else { pos += skipNum - 1; fetchNext(); } } COM: <s> skip a number of code node code s in this iterator </s>
funcom_train/27813326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object valueOf( String option ) { ensureNotNull( option ); AbstractOptionSpec<?> spec = detectedOptions.get( option ); if ( spec == null ) { List<?> defaults = defaultValuesFor( option ); return defaults.isEmpty() ? null : defaults.get( 0 ); } return valueOf( spec ); } COM: <s> p gives the argument associated with the given option </s>
funcom_train/34448735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addElementURIPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Change_elementURI_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Change_elementURI_feature", "_UI_Change_type"), TracesPackage.Literals.CHANGE__ELEMENT_URI, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the element uri feature </s>
funcom_train/33265421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String str = ""; switch (valign) { case TOP: str = ",valign=top"; break; case MIDDLE: str = ",valign=middle"; break; case BOTTOM: str = ",valign=bottom"; break; } return getClass().getName() + "[vgap=" + vgap + ",hgap=" + hgap + str + "]"; } COM: <s> returns the string representation of this gadget vert flow layouts values </s>
funcom_train/34478522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final private void resolve_autoreference(CEntity instance) { for (int i = 0; i < entity_values.def.noOfPartialEntityTypes; i++) { EntityValue partval = entity_values.entityValues[i]; for (int j = 0; j < partval.count; j++) { check_value(partval.values[j], instance); } } autoreference_found = false; } COM: <s> establishes references of an entity instance to itself </s>
funcom_train/15627245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deactivateMapView(@NotNull final MapView<G, A, R> mapView) { assert mapViewsList.contains(mapView); if (mapViewsList.size() <= 1) { return; } mapViewsList.remove(mapView); mapViewsList.add(mapView); updateActiveMapView(); } COM: <s> deactivates a map view </s>
funcom_train/41020506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cardUpdateAndRepaint(CardBean card) { int permCount = jLayeredPane.getComponentCount(); for (int i = 0; i < permCount; i++) { Component obj = jLayeredPane.getComponent(i); if (obj instanceof MWCard == true) { MWCard mwcard = (MWCard) obj; if (mwcard.getCard().getTableID() == card.getTableID()) { mwcard.setCard(card); break; } } } } COM: <s> find card on the table update its state and then repaint it </s>
funcom_train/25705703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if( jPanel == null ) { final FlowLayout flowLayout = new FlowLayout(); flowLayout.setAlignment(java.awt.FlowLayout.RIGHT); jPanel = new JPanel(); jPanel.setLayout(flowLayout); jPanel.add(getBok(), null); jPanel.add(getBcancel(), null); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/18703094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void defaultActionState() { startAction.setEnabled(false); reloadAction.setEnabled(false); stopAction.setEnabled(false); editAction.setEnabled(false); discardAction.setEnabled(false); newAction.setEnabled(true); copyAction.setEnabled(false); } COM: <s> updates the action status to the default </s>
funcom_train/21953666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean createNewFile() { try { if (folder.exists()) return false; else { folder.create(Folder.HOLDS_MESSAGES); return true; } } catch (MessagingException me) { getLogger().fine("caught exception: " + me.getMessage()); me.printStackTrace(); return false; } } COM: <s> if the wrapped folder does not exist creates the new folder </s>
funcom_train/5680111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deregister(FadaServiceID fadaId) { FadaLease fl = null; try { this.sid2lid.get(fadaId); // Obtain the regInfo from the sid RegistrationInfo regInfo = (RegistrationInfo) fadaServiceId2regInfo .get(fadaId); // Obtain the lease from the regInfo fl = regInfo.lease; } catch (Exception e) { fl = null; } if (fl != null) { this.flr.cancel(fl); this.sid2lid.remove(fadaId); this.fadaServiceId2regInfo.remove(fadaId); this.renewalEventListeners.remove(fadaId); } } COM: <s> deregisters an item previously registered with this fada helper instance </s>
funcom_train/39467482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format(@NotNull final String key, final Object... args) { try { return MessageFormat.format(getString(key), args); } catch (final NullPointerException e) { throw new NullPointerException("No format for key " + key + " (" + e + ")"); } } COM: <s> formats a message with parameters </s>
funcom_train/19596043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean initRainbowduino(byte addr) { //TODO stop if connection counter > n //if (connectionErrorCounter>10000) {} byte cmdfull[] = new byte[7]; cmdfull[0] = START_OF_CMD; cmdfull[1] = addr; cmdfull[2] = 1; cmdfull[3] = CMD_INIT_RAINBOWDUINO; cmdfull[4] = START_OF_DATA; cmdfull[5] = 0; cmdfull[6] = END_OF_DATA; try { writeSerialData(cmdfull); return waitForAck(); } catch (Exception e) { return false; } } COM: <s> initialize an rainbowduino device send the initial image to </s>
funcom_train/2434672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillDeployWarning(CDeployWarning warning, Set<EntityWarning> itemWarnings, List<String> warnings) { CIntegrationEntity integrationEntity = warning.getEntity(); if (isGlobalWarning(integrationEntity)) warnings.add(warning.getWarning()); else { itemWarnings.add(new EntityWarningImpl(getIntegrationEntityId(integrationEntity), warning.getWarning())); } } COM: <s> copies warnings from the tt cdeploy warning tt object to item warnings for </s>
funcom_train/41071245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOutputDirectory(String outputDirectory) throws java.beans.PropertyVetoException { String oldOutputDirectory = this.outputDirectory; vetoableChangeSupport.fireVetoableChange(PROP_OUTPUTDIRECTORY, oldOutputDirectory, outputDirectory); this.outputDirectory = outputDirectory; propertyChangeSupport.firePropertyChange(PROP_OUTPUTDIRECTORY, oldOutputDirectory, outputDirectory); } COM: <s> set the value of output directory </s>
funcom_train/17174954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLineWithSpaces() throws IOException { Stream llr = new LogicalLineReader(new MultiFileReader(), '#', '\\'); llr.addFile("src/util/test/fileWithSpaces.txt"); assertEquals("a line", llr.readLine()); assertEquals("a second line", llr.readLine()); assertNull(llr.readLine()); llr.close(); } COM: <s> execute the line with space test </s>
funcom_train/2293844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsLockFilter getBlockingFilter() { if (m_blockingFilter == null) { m_blockingFilter = CmsLockFilter.FILTER_ALL; m_blockingFilter = m_blockingFilter.filterNotLockableByUser(getCms().getRequestContext().currentUser()); } return m_blockingFilter; } COM: <s> returns the filter to get all blocking locks </s>
funcom_train/23442823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPublicPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NotationType_public_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NotationType_public_feature", "_UI_NotationType_type"), SchemaPackage.Literals.NOTATION_TYPE__PUBLIC, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the public feature </s>
funcom_train/17206904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scanFrameForObjects(int verbosity) { for (Address refaddr = iterator.getNextReferenceAddress(); !refaddr.isZero(); refaddr = iterator.getNextReferenceAddress()) { if (VALIDATE_REFS) checkReference(refaddr, verbosity); if (verbosity >= 4) dumpRef(refaddr, verbosity); reportDelayedRootEdge(trace, refaddr); } } COM: <s> identify all the object pointers stored as local variables </s>
funcom_train/18076526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageDescriptor getImageDescriptor(final String key) { final ImageDescriptor result = getImageRegistry().getDescriptor(key); if (result == null) { final String msg = "ImageDescriptor for key" + key + " was null"; //$NON-NLS-1$ //$NON-NLS-2$ throw new IllegalArgumentException(msg); } return result; } COM: <s> returns an image descriptor for the given key </s>
funcom_train/876447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFriendly(String friendly) { if (friendly == null) return; try { friendly = StringUtils.encodeBase64(friendly.getBytes("UTF-16BE")); } catch (UnsupportedEncodingException ex) { friendly = StringUtils.encodeBase64(friendly.getBytes()); } this.friendly = friendly; generate(); } COM: <s> sets the friendly name for the msn object </s>
funcom_train/5694776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processMouseEvent(MouseEvent e) { // when we're clicked on if (e.getID() == MouseEvent.MOUSE_PRESSED) { SBP_PickEvent pe = new SBP_PickEvent(this, SBP_PickEvent.SBP_TOOL_PICK, getID(), SBP_PickEvent.SBP_TOOL_DEFAULT_OPTION); castSBP_PickEvent(pe); } } COM: <s> handler for mouse actions when user clicks on the fill tools image square </s>
funcom_train/25921187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawString(UnifiedGraphics graphics, String string, int x, int y) throws GUIException { try { SDLSurface textSurface = calibriFont.renderTextSolid(string, fontColor); graphics.drawSDLSurface(textSurface, textSurface.getRect(), graphics.getTarget().getRect(x,y)); } catch (SDLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> draws string on unified graphics target surface </s>
funcom_train/18741037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean invalidateCount() { boolean result = !this.matches.isEmpty(); if (result) { for (ReteSimpleMatch match : this.matches) { match.dominoDelete(null); } this.matches.clear(); } if (this.dummyMatch != null) { this.dummyMatch.dominoDelete(null); this.dummyMatch = null; } this.updatesSent = false; return result; } COM: <s> this method is called by the associated condition checker </s>
funcom_train/37005023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renameSimpleName(SimpleName simpleName, String newName) throws DuplicateNameException { SimpleName newSimpleName = ast.newSimpleName(newName); if (compilationUnitEx.isFieldDeclared(newName)) { throw new DuplicateNameException(); } astRewrite.set(simpleName, SimpleName.IDENTIFIER_PROPERTY, newSimpleName, null); } COM: <s> this method renames a simple name i </s>
funcom_train/42954265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Packet _readServerPacket() throws TimeoutException { byte b[] = this.transport.readPacket(); if (b != null) { this.sessionReadBytes += b.length; this.totalReadBytes += b.length; try { Packet p = new Packet(false, b); return p; } catch (PacketParseException ppe) { return null; } } else { return null; } } COM: <s> read the server packets </s>
funcom_train/49822236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Term copyResult(Collection goalVars, List resultVars) { IdentityHashMap originals = new IdentityHashMap(); Iterator i = goalVars.iterator(); while (i.hasNext()) { Var key = (Var)i.next(); Var clone = new Var(); try { clone = new Var(key.getOriginalName()); } catch(InvalidTermException e) {} originals.put(key,clone); resultVars.add(clone); } return copy(originals,new IdentityHashMap()); } COM: <s> gets a copy of this term for the output </s>
funcom_train/26514962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFIPAAlias(String name, String address) { FIPA_AddressBook addresses = ((FIPA_AddressBook)context.getAddressBook()); FIPAPerformative fmsg = parser.fipaPerformative(address); FIPA_AID_Address fAddress = fmsg.getSender_As_FIPA_AID(); fAddress = addresses.checkAddress(fAddress); if (fAddress.getAlias() == null){ fAddress.setAlias(name); registerAlias(fAddress,name); setHandleMessage (fAddress,name); addresses.add(fAddress); } } COM: <s> provides a basic mechanism for getting aliases for agents on other platforms </s>
funcom_train/3082942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int compareByClassDerivation(Class c1, Class c2) { if (c1 == null || c2 == null) { return compareForNullness(c1, c2); } if (c1.equals(c2)) return 0; if (c2.isAssignableFrom(c1) || c1.isAssignableFrom(c2)) { if (c2.isAssignableFrom(c1)) return -1; else if (c1.isAssignableFrom(c2)) return 1; } int rc = c1.getName().compareTo(c2.getName()); return normaliseRC(rc); } COM: <s> the compares the two code </s>
funcom_train/9441462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onOtaCloseSpcNotice() { if (DBG) log("onOtaCloseSpcNotice(), send shutdown intent"); Intent shutdown = new Intent(Intent.ACTION_REQUEST_SHUTDOWN); shutdown.putExtra(Intent.EXTRA_KEY_CONFIRM, false); shutdown.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mContext.startActivity(shutdown); } COM: <s> when spc notice times out force phone to power down </s>
funcom_train/3176862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EditableVertex getVertex(Point2D point) { // look through nodes Iterator<?> it = vertices.iterator(); while (it.hasNext()) { // check a node EditableVertex node = (EditableVertex)it.next(); if (node.contains(point)) return node; } // not found return null; } COM: <s> find a node by position </s>
funcom_train/5723877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String editInactiveExam() throws LectureException { examInfo = this.dataInactiveExams.getRowData(); if (examInfo == null) { return Constants.FAILURE; }else if (examInfo.getId()!=null){ examInfo = paperSubmissionService.getExam(examInfo.getId()); } setBean(Constants.PAPERSUBMISSION_EXAM_INFO, examInfo); if (examInfo == null) { addWarning(i18n("papersubmission_error_exam_not_found")); return Constants.FAILURE; } else { LOGGER.debug("selected examInfo " + examInfo.getName()); editing = true; return Constants.SUCCESS; } } COM: <s> set selected inactive exam into session scope </s>
funcom_train/9140472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createManager(){ try{ if (managerName.indexOf('.') == -1) managerName = "uk.ac.gla.terrier.querying."+managerName; queryingManager = (Manager) (Class.forName(managerName) .getConstructor(new Class[]{Index.class}) .newInstance(new Object[]{index})); } catch (Exception e) { logger.error("Problem loading Manager ("+managerName+"): ",e); } } COM: <s> create a querying manager </s>
funcom_train/6488998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireNewViewport(Viewport vp, boolean complete) { synchronized (viewportListeners) { for (int i=0; i<viewportListeners.size(); i++) { ViewportListener listener = (ViewportListener) viewportListeners.get(i); listener.viewportChanged(this, vp, complete); } } } COM: <s> fire an event indicating that the viewport has changed </s>
funcom_train/21729947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected RuntimeBeanReference setupDefaultCacheableInterceptor(Element element, ParserContext parserContext, Object elementSource) { //If the default cache resolver factory was specified simply return a bean reference for that final String defaultCacheableInterceptor = element.getAttribute(XSD_ATTR__DEFAULT_CACHEABLE_INTECEPTOR); if (StringUtils.hasLength(defaultCacheableInterceptor)) { return new RuntimeBeanReference(defaultCacheableInterceptor); } //Use no reference return null; } COM: <s> setup the default cache interceptor </s>
funcom_train/35562752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void repaintTreeItem(WjrTreeItem treeItem, WjrStoreItem storeItem) { treeItem.setText(getTreeItemText(storeItem)); treeItem.setIcon(getTreeItemIcon(storeItem)); if (treeItem.isSelected()) { treeItem.setSelectedStyle(getTreeItemSelectedStyle(storeItem)); updateTracePanel(storeItem); } } COM: <s> repaints the tree item by the store item </s>
funcom_train/1838940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEndDatePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Topic_endDate_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Topic_endDate_feature", "_UI_Topic_type"), MindmapPackage.Literals.TOPIC__END_DATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the end date feature </s>
funcom_train/22092800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(String name, String strvalue) { if (!_map.containsKey(name)) { // Create a new Vector with the value Vector value = new Vector(); value.add(strvalue); _map.put(name, value); } else { // Add the value in existing vector Vector newval = (Vector)_map.get(name); newval.add(strvalue); //_map.put(name, newval); // will replace the old one } } COM: <s> add a header in the fields </s>
funcom_train/44705401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getBaseURL() { // Generate the base URL stub. StringBuffer buf = new StringBuffer(15); buf.append(Utilities.getWebappContext()) .append(SiteNode.getRootSiteNode().getURL()); String url = buf.toString(); if (url.endsWith("/")) { return url; } return url + "/"; } COM: <s> returns the current url stub from the webapp context and </s>
funcom_train/34478569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() throws SdaiException { if (owningEntity == null || owningEntity.owning_model == null) { throw new SdaiException(SdaiException.EI_NEXS); } if(unset) { throw new SdaiException(SdaiException.VA_NSET, "External data does not exist for this instance: " + owningEntity); } if(name == null) { throw new SdaiException(SdaiException.VA_NSET, "Name not set: " + owningEntity); } return name; } COM: <s> gets the name of this external data </s>
funcom_train/12760944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object aValue, int aRow, int aColumn) { CellPoint point = new CellPoint(aRow, aColumn); history.add(this, new CellRange(point, point)); doSetValueAt(aValue, aRow, aColumn); } COM: <s> sets the value of the cell </s>
funcom_train/1151591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand16() { if (itemCommand16 == null) {//GEN-END:|389-getter|0|389-preInit // write pre-init user code here itemCommand16 = new Command("Escuchar", Command.ITEM, 0);//GEN-LINE:|389-getter|1|389-postInit // write post-init user code here }//GEN-BEGIN:|389-getter|2| return itemCommand16; } COM: <s> returns an initiliazed instance of item command16 component </s>
funcom_train/22305794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String typeToString(Type type) { if (type instanceof Class) { Class cls = (Class) type; if (cls.isArray()) { return cls.getComponentType().getName() + "[]"; } else { return cls.getName(); } } else { return type.toString(); } } COM: <s> get string representation of type e </s>
funcom_train/3581979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Graph load(InputStream stream) { // Use the default (non-validating) parser SAXParserFactory factory = SAXParserFactory.newInstance(); try { // Parse the input SAXParser saxParser = factory.newSAXParser(); saxParser.parse(stream, mFileHandler); } catch (Exception e) { throw new FatalException("Error loading graphml file", e); } return mFileHandler.getGraph(); } COM: <s> loads a graph from a graph ml input stream </s>
funcom_train/5521070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String hexConverter(int r,int g,int b) throws IOException{ String temp = "0x"; temp += hexCase(r/16); temp += hexCase(r%16); temp += hexCase(g/16); temp += hexCase(g%16); temp += hexCase(b/16); temp += hexCase(b%16); //writes hex value to file return (temp + " "); } COM: <s> this method produces a string that represents a 6 digit hex value </s>
funcom_train/43193648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateLayout(int featureId, Object oldValue, Object newValue) { if ((oldValue == null) || !oldValue.equals(newValue)) { notifyListeners(new Notification(this, Notification.SET, featureId, oldValue, newValue)); if (getComposite() != null) layoutChanged(getComposite(), featureId, oldValue, newValue); } } COM: <s> update the layout </s>
funcom_train/36781878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTranslatedNote(String o) { Object[] array = new Object[1]; HashMap<String, Object> myHashMap = new HashMap<String, Object>(); myHashMap.put("value", o); array[0] = myHashMap; put(TRANSLATION, array); } COM: <s> set the node translation </s>
funcom_train/40678547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getPropertyMinimumValue(String property) { GObjectAPI.GParamSpec propertySpec = findProperty(property); if (propertySpec == null) { throw new IllegalArgumentException("Unknown property: " + property); } final GType propType = propertySpec.value_type; return findProperty(property, propType).getMinimum(); } COM: <s> gets the minimum value should be set to tt gobject tt property </s>