__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3121231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float minDistance(Polygon p) { float min = Float.MAX_VALUE; for (int i = 0; i < p.npoints; i++) { min = Math.min(min, this.minDistance(p.xpoints[i], p.ypoints[i])); } return (min); } // of minDistance COM: <s> figure out the min distance between two polygons </s>
funcom_train/21901423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BaseProfile getAnonymousProfile() { if (loadedAnonymousProfile) return null; if (!loadedAnonymousProfile && anonymousProfile == null) { synchronized (this) { if (anonymousProfile == null) { QueryByFilter query = new QueryByFilter(BaseProfile.class); query.addItem("name", QueryByFilter.FIELD_EQUALS, ANONYMOUS_PROFILE_NAME); query.setMode(PersistenceAspect.FULL_MODE_LOADING); query.setStrategy(PersistenceAspect.STRATEGY_DETACHING); anonymousProfile = Roma.context().persistence().queryOne(query); loadedAnonymousProfile = true; } } } return anonymousProfile; } COM: <s> return the profile for the anonymous user </s>
funcom_train/39316617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /** public void testCanvasMouseMoved() { System.out.println("testCanvasMouseMoved"); f.canvasMouseMoved(mouseEvent); t.canvasMouseMoved(mouseEvent); System.out.println("empty code just a print statemnet"); System.out.println("done testCanvasMouseMoved"); } COM: <s> public void test curve action performed </s>
funcom_train/25599720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); setPreferredSize(new Dimension(800, 600)); setName("mainGui"); this.setBounds(new Rectangle(0, 0, 800, 600)); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setContentPane(getMainPane()); setTitle(Messages.getString("PhyMoteFrame.window_title")); //$NON-NLS-1$ setVisible(true); pack(); } COM: <s> this method initializes this </s>
funcom_train/48527749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writePrimitive(long l, String field) throws IOException { writer.start("primitive"); if (field != null) writer.attribute("field", field); writer.attribute("type", "long"); writer.attribute("value", l); writer.end("primitive"); } COM: <s> method which writes a long to the stream as the given field name </s>
funcom_train/46189031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Comment createComment(String title, String body, String author, String email, String website, String ipAddress, Date date, State state) { return new Comment(title, body, author, email, website, ipAddress, date, state, this); } COM: <s> creates a new comment for this blog entry </s>
funcom_train/25327153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void manageException(){ this.throwable.printStackTrace(); boolean close = MessagePaneManager.showExceptionPane(this.throwable, this.fatal); logger.error(this.throwable.getMessage()); if (close){ Royal.pm.removeFile(); System.exit(0); } } COM: <s> open a dialog to signal the exception and if fatal exit bir dy </s>
funcom_train/4663878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logout() { if (isConnected()) { try { out.writeInt(ServeurSync.CLOSE_REQ); out.flush(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { sock = null; receiver = null; uploader = null; loggedUser = null; cryptedPwd = null; } } } COM: <s> deconnecte le client du serveur </s>
funcom_train/45017732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resizeScene() { canvas.setCurrent(); Rectangle rect = this.canvas.getClientArea(); //getGLContext().resize(0, 0, rect.width, rect.height); glViewport(0, 0, rect.width, rect.height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-50.0 * rect.width / rect.height, 50.0 * rect.width / rect.height, -50, 50, -1000, 1000); //GLU.gluPerspective(90,(float)rect.width/(float)rect.height,0.1,1000); glMatrixMode(GL_MODELVIEW); } COM: <s> corrects the size of the gl scene </s>
funcom_train/1712055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFoundTextArea(Rectangle area){ this.rectArea =area; //flag screen for redraw //this one doesn't work //currentManager.addDirtyRegion(this,(int)x1-5,(int)y1-5,(int)(x2-x1)+10,(int)(y2-y1)+10); //currentManager.addDirtyRegion(this,0,0,x_size,y_size); //this.invalidate(); } COM: <s> highlight zone on page for text areas </s>
funcom_train/29936378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assignLabels() { HashSet<String> alreadyUsed = new HashSet<String>(); for(Tree t : this) if(t.getLabel() != null) alreadyUsed.add(t.getLabel()); assignLabels(new int[]{0}, alreadyUsed); } COM: <s> assigns automatically generated unique labels to the unlabeled </s>
funcom_train/18788044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addNewOrChangedPropertiesAndViewsToView(MetaView newView) { newView.addToPackage(getQualifiedName(newView), (MetaModel)getModel().getRoot().getDataObject(), getContext(newView)); newView.addToProperties(newView.getFields(), getQualifiedName(newView), (MetaModel)getModel().getRoot().getDataObject()); } COM: <s> adds newly assigned properties and views </s>
funcom_train/36681297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildHardCodedMap(int playerCount) { int col = 0; for (int playerIndex = 0; playerIndex < playerCount; playerIndex++) { Player mapPlayer = new Player(playerIndex, colors[playerIndex]); MapUtil.addCityToMap(map, col++, 0, TestData.BASE, mapPlayer); } } COM: <s> build a map that supports the player count </s>
funcom_train/14216024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(String productId, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, double selectedAmount) { return equals(productId, additionalProductFeatureAndAppls, attributes, prodCatalogId, selectedAmount, null, null, false); } COM: <s> compares the specified object with this cart item </s>
funcom_train/49463768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isRegister(String path) throws Exception{ if(path == null) return false; if(winRegistry == null) return false; for(int i=0; i<winRegistry.length; i++){ if(DbHelper.nullify(winRegistry[i]) == null) continue; if(path.toLowerCase(Locale.US).startsWith(winRegistry[i].toLowerCase(Locale.US))){ return true; } } return false; } COM: <s> check if this is register key </s>
funcom_train/9555960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compileArrays() { // Create a regular array for each HashSet in rawWords. for (int i = 0; i < 14; i++) { words[i] = rawWords.get(i).toArray(new CharacterArray[0]); } // Clear out the raw words. rawWords = null; } COM: <s> compiles the arrays of words used in processing </s>
funcom_train/41329708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMarshallProxies() throws MarshalException, ValidationException, IOException { Proxies proxies=generateProxiesElement(); assertEquals(XML_PROLOG + "<proxies xmlns=\"http://maven.apache.org/POM/4.0.0\">"+XML_PROXY+"</proxies>" , mytrim(XMLBinder.toXMLString(proxies))); } COM: <s> test transformation of proxy into xml </s>
funcom_train/10790933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCastFunction(Val val, String func) { if (val instanceof Lit || val instanceof Param) { if (func.indexOf("VARCHAR") == -1) { func = addCastAsString(func, "{0}", " AS VARCHAR(" + varcharCastLength + ")"); } } return func; } COM: <s> return the correct cast function syntax </s>
funcom_train/3091505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean testErrorTolerance() { Random randNum = new Random(); int cnt = 0; int nodeNumber; while (cnt < numNodes) { /* Select a random node. Deletes all its edges and then delete the node. */ nodeNumber = randNum.nextInt(graph.numVertices()); Vertex v = (Vertex) indxr.getVertex(nodeNumber); graph.removeEdges(v.getIncidentEdges()); graph.removeVertex(v); /* Increment count if node deleted from the graph */ cnt++; } return true; } // end of testErrorTolerance COM: <s> perform error tolerance test on the graph </s>
funcom_train/2293529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String previewButton() { StringBuffer previewButton = new StringBuffer(8); previewButton.append(buttonBarSeparator(5, 5)); previewButton.append(button( getJsp().link(getCms().getSitePath(getCurrentResource())), "_preview", "preview.png", Messages.GUI_BUTTON_PREVIEW_0, 0)); return previewButton.toString(); } COM: <s> generates a preview button for the gallery button bar </s>
funcom_train/31435940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getMacros(){ Vector _returnVal = AutoHomeDaemonSession.getInstance().loadAllCM11AMacros(); if(_returnVal!=null){ return _returnVal; } _returnVal=new Vector(); _returnVal.addElement(new Macro()); return _returnVal; } COM: <s> this will return a vector of x10 event these </s>
funcom_train/568632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawPoints(java.util.List points, Tile t) { Graphics g = getGraphics(); if (g != null) { Color bg = getBackground(); fillScreen(g, bg); ListTransaction.execute(new DrawPoint(g, t), points); } } COM: <s> draw the given points on the grid </s>
funcom_train/5706620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItemSelected(int idx, boolean val) { Element option = DOM.getChild(getElement(), idx); if (option == null) throw new IndexOutOfBoundsException(); DOM.setAttribute(option,"selected",val?"true":null); } COM: <s> this method sets a selected item by index </s>
funcom_train/19249557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getLoopTypeLength(Object obj) { Class type = obj.getClass(); int length = -1; if (type.isArray()) { length = Array.getLength(obj); } else if (Collection.class.isAssignableFrom(type)) { Collection collection = (Collection)obj; length = collection.size(); } return length; } COM: <s> get the length of the loop type </s>
funcom_train/46479198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addImpactTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Valuation_ImpactType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Valuation_ImpactType_feature", "_UI_Valuation_type"), IS1Package.Literals.VALUATION__IMPACT_TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the impact type feature </s>
funcom_train/17206353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSize(int unit, int size) { if (size > 1) { setHiEntry(unit, getHiEntry(unit) | MULTI_MASK); setHiEntry(unit + 1, MULTI_MASK | size); setHiEntry(unit + size - 1, MULTI_MASK | size); } else setHiEntry(unit, getHiEntry(unit) & ~MULTI_MASK); } COM: <s> set the size of lump of units </s>
funcom_train/43325017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ViewStorageRegisterForm getViewStorageRegistersForm() { if (_viewRegistersForm == null) { _viewRegistersForm = new ViewStorageRegisterForm("Registers"); _viewRegistersForm.addCommand(getCancelReturnToCalcCommand()); _viewRegistersForm.setCommandListener(this); } return _viewRegistersForm; } COM: <s> this method returns instance for view registers form component and should </s>
funcom_train/44011548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCustAddr() { System.out.println("getCustAddr"); CustomerBO instance = null; String expResult = ""; String result = instance.getCustAddr(); 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 cust addr method of class edu </s>
funcom_train/7531207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLocalPeerResponsible(Key key) { if (key == null) throw new NullPointerException(); String compath = Utils.commonPrefix(key.toString(), getLocalPath()); if ((compath.length() == key.size()) || (compath.length() == getLocalPath().length()) || getLocalPath().length() == 0) return true; else return false; } COM: <s> checks if the local peer is responsible for the given key </s>
funcom_train/37141119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void uninstallListeners(JXStatusBar sb) { if (mouseListener != null) { statusBar.removeMouseListener(mouseListener); } if (mouseMotionListener != null) { statusBar.removeMouseMotionListener(mouseMotionListener); } if (propertyChangeListener != null) { statusBar.removePropertyChangeListener(propertyChangeListener); } } COM: <s> remove the installed listeners from the status bar </s>
funcom_train/19143342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLineNumber() { int num_lines = 0; try{ long length_file = work_file.length(); FileReader file_count = new FileReader(work_file); for(int i=0; i<length_file; i++){ char caracter = (char) file_count.read(); if ((caracter=='\n') || (caracter=='\r')) { num_lines++; } } file_count.close(); } catch(FileNotFoundException e1){ } catch(IOException e2){ } return num_lines; } COM: <s> code get line number code returns the files number of lines it counts </s>
funcom_train/3654519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void registerMimeConfiguration() { MimeConfigurationService mimeConfig = (MimeConfigurationService) ApplicationManager.getInstance().currentApplication(). getService(MimeConfigurationService.class); mimeConfig.getFileTypeMap().registerRecognizer(recognizer); mimeConfig.getCommandMap().setDataContentHandlerFactory(recognizer. getMimeType().toString(), dchFactory); } COM: <s> method that enters the mime type recognizer and data content handler factory </s>
funcom_train/22542926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { synchronized (republishTask) { if (future == null) { long delay = DatabaseSettings.REPUBLISH_PERIOD.getValue(); long initialDelay = delay; future = context.getDHTExecutorService() .scheduleWithFixedDelay(this, initialDelay, delay, TimeUnit.MILLISECONDS); } } } COM: <s> starts the dhtvalue manager </s>
funcom_train/31987099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop(Condition stopCond) { if ( stopCond == null ) { sendWarning ( "Can not set stop-condition! Command ignored.", "Experiment '"+getName()+"', Method 'stop(SimStopCondition stopCond)'", "The parameter passed was either null or a not initialized "+ "SimStopCondition reference.", "Make sure to connect a valid main model first before starting "+ "this experiment."); } else { stopper = stopCond; } } COM: <s> stops the simulation when the given condition returns true </s>
funcom_train/18136852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applySettingsAndHide() { if (getUndoCount() > 0) { int result = JOptionPane.showConfirmDialog(editorDialog, "Do you want to apply the changes?", "Apply changes", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); switch (result) { case JOptionPane.YES_OPTION: editorDialog.setVisible(false); editorDialog.getOwner().setEnabled(true); break; case JOptionPane.NO_OPTION: rejectSettingsAndHide(); break; default: break; } } else { editorDialog.setVisible(false); editorDialog.getOwner().setEnabled(true); } } COM: <s> method for when editing is finished </s>
funcom_train/19073853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultInput(String newDefaultInput) { StreamInputSynapse inp = getInputSynapse(newDefaultInput); if (inp==null){ String nm=newDefaultInput==null?"":newDefaultInput; log.warn("Synapse ["+nm+"] not registered in switch. Setting default synapse to empty value."); } defaultSynapse = inp; } COM: <s> sets the name of the default input synapse that is connected </s>
funcom_train/45622573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLicenseTargetPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LCType_licenseTarget_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LCType_licenseTarget_feature", "_UI_LCType_type"), MSBPackage.eINSTANCE.getLCType_LicenseTarget(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the license target feature </s>
funcom_train/21105574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMiFinish() { if (miFinish == null) { miFinish = new JMenuItem("Exit"); miFinish.addActionListener(new FinishListener()); miFinish.setMnemonic('X'); miFinish.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, ActionEvent.ALT_MASK)); } return miFinish; } COM: <s> this method initializes mi finish </s>
funcom_train/46760776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TermProcedureModel getTermProcedure(final long termProcedureId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return ClinicalData.getTermProcedure(termProcedureId, chain, call); }}; return (TermProcedureModel) call(method, call); } COM: <s> same transaction return the single term procedure model for the primary key </s>
funcom_train/37519291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean windowDimensionsHaveChanged() { return (window.getWidth() != preferences.getInt( toolName + windowName + "WindowWidth", (int)(getPreferredSize().getWidth())) || window.getHeight() != preferences.getInt( toolName + windowName + "WindowHeight", (int)(getPreferredSize().getHeight()))); } COM: <s> returns whether the window dimensions have changed from either </s>
funcom_train/10281971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFeedToCollect(XPersonalFeed pFeed) { synchronized (mCollectFeedInfoQueue) { mLog.info("Add feed: " + pFeed + " to the collection queue"); mCollectFeedInfoQueue.add(pFeed); if (mLog.isDebugEnabled()) { mLog.info("Notify the waiting threads on the list"); } mCollectFeedInfoQueue.notify(); } } COM: <s> add a p feed to the collection queue </s>
funcom_train/9759983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getEncoding(ITextEditor editor) { IEditorInput input= (editor.getEditorInput()); if (input instanceof IFileEditorInput) { IFile file= ((IFileEditorInput)input).getFile(); try { String explicitEncoding; explicitEncoding= file.getCharset(false); if (explicitEncoding == null) return null; } catch (CoreException e) { // continue - assume file is not using default encoding } } IEncodingSupport s= getEncodingSupport(); if (s != null) return s.getEncoding(); return null; } COM: <s> returns the encoding currently used in the given editor </s>
funcom_train/4506060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeBytesToStream(byte[] bytes, HttpServletResponse response) { if (bytes == null) { return; } response.setContentType(CONTENT_TYPE); // Send back image try { ServletOutputStream sos = response.getOutputStream(); sos.write(bytes); sos.flush(); sos.close(); } catch (IOException e) { // Ignore. } } COM: <s> writes out a code byte code to the servlet ouput stream </s>
funcom_train/28426654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexForImageName(String name) { int index = -1; name = name.replace('\\', '/'); // we internally use '/' always for (int i = 0; i < imageNames.size(); i++) { if (name.equals(imageNames.elementAt(i))) { return i; } } msg("-E- getIndexForImageName: not found '" + name + "'"); return -1; } COM: <s> attempt to find the index number of the given image filename </s>
funcom_train/30244727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int lookup(int rate) { double d = 1/(1+(Math.pow(Math.E, -rate/10f+5f))); if(SHOW_MECH) System.err.println("rate="+rate+", sig="+d); return (int) (100*d); } COM: <s> computes a sigmoid centered at code rate 50 code </s>
funcom_train/4449677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTemplate(ThemeTemplate template) { this.templatesByName.put(template.getName(), template); this.templatesByLink.put(template.getLink(), template); if(!ThemeTemplate.ACTION_CUSTOM.equals(template.getAction())) { this.templatesByAction.put(template.getAction(), template); } } COM: <s> set the value for a given template name </s>
funcom_train/2333423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean xhasSumOfPowers(int fromK, int toK) { if (fromK > toK) throw new IllegalArgumentException("fromK must be less or equal to toK"); return getMinOrderForSumOfPowers() <= fromK && toK <= getMaxOrderForSumOfPowers(); } COM: <s> tells whether tt sum of powers from k </s>
funcom_train/2993848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSelectedXItem(int index) { if (selectedXDataMatrix.length == 0) selectedXDataMatrix = new Object[1][1]; selectedXDataMatrix[0][0] = dataFile.getItem(index); dataFile.setXColumn(index); selectedXTable.revalidate(); selectedXTable.repaint(); } COM: <s> adds an item to the table of selected items as x selection </s>
funcom_train/44161516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(FacesContext context) { try { if (!fullScreen) { container.draw(context, selectedTableId, false); } else { returnContainer(selectedTableId, container).draw(context, null, false); } } catch (Exception e) { e.printStackTrace(); } } COM: <s> draw draws the workspace </s>
funcom_train/781936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResourceSelection intersection(ResourceSelection s) { Set<Resource> b = s.getResources(); Set<Resource> n = new HashSet<Resource>(); Iterator<Resource> i = this.getResourceIterator(); while (i.hasNext()) { Resource r = i.next(); if (b.contains(r)) { n.add(r); } } return new ResourceSelection(n); } COM: <s> creates the intersection of two resource selections </s>
funcom_train/25798244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getDirectory(final DataResponse<ArrayList<FileLocation>> response, final String path, final DirectoryMask mask, final int offset, final int limit, final Context context, final int mediaType) { mHandler.post(new Command<ArrayList<FileLocation>>(response, this){ @Override public void doRun() throws Exception { response.value = info(context).getDirectory(InfoManager.this, path, mask, offset, limit, mediaType); } }); } COM: <s> returns the contents of a directory </s>
funcom_train/48063380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBundler append(StringBundler sb) { if ((sb == null) || (sb._arrayIndex == 0)) { return this; } if ((_array.length - _arrayIndex) < sb._arrayIndex) { expandCapacity((_array.length + sb._arrayIndex) * 2); } System.arraycopy(sb._array, 0, _array, _arrayIndex, sb._arrayIndex); _arrayIndex += sb._arrayIndex; return this; } COM: <s> append another string bundler </s>
funcom_train/21616515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void orderCancel(int orderId) { Order order; try { order = Order.getOrder(orderId); if (order.getUserId() == user.getID()) { if (order.cancelOrder()) printLine("Order canceled"); else printError("Could not cancel order (OrderController)", 3); } else { printError("This is not your order", 4); } } catch (SQLException e) { printError("Could not cancel order (SQL)", 3); } } COM: <s> cancel a users order </s>
funcom_train/39184970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCell(Polygon p) { cell = new Polygon(p.xpoints,p.ypoints,4); for(int j=0; j<cell.xpoints.length; j++){ cell.xpoints[j]=screenX(cell.xpoints[j]); cell.ypoints[j]=screenY(cell.ypoints[j]); } } COM: <s> sets the spot cell coordinates </s>
funcom_train/22588412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGlobalContext( IContext globalContext) { IContext newcontext = newContext( globalContext ); if (context != null) { Object[] keys = context.getKeys(); for( int kk = 0; kk < keys.length; kk++ ) { newcontext.put( (String)keys[kk], context.get( (String)keys[kk] ) ); } } context = newcontext; } COM: <s> use a pre populated context </s>
funcom_train/17543619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean initialize() { try { this.space = SpaceLocator.getSpace(name); this.spaceAdmin = (JavaSpaceAdmin)(((Administrable)(this.space)).getAdmin()); return true; } catch (Exception ex) { ErrorManager.getDefault().notify(ex); // killing the process this.process.destroy(); return false; } } COM: <s> this method should be called after java space is started several seconds </s>
funcom_train/22551127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean performRequest(HttpMethod method, HttpClientListener listener, int timeout) { HttpClient client = HttpClientManager.getNewClient(timeout, timeout); try { HttpClientManager.executeMethodRedirecting(client, method); } catch (IOException failed) { return !listener.requestFailed(method, failed); } return !listener.requestComplete(method); } COM: <s> performs a single request </s>
funcom_train/16357757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int row, int col, double value){ if(row >= 0 && col >= 0 && row < m[0].length && col < m.length){ m[col][row] = value; } else{ throw new MatrixException("index out of range : " + row + "x" + col + " in " + m[0].length + "x" + m.length); } } COM: <s> set the value of the element at the given location </s>
funcom_train/45232315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ButtonGroup getButtonGroup() { if (buttonGroup == null) { buttonGroup = new ButtonGroup(); buttonGroup.add(getRbtReportTypeCustom()); buttonGroup.add(getRbtReportTypeDefault()); buttonGroup.add(getRbtReportTypeMysql()); } return buttonGroup; } COM: <s> this method initializes button group </s>
funcom_train/51749942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AbstractFileNode getRelativeSubFile(int i) { i = this.getActiveFileNumber() + i; i %= this.subFilesCount(); if(i < 0) { i += this.subFilesCount(); } AbstractLogWriter.getInstance().write(this, "read sub file: " + this.getSubFile(i), AbstractLogWriter.VERBOSE); return this.getSubFile(i); } COM: <s> returns a sub file relative from the active position </s>
funcom_train/47950667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "Question: " + this.questionText + "\n" + "Answer format: " + this.answerFormat + "\n" + "Explanation: " + this.explanation + "\n" + "Default answer: " + this.defaultAnswer + "\n" + "XPath to value: " + this.xpath + "\n" + "Error text: " + this.errorText + "\n" + "Answer: " + this.answer; } COM: <s> produce a depiction of the question </s>
funcom_train/34675313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLoading(String id, String reason, Reference relatesTo, String contributesTo, String dependsOn, Rate rate) { addLine(new RateBehaviour(id, reason, relatesTo, contributesTo, dependsOn, BehaviourType.LOAD, rate, generateAutoPriority())); } COM: <s> add a rate based loading entry to the sheet </s>
funcom_train/39046343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NDEFRecord getRecord(byte id[]) { // check if id is null if (id == null) { throw new NullPointerException(); } // search the record corresponding the ID for (int i = 0; i < this.records.length; ++i) { if ((this.records[i].getId() != null) && (isIDEquals(this.records[i].getId(), id))) { return this.records[i]; } } return null; } COM: <s> gets the record </s>
funcom_train/133335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void repack() { // _ONLY_ tiers and glyphs placed in tiers will be repacked -- // anything added directly to map other than tiers will need to // be dealt with manually if (debug_events) { System.out.println(name + " repacking tiers"); } packTiers (true, true); if (! notifyOnPackTiers) { notifyTierEventListeners (new TierEvent (this, TierEvent.REPACK, null)); } } COM: <s> overriding neo map </s>
funcom_train/47514540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix permuteColumns(int[] colIndexOrder) { MatlabMatrix permutedMat = new MatlabMatrix(numRows, numCols); for (int i = 0; i < numCols; ++i) { permutedMat.setColumn(i, this.getColumn(colIndexOrder[i])); } return permutedMat; } COM: <s> returns new matrix containing permutation of columns of this </s>
funcom_train/1971728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getUpperBound(ReliabilityFunction reliabilityFunction) { if (n < 1) { throw new IllegalArgumentException( "An n-th moment with n < 1 is undefined."); } double upperBound = 0.5; double diff; Function momentFunction = new MomentFunction(reliabilityFunction, n); do { upperBound *= 2; diff = momentFunction.getY(upperBound); } while (diff > epsilon); return upperBound; } COM: <s> returns the calculated upper bound that will be used in the integration </s>
funcom_train/19746403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void registerSearchCase(String query) { StatisticsManager statisticsManager = (StatisticsManager) applicationCtx.getBean(Constants.STATISTICS_MANAGER_BEAN); SearchCase searchCase = new SearchCase(); searchCase.setQuery(query); searchCase.setDate(new Date()); statisticsManager.createSearchCase(searchCase); } COM: <s> registers search case putting info about it into database </s>
funcom_train/16385474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTypedArgumentList() { String argList = ""; String comma = " "; int arg = 0; for (IArgument argument : method.getArguments()) { argList = argList + comma + argument.getType().getFullyQualifiedName() + " arg" + arg; comma = " ,\n"; arg++; } return argList; } COM: <s> formatted list of the arguments types </s>
funcom_train/21656108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtCrearCuentas() { if (btCrearCuentas == null) { btCrearCuentas = new JButton(); btCrearCuentas.setBounds(new Rectangle(560, 65, 140, 30)); btCrearCuentas.setMnemonic('u'); btCrearCuentas.setText("Crear Usuarios"); btCrearCuentas.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ControladorPrincipal.mostarCrearUsuario(); } }); } return btCrearCuentas; } COM: <s> this method initializes bt crear cuentas </s>
funcom_train/130314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run () { try { while (isThreaded) { while (read () != PLAYER_MSGTYPE_SYNCH && isThreaded); if (millis < 0) Thread.yield (); else if (nanos <= 0) Thread.sleep (millis); else Thread.sleep (millis, nanos); } } catch (Exception e) { e.printStackTrace (); } } COM: <s> start the javaclient thread </s>
funcom_train/4780214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getSaveFileAsToolbarButton() { if (saveFileAsToolbarButton == null) { saveFileAsToolbarButton = new JButton(); saveFileAsToolbarButton.addActionListener(actionListener); saveFileAsToolbarButton.setActionCommand(ActionConstants.SAVE_FILE_AS_ACTION); saveFileAsToolbarButton.setIcon(ResourceUtil.saveFileAsIcon); saveFileAsToolbarButton.setToolTipText(ResourceUtil.getString("mainframe.button.saveas.tooltip")); } return saveFileAsToolbarButton; } COM: <s> this method initializes save file as toolbar button </s>
funcom_train/24537850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test8() { CodeExpressionRef exp = createExpression(bp1, false, false, true, getPriority(-1,true)); try { method.updateExpressionOrder(); } catch (CodeGenException e) { e.printStackTrace(); } assertEquals("Failed to add low priority expression to bp1",exp,getExp(8)) ; } COM: <s> add regular priority b1 that is dependant on b2 </s>
funcom_train/47135557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TimeSeries createPriceTimeSeries(List<HistPrice> histPrices, PriceType priceType) { final TimeSeries result = new TimeSeries("Highest"); for (final HistPrice histPrice : histPrices) { result.add(new Minute(histPrice.getStartDate().getTime()),// histPrice.getPrice(priceType)); } return result; } COM: <s> creates a timeseries for the pricetype of the histprices </s>
funcom_train/46056907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void markDeleted(SubscriptionContext scontext) { Publisher p = getPublisher(scontext.getResName(), scontext.getResId(), scontext.getSubidentifier()); // if none found, no one has subscribed yet and therefore no publisher has // been generated lazily. // -> nothing to do if (p == null) return; // else: markDeleted(p); } COM: <s> marks the publisher as deleted </s>
funcom_train/47824570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add_return(Product param){ if (local_return == null){ local_return = new Product[]{}; } //update the setting tracker local_returnTracker = true; java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(local_return); list.add(param); this.local_return = (Product[])list.toArray( new Product[list.size()]); } COM: <s> auto generated add method for the array for convenience </s>
funcom_train/27861117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpdateLevel(boolean b){ updateLevel = b; //update level for every camera if(updateLevel){ for(Camera cam: sceneCameras){ updateLevel(getLayerIndex(cam), cam.getOwningView().getVisibleRegion(cam), cam.getAltitude()); } } } COM: <s> enable disable level updating </s>
funcom_train/37655186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean useThisOrSuper() { Node node = location.jjtGetParent(); if ( node instanceof ASTPrimaryExpression ) { ASTPrimaryExpression primaryExpression = (ASTPrimaryExpression)node; ASTPrimaryPrefix prefix = (ASTPrimaryPrefix) primaryExpression.jjtGetChild(0); if ( prefix != null ) { return prefix.usesSuperModifier() || prefix.usesThisModifier(); } } return image.startsWith(THIS_DOT) || image.startsWith(SUPER_DOT); } COM: <s> simply return if the image start with keyword this or super </s>
funcom_train/45761248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertTextAtIndex(int index, String s){ try { ((XAccessibleEditableText) unoObject).insertText(s, index); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { } catch (com.sun.star.uno.RuntimeException e) { } } COM: <s> inserts the specified string at the given index </s>
funcom_train/4521184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CronogramaElectoral entity) { LogUtil.log("saving CronogramaElectoral 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 cronograma electoral </s>
funcom_train/50892007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParmConstructor() throws Exception { LabyPosition pos = new LabyPosition(2,5,1); assertEquals("Invalid X-Position", 2, pos.getX()); assertEquals("Invalid Y-Position", 5, pos.getY()); assertEquals("Invalid Z-Position", 1, pos.getZ()); } COM: <s> tests the constructor with parameters </s>
funcom_train/6487671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getIntTokenValue( String arg ) throws ConfigException { arg = getArgument( arg ); if ( arg == null || arg.length() == 0 ) { throw new ConfigException( "Missing argument." ); } try { return Integer.valueOf( arg ).intValue(); } catch ( NumberFormatException e ) { throw new ConfigException( "Bad number." ); } } COM: <s> get the token value </s>
funcom_train/35678383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFieldNameFromPropertyName() throws Exception { assertEquals(null, CodeGenUtil.fieldNameFromPropertyName(null)); assertEquals("a", CodeGenUtil.fieldNameFromPropertyName("A")); assertEquals("abc", CodeGenUtil.fieldNameFromPropertyName("Abc")); } COM: <s> check field name from property name </s>
funcom_train/39378849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String stripResourceVersionIndicator(String path) { int versionIndex = path.lastIndexOf(getResourceVersionIndicator(path)); if (versionIndex >= 0) { String extension = path.substring( versionIndex + getResourceVersionIndicator(path).length()); return path.substring(0, versionIndex) + extension; } return path; } COM: <s> removes the version indicator from the specified path </s>
funcom_train/45471499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean remove(final ValidationException exception) { if (exception == null) { return false; } ValidationException previous = this; for (ValidationException current = _next; current != null; previous = current, current = current._next) { if (current == exception) { previous._next = current._next; current._next = null; return true; } } return false; } COM: <s> removes the given validation exception from the current list of </s>
funcom_train/50187059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof WatchPointEvent)) return false; /* if (!super.equals(o)) return false; */ final WatchPointEvent event = (WatchPointEvent) o; if (variable != null ? !variable.equals(event.variable) : event.variable != null) return false; return true; } COM: <s> indicates whether some other watchpoint is equal to this one </s>
funcom_train/14019291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { if (tempInstances != null) { // remove temporary Individuals from DB model for (int i = 0; i < tempInstances.size(); i++) { getTheModel().removeAll((Resource)tempInstances.get(i), null, null); getTheModel().removeAll(null, null, (Resource)tempInstances.get(i)); } tempInstances.clear(); } } COM: <s> call this method to clean up instance data which should not be saved </s>
funcom_train/46453835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Polynomial derivative() { int n = degree(); if(n==0) { double coef[] = {0}; return new Polynomial(coef); } double coef[] = new double[n]; for(int i = 1;i<=n;i++) { coef[i-1] = coefficients[i]*i; } return new Polynomial(coef); } COM: <s> gets the derivative of this polynomial </s>
funcom_train/11008168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddRelationshipRelationshipsPartFailure() { OPCPackage pkg = OPCPackage.create("DELETEIFEXISTS.docx"); PackagePartName name1 = null; try { name1 = PackagingURIHelper .createPartName("/test/_rels/document.xml.rels"); } catch (InvalidFormatException e) { fail("This exception should never happen !"); } try { pkg.addRelationship(name1, TargetMode.INTERNAL, PackageRelationshipTypes.CORE_DOCUMENT); } catch (InvalidOperationException e) { return; } fail("Fail test -> M1.25: The Relationships part shall not have relationships to any other part"); } COM: <s> try to add a relationship to a relationship part </s>
funcom_train/49575014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DimensionDefinitionOrderType getDimensionDefinitionOrderType(DimensionPropertyOrderType order) { if (order.toString().equalsIgnoreCase(DimensionDefinitionOrderType.A.toString())){ return DimensionDefinitionOrderType.A; } else if (order.toString().equalsIgnoreCase(DimensionDefinitionOrderType.D.toString())){ return DimensionDefinitionOrderType.D; } return null; } COM: <s> transforma dimension property order type a un dimension definition order type </s>
funcom_train/8960464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPane() { if (jTabbedPane == null) { jTabbedPane = new JTabbedPane(); jTabbedPane.addTab("FEA", null, getApdlUI(), null); jTabbedPane.addTab("Result", null, getResultUI(), null); } return jTabbedPane; } COM: <s> this method initializes j tabbed pane </s>
funcom_train/6253798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void usage() { if (prog != null) { System.out.print(prog); System.out.print(' '); } System.out.print("[-?]"); // print out options take arguments Iterator it = options.iterator(); while (it.hasNext()) { Opt o = (Opt) it.next(); System.out.print(" [-"); System.out.print(o.opt); if (o.argType != null) { System.out.print(' '); System.out.print(o.argType); } System.out.print("]"); if (o.multi) System.out.print("..."); } // assume other arguments System.out.println(" ..."); } COM: <s> print out a summary of the commands usage inferred from the </s>
funcom_train/29694468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void jumpToNextTarget() { Entity targ = getNextTarget(); if ( null == targ ) return; // HACK : don't show the choice dialog. this.showTargetChoice = false; clientgui.bv.centerOnHex(targ.getPosition()); clientgui.getBoardView().select(targ.getPosition()); // HACK : show the choice dialog again. this.showTargetChoice = true; target(targ); } COM: <s> jump to our next target </s>
funcom_train/1541111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeDash(float[] dash, float phase) throws IOException { // for backward compatibility double[] dd = new double[dash.length]; for (int i = 0; i < dash.length; i++) { dd[i] = dash[i]; } writeDash(dd, (double)phase); } COM: <s> writes out the dash of the stroke </s>
funcom_train/40226266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String asString(final String propPath) throws IllegalArgumentException { IModelProperty prop = null; try { prop = getModelProperty(propPath); } catch(final PropertyPathException e) { throw new IllegalArgumentException(e.getMessage()); } assert prop != null; if(prop instanceof ISelfFormattingPropertyValue == false) { throw new IllegalArgumentException("Non self-formatting property: " + propPath); } return ((ISelfFormattingPropertyValue) prop).asString(); } COM: <s> provides the property value in string form </s>
funcom_train/47514319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MatlabMatrix correlate(Matrix M) { MatlabMatrix corrMat = new MatlabMatrix(numCols, M.numCols()); String command = corrMat.matlabMatContents + " = " + "corr(" + this.matlabMatContents + ", " + ((MatlabMatrix)M).matlabMatContents + ");"; engine.engEvalString(command); return corrMat; } COM: <s> calculates correlation of this matrix and input matrix </s>
funcom_train/8715914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ByteBuffer decodeStream() throws IOException { ByteBuffer outStream = null; // first try the cache if (decodedStream != null) { outStream = (ByteBuffer) decodedStream.get(); } // no luck in the cache, do the actual decoding if (outStream == null) { stream.rewind(); outStream = PDFDecoder.decodeStream(this, stream); } return outStream; } COM: <s> get the decoded stream value </s>
funcom_train/3104284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateItem(long _value, String _name) { int index = columnVector.indexOf(Long.toString(_value)); if (index == -1) { return false; } removeActionListener(cmbListener); insertItemAt(_name,index+1); removeItemAt(index); setSelectedIndex(index); addActionListener(cmbListener); return true; } COM: <s> updates the string thats being displayed </s>
funcom_train/27899364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getListTree(ServletContext app, String request) { ConnPool pool = ROPool.getPool(app); Connection conn; try { conn = pool.getInstance(); } catch (Exception ex) { return ""; } try { return getListTree(conn, request); } finally { pool.returnInstance(conn); } } COM: <s> get a result set as an xml tree </s>
funcom_train/20315423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Character leProximoChar() throws ErroFinalArquivo, IOException { this.esteCaracter = (char)arquivo.read(); if (esteCaracter == null || (int)esteCaracter >= EOF_CHARACTER_VALUE ) { throw new ErroFinalArquivo(Constantes.MENSAGEM_FIM_DO_ARQUIVO, getLinha()); } if (new Character(esteCaracter).toString().equals("\n")) { linha++; } return esteCaracter; } COM: <s> returns the next character can be empty </s>
funcom_train/34318063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { flushBuffer(); long fileSize = fileChannel.position(); int aiffSize = (int) (fileSize - firstChunkPosition); int dataSize = (int) (fileSize - dataPosition); ByteBuffer buffer = ByteBuffer.allocate(Integer.SIZE / 8).order(ByteOrder.LITTLE_ENDIAN); fileChannel.position(totalSizePosition); buffer.putInt(aiffSize); buffer.flip(); fileChannel.write(buffer); fileChannel.position(dataChunkSizePosition); buffer.clear(); buffer.putInt(dataSize); buffer.flip(); fileChannel.write(buffer); fileChannel.close(); } COM: <s> closes the file </s>