__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/39240846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTable(DataTable dr) { VectorCreateVisitor vcv = new VectorCreateVisitor(); dr.letVisit(vcv); final Vector datav = vcv.getVector(); final Vector titlev = dr.getFieldNames(); javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { myModel.setDataVector(datav, titlev); } }); } COM: <s> update the table </s>
funcom_train/38631944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPaneProdutos() { if (jScrollPaneProdutos == null) { jScrollPaneProdutos = new JScrollPane(); jScrollPaneProdutos.setBorder(BorderFactory.createEmptyBorder(15, 10, 15, 10)); jScrollPaneProdutos.setViewportView(getJTableProdutos()); } return jScrollPaneProdutos; } COM: <s> this method initializes j scroll pane produtos </s>
funcom_train/39367599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void arrayCopyFloatToByte(int numSamples, float[] traceIn, byte[] traceOut) { float value; for(int i = 0; i < numSamples; i++) { value = traceIn[i]; value = Math.min(value, CLIPPING_MAX_INT08); value = Math.max(value, CLIPPING_MIN_INT08); traceOut[i] = (byte)value; } } COM: <s> copies trace data from float array to byte array clipping if necessary </s>
funcom_train/49320468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getParamValueAsInt(String label, int defaultValue) { Object o = getParamValue(label); if (o == null) return defaultValue; if (o instanceof Number) return ((Number) o).intValue(); if (o instanceof String) return Integer.parseInt((String) o); return defaultValue; } COM: <s> get the value of the named parameter as an integer </s>
funcom_train/15684317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _buildSWTColumn(Table internalTable, ColumnConfig colInfo) { if (internalTable != null && colInfo != null) { TableColumn tableColumn = new TableColumn(internalTable, colInfo .getAlign().getSWTAlignment()); tableColumn.setWidth(colInfo.getWidth()); tableColumn.setText(colInfo.getTitle()); updateColumnPropertiesAndCellEditors(colInfo); } } COM: <s> build the tables columns with swt </s>
funcom_train/644414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFirstLeftParenthesisIndex(String input) { int length = input.length(); String currentChar; if (!includesParentheses(input)) { return -1; } for (int i = 0; i < length; i++) { currentChar = String.valueOf(input.charAt(i)); if (currentChar.equals("(")) { return i; } else { } } return -1; } COM: <s> returns the index of the first left parenthesis </s>
funcom_train/51591622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createRandomString() { StringBuffer sb = new StringBuffer(); int length = generator.nextInt(100) + 1; for (int i = 0; i < length; i++) { sb.append((char) (generator.nextInt(26) + 65)); } return (sb.toString()); } COM: <s> create a random string </s>
funcom_train/24162487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reshape(GLAutoDrawable arg0, int x, int y, int width, int height) { GL gl = arg0.getGL(); GLU glu = new GLU(); gl.glMatrixMode(GL.GL_PROJECTION); gl.glLoadIdentity(); glu.gluPerspective(45f, (float)width / (float)height, 0.1f, 100f); gl.glMatrixMode(GL.GL_MODELVIEW); } COM: <s> changes gl projection matrix according to new canvas geometry </s>
funcom_train/21888515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refresh() { if (getComboProperties().getModel().getSelectedItem() != null) { try { RepresentedProperty rp = unnamed_DOT_owlFactory .getRepresentedProperty(PREFIX + getComboProperties().getModel() .getSelectedItem(), model); if (rp != null) { belongstoeditor.setReprProperty(rp); subeditor.setReprProperty(rp); supereditor.setReprProperty(rp); displayData(rp); } } catch (JastorException e2) { e2.printStackTrace(); } } } COM: <s> refreshes data in gui </s>
funcom_train/26645604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected WadoImage readImage(int frameNumber) { if( readRaw ) { log.info("Reading raw bytes."); FilterUtil.addToQuery(params, WadoImage.FRAME_NUMBER, Integer.toString(frameNumber), WadoImage.IMG_AS_BYTES, "true"); } else{ log.info("Reading images."); FilterUtil.addToQuery(params, WadoImage.FRAME_NUMBER, Integer.toString(frameNumber)); } return wadoImageFilter.filter(null, params); } COM: <s> reads the image from the filter item </s>
funcom_train/19082185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasPropertyNotFromCreator(int idType, MCard creator) { boolean found; int[] properties = getCardModel().getProperties(); found = properties != null && Arrays.binarySearch(properties, idType) >= 0; if (creator == this) { found = false; } if (propertyModifier != null) { return propertyModifier.hasPropertyNotFromCreator(idType, found, creator); } return found; } COM: <s> indicates if this card has this id type </s>
funcom_train/50296343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long readLong() throws IOException { return (read() << 56) | (read() << 48) | (read() << 40) | (read() << 32) | (read() << 24) | (read() << 16) | (read() << 8) | (read() << 0); } COM: <s> read in a code long code </s>
funcom_train/35092543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUserTimeOffset(String username, long newOffset) throws Exception{ String escapedUsername = escapeSQL(username); lw(); try { UserData ud = userCache.get(escapedUsername); if (ud == null) throw new Exception("Invalid username"); //Update the DB statement.executeUpdate("UPDATE users SET gmt_offset="+newOffset+" WHERE id="+ud.user_id); //Update the data in cache ud.gmt_offset = newOffset; } finally { uw(); } } COM: <s> sets the time offset of a user to the given value </s>
funcom_train/3442512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeEndElement() throws XMLStreamException { Node node= currentNode.getParentNode(); if(currentNode.getNodeType() == Node.DOCUMENT_NODE){ currentNode = null; }else{ currentNode = node; } if(needContextPop[depth]){ needContextPop[depth] = false; namespaceContext.popContext(); } depth--; } COM: <s> internal current node pointer will point to the parent of the current node </s>
funcom_train/5603894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void merge(PyObject other) { if (other instanceof PyStringMap) { table.putAll(((PyStringMap)other).table); } else if (other instanceof PyDictionary) { mergeFromKeys(other, ((PyDictionary)other).keys()); } else { mergeFromKeys(other, other.invoke("keys")); } } COM: <s> merge another py object that supports keys with this </s>
funcom_train/6434656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLookupNonExisting() throws IOException { assertNull(synthesizer.lookup("", "")); assertNull(synthesizer.lookup("", null)); assertNull(synthesizer.lookup(null, "")); assertNull(synthesizer.lookup(null, null)); assertNull(synthesizer.lookup("NONE", "UNKNOWN")); } COM: <s> lookup values that do not exist in the dictionary </s>
funcom_train/45077261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void matchList(String ElementName, String[] values, int oper) { // Delete the old search filter filter = null; // If not NOT_IN, assume IN // (Since ints are passed by value, it is OK to change it) if (oper != NOT_IN) { oper = IN; // Create a leaf node for this list and store it as the filter } filter = new SearchBaseLeaf(ElementName, oper, values); } COM: <s> change the search filter to one that specifies an element to not </s>
funcom_train/1355548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putBot(BrainBot b){ int x = idxX(b.getX()); //coordinates of the cell int y = idxY(b.getY()); if (x<0 || x>=width || y<0 || y>=height){ unaligned.add(b); }else{ get(x,y).add(b); } } COM: <s> put the bot to the right cell </s>
funcom_train/331783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PamDataBlock getInputDataBlock() { IshLocParams p = ishLocControl.ishLocParams; if (!p.useDetector) return null; if (p == null || p.inputDataSource == null) return getParentDataBlock(); else return PamController.getInstance().getDataBlock(PamDetection.class, p.inputDataSource); } COM: <s> an ish loc process has one input stream data block </s>
funcom_train/41975848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rejectRequest () throws DataBaseException { FacesContext context = FacesContext.getCurrentInstance(); String userEmail = context.getExternalContext().getRequestParameterMap().get("userEmail"); User user = this.userService.getUser(userEmail); this.groupService.reject(this.selectedGroup.getGroup(), user); this.requestList.remove(user.getUserInfo()); } COM: <s> respond to reject a requester by group owner </s>
funcom_train/32913349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String storeLocal(RecordFileModel m) throws IOException { String localFile = FileProcess.getRandomFile(m.getFileName()); FileSystemUtil.createBinaryFile(FileProcess.getTemporaryDirectory(), localFile,SystemServices.getBinaryFile(m)); return FileProcess.getFilePath(FileProcess.getTemporaryDirectory(),localFile); } COM: <s> store the file locally and return path to file </s>
funcom_train/45248651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateOkButton() { // Buttons are null during dialog creation if (okButton == null) { return; } // If there is no selection, do not enable OK button if (editorTable.getSelectionCount() == 0) { okButton.setEnabled(false); return; } // At this point, there is a selection okButton.setEnabled(selectedEditor != null); } COM: <s> update the button enablement state </s>
funcom_train/48365940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValidateDetailsHostNameAlreadyPresent() throws Exception { Host h = goodBaseHost(td); h.setHostName(td.getTestHost().getHostName()); AlterHostCmd cmd = new AlterHostCmd(); cmd.setNewHost(h); cmd.setSpecifyIp(true); Errors e = new BeanPropertyBindingResult(cmd, "editHostCmd"); ValidationUtils.invokeValidator(alterHostCmdValidator, cmd, e); assertTrue(e.hasErrors()); assertEquals(1, e.getFieldErrors("newHost.hostName").size()); } COM: <s> validator should fail when a host with the same name is present </s>
funcom_train/50034472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTotal() { if (isSingleton()) { return false; } if (initial.accept == true && initial.transitions.size() == 1) { Transition t = (Transition) initial.transitions.iterator().next(); return t.to == initial && t.min == Character.MIN_VALUE && t.max == Character.MAX_VALUE; } return false; } COM: <s> returns true if this automaton accepts all strings </s>
funcom_train/3371910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String paramString() { String rootPaneString = (rootPane != null ? rootPane.toString() : ""); String rootPaneCheckingEnabledString = (rootPaneCheckingEnabled ? "true" : "false"); return super.paramString() + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString; } COM: <s> returns a string representation of this japplet </s>
funcom_train/1413552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getXMLUrl() { StringBuffer urlBuf = new StringBuffer(); urlBuf.append(apiUrlPrefix); urlBuf.append(BoxConstant.SLASH_STRING); urlBuf.append(apiVersion); urlBuf.append(BoxConstant.SLASH_STRING); urlBuf.append(BoxConstant.CONFIG_API_REQUEST_FORMAT_XML); return urlBuf.toString(); } COM: <s> get the xml format url </s>
funcom_train/13690310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getNeuButton() { if (neuButton == null) { neuButton = new JButton(); neuButton.setText(Helper.getMessage("general.btnNew")); neuButton.setPreferredSize(new java.awt.Dimension(100,26)); neuButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { /*ModifyProfile mp = new ModifyProfile(new Teacher()); mp.setVisible(true);*/ Helper.notImplementedBox(); } }); } return neuButton; } COM: <s> gets neu button </s>
funcom_train/18863768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String doLookAhead(String content) { if (content.length() > 0) { synchronized (list) { Iterator i = list.iterator(); while (i.hasNext()) { String s = (String) i.next(); if (s.equalsIgnoreCase(content)) { break; } else if (startsWithIgnoreCase(s, content)) { return s; } } } } return null; } COM: <s> performs a search to find the best matching </s>
funcom_train/15411232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection createUnpooledConnection() throws SQLException { try { Connection conn = DriverManager.getConnection(databaseUrl, connectionProps); conn.setAutoCommit(autoCommit); conn.setTransactionIsolation(transactionIsolation); return conn; } catch (SQLException ex) { notifyDataSourceIsDown(null); throw ex; } } COM: <s> create a connection that will not be part of the connection pool </s>
funcom_train/38514141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJrdoIsocraticElution() { if (jrdoIsocraticElution == null) { jrdoIsocraticElution = new JRadioButton(); jrdoIsocraticElution.setBounds(new Rectangle(8, 64, 233, 17)); jrdoIsocraticElution.setText("Isocratic elution mode"); jrdoIsocraticElution.setSelected(true); jrdoIsocraticElution.setBackground(Color.white); } return jrdoIsocraticElution; } COM: <s> this method initializes jrdo isocratic elution </s>
funcom_train/24372810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void filter(List<String> ids) { submissionSets = filter(submissionSets, ids); extrinsicObjects = filter(extrinsicObjects, ids); folders = filter(folders, ids); associations = filter(associations, ids); allObjects = filter(allObjects, ids); } COM: <s> go through all objects in metadata and only maintain those objects that contain </s>
funcom_train/20871910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeEventBus() { eventBus = EventBus.getEventBus("KathasiaCore"); eventBus.subscribeExactly("splashscreen visible", new EventSubscriber() { public void onEvent(String topic, Object state) { if (state instanceof Boolean) { SplashScreen splash = bootLoader.getSplashScreen(); if (splash != null) splash.setVisible((Boolean) state); } } }); } COM: <s> initialized the event bus and registers some core listeners </s>
funcom_train/17201981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getFieldHelper(Instruction s, BasicBlock b) { LocationOperand locOp = GetField.getLocation(s); FieldReference field = locOp.getFieldRef(); registerUse(s, field); if (uphi) { registerDef(s, b, field); } } COM: <s> record the effects of a getfield instruction on the heap array </s>
funcom_train/23011362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FloatRectangle scale(double s) { double w=(x2-x)*s/2d; double h=(y2-y)*s/2d; double x0=(x2+x)/2d; double y0=(y2+y)/2d; return new FloatRectangle(x0-w,y0-h,x0+w,y0+h); } COM: <s> creates modified copy of this rectangle so that its side size is </s>
funcom_train/25373391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize(Instances dataset, int capacity) { if (capacity < 0) capacity = 0; // Strings only have to be "shallow" copied because // they can't be modified. m_ClassIndex = dataset.m_ClassIndex; m_RelationName = dataset.m_RelationName; m_Attributes = dataset.m_Attributes; m_Instances = new ArrayList<Instance>(capacity); } COM: <s> initializes with the header information of the given dataset and sets </s>
funcom_train/13745839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createComposite1() { GridLayout gridLayout1 = new GridLayout(); gridLayout1.numColumns = 2; GridData gridData = new GridData(); gridData.widthHint = 999; gridData.horizontalAlignment = GridData.CENTER; gridData.verticalAlignment = GridData.BEGINNING; gridData.heightHint = 870; composite1 = new Composite(composite, SWT.BORDER); composite1.setVisible(true); composite1.setLayoutData(gridData); composite1.setLayout(gridLayout1); createComposite3(); createComposite2(); createComposite4(); } COM: <s> this method initializes composite1 </s>
funcom_train/35164302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCamera(float targetX, float targetY, float targetZ, float distance) { position = new JOVector(targetX, targetY, targetZ+distance); viewDir = new JOVector(0, 0, -1); upVector = new JOVector(0, 1, 0); rightVector = JOVector.crossProduct(viewDir, upVector); rotatedX = rotatedY = rotatedZ = 0.0f; } COM: <s> set the camera to look at a target </s>
funcom_train/39913637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLabel4() { System.out.println("getLabel4"); Page1 instance = new Page1(); Label expResult = null; Label result = instance.getLabel4(); 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 label4 method of class timesheetmanagement </s>
funcom_train/4121979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSingleTile(int x, int y) { Position p = new Position(x, y); for (Direction direction : Direction.values()) { Position n = Map.getAdjacent(p, direction); if (Map.isValid(n, width, height) && map[n.getX()][n.getY()]) { return false; } } return true; } COM: <s> returns i true i if there are no adjacent land </s>
funcom_train/28983736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addReference(Object element) { //Current count Integer count = referenceCounts.get(element); //If there is no current count, set to 1 //and return false since element was not previously //in list if (count == null) { referenceCounts.put(element, ONE); return false; //There is a current count, increment and return true } else { referenceCounts.put(element, count+1); return true; } } COM: <s> add a new reference to an element this increments the reference </s>
funcom_train/20636964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getTextArea() { if (textArea == null) { textArea = new JTextArea("Simple PlugIn Panel Text Area \n"); textArea.setEditable(false); textArea.setPreferredSize(new Dimension(380, 480)); new DropTarget(textArea, new PanelDropTargetListener()); } return textArea; } COM: <s> get text area in simple plug in panel </s>
funcom_train/1385908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnStampe() { if (btnStampe == null) { try { btnStampe = new JButton(); btnStampe.setPreferredSize(new Dimension(120, 70)); // Generated btnStampe.setText("Stampe"); btnStampe.addActionListener(myActionListener); } catch (java.lang.Throwable e) { // TODO: Something } } return btnStampe; } COM: <s> this method initializes btn stampe </s>
funcom_train/13244832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tab addNewTab(String title) { ProgressionPane tempCanvas = new ProgressionPane(); Tab theTab = new Tab(new BorderLayout(), tempCanvas); theTab.setName(title); super.addTab(title, null, theTab, null); super.setSelectedComponent(theTab); theTab.getCanvas().setToCurTabContent(); return theTab; } COM: <s> adds a new tab </s>
funcom_train/22396172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replyAllMessage(final MessageNode messageNode) { trackButtonClick("replyAllMessage"); refreshMessageAndRun(messageNode, new Runnable() { public void run() { navigationController.displayCompositionReply( (NetworkAccountNode)messageNode.getParent().getParentAccount(), messageNode, true); }}); } COM: <s> compose a reply to all recipients of the message </s>
funcom_train/3032216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableButtons(boolean on) { if (on && ( (curPF == null) || (curPF.getIndi() == null) || curPF.getIndi().getReadOnly())) { udebug.dprintln("setting buttons off for bad INDI"); on = false; } topButtons.enableButtons(on); panBottom.enableButtons(on); } COM: <s> set all edit buttons on off </s>
funcom_train/48868824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToggleButton getActorButton() { if (actorButton == null) { actorButton = new JToggleButton("Actor",new ImageIcon("resources/images/actor.png"), false); actorButton.setToolTipText("Actor"); group.add(actorButton); actorButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setSelectedButton(ACTOR); } }); } return actorButton; } COM: <s> this method initializes actor button </s>
funcom_train/1440685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddLogData() { System.out.println("addLogData"); LogData data1 = new LogData(); LogData data2 = new LogData(); ServerDataContainerImpl instance = new ServerDataContainerImpl(); instance.addLogData(data1); instance.addLogData(data2); List<LogData> result = instance.getLogData(); assertEquals(result.size(), 2); assertTrue(result.contains(data1)); assertTrue(result.contains(data2)); } COM: <s> test of add log data method of class server data container impl </s>
funcom_train/16158206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDatePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StartDate_Date_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StartDate_Date_feature", "_UI_StartDate_type"), ReservationSystemPackagePackage.Literals.START_DATE__DATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the date feature </s>
funcom_train/6254976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RequestHandleImpl checkRequestHandleImpl(Object h) { if (h == null) { throw new NullPointerException("Handle cannot be null"); } else if (!(h instanceof RequestHandleImpl)) { throw new IllegalArgumentException("Unexpected handle type: " + h); } RequestHandleImpl rh = (RequestHandleImpl) h; checkEndpoint(rh.getEndpoint()); return rh; } COM: <s> make sure that the passed in request handle has the right type </s>
funcom_train/2365160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image createImage() { Image screenshot = new Image(getShell().getDisplay(), currentSelection != null ? currentSelection : workImage.getBounds()); GC gc = new GC(screenshot); if (currentSelection != null) { gc.drawImage(workImage, currentSelection.x, currentSelection.y, currentSelection.width, currentSelection.height, 0, 0, currentSelection.width, currentSelection.height); } else { gc.drawImage(workImage, 0, 0); } gc.dispose(); this.imageDirty = false; return screenshot; } COM: <s> creates the final screenshot </s>
funcom_train/48982444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String add() { // performValidates the add performValidateAdd(); if (!hasActionErrors()) { course = discipline.getCourse(); disciplineRemote.add(discipline); return listByCourse(); } addActionError("Unable to add a discipline"); return listByCourse(); } COM: <s> if hasnt erros add a new discipline </s>
funcom_train/16897947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLResponse deleteOntologyMirrorEntry(String baseURI, String cacheFileName) { OntologiesMirror.removeCachedOntologyEntry(baseURI); File cacheFile = new File(Resources.getOntologiesMirrorDir(), cacheFileName); cacheFile.delete(); return ServletUtilities.getService().createReplyResponse(deleteOntMirrorEntry, RepliesStatus.ok, "mirror entry removed"); } COM: <s> deletes an entry and its associated physical file from the ontology mirror </s>
funcom_train/23309406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Sched get(String description) { Sched result = null; int count = this.scheds.size(); for (int i = 0; i < count; i++) { Sched t = (Sched) this.scheds.get(i); if (t.getDescription().equals(description)) { result = t; break; } } return result; } COM: <s> returns the sched in the series that has the specified description </s>
funcom_train/43245847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBNStreetAddr2() { System.out.println("getBNStreetAddr2"); EmergencyContactDG5Object instance = new EmergencyContactDG5Object(); String expResult = ""; String result = instance.getBNStreetAddr2(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get bnstreet addr2 method of class org </s>
funcom_train/8094161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void randomInit() { do { m_bits = new boolean [m_nNodes * m_nNodes]; for (int i = 0; i < m_nNodes; i++) { int iPos; do { iPos = m_random.nextInt(m_nNodes * m_nNodes); } while (isSquare(iPos)); m_bits[iPos] = true; } } while (hasCycles()); calcGlobalScore(); } COM: <s> initialize with a random structure by randomly placing </s>
funcom_train/45623144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNativeReferencesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ResolveNativeReferenceType_nativeReferences_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ResolveNativeReferenceType_nativeReferences_feature", "_UI_ResolveNativeReferenceType_type"), MSBPackage.eINSTANCE.getResolveNativeReferenceType_NativeReferences(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the native references feature </s>
funcom_train/24296173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSame(ICodeModule codeModule, CodeModuleFile codeModuleFile) { return codeModule.getId().equalsIgnoreCase( codeModuleFile.getId() ) && codeModuleFile.getObjectStoreName().equals( codeModule.getObjectStore().getName() ) && codeModuleFile.getConnectionName().equals(codeModule.getObjectStore().getConnection().getName() ); } COM: <s> checks if the code module is the same as the code module managed </s>
funcom_train/22491328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean next() throws SQLException { bWasNull = false; // todo: test if other databases do the same if (rResult == null) { return false; // throw exception ? } if (bInit == false) { nCurrent = rResult.rRoot; bInit = true; iCurrentRow = 1; } else { if (nCurrent == null) { return false; } nCurrent = nCurrent.next; iCurrentRow++; } if (nCurrent == null) { iCurrentRow = 0; return false; } return true; } COM: <s> moves the cursor down one row from its current position </s>
funcom_train/21644104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintRobocodeLogo(Graphics2D g) { setBackground(Color.BLACK); g.clearRect(0, 0, getWidth(), getHeight()); g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g.transform(AffineTransform.getTranslateInstance((getWidth() - 320) / 2, (getHeight() - 46) / 2)); g.setColor(Color.DARK_GRAY); g.fill(robocodeTextPath); } COM: <s> draws the robocode logo </s>
funcom_train/45483442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEntry(Object toRemove) { logger.debug("entering removeEntry for " + toRemove); if (toRemove instanceof MappingElement) { MappingElement removeElement = (MappingElement) toRemove; this.list.remove(removeElement); } else { String msg = ("Attempting to delete an unexpected object. " + "This is a bug."); MessageDialog.showUnexpectedErrorMessage(msg, logger); } viewer.refresh(); logger.debug("exiting removeEntry"); } COM: <s> removes the currently selected entry </s>
funcom_train/6269734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelected(int i) { int before=getSelected(); super.setSelected(i); if (before!=i&&listener!=null) { CalendarDate dateBefore=((CalendarMonthViewDays)(getComponent(before))).getStart(); CalendarDate dateAfter=((CalendarMonthViewDays)(getComponent(i))).getStart(); listener.newDateStart(dateBefore,dateAfter); } } COM: <s> override set selected method to call date start listener </s>
funcom_train/25188336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMaxLength() throws Exception { System.out.println("getMaxLength"); JSchema instance = new JSchema(); assertNull(instance.getMaxLength()); instance.setMaxLength(20); assertEquals((Integer) 20, instance.getMaxLength()); } COM: <s> test of get max length method of class jschema </s>
funcom_train/7757852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void releaseQuantity(long quantity) { if (nbReserved < 0) { releaseExtra(quantity < -nbReserved ? quantity : -nbReserved); } nbReserved += quantity; if (LOG.isEnabledFor(Level.ERROR)) { if (nbReserved > fromReservedItems + fromExtraItems) { LOG.error("Incorrect values after releasing " + quantity + " : [" + this.toString() + "]"); } } } COM: <s> this will release a number of items at once rather than </s>
funcom_train/3723990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Annotation createAnnotation(String typeAsString, ATLASElement parent, RegionRef region, RoleIdentifiedFeature[] features, RoleIdentifiedParameter[] parameters, RegionRef alignedRegion) { ATLASType type = resolveTypeFor(ATLASClass.ANNOTATION, typeAsString, parent.getDefiningCorpus()); return createAnnotation(type, parent, getATLASImplementation().createNewIdFor(type), region, features, parameters, alignedRegion); } COM: <s> creates an annotation from the given information </s>
funcom_train/35848583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClasshasSpecializations() { Collection gen = Model.getFacade().getSpecializations(class2); assertNotNull(gen); assertTrue(gen.size() == 1); assertTrue(gen.contains(gen1)); assertTrue(Model.getFacade().getSpecific(gen1) == class1); } COM: <s> make sure that the specialization can be retrieved and followed to the </s>
funcom_train/18728924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDelete() { JaxoObject line = new JaxoFLine(); JaxoObject loop = new JaxoFLoop(); assertTrue(instance.isSaved()); instance.addObject(line); instance.setSaved(true); instance.delete(loop); assertTrue(instance.isSaved()); instance.delete(line); assertFalse(instance.isSaved()); } COM: <s> test of delete method of class net </s>
funcom_train/8539014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNestedIndex(String subtag) { // make sure CHAN get's a high one (this should probably be defined in grammar) if (subtag.equals("CHAN")) return Integer.MAX_VALUE; // look through grammar defined subs for (int i = 0; i < nested.size(); i++) { if ((nested.get(i)).getTag().equals(subtag)) return i; } // 20040518 make the index of an unknown subtag as large as possible return Integer.MAX_VALUE; } COM: <s> returns index of given subtag </s>
funcom_train/18060670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { setThreadParameter("Name", "Logging Controller"); while(true) { try { if(macWorkerAlive == false) { macWorkerAlive = true; createThread(new MacWorker()); } if(arpWorkerAlive == false) { arpWorkerAlive = true; createThread(new ArpWorker()); } Thread.sleep(5000); } catch(InterruptedException intEx) { synchronized(this) { Thread.interrupted(); // clear interrupted flag try { this.wait(); } catch(InterruptedException intEx2) { } } } } } COM: <s> daemonss run method </s>
funcom_train/24239923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CoolScanner skip(Pattern pattern) { ensureOpen(); if (pattern == null) throw new NullPointerException(); clearCaches(); // Search for the pattern while (true) { String token = matchPatternInBuffer(pattern); if (token != null) { matchValid = true; position = matcher.end(); return this; } if (needInput) readInput(); else throw new NoSuchElementException(); } } COM: <s> skips input that matches the specified pattern ignoring delimiters </s>
funcom_train/1387210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_ProximityUnitMiles() throws Throwable{ ConfirmationPage cp = (ConfirmationPage) getActivity(); final Spinner proxUnit = (Spinner) cp.findViewById(com.busstopalarm.R.id.ProximityUnits); final int pos = 0; final int a = proxUnit.pointToPosition(pos, 0); String result = proxUnit.getItemAtPosition(pos).toString(); assertEquals("the proximity unit should be mile", "Yards", result); } COM: <s> tests the proximity unit selection </s>
funcom_train/3678098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CustomProperties createLanguageProperties() { if ( propCache.get( LANGUAGE_PROPERTIES ) != null ) return (CustomProperties) propCache.get( LANGUAGE_PROPERTIES ); else { CustomProperties cP = new CustomProperties( LANGUAGE_PROPERTIES ); propCache.put( LANGUAGE_PROPERTIES, cP ); return cP; } } COM: <s> creates a code custom properties code that conatains i18n informations about </s>
funcom_train/3889263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateVersionType_MaxLength(String versionType, DiagnosticChain diagnostics, Map context) { int length = versionType.length(); boolean result = length <= 20; if (!result && diagnostics != null) reportMaxLengthViolation(ImscpRootv1p1p2Package.Literals.VERSION_TYPE, versionType, length, 20, diagnostics, context); return result; } COM: <s> validates the max length constraint of em version type em </s>
funcom_train/25708216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disableInputPanels() { previouslyEnabledComponents.clear(); for(int x=0; x < getJTabbedPane().getTabCount(); x++ ) { final JPanel c = (JPanel)getJTabbedPane().getComponentAt(x); disableInputPanels(c); } } COM: <s> disables all input panels during run of search remembers disabled </s>
funcom_train/31106488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadProperties() { File propFile = _docInfo.getSourceFile( EJB_PROP_FILE ); if (propFile != null) { try { InputStream propStream = new FileInputStream( propFile ); _props.load( new BufferedInputStream( propStream )); } catch (IOException e) { throw new RuntimeException( e.toString() ); } } } COM: <s> load bundle properties from the ejb </s>
funcom_train/45628743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createControl(Composite parent) { initializeDialogUnits(parent); Composite composite = new Composite(parent, SWT.NULL); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL)); composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT)); composite.setFont(parent.getFont()); createSourceGroup(composite); createDestinationGroup(composite); createOptionsGroup(composite); restoreWidgetValues(); updateWidgetEnablements(); setPageComplete(determinePageCompletion()); setErrorMessage(null); // should not initially have error message setControl(composite); } COM: <s> non javadoc method declared on idialog page </s>
funcom_train/7445876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Configuration findByPrimaryKey(long configurationId) { Configuration ret[] = findByDynamicSelect( SQL_SELECT + " WHERE ID = ? And Mark_For_Delete = ?", new Object[] { new Long(configurationId), new Boolean(false) } ); return ret.length==0 ? null : ret[0]; } COM: <s> returns the rows from the coach table that matches the specified </s>
funcom_train/37009501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isParameterTrue(String paramName) { String s = attributes.get(paramName); if (s == null) { return false; } boolean result = false; s = s.toLowerCase(); if (s.equals("true") || s.equals("yes") || s.equals("y") || s.equals("t") || s.equals("1")) { result = true; } return result; } COM: <s> return em true em if the specifiec parameter is defined as true </s>
funcom_train/36665578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDistanceFrom(GameObject object) { double objectX = object.getCentreOfObject().x; double objectY = object.getCentreOfObject().y; double distX = Math.abs( x - objectX ); double distY = Math.abs( y - objectY ); double dist = Math.sqrt( (distX * distX) + (distY * distY) ); return dist; } COM: <s> returns the euclidean straight line distance between this location </s>
funcom_train/33611407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawPath(Graphics2D canvas, Shape path) { canvas.setColor(strokeColor); canvas.setStroke(stroke); canvas.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opacity)); canvas.draw(path); canvas.setComposite(AlphaComposite.SrcOver); } COM: <s> draws a single path via a shape </s>
funcom_train/20875215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void afterAssigned(long iteration, T value) { if (iUnassignedVariables != null) iUnassignedVariables.remove(value.variable()); if (iAssignedVariables != null) iAssignedVariables.add(value.variable()); iNrAssignedVariables++; iPerturbVariables = null; for (ModelListener<V, T> listener : iModelListeners) listener.afterAssigned(iteration, value); } COM: <s> called after a value is assigned to its variable </s>
funcom_train/36076228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public String toString() { StringBuffer result_buf = new StringBuffer(); result_buf.append("("); for (Edge edge : _edges) { // Cast to Edge. result_buf.append(((Edge)edge).toString()); result_buf.append(", "); } if (_edges.size() > 0) result_buf.delete(result_buf.length() - 2, result_buf.length()); result_buf.append(")"); return result_buf.toString(); COM: <s> despite the class of edges treate them as edge </s>
funcom_train/22664693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Suggestion nextMatch() { Suggestion retval = null; if (!myDoneFlag) { retval = nextMatchInNavigator(myCurConjunctNavigator); while (retval == null && myOriginalConjuncts.hasNext()) { myCurConjunctNavigator = new PExpNavigator(myOriginalConjuncts.next()); myCurConjunctIndex++; retval = nextMatchInNavigator(myCurConjunctNavigator); } if (retval == null) { myDoneFlag = true; } } return retval; } COM: <s> p returns the next application suggestion of this </s>
funcom_train/16679098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performAction(String action, Content content) { try { if (FacebookContentProvider.ACTION_POST.equals(action)){ performPostAction(content); }else if (FacebookContentProvider.ACTION_DELETE.equals(action)){ performDeleteAction(content); }else{ logger.warn("Invalid action " + action + " on " + content.getType() + " content" + content.getContentUrl()); } } catch (IQserException e) { throw new IQserRuntimeException(e); } catch (FacebookException fe){ throw new IQserRuntimeException(fe); } } COM: <s> performs an action of the given content </s>
funcom_train/47483260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tag create(String name) { if (name == null || name.trim().isEmpty()) throw new IllegalArgumentException(STR_NAME_NULL); Integer ID = getMaxID(tagTable) + 1; Tag tag = new Tag(ID, name); tagTable.put(ID, tag); save(); return tag; } COM: <s> create a new tag </s>
funcom_train/10525590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasNext() { if(_rs == null) return false; if(_primed) return true; try { _primed = _rs.next(); return _primed; } catch(SQLException sql) { String msg = "An exception occurred reading from the Iterator. Cause: " + sql; LOGGER.error(msg, sql); throw new IllegalStateException(msg, sql); } } COM: <s> check for a subsequent item in the result set </s>
funcom_train/4385616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CoCitation ( WebGraph graph ) { this.graph = graph; this.scores = new HashMap(); int numLinks = graph.numNodes(); for(int i=0; i<numLinks; i++) { HashMap aux = new HashMap(); for(int j=0; j<i; j++) aux.put(new Integer(j),new Double(-1)); scores.put(new Integer(i),aux); } } COM: <s> constructor for co citation </s>
funcom_train/7661034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testScheduleWithFixedDelay1_RejectedExecutionException() { ScheduledThreadPoolExecutor se = new ScheduledThreadPoolExecutor(1); try { se.shutdown(); se.scheduleWithFixedDelay(new NoOpRunnable(), MEDIUM_DELAY_MS, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS); shouldThrow(); } catch(RejectedExecutionException success){ } catch (SecurityException ok) { } joinPool(se); } COM: <s> schedule with fixed delay throws rejected execution exception if shutdown </s>
funcom_train/802629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addArrayNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SupDataType_arrayName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SupDataType_arrayName_feature", "_UI_SupDataType_type"), MzdataPackage.Literals.SUP_DATA_TYPE__ARRAY_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the array name feature </s>
funcom_train/8132210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableAll() { for (Iterator allDisabled = disabledTabs.iterator(); allDisabled.hasNext();) { int disabledIndex = ((Integer)allDisabled.next()).intValue(); getContext().add(id4Label(disabledIndex) + ".class", "wgtTabUnselected", IContext.TYPE_ATT, IContext.STATUS_NOT_EDITABLE); allDisabled.remove(); } } COM: <s> function for dynamic enabling of all tabs </s>
funcom_train/36233278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Status getStatus() { log.trace("Entered method getStatus()"); Status status; try { status = checkLowlevelBitstorageForCurrentState(); } catch (Exception e) { log.debug("Exception caught by fault barrier", e); // Create status covering exception status = makeStatus(Severity.RED, "Exception caught by fault barrier: " + e.getMessage()); } return status; } COM: <s> returns real time info about the current state of the lowlevel </s>
funcom_train/38578184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readFile(String file){ if(!file.endsWith(".calml")) return; SAXParserFactory spf = SAXParserFactory.newInstance(); try { //get a new instance of parser SAXParser sp = spf.newSAXParser(); //parse the file and also register this class for call backs sp.parse(new File(file), this); }catch(SAXException se) { se.printStackTrace(); }catch(ParserConfigurationException pce) { pce.printStackTrace(); }catch (IOException ie) { ie.printStackTrace(); } } COM: <s> reads a file line by line </s>
funcom_train/33398894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getAudioPanel() { if (audioPanel == null) { GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.fill = GridBagConstraints.VERTICAL; gridBagConstraints.weightx = 1.0; audioPanel = new JPanel(); audioPanel.setLayout(new GridBagLayout()); audioPanel.setOpaque(false); audioPanel.add(getVolumeSlider(), gridBagConstraints); audioPanel.add(getMuteButton(), new GridBagConstraints()); } return audioPanel; } COM: <s> this method initializes audio panel </s>
funcom_train/7269774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { tryStoppingAuxMP3Player(); if( !(playerState == UNKNOWN || playerState == STOPPED)) { playerState = STOPPED; notifyEvent(STOPPED, -1); try { Thread.sleep(900); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } COM: <s> stops the current song </s>
funcom_train/17017163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getSleepInterval() { long sleepInterval = rmConf.getLong( "mapred.capacity-scheduler.init-poll-interval", INITIALIZATION_THREAD_POLLING_INTERVAL); if(sleepInterval <= 0) { throw new IllegalArgumentException( "Invalid initializater poller interval " + sleepInterval); } return sleepInterval; } COM: <s> amount of time in milliseconds which poller thread and initialization </s>
funcom_train/4964259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void merge(Artist target, Artist source, Mp3Info info) throws IOException, DatabaseException { Database db = getDatabase(); List<Album> albums = db.getAlbums(Collections.singletonMap("Artist", source.getId())); for (Album album : albums) { album.setArtist(target); updateAlbum(album, info); target.addAlbum(album); } db.updateArtist(target); db.delete(source); } COM: <s> f ge alle alben und titel von artist source zu artist target hinzu </s>
funcom_train/45872802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void turnCounterClockwise(float amount) { // left key Quaternion roll = new Quaternion(); roll.fromAngleAxis( 1*amount*getRotationRate(), Vector3f.UNIT_Y ); //rotates Rate degrees roll = this.getLocalRotation().multLocal(roll); // (q, save) this.setLocalRotation(roll); } COM: <s> turn the camera one unit counter clockwise </s>
funcom_train/44713087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { validate(); if (object instanceof DataObject) { OID id1 = this.getOID(); // we only want to match based on OID if the OID is non-empty. if (! id1.arePropertiesNull()) { return id1.equals(((DataObject)object).getOID()); } else { return super.equals(object); } } return false; } COM: <s> is this data object equal to another data object </s>
funcom_train/38293410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Ontology getMergedOntology(Codec c, Ontology o) { Ontology ontology = null; Ontology langOnto = c.getInnerOntology(); if (langOnto == null) { ontology = o; } else if (o == null) { ontology = langOnto; } else { ontology = new Ontology(null, new Ontology[]{o, langOnto}, null); } return ontology; } COM: <s> merge the reference ontology with the inner ontology of the </s>
funcom_train/50486261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeTableList() { int temp = searchParameters.size(); for(int i = 0; i < temp; i++) { ParameterNode input = (ParameterNode)searchParameters.get(i); String table = input.getTableName(); if(tableNotFound(table)) { tableList.add(input.getTableName()); } } } COM: <s> main function to create the table list </s>
funcom_train/4286508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addScalePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ScaledValue_scale_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ScaledValue_scale_feature", "_UI_ScaledValue_type"), OrmUsageProfilePackage.Literals.SCALED_VALUE__SCALE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the scale feature </s>