__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/47165894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unlock() { try { super.skipToEOT(); super.disconnect(); // WORKAROUND DATO CHE SEMBRA NON RICONOSCERE QUANDO LA CONNESSIONE E' CHIUSA' } catch (IOException e) { e.printStackTrace(Utils.getInstance(false).getConfManager().getLog()); } lock = false; } COM: <s> unlock the current instance of amga connector </s>
funcom_train/6423412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readyData(LmpFrame frame) { if (frame.isControl() && (frame.getOpcode() == LmpFrame.LMPCONNECT)) { if (frame.isABit()) { station.disconnectRequest(); client.connectionCallbackDisconnect(); state = NOT_READY; return; } state = INCOMING; // LM_connect.indication remoteLsap = frame.getSlsap(); client.connectionCallbackConnect(frame.getControlData()); return; } if (!frame.isControl()) { station.disconnectRequest(); client.connectionCallbackDisconnect(); state = NOT_READY; return; } } COM: <s> handle data while waiting for a connection </s>
funcom_train/36230381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImagePoint transformInverse(ImagePoint pm) { ImagePoint pml = new ImagePoint(pm); // Move to camera sor pml.setX(pml.getX() - get_ppx()); pml.setY(pml.getY() - get_ppy()); // Apply distortion if present if (distortion != null) { pml.affect2D(distortion.applyDistortion(pml)); } // Back to image sor pml.setX(pml.getX() + get_ppx()); pml.setY(pml.getY() + get_ppy()); return pml; } COM: <s> transform an ideal input image point in mm in a distorted image point </s>
funcom_train/12103760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void blendState(float weight, Vector3D translation, Quaternion rotation) { if(accumulatedWeightAbsolute == 0.0f) { // it is the first state, so we can just copy it into the bone state translationAbsolute = translation; rotationAbsolute = rotation; accumulatedWeightAbsolute = weight; } else { // it is not the first state, so blend all attributes float factor; factor = weight / (accumulatedWeightAbsolute + weight); translationAbsolute.blend(factor, translation); rotationAbsolute.blend(factor, rotation); accumulatedWeightAbsolute += weight; } } COM: <s> interpolates the current state to another state </s>
funcom_train/26433112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getPropertyInt(String prop) { String value = System.getProperty(prop); int res; if (value == null) return -1; try { res = Integer.parseInt(value); return res; } catch (NumberFormatException ex) { Util.debug("Parsing " + value + " to int failed: " + ex.toString()); } return -1; } COM: <s> get a system property value as a integer </s>
funcom_train/29711292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void relocate(IFigure target) { Rectangle targetBounds = ColumnHelper.getColumnBounds(editPart, target); Dimension targetSize = target.getPreferredSize(); targetBounds.x += (int) (targetBounds.width * relativeX - ((targetSize.width + 1) / 2)); targetBounds.y += (int) (targetBounds.height * relativeY - ((targetSize.height + 1) / 2)); targetBounds.setSize(targetSize); target.setBounds(targetBounds); } COM: <s> relocates the target using the relative offset locations </s>
funcom_train/41862551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanelBotoes() { if (panelBotoes == null) { GridLayout gridLayout1 = new GridLayout(); gridLayout1.setRows(3); gridLayout1.setColumns(1); panelBotoes = new JPanel(); panelBotoes.setLayout(gridLayout1); panelBotoes.add(getButtonEnviarMensagem(), null); panelBotoes.add(getButtonRolarDados(), null); panelBotoes.add(getBtTesteComponent(), null); } return panelBotoes; } COM: <s> this method initializes panel botoes </s>
funcom_train/14127199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseRow(HSSFRow row, StringBuffer cleanBuffer) { short firstCell = row.getFirstCellNum(); short lastCell = row.getLastCellNum(); for (short cellIdx = firstCell; cellIdx <= lastCell; cellIdx++) { HSSFCell cell = row.getCell(cellIdx); if (cell != null) { parseCell(cell, cleanBuffer); } } } COM: <s> it will parse row and return the text </s>
funcom_train/41041785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClippingBounds(Bounds sceneBounds) { if (sceneBounds == null || sceneBounds.isEmpty()) { // sceneSphere.isEmpty() sceneCenter.set(0, 0, 0); sceneRadius = -1; sceneSphere = new BoundingSphere(sceneCenter, sceneRadius); return; } if (sceneBounds instanceof BoundingSphere) sceneSphere = (BoundingSphere) sceneBounds.clone(); else sceneSphere = new BoundingSphere(sceneBounds); sceneSphere.getCenter(sceneCenter); sceneRadius = sceneSphere.getRadius() * radiusFactor; setClippingDistances(); } COM: <s> sets the bounding object for clipping distances calculation </s>
funcom_train/36547451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean initRequestParameterInteger( String requestToken ) { boolean tokenOk = true; if ( currentParameter instanceof Parameter ) { if ( idLevel == 0 ) { currentParameter.mainId = Integer.parseInt( requestToken ); idLevel++; } else if ( idLevel == 1 ) { currentParameter.subId = Integer.parseInt( requestToken ); idLevel++; } else { tokenOk = false; } } return tokenOk; } COM: <s> inits the request parameter integer </s>
funcom_train/3081660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String addSelectEventId(RenderingContext rc, CssStyle cssStyle, Tree tree, Object treeNode, TreePath treeNodePath, String cellType) { String eventElementId = createEventId(tree, cellType, "select", treeNode, treeNodePath); if (tree.isRenderEnabled()) { cssStyle.setAttribute("cursor", "pointer"); } return eventElementId; } COM: <s> adds the event handler id for selecting nodes </s>
funcom_train/1504473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reverse() { int temp; for (int i = 0, j = size * 2 - 2; i < size; i += 2 , j -= 2) { temp = points[i]; points[i] = points[j]; points[j] = temp; temp = points[i + 1]; points[i + 1] = points[j + 1]; points[j + 1] = temp; } } COM: <s> reverses the order of the points in the list </s>
funcom_train/50346015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeCarsFromStaging(){ if (departStageTrack == null) return; for (carIndex=0; carIndex<carList.size(); carIndex++){ Car car = carManager.getById(carList.get(carIndex)); // remove cars from departure staging track that haven't been assigned to this train if (car.getTrack().equals(departStageTrack) && car.getTrain() == null){ car.setLocation(car.getLocation(), null); } } } COM: <s> build has failed due to cars in staging not having destinations this </s>
funcom_train/4645903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _addScrollBarsListeners() { // Vertical bar ScrollBar verticalBar = getVerticalBar(); if (verticalBar != null) { verticalBar.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { if (vertical) scrollVertical(); } }); } // Horizontal bar ScrollBar horizontalBar = getHorizontalBar(); if (horizontalBar != null) { horizontalBar.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { if (!vertical) scrollHorizontal(); } }); } } COM: <s> add internal scrollbars listeners to this gallery </s>
funcom_train/34341958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getComandoAtras() { if (comandoAtras == null) {//GEN-END:|36-getter|0|36-preInit // write pre-init user code here comandoAtras = new Command("Atras", Command.BACK, 0);//GEN-LINE:|36-getter|1|36-postInit // write post-init user code here }//GEN-BEGIN:|36-getter|2| return comandoAtras; } COM: <s> returns an initiliazed instance of comando atras component </s>
funcom_train/28142452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void nextTimeUnit(long serverTime, int timeUnit) { // Update the diagrams at the end of each day utilization[utilPos] = currentUtility; utilPos = (utilPos + 1) % utilization.length; if (utilDiagram != null) { utilityBorder.setTitle("Factory Utilization (" + currentUtility + "%)"); utilDiagram.setData(0, utilization, utilPos, utilization.length); } } COM: <s> called when a new simulation day starts </s>
funcom_train/49790592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInitialState() throws Exception { beginAtSitemapThenPage("Home"); IElement map = assertHasMap("target map"); // but no map points are generated yet assertHasNoMapPoint("address 1"); assertHasNoMapPoint(map, "address 1"); assertHasNoMapPoint("address 2"); assertHasNoMapPoint(map, "address 2"); assertHasNoMapPoint("address 3"); assertHasNoMapPoint(map, "address 3"); } COM: <s> initially we have a map but no contained map points since </s>
funcom_train/24375587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSubjectIdentifier(SubjectIdentifier subjectIdentifier) { // First make sure that the subject identifier does not already exist in the list. int i = 0; for (SubjectIdentifier id : this.subjectIdentifiers) { if (subjectIdentifier.equals(id)) { this.subjectIdentifiers.remove(i); break; } ++i; } } COM: <s> remove subject identifier from the list of identifiers for the subject </s>
funcom_train/9043099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double enumClass(double alpha, int numdata) { // function numclass = enumclass(alpha,numdata); // // numclass = alpha*sum(1./(alpha-1+(1:numdata))); double numclass = 0; for (int ii = 1; ii <= numdata; ii++) { numclass += 1 / ((alpha - 1) + ii); } return numclass * alpha; } COM: <s> enumclass alpha numdata the expected number of tables in a crp with </s>
funcom_train/43189792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTimeBase(TimeBase tb) throws IncompatibleTimeBaseException { getClock().setTimeBase(tb); // Set the time base on each of the SinkModules. if (sinks == null) return; int size = sinks.size(); BasicSinkModule bsm; for (int i = 0; i < size; i++) { bsm = (BasicSinkModule)sinks.elementAt(i); bsm.setTimeBase(tb); } } COM: <s> override the parents method to not check for realized state </s>
funcom_train/37446114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component prepareEditor(final TableCellEditor editor, final int row, final int column) { if (column < frozenColumns) { return lockedTable.prepareEditor(editor, row, column); } else { return scrollTable.prepareEditor(editor, row, column - frozenColumns); } } COM: <s> prepares the editor by querying the data model for the value and </s>
funcom_train/20044489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _remove(){ requiredMethod("insertNewByIndex()") ; boolean result = true; log.println("removing DrawPage..."); int cntBefore = oObj.getCount(); oObj.remove(DrawPage); int cntAfter = oObj.getCount(); result = cntAfter + 1 == cntBefore ; tRes.tested("remove()", result); } // end remove() COM: <s> removes the draw page inserted before </s>
funcom_train/9097345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startup() { // This function will display the Profile Manager according to user // defined preferences (the "Load default profile on startup" option) // If this setting is set then the default profile will be loaded on // startup and the Profile Manager will not be displayed, otherwise it // will be displayed at program startup if (!loadDefaultOnStartup) this.setVisible(true); } COM: <s> startup method to perform startup tasks for the profile manager </s>
funcom_train/21444966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDouble(String key) throws JSONException { Object o = get(key); try { return o instanceof Number ? ((Number)o).doubleValue() : Double.valueOf((String)o).doubleValue(); } catch (Exception e) { //throw new JSONException("JSONObject[" + quote(key) + "] is not a number."); return 0.0; } } COM: <s> get the double value associated with a key </s>
funcom_train/20205837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyToItems() { if (getItems() == null) { throw new IllegalStateException("Items have not been set."); } List localItems = getItems(); for (int i = 0; i < localItems.size(); i++) { Object item = localItems.get(i); copyTo(item); } } COM: <s> copy the values of all </s>
funcom_train/41725273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Tag getByID(int id, Tag tag) { Tag ans = null; if (tag == null) { return null; } if (tag.getID() == id) { return tag; } if (tag.getChildren() == null) { return null; } for (int i = 0; i < tag.getChildren().size(); i++) { ans = getByID(id, tag.getChildren().getTag(i)); if (ans != null) return ans; } return null; } COM: <s> an auxiliary method that recursively finds a tag with the specified id </s>
funcom_train/34413572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void RemoveNodeConnector() { if(VALUESPLIT[1].equals("")) { cc.warn("Cound not remove node connector - Not all attributes were provided (node:connector): "+CONTROLVALUE); return; } int removeNumber = 0; try { removeNumber = GeneralDAO.removeNodeConnector(VALUESPLIT[0], VALUESPLIT[1]); } catch (Exception e1) { cc.warn("Could not remove node connector: "+e1); return; } cc.log("Removed \""+removeNumber+"\" connector(s)"); return; } COM: <s> removes a connector as specified in the values provided </s>
funcom_train/14091612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HibernateCallback getFindByIdCallback(final Collection<Serializable> ids) { return new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { Criteria criteria = session.createCriteria(supportsClass); ClassMetadata classMetadata = getSessionFactory() .getClassMetadata(supportsClass); String idPropertyName = classMetadata .getIdentifierPropertyName(); criteria.add(Expression.in(idPropertyName, ids)); return criteria.list(); } }; } COM: <s> provides a code hibernate callback code that will load a list of </s>
funcom_train/33162697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DominoJavaAgent getJavaAgentByNoteId( String noteId ) { for ( int x = 0 ; x < this.javaAgents.size(); x++ ) { DominoJavaAgent agent = (DominoJavaAgent) javaAgents.elementAt(x) ; String agentUnid = agent.getNoteID() ; if ( agentUnid.equals( noteId ) ) { return agent ; } } return null ; } COM: <s> get the specified java agent </s>
funcom_train/12912742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ifft(double[] x) { dir = -1; fftComm(x); int lhi = 2 * dim[0] * dim[1] * dim[2]; double facnor = 2.0 / lhi; for (int l = 0; l < lhi; l++) { x[l] *= facnor; } } COM: <s> perform the discrete complex inverse fourier transform on a complex </s>
funcom_train/7698544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void transferOnlyMappedFields(String fromTable, String toTable, FieldData[] mappedFields, FieldData[] oneToMany) { this.mode = MODE_TRANSFER_ONLY; this.tableLeft = fromTable; this.tableRight = toTable; this.mappedFields = mappedFields; this.oneToMany = oneToMany; start(); } COM: <s> set up tables from to and mapped fields to transfer </s>
funcom_train/7352881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputMap getInputMap(int condition) { switch (condition) { case JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT : return (InputMap)UIManager.get("Spinner.ancestorInputMap"); case JComponent.WHEN_FOCUSED : return (InputMap)UIManager.get("Spinner.focusInputMap"); default : return null; } } COM: <s> returns the input map to install for code condition code </s>
funcom_train/7660544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructor5() { try { Integer[] ints = new Integer[SIZE]; for (int i = 0; i < SIZE-1; ++i) ints[i] = new Integer(i); ArrayBlockingQueue q = new ArrayBlockingQueue(SIZE, false, Arrays.asList(ints)); shouldThrow(); } catch (NullPointerException success) {} } COM: <s> initializing from collection with some null elements throws npe </s>
funcom_train/3427642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parseSimplified(Stylesheet stylesheet, Parser parser) { _stylesheet = stylesheet; setParent(stylesheet); _name = null; _mode = null; _priority = Double.NaN; _pattern = parser.parsePattern(this, "/"); final Vector contents = _stylesheet.getContents(); final SyntaxTreeNode root = (SyntaxTreeNode)contents.elementAt(0); if (root instanceof LiteralElement) { addElement(root); root.setParent(this); contents.set(0, this); parser.setTemplate(this); root.parseContents(parser); parser.setTemplate(null); } } COM: <s> when the parser realises that it is dealign with a simplified stylesheet </s>
funcom_train/28477076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { super.init(); permissionsGranted = permissionsGranted(); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); contentPane.add(createButtonPanel(), BorderLayout.NORTH); contentPane.add(createLogPanel(), BorderLayout.CENTER); logMessage("Welcome to PortMapperApplet!"); if (!permissionsGranted) { logMessage("Please allow the PortMapperApplet to connect to your router."); } else { logMessage("Permissions granted."); } } COM: <s> this method is called when the applet is initialized for the first time </s>
funcom_train/20443423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getMostrarCommand2() { if (mostrarCommand2 == null) {//GEN-END:|70-getter|0|70-preInit // write pre-init user code here mostrarCommand2 = new Command("Mostrar", Command.OK, 0);//GEN-LINE:|70-getter|1|70-postInit // write post-init user code here }//GEN-BEGIN:|70-getter|2| return mostrarCommand2; } COM: <s> returns an initiliazed instance of mostrar command2 component </s>
funcom_train/19969117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PlayList grabdata_playlist() { String TAG = "grabdata - Playlist"; PlayList p = new PlayList(this); if (p.loadfromfile()){ Log.d(TAG, "Loaded file"); } else { Log.e(TAG, "Could not Load file"); } return p; } COM: <s> playlist from file </s>
funcom_train/18806968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDialType(int type) { switch (type) { case MeterPlot.DIALTYPE_CIRCLE: setDialShape(DialShape.CIRCLE); break; case MeterPlot.DIALTYPE_CHORD: setDialShape(DialShape.CHORD); break; case MeterPlot.DIALTYPE_PIE: setDialShape(DialShape.PIE); break; default: throw new IllegalArgumentException("MeterPlot.setDialType: unrecognised type."); } } COM: <s> sets the dial type background shape </s>
funcom_train/7282982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean stringMatches(String prefixStr, String available[]) { if (available == null || available.length == 0) return true; for (int i=0; i < available.length; i++) if (available[i] != null && available[i].startsWith(prefixStr)) return true; return false; } COM: <s> returns whether the string is a prefix for any of the strings </s>
funcom_train/15487975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump(String prefix) { System.out.println(toString(prefix)); if(children != null) { for (int i = 0; i < children.length; ++i) { SimpleNode n = (SimpleNode) children[i]; if (n != null) { n.dump(prefix + " "); } } } } COM: <s> dumps out its children </s>
funcom_train/50155081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed( ActionEvent e ) { int deleteAll = JOptionPane.showConfirmDialog( null, "Are you sure you want to DELETE this headline?", "Delete headline?", JOptionPane.YES_NO_OPTION ); if ( deleteAll == JOptionPane.YES_OPTION ) { headlinerApp.deleteHeadline( headline ); headlinerApp.appBrowser.loadFeed(); editor.shutDown(); } } COM: <s> delete this headline from this or all feeds </s>
funcom_train/32306077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FOOTER remove(int which_pred) { FOOTER f = new FOOTER(qf, this, arity()-1); for (int i=0, j=0; i<prev.length; i++) if (i!=which_pred) { Edge e = prevEdge(i); Quad.addEdge((Quad)e.from(), e.which_succ(), f, j++); } return f; } COM: <s> remove an attachment from this code footer code by replacing </s>
funcom_train/48072176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateViewClasses() { ViewClass.addClass(AspMain.klas); ViewClass.addClass(IspMain.klas); ViewClass.addClass(MerchantMain.klas); ViewClass.addClass(CustomerMain.klas); ViewClass.addClass(IspListingView.klas); ViewClass.addClass(MerchantListingView.klas); ViewClass.addClass(CustomerListingView.klas); ViewClass.addClass(InterfacesView.klas); ViewClass.addClass(UserEditView.klas); } COM: <s> sets all defined </s>
funcom_train/18481871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCombineColorFunction2(CombineColorFunction combine_color_function2) { if (combine_color_function2 != this.combine_color_function2) { CombineColorFunction old = this.combine_color_function2 ; this.combine_color_function2 = combine_color_function2 ; notifyChanged(COMBINECOLORFUNCTION2,old,combine_color_function2) ; } } COM: <s> sets the combinefunction for the color component for source 2 </s>
funcom_train/34748301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void incrementActiveCount(Object key) { _totActive++; Integer old = (Integer)(_activeCount.get(key)); if(null == old) { _activeCount.put(key,new Integer(1)); } else { _activeCount.put(key,new Integer(old.intValue() + 1)); } } COM: <s> increment the active count for the given key </s>
funcom_train/51193100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCentury(short century) throws OperationNotSupportedException { String err = ""; if (century < 0) { err = "century " + century + " must not be negative."; throw new IllegalArgumentException(err); } else if (_year == 0 && century == 0) { err = "century: 0000 is not an allowed year."; throw new IllegalArgumentException(err); } _century = century; } COM: <s> set the century field </s>
funcom_train/35108892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface Importer extends Event.Importer { /** * Provides the contour ID of the method activation that caught the * exception. * * @return the catcher's contour ID */ public ContourID provideCatcher(); /** * Provides the variable of the catch clause that was assigned the * exception. * * @return the variable of the catch clause, or <code>null</code> if unknown */ public VariableID provideVariable(); /** * Provides the exception that was caught. * * @return the caught exception */ public Value provideException(); } COM: <s> importer builder for catch events </s>
funcom_train/39541615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Action createPackSelectedAction() { String text = getUIString(PACKSELECTED_ACTION_COMMAND); BoundAction action = new BoundAction(text, PACKSELECTED_ACTION_COMMAND); action.registerCallback(this, "packSelected"); action.setEnabled(getSelectedColumnCount() > 0); return action; } COM: <s> creates an action for packing selected columns </s>
funcom_train/28170103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActiveView(View newValue) { View oldValue = activeView; if (activeView != null) { activeView.deactivate(); } activeView = newValue; if (activeView != null) { activeView.activate(); } firePropertyChange(ACTIVE_VIEW_PROPERTY, oldValue, newValue); } COM: <s> sets the active view </s>
funcom_train/22894508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void clear() { selector.wakeup(); synchronized (cnxns) { // got to clear all the connections that we have in the selector for (Iterator<NIOServerCnxn> it = cnxns.iterator(); it .hasNext();) { NIOServerCnxn cnxn = it.next(); it.remove(); try { cnxn.close(); } catch (Exception e) { // Do nothing. } } } } COM: <s> clear all the connections in the selector </s>
funcom_train/3319344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Hashtable getProperties() { Hashtable toReturn = new Hashtable(); toReturn.put("x", new Double(x)); toReturn.put("y", new Double(y)); toReturn.put("height", new Double(height)); toReturn.put("width", new Double(width)); toReturn.put("type", "Note"); return toReturn; } COM: <s> this method returns the properties of the note </s>
funcom_train/11773932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TernaryComparisonResult checkIdentity(Object proxy, Object obj) { if (proxy == obj) { return TernaryComparisonResult.True; } if (obj == null) { return TernaryComparisonResult.False; } if (proxy.getClass() != obj.getClass()) { return TernaryComparisonResult.False; } return TernaryComparisonResult.Continue; } COM: <s> checks for obvious comparison successes and failures like referential </s>
funcom_train/38495899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addElementType(ElementDecl eleType) throws DuplicateDefinitionException { if(ElementList.get(eleType.getElementName()) == null) ElementList.put(eleType.getElementName(), eleType); else { String mesg = "Duplicate definition encountered for element type " + eleType.getElementName(); // System.out.println( mesg ); throw new DuplicateDefinitionException(mesg); } } COM: <s> cr java doc add javadoc for doc type add element type </s>
funcom_train/10209301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(Envelope other) { if (isNull() || other.isNull()) { return false; } return other.getMinX() >= minx && other.getMaxX() <= maxx && other.getMinY() >= miny && other.getMaxY() <= maxy; } COM: <s> returns code true code if the code envelope other code </s>
funcom_train/41605793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void restoreMenu() { if (disabledMenuItems == null) { return; } for (Iterator menuIterator = disabledMenuItems.iterator(); menuIterator.hasNext();) { Object obj = menuIterator.next(); if (obj instanceof Component) { ((Component) obj).setEnabled(true); } else if (obj instanceof MenuItem) { ((MenuItem) obj).setEnabled(true); } } } COM: <s> p enable any menu item in the menubar that were active previously </s>
funcom_train/48190261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(PosConnectRecord entity) { LogUtil.log("saving PosConnectRecord 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 pos connect record entity </s>
funcom_train/8901451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double trueNegativeRate(int negativeClass) { double correct = 0, total = 0; for (int i = 0; i < numClasses; i++) { if (i != negativeClass) { for (int j = 0; j < numClasses; j++) { if (j != negativeClass) { correct += confusionMatrix[i][j]; } total += confusionMatrix[i][j]; } } } if (total == 0) { return 0; } return correct / total; } COM: <s> calculate the true negative rate with respect to a particular class </s>
funcom_train/7310706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSpecial() { if (name == DEFAULT || name == CONTAINER || name == COUNT || name == CORE || name == KEYS || name == HERE || name == OVER || name == OWNER || name == SITE || name == SOURCE || name == SUB || name == SUPER || name == THIS || name == TYPE || name == UNDER) { return true; } else { return false; } } COM: <s> returns code true code if this is a special name </s>
funcom_train/43608107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prettyPrint(CodeWriter w, PrettyPrinter tr) { for (Iterator i = sources.iterator(); i.hasNext(); ) { SourceFile s = (SourceFile) i.next(); print(s, w, tr); w.newline(0); } } COM: <s> write the source files to an output file </s>
funcom_train/28343571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getChromDispersionX() { double W = this.getKineticEnergy(); double Er = this.getSpeciesRestEnergy(); double gamma = RelativisticParameterConverter.computeGammaFromEnergies(W, Er); double d = this.getResponseMatrix().getElem(PhaseMatrix.IND_X, PhaseMatrix.IND_ZP); return d/(gamma*gamma); //return d;//be carefull. Previous J-PARC vesion def is this. } COM: <s> convenience function for returning the x plane chromatic dispersion as defined by </s>
funcom_train/23641407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFileName(String fileURI) { mLog.debug("Input URI: " + fileURI); int length = fileURI.length(); int breakPoint = fileURI.lastIndexOf("/"); // get the file name String fileName = fileURI.substring(breakPoint + 1, length); mLog.debug("File Name: " + fileName); return fileName; } COM: <s> retrieves the file name from the complete file path </s>
funcom_train/5446991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(Collection c) { Object[] o = c.toArray(); if (o.length == 0) return true; /* * Create a partial Node and append it to this list. */ Node n = createPartialList(o, null); Node node = head; for (Node temp = head.next(); temp != null; temp = temp.next()) { if (temp.next() == null) { node = temp; break; } } node.setNext(n); n.setPrevious(node); return true; } COM: <s> appends all of the elements in the specified collection to the end of </s>
funcom_train/1367420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate() throws DOMValidationException { if (expandOrLimitRecurrenceSet != null && (recurrenceSetStart == null || recurrenceSetEnd == null)) { throwValidationException("If you specify expand-recurrence-set or " + "limit-recurrence-set you must specify a start and end date"); } if (comp != null){ comp.validate(); } } COM: <s> element calendar data comp expand recurrence set </s>
funcom_train/2369629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTotalGuessed() { int result = 0; final RoundInfo current = this.getCurrentInfo(); final Iterator<Integer> iterator = current.getGuessed().iterator(); while (iterator.hasNext()) { result += iterator.next().intValue(); } return result; } COM: <s> returns the amount of tricks all previous players have guessed </s>
funcom_train/2616312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildGridTotalRow(List<List<ReportCell>> grid, List<List<ReportCell>> totals) { List<ReportCell> row = new ArrayList<ReportCell>(); if (totals.size() > 0) { row = buildTotalRow(totals, Roma.i18n().getString(ReportLabelConstants.TOTAL)); grid.add(grid.size(), row); } } COM: <s> method that builds the total row of the grid </s>
funcom_train/4953369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateModuleModuleItems(BufferedWriter buf, String moduleName) throws IOException { int idx = th.getRuns().size(); for (TestRun tr : th.getRuns()) { TestModule tm = tr.getTestModules().get(moduleName); if (null != tm) { generateModuleModuleItem(buf, tm, idx, tr); } idx--; } } COM: <s> this method creates the list of runs for a specific module </s>
funcom_train/31660839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSubView(DSView DSView_Arg, Shape Shape_Arg) { debug(1, "addSubView DSViewSplitter: " + DSView_Arg + ", " + Shape_Arg); ViewList.put(Shape_Arg, DSView_Arg); } // addSubView() COM: <s> add a sub view for the given region </s>
funcom_train/50505325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllRelationships(IClassInfo bean) { List resultList = new LinkedList(); Iterator iter = relationships.iterator(); while(iter.hasNext()) { Relationship item = (Relationship) iter.next(); if(item.isSourcePartner(bean)) { resultList.add(item); } } return resultList; } COM: <s> gets the all relationships list of the relationship manager object </s>
funcom_train/30160368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Skill getBestSkillNamed(String name, String specialization, boolean requirePoints, HashSet<String> excludes) { Skill best = null; int level = Integer.MIN_VALUE; for (Skill skill : getSkillNamed(name, specialization, requirePoints, excludes)) { int skillLevel = skill.getLevel(excludes); if (best == null || skillLevel > level) { best = skill; level = skillLevel; } } return best; } COM: <s> searches the characters current </s>
funcom_train/29805538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Update (String s) { byte chars[]; // chars = new byte[s.length()]; // s.getBytes(0, s.length(), chars, 0); try { chars = s.getBytes("UTF-8"); } catch(java.io.UnsupportedEncodingException ex) { // Should never happen ex.printStackTrace(); chars = new byte[1]; } Update(chars, chars.length); } COM: <s> update buffer with given string </s>
funcom_train/890644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { if (Controler.logger.isLoggable(Level.FINER)) { Controler.logger.entering("Controler", "clear()", "start"); } db.clear(); if (Controler.logger.isLoggable(Level.FINER)) { Controler.logger.exiting("Controler", "clear()", "end"); } } COM: <s> clear all data in the underlying container </s>
funcom_train/16678666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void accessNotAllowed(String methodName) { try { throw new IllegalAccessException(I18n.getString("SecurePluginView.exception.noPermission1", //$NON-NLS-1$ methodName, getName( ))); } catch (IllegalAccessException e) { logClass.error("Error: " + e.getMessage( ) + Constants.LINE_SEPARATOR, e); //$NON-NLS-1$ } } COM: <s> prints a log message that the access to the given method was </s>
funcom_train/21295914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean rotationEquals(int[][] first, int[][] second){ boolean same = first.length == second.length && first[0].length == second[0].length; int i = 0; while (i < first.length && same){ int j = 0; while (same && j < first[i].length){ same = first[i][j] == second[i][j]; j++; } i++; } return same; } COM: <s> checks if two bidimensional arrays are exactly the same </s>
funcom_train/45647629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writePNG(OutputStream out, int partNum) { try { BufferedImage img = createBufferedImage(partNum); ImageIO.write(img, "png", out); } catch (IOException e) { throw new IllegalStateException("Can't create PNG from BufferedImage.",e); } } COM: <s> outputs the png format of the picture into the given pipe </s>
funcom_train/21913504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addActionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ActionTaskForm_action_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ActionTaskForm_action_feature", "_UI_ActionTaskForm_type"), UIMPackage.Literals.ACTION_TASK_FORM__ACTION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the action feature </s>
funcom_train/29287769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canExecute() { if (newVisualEndNode != null && diagram != null && bounds != null) { if (selectedVisualNode == null) return true; selectedSemanticNode = (SimplePathNode)selectedVisualNode.getSemanticModel(); path = selectedSemanticNode.getPath(); return path.getEndNodes().contains(selectedSemanticNode); } return false; } COM: <s> can execute if all the necessary information has been provided and </s>
funcom_train/7282242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAvailableSchemaURIs() { String[] availableSchemas = limeXMLSchemaRepository.getAvailableSchemaURIs(); check( availableSchemas[0], "application"); check( availableSchemas[1], "audio"); check( availableSchemas[2], "document"); check( availableSchemas[3], "image"); check( availableSchemas[4], "video"); } COM: <s> tests that the get available schema uris function correctly returns </s>
funcom_train/2560201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean write(Type field, Object value, NodeMap<OutputNode> node, Map map) throws Exception { boolean result = strategy.write(field, value, node, map); interceptor.write(field.getType(), node); return result; } COM: <s> here we change the xml element after it has been annotated by </s>
funcom_train/20324531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeAttraction(WordAttraction x) { if(x.getOneEnd() == this){ if(attractions.remove(((WordNode)x.getTheOtherEnd()).getWord()) != null){ return true; }else{ return false; } }else{ if(attractions.remove(((WordNode)x.getOneEnd()).getWord()) != null){ return true; }else{ return false; } } } COM: <s> removes the attraction </s>
funcom_train/25861411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { id = null; etag = null; title = null; editUri = null; htmlUri = null; summary = null; content = null; contentType = null; author = null; email = null; category = null; categoryScheme = null; publicationDate = null; updateDate = null; deleted = false; starred = false; label = null; mime = null; selfUri = null; } COM: <s> clears all the values in this entry </s>
funcom_train/44771756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storePredecessors() throws RepositoryException { InternalValue[] values = new InternalValue[predecessors.size()]; for (int i = 0; i < values.length; i++) { values[i] = InternalValue.create(new UUID(((InternalVersion) predecessors.get(i)).getId())); } node.setPropertyValues(JCR_PREDECESSORS, PropertyType.STRING, values); } COM: <s> stores the internal predecessor cache to the persistance node </s>
funcom_train/548862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { thisView = this; console = DebugConsole.thisConsole; // display = parent.getDisplay(); numericTrend = new Trend(); swtAwtComponent = new Composite(parent, SWT.EMBEDDED); FillLayout swtAwtComponentL = new FillLayout(); swtAwtComponent.setLayout(swtAwtComponentL); trendFrame = SWT_AWT.new_Frame(swtAwtComponent); trendFrame.add(numericTrend); setDragTarget(); restoreFromMemento(myMemento); } COM: <s> the main function for creating a view </s>
funcom_train/8349152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public El unwrap(Element child, Rectangle bounds) { El.fly(child, "_internal").setLeftTop(bounds.x, bounds.y); Element p = dom.getParentElement().cast(); int pos = DOM.getChildIndex(p, dom); p.removeChild(dom); DOM.insertChild(p, child, pos); return this; } COM: <s> unwraps the child element </s>
funcom_train/27936946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component createComponent(UIHConfig uihConfig, Container parentContainer, Object component, int level) { if(Compatibility.isSwingPresent() && (parentContainer instanceof JComponent || (parentContainer == null && uihConfig.isSwingPreferred()))) { return new JLabel((String)component); } return new Label((String)component); } COM: <s> create a component from a string </s>
funcom_train/47545774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSelection () { checkWidget (); int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAdjustment); int digits = OS.gtk_spin_button_get_digits (handle); for (int i = 0; i < digits; i++) adjustment.value *= 10; return (int) adjustment.value; } COM: <s> returns the em selection em which is the receivers position </s>
funcom_train/34246474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultDirectory(String defaultDirectory) { this.defaultDirectory = defaultDirectory; WorkTask lWorkTask = this.getWorkTask(); if (lWorkTask != null) { try { lWorkTask.createRelativeDefaultAttachmentDirectory(defaultDirectory); } catch (IOException ioe) { ioe.printStackTrace(); } } } COM: <s> sets the default directory </s>
funcom_train/138838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read (File binaryFile) { FileInputStream workingFIS = null; DataInputStream workingDIS = null; try { //open IO this.binaryFile = binaryFile; workingFIS = new FileInputStream(binaryFile); workingDIS = new DataInputStream( new BufferedInputStream(workingFIS )); read(workingDIS); } catch (Exception e) { e.printStackTrace(); } finally { USeqUtilities.safeClose(workingFIS); USeqUtilities.safeClose(workingDIS); } } COM: <s> reads a binary file this data object </s>
funcom_train/43101464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInternal(Object handle) { if (handle instanceof MTransition) { Object state = getState(handle); Object end0 = getSource(handle); Object end1 = getTarget(handle); if (end0 != null) { return ((state == end0) && (state == end1)); } } return illegalArgumentBoolean(handle); } COM: <s> recognizer for internal transitions </s>
funcom_train/41466793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIpAddr(java.lang.String[] ipAddr, TransportType tpt_type) throws IllegalArgumentException { if (domainName == null || tpt_type == null) { IllegalArgumentException invalidArgumentException = new IllegalArgumentException("ipAddr or TransportType cannot be null for LocalAddr"); //invalidArgumentException.setInfoCode(ExceptionInfoCode.INV_LOCAL_ADDR); throw invalidArgumentException; } // TODO: Check for validity this.ipAddr = ipAddr; this.tpt_type = tpt_type; } COM: <s> sets the ipv4 ipv6 addresses for the remote address </s>
funcom_train/28127731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Color getButtonColor(Calendar theDate) { if (equalDates(theDate, chosenDate)) { return chosenDateButtonColor; } else if (theDate.get(Calendar.MONTH)==chosenDate.get(Calendar.MONTH)) { return chosenMonthButtonColor; } else return chosenOtherButtonColor; } COM: <s> returns the button color according to the specified date </s>
funcom_train/35251880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadArgumentAt(int i) { int index = getParamInitialIndex(); for (int k = 0; k < i; k++) { String argType = getArgumentTypeAt(k); index += getFrameSizeForType(argType); } load(getArgumentTypeAt(i), index); } COM: <s> loads on top of the stack the argument with that specific index </s>
funcom_train/44714120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addQuestion(String questionText, PersistentWidget widgetFactory, int position) { // Make sure the position is valid assertPositionInAddRange(position); // Create a new label to add PersistentLabel labelFactory = PersistentLabel.create(questionText); labelFactory.save(); addQuestion(labelFactory, widgetFactory, position); } COM: <s> add a question at the given position </s>
funcom_train/43903310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final Object object) { if (object instanceof FactoryComparator) { final FactoryComparator that = (FactoryComparator) object; return ((this.f1 == that.f1) && (this.f2 == that.f2)) || ((this.f1 == that.f2) && (this.f2 == that.f1)); } return false; } COM: <s> for internal use only </s>
funcom_train/32830102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPrimaryKeyColumn(Column primaryKeyColumn) { Column existingColumn = getColumn(primaryKeyColumn.getName()); if (existingColumn != null) { throw new UnitilsException("Unable to add primary column to data set row. Duplicate column name: " + primaryKeyColumn.getName()); } primaryKeyColumns.add(primaryKeyColumn); } COM: <s> adds a column to the row </s>
funcom_train/5673895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Expression parseCaseWhen(Expression r) throws HsqlException { readThis(Token.WHEN); Expression condition; if (r == null) { condition = readOr(); } else { condition = new Expression(Expression.EQUAL, r, readOr()); } readThis(Token.THEN); Expression current = readOr(); Expression alternatives = new Expression(Expression.ALTERNATIVE, current, new Expression(null, Types.NULL)); Expression casewhen = new Expression(Expression.CASEWHEN, condition, alternatives); return casewhen; } COM: <s> reads part of a case </s>
funcom_train/25566596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initBounds() { int width = 640;//420; int height = 320; setSize(width, height); int x = (int)getParent().getBounds().getCenterX() - width/2; int y = (int)getParent().getBounds().getCenterY() - height/2; setLocation(x, y); setResizable(false); } COM: <s> initialization of dialog bounds property </s>
funcom_train/4509201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableAccount(String username) throws UnsupportedOperationException { if (provider.isReadOnly()) { throw new UnsupportedOperationException(); } provider.unsetDisabledStatus(username); if (!provider.shouldNotBeCached()) { // Remove lockout data from cache. lockOutCache.remove(username); } // Fire event. LockOutEventDispatcher.accountUnlocked(username); } COM: <s> enables an account that may or may not have previously been disabled </s>
funcom_train/7599172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { if( !isStarted() ) { // BUGBUG - Should throw an exception? throw new UnsupportedOperationException("Cannot stop timer '"+name+"' which is not started!"); } // Decrement start counter. startCount--; if ( !isStarted() ) { lastTime = System.currentTimeMillis() - startTime; totalTime += lastTime; startTime = NOT_STARTED; count++; // return lastTime; } // return -1; } COM: <s> stop the timer increment the count and update the total time spent </s>
funcom_train/48526312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SubscribeMessage copy(List<Topic> newTopics, RawScribeContent content) { SubscribeMessage ret = new SubscribeMessage(getSource(), newTopics, getId(), content); ret.visited = visited; ret.toVisit = toVisit; ret.subscriber = subscriber; return ret; } COM: <s> copies everything except changes the topics to the new list </s>
funcom_train/17002531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public byte getByte(String name) throws JMSException { checkPriorToEntryRetrieval(name); Object object = mappedEntries.get(name); if (object instanceof Byte) { return ((Byte)object).byteValue(); } if (object instanceof String) { return Byte.valueOf((String)object).byteValue(); } handleInvalidTypeConversion(object, "byte"); return 0; } COM: <s> returns the code byte code value with the specified name </s>