__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/35838730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getChildNodes(PCSession session, String viewID) throws SQLException { // DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ; // // Enumeration nodes = DBNode.getChildNodes(dbcon, viewID, session.getUserID()); // // getDatabaseManager().releaseConnection(session.getModelName(),dbcon); return null; } COM: <s> returns an enumeration of all nodes for the given view id </s>
funcom_train/12587681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(AnyItemType anyItem, StoreAnyItem storeItem) { storeItem.setGuid(anyItem.getItemIdentifier()); storeItem.setSchemaversion(anyItem.getStandardVersion()); storeItem.setStandard(anyItem.getStandard()); storeItem.setConformance(anyItem.getConformance()); storeItem.setLang(anyItem.getLang()); storeItem.setDir(anyItem.getDir()); } COM: <s> init store any item with common any item value </s>
funcom_train/13683140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getEntityInfor() { if (entityInfor == null) { entityInfor = new JTabbedPane(); entityInfor.setBounds(new java.awt.Rectangle(-1,0,361,221)); entityInfor.setName("General"); entityInfor.addTab("Genaral", null, getGeneral(), null); entityInfor.addTab("Attributes", null, getAttributesInfo(), null); } return entityInfor; } COM: <s> this method initializes entity infor </s>
funcom_train/9989744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String genOrderBy( LinkedList <field> fields ) { List<String> columnNames = new LinkedList<String>(); for( field f : fields ){ column c = settings.columns.get( f.source ); columnNames.add( c.specificColumnName() ); } return " ORDER BY " + joinStrings(columnNames, ", "); } COM: <s> this function generates the orderby portion of the sql statements based on </s>
funcom_train/7748518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getMissingTemplates(StringTemplateGroup group) { List missing = new ArrayList(); for (Iterator it = templates.keySet().iterator(); it.hasNext();) { String name = (String)it.next(); TemplateDefinition d = (TemplateDefinition)templates.get(name); if ( !d.optional && !group.isDefined(d.name) ) { missing.add(d.name); } } if ( missing.size()==0 ) { missing = null; } return missing; } COM: <s> return a list of all template names missing from group that are defined </s>
funcom_train/42274250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String underscore(String camelCasedWord) { String underscoredWord = UNDERSCORE_PATTERN_1.matcher(camelCasedWord).replaceAll("$1_$2"); underscoredWord = UNDERSCORE_PATTERN_2.matcher(underscoredWord).replaceAll("$1_$2"); underscoredWord = underscoredWord.replace('-', '_').toLowerCase(); return underscoredWord; } COM: <s> under score words </s>
funcom_train/7614541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDisplayedLw() { final AppWindowToken atoken = mAppToken; return mSurface != null && mPolicyVisibility && !mDestroying && !mDrawPending && !mCommitDrawPending && ((!mAttachedHidden && (atoken == null || !atoken.hiddenRequested)) || mAnimating); } COM: <s> like is on screen but returns false if the surface hasnt yet </s>
funcom_train/13765705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getEndRowNumberForBlock(int block) { int endIndex = ((block + 1)*DBCellRecord.BLOCK_SIZE)-1; if (endIndex >= _rowRecords.size()) endIndex = _rowRecords.size()-1; Iterator<RowRecord> rowIter = _rowRecords.values().iterator(); RowRecord row = null; for (int i=0; i<=endIndex;i++) { row = rowIter.next(); } if (row == null) { throw new RuntimeException("Did not find start row for block " + block); } return row.getRowNumber(); } COM: <s> returns the physical row number of the end row in a block </s>
funcom_train/21846127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indentNewLine(Document doc, int offset) { try { doc.insertString(offset, "\n", null); // NOI18N offset++; } catch (GuardedException e) { java.awt.Toolkit.getDefaultToolkit().beep(); } catch (BadLocationException e) { if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N e.printStackTrace(); } } return offset; } COM: <s> inserts new line at given position and indents the new line with spaces </s>
funcom_train/3703954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStatus() { String strStatus = buddy.getStatus(); if (strStatus == null) { return (""); } else if (strStatus.equalsIgnoreCase(LemmingConstants.VISIBILITY_AVAILABLE)) { return (""); } else { return (" (" + strStatus + ")"); } } // of method COM: <s> get the status of the user in a string format </s>
funcom_train/9293599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|68-getter|0|68-preInit // write pre-init user code here backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|68-getter|1|68-postInit // write post-init user code here }//GEN-BEGIN:|68-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/23069901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List findByName(String firstName, String lastName) { String query = "select distinct person from NameImpl name " + "inner join name.person person " + "where name.firstName like :firstName " + "and name.surname like :lastName"; return getHibernateTemplate().findByNamedParam(query, new String[] {"firstName", "lastName"}, new Object[] {firstName +"%", lastName + "%"}); } COM: <s> note that this searches all names not just active names </s>
funcom_train/39275786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void spoolToDisk(Element element) { try { diskStore.put(element); } catch (IOException e) { LOG.error(e.getMessage(), e); throw new IllegalStateException(e.getMessage()); } if (LOG.isDebugEnabled()) { LOG.debug(cache.getName() + "Cache: spool to disk done for: " + element.getKey()); } } COM: <s> puts the element in the disk store </s>
funcom_train/20891693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean saveToFile(String filename) { Document doc = new Document(); doc.addContent(getXML()); XMLOutputter outputter = new XMLOutputter(); Format f = Format.getPrettyFormat(); f.setIndent(" "); outputter.setFormat(Format.getPrettyFormat()); BufferedWriter write = null; try { write = new BufferedWriter(new FileWriter(new File(filename))); outputter.output(doc, write); write.close(); } catch (IOException ioe) { return false; } return true; } COM: <s> writes the description to a file see also </s>
funcom_train/17295715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void searchUser(String email){ try { outputStream.write(Constant.SEARCH_REQUEST); outputStream.write(0); outputStream.write(email.length()); outputStream.write(0); outputStream.write(email.getBytes()); waitSync(); } catch (Exception ex) { ex.printStackTrace(); } //return null; } COM: <s> retreive other users information to add to the contact list </s>
funcom_train/18786799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File getDirectory() { File directory = null; if (selectedFile != null) { directory = selectedFile.getParentFile(); } else { ExplorerDocument document = getExplorer().getDocument(); if (document != null) { File file = document.getFile(); if (file != null) { directory = file.getParentFile(); } } } return directory; } COM: <s> returns the directory from which the file should be first searched </s>
funcom_train/23245358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gpsLocationLost() { // change icon represented connected, not connected, on-fix fixQualityLabel.setOpaque(true); fixQualityLabel.setBackground(Color.RED); fixQualityLabel.setForeground(Color.BLACK); fixQualityLabel.setText(MainFrame.RESOURCE.getString("GPSPanel.Labels.NoFix")); } COM: <s> invoke if nmea stream was lost </s>
funcom_train/34633064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Answer conflictOccured(Conflict conflict) { if (conflict == null) throw new ArgumentNullException("conflict"); assert(conflict.getDefaultAnswer() != null); String text = "conflict occured: (" + conflict.getDescription() + " " + conflict.getPosition() + " use defautlt: " + conflict.getDefaultAnswer(); logger.warn(text); return conflict.getDefaultAnswer(); } COM: <s> show the occured conflict and return the default answer </s>
funcom_train/36644380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double getLogScalingFactor(int pattern) { double logScalingFactor = 0.0; if (useScaling) { for (int i = 0; i < nodeCount; i++) { logScalingFactor += scalingFactors[currentPartialsIndices[i]][i][pattern]; } } return logScalingFactor; } COM: <s> this function returns the scaling factor for that pattern by summing over </s>
funcom_train/37229589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor( String sColor ) { // Need to construct OBX with appropriate LOINC code for measured or estimated // weight observation. OBXSegment obx = addOBX(); obx.setObservationIdentifier( Loinc.COLOR_NAR ); // try { obx.setObservationValueType( "ST" ); obx.setObservationValue( sColor ); // } // catch( MalformedFieldException mfe ) { // mfe.printStackTrace(); // } } COM: <s> set the animals color as uncoded text </s>
funcom_train/50899091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAccessFor (int iAppMask, boolean bAdmin, boolean bOwner) { Iterator iter = options.iterator(); while (iter.hasNext()) { MenuOption opt = (MenuOption) iter.next(); opt.setAccess(opt.hasAccess(iAppMask, bAdmin, bOwner)); } // wend } // setAccessFor COM: <s> p determine access to evey menu option for an application mask p </s>
funcom_train/12552283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GAIGSnewArray2 (int rows, int cols, String name, String color, double x1, double y1, double x2, double y2, double fontSize) { super (rows, cols, name, color, x1, y1, x2, y2); this.fontSize = fontSize; } COM: <s> create a 2 d array with set instance variables </s>
funcom_train/9869658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFechainicio(java.util.Date newVal) { if ((newVal != null && this.fechainicio != null && (newVal.compareTo(this.fechainicio) == 0)) || (newVal == null && this.fechainicio == null && fechainicio_is_initialized)) { return; } this.fechainicio = newVal; fechainicio_is_modified = true; fechainicio_is_initialized = true; } COM: <s> setter method for fechainicio </s>
funcom_train/2801713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getType() { int type = super.type; if ((type == PsfMessageTypes.ANY) && (super.data != null)) { RvUtils utils = new RvUtils(); type = utils.nativeType(super.data.getClass()); setType(type); } return type; } COM: <s> returns the type of the object </s>
funcom_train/8147195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Edge createEdge( Vertex v1, Vertex v2 ) { Edge edge; int index1 = vertices.indexOf(v1); int index2 = vertices.indexOf(v2); this.admatrix[index1][index2] = true; if ( !isDirected ) this.admatrix[index2][index1] = true; if (this.isDirected) edge = new DirectedEdge( v1, v2 ); else edge = new Edge( v1, v2 ); return edge; } COM: <s> method to create the proper type of edge class </s>
funcom_train/14354675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeUser(UserVO user) throws UserNotFoundException, UserSystemException { try { log.info( "removeUser(), remove UserID=" + user.getUserid()); ctx.destroySubcontext("uid=" + user.getUserid() + "," + ouAccounts); log.info( "removeUser(), remove User successfully" ); } catch (NamingException e) { log.error(e.getMessage()); throw new UserNotFoundException(); } } COM: <s> method name remove user </s>
funcom_train/31503549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(OutputStream stream) { try { OutputStreamWriter fout = new OutputStreamWriter(stream); beginToSave(fout); fout.close(); // close the stream } catch (IOException e) { System.out.println(e); System.out.println("Error in saving the xfig file"); } } COM: <s> save the project as xfig on a stream </s>
funcom_train/2806336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getItemSubTotalForTax() { return (getBasePrice() * quantity) + OrderReadHelper.calcItemAdjustments(new Double(quantity), new Double(getBasePrice()), this.getAdjustments(), true, false, false, true, false); } COM: <s> returns the total line price for tax calculation purposes </s>
funcom_train/16996710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("WSDERBYDashBoard".equals(portName)) { setWSDERBYDashBoardEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/22065050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String extractVowels(String word) { String str = ""; boolean meetVowel = false; for ( int i = word.length()-1; i >= 0; i-- ) { if ( isVowel(word.charAt(i)) ) { str = word.charAt(i) + str; meetVowel = true; } else { if ( meetVowel ) break; } //end if } //end for return str; } //end extractVowels COM: <s> extracts a proper consecutive string of vowels from a word </s>
funcom_train/24558929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IRelationship getMatchingAddRelationship(IRelationship relationship) { IRelationship returnValue = null; for (Notification<IRelationship> newRelationshipNotification : getAddRelationshipEvents()) { if (newRelationshipNotification.getVo().getSubordinate().getId().equals( relationship.getSubordinate().getId())) { returnValue = newRelationshipNotification.getVo(); } } return returnValue; } COM: <s> gets the matching add relationship </s>
funcom_train/12546668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { try { LLParseTable other = (LLParseTable) object; if (!Arrays.equals(variables, other.variables)) return false; if (!Arrays.equals(terminals, other.terminals)) return false; for (int i = 0; i < variables.length; i++) if (!Arrays.equals(entries[i], other.entries[i])) return false; return true; } catch (ClassCastException e) { return false; } } COM: <s> returns code true code if this object equals another </s>
funcom_train/37852648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void owner(String owner) { DBBroker broker = null; try { broker = db.acquireBroker(); permissions.setOwner(owner); } catch(PermissionDeniedException pde) { throw new DatabaseException(pde.getMessage(), pde); } finally { if(broker != null) { db.releaseBroker(broker); } } } COM: <s> set the owner of this resource for purposes of permission management </s>
funcom_train/44170175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { if (!this.isStarted) { this.isStarted = true; this.threadsBalancer = new ThreadsBalancer(this, getName() + "-Thread Balancer"); this.threadsBalancer.setPriority(Thread.MAX_PRIORITY); this.threadsBalancer.setDaemon(true); this.threadsBalancer.start(); synchronized(this.tasksList) { startThreads(this.min); } } } COM: <s> p starts the thread pool </s>
funcom_train/10267385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String unloadSpecification(String specID, String sessionHandle) { try { _userList.checkConnection(sessionHandle); _engine.unloadSpecification(specID); return SUCCESS; } catch (YAWLException e) { if (e instanceof YPersistenceException) { enginePersistenceFailure = true; } return OPEN_FAILURE + e.getMessage() + CLOSE_FAILURE; } } COM: <s> unloads the specification </s>
funcom_train/13579718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TransitSchedule run(Set<String[]> osm2HafasLine) { ScenarioImpl newSc = ((ScenarioImpl)ScenarioUtils.createScenario(ConfigUtils.createConfig())); newSc.getConfig().scenario().setUseTransit(true); TransitSchedule newSchedule = newSc.getTransitSchedule(); for(String[] lines : osm2HafasLine){ if(!(lines[0] == null || lines[1] == null)){ createNewLine(newSchedule, lines); } } return newSchedule; } COM: <s> osm2 hafas line code string code should look like this </s>
funcom_train/45211852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getPreviousValue() { Integer time[] = this.parse(); int prevH = time[0]; int prevM = time[1]; if (prevM <= 0) { prevM = 60 - stepSize; prevH = prevH - 1; } else { prevM = prevM - stepSize; } if (prevH < 0) { prevH = 0; prevM = 0; } setValue(prevH, prevM); return format(prevH, prevM); } COM: <s> calculates the previous value and returns a string representation </s>
funcom_train/14359072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isStandardTaglibAvailable() { if (standardTaglibAvailable == null) { synchronized (BaseTag.class) { if (standardTaglibAvailable == null) { try { standardTaglibAvailable = new Boolean(Class.forName("org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager") != null); } catch (ClassNotFoundException e) { standardTaglibAvailable = Boolean.FALSE; } } } } return standardTaglibAvailable.booleanValue(); } COM: <s> returns true if the classes from the apache standard taglibrary are available </s>
funcom_train/18284622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBytes(int parameterIndex, byte x[]) throws DAOException { try { parms.put("" + parameterIndex, "" + x); this.preparedStatement.setBytes(parameterIndex, x); } catch (SQLException e) { _log.error("Exception in setBytes() method", e); this.setTransactionRollbackOnly(); } } COM: <s> sets the designated parameter to array of bytes </s>
funcom_train/8420653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Book getSuggestedCommentary() { CurrentPageManager currentPageManager = ControlFactory.getInstance().getCurrentPageControl(); Book currentCommentary = currentPageManager.getCurrentCommentary().getCurrentDocument(); Key requiredVerse = getRequiredVerseForSuggestions(); return getSuggestedBook(SwordDocumentFacade.getInstance().getBooks(BookCategory.COMMENTARY), currentCommentary, requiredVerse, currentPageManager.isCommentaryShown()); } COM: <s> suggest an alternative commentary to view or return null </s>
funcom_train/2389114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanStatusbar() { if (panStatusbar == null) { lblStatus = new JLabel(); lblStatus.setText(" "); panStatusbar = new JPanel(); panStatusbar.setMaximumSize(new Dimension(32767, 25)); panStatusbar.setMinimumSize(new Dimension(68, 36)); panStatusbar.setLayout(new BorderLayout()); panStatusbar.add(lblStatus, BorderLayout.NORTH); } return panStatusbar; } COM: <s> this method initializes pan statusbar </s>
funcom_train/17932230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gameLoop() { while (gameRunning) { // clear screen GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); // let subsystem paint if (callback != null) { callback.frameRendering(); } // update window contents Display.update(); if(Display.isCloseRequested() || Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) { gameRunning = false; Display.destroy(); callback.windowClosed(); } } } COM: <s> run the main game loop </s>
funcom_train/48152354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawTick(Graphics g, double x, double y, int i, int j, int o){ int a = getXGraph(x), b = getYGraph(y); if (o == VERTICAL) g.drawLine(a, b - j, a, b + i); else g.drawLine(a - i, b, a + j, b); } COM: <s> this method draws a tick mark at a specified point in scale units </s>
funcom_train/11656204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadData() { if (this.getDataSource() != null) { ResultCollector rc = new ResultCollector(); rc.setFilename(this.getDataSource()); rc.setListener(this); rc.loadExistingFile(); // we clean up the ResultCollector to make sure there's // no slow leaks rc.clear(); rc.setListener(null); rc = null; } } COM: <s> the implementation loads a single </s>
funcom_train/26454960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startUpdate() { if ((state != NOT_YET_UPDATING) && (state != UPDATE_CANCELLED)) { throw new IllegalStateException("Cannot begin cache update - current state (" + state + ") is not NOT_YET_UPDATING or UPDATE_CANCELLED"); } state = UPDATE_IN_PROGRESS; } COM: <s> attempt to change the state to code update in progress code </s>
funcom_train/33280859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HtmlAnchor getAnchorByText(final String text) throws ElementNotFoundException { WebAssert.notNull("text", text); for (final HtmlAnchor anchor : getAnchors()) { if (text.equals(anchor.asText())) { return anchor; } } throw new ElementNotFoundException("a", "<text>", text); } COM: <s> returns the first anchor with the specified text </s>
funcom_train/9238055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean callPrivateCTCP(final String sType, final String sMessage, final String sHost) { final CallbackOnPrivateCTCP cb = (CallbackOnPrivateCTCP)getCallbackManager().getCallbackType("OnPrivateCTCP"); if (cb != null) { return cb.call(sType, sMessage, sHost); } return false; } COM: <s> callback to all objects implementing the private ctcp callback </s>
funcom_train/38967924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unitSquareSVG(PrintWriter out,double x,double y,Colors color, double opacity){ out.println("<rect x=\""+x*scaleSVG+"\" y=\""+y*scaleSVG+ "\" width=\""+scaleSVG+"\" height=\""+scaleSVG+"\" style=\"stroke-width:5;stroke:"+ Colors.BORDER_COLOR+";fill:"+color+";opacity:"+opacity+";\"/>"); } COM: <s> draw unit square with specified opacity value </s>
funcom_train/50863552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDead(HealthProblem illness) { setFatigue(0D); setHunger(0D); setPerformanceFactor(0D); setStress(0D); alive = false; deathDetails = new DeathInfo(person); // Create medical event for death. MedicalEvent event = new MedicalEvent(person, illness, MedicalEvent.DEATH); Simulation.instance().getEventManager().registerNewEvent(event); // Throw unit event. person.fireUnitUpdate(DEATH_EVENT); } COM: <s> this person is now dead </s>
funcom_train/10803175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParametrizedType(String[] typenames) { StringBuilder buf = new StringBuilder(); buf.append("<"); for (int i = 0; i < typenames.length; i++) { if (i > 0) buf.append(", "); buf.append(typenames[i]); } buf.append(">"); return buf.toString(); } COM: <s> returns parametrized type string for given type s </s>
funcom_train/28751024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setType(String newVal) { if ((newVal != null && this.type != null && (newVal.compareTo(this.type) == 0)) || (newVal == null && this.type == null && type_is_initialized)) { return; } this.type = newVal; type_is_modified = true; type_is_initialized = true; } COM: <s> setter method for type </s>
funcom_train/14307836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireFileClosed(ProjectFile aFile) { if (!fireEvents) return; ProjectEvent evt = new ProjectEvent(this, aFile); for(int i = 0; i < listeners.size(); i++) ((ProjectListener)listeners.get(i)).fileClosed(evt); } COM: <s> fire notification that a project file has been closed </s>
funcom_train/38307676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPoint(float x, float y) throws TagAttributeException { PdfContentByte cb = this.graphicsTag.getContentByte(); if (numPoints == 0) { cb.moveTo(x, y); } else { cb.lineTo(x, y); } ++numPoints; } COM: <s> adds the given point to the point holders container </s>
funcom_train/35309847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getPathComponent(int index) { int pathLength = getPathCount(); if(index < 0 || index >= pathLength) throw new IllegalArgumentException("Index " + index + " is out of the specified range"); TreePath path = this; for(int i = pathLength-1; i != index; i--) { path = path.getParentPath(); } return path.getLastPathComponent(); } COM: <s> returns the path element at the specified index </s>
funcom_train/51611445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makePdfs(String texPath) throws IOException { File workPath = new File(output_path, texPath); runLatex("pdflatex", workPath, "questions.tex"); runLatex("pdflatex", workPath, "questions.tex"); runLatex("pdflatex", workPath, "answers.tex"); runLatex("pdflatex", workPath, "answers.tex"); runLatex("pdflatex", workPath, "solutions.tex"); runLatex("pdflatex", workPath, "solutions.tex"); zipFiles(workPath, "pdf"); } COM: <s> creates pdfs from the template </s>
funcom_train/49045282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getJRadioButtonMenuButtMethodScalRot() { //if (buttMethodScalRot == null) { buttMethodScalRot = new JRadioButtonMenuItem(); buttMethodScalRot.setText("Scaled Rotation"); buttMethodScalRot.setToolTipText("scaled rotation registraion"); buttMethodScalRot.addActionListener(this); buttMethodScalRot.setActionCommand("parameter"); //} return buttMethodScalRot; } COM: <s> this method initializes the option method scal rot </s>
funcom_train/20769619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public RectangularCluster (BasicEvent ev){ // this(); // location.x = ev.x; // location.y = ev.y; // birthLocation.x = ev.x; // birthLocation.y = ev.y; // lastPacketLocation.x = ev.x; // lastPacketLocation.y = ev.y; // lastEventTimestamp = ev.timestamp; // firstEventTimestamp = lastEventTimestamp; // lastUpdateTime = ev.timestamp; // numEvents = 1; // setRadius(defaultClusterRadius); // } COM: <s> constructs a cluster at the location of an event </s>
funcom_train/41476161
/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(); buf.append("[oid="); buf.append(oid).append(", mbean="); buf.append(mName).append(", attr="); buf.append(aName).append(", rw="); buf.append(", table=").append(isTable()); buf.append(isReadWrite()).append("]"); return buf.toString(); } COM: <s> a string representation of this bind entry </s>
funcom_train/44011312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSave() throws Exception { System.out.println("save"); PositionBO posIn = null; PositionDAO instance = new PositionDAO(); instance.save(posIn); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of save method of class edu </s>
funcom_train/36715250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OperationsPageSolvent clickLinkItem(String linkName) { String linkLocator = "//a[normalize-space(text())='" + linkName + "']"; selenium.waitForElement(linkLocator); if(!selenium.isElementPresent(linkLocator)) throw new SeleniumException("Unalbe to fine Link " + linkName + "check the link String."); selenium.click(linkLocator); return this; } COM: <s> click any link on the page by its name </s>
funcom_train/7993143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read() throws IOException { int r = read(singleByte, 0, 1); while (r == 0) { r = read(singleByte, 0, 1); } if (r > 0) { return singleByte[0] < 0 ? 256 + singleByte[0] : singleByte[0]; } return -1; } COM: <s> reads one code byte code from this input stream </s>
funcom_train/598805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void set(long y) { int i = (int) y; if (i == y) { ival = i; if (words != null) Arrays.fill(words, 0); words = null; } else { realloc(2); words[0] = i; words[1] = (int) (y >> 32); ival = 2; } } COM: <s> destructively set the value of this to a long </s>
funcom_train/4539581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateCurrentPlayerTurnForChess(Player currentPlayer){ clock.switchPlayer(currentPlayer); int index = game.getPlayers().indexOf(currentPlayer); if(index ==ChessGraphicalView.PLAYER_1){ playerOneScroll.setBackground(ChessGraphicalView.CURRENT_PLAYER_SELECTION_COLOR); playerTwoScroll.setBackground(ChessGraphicalView.DEFAULT_PLAYER_SELECTION_COLOR); }else if(index == ChessGraphicalView.PLAYER_2){ playerTwoScroll.setBackground(ChessGraphicalView.CURRENT_PLAYER_SELECTION_COLOR); playerOneScroll.setBackground(ChessGraphicalView.DEFAULT_PLAYER_SELECTION_COLOR); } this.displayBoard(); } COM: <s> this will update the players turn for chess game </s>
funcom_train/50421358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String makeLinkable(String text) { StringBuffer buf = new StringBuffer(text); String[] taboo = { "\n", " ", "*", "\"" }; int index; int deleted; for (int i = 0; i < taboo.length; i++) { index = 0; deleted = 0; while ((index = text.indexOf(taboo[i], index)) != -1) { buf.deleteCharAt(index - deleted); deleted++; index++; } text = buf.toString(); } return text; } COM: <s> removes newline characters and multiple spaces from a string </s>
funcom_train/1822811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List facets () { List theFacets = new LinkedList(); for (Iterator it = this.iterator(); it.hasNext();) { Object v = it.next(); Set facet = new HashSet(this); facet.remove(v); theFacets.add(facet); } return theFacets; } COM: <s> report the facets of this simplex </s>
funcom_train/3815011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showLiveSummary() throws IOException { int actualUtterances = referenceSource.getReferences().size(); int gapInsertions = detectGapInsertionErrors(); System.out.println (" Utterances: Actual: " + actualUtterances + " Found: " + numUtterances); System.out.println (" Gap Insertions: " + gapInsertions); } COM: <s> shows the test statistics that relates to live mode decoding </s>
funcom_train/11641445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNullByte() throws SQLException { assertEquals((byte) 0, rs2.getNullByte()); // Set what gets returned to something other than the default byte b = (byte) 10; rs2.setNullByte(b); assertEquals(b, rs.getByte(1)); assertEquals(b, rs.getByte("column")); } COM: <s> tests the set null byte implementation </s>
funcom_train/31773753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JTextComponent createEditor() { JEditorPane rv = new JEditorPane("text/html", ""); rv.setEditorKit(new WebminHTMLEditorKit()); return rv; /* StyleContext sc = new StyleContext(); DefaultStyledDocument doc = new DefaultStyledDocument(sc); initDocument(doc, sc); JTextPane p = new JTextPane(doc); //p.setDragEnabled(true); //p.getCaret().setBlinkRate(0); return p; */ } COM: <s> create an editor to represent the given document </s>
funcom_train/34568960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void print(UOM uom) { if (logger.isDebugEnabled()) { logger.debug("UOM definition found: "); logger.debug("uom.getId(): "+uom.getId()); logger.debug("uom.getLabel(): "+uom.getLabel()); logger.debug("uom.getExponent(): "+uom.getExponent()); } } COM: <s> print on log the uom definition </s>
funcom_train/10267109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String checkOutWorkItem(String workItemID, String sessionHandle) throws IOException { HashMap params = new HashMap(); params.put("sessionHandle", sessionHandle); params.put("action", "checkout"); return executePost(_backEndURIStr + "/workItem/" + workItemID, params); } COM: <s> allows clients to obtain ownership of a unit of work </s>
funcom_train/39260957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int selectWin(int[] grid, int moveNum) { int position = -1; for (int i = 0; i < 9; i++) { if (grid[i] == G_NULL) { grid[i] = G_COMPUTER; int result = test4Win(grid, G_COMPUTER); grid[i] = G_NULL; if (result == GS_WIN) { position = i; break; } } } return position; } COM: <s> select an immediate winning move </s>
funcom_train/5016689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeProcessingInstruction(ProcessingInstruction _node, Writer _writer) throws IOException { if ((_writer != null) && (_node != null) && (_node.getData() != null) && (_node.getTarget() != null)) { _writer.write("<?" + _node.getTarget() + " " + _node.getData() + "?>"); } } COM: <s> write processin instruction to writer </s>
funcom_train/6289985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean wasMailSeen(String accountID, String messageID) { if (DEBUG) { System.out.println("MailDBSeen::wasMailSeen ... " + accountID + "@" + messageID); } if (Settings.downOnlyNeverSeen) { //let's check if it was once downloaded return msgIDsHash.containsKey(accountID + "@" + messageID); } return false; } COM: <s> check if mail was added into seen mail db </s>
funcom_train/17845186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkAndRemoveValueFromOld(BlockedPlugin plugin) { for(int i = 0; i < mOldValue.length; i++) { if(mOldValue[i] != null && mOldValue[i].equals(plugin)) { mOldValue[i] = null; return true; } } return false; } COM: <s> checks if the given plugin is already blocked and </s>
funcom_train/26017542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeaders(java.util.List<SIPHeader> headers) { ListIterator<SIPHeader> listIterator = headers.listIterator(); while (listIterator.hasNext()) { SIPHeader sipHeader = (SIPHeader) listIterator.next(); try { this.attachHeader(sipHeader, false); } catch (SIPDuplicateHeaderException ex) { } } } COM: <s> set a header from a linked list of headers </s>
funcom_train/4835139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newLevel(String title, int x, int y) { if(title != null && x >= 1 && y >= 1) { selectedTile = null; secondaryTile = null; Maze maze = new Maze(x, y, true); level = new GameLevel(maze, title); for(EditorListener l : listeners) { l.newLevel(new EditorEvent(this)); } } } COM: <s> generates a new level and discards the old </s>
funcom_train/17847488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertActivatedState() throws TvBrowserException { if (!isActivated()) { throw new TvBrowserException(AbstractPluginProxy.class, "error.notActive", "It was attempted to call an operation of the inactive plugin {0} that " + "may only be called on activated plugins.", getInfo().getName()); } } COM: <s> checks whether the plugin is activated </s>
funcom_train/23883570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String listToString(List<String> list, String delimiter) { StringBuilder sb = new StringBuilder(); for (Iterator<String> i = list.iterator(); i.hasNext();) { sb.append(i.next()); if (i.hasNext()) { sb.append(delimiter); } } return sb.toString(); } COM: <s> print a list into a string separating every list item with given delimiter </s>
funcom_train/32060778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processMouseEvent(MouseEvent me){ if(me instanceof MouseWheelEvent) { MouseWheelEvent mwe = (MouseWheelEvent)me; int wheelrotation = mwe.getWheelRotation(); if(wheelrotation > 0) scroller.moveBarDown(1); else if(wheelrotation < 0) scroller.moveBarUp(1); } } COM: <s> main mouse event processing method </s>
funcom_train/43829408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tryRetrievalCustomAsync(Date start, Date end){ asyncStart = start; asyncEnd = end; t.schedule(new TimerTask(){ @Override public void run() { tryRetrievalCustom(asyncStart,asyncEnd); } }, 100);//start in 1/10 of a second } COM: <s> attemps retrieval of data from supplied start date </s>
funcom_train/3112353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBox() { if (jCheckBox == null) { jCheckBox = new JCheckBox(); jCheckBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(jCheckBox.isSelected()) changeList(false); else changeList(true); } }); } return jCheckBox; } COM: <s> this method initializes j check box </s>
funcom_train/3102387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Text addTextField(final Composite parent, final String label, final String key, final int indentation, final int limit) { Assertion.valid(parent); Assertion.nonEmpty(label); Assertion.nonEmpty(key); Assertion.nonNegative(indentation); Assertion.positive(limit); final Label caption= new Label(parent, SWT.NONE); caption.setText(label); return addTextField(parent, caption, key, indentation, limit); } COM: <s> adds a text field to the preference page </s>
funcom_train/29950654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Group nextGroup() { if ( m_groups.size() == 0 ) { return null; } else { if ( m_currentGroupIndex < m_groups.size() - 1 ) { m_currentGroupIndex++; } else { m_currentGroupIndex = 0; } return currentGroup(); } } COM: <s> return next group of container </s>
funcom_train/40120732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject accumulate(final String key, final Object value) throws JSONException { testValidity( value ); final Object o = opt( key ); if ( o == null ) { put( key, value instanceof JSONArray ? new JSONArray().put( value ) : value ); } else if ( o instanceof JSONArray ) { ( ( JSONArray ) o ).put( value ); } else { put( key, new JSONArray().put( o ).put( value ) ); } return this; } COM: <s> accumulate values under a key </s>
funcom_train/41165380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoStrategyPhaseDes entity) { EntityManagerHelper.log("deleting CoStrategyPhaseDes instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoStrategyPhaseDes.class, entity.getStrategyPhaseId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co strategy phase des entity </s>
funcom_train/22113303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object rhs) { if (this == rhs) { return true; } if (!(rhs instanceof DataPoint)) { return false; } DataPoint d = (DataPoint)rhs; if (d.getMetricId().equals(getMetricId()) && d.getTimestamp() == getTimestamp()) { return true; } return false; } COM: <s> determines if metric id timestamps match not value </s>
funcom_train/8716034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(int length, ByteBuffer data) { if (length != 262) { throw new IllegalArgumentException("Bad length for CMap format 0"); } if (data.remaining() != 256) { throw new IllegalArgumentException("Wrong amount of data for CMap format 0"); } byte[] map = new byte[256]; data.get(map); setMap(map); } COM: <s> read the map in from a byte buffer </s>
funcom_train/2459459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newUser(String userName, String userType, String targetLanguage) throws UMException { UNameVals val = new UNameVals(); val.userType = userType; val.targetLang = targetLanguage; boolean added = s.users.add(userName, val); //fails if userName already exists if ( ! added) throw new UMException("User " + userName + " already exists"); } COM: <s> register a new user and set its target language </s>
funcom_train/2450328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Operand mul(Operand lhs, Operand rhs) { throw new IllegalArgumentException("Cannot multiply '" + lhs.toString() + //$NON-NLS-1$ "' and '" + rhs.toString() + "'."); //$NON-NLS-1$ //$NON-NLS-2$ } COM: <s> multiplies two operands returning the result </s>
funcom_train/26464620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean pushClipArea(Rectangle area) throws GUIException { if (m_clipStack.isEmpty()) { ClipRectangle carea = new ClipRectangle(area); m_clipStack.push(carea); return true; } ClipRectangle top = (ClipRectangle) m_clipStack.peek(); ClipRectangle carea = new ClipRectangle(area); carea.xOffset = top.xOffset + carea.x; carea.yOffset = top.yOffset + carea.y; carea.x += top.xOffset; carea.y += top.yOffset; boolean result = carea.intersect(top); m_clipStack.push(carea); return result; } COM: <s> this function pushes a clip area onto the stack </s>
funcom_train/36257983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialiseServiceDialog() { if (serviceDialog == null) { serviceDialog = new ServiceDialog(GuiClient.this); } String value = props.getProperty("serviceurls"); if (value != null) { String[] services = value.split(","); serviceDialog.addServiceUrls(services); } value = props.getProperty("users"); if (value != null) { String[] users = value.split(","); serviceDialog.addUserIds(users); } value = props.getProperty(ON_BEHALF_OF); if (value != null) { String[] users = value.split(","); serviceDialog.addOnBehalfOf(users); } } COM: <s> initialise the service dialog </s>
funcom_train/4507109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { super.start(); loadServices(); for (MultiUserChatService service : mucServices.values()) { registerMultiUserChatService(service); } // Add statistics addTotalRoomStats(); addTotalOccupantsStats(); addTotalConnectedUsers(); addNumberIncomingMessages(); addNumberOutgoingMessages(); ClusterManager.addListener(this); UserEventDispatcher.addListener(this); } COM: <s> called when manager starts up to initialize things </s>
funcom_train/10275994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin){ if (srcBegin < 0) throw new StringIndexOutOfBoundsException(srcBegin); if ((srcEnd < 0) || (srcEnd > count)) throw new StringIndexOutOfBoundsException(srcEnd); if (srcBegin > srcEnd) throw new StringIndexOutOfBoundsException("srcBegin > srcEnd"); System.arraycopy(value, srcBegin, dst, dstBegin, srcEnd - srcBegin); } COM: <s> characters are copied from this sequence into the </s>
funcom_train/21969333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int preService ( Request req, Response resp){ synchronized (this){ if ( !_tmpReqStore.contains(req)){ _timeStamp.addElement(new Long(System.currentTimeMillis())); _tmpReqStore.addElement(req); _hitCount ++; if (req.getContext().getSessionTimeOut() != -1) _reqDurationDCF.setMaximalValue(req.getContext().getSessionTimeOut()); } } return 0; } COM: <s> counter incrementation timestamp saving for calculating the </s>
funcom_train/9163193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void walkSwitchStatement(SwitchStatement statement) { walk(statement.getTest()); for (SwitchCase sc: statement.getCases()) { for (Expression e: sc.getTests()) { walk(e); } walk(sc.getBody()); this.visitSwitchCase(sc); } if (statement.getDefaultStatement() != null) { walk(statement.getDefaultStatement()); } this.visitSwitchStatement(statement); } COM: <s> walks the given code switch statement code </s>
funcom_train/10658661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tell(String str) throws IllegalStateException, IOException { if (dataOutput == null) { // rmi.48=Subprocess output stream control disabled throw new IllegalStateException(Messages.getString("rmi.48")); //$NON-NLS-1$ } tell(dataOutput, str); } COM: <s> writes the specified string to the process output stream </s>
funcom_train/44588787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createFile(IContainer folder, String name, InputStream contents, boolean forceFlag) throws JavaModelException { IFile file= folder.getFile(new Path(name)); try { file.create( contents, forceFlag ? IResource.FORCE | IResource.KEEP_HISTORY : IResource.KEEP_HISTORY, getSubProgressMonitor(1)); setAttribute(HAS_MODIFIED_RESOURCE_ATTR, TRUE); } catch (CoreException e) { throw new JavaModelException(e); } } COM: <s> convenience method to create a file </s>
funcom_train/3935308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Relation getRelation(int inType1, long inID1, int inType2, long inID2) throws BOMException { try { return (Relation)findByKey(createKey(inType1, inID1, inType2, inID2)); } catch (VException exc) { throw new BOMException(exc.getMessage()); } } COM: <s> retrieves the relation with the specified values </s>
funcom_train/44452251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void chooseElement(ActionEvent event) { ValueHolder holder = (ValueHolder) ((UICommand) event.getComponent()).getValue(); currRule = holder.get(0).toString(); ((RuleBean) getRule(currRule)).setCurrElement(holder.getLast()); } COM: <s> selects chosen element in aproprate rule </s>
funcom_train/50311337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { TreeViewer viewer = getTreeViewer(); if (viewer != null) { Control control= viewer.getControl(); if (control != null && !control.isDisposed()) { viewer.removeSelectionChangedListener(this); control.setRedraw(false); viewer.setInput(fInput); // viewer.expandAll(); control.setRedraw(true); selectNode(fEditor.getCursorLine(), true); viewer.addSelectionChangedListener(this); } } } COM: <s> updates the outline page </s>