__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/49994475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == null) { throw new NullPointerException("Cannot test null for equality with this SDVItem"); } boolean result = false; if (obj instanceof SensorDataItem) { result = (this.id == ((SensorDataItem)obj).getID()); } return result; } COM: <s> p indicates whether parameter code obj code is equal to this one </s>
funcom_train/19423412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getUserListString() { StringBuffer buffer = new StringBuffer(); buffer.append(""); if (user != null) { String separator = ""; Iterator i = user.iterator(); while (i.hasNext()) { SavedSearchUser user = (SavedSearchUser) i.next(); buffer.append(separator); buffer.append(user.getUserId()); buffer.append(" ("); buffer.append(user.getAuthority()); buffer.append(")"); separator = "; "; } } return buffer.toString(); } COM: <s> p returns a string containing the list of users authorized to use </s>
funcom_train/17203593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (operands[0] == null) { return ("NULL LHS"); } String result = operands[0].toString(); result = result + " " + operator + " "; for (int i = 1; i < operands.length; i++) { result = result + operands[i] + " "; } return result; } COM: <s> return a string representation of this object </s>
funcom_train/14422033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void select(final String item) { if (log.isDebugEnabled()) log.debug("Set selection " + SWTUtils.toString(widget) + " to text " + item); assertEnabled(); final int indexOf = indexOf(item); Assert.isTrue(indexOf != -1, "Item `" + item + "' not found in list."); asyncExec(new VoidResult() { public void run() { getList().setSelection(indexOf); } }); notifySelect(); } COM: <s> selects the item matching the given text </s>
funcom_train/41328888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModelFacade(InternalCmdFacade m) { super.setModelFacade(m); Element el = (Element)Util.lookup.get(Util._EL_SELECTED_FROM_TRAY); if ( el != null ) { setElement( el ); } else { Debug.out("why is element=null from Util._EL_SELECTED_FROM_TRAY?"); } return; } COM: <s> override setmodel here </s>
funcom_train/35046753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _retransmit(long seqno, Message msg, Address addr) { if(!_contains(seqno, addr)) assert false : "Acknowledging a non-existent msg, great!"; else System.out.println("retransmitting " + seqno + ", msg=" + msg); } COM: <s> check if retransmission is expected </s>
funcom_train/17904855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireTabMinimised(DockedTabEvent e) { if (tabListeners == null || tabListeners.size() == 0) { return; } for (int i = 0, k = tabListeners.size(); i < k; i++) { tabListeners.get(i).tabMinimised(e); } } COM: <s> notifies all registered listeners of a tab minimised event </s>
funcom_train/46662329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove() { // Remove object from the key map CachedObject old_obj = keyMap.remove(key); assert(old_obj == this); if (lifetimePolicy == LifetimePolicy.LRU_QUEUE) removeFromLRU(); clear(); // Clear weak reference to encourage quicker GC strongRef = null; // Clean up strong reference too (this may help with GC also) } COM: <s> completely remove object from cache </s>
funcom_train/23617952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clean() { Enumeration enumr = getPartList().elements(); while(enumr.hasMoreElements()){ Part part = (Part) enumr.nextElement(); // pass on the part to have phases cleaned part.clean(); // check if part is empty if (part.getPhraseList().size() == 0) { this.removePart(part); } } } COM: <s> remove any empty parts or phrases from the score </s>
funcom_train/9737093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Edge addEdge (Vertex fromVertex_p, Vertex toVertex_p, boolean directed_p) { Edge edgeObj = new Edge (fromVertex_p, toVertex_p, directed_p); this.edgeList.add(edgeObj); this.graphType = evalGraphType(this.graphType, edgeObj.isDirected()); return edgeObj; } COM: <s> adds an edge to this graph </s>
funcom_train/9873784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public REXP at(String v) { if (!updateVec()) return null; for (int i=0;i<h.size();i++) { REXP r=(REXP)h.elementAt(i); if (r!=null && r.Xt==REXP.XT_STR && ((String)r.cont).compareTo(v)==0) return (REXP)b.elementAt(i); } return null; } COM: <s> get xpression given a key </s>
funcom_train/1711130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getWeight(String weight) { int style=Font.PLAIN; if(weight.endsWith("mt")) weight=weight.substring(0,weight.length()-2); if (weight.indexOf("heavy") != -1) style = Font.BOLD; else if (weight.indexOf("bold") != -1) style = Font.BOLD; else if (weight.indexOf("roman") != -1) style = Font.ROMAN_BASELINE; if (weight.indexOf("italic") != -1) style = style+Font.ITALIC; else if (weight.indexOf("oblique") != -1) style = style+Font.ITALIC; return style; } COM: <s> work out style italic bold </s>
funcom_train/23234170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean matchesCriteria(Creature creature, boolean defaultAnswer) { String clazz; String subclazz; /** * No class/subclass defined? */ if (!creature.has("class") || !creature.has("subclass")) { return false; } clazz = creature.get("class"); subclazz = creature.get("subclass"); for (Entry entry : entries) { if (entry.matches(clazz, subclazz)) { return entry.isBlocked(); } } return defaultAnswer; } COM: <s> does a creature match a criteria entry </s>
funcom_train/18954745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean acceptFile(String path, String checksum, long length) throws Exception { MCRFilesystemNode child = rootDir.getChildByPath(path); if (!(child instanceof MCRFile)) { return true; } MCRFile file = (MCRFile) child; return !checksum.equals(file.getMD5()); } COM: <s> message from upload applet if you want all files transfered omit this </s>
funcom_train/24243114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateRenderString(ArrayList<String> header, ArrayList<String> serieNames, ArrayList<String> labels, ArrayList<Double> values, ArrayList<Double> thresholds) { replaceTemplateHeader(header); replaceTemplateBody(serieNames, labels, values, thresholds); return resultTemplate; } COM: <s> generate chart data xml from template file </s>
funcom_train/19358882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(OWLEntity entity) { String shortForm = generateShortForm(entity); entity2ShortFormMap.put(entity, shortForm); Set<OWLEntity> entities = shortForm2EntityMap.get(shortForm); if (entities == null) { entities = new HashSet<OWLEntity>(1); } entities.add(entity); shortForm2EntityMap.put(shortForm, entities); } COM: <s> adds an entity to the cache </s>
funcom_train/44875289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean containsContents(Package pkg, boolean forClasses) { ContentDescription[] contents = pkg.getContents(); for ( int i=0; i<contents.length; i++ ) { if ( forClasses ) { if ( contents[i] instanceof ClassDescription ) return true; } else if ( !(contents[i] instanceof ClassDescription)) return true; } return false; } COM: <s> internal helper method that determines if a package contains either </s>
funcom_train/33686493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMoveSpace(IBoardState move){ List<IBoardSpace> moves = move.getAllEmptySpaces(); //Get our "possible Moves" for(int i=0; i< moves.size();i++){ //Set spaces accordingly othelloTableModel.setPossibleMove(moves.get(i)); } this.repaint(); //Repaint the GUI } COM: <s> when called takes the board state given and shows possible moves and </s>
funcom_train/13257504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveFile() { if (currentFile == null) { saveFileAs(); return; } int status = modelLoader.saveModel(model, this, currentFile); if (status == ModelLoader.FAILURE) { showErrorMessage(modelLoader.getFailureMotivation()); } setTitle(WINDOW_TITLE + " - " + currentFile.getName()); model.resetSaveState(); } COM: <s> saves current model </s>
funcom_train/1169727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getJLabel3() { if (jLabelBlue == null) { jLabelBlue = new JLabel(); jLabelBlue.setText("Blue:"); jLabelBlue.setLayout(null); jLabelBlue.setBounds(10, 50, 127, 13); } return jLabelBlue; } COM: <s> p getter for the field code j label3 code </s>
funcom_train/17758044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getTxtSumaryzator() { if (txtSumaryzator == null) { txtSumaryzator = new JTextArea(); txtSumaryzator.setBounds(new Rectangle(102, 132, 331, 73)); txtSumaryzator.setLineWrap(true); txtSumaryzator.setWrapStyleWord(true); txtSumaryzator.setFont(new Font("Dialog", Font.PLAIN, 12)); txtSumaryzator.setForeground(new Color(0, 0, 51)); txtSumaryzator.setText("1 AND 2 AND 3 OR 4"); txtSumaryzator.setEditable(false); } return txtSumaryzator; } COM: <s> this method initializes txt sumaryzator </s>
funcom_train/37808000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean unPrivate(String user) { debug("unPrivate: " + pmTarget.getText() + "/" + user); if (user != null && user.compareTo(pmTarget.getText()) == 0) { users.deselect(users.getSelectedIndex()); setStatus("No longer speaking in private"); pmTarget.setText(""); return true; } return false; } COM: <s> if speaking to user in private turn off private inform client </s>
funcom_train/3391921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printAllClassesFrameTag() { frame("src=\"" + "allclasses-frame.html" + "\"" + " name=\"packageFrame\"" + " title=\"" + configuration.getText("doclet.All_classes_and_interfaces") + "\""); } COM: <s> print the frame tag for the frame that lists all classes </s>
funcom_train/8690050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadAntlib(ClassLoader classLoader, URL url) { try { Antlib antlib = Antlib.createAntlib(getProject(), url, getURI()); antlib.setClassLoader(classLoader); antlib.setURI(getURI()); antlib.execute(); } catch (BuildException ex) { throw ProjectHelper.addLocationToBuildException( ex, getLocation()); } } COM: <s> load an antlib from a url </s>
funcom_train/17544709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBreakpointFile(int index, java.lang.String value) { // Make sure we've got a place to put this attribute. if (size(BREAKPOINT) == 0) { addValue(BREAKPOINT, java.lang.Boolean.TRUE); } setValue(BREAKPOINT, index, java.lang.Boolean.TRUE); setAttributeValue(BREAKPOINT, index, "File", value); } COM: <s> sets the file name for a breakpoint at given index </s>
funcom_train/20727928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getFields(int WhyGet) { switch (WhyGet) { case DataMovementPane.FIRST: getCompany(1); break; case DataMovementPane.CHANGE: case DataMovementPane.ADD: getWholeList(1, WhyGet); break; case DataMovementPane.DELETE: getCustomerId(1); getCompany(2); break; } }//}}} //{{{ +getWholeList(int, int) : void COM: <s> gets the fields attribute of the account type form object </s>
funcom_train/4232973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(RegularTimePeriod period, Number x, Number y) { XYTimeSeriesDataItem item = getDataItem(period); if (item != null) { item.setValue(x, y); fireSeriesChanged(); } else { throw new SeriesException("Period does not exist."); } } COM: <s> update the values at the time period </s>
funcom_train/51245667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addPlugin(String pluginName) { if (pluginName.indexOf(SEMICOLON) != -1 && pluginName.indexOf("=") != -1) { throw new IllegalArgumentException("semicolon and equals not allowed in plugin name"); } String replaceSpaces = replaceSpacesInString(pluginName); return (String) put(PLUGIN_NAME + SEMICOLON + replaceSpaces, pluginName); } COM: <s> add a plugin </s>
funcom_train/1441382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User follow(String id) throws ApiException { assert (id != null); requireCredentials(); String url = String.format( "http://twitter.com/notifications/follow/%s.json", id); PostMethod method = new PostMethod(url); String response = execute(method); return User.newFromJsonString(response); } COM: <s> enables notifications for updates from the specified user to the </s>
funcom_train/1547543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigMatrix getRowMatrix(int row) throws MatrixIndexException { MatrixUtils.checkRowIndex(this, row); final int ncols = this.getColumnDimension(); final BigDecimal[][] out = new BigDecimal[1][ncols]; System.arraycopy(data[row], 0, out[0], 0, ncols); return new BigMatrixImpl(out, false); } COM: <s> returns the entries in row number code row code </s>
funcom_train/48602025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String updateAction() { this.logger.debug("updateAction is invoked"); try { this.setExpiryDate(); this.getServiceLocator().getCustomerService().updateAccount(this.account); String msg = "Account is updated successfully"; FacesUtils.addInfoMessage(msg); this.prepareMyList(); return NavigationResults.SUCCESS; } catch (iShopPlaceException me) { String msg = "Unable to update account: Internal Error"; this.logger.error(msg, me); return NavigationResults.FAILURE; } } COM: <s> backing bean action to update an account </s>
funcom_train/31240706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component setBorder(int left, int bottom, int right, int top) { if (left != border.getX() || bottom != border.getY() || right != border.getWidth() || top != border.getHeight()) { setChanged(true); border.setBounds(left, bottom, right, top); } return this; } COM: <s> sets the components border </s>
funcom_train/42273758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertTab(String text, boolean asHTML, int beforeIndex) { if((beforeIndex < 0) || (beforeIndex > getTabCount())) { throw new IndexOutOfBoundsException(); } RoundedTab rt = new RoundedTab(text, this); panel.insert(rt, beforeIndex + 1); } COM: <s> inserts a new tab at the specified index </s>
funcom_train/48260709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Artist createArtistFromElement(Element e) { Artist a = new Artist(); a.setName(getValueFromElementChild(e, "name", e.getNamespace())); a.setSpotifyURI(getAttributeValueFromElement(e, "href")); a.setPopularity(getValueFromElementChild(e, "popularity", e.getNamespace())); return a; } COM: <s> converts an artist element to a java artist </s>
funcom_train/32969657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void bannerLine(String fullName, String ver) { System.out.print("CSharp Compiler Compiler Version " + Version.version + " (" + fullName); if (!ver.equals("")) { System.out.print(" Version " + ver); } System.out.println(")"); //System.out.println("Copyright © 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms."); } COM: <s> this prints the banner line when the various tools are invoked </s>
funcom_train/36935171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isConnectedWith(CCConnectedPixelRow theRow) { boolean res = false; if (CCMath.abs(theRow._myY - _myY) != 1) return false; if (_myStartX > theRow._myStartX) { // use > here to do 8-connectivity res = theRow._myEndX >= _myStartX; } else { res = _myEndX >= theRow._myStartX; } return res; } COM: <s> checks if this and the given pixel row are connected </s>
funcom_train/24642266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String printPartition(List<Set<RmeConditional>> partition){ String s = "\n"; for (int i = 0; i < partition.size(); i++){ List<RmeConditional> setBi = new ArrayList<RmeConditional>(partition.get(i)); Collections.sort(setBi); s += "Partition B_"+i+" (size "+setBi.size()+") : { \n"; for (RmeConditional r : setBi){ s+= r.toString()+"\n"; } s+= "}\n \n"; } return s; } COM: <s> prints a given partition in a nice way </s>
funcom_train/2862345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(String collection, String level) { DataDir tmp; if(this.child()!=null) tmp=this.find(proposedCharSets); else tmp=this.add(proposedCharSets, (int)ASN1.CONTEXT); tmp=tmp.add(iso10646, (int)ASN1.CONTEXT); tmp.addOID(collections, (int)ASN1.CONTEXT, collection); tmp.addOID(encodingLevel, (int)ASN1.CONTEXT, level); } COM: <s> creates an iso 10646 characterset negotiation </s>
funcom_train/4924990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOutputProperties() { // Create and configure the filter FilterInstance instance = new FilterInstance("Filter"); instance.setClassName("MockFilter"); instance.addInitParameter("one", "A"); instance.addInitParameter("two", "B"); // Obtain the properties PropertyList properties = createPropertyList(); instance.outputProperties(properties); // Validate the properties assertPropertyList(properties, "filter.instance.name.Filter", "MockFilter", "filter.instance.init.Filter.one", "A", "filter.instance.init.Filter.two", "B"); } COM: <s> ensure can output properties from a </s>
funcom_train/44475307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String stripExtraChars(String indent, int max, int tabSize) { int measured = 0; int i = 0; for (; (measured < max) && (i < indent.length()); i++) { char ch = indent.charAt(i); switch (ch) { case '\t': if (tabSize > 0) { int reminder = measured % tabSize; measured += tabSize - reminder; } break; case ' ': measured++; break; } } return indent.substring(0, measured > max ? i - 1 : i); } COM: <s> strips any characters off the end of an indentation that exceed a </s>
funcom_train/2628537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetWindow() { System.out.println("getWindow"); ComponentTypeWrapper instance = null; instance = new ComponentTypeWrapper(new ComponentType()); GUITypeWrapper expResult = EasyMock.createMock(GUITypeWrapper.class); EasyMock.replay(expResult); instance.window = expResult; GUITypeWrapper result = instance.getWindow(); assertEquals(expResult,result); } COM: <s> test of get window method of class component type wrapper </s>
funcom_train/37885221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DocumentSet getDocuments(DBBroker broker, DocumentSet docs, boolean checkPermissions) { try { getLock().acquire(Lock.READ_LOCK); docs.addCollection(this); docs.addAll(broker, documents.values(), checkPermissions); } catch (LockException e) { LOG.warn(e.getMessage(), e); } finally { getLock().release(); } return docs; } COM: <s> add all documents to the specified document set </s>
funcom_train/18150528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLanguageCommunication(LanguageCommunication languageCommunication) { // create the association set if it doesn't exist already if(_languageCommunication == null) _languageCommunication = new AssociationSetImpl<LanguageCommunication>(); // add the association to the association set getLanguageCommunication().add(languageCommunication); // make the inverse link languageCommunication.setEntity(this); } COM: <s> adds an association language communication </s>
funcom_train/2876043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MessageContext createMessageContext() { MessageContext messageContext = new MessageContext(); //propagate actor information messageContext.put(ContextConstants.ATTR_OWNER_ENDPOINT, this); messageContext.copy(this, ContextConstants.ATTR_ROLE); messageContext.copy(this, ContextConstants.ATTR_SOAP_CONTENT_TYPE); messageContext.createRequest(); messageContext.createResponse(); return messageContext; } COM: <s> create a message context filled in with stub requests and responses </s>
funcom_train/3332537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getSessionFactory() { if (sessionFactory != null) { return sessionFactory; } String fromContext = pageContext.getServletContext(). getInitParameter("com.lokitech.hibtags.sessionFactory"); if (fromContext == null) { return "hibernate/SessionFactory"; } else { return fromContext; } } COM: <s> return the session factory name to use to the session lookup class </s>
funcom_train/49943906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(final Object element, int position) { fTableViewerImpl.applyEditorValue(); if (getSorter() != null || hasFilters()) { add(element); return; } if (position == -1) { position = fTable.getItemCount(); } updateItem(new TableItem(fTable, SWT.NONE, position), element); } COM: <s> inserts the given element into this table viewer at the given position </s>
funcom_train/45643365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addAction() { AddAlphabetWizard wizard = new AddAlphabetWizard(); WizardDialog dialog = new WizardDialog(getShell(), wizard); int value = dialog.open(); if (value == Window.OK) { String name = wizard.getAlphabetName(); String charset = wizard.getAlphabetCharset(); logger.debug("Name of the new Alphabet: " + name); logger.debug("Charset of the new Alphabet: " + charset); Alphabet alphabet = new Alphabet(charset.toCharArray(), name, Alphabet.NO_DISPLAY); tempAlphas.add(alphabet); fillTable(); } } COM: <s> will be performed after the add button has been clicked </s>
funcom_train/44693146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(Envelope itemEnv, Object item) { boolean[] levelsVisited = new boolean[this.leafLevel+1]; Arrays.fill(levelsVisited, false); insertNode(new RStarTreeItemNode(null, this.leafLevel, item, itemEnv), this.leafLevel, levelsVisited); } COM: <s> adds a spatial item with an extent specified by the given </s>
funcom_train/48114092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchAllFavorites() { return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TYPE, KEY_ID, KEY_LABEL, KEY_LINK, KEY_DESC, KEY_NAME, KEY_GUID, KEY_FILESIZE, KEY_BYTESDOWNLOADED}, null, null, null, null, KEY_LABEL); } COM: <s> return a cursor over the list of all notes in the database </s>
funcom_train/29286671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateBounds() { Point location = bounds.getLocation(); location.x -= ComponentFigure.offset; visualModel.setLocation(Util.getPoint(location)); Dimension d = ComponentFigure.defaultsize; if (visualModel.getSize().getWidth() < d.width && visualModel.getSize().getHeight() < d.height) visualModel.setSize(Util.getDimension(d.width, d.height)); } COM: <s> verifies that the bounds of the component are correct </s>
funcom_train/45117185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFullUUID() { // check if value was already initiated if (fullUUID.equals("")){ // get parent scenario full unique id first String parentFullUUID = System.getProperty(RunningProperties.UUID_PARENT_TAG); if (parentFullUUID == null){ return null; } while (parentFullUUID.startsWith(".")){ parentFullUUID = parentFullUUID.substring(1); } // get test unique id String uuid = System.getProperty(RunningProperties.UUID_TAG); parentFullUUID = parentFullUUID.equals("")? uuid : parentFullUUID+"."+uuid; this.fullUUID = parentFullUUID; } return fullUUID; } COM: <s> the test full unique id is used to identify a test instance </s>
funcom_train/6489978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File fileMatrixExport(File exportDir) { LogTools.trace(logger, 25, "AnalysisController.fileMatrixExport()"); File file = _exportController.doExport(exportDir); System.out.println("FILE created >> " + file.getName()); LogTools.trace(logger, 25, "AnalysisController.fileMatrixExport() - Exported file = "+file); return file; } COM: <s> export a matrix </s>
funcom_train/43245841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBNStreetAddr1() { System.out.println("getBNStreetAddr1"); EmergencyContactDG5Object instance = new EmergencyContactDG5Object(); String expResult = ""; String result = instance.getBNStreetAddr1(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get bnstreet addr1 method of class org </s>
funcom_train/2915467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int computeAmoutOfWork() { int i = 0; for (final Iterator<?> iter = projects.getValues().iterator(); iter.hasNext();) { final IOawProject element = (IOawProject) iter.next(); i += element.getRegisteredResources().length; } return i; } COM: <s> computes the amount of work that has to be done during a build </s>
funcom_train/32080160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setThumb (int value) { checkWidget(); if (value < 1) return; int minimum = (int) OS.RangeBase_Minimum (handle); int viewSize = (int) OS.ScrollBar_ViewportSize (handle); int maximum = (int) OS.RangeBase_Maximum (handle) + viewSize; value = Math.min (value, maximum - minimum); OS.RangeBase_Maximum (handle, maximum - value); OS.ScrollBar_ViewportSize (handle, value); } COM: <s> sets the size of the receivers thumb relative to the </s>
funcom_train/36907901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getStartingChildPosition(int nodeDepth, int nodePosition) { int beginPartition = getBeginPartition(nodeDepth, nodePosition); int numChildrenCovered = 0; int nextRow = nodeDepth+1; int resultPosition = 0; while (numChildrenCovered < beginPartition) { numChildrenCovered += _treeLayout[nextRow][resultPosition]; ++resultPosition; } return resultPosition; } COM: <s> returns the position of the initial child node relative to all children </s>
funcom_train/29651735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMethod2() { Object target = new Object(); String methodName = "hgjjhgjh"; try { MethodDispatchServlet.getMethod(target, methodName); fail("The exception javax.servlet.ServletException should" + " have been thrown."); } catch (javax.servlet.ServletException exception) { if (!exception.getClass().getName().equals( "javax.servlet.ServletException")) { fail("The exception javax.servlet.ServletException should" + " have been thrown."); } } } COM: <s> method test get method2 </s>
funcom_train/44118721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renderIncludePageOverlay(AFPElement afpElement) { String name = afpElement.getProperty("name").getString(); name = StringUtils.rpad(name, ' ', 8); String orientationString = afpElement.getProperty("orientation").getString(); _afpDataStream.createIncludePageOverlay( name, getOrientation(orientationString)); } COM: <s> add an include page overlay to the current page </s>
funcom_train/4462485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean doesIntersect(SingleLocation s) { if(getFrom() <= s.getFrom() && getTo() >= s.getFrom()) { // intersects atleast at s.from return true; } else if(getTo() >= s.getTo() && getFrom() <= s.getTo()) { // insersects atleast at s.to return true; } return false; } COM: <s> does this single location intersect another single location </s>
funcom_train/29420711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Runner doMaximize() { if (!wrap && frame!=null) { if ((frame.getExtendedState() & JFrame.MAXIMIZED_BOTH)==JFrame.MAXIMIZED_BOTH) frame.setExtendedState(JFrame.NORMAL); else frame.setExtendedState(JFrame.MAXIMIZED_BOTH); } return wrapMe(); } COM: <s> this method alternatingly maximizes or restores the window </s>
funcom_train/44709665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exportAttributes(com.arsdigita.xml.Element target) { Iterator attributesIterator = m_attributes.entrySet().iterator(); while (attributesIterator.hasNext()) { Map.Entry entry = (Map.Entry) attributesIterator.next(); if (entry.getValue() != null) { target.addAttribute((String) entry.getKey(), (String) entry.getValue()); } } } COM: <s> copy all attributes into the given dom element </s>
funcom_train/1463001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCellStyle(int index, String style) { if (cellStyles == null) { cellStyles = new String[values.length]; } cellStyles[index] = style; if (cellsRendered) { Element cell = table.getView().getTextCellElement(this, index); MyDOM.setStyleName(cell, "my-tbl-cell-text " + style); } } COM: <s> sets the style for a table cell </s>
funcom_train/3422835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRowInserted(boolean insertFlag) throws SQLException { checkCursor(); if(onInsertRow == true) throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.invalidop").toString()); if( insertFlag ) { ((Row)getCurrentRow()).setInserted(); } else { ((Row)getCurrentRow()).clearInserted(); } } COM: <s> sets the status for the row on which the cursor is positioned </s>
funcom_train/18739997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(TypeNode left, Collection<? extends TypeNode> right) { Set<TypeNode> current = this.map.get(left); if (current == null) { this.map.put(left, current = new HashSet<TypeNode>()); } current.addAll(right); } COM: <s> adds a set of pairs to the relation </s>
funcom_train/18008945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int countThrowsWhere(Player player, Condition cond) { int count = 0; if (playerStats.containsKey(player)) { Enumeration it = ((PlayerStatistics) playerStats.get(player)).throwList.elements(); while (it.hasMoreElements()) { if (cond.check((Throw) it.nextElement())) { count++; } } } return count; } COM: <s> p returns the number of throws for given player that comply to </s>
funcom_train/19887207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPayAmount() { System.out.println("getPayAmount"); //Payment pmt = null; double expResult = 0.0; double result = pmt.getPayAmount(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get pay amount method of class edu </s>
funcom_train/28764515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCsssubheadcolor(String newVal) { if ((newVal != null && this.csssubheadcolor != null && (newVal.compareTo(this.csssubheadcolor) == 0)) || (newVal == null && this.csssubheadcolor == null && csssubheadcolor_is_initialized)) { return; } this.csssubheadcolor = newVal; csssubheadcolor_is_modified = true; csssubheadcolor_is_initialized = true; } COM: <s> setter method for csssubheadcolor </s>
funcom_train/1064074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTemplateBoundElement(){ boolean result = false; EList tb = uml2Class.getTemplateBindings(); if(tb != null){ Iterator itb = tb.iterator(); TemplateBinding currentTb; while(itb.hasNext()){ currentTb = (TemplateBinding) itb.next(); result = currentTb.getBoundElement() == uml2Class; } } return result; } COM: <s> tells if the class is a template implementation </s>
funcom_train/8399856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(String key) throws NoSuchElementException { //System.out.print("In get()\n"); Object o = opt(key); if (o == null) { throw new NoSuchElementException("JSONObject[" + quote(key) + "] not found."); } return o; } COM: <s> get the value object associated with a key </s>
funcom_train/3402848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Attribute createAttribute(String prefix, String namespaceURI, String localName, String value) { AttributeBase attr = new AttributeBase(prefix, namespaceURI, localName, value, null); if(location != null)attr.setLocation(location); return attr; } COM: <s> create a new attribute </s>
funcom_train/28751844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClientid(String newVal) { if ((newVal != null && this.clientid != null && (newVal.compareTo(this.clientid) == 0)) || (newVal == null && this.clientid == null && clientid_is_initialized)) { return; } this.clientid = newVal; clientid_is_modified = true; clientid_is_initialized = true; } COM: <s> setter method for clientid </s>
funcom_train/2491835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importToDb( Reader in) throws DatabaseUnitException{ IDatabaseConnection connection; IDataSet data = null; try { connection = getConnection(); // data = new ReplacementDataSet(new FlatXmlDataSet(in)); data = new FlatXmlDataSet(in); // }else { // data = new ReplacementDataSet(getXmlDataSet(_in)); // } // data.addReplacementObject("[null]",null); InsertIdentityOperation.CLEAN_INSERT.execute(connection,data); // DatabaseOperation.CLEAN_INSERT.execute(connection,data); } catch (Exception e) { throw new DatabaseUnitException(e); } COM: <s> import data from xml or flat xml file into db </s>
funcom_train/46320750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateNumberOfSubTasksOfParentTask(SQLiteDatabase db, Integer parentTaskId) { Map<Integer, Integer> visitedTasks = new HashMap<Integer, Integer>(); dbHelper.updateNumberOfSubTasksOfTask(db, parentTaskId, visitedTasks); } COM: <s> update sub task count of parent and child tasks </s>
funcom_train/50335472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultSignalMastLogic (SignalMast source){ this.source = source; this.stopAspect = source.getAppearanceMap().getSpecificAppearance(jmri.SignalAppearanceMap.DANGER); this.source.addPropertyChangeListener(propertySourceMastListener); if(source.getAspect()==null) source.setAspect(stopAspect); } COM: <s> initialise the signal mast logic </s>
funcom_train/34663974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Composite getButtonBoxControl(Composite parent) { if (buttonBox == null) { buttonBox = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); layout.marginWidth = 0; buttonBox.setLayout(layout); createButtons(buttonBox); buttonBox.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent event) { saveButton = null; removeButton = null; loadButton = null; buttonBox = null; } }); } else { checkParent(buttonBox, parent); } selectionChanged(); return buttonBox; } COM: <s> returns this field editors button box containing the add remove </s>
funcom_train/51782447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void snapRightUpper() { double x2 = pos.getX() + size.getWidth(); double y1 = pos.getY(); Point2D rightUpper = new Point2D.Double(x2, y1); snapping.snap(rightUpper); y1diff = y1 - rightUpper.getY(); x2diff = x2 - rightUpper.getX(); calculateY2Adjust(); makeAdjustments(); } COM: <s> performs a snap on the right upper corner </s>
funcom_train/49994745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createBrowserFrame() { GridData data = new GridData(GridData.FILL_BOTH); data.grabExcessHorizontalSpace = true; data.grabExcessVerticalSpace = true; browser.setLayoutData(data); locationListener = new LocationListener(); browser.addLocationListener(locationListener); browser.setUrl(startUrl); } COM: <s> creates the browser frame </s>
funcom_train/3361855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { // Calculate the hash code value if it has not yet been done (ie 1st call to hashCode()) // if (myHashCode == null) { int value = 0; value += dimension; value += elementType.hashCode(); value += Boolean.valueOf(primitiveArray).hashCode(); myHashCode = new Integer(value); } // return always the same hash code for this instance (immutable) // return myHashCode.intValue(); } COM: <s> returns the hash code value for this code array type code instance </s>
funcom_train/31660031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addHTTPHeader(Call call, String name, String value) { if (name.equals(WSIFConstants.CONTEXT_HTTP_USER)) { call.setProperty(Call.USERNAME_PROPERTY, value); } else if (name.equals(WSIFConstants.CONTEXT_HTTP_PSWD)) { call.setProperty(Call.PASSWORD_PROPERTY, value); } } COM: <s> sets the http header value in the message context </s>
funcom_train/25656690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String encodeIntArray(int[] ints) { if (ints == null || ints.length == 0) return ""; StringBuffer tmp = new StringBuffer(1024); tmp.append(ints[0]); for (int i = 1 ; i < ints.length ; i++) { tmp.append(','); tmp.append(ints[i]); } return tmp.toString(); } COM: <s> encode the integer array as a string </s>
funcom_train/21002918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readNextSampleUntyped(SerializedData sample, SampleInfo info) { // CacheChange change = new CacheChange(sample); CacheChange change = _readerCache.readNextChange(null); if (change != null) change.getData().copyTo(sample); else GlobalProperties.logger.log(Logger.INFO,getClass(),"readNextSampleUntyped()", "The history cache has already been read"); // TODO add a method into CacheChange that can populate the SampleInfo structure // and call it here!!! ;-) } COM: <s> reads a sample from the history cache </s>
funcom_train/50346550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pseudoPropertyChange(String propName, Object old, Object n) { if (log.isDebugEnabled()) log.debug("pseudoPropertyChange: Block \""+getSystemName()+" property \""+ propName+"\" new value= "+n.toString()); firePropertyChange(propName, old, n); } COM: <s> call for circuit builder to make icon color changes for its gui </s>
funcom_train/32869705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTransaction() { if (transactionId != null) ProsePlugin.log(new IllegalStateException("Another transaction still active")); // This is taken from "ch.ethz.prose.tools.MultipleClientModel#startTransaction()". transactionId = "" + System.currentTimeMillis() + transactionCount--; } COM: <s> start a new transaction </s>
funcom_train/13569785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGenerateParkingFacilities(){ String inputPlansFile = getPackageInputDirectory() + "plans2.xml"; String networkFile = "test/scenarios/berlin/network.xml.gz"; ScenarioImpl scenario = (ScenarioImpl) ScenarioUtils.createScenario(super.loadConfig(null)); new MatsimNetworkReader(scenario).readFile(networkFile); new MatsimPopulationReader(scenario).readFile(inputPlansFile); GenerateParkingFacilities.generateParkingFacilties(scenario); ActivityFacilitiesImpl facilities = scenario.getActivityFacilities(); assertEquals(4, facilities.getFacilities().size()); } COM: <s> test that the number of created facilities corresponds to what is expected </s>
funcom_train/10512138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getConstantEntry(Object constantValue) { int index = -1; final int size = entries.size(); for (int i = 0; i < size && index == -1; ++i) { Object element = entries.elementAt(i); if (element instanceof ConstantCPInfo) { ConstantCPInfo constantEntry = (ConstantCPInfo) element; if (constantEntry.getValue().equals(constantValue)) { index = i; } } } return index; } COM: <s> get the index of a given constant value entry in the constant pool </s>
funcom_train/24318764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean doesGroupExist(String groupName) throws Exception { boolean ret = false; if (caseInsensitiveOutput) { groupName = MiscUtilities.getCaseInsensitive(groupName, true); } GroupQuery qry = new GroupQuery(); qry.setQueryGroupid(groupName); qry.requireUniqueInstance(); ret = null != qry.getNextDO(); return ret; } COM: <s> returns true if user group with given name exists </s>
funcom_train/802715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVersionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MzDataType_version_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MzDataType_version_feature", "_UI_MzDataType_type"), MzdataPackage.Literals.MZ_DATA_TYPE__VERSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the version feature </s>
funcom_train/46439747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initContext(String feedId, String feedFileName) { if (this.context == null) { this.context = new EngineContext(); } this.feedId = feedId; if (feedFileName != null) { this.feedFileName = feedFileName; this.context.setFeedFileName(feedFileName); } } COM: <s> store the feed id and filename as instance variables place the filename </s>
funcom_train/4278678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(IntervalItem<T> that) { if (that == this) return 0; if (that == null) return THIS_IS_GREATER; final double thisRange = this.to - this.from; final double thatRange = that.to - that.from; if (thisRange > thatRange) return THIS_IS_GREATER; else if (thisRange < thatRange) return -THIS_IS_GREATER; return 0; } COM: <s> compare range only </s>
funcom_train/17593351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Attribute getAttribute(Variable v) { Attribute a = bottom.getAttribute(v); if (a != null) return a; for (Iterator i = top.iterator(); i.hasNext(); ) { RuleTerm rt = (RuleTerm) i.next(); a = rt.getAttribute(v); if (a != null) return a; } return null; } COM: <s> returns the attribute associated with the given variable </s>
funcom_train/1912960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Communicator () { Log.v(TAG, "constructor"); if (null == this.httpClient) { // Apache HTTPClient this.httpClient = new DefaultHttpClient(); // Connection Timeout setzen HttpConnectionParams.setSoTimeout(this.httpClient.getParams(), 5000); //HttpConnectionParams.setConnectionTimeout(this.httpClient.getParams(), 5000); } } COM: <s> private conscructor singleton </s>
funcom_train/44283961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupLargePiePanel(JPanel parentPanel, Patch patch) { addWidget(parentPanel,new KnobWidget("Distortion", patch, 0, 127,0,new ScaledParamModel(patch, 53 + pgmDumpheaderSize, 127, 127),new CCSender(56)),6,0,1,1,45); } COM: <s> sets up the large pie effects panel </s>
funcom_train/50274701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void populate(ResultSet rset) throws SQLException { this.loginName = rset.getString("loginName"); this.memberName = rset.getString("memberName"); this.emailAddressVisibleToOthers = (rset.getInt("emailAddressVisibleToOthers") == 1); } COM: <s> populates this member object with data retrieved from the database </s>
funcom_train/20612424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUsedServiceNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Binding_usedServiceName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Binding_usedServiceName_feature", "_UI_Binding_type"), GCLACSPackage.Literals.BINDING__USED_SERVICE_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the used service name feature </s>
funcom_train/13692951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addObjectToEnd(GMLobject object) { if (type_ != GMLlist && type_ != GMLfile) { return; } GMLobject obj; for (obj = (GMLobject) value_; obj != null && obj.next_ != null; obj = obj.next_) { ; } if (obj == null) { value_ = object; } else { obj.next_ = object; } } COM: <s> adds a feature to the object to end attribute of the gmlobject object </s>
funcom_train/39069674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isDuplicate(ITask task, int startingIndex){ for (int i = startingIndex; i < MylarPlugin.getContextManager().getActivityHistory().getInteractionHistory().size(); i++){ ITask currTask = getHistoryTaskAt(i); if(currTask != null && currTask.getHandle() == task.getHandle()){ return true; } } return false; } COM: <s> returns true if the specified task appears in the activity </s>
funcom_train/20950200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findSupertypes(Resource res, ArrayList<Resource> list) { // add all supertypes of this type (this works only when dataModel // reasoning is off) // check if this resource already added if (!list.contains(res)) { list.add(res); StmtIterator iter = res.listProperties(RDFS.subClassOf); while (iter.hasNext()) { Statement st = (Statement) iter.next(); Resource r1 = (Resource) st.getObject().as(Resource.class); findSupertypes(r1, list); } } } COM: <s> list all supertypes of the resource </s>
funcom_train/22909491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void check(String[] expected, List<String> actual) { assertNotNull(actual); assertEquals(expected.length, actual.size()); for (int index = 0; index < expected.length; index++) { assertEquals(expected[index], actual.get(index)); } } COM: <s> check the result </s>
funcom_train/39907836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pickUp(){ theCaptain.setForward(-15, false); alignPallet(); theCaptain.setForward(2, false); arm.liftClawTo(5, false); arm.openClawTo(70, false); arm.liftClawTo(0, false); arm.openClawTo(-25, false); ffr.setLoad(ffr.getLoad()+1); arm.liftClawTo(liftHeight(), false); } COM: <s> picks up a pallet assumes that it is properly oriented </s>
funcom_train/3581650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Graphics create (int x, int y, int width, int height) { emitThis ("% create xywh "+x+" "+y+" "+width+" "+height); Graphics cg = create (); emitThis ("gsave"); cg.translate (x, y); cg.clipRect (0, 0, width, height); return cg; } COM: <s> creates a new psgr object with the specified parameters </s>