__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/29813321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOverride() throws Exception { ClientTransaction ct = createTransaction(); Person ep = new ExtendedPerson("Hotte"); setRoot("ep", ep); assertEquals("ups", ep.setGetName("Radioven")); ct.commit(); ct = createTransaction(); assertEquals("ups", ep.setGetName("Radioven")); ct.abort(); ct = createTransaction(); Person ep2 = new ExtendedPerson2("Hotte"); setRoot("ep2", ep2); ct.commit(); ct = createTransaction(); assertEquals("Hotte", ep2.setGetName("Radioven")); ct.commit(); } COM: <s> this method covers a case that cannot be covered otherwise </s>
funcom_train/51575812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getSelectedMap() { Object retObj = new Object(); final int index = this.getSelectedIndex(); if (index >= 0 && index < itemMap.size()) { retObj = itemMap.elementAt(index); } //else { // retObj = new Object(); // retObj = null; // } return retObj; } COM: <s> this method returns to map of the currently selected combobox item </s>
funcom_train/34656083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ViewUser userToDb(ViewUser user) { Object temp = user.getCustommap(); if (temp != null) { ch.unibe.a3ubAdmin.util.XmlSerializer ser = new ch.unibe.a3ubAdmin.util.XmlSerializer(); try { String str = ser.ObjectToXMLString(temp); user.setSn(str); } catch (Exception e) { if (log.isErrorEnabled()) { log.error(e); } } } return user; } COM: <s> threats view user to the db serializes the hash map from the field </s>
funcom_train/49249740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element buildEdgeTestElement(EdgeTestCommand cmd, int i) { Element edgeTestElement = getDocument().createElement("command"); edgeTestElement.setAttribute("type",EDGE_TEST_TYPE); edgeTestElement.setAttribute("n1",new Integer(cmd.getN1()).toString()); edgeTestElement.setAttribute("n2",new Integer(cmd.getN2()).toString()); return edgeTestElement; } COM: <s> builds an xml element for an edge test command </s>
funcom_train/32748804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PhaseMatrix getTransferMatrix( final String fromElement, final String toElement ) { final PhaseMatrix fromMatrix = ((TransferMapState)stateForElement( fromElement )).getTransferMap().getFirstOrder(); final PhaseMatrix toMatrix = ((TransferMapState)stateForElement( toElement )).getTransferMap().getFirstOrder(); return fromMatrix.getTransferMatrixTo( toMatrix ); } COM: <s> get the transfer matrix from one node to a second node </s>
funcom_train/7511732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemSensorClasses() { if (jMenuItemSensorClasses == null) { jMenuItemSensorClasses = new JMenuItem(); jMenuItemSensorClasses.setText(Messages.getString("MainFrame.menu.sensorClasses")); //$NON-NLS-1$ registerAction(jMenuItemSensorClasses, Actions.SENSOR_CLASSES); } return jMenuItemSensorClasses; } COM: <s> this method initializes get jmenu item sensor classes </s>
funcom_train/39179203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tag getLevel1Tag(FeatureMap annFeats) { // build the nominal features value NominalFeatures nomFeats = new NominalFeatures(annFeats); Level2Cache l1tag = level1Cache.get(nomFeats); if(l1tag == null) { l1CacheMisses++; l1tag = new Level2Cache(); level1Cache.put(nomFeats, l1tag); } else { l1CacheHits++; } return l1tag; } COM: <s> given an annotation obtain the associated level 1 </s>
funcom_train/25203425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(RandomAccessR rar, int baseoffset) throws IOException { rar.seek(baseoffset + offset); lookupOrderOffset = rar.readUnsignedShort(); reqFeatureIndex = rar.readUnsignedShort(); int featureCount = rar.readUnsignedShort(); featureIndex = new int[featureCount]; for (int i = 0; i < featureCount; i++) { featureIndex[i] = rar.readUnsignedShort(); } } COM: <s> read the language system table </s>
funcom_train/12709299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDomainInUse(Domain aDomain) { for (Attribute<T> theAttribute : this) { DataType theType = theAttribute.getDatatype(); if (theType.isDomain()) { if (aDomain.getSystemId().equals(((Domain) theType).getSystemId())) { return true; } } } return false; } COM: <s> test if a domain is in use </s>
funcom_train/49074051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void scrollOneRowDown() { this.firstVisibleButtonIndex += this.visibleButtonsInEachRow; // int buttonCount = this.ribbonGallery.getButtonCount(); // // compute the last visible button // this.lastVisibleButtonIndex = this.firstVisibleButtonIndex // + this.visibleButtonsCount - 1; // if (this.lastVisibleButtonIndex >= buttonCount) // this.lastVisibleButtonIndex = buttonCount - 1; } COM: <s> scrolls the contents of this ribbon gallery one row down </s>
funcom_train/31296247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setP2Point(double p) { // // if the probability is bogus, set it to 1.0. // later this might be an exception. // if (!(p >= 0.0 && p <= 1.0)) { p2Point = 1.0; } else { p2Point = p; } } COM: <s> setter for the two point recombination probability </s>
funcom_train/45504827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Level getEdgeLevel(Edge edge){ if (edgeLevels.isDefinedFor(edge)) return edgeLevels.get(edge); else { throw new IllegalArgumentException(DefaultLoc.getSingleton ( ).getString ("converter.EdgeLvlNotDefinedException"+" ("+edge+")")); } } COM: <s> get in which direction the edge goes i </s>
funcom_train/12561038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setContent(String[] newElements, int selectedIndex) { if (newElements != null) { numElements = newElements.length; elements = new String[numElements]; System.arraycopy(newElements, 0, elements, 0, numElements); this.selectedIndex = selectedIndex; hilightedIndex = selectedIndex; } startIndex = 0; } COM: <s> populates this sub popup layer with new elements </s>
funcom_train/20774499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEmissionProbability(String state, String observation, double prob){ HashMap<String, Double> tp = emissionProbability.get(state); if(!isSilentState(state)){ tp.put(observation,new Double(prob)); setSilentState(state, checkSilentState(state)); } } COM: <s> set emission probability </s>
funcom_train/28983777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkResultDigestTestForm () { if (okResultDigestTestForm == null) {//GEN-END:|130-getter|0|130-preInit // write pre-init user code here okResultDigestTestForm = new Command ("Ok", Command.OK, 0);//GEN-LINE:|130-getter|1|130-postInit // write post-init user code here }//GEN-BEGIN:|130-getter|2| return okResultDigestTestForm; } COM: <s> returns an initiliazed instance of ok result digest test form component </s>
funcom_train/9799662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void browseFsmlFile_actionPerformed() { File fsmlFile = null; int returnVal = jfc.showOpenDialog(this); if (returnVal == JFileChooser.APPROVE_OPTION) { fsmlFile = jfc.getSelectedFile(); try { jtxtFsmlFile.setText(fsmlFile.getCanonicalPath()); } catch (Exception ex) { ex.printStackTrace(); } } } COM: <s> action for what do do after the user has selected the fsml file </s>
funcom_train/1170528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOriginalKeyword(Card c, String s) { if (!originalKeywords.containsKey(c)) { ArrayList<String> list = new ArrayList<String>(); list.add(s); originalKeywords.put(c, list); } else originalKeywords.get(c).add(s); } COM: <s> p add original keyword </s>
funcom_train/42276064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRandomAgentState() { int startRow = randGen.nextInt(numRows); int startCol = randGen.nextInt(numCols); while (isTerminal(startRow, startCol) || !isValid(startRow, startCol)) { startRow = randGen.nextInt(numRows); startCol = randGen.nextInt(numCols); } this.agentRow = startRow; this.agentCol = startCol; } COM: <s> puts the agent into a random state </s>
funcom_train/10564965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RequestExecutor assertContentContains(String... expected) throws ParseException { assertNotNull(this.toString(), response); for (String exp : expected) { if (!content.contains(exp)) { fail(this + ": content does not contain '" + exp + "', content=\n" + content); } } return this; } COM: <s> for each supplied string fail unless content contains it </s>
funcom_train/48749262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Output getOutput(String outputName) throws ControllerException { validState(); Output oneOutput = null; if (outputCache == null) { outputCache = getOutputs(); } for (Enumeration e = outputCache.elements(); e.hasMoreElements(); ) { oneOutput = (Output) e.nextElement(); if (oneOutput.getName().equals(outputName)) { return oneOutput; } } return null; } /* getOutput(String) */ COM: <s> get a specific output item </s>
funcom_train/36446278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(String ip,int port)throws Exception{ this.connPort = port; this.agentIP = ip; if(!this.upConnected){ this.upThread = new UpThread(this); this.upThread.start(); } //Thread.sleep(2500); if(!this.downConnected){ this.downThread = new DownThread(this); this.downThread.start(); } } COM: <s> class room monitor </s>
funcom_train/12129755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTransform(AffineTransform newTransform) { if (newTransform == null) { transform = null; } else { getTransformReference(true).setTransform(newTransform); } invalidatePaint(); invalidateFullBounds(); firePropertyChange(PROPERTY_CODE_TRANSFORM, PROPERTY_TRANSFORM, null, transform); } COM: <s> set the transform applied to this node </s>
funcom_train/20514437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(ManterAnamnese entity) { LogUtil.log("saving ManterAnamnese instance", Level.INFO, null); try { entityManager.persist(entity); LogUtil.log("save successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved manter anamnese entity </s>
funcom_train/13482085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder s = new StringBuilder(100); s.append("<NeuroEvolver>"); s.append(this.cell_population.toString()); s.append(this.net_population.toString()); s.append("</NeuroEvolver>"); return s.toString(); } COM: <s> returns a string representation of this </s>
funcom_train/15420167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean applyUriOptions(String uriOptions, Query<?> query) { if (logger.isLoggable(Level.FINE)) { logger.fine("uriOptions: [" + uriOptions + "]"); } UriOptions options = UriOptions.parse(uriOptions); return applyUriOptions(options, query); } COM: <s> return true if path properties has been applied </s>
funcom_train/19747296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getClause(String rowIteratorId) { if ( (rowIteratorId == null) || (rowIterators.size() == 0) || (rowIterators.contains(rowIteratorId)) ) { if ( firstClause.length() != 0 ) { clause = "(" + firstClause + secondClause + ")"; } else { clause = null; } return clause; } else { return null; } } COM: <s> returns clause constructed from two conditions if </s>
funcom_train/29418121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void restoreWidgetValues() { IDialogSettings settings = getDialogSettings(); if (settings != null) { String[] directoryNames = settings .getArray(STORE_TARGET_NAMES_ID); if (directoryNames != null) { // target setTargetValue(directoryNames[0]); for (int i = 0; i < directoryNames.length; i++) { addTargetItem(directoryNames[i]); } String current = settings.get(STORE_TARGET_ID); if (current != null) { setTargetValue(current); } } } } COM: <s> hook method for restoring widget values to the values that they held last </s>
funcom_train/16937166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEnvironment(ContextEnvironment environment) { if (entries.containsKey(environment.getName())) { return; } else { entries.put(environment.getName(), environment.getType()); } synchronized (envs) { environment.setNamingResources(this); envs.put(environment.getName(), environment); } support.firePropertyChange("environment", null, environment); } COM: <s> add an environment entry for this web application </s>
funcom_train/16526063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getCountOfChar(String text, char c) { int count = 0; //loop through each character in the string for(int x=0; x<text.length(); x++) { char tempC = text.charAt(x); /* * increment the count if the current character matches * the one we are looking for */ if(tempC == c) { count++; } } //return the number of times we found the character return count; } COM: <s> counts the number of times a specified character shows up </s>
funcom_train/14615670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject(ObjectOutputStream stream) throws IOException { ObjectOutputStream.PutField fields = stream.putFields(); long value = 0; try { value = this.value.getAsNumber(); } catch(TemplateModelException e) { // Shouldn't ever happen since FastScalar doesn't throw this exception } // Synthesize for compactness fields.put("numberValue", value); stream.writeFields(); } COM: <s> for serialization write this object as a single long value </s>
funcom_train/20139009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Slider2D addSlider2D(String theName, int theX, int theY, int theW, int theH) { return addSlider2D(theName, 0, theW, 0, theH, 0, 0, theX, theY, theW, theH); } COM: <s> add a 2 d slider to control p5 </s>
funcom_train/44303757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsDataset(String searchTableName, String searchTableNickname) throws FatalException { checkNoEmpty(); if (singleTableName != null) { return (singleTableName.equals(searchTableName) && MelbaToolkit.equals(singleTableNickname, searchTableNickname)); } return (leftDataset.containsDataset(searchTableName, searchTableNickname) || rightDataset.containsDataset(searchTableName, searchTableNickname)); } COM: <s> code single table nickname code can be null </s>
funcom_train/18514500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BeanDescriptor getBeanDescriptor(){ descriptor = new BeanDescriptor(HodgkinHuxleyModel_1952.class); descriptor.setDisplayName("The Hodgkin-Huxley Squid Axon Model, 1952"); descriptor.setShortDescription( "The Hodgkin-Huxley Squid Axon Model, 1952 <p>"+ "J Physiol 1952;117:500-544."); descriptor.setValue("version", "1.4"); return descriptor ; } COM: <s> provides the modelss descriptor </s>
funcom_train/34262258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean shouldContinue() { if (this.getModifyController().isDirty()) { String theValidation = this.validateExecutables(); if (theValidation == null) { return true;} else { AcceptDialog theAcceptDialog = new AcceptDialog(this.getModifyController().getEditDialog(), theValidation); return theAcceptDialog.runAccept();} } // The user has not changed the data return true; } COM: <s> decides if the executables are valid files on an action file </s>
funcom_train/2940213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String decapitalizeFirstLetter (String name) { if (name==null || name.length()==0) { return ""; } String result = name.substring(0,1).toLowerCase(); if (name.length()>1) { result += name.substring(1); } return result; } COM: <s> converts the first letter of a string to lower case </s>
funcom_train/22287445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean rowIsSelectedAt(int rowIndex) { // do nothing if one of the parameters is incorrect if (rowIndex < 0 || rowIndex >= rowCount) { paramError("rowIsSelectedAt(int)", "row index "+rowIndex+" out of range"); return false; } boolean result = false; for (int i = 0; i < selectedRows.length; i++) { if (selectedRows[i] == rowIndex) { result = true; break; } } return result; } COM: <s> check whether the row with the given actual index </s>
funcom_train/16914222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recomputeMaxStimulusLength() { totalSmellVectorLength = 0; for (OdorWorldEntity entity : entityList) { if (entity.getSmellSource() != null) { totalSmellVectorLength += SimbrainMath.getVectorNorm(entity .getSmellSource().getStimulusVector()); } } } COM: <s> computes maximum stimulus length </s>
funcom_train/266383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setValue(int newValue, boolean updateTextField, boolean firePropertyChange) { int oldValue = value; if (newValue < min) { value = min; } else if (newValue > max) { value = max; } else { value = newValue; } if (updateTextField) { textField.setText(Integer.toString(value)); textField.setForeground(Color.black); } if (firePropertyChange) { firePropertyChange("value", oldValue, value); } } COM: <s> sets the value attribute of the jspin field object </s>
funcom_train/49505728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateIsDelivered() throws SQLException { if (isDelivered()) return; String query = "SELECT SUM(QtyOrdered-QtyDelivered) FROM C_OrderLine WHERE C_Order_ID=?"; PreparedStatement ps = DB.prepareStatement(query, get_TrxName()); ps.setInt(1, get_ID()); ResultSet rs = ps.executeQuery(); if (rs.next()) { int delta = rs.getInt(1); if (delta==0) { setIsDelivered(true); } } rs.close(); ps.close(); } COM: <s> checks if the order is fully delivered and if it is </s>
funcom_train/29505989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getRadioShadowHorizontalLeft() { if (radioShadowHorizontalLeft == null) { radioShadowHorizontalLeft = new JRadioButtonMenuItem(); radioShadowHorizontalLeft.setText("Left"); radioShadowHorizontalLeft.setName("HorizontalLeft"); radioShadowHorizontalLeft.addItemListener(PrincipalActionFactory.makeSelectShadowCommand(getOptions(),getFontText())); } return radioShadowHorizontalLeft; } COM: <s> this method initializes radio shadow horizontal left </s>
funcom_train/23713915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean insertActorRoles(Vector roleSpecs) { boolean res = true; for (int i = 0; i < roleSpecs.size(); i++) { RoleSpec rs = (RoleSpec) roleSpecs.elementAt(i); if (rs.isPersistent() && rs.getInstance() != null) { res = res && createRole(rs.getInstance(), rs.getRoleClass()) != null; } } return res; } COM: <s> creates roles for an actor </s>
funcom_train/36189600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onFinally(Object pojo, Method method) { if (m_usage != null) { PSSUsage usage = (PSSUsage) m_usage.get(); if (usage.m_stack > 0) { if (usage.dec()) { // Exit the method flow => Release all objects usage.clear(); m_usage.set(usage); // Set the Thread local as value has been modified } } } } COM: <s> a psspojo method is finished </s>
funcom_train/36149769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double SumXSq() { double sum = 0; for (int i = 0; i < x.size(); ++i) { sum += ((Double)x.elementAt(i)).doubleValue() * ((Double)x.elementAt(i)).doubleValue(); } return sum; } COM: <s> returns the sum of sqaures of the x values </s>
funcom_train/49333185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean dismissPopup() { if (isShowingPopup()) { getListPopupWindow().dismiss(); ViewTreeObserver viewTreeObserver = getViewTreeObserver(); if (viewTreeObserver.isAlive()) { viewTreeObserver.removeGlobalOnLayoutListener(mOnGlobalLayoutListener); } } return true; } COM: <s> dismisses the popup window with activities </s>
funcom_train/14161184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String subBasedir(String fullFilename, String basedir) { // full = basedir + pkg + filename.idl LOG.debug(">>>>> subBasedir - begin"); String s = fullFilename.substring(basedir.length() + 1); int limit = s.lastIndexOf(File.separator); s = s.substring(0, limit); LOG.debug("<<<<< subBasedir - end:" + s); return s; } COM: <s> remove the base dir in the directory class name </s>
funcom_train/44383194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JDialog getCostsDialog() { if (costsDialog == null) { costsDialog = new JDialog(getEffectsDialog()); costsDialog.setTitle("Choose the costs to add"); costsDialog.setSize(new Dimension(331, 258)); costsDialog.setModal(true); costsDialog.setContentPane(getCostsDialogContentPane()); } return costsDialog; } COM: <s> this method initializes costs dialog </s>
funcom_train/18728150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenuItem getMenuItemForMode(int mode) { Component[] children = menuBar.getComponents(); for (int i = 0; i < children.length; ++i) { if (children[i] instanceof AbstractMenu) { JMenuItem item = getMenuItemForMode((AbstractMenu) children[i], mode); if (item != null) { return item; } } } return null; } COM: <s> returns the menu item for a given mode </s>
funcom_train/37865636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean match( NodePath path ) { if ( includeByDefault ) { // check exclusions for (int i = 0; i < excludePath.length; i++) if( excludePath[i].match(path) ) return false; return true; } for (int i = 0; i < includePath.length; i++) { if( includePath[i].match(path) ) return true; } return false; } COM: <s> check if a given path should be indexed </s>
funcom_train/50273001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect() throws IOException { if (connected) return; plainConnect(); if (cachedResponse != null) { // using cached response return; } /* TODO: remove if not needed if (!http.isCachedConnection() && http.needsTunneling()) { doTunneling(); } ((HttpsClient)http).afterConnect(); */ } COM: <s> implements the http protocol handlers connect method </s>
funcom_train/11734654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canRead(EventState eventState) throws RepositoryException { Path targetPath = pathFactory.create(eventState.getParentPath(), eventState.getChildRelPath().getName(), eventState.getChildRelPath().getNormalizedIndex(), true); return session.getAccessManager().canRead(targetPath, null); } COM: <s> returns code true code if the item corresponding to the specified </s>
funcom_train/50187056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printHashtable(Hashtable table, StringBuffer str) { Enumeration keys = table.keys(); String key; Value value; while (keys.hasMoreElements()) { key = (String) keys.nextElement(); value = (Value) table.get(key); log.info(key + " = " + value); str.append("\t" + key + " = " + value).append("\n"); } } COM: <s> this method displays the content of a hashtable </s>
funcom_train/12562543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MIDletProxy findMIDletProxy(int externalAppId) { synchronized (midletProxies) { for (int i = midletProxies.size() - 1; i >= 0; i--) { MIDletProxy current = (MIDletProxy)midletProxies.elementAt(i); if (current.getExternalAppId() == externalAppId) { return current; } } } return null; } COM: <s> find the midlet proxy that has matching external app id </s>
funcom_train/12641487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { ArrayList v = (ArrayList)super.clone(); v.elementData = new Object[size]; /* IAI - 15 */ CVM.copyObjectArray(elementData, 0, v.elementData, 0, size); /* IAI - 15 */ v.modCount = 0; return v; } catch (CloneNotSupportedException e) { // this shouldn't happen, since we are Cloneable throw new InternalError(); } } COM: <s> returns a shallow copy of this tt array list tt instance </s>
funcom_train/8009832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HtmlLink newEmailLink(String name, String text, String address) { HtmlLink l = new HtmlLink(name, "mailto:" + address, _page); HtmlText t = new HtmlText(text, HtmlText.FONT_LINK, _page, _theme); l.add(t); return l; } COM: <s> use this method to create an e mail send to link </s>
funcom_train/8374205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double computeDistortion(){ double[] x; double sum = 0; for(int i=0;i<input.size();i++){ x = (double[]) input.elementAt(i); sum += computeDistance(x,(double[]) codebook.elementAt( q(x) )); } return sum/input.size(); } COM: <s> computes the overall average distortion for the input set of vectors and </s>
funcom_train/40337052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Control createControl(Composite parent, SelectionListener listener) { table = new TableViewer(parent, SWT.V_SCROLL | SWT.BORDER); table.setContentProvider( CollectionContentProvider.newProvider(task.getMigrationGroups())); table.getTable().addSelectionListener(listener); return table.getControl(); } COM: <s> create the gui control under the given parent </s>
funcom_train/15800854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Question populateTemplate(String newId, String newLabel, boolean mandatory, String answer) { Question dupe = populateChildTemplate(newId); if (newLabel == null) { dupe.setLabel(label); } else { dupe.setLabel(newLabel); } dupe.mandatory = mandatory; if (answer != null && !"".equals(answer)) { dupe.setAnswer(answer); } return dupe; } COM: <s> calling this method makes a duplicate of the current question but it doesnt </s>
funcom_train/18544787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getBundleMessage(PageContext pageContext, String key){ String value = ""; try { value = RequestUtils.message(pageContext, null, Globals.LOCALE_KEY, key, null); } catch (JspException e) { value = "err!"; } return value; } COM: <s> get the key used by image html alt </s>
funcom_train/33964889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRun() { System.out.println("run"); consumerThread.start(); consumer.stop(); boolean ableToJoin = false; try { consumerThread.join(1000l); ableToJoin = true; }catch(InterruptedException e) { } assertTrue(ableToJoin); } COM: <s> test of run method of class expect4j </s>
funcom_train/37637635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHorizontalAlignment(int row, int column, int horizontalAlign){ horizontalAlignment.setElementAt(row, column, new Integer(horizontalAlign)); AttributeModelEvent e = new AttributeModelEvent(this, AttributeModelEvent.CELLS_UPDATED, row, column, 1, 1); fireDataChanged(e); } COM: <s> set the horizontal alignment of cell row column </s>
funcom_train/49073600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void installDefaults() { if (!this.ribbonComponent.isSimpleWrapper()) { ResizableIcon icon = this.ribbonComponent.getIcon(); if (icon != null) { icon.setDimension(new Dimension(16, 16)); this.disabledIcon = createDisabledIcon(); } } this.ribbonComponent.getMainComponent().setOpaque(false); this.ribbonComponent.setOpaque(false); } COM: <s> installs default parameters on the associated ribbon component </s>
funcom_train/21437666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void setText(Node node, String value) { if( node==null ) return; Node child = findChild(node,"#text"); if( child==null ) node.appendChild(node.getOwnerDocument().createTextNode(value)); else child.setNodeValue(value); } COM: <s> set the text of a specified node </s>
funcom_train/21877641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String newUri(Project proj, Model model, String prefix) { String baseObjUri = proj.getNSUriString() + "/" + URI_PATH_MODULES; String base = baseObjUri + "#" + (null == prefix ? "cmd_" : prefix); return Workbench.getRevisionModelStrategy().generateUri(base, model); } COM: <s> generate a uri for a new object instance in the project and model </s>
funcom_train/16476108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireFileCloseEvent(BenchmarkFile e) { // System.out.println("Fire FileCloseEvent: " + e.toString()); // DEBUG final BenchmarkFileEvent event = new BenchmarkFileEvent(e); fireEvent( new EventHandler<BenchmarkFileEvent>(event) { @Override protected void dispatch(FileEventListener listener, BenchmarkFileEvent event) { listener.fileClosed(event); } }); } COM: <s> fire an event to note that the given file was closed </s>
funcom_train/37072233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getMethodSetterName(String key) { if (key.indexOf("_") == -1) { return "set" + pub.utils.StringUtils.uppercaseFirst(key); } else { String[] fragments = StringUtils.split('_', key); StringBuffer buffer = new StringBuffer("set"); for(int i = 0; i < fragments.length; i++) { buffer.append(pub.utils.StringUtils.uppercaseFirst(fragments[i])); } return buffer.toString(); } } COM: <s> given the name of a key try to reconstruct the name of the </s>
funcom_train/42958616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("cancel")) { int row = transferTable.getSelectedRow(); if (row >= 0) { UUID code = (UUID) transferTable.getValueAt(row, 0); mediaModule.cancelDownload(code); } } else if (e.getActionCommand().equals("clear")) { mediaModule.clear(); } } COM: <s> invoked when the user presses the start button </s>
funcom_train/21655731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCbDepartamentos() { if (cbDepartamentos == null) { cbDepartamentos = new JComboBox(); this.modeloListaDepartamento = new ModeloListaDepartamento(); cbDepartamentos.setModel(modeloListaDepartamento); cbDepartamentos.setBounds(new Rectangle(195, 100, 250, 25)); cbDepartamentos.addItemListener(new ItemListener(){ public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { mostrarMunicipios(); } } }); } return cbDepartamentos; } COM: <s> this method initializes cb departamentos </s>
funcom_train/9163736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load(String name, File dir) throws IOException { File[] files = dir.listFiles(); for (File f: files) { if (f.isDirectory()) { load(name + ":" + f.getName(), f); } else if (f.getName().endsWith(".dex")) { add(name + ":" + IO.baseName(f), new FileReader(f)); } } } COM: <s> loads all the dex source files in the given directory and its subdirectories </s>
funcom_train/22909475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeAllImages() { List<ImageInfo> images = new ArrayList<ImageInfo>(); for (int index = 0; index < tableModel.getRowCount(); index++) { images.add(tableModel.getImageInfo(index)); } TaskExecutor.execute(new RemoveImagesTask(REMOVE_IMAGES, REMOVE_ALL_IMAGES, tableModel, images)); } COM: <s> remove all images from the table </s>
funcom_train/31337301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearQuickSearch(boolean refresh) { setSearchControlsVisible(false); if (fSearchInput.getText().length() != 0) { fBlockRefresh = !refresh; try { fSearchInput.setText(""); //$NON-NLS-1$ } finally { fBlockRefresh = false; } } } COM: <s> clear the quick search </s>
funcom_train/29624445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNode(int id){ NetTopoApp app = NetTopoApp.getApp(); synchronized (app) { WirelessSensorNetwork wsn = app.getNetwork(); if(app.getCurrentSelectedNode() != null && app.getCurrentSelectedNode().getID() == id){ app.setCurrentSelectedNode(null); } wsn.deleteNodeByID(id); this.rePaintAllNodes(); } } COM: <s> remove the node with the id </s>
funcom_train/12335788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2D getRelativeMousePosition() { Point mousePos = getMousePosition(); if (mousePos == null) return null; return new Point2D.Double( ((double) mousePos.getX() / (double) getWidth()) * 2d - 1d, -(((double) mousePos.getY() / (double) getHeight()) * 2d - 1d) ); } COM: <s> returns mouse coordinates relative to the area </s>
funcom_train/21643621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOptionsRenderingMethod(int optionsRenderingMethod) { this.optionsRenderingMethod = optionsRenderingMethod; props.setProperty(OPTIONS_RENDERING_METHOD, "" + optionsRenderingMethod); Object value; switch (optionsRenderingMethod) { case 1: value = RenderingHints.VALUE_RENDER_QUALITY; break; case 2: value = RenderingHints.VALUE_RENDER_SPEED; break; case 0: default: value = RenderingHints.VALUE_RENDER_DEFAULT; } renderingHints.put(RenderingHints.KEY_RENDERING, value); } COM: <s> sets the options rendering method </s>
funcom_train/3045673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String expandParameterLists(Map namedParamsCopy) { String query = this.queryString; Iterator iter = namedParameterLists.entrySet().iterator(); while ( iter.hasNext() ) { Map.Entry me = (Map.Entry) iter.next(); query = expandParameterList( query, (String) me.getKey(), (TypedValue) me.getValue(), namedParamsCopy ); } return query; } COM: <s> warning adds new parameters to the argument by side effect as well as </s>
funcom_train/36459569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FacetState createInitialState(final Map<String, String> config, Data data) { // create the initial facet (hidden in the UI) FacetStateImpl initalFacetState = (FacetStateImpl) createState(config, null, data); initalFacetState.setName(config.get(Facet.FACET_BASE)); return initalFacetState; } COM: <s> p creates an initial state for the facet </s>
funcom_train/1957871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCount(int c) { switch (getMode()) { case PACKETS: packetField.setText(Integer.toString(c)); packetButton.setSelected(true); break; case TIME: int m, s, h; s = c; h = s / 3600; s %= 3600; m = s / 60; s %= 60; secBox.setSelectedIndex(s); minBox.setSelectedIndex(m); hoursBox.setSelectedIndex(h); timeButton.setSelected(true); break; default: simButton.setSelected(true); break; } } COM: <s> set the count for this card </s>
funcom_train/9363480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void error(int id, String description) { if (DebugFlags.LOAD_LISTENER) { Log.v(LOGTAG, "LoadListener.error url:" + url() + " id:" + id + " description:" + description); } sendMessageInternal(obtainMessage(MSG_CONTENT_ERROR, id, 0, description)); } COM: <s> implementation of error handler for event handler </s>
funcom_train/34193585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calibrationPointPositionFindingCompleteHandler() { // Reset the flag this.isRunningCalibrationPointPositionFinding = false; // Clear calibration finder runner this.calibrationPointPositionFinderRunner = null; // Re enable all buttons enableButtons(locateCalibrationPointsPositionsButton, true); // Change text to start locateCalibrationPointsPositionsButton.setText("Start"); // Cause information panel to update display calibrateList.repaint(); } COM: <s> helper for handling calibration point positions finding completion </s>
funcom_train/10615643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExpandGeneralFailed() throws Exception { try { PolicyUtils.expandGeneral("${{c}}", new PolicyUtils.GeneralExpansionHandler() { public String resolve(String protocol, String data) throws PolicyUtils.ExpansionFailedException { throw new PolicyUtils.ExpansionFailedException(""); } }); fail("Should throw ExpansionFailedException"); } catch (PolicyUtils.ExpansionFailedException ok) {} } COM: <s> tests expansion failed exception for undefined protocol </s>
funcom_train/43621032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSortOrderCycle(SortOrder... cycle) { SortOrder[] old = getSortOrderCycle(); if (getControlsSorterProperties()) { getSortController().setSortOrderCycle(cycle); } this.sortOrderCycle = Arrays.copyOf(cycle, cycle.length); firePropertyChange("sortOrderCycle", old, getSortOrderCycle()); } COM: <s> sets the sortorder cycle used when toggle sorting this tables columns </s>
funcom_train/26409115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean handleEvent(Event evt) { if (evt.id == Event.MOUSE_DOWN) { if (loaded) { if (engine != null && engine.isAlive()) { if (userPause) { engine.resume(); startPlaying(); } else { engine.suspend(); stopPlaying(); } userPause = !userPause; } else { userPause = false; setFrameNum(0); engine = new Thread(this); engine.start(); } } return true; } else { return super.handleEvent(evt); } } COM: <s> pause the thread when the user clicks the mouse in the applet </s>
funcom_train/15488041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRoot(Object root) { if(root == null) throw new IllegalArgumentException("Root of tree is not allowed to be null"); this.root = root; fireTreeStructureChanged(this, null, new int[] {0}, new Object[] {root}); } COM: <s> sets the root to code root code </s>
funcom_train/2325022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperty(FloatProperty property) { if (this == DEFAULT && property != this.property) throw new IllegalArgumentException("Attempted to modify immutable object."); if (this == ZERO && property != this.property) throw new IllegalArgumentException("Attempted to modify immutable object."); this.property = property; } COM: <s> attaches the given property object to this algebra defining tolerance </s>
funcom_train/19371115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent e) { Object source = e.getSource(); if (source instanceof JTabbedPane){ JTabbedPane myPane = (JTabbedPane)source; if (currentTabIndex != myPane.getSelectedIndex()) viewChanged(currentTabIndex,myPane.getSelectedIndex()); } // what else can change? } COM: <s> currently only handles changes in active tab pane </s>
funcom_train/11009597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeCellComment() { XSSFComment comment = getCellComment(); if(comment != null){ String ref = _cell.getR(); XSSFSheet sh = getSheet(); sh.getCommentsTable(false).removeComment(ref); sh.getVMLDrawing(false).removeCommentShape(getRowIndex(), getColumnIndex()); } } COM: <s> removes the comment for this cell if there is one </s>
funcom_train/31157460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createRGB() { tileMaskRGB = new int[tileWidth][tileHeight]; for (int x = 0; x < tileWidth; x++) { for (int y = 0; y < tileHeight; y++) { tileMaskRGB[x][y] = tileMask.getRGB(x, y); } } } COM: <s> caches the rgb values of the tile </s>
funcom_train/37775802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedRows(List rowNums) { m_selectedRows.clear(); for(Iterator itr = rowNums.iterator(); itr.hasNext(); ) { int i = Integer.parseInt( (String) itr.next() ); Object row = m_rows.get(i); if (row != null) m_selectedRows.add(row); } setModelChanged(true); } COM: <s> sets the selected rows </s>
funcom_train/3923547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void forward( Request r ) { if ( r.getClient().session != null ) { //client.session.sendRequest( r.toString() ); r.getClient().session.sendRequest( r ); //Logger.logDebug( "Forwarded message: "+r ); } } COM: <s> forward request to the client </s>
funcom_train/3840248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { // System.out.println("Attempting to establish connection..."); _socket = new Socket(); _socket.connect(new InetSocketAddress(_address, _port), 10000); // System.out.println("Connected"); } catch (Exception e) { _connectException = e; } endConnectionThread(); } COM: <s> the runnable code of the thread that attempts a connection to the server </s>
funcom_train/3778850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAttributeWithSpuriousEqualTo() { getParameterTableFor( "a class=rlbA href=/news/866201.asp?0sl=-32" ); assertStringEquals( "href", "/news/866201.asp?0sl=-32", (attributes.elementAt (4)).getValue () ); } COM: <s> test attribute containing an equals sign </s>
funcom_train/37835927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showCategorySummary(final String category, final List<String> items) { SwingUtilities.invokeLater(new Runnable() { public void run() { // Prepare appropriate action for content clicks RequestAction contentAction = new RequestAction(); contentAction.setDataKey("item"); contentAction.setProgressType(category); getProgressLog().setPageIndex(category, items, contentAction); showWindow(); } }); } COM: <s> show a list of items in a category </s>
funcom_train/19100667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invokeStep(int x, int y, int anchorX, int anchorY, DrawingView view) { int i = ((UndoMove) getUndoActivity()).getPointIndex(); ((LineConnection) owner()).setPointAt(new Point(x, y), i); } COM: <s> overridden to avoid dependency on poly line figure </s>
funcom_train/648475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getLstFolders() { if (lstFolders == null) { lstFolders = new JList(); lstFolders.setModel(getDefaultListModel()); lstFolders.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); lstFolders.setVisibleRowCount(0); lstFolders.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { mainGui.setDirty(); } }); } return lstFolders; } COM: <s> this method initializes lst folders </s>
funcom_train/32720393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireAuthenticationFailure(AuthenticationFailureEvent event) { if (authenticationFailureListeners != null) { Vector listeners = authenticationFailureListeners; int count = listeners.size(); for (int i = 0; i < count; i++) { ((AuthenticationFailureListener) listeners.elementAt(i)). authenticationFailure(event); } } } COM: <s> fires an code authentication failure event code to all registered </s>
funcom_train/10800776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { writeLock(); try { notifyEntryRemovals(pinnedMap.entrySet()); pinnedMap.clear(); _pinnedSize = 0; notifyEntryRemovals(cacheMap.entrySet()); cacheMap.clear(); notifyEntryRemovals(softMap.entrySet()); softMap.clear(); } finally { writeUnlock(); } } COM: <s> removes pinned objects as well as unpinned ones </s>
funcom_train/39914294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLabel11() { System.out.println("getLabel11"); Page1 instance = new Page1(); Label expResult = null; Label result = instance.getLabel11(); 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 label11 method of class timesheetmanagement </s>
funcom_train/20885032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStringCSV() { StringDTO dto = new StringDTO(); dto.stringField = "stringValue"; assertTrue(JSefaTestUtil.serialize(CSV, dto).indexOf("stringValue") >= 0); JSefaTestUtil.assertRepeatedRoundTripSucceeds(CSV, dto); } COM: <s> tests string csv </s>
funcom_train/27715371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String lonToString(double lon, int sigDigits) { double wlon = lonNormal(lon); boolean is_east = (wlon >= 0.0); if (!is_east) { wlon = -wlon; } lonBuff.setLength(0); lonBuff.append(Format.d(wlon, sigDigits)); lonBuff.append(is_east ? "E" : "W"); return lonBuff.toString(); } COM: <s> make a nicely formatted representation of a longitude eg 120 </s>
funcom_train/25742824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyUser(SensorReport report, Long userId) { User user = Dao.getHead().getAuth().user(userId); if(user == null) { log.error("No such user: " + userId); return; } // todo user config pool.submit(new ReportNotify() .setReport(report) .setAddress(user.getEmail())); } COM: <s> handles notification of users according to user preferences </s>
funcom_train/20042742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _addItems() { executeMethod("addItem()") ; boolean result = true ; short oldCnt = oObj.getItemCount() ; oObj.addItems(new String[] {"Item2", "Item3"}, oldCnt) ; result = oObj.getItemCount() == oldCnt + 2 ; tRes.tested("addItems()", result) ; } COM: <s> adds one two items to the last position and check the number of </s>