__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/21884969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOrLeftTermPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_OrTerm_orLeftTerm_feature"), getString("_UI_PropertyDescriptor_description", "_UI_OrTerm_orLeftTerm_feature", "_UI_OrTerm_type"), BoolScriptPackage.Literals.OR_TERM__OR_LEFT_TERM, true, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the or left term feature </s>
funcom_train/45646231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Plumage createPlumage() { //delete propagate flag if (recommendedAction == LearningConstants.LEARNING_Propagate) { //delete PROPAGATE flag recommendedAction = LearningConstants.LEARNING_None; } else if (recommendedAction == LearningConstants.LEARNING_Adapt_and_Propagate) { //delete PROPAGATE flag recommendedAction = LearningConstants.LEARNING_Adapt; } //return new plumage for propagation // return new Plumage(this.getAverageProfit(), // learningOwner.getStrategy().getMyGenotype()); return null; }//create plumage COM: <s> erzeugt ein plumage objekt passend zu diesem agenten </s>
funcom_train/43327986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double calcMinY() { if (graphs==null) return 0.0; double rv; Graphable2D gr; gr = (Graphable2D)graphs.elementAt(0); rv = gr.minY(); for (int i=1; i<graphs.size(); i++) { gr = (Graphable2D)graphs.elementAt(i); double m = gr.minY(); if (m < rv) rv = m; } return rv; } COM: <s> returns the minimum y value from all the graphs </s>
funcom_train/41716793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void outputDocument(Document document, File file) { try { DOMSource source = new DOMSource(document); String filename = file.getName(); if (!filename.endsWith(".xml")) { filename += ".xml"; file = new File(file.getParent(), filename); } StreamResult result = new StreamResult(file); Transformer transformer = createTransformer(); transformer.transform(source, result); } catch (TransformerException e) { // HACK do a lot better here since means data is not saved throw new IllegalArgumentException( "Transformer exception while transforming"); } } COM: <s> question shouldnt we check if file exists e </s>
funcom_train/8066262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private XMLElement createXmlElement(String name, Attributes atts) { if (nFreeElements == 0) { return new XMLElement(name, atts); } XMLElement e = freeElements[--nFreeElements]; e.setName(name); e.setAttributes(atts); e.resetText(); return e; } COM: <s> factory method to return an xmlelement </s>
funcom_train/36738780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String locationInPuzzle(String word) { whereFound = new String( ); for (int i = 1; i <= theRows; i++) { for (int j = 1; j <= theCols; j++) { if (theBoard [i][j].getData( ) == word.charAt(0) ) { searchAt(word, i, j); } } } return whereFound; } COM: <s> returns a string describing where word is found in the puzzle </s>
funcom_train/40539860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cancel() { running = false; if (timeoutTimerId != NO_TIMER) { clearTimeout(timeoutTimerId); timeoutTimerId = NO_TIMER; } if (iframe != null) { detachIFrameListeners(); // TODO: GWT 2.0 // iframe.removeFromParent(); // form.removeFromParent(); removeFromParent(iframe); removeFromParent(form); iframeDocument = null; iframe = null; form = null; // Allow IE to reclaim the htmlfile document collectGarbage(); } } COM: <s> cancels a running request </s>
funcom_train/13997061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readTag() throws IOException { StringBuffer sb = new StringBuffer(); char c = (char) XMLData.read(); try { while (c != '>') { sb.append(c); c = (char) XMLData.read(); } } catch (IOException e) { return sb.toString(); //return even if there is an error } return sb.toString(); } COM: <s> given the beginning of the stream is a returns the string till the </s>
funcom_train/15626036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireMapSquaresChangedEvent(final Set<MapSquare<G, A, R>> mapSquares) { setModified(); for (final MapModelListener<G, A, R> listener : mapModelListeners.getListeners()) { listener.mapSquaresChanged(mapSquares); } } COM: <s> fire a map squares changed event </s>
funcom_train/10788314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String newLine(int line) { String result = ""; if (showLineNumber) { result = span(CSS_LINE_NO, String.format(lineNumberFormat, line) + fillWhiteSpace(" ")); } if (anchorLineNumber) { result = "<A name=" + quote("line."+line) + ">" + result + "</A>"; } return result; } COM: <s> gets a string for beginning of a new line </s>
funcom_train/8374217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void backTrack(int[] stateSequence, int[][] psi, int T){ stateSequence[T-1] = qStar; for(int t=T-2;t>=0;t--){ stateSequence[t] = psi[t+1][stateSequence[t+1]]; } } COM: <s> backtracks to find the optimal state sequence using the psi array determined during </s>
funcom_train/3698647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ StringBuffer buffer = new StringBuffer(10000); if(prefixToken != null){ buffer.append(DOUBLE_POINTS + prefixToken + SPACE); } if(commandToken != null){ buffer.append(commandToken); } if(paramsToken != null){ buffer.append(paramsToken); } buffer.append("\015\012"); return buffer.toString(); } COM: <s> to get the content of the message </s>
funcom_train/16218804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHorizontalSpeed(long elapsedTime, double accel, double maxSpeed) { if (accel == 0 || elapsedTime == 0) { return; } this.horizontalSpeed += accel * elapsedTime; if (accel < 0) { if (this.horizontalSpeed < maxSpeed) { this.horizontalSpeed = maxSpeed; } } else { if (this.horizontalSpeed > maxSpeed) { this.horizontalSpeed = maxSpeed; } } } COM: <s> accelerates sprite horizontal speed by code accel code and limit the </s>
funcom_train/35130373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUnit(Unit unit) throws WatchListException { if (contains(unit.getId())) { log.warning("The unit: " + unit.getId() + " is in the list"); throw new WatchListException("The unit is already on your watch list."); } log.info("About to add the unit: " + unit.getId()); fUnits.add(unit); } COM: <s> add a unit to the watch list </s>
funcom_train/44869782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMPanelBean getTPanel() { if (tPanel == null) { tLabel = new JLabel(); tLabel.setText(" t = "); tPanel = new WCMPanelBean(); tPanel.setLayout(new BoxLayout(getTPanel(), BoxLayout.X_AXIS)); tPanel.add(tLabel, null); tPanel.add(getTInput(), null); tPanel.add(getTSlider(), null); } return tPanel; } COM: <s> this method initializes t panel </s>
funcom_train/10592907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parameterize(Parameters params) throws ParameterException { super.parameterize(params); String compilerClass = params.getParameter("compiler"); try { this.compilerClass = ClassUtils.loadClass(compilerClass); } catch (ClassNotFoundException e) { throw new ParameterException("Unable to load compiler: " + compilerClass, e); } this.deleteSources = params.getParameterAsBoolean("delete-sources", false); } COM: <s> set the configuration parameters </s>
funcom_train/34356089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getSpeciesList () { Vector rs_species = null; String query = "SELECT ncbi_taxa_id, genus, species FROM species " ; try { rs_species = this.dbcon.query_result_set (query) ; } catch (SQLException e) { System.err.println("Error at getSpeciesList query:" + query); e.printStackTrace(System.out) ; } return rs_species ; } COM: <s> retrieves information on all taxons in the database </s>
funcom_train/15746723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnabled(boolean enable) { if (enable == enabled) return; enabled = enable; if (previousEditDomain == null) previousEditDomain = getGraphicalViewer().getEditDomain(); // Deselect on disable if (!enabled) { getGraphicalViewer().deselectAll(); getGraphicalViewer().setEditDomain(lockedEditDomain); } else getGraphicalViewer().setEditDomain(previousEditDomain); // actually just used for select all, other actions auto-update actionRegistry.setEnabled(enable); // we have to update the registered actions updateActions(); } COM: <s> disables editing for this graphical editor </s>
funcom_train/49402543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encode(final String val) { try { byteBuffer.clear(); byteBuffer.putInt(val.length()); os.write(byteBuffer.array()); os.write(val.getBytes()); } catch (IOException e) { throw new RuntimeIOException(e); } } COM: <s> write object to file </s>
funcom_train/43245129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPatientDoB() { System.out.println("getPatientDoB"); PatientDemographicsDG1Object instance = new PatientDemographicsDG1Object(); Calendar expResult = null; Calendar result = instance.getPatientDoB(); 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 patient do b method of class org </s>
funcom_train/37828709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HttpURLConnection connect(String url) throws IOException { URL urlObj = new URL(url); HttpURLConnection connection = (HttpURLConnection) urlObj.openConnection(); // configure the request connection.setRequestProperty("User-Agent", USER_AGENT); connection.setInstanceFollowRedirects(true); // send cookies for (String cookie : cookies) { connection.setRequestProperty("Cookie", cookie); } return connection; } COM: <s> sets a custom user agent to allow sf </s>
funcom_train/41621492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validateAnim(IMD5Anim anim) { if(this.joints.length != anim.getJointIDs().length) return false; else { boolean result = true; for(int i = 0; i < this.joints.length && result; i++) { result = this.joints[i].getName().equals(anim.getJointIDs()[i]); } return result; } } COM: <s> validate the given animation with controlled skeleton </s>
funcom_train/47980597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unregisterXMPPBean(XMPPBean prototype) { String namespace = prototype.getNamespace(); String childElement = prototype.getChildElement(); synchronized (this.beanPrototypes) { if (this.beanPrototypes.containsKey(namespace)) { this.beanPrototypes.get(namespace).remove(childElement); if (this.beanPrototypes.get(namespace).size() > 0) this.beanPrototypes.remove(namespace); } } } COM: <s> unregister an xmppbean from prototypes </s>
funcom_train/13675135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAddress(String address) { try { if (address == null || address.equals("") || address.equals("localhost")) { m_Address = InetAddress.getLocalHost().getHostName(); } } catch (Exception ex) { log.error("setAddress()", ex); } m_Address = address; }//setAddress COM: <s> sets the internet address of this tt post office tt </s>
funcom_train/26225590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLineNumberInfo(Vector lineNumberInfo) { if (lineNumbers != null) { for (Enumeration enum = lineNumbers.elements(); enum.hasMoreElements(); ) { int line = ((Integer)enum.nextElement()).intValue(); lineNumberInfo.addElement(new LineNumberInfo((short)line, this)); } } } COM: <s> adds line number info stored for the instruction to the specified vector </s>
funcom_train/31036584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int encodeConstructed(int tag, Comparator comp) { DerConstructedValue value = new DerConstructedValue(getTag(tag), comp); if (!parents.isEmpty()) { DerConstructedValue parent = (DerConstructedValue) parents.peek(); parent.add(value); } else { // there is no constructed parent, prepare the value to be // directly encoded encodedValues.add(value); } parents.push(value); return parents.size(); } COM: <s> starts the encoding of a constructed value with the specified tag </s>
funcom_train/3472492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChild(StructureElement child) { children.add(child); child.setParent(this); child.setStructure(structure); // Fire event int[] indices = new int[1]; indices[0] = getIndex(child); StructureElement[] addedChildren = new StructureElement[1]; addedChildren[0] = child; fireStructureElementEvent(new StructureElementEvent(this, StructureElementEvent.CHILDREN_INSERTED, addedChildren, indices)); } COM: <s> adds a child to the current children </s>
funcom_train/37823046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void matchSize(int posX, int posY) { if(posY<0) { setSize(getWidth(), getHeight()- posY); setPreferredSize(getSize()); } int x = posX+nodeSize+SPACE_SMALL; if(x>getWidth() || !successorsVisible) { setSize(x, getHeight()); setPreferredSize(getSize()); } } COM: <s> if the nodes are too large to be fully drawn </s>
funcom_train/40468381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onViewReady(View view) { viewReady = true; plot.init(view); // possible leak source - FIXME // HistoryManager.putChart(id, chart); chart.redraw(); if (readyListener != null) { readyListener.onViewReady(view); // run just once readyListener = null; } } COM: <s> invoked when a browser view is finished construction and ready for </s>
funcom_train/28297839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getTrainY(int player,TransSibGameState game) { if (game!=null) { int minDist=(int)(TransBaseSettings.sizeTrain/3); double range=(TransBaseSettings.sizeScoreDisplay-minDist*2)/(game.getNrPlayers()+1); int y=minDist+(int)(range*(player+1)); return y; } return 0; } COM: <s> returns the y position for the train of the given player </s>
funcom_train/44221711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void draw_excerpt_number(Graphics g, Excerpt excerpt, int number) { int x = excerpt.get_bl_x() - 15; int y = excerpt.get_bl_y() - 3; String str = "" + number; if (excerpt.get_supportedData() != null) { str += "*"; } g.drawString(str, x, y); } COM: <s> draw the number on the excerpt </s>
funcom_train/26509226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isElement(Object e) { for (int i=0; i<elements.length; i++) if ((elements[i]==null && e==null) || (elements[i]!=null && e!=null && equals(elements[i],e))) return true; return false; } COM: <s> checks if an code object code is contained in this set </s>
funcom_train/11771001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBoxFilter() { if (jCheckBoxFilter == null) { jCheckBoxFilter = new JCheckBox(); jCheckBoxFilter.setSelected(jDiagram.getModel().isFilter()); jCheckBoxFilter.setFont(GuiFont.FONT_PLAIN_SMALL); } return jCheckBoxFilter; } COM: <s> this method initializes j check box filter </s>
funcom_train/36061047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getEntriesCount( EventLogFilter filter ) throws NoDatabaseConnectionException, SQLException{ Connection connection = null; PreparedStatement statement = null; ResultSet resultset = null; try{ connection = application.getDatabaseConnection(DatabaseAccessType.EVENT_LOG); statement = getQuery(filter, connection, true); resultset = statement.executeQuery(); if( resultset.next() ){ return resultset.getInt("EntriesCount"); } else{ return 0; } } finally{ if( connection != null){ connection.close(); } if( statement != null){ statement.close(); } if( resultset != null){ resultset.close(); } } } COM: <s> get a count of the log entries that match the given filter </s>
funcom_train/21503474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInletPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SubsystemInputPort_inlet_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SubsystemInputPort_inlet_feature", "_UI_SubsystemInputPort_type"), DMLPackage.Literals.SUBSYSTEM_INPUT_PORT__INLET, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the inlet feature </s>
funcom_train/18771091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerMeToEvent(int type, int phase, int trigger, Vector filtervec) { if (phase == TriggerConstants.TRANSFER_PHASE) { if (type == TriggerConstants.INFO_TYPE_CONTENT) { if (trigger == TriggerConstants.TRIGGER_CONTENT) { filtervec.add(this); } } if (type == TriggerConstants.INFO_TYPE_META) { if (trigger == TriggerConstants.TRIGGER_DESTINATION) { filtervec.add(this); } } } } COM: <s> called to determine which filters are implemented by this filter </s>
funcom_train/36138276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWidgetID(String id) { if (id == null) { widgetID = null; } else { WidgetReference ref = getResolver().getWidgetReference(id); if (ref != null) { widgetID = id; setTargetClassName(ref.getRefClassName()); } else throw new NoSuchReferenceException(id); } } COM: <s> set the widget reference id used by method invocation </s>
funcom_train/7270204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void playSong() { PlaylistDataLine line = DATA_MODEL.get(TABLE.getSelectedRow()); if(line == null) return; PlayListItem f = line.getPlayListItem(); MODEL.setCurrentSong(f); MediaPlayerComponent.getInstance().loadSong(f); } COM: <s> plays the first selected item </s>
funcom_train/17932694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroyThreads() { isSimulationAborted = true; // inform ABPSFrame that the simulation has been aborted setChanged(); notifyObservers(new Boolean(true)); // TODO: is the killing order important? Log.println("Killing predictor threads"); for (int i = 0; i < predictorThreads.size(); i++) { predictorThreads.get(i).stop(); } Log.println("Killing detector threads"); for (int i = 0; i < detectorThreads.size(); i++) { detectorThreads.get(i).stop(); } } COM: <s> destroys all the simulation threads </s>
funcom_train/33403211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTestOnly() throws SQLException { if (testOnly) { log.severe(getDatabaseUsed()+":"+getStoredProcedureName()+" is marked test on database"); throw new SQLException(getDatabaseUsed()+":"+getStoredProcedureName()+" is marked test on database"); } return testOnly; } COM: <s> returns test only status of api </s>
funcom_train/50835156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getButtonPanel() { buttonPanel = new JPanel(new FlowLayout(FlowLayout.LEADING)); buttonPanel.setAlignmentX(Component.LEFT_ALIGNMENT); buttonPanel.setMaximumSize(new Dimension(200, 100)); buttonPanel.add(this.getJButton_start_stop()); buttonPanel.add(this.getjCheckBox_loadOnStartup()); return buttonPanel; } COM: <s> this method initializes button panel </s>
funcom_train/35020892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deletePrepareRequest() { if (prepareRequest != null) { try { VirtualMachine vm = prepareRequest.virtualMachine(); EventRequestManager erm = vm.eventRequestManager(); erm.deleteEventRequest(prepareRequest); } catch (VMDisconnectedException vmde) { // This happens all the time. } finally { prepareRequest = null; } } } COM: <s> delete the class prepare request so we can resolve all over again </s>
funcom_train/14027750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeToByteArrayOutputStream(ConstantPool cp, ByteArrayOutputStream baos) throws IOException { baos.write(Types.bytesFromShort(cp.indexOf(_type))); baos.write(Types.bytesFromShort((short)(_pairCount & 0xffff))); for(Annotation.NameValuePair nvp:_pairs) { nvp.writeToByteArrayOutputStream(cp, baos); } } COM: <s> writes this annotation into the stream </s>
funcom_train/22286034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void layout(Widget w) { if (w.nwidgets == 0) { setContentSize(0, 0); return; } int y = 5; for (int i = 0 ; i < w.nwidgets ; i++) { Widget item = w.widgets[i]; item.setBounds(7, y, w.width-14, item.height); item.validate(); y += item.height; } setContentSize(w.width, y + 5); } COM: <s> layout the content </s>
funcom_train/3168333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XnRegion boxProjection(int box, int dimension) { return (XnRegion) (myRegions.fetch(box * crossSpace().axisCount() + dimension)); /* udanax-top.st:65732:GenericCrossRegion methodsFor: 'private:'! {XnRegion} boxProjection: box {Int32} with: dimension {Int32} "A region is at a given 2D place in the array" ^(myRegions fetch: box * self crossSpace axisCount + dimension) cast: XnRegion! */ } COM: <s> a region is at a given 2 d place in the array </s>
funcom_train/2628433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetGUIStructure() { System.out.println("getGUIStructure"); StepType instance = new StepType(); GUIStructure expResult = new GUIStructure(); instance.guiStructure = expResult; GUIStructure result = instance.getGUIStructure(); assertEquals(expResult, result); } COM: <s> test of get guistructure method of class step type </s>
funcom_train/45255820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDetachedPart(LayoutPart part) { // Calculate detached window size. Rectangle bounds = parentWidget.getShell().getBounds(); bounds.x = bounds.x + (bounds.width - 300) / 2; bounds.y = bounds.y + (bounds.height - 300) / 2; addDetachedPart(part, bounds); } COM: <s> create a detached window containing a part </s>
funcom_train/20365772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkAdded() { if ( Person.this.hasTrait(DEAD_BROKE_TRAIT_NAME) && !deadBroke ) { setStartingMoney( getStartingMoney()*0.5d); setCurrentMoney( getCurrentMoney()*0.5d ); deadBroke=true; } if ( Person.this.hasTrait(MONEYED_INDIVIDUAL_TRAIT_NAME) && !moneyedIndividual ) { //Moneyed Individual added setStartingMoney( getStartingMoney()*1.5d); setCurrentMoney( getCurrentMoney()*1.5d ); moneyedIndividual=true; } } COM: <s> check to see if trait has been added </s>
funcom_train/6269780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String encodeStringToXml(String s) { if (s == null) { return ""; } String encodedStr = ""; int sLen = s.length(); for (int i = 0; i < sLen; i++) { switch (s.charAt(i)) { case '&': encodedStr += "&amp;"; break; case '\'': encodedStr += "&apos;"; break; case '\"': encodedStr += "&quot;"; break; case '>': encodedStr += "&gt;"; break; case '<': encodedStr += "&lt;"; break; default: encodedStr += s.charAt(i); } } return encodedStr; } COM: <s> encode a string to be suitable for an xml file </s>
funcom_train/18860022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDomainContainerPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DiagramCanvas_domainContainer_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DiagramCanvas_domainContainer_feature", "_UI_DiagramCanvas_type"), VisualizerPackage.eINSTANCE.getDiagramCanvas_DomainContainer(), true, null, null, null)); } COM: <s> this adds a property descriptor for the domain container feature </s>
funcom_train/18515779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hookContextMenu() { MenuManager menuMgr = new MenuManager("#PopupMenu"); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(new ContextMenuListener()); Menu menu = menuMgr.createContextMenu(viewer.getControl()); viewer.getControl().setMenu(menu); getSite().registerContextMenu(menuMgr, viewer); } COM: <s> create the context menu </s>
funcom_train/43293788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSeparator(Composite parent) { // new separator label Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL); GridData gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; separator.setLayoutData(gridData); } COM: <s> creates and adds a separator in the core property page </s>
funcom_train/48561174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand2() { if (itemCommand2 == null) {//GEN-END:|402-getter|0|402-preInit // write pre-init user code here itemCommand2 = new Command("\u041B\u0438\u0447\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435", Command.ITEM, 0);//GEN-LINE:|402-getter|1|402-postInit // write post-init user code here }//GEN-BEGIN:|402-getter|2| return itemCommand2; } COM: <s> returns an initiliazed instance of item command2 component </s>
funcom_train/41163971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoUserExer2Group entity) { EntityManagerHelper.log("deleting CoUserExer2Group instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoUserExer2Group.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co user exer2 group entity </s>
funcom_train/20845639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSecureEventConverter(String duuid) { if (duuid2subsriptionID_secure.containsKey(duuid)) { if (GlobalConstants.GLOBAL_LOGGING) LogServiceTracker.log.log(LogService.LOG_DEBUG, "Removing secure EventConverter: " + duuid); // remoteEventSerive - removeSubscription String subscriptionID = (String) duuid2subsriptionID_secure.remove(duuid); eventingUtil.removeSubscription(subscriptionID); } } COM: <s> removes subscriptions for remote secure event converter services that went </s>
funcom_train/43563896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T optimize () { T r; it = 0; while (!TermCond()) { System.out.println("SimAnn: iteration "+it); for (int i=0; i<L0; i++) { r = neighbor(); if (f(r) >= f(sol)) { sol = r; } else { double n = Math.random(); if (Math.exp((-f(sol)+f(r))/T0) > n) sol = r; } } it++; T0 = nextT(); L0 = nextL(); } return sol; } COM: <s> method for running the optimization procedure </s>
funcom_train/51198631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showProcess(ExportProcess process) { this.process = process; this.process.setParentFrame(this); this.steps = process.getSteps(); this.currentStepIndex = 0; initializeStepUI(); if(this.steps.length == 1) { this.nextFinishButton.setText("Finish"); } try { this.steps[this.currentStepIndex].enterStep(); } catch(Exception e) { e.printStackTrace(); } this.getContentPane().validate(); this.setVisible(true); } COM: <s> execute the given execute process </s>
funcom_train/50696731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAtomSetProperty(String key, String value, int atomSetIndex) { // lazy instantiation of the Properties object if (atomSetProperties[atomSetIndex] == null) atomSetProperties[atomSetIndex] = new Properties(); atomSetProperties[atomSetIndex].put(key, value); } COM: <s> sets the a property for the an atom set </s>
funcom_train/2724474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isAllInformationEntered() { return (genmappDatabaseFile != null) && // A file must be chosen. (onlyCAspectCheckBox.isSelected() || onlyFAspectCheckBox.isSelected() || onlyPAspectCheckBox.isSelected()); // At least one aspect must be included. } COM: <s> verifies if all information is entered </s>
funcom_train/50345896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean findDestinationAndTrack(Car car, RouteLocation rl, RouteLocation rld) throws BuildFailedException { int index; for (index = 0; index<routeList.size(); index++){ if (rld == train.getRoute().getLocationById(routeList.get(index))) break; } return findDestinationAndTrack(car, rl, index-1, index+1); } COM: <s> find a destination for the car at a specified location </s>
funcom_train/33058510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected HashMap getConnsInfo(String conns) throws Exception { //System.out.println("in getConnsInfo " + conns); StringTokenizer tok = new StringTokenizer(conns, ",", false); HashMap tmp = new HashMap(); String key; while (tok.hasMoreTokens()) { key = tok.nextToken(); //System.out.println("key : " + key); tmp.put(key, ((DbPool) dbs.get(key)).getInfo()); } return tmp; } COM: <s> retrieves information on a set of connections </s>
funcom_train/43230767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doLogin(final User user, final Role role) { this.currentUser = user; Cookies.setCookie(SessionController.CURRENT_USER, user.getName()); Cookies.setCookie(SessionController.CURRENT_ROLE, role.getId()); try { this.setActiveRole(role); } catch (final ConsistencyException e) { Cookies.removeCookie(SessionController.CURRENT_USER); Cookies.removeCookie(SessionController.CURRENT_ROLE); this.login(); } this.eventBus.publish(new LoginEvent(user, role)); } COM: <s> sets the current user and fires the login event </s>
funcom_train/22438010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void getDependencies( DBObject dbobject ) { Cursor originalcursor = this.getCursor(); DBGraph graph; this.setMessage( "Getting dependencies. Please wait..." ); this.setCursor( new Cursor( Cursor.WAIT_CURSOR ) ); graph = this.dbconnection.getDependencyResolver().getDependencies( dbobject ); this.setCursor( originalcursor ); this.setMessage( "Finished." ); this.setDBGraph( graph ); } COM: <s> gets the dependencies of a database object </s>
funcom_train/41874519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean addIncomingEdge(GraphEdge edge) { if (null == edge) { throw new NullPointerException(); } boolean b = incomingEdges.add(edge); if (b) { GraphNode n = edge.getSourceNode(); if (null != n) { sourceNodes.add(n); n.destinationNodes.add(this); } } return b; } COM: <s> add an incoming edge into this node </s>
funcom_train/1416952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object deserialize(byte[] in) { Object rv=null; try { if(in != null) { ByteArrayInputStream bis=new ByteArrayInputStream(in); ObjectInputStream is=new ObjectInputStream(bis); rv=is.readObject(); is.close(); bis.close(); } } catch(IOException e) { throw new RuntimeException("have IO Exception" ,e); } catch (ClassNotFoundException e) { throw new RuntimeException("have Exception" ,e); } return rv; } COM: <s> get the object represented by the given serialized bytes </s>
funcom_train/7801314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int asInt(final Object iValue) { if (iValue instanceof Number) return ((Number) iValue).intValue(); else if (iValue instanceof String) return Integer.valueOf((String) iValue); else if (iValue instanceof Boolean) return ((Boolean) iValue) ? 1 : 0; throw new IllegalArgumentException("Can't convert value " + iValue + " to int for the type: " + name); } COM: <s> convert the input object to an integer </s>
funcom_train/45114467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean regWrite(String keyname, String valuename, String type, String value) throws Exception { Map<?, ?> result = null; if (valuename == null || type == null || value == null) { result = runRemoteScript(commandCreate("RegWrite", true, keyname)); } else { result = runRemoteScript(commandCreate("RegWrite", true, keyname, valuename, type, value)); } return "1".equals(result.get(STDOUT)); } COM: <s> creates a key or value in the registry </s>
funcom_train/37011368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Integer getRotateDegrees(MediaItem item, MediaRequest request) { if ( request.getParameters().containsKey(MediaEffect.MEDIA_REQUEST_PARAM_ROTATE_DEGREES) ) { Object val = request.getParameters().get(MediaEffect.MEDIA_REQUEST_PARAM_ROTATE_DEGREES); if ( val instanceof Integer ) { return (Integer)val; } try { return Integer.valueOf(val.toString()); } catch ( Exception e ) { log.warn("Unable to parse integer from degree [" +val +"]"); } } return null; } COM: <s> get the degrees necessary for rotation of a media item that has a </s>
funcom_train/44687430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Feature toFeature(Geometry measureGeometry, FeatureSchema schema) { Feature feature = new BasicFeature(schema); feature.setGeometry(measureGeometry); feature.setAttribute(FEATURE_ATTRIBUTE_LENGTH, measureGeometry.getLength()); feature.setAttribute(FEATURE_ATTRIBUTE_AREA, measureGeometry instanceof Polygon ? measureGeometry.getArea() : 0); feature.setAttribute(FEATURE_ATTRIBUTE_POINTS, measureGeometry.getNumPoints()); return feature; } COM: <s> builds a new feature from a geometry with the given feature schema </s>
funcom_train/9499361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoConic Circle(String label, GeoPoint A, GeoSegment segment) { AlgoCirclePointRadius algo = new AlgoCirclePointRadius(cons, label, A, segment, true); GeoConic circle = algo.getCircle(); circle.setToSpecific(); circle.update(); notifyUpdate(circle); return circle; } COM: <s> circle with midpoint m and radius segment michael borcherds 2008 03 15 </s>
funcom_train/21041855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resumeAgent(ACLMessageInterface aclMessage) { CFAgentAction resumeAgent = (CFAgentAction) aclContent; agName = ((CFPrimitive) (resumeAgent .getContentFacilitator(ManagementOntology.RESUME_AGENT_AGENT))) .getString(); agLifeCycleManager.resumeAgent(agName); agCounter.removeAgentSuspended(); agCounter.addAgentActive(); messageParser(aclContent); } COM: <s> this method accepts an aclmessage impl and resumes the agent based on </s>
funcom_train/25072212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addField(Field newField) { int idx = Collections.binarySearch(fields, newField, FIELD_ID_COMPARATOR); if (idx >= 0) { throw new IllegalArgumentException("A field with id=" + newField.getId() + " alredy exists in the schema."); } fields.insertElementAt(newField, -idx - 1); } COM: <s> adds code new field code to the list of fields in the schema </s>
funcom_train/13991455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addChildProperties(HighlightRegionColumnInfo[] highlights) { if (highlights != null) { for (int i=0; i<highlights.length; i++) { if (highlights[i] != null) { childPOPropertiesPOs.add(new PresentationObjectProperties(highlights[i], highlights[i].getName())); } } } } COM: <s> inspects the contents of the array for known presentation object types and </s>
funcom_train/3102381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Button addRadioButton(final Composite parent, final String label, final String key, final int indentation) { Assertion.valid(parent); Assertion.nonEmpty(label); Assertion.nonEmpty(key); Assertion.nonNegative(indentation); final Button button= new Button(parent, SWT.RADIO); button.setText(label); final GridData data= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); data.horizontalIndent= indentation; data.horizontalSpan= 2; button.setLayoutData(data); button.addSelectionListener(fRadioButtonListener); fRadioButtons.put(button, key); return button; } COM: <s> adds a radio button to the preference page </s>
funcom_train/14093303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetWindowByPartialTitle() { String frameTitle = getName() + " 2"; setWindow(createJFrame(frameTitle)); packAndShow(getFrame()); String subTitle = frameTitle.substring(frameTitle.length() - 7); assertEquals("Must find window with title containing '" + subTitle + "'", getFrame(), new FrameFinder(subTitle).find()); } COM: <s> checks that when finding a window using the complete title </s>
funcom_train/17162812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Screen genEntryScr(){ if(entryScr == null) { entryScr = new Form("New Word"); entryScr.addCommand(startC); entryScr.addCommand(exitC); entryScr.setCommandListener(this); getData = new TextField("Gib ein Wort ein", null, 30, TextField.PLAIN); } getData.delete(0, getData.size()); display.setCurrent(entryScr); return entryScr; } COM: <s> display textfield for the user entry </s>
funcom_train/10836408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExtension(String mimeType) { ScriptEngine se = scriptEngineManager.getEngineByMimeType(mimeType); if (se != null) { List<?> extensions = se.getFactory().getExtensions(); if (extensions != null && extensions.size() > 0) { return String.valueOf(extensions.get(0)); } } return null; } COM: <s> returns the first extension entry of the supported extensions of a </s>
funcom_train/18021050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearAnnotations() { SwingUtilities.invokeLater( new Runnable() { public void run() { Style def = StyleContext.getDefaultStyleContext().getStyle(StyleContext.DEFAULT_STYLE); StyledDocument doc = editorPanel.getStyledDocument(); doc.setCharacterAttributes(0, doc.getLength(), def, true); } } ); annotations= new TreeMap<Integer, Annotation>(); } COM: <s> remove all annotations </s>
funcom_train/47546621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getBounds() { checkLayout(); computeRuns(); int[] w = new int[1], h = new int[1]; OS.pango_layout_get_size(layout, w, h); int wrapWidth = OS.pango_layout_get_width(layout); int width = OS.PANGO_PIXELS(wrapWidth != -1 ? wrapWidth : w[0]); int height = OS.PANGO_PIXELS(h[0]); return new Rectangle(0, 0, width, height); } COM: <s> returns the bounds of the receiver </s>
funcom_train/21941267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field59 getField59() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("59"); if (t == null) { log.fine("field 59 not found"); return null; } else { return new Field59(t.getValue()); } } } COM: <s> iterates through block4 fields and return the first one whose name matches 59 </s>
funcom_train/7671246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseFragment(Reader in) throws IOException, SAXException { char[] buffer = new char[BUFFER_SIZE / 2]; int length; while ((length = in.read(buffer)) != -1) { try { append(this.pointer, buffer, 0, length); } catch (ExpatException e) { throw new ParseException(e.getMessage(), locator); } } } COM: <s> parses xml from the given reader </s>
funcom_train/7295698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isBoundary(int offset) { // Again, this is the default implementation, which is provided solely because // we couldn't add a new abstract method to an existing class. The real // implementations will usually need to do a little more work. if (offset == 0) { return true; } else return following(offset - 1) == offset; } COM: <s> return true if the specfied position is a boundary position </s>
funcom_train/38157300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireDownloadUpdated(Command command) { TransferEvent evt = createTransferEvent(command); TransferListener[] listeners = (TransferListener[]) listenerList.getListeners(TransferListener.class); if(listeners.length == 0) { downloadUpdatedQueue.add(evt); } else { for(int i = 0; i < listeners.length; i++) { listeners[i].downloadUpdated(evt); } } } COM: <s> notify listeners that a download has been updated </s>
funcom_train/41747427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAccountName(Account account) { if (account == null) return ""; StringBuffer sb = new StringBuffer(); String[] names = account.getAllAccountNames(); for (int i = 0; i < names.length; i++) { if (subtotalsForParentCategories) { if (i > 1) sb.append(":"); if (i > 0 || names.length == 1) sb.append(names[i]); } else { if (i > 0) sb.append(":"); sb.append(names[i]); } } return sb.toString(); } COM: <s> name of the account category </s>
funcom_train/48504900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateKeyWithParentAndId() { Key parent = KeyFactory.createKey(kind, name); Key key = KeyFactory.createKey(parent, kind, id); assertNull(key.getName()); assertEquals(kind, key.getKind()); assertEquals(id, key.getId()); assertEquals(parent, key.getParent()); } COM: <s> test create key with parent and id </s>
funcom_train/40434320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { c1 = new SimpleComposite(); RootPanel.get("main").add(c1); c2 = new SimpleComposite2(); RootPanel.get("main").add(c2); c3 = new RPCComposite(); RootPanel.get("main").add(c3); } COM: <s> this is the entry point method </s>
funcom_train/46455347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCustomMarker(Shape marker) { customMarker = marker; if(customMarker==null) { markerShape = SQUARE; customMarker = new Rectangle2D.Double(-markerSize/2, -markerSize/2, markerSize, markerSize); } else { markerShape = CUSTOM; } } COM: <s> sets a custom marker shape </s>
funcom_train/41163313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(AgStatusCourse entity) { EntityManagerHelper.log("deleting AgStatusCourse instance", Level.INFO, null); try { entity = getEntityManager().getReference(AgStatusCourse.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent ag status course entity </s>
funcom_train/23493833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean performFinish() { final String containerName = page1.getContainerName(); final String fileName = page1.getFileName(); String s = page1.getContainerName()+page1.getFileName(); transform(actionModel, s, page1.getContainerName(), page2.getOntologyURI(), page2.getTableItems() ); return true; } COM: <s> this method is called when finish button is pressed in </s>
funcom_train/18965153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); sb.append("Identifier\t"+ (hasTimes() ? "Times\t" : "") + "Sample\n"); for (int i = 0; i < taxa.getIdCount(); i++) { sb.append(taxa.getIdentifier(i) + "\t" + (hasTimes() ? getTime(i) + "\t" : "") + getTimeOrdinal(i)+"\n"); } return new String(sb); } COM: <s> returns a string representation of this time order character data </s>
funcom_train/29519013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void UpdateWindow() { FillApComboBox1(); FillApComboBox2(); FillExternalTrafficComboBox(); if (ApComboBox1.getItemCount() > 0) { AttachButton.setEnabled(true); } else { AttachButton.setEnabled(false); } if (ExternalTrafficComboBox.getItemCount() > 0) { SelectExternalTrafficFlow(ExternalTrafficComboBox.getSelectedIndex()); } } COM: <s> make visual changes to the window </s>
funcom_train/47336659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSave() { JsffullcrudItem item1 = new JsffullcrudItem("New item1", ITEM_OWNER, ITEM_SITE, ITEM_HIDDEN, new Date()); dao.save(item1); Long itemId = item1.getId(); Assert.assertNotNull(itemId); Assert.assertEquals(7, dao.countAll(JsffullcrudItem.class)); } COM: <s> todo remove this sample unit test </s>
funcom_train/3415519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsKey(Object key) { Object k = maskNull(key); Object[] tab = table; int len = tab.length; int i = hash(k, len); while (true) { Object item = tab[i]; if (item == k) return true; if (item == null) return false; i = nextKeyIndex(i, len); } } COM: <s> tests whether the specified object reference is a key in this identity </s>
funcom_train/34135605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Transform3D updatePosition() { transform.get(pos); double deltaTime = getDeltaTime(); deltaTime *= 0.001; mov.x = 0.1; mov.y = -fwdSpeed; Point3d dp = new Point3d(); dp.scale(deltaTime, mov); pos.add(dp); // System.out.println("Pos.x: " + pos.x + " - Pos.y: " + pos.y); transform.set(new Quat4d(), pos, 1); return transform; } COM: <s> computes a new transform for the next frame based on the current </s>
funcom_train/34671498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAgeCalculations() throws Exception { Calendar c=Calendar.getInstance(); c.set(1964, 11, 8); DateOfBirth dob=new DateOfBirth(c.getTime()); c.set(1980, 10, 9); assertEquals(16, dob.ageAtDate(c.getTime())); } COM: <s> test dob calculations </s>
funcom_train/3990116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addData_nast_badaniaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BadanieOkresowe_data_nast_badania_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_data_nast_badania_feature", "_UI_BadanieOkresowe_type"), PrzychodniaPackage.Literals.BADANIE_OKRESOWE__DATA_NAST_BADANIA, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the data nast badania feature </s>
funcom_train/18390527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { boolean running = true; while (running) { if (_bot.getMessageDelay() > 0) { // Small delay to prevent spamming of the channel Thread.sleep(_bot.getMessageDelay()); } String line = _outQueue.next(); if (line != null) { _bot.sendRawLine(line); } else { logger.debug("Got null line"); running = false; } } } catch (InterruptedException e) { // Just let the method return naturally... } } COM: <s> this method starts the thread consuming from the outgoing message </s>
funcom_train/785463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBounds(int row, double x, double y, double w, double h) { getBounds(row).setRect(x, y, w, h); fireTableEvent(row, row, getColumnNumber(VisualItem.BOUNDS), EventConstants.UPDATE); } COM: <s> set the bounding box for an item </s>
funcom_train/12115134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCharAt(int x, int y, char ch, boolean modified, boolean clear){ Cell c = cells.get(x).get(y); c.setChar(ch, modified); if(c.isBlack() ^ (c.getOriginalChar()==Cell.BLACK_BOX_CHAR)){ updateSlots(c, clear); } } COM: <s> sets char to cell and updates slots if necessary </s>
funcom_train/42451979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Action public void showPropertiesBox() { if (propertiesBox == null) { final JFrame mainFrame = Blame.getApplication().getMainFrame(); propertiesBox = new BlamePropertiesBox(mainFrame); propertiesBox.setLocationRelativeTo(mainFrame); } Blame.getApplication().show(propertiesBox); } COM: <s> shows the properties dialog </s>