__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/25576399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Thumbnail fitToScale(double scale) { int w = (int) (icon.getIconWidth() * scale); int h = (int) (icon.getIconHeight() * scale); BufferedImage outImage = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); AffineTransform trans = new AffineTransform(); trans.scale(scale, scale); Graphics2D g = outImage.createGraphics(); g.drawImage(icon.getImage(), trans, null); g.dispose(); setImage(outImage); return this; } COM: <s> the reduction of the icon is proportional to the scale </s>
funcom_train/41279352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParameter(String param, String value) { if (pnames == null) { addParameter(param, value); } else { for (int i = 0 ; i < pnames.length ; i++) { if (pnames[i].equalsIgnoreCase(param)) { pvalues[i] = value; return; } } addParameter(param, value); } } COM: <s> set the parameter to a mime type replace old value if any </s>
funcom_train/15867510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MissionPlayer removeMission(String missionId, String schId) throws MoiseException { SchemeInstance sch = oe.findScheme(schId); if (sch == null) { throw new MoiseConsistencyException("the instance scheme "+schId+" does not exist in the OE"); } return removeMission(missionId, sch); } COM: <s> removes a mission from an agent </s>
funcom_train/45736862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildXmlSchemaUsageStatistics(List<Element> rootElements, SchemaUsageStatistics statistics) { for(Element elem : rootElements){ statistics.totalElements++; if(elem.isUsed()){ statistics.usedElements++; } else{ statistics.notUsedElements++; statistics.notUsedElementList.add(elem); } this.buildXmlSchemaUsageStatistics(elem.getAllChildren(), statistics); } } COM: <s> recursively calculates statistics </s>
funcom_train/48406639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLibraryElementsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MethodLibrary_libraryElements_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MethodLibrary_libraryElements_feature", "_UI_MethodLibrary_type"), SpemxtcompletePackage.eINSTANCE.getMethodLibrary_LibraryElements(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the library elements feature </s>
funcom_train/48213996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void compoundGroupStart(String toolTip) { if (SPObjectUndoManager.this.isUndoOrRedoing()) return; compoundEditStackCount++; if (compoundEditStackCount == 1) { ce = new CompEdit(toolTip); fireStateChanged(); } if (logger.isDebugEnabled()) { logger.debug("compoundGroupStart: edit stack =" + compoundEditStackCount); } } COM: <s> begins a compound edit </s>
funcom_train/43099876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(java.beans.PropertyChangeEvent pce) { // project events if (pce.getPropertyName() .equals(ProjectManager.CURRENT_PROJECT_PROPERTY_NAME)) { TreeModel model = getModel(); if (model != null && model.getRoot() != null) { expandPath(getPathForRow(0)); } } } COM: <s> listens to events coming from the project manager </s>
funcom_train/8132454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectTab(int newTab) { newTab = Math.max(0, Math.min(content.getTabCount() - 1, newTab)); content.selectTab(newTab); formulateSubTitle(); enableButton(BACK_BUTTON, newTab != 0); enableButton(NEXT_BUTTON, newTab < content.getTabCount() - 1); enableButton(FINISH_BUTTON, newTab == content.getTabCount() - 1); } COM: <s> select a new tab step in the wizard show the new tab </s>
funcom_train/25370544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performRequest(String request) { if (request.compareTo("Stop") == 0) { stop(); } else if (request.compareTo("Save model") == 0) { saveModel(); } else if (request.compareTo("Load model") == 0) { loadModel(); } else { throw new IllegalArgumentException(request + " not supported (Clusterer)"); } } COM: <s> perform a particular request </s>
funcom_train/39146421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCaptureDateAsString() { for(int i=0;i<NAME_POSSDATETIME.length;i++) { String k = DIRECTORY_EXIF + sep + NAME_POSSDATETIME[i]; if (jpegTags.containsKey(k)) { JpegMetadataTag jpegTag = (JpegMetadataTag) jpegTags.get(k); return jpegTag.getDescription(); } } return null; } COM: <s> get exif date time time of capture of image as string </s>
funcom_train/136520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isOverwrite() { String[] options = {"Yes", "No"}; if (JOptionPane.YES_OPTION == JOptionPane.showOptionDialog( null, "Overwrite Existing File?", "File Exists", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1])) { return true; } return false; } COM: <s> give the user the choice to overwrite the existing file or not </s>
funcom_train/41265720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean areAllAccountsLoggedIn() { boolean allLoggedIn = true; for( int i = 0; i < this.accounts.size(); i++ ) if( this.accounts.get( i ).isActive() && !this.accounts.get( i ).getProtoSettings().getBooleanData( ProtocolSettings.BOOLEAN_VALUE_LOGGED_IN ) ) { allLoggedIn = false; } return allLoggedIn; } COM: <s> returns the all accounts logged in indicator </s>
funcom_train/20317084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double getRating() { Pattern patternRating = Pattern.compile("<b>([0-9\\.]+)/10</b>"); Matcher matcherRating = patternRating.matcher(html); if (matcherRating.find()) { return Double.valueOf(matcherRating.group(1)); } return 0.0; } COM: <s> returns the movies imdb rating if the open document is a movie page </s>
funcom_train/3083535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModel(TabModel model) { if (model == null) throw new IllegalArgumentException("The TabbedPane model must not be null!"); TabModel oldValue = getModel(); if (oldValue != model) { if (oldValue != null) oldValue.removeChangeListener(this.internalModelListener); } model.addChangeListener(this.internalModelListener); setProperty(PROPERTY_MODEL, model); } COM: <s> sets the code tab model code used to provide the tabbed panes tabs </s>
funcom_train/11653420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invoke(Object[] p_args) { if (invokee == null){ throw new IllegalStateException("Invokee was not provided in constructor"); } // If invokee was provided, then clazz has been set up return doInvoke(clazz, invokee, args != null? args : p_args); } COM: <s> invoke the method with the provided parameters </s>
funcom_train/46874608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setForceDirection(double x, double y, double z) { if (forceDir==null) forceDir = new Vector3d(x,y,z); else { forceDir.setX(x); forceDir.setY(y); forceDir.setZ(z); } forceDir.normalize(); } COM: <s> sets direction of additional external force that influences shape of plant </s>
funcom_train/22760808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawSeparationLine(GC gc, HeaderItem item, int i, int j, final int depthIndent) { int depth = item.depth * depthIndent; int itemH = item.y + item.h; header.drawVerticalLine(gc, item.x, itemH - 3, item.x, item.y + depth + 2); } COM: <s> draws a vertical line before each code header item code </s>
funcom_train/5395848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadByte() throws Exception { System.out.println("readByte"); BlockDataInputStream instance = null; byte expResult = 0; byte result = instance.readByte(); 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 read byte method of class org </s>
funcom_train/44217877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(byte[] b) throws IOException { int bytesRead = 0; while(!auth) try { Thread.sleep(1000); } catch(InterruptedException e) { e.printStackTrace(); } if(in_.available() >= 0) bytesRead = in_.read(b); else disconnect(); if (bytesRead < 0) disconnect(); return bytesRead; } COM: <s> read data from the backend and decrypt it </s>
funcom_train/17789757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChosenViewerFilter(ViewerFilter filter) { if (isEqual(this.chosenViewerFilter, filter)) return; final ViewerFilter[] filters = chosenViewer.getFilters(); for (int i = 0; i < filters.length; i++) { chosenViewer.removeFilter(filters[i]); } chosenViewer.addFilter(filter); } COM: <s> set the filter of the chosen code table viewer code </s>
funcom_train/43097388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetRepresentedOperation() { Object oper = Model.getCoreFactory().createOperation(); Model.getCollaborationsHelper().setRepresentedOperation(elem, oper); Model.getPump().flushModelEvents(); assertEquals(1, model.getSize()); assertEquals(oper, model.getElementAt(0)); } COM: <s> test setting the represented operation </s>
funcom_train/19378065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMapping(Mapping mapping) { String methodName = "addMapping"; ExceptionUtils.checkNull(methodName, "mapping", mapping); Collection fromTypes = mapping.getFroms(); ExceptionUtils.checkNull(methodName, "mapping.fromTypes", fromTypes); Iterator typeIt = fromTypes.iterator(); while (typeIt.hasNext()) { String type = (String)typeIt.next(); this.mappings.put(type, mapping); } } COM: <s> adds a jdbc type mapping object to the set of current mappings </s>
funcom_train/13547776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toDot() { StringBuffer buf = new StringBuffer(80); String dotName = getDotName(); buf.append(dotName); if (getNumDotAttributes() > 0) { buf.append(' ').append(getDotAttributeList()); } // end of if () return buf.toString(); } COM: <s> returns a representation of this node in the language used by at ts </s>
funcom_train/11051595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getCurrentMainSetJacobian(final double[][] dYdY0) { // get current state for this set of equations from the expandable fode double[] p = efode.getSecondaryState(index); int j = 0; for (int i = 0; i < stateDim; i++) { System.arraycopy(p, j, dYdY0[i], 0, stateDim); j += stateDim; } } COM: <s> get the current value of the jacobian matrix with respect to state </s>
funcom_train/2801271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String buildFieldAccessors(RaccoonField pRaccoonField) throws RaccoonException { String fieldType = pRaccoonField.getCollectionType(); if (fieldType == null) { fieldType = pRaccoonField.getType(); } /** Replace Castor type by Standard java type */ //fieldType = getConfig().getString(fieldType, fieldType); String fieldAccessors; fieldAccessors = getCustomBuildFieldAccessors(pRaccoonField, fieldType); return fieldAccessors; } COM: <s> generates the source code to access the bean property </s>
funcom_train/7759706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Status getFileStatus(File file) { Long last = lastCheckMap.get(file); if (last == null) { refreshAsync(file); return Status.UNKNOWN; } if (System.currentTimeMillis() - last >= REFRESH_TIMEOUT) { refreshAsync(file); } return statusMap.get(file); } COM: <s> gets file status from cache </s>
funcom_train/34890175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initForMap() { int maxZoomLevels; // zoom spinner limit maxZoomLevels = this.process.getMapInformation().zoomLevels; this.spLimitZoom.setModel(new SpinnerNumberModel(maxZoomLevels, 1, maxZoomLevels, 1)); // set map name this.tfMapName.setText(this.process.getMapInformation().name); } COM: <s> sets the spinner models for zoom restriction spinners using the max </s>
funcom_train/26086055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Table createTable(final Composite parent, final DataSet dataset) { Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION); TableColumnLayout tableLayout = new TableColumnLayout(); parent.setLayout(tableLayout); table.setHeaderVisible(true); table.setLinesVisible(true); this.createColumns(table, dataset, tableLayout); return table; } COM: <s> creates the table based on the data provider passed to this function </s>
funcom_train/4615386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void clearQueueSet(String sessionId) { dataLock.lock(); try { FrameGroupCommandQueueSet queue = FrameGroupCommandQueueSet.queueSets.get(sessionId); queue.endOfLife(); FrameGroupCommandQueueSet.queueSets.remove(sessionId); } finally { dataLock.unlock(); } } COM: <s> deletes the specified frame group command queue set </s>
funcom_train/4506335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStemmingEnabled(boolean stemmingEnabled) { // If not changing the value, do nothing. if (this.stemmingEnabled == stemmingEnabled) { return; } if (stemmingEnabled) { // Turn of stemming. this.stemmingEnabled = true; analyzer = new StemmingAnalyzer(); } else { // Turn off stemming. this.stemmingEnabled = false; analyzer = new StandardAnalyzer(); } } COM: <s> toggles whether stemming will be applied to keywords </s>
funcom_train/4232750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(TimeRange t) { if (start == t.start) { if (end == t.end) { return 0; } else if (end < t.end) { return -1; } else { return 1; } } else if (start < t.start) { return -1; } else { return 1; } } COM: <s> compare time ranges </s>
funcom_train/19536172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTimerTypes(Collection<TimerType> theTypes) { Map<String, TimerType> old = timerTypes; timerTypes = new HashMap<String, TimerType>(); for (TimerType type : theTypes) timerTypes.put(type.getName(), type); pcs.firePropertyChange(TIMER_TYPE_PROP_NAME, old, timerTypes); } COM: <s> set all of the timer types </s>
funcom_train/21619497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isComplete() { if(getAmount() == 0.0) return false; if(getChange() > 0 && !isChangePermitted()) return false; if(getAmount() - getChange() - getTransaction().getTotal() != 0) return false; return true; } COM: <s> returns whether the necessary fields in this object are complete </s>
funcom_train/2325337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOrthogonal(FloatMatrix2D A) { checkSquare(A); return equals(A.zMult(A, null, 1, 0, false, true), cern.colt.matrix.tfloat.FloatFactory2D.dense.identity(A .rows())); } COM: <s> a square matrix tt a tt is i orthogonal i if </s>
funcom_train/17905547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMinimised(String name) { if (minimisedComponents == null || minimisedComponents.isEmpty()) { return false; } for (int i = 0, k = minimisedComponents.size(); i < k; i++) { TabComponent tab = minimisedComponents.get(i); if (tab.getTitle().equals(name)) { return true; } } return false; } COM: <s> returns if the tab with the specfied name is currently minimised </s>
funcom_train/41164491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CoEditorReviewerPairStudent update(CoEditorReviewerPairStudent entity) { EntityManagerHelper.log("updating CoEditorReviewerPairStudent instance", Level.INFO, null); try { CoEditorReviewerPairStudent result = getEntityManager().merge(entity); EntityManagerHelper.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { EntityManagerHelper.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved co editor reviewer pair student entity and return </s>
funcom_train/8556756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws InitializationException { logger.info( "Late init for JetspeedIdGeneratorService called" ); while( !getInit() ) { //Not yet... try { Thread.sleep( 100 ); logger.info( "Waiting for init of JetspeedIdGeneratorService..." ); } catch (InterruptedException ie ) { logger.error("Exception", ie); } } } COM: <s> this is the lateinitialization method called by the </s>
funcom_train/11735347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected RetentionRegistry getRetentionRegistry() throws RepositoryException { if (!isInitialized()) { throw new IllegalStateException("workspace '" + getName() + "' not initialized"); } synchronized (this) { if (retentionReg == null) { retentionReg = new RetentionRegistryImpl(getSystemSession(), fs); } return retentionReg; } } COM: <s> return manager used for evaluating effect retention and holds </s>
funcom_train/22639528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean archiveTo(String destination, String pathPrefix) { if (!pathPrefix.isEmpty() && !pathPrefix.endsWith("/")) { pathPrefix += "/"; } if (isFile()) { return archiveFileTo(destination, pathPrefix); } else if (isDirectory()) { return archiveDirectoryTo(destination, pathPrefix); } return false; } COM: <s> archives this universal file to the given archive file </s>
funcom_train/36437853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putString(int c, int l, String s, int attributes, InputBulk bulk) { for (int i = 0; i < s.length() && c + i < width; i++) { putChar(c + i, l, s.charAt(i), attributes, bulk); } } COM: <s> put a string at a specific position giving all characters the same </s>
funcom_train/24922952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillInParametersFromBean(Object bean) throws SQLMapperException { try { for (String paramId : template.getParameters()) parameterValues.put(paramId, BeanUtils.getProperty(bean, paramId)); } catch (Exception e) { template.getException(Errors.ERROR_SET_WIRING, e, bean.getClass().getName()); } } COM: <s> try to set the value of query parameters using the given bean </s>
funcom_train/31936961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replace(LayoutPart oldChild, LayoutPart newChild) { remove(oldChild); if (newChild instanceof PartPlaceholder) { add(newChild); } else add(newChild.getLabel(), newChild); // _tabbedPane.addTab(newChild.getLabel(), newChild); } COM: <s> see ivisual container replace </s>
funcom_train/12112084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC12(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.modificaCompetenzeJButton_ActionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c12 modifica competenze jbutton </s>
funcom_train/25711072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTickerThread() { final Thread tickerThread = new Thread("tick tack") { @Override public void run() { while (true) { Mixed.wait(1000); // refactor this method in Core. lots of work :) timer_actionPerformed(); } } }; tickerThread.start(); } COM: <s> start the ticker that makes the mainframe waggle and starts board updates </s>
funcom_train/8813266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDisplayMode(DisplayMode displayMode) { final FlexTable grid = (FlexTable) getWidget(); clear(); // Resetting the CSS style grid.removeStyleName(this.displayMode.getStyleName()); this.displayMode = displayMode; // Applying the CSS style associated with the new display mode grid.addStyleName(displayMode.getStyleName()); refresh(); } COM: <s> defines the display mode of the calendar and perform a redraw </s>
funcom_train/39379635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadDatabase() throws IOException { final DataContext dataContext = DataContext.createDataContext(); // Load users data file loadUsers(dataContext); // Load customers data file loadCustomers(dataContext); // Load customers data file loadSystemCodes(dataContext); // Load post codes data file loadPostCodes(dataContext); dataContext.commitChanges(); } COM: <s> load data files into the database </s>
funcom_train/26115678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean revert(int time) { if (deltas.isEmpty() || deltas.getFirst().getTime() > time) { return false; } final ListIterator<Delta> it = deltas.listIterator(deltas.size()); while (it.hasPrevious()) { final Delta delta = it.previous(); if (delta.getTime() <= time) { break; } Cell.apply(this, delta.getInverse()); it.remove(); } return true; } COM: <s> reverts the map to the given time </s>
funcom_train/46380988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPlacemarkList(PlacemarkList placemarkList) throws ContentRepositoryException, JAXBException { ContentResource resource = getPlacemarksResource(); ByteArrayOutputStream os = new ByteArrayOutputStream(); Writer w = new OutputStreamWriter(os); placemarkList.encode(w); resource.put(os.toByteArray()); } COM: <s> writes the placemark list object to the placemarks </s>
funcom_train/18434000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSeries(Comparable seriesKey) { int seriesIndex = indexOf(seriesKey); if (seriesIndex >= 0) { this.seriesKeys.remove(seriesIndex); this.seriesList.remove(seriesIndex); fireDatasetChanged(new DatasetChangeInfo()); //TODO: fill in real change info } } COM: <s> removes a series from the dataset then sends a </s>
funcom_train/47104043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stealItem(Player plr){ addItem(plr, 1); Messages.getInstance().addMessage("You just stole " + purchaseName + "."); /*if(successfullySteal(plr)){ addItem(plr); Messages.getInstance().addMessage("You just stole " + purchaseName + "."); } else { plr.setCaughtStealing(true); Messages.getInstance().addMessage("You were caught trying to steal. " + "The shopkeeper is coming after you!"); }*/ } COM: <s> calls the add item method and prints a message saying the player </s>
funcom_train/9383607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void bindView(ContactInfo contactInfo) { TextView displayNameView = (TextView) findViewById(R.id.display_name_text_view); displayNameView.setText(contactInfo.getDisplayName()); TextView phoneNumberView = (TextView) findViewById(R.id.phone_number_text_view); phoneNumberView.setText(contactInfo.getPhoneNumber()); } COM: <s> displays contact information name and phone number </s>
funcom_train/2423864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedOperationType(OperationType type) { for (int n = 0; n < getModel().getSize(); ++n) { ComboItem item = (ComboItem) getModel().getElementAt(n); if (item.type == type) { super.setSelectedItem(item); return; } } } COM: <s> sets the currently selected code operation type code </s>
funcom_train/10366167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigInteger getHighestSerialNumber() throws CertificationAuthorityException { if(isLocked()) throw new CertificationAuthorityException("CA is locked."); try { return certStore.getHighestSerialNumber(); } catch (CertificateStoreException e) { throw new CertificationAuthorityException("Error in getting highest serial number for CA.", e); } } COM: <s> this method returns the highest serial number used by the ca </s>
funcom_train/18756424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshNode(MerlotDOMNode node) { int[] path = getLocationPathForNode(node); if (path.length > 0) { int loc = path[path.length-1]; ListSelectionEvent event = new ListSelectionEvent(_table, loc, loc, false); _table.valueChanged(event); _table.repaint(); } } COM: <s> refreshes the node in the tree </s>
funcom_train/46436861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void extendToolGroups(OpModule parentModule) { Iterator<OpToolGroup> it = parentModule.getToolGroups(); while (it.hasNext()) { OpToolGroup parentToolGroup = it.next(); if (!(this.getToolGroupsMap().containsKey(parentToolGroup.getName()))) { this.toolGroups.add(parentToolGroup); } } } COM: <s> extends the tool groups from the parent module </s>
funcom_train/18247356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireShowFullRangeAssemblySequencesChange(Object pSource, boolean pPresentState, boolean pFormerState) { if (pFormerState != pPresentState) { Iterator iter = this.listeners.iterator(); while (iter.hasNext()) { IAssemblyDisplayPreferencesChangeListener listener = (IAssemblyDisplayPreferencesChangeListener) iter.next(); listener.assemblyDisplayPreferencesFullRangeSequenceChange(this, pSource, pPresentState); } } } COM: <s> describe code fire chromatogram openness change code method here </s>
funcom_train/25587333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOptionsCancelCommand() { if (optionsCancelCommand == null) {//GEN-END:|47-getter|0|47-preInit // write pre-init user code here optionsCancelCommand = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|47-getter|1|47-postInit // write post-init user code here }//GEN-BEGIN:|47-getter|2| return optionsCancelCommand; } COM: <s> returns an initiliazed instance of options cancel command component </s>
funcom_train/21952765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String translateName(String pFileName) { String firstTranslate = super.translateName(pFileName); Matcher matcher = sRootDirPattern.matcher(firstTranslate); String returnValue = matcher.replaceAll(Matcher.quoteReplacement(Pooka.getPookaManager().getPookaRoot().getAbsolutePath())); return returnValue; } COM: <s> translates the given file path </s>
funcom_train/17680195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JdbcConverterFactory createJdbcConverterFactory(JdoExtension e) { try { return converterRegistry.getFactory(e.getString()); } catch (Exception x) { throw BindingSupportImpl.getInstance().runtime( "Unable to create JdbcConverterFactory\n" + e.getContext(), x); } } COM: <s> create a jdbc converter factory instance from an extension </s>
funcom_train/21612081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeclarationValidationInIfNegativeStatement() { try { interpreter.process( " P1(v1) : if( Cond(v1), P1(v1), P2(vX) ); " ); fail("Expected failure"); } catch (InterpreterException ie) { assertTrue( "Unespected cause.", ie.getCause() instanceof ValidationException ); } } COM: <s> tests validation in if negative statement with undefined variables </s>
funcom_train/25823839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getJSplitPane() { if (jSplitPane == null) { jSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); jSplitPane.setDividerLocation(200); jSplitPane.setTopComponent(getJTabbedPane()); jSplitPane.setBottomComponent(getJPanelAss()); } return jSplitPane; } COM: <s> this method initializes j split pane </s>
funcom_train/37834266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean questCanBeGiven(final Player player, final Long currenttime) { if (!player.hasQuest(QUEST_SLOT)) { return true; } if (player.getQuest(QUEST_SLOT, 0).equals("done")) { final String questLast = player.getQuest(QUEST_SLOT, 1); final Long time = currenttime - Long.parseLong(questLast); if (time > questdelay) { return true; } } return false; } COM: <s> function decides if quest can be given to player </s>
funcom_train/38158405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QuestionInstance getQuestionInstance(int questionID) { QuestionInstance questionInstance = null; Enumeration enumeration = this.getQuestionInstanceVector().elements(); while (enumeration.hasMoreElements()) { QuestionInstance tempQuestion = (QuestionInstance) enumeration.nextElement(); errorLogger.debug( "checking questioninstance " + tempQuestion.getQuestionID()); if (tempQuestion.getQuestionID() == questionID) { questionInstance = tempQuestion; break; } } return questionInstance; } COM: <s> returns a question instance from this assignment part with a given question id </s>
funcom_train/18445182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setEnum(final PropertyDescriptor pd, final Enum<?>[] values) { EnumItem[] items = new EnumItem[values.length]; for (int i = 0; i < values.length; i++) { Enum<?> e = values[i]; items[i] = new EnumItem( e.toString(), e, e.getClass().getName().replace('$', '.') + "." + e.name() ); } setEnum(pd, items); } COM: <s> sets enum editor properties </s>
funcom_train/2964403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMED(String... parametersMED) { //CONFIG.clear(); med.readArgs(parametersMED); med.buildModel(); objective = null; recursiveTestMED(parametersMED, RESTART_LUBY, RESTART_AFTER_SOLUTION, NOGOOD_RECORDING_FROM_RESTART , BOTTOM_UP , INIT_SHAVING, INIT_DESTRUCTIVE_LOWER_BOUND ); } COM: <s> shake a little bit the optimization options </s>
funcom_train/3970698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XsqlFilterResult generateHql(String sourceXsql, Object filters) { XsqlFilterResult sfr = applyFilters(sourceXsql, filters); String resultHql = sfr.getXsql(); for(Iterator it = sfr.getAcceptedFilters().keySet().iterator();it.hasNext();){ Object key = it.next(); resultHql = StringUtils.replace(resultHql, markKeyStartChar+key+markKeyEndChar, ":"+key); } return new XsqlFilterResult(resultHql,sfr.getAcceptedFilters()); } COM: <s> source xsql hibernate hql key key key key value </s>
funcom_train/25099005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addExtendedElementTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UserAttributeElementType_extendedElementType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UserAttributeElementType_extendedElementType_feature", "_UI_UserAttributeElementType_type"), UserattributesPackage.Literals.USER_ATTRIBUTE_ELEMENT_TYPE__EXTENDED_ELEMENT_TYPE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the extended element type feature </s>
funcom_train/3025794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getSelectionFromIDE() { if (sourceFile == null) { VisualCafe vc = VisualCafe.getVisualCafe(); if (vc == null) { return ""; } sourceFile = vc.getFrontmostSourceFile(); if (sourceFile == null) { return ""; } } Range range = sourceFile.getSelectionRange(); return sourceFile.getRangeTextString(range); } COM: <s> gets the selection from ide attribute of the cafe extract method object </s>
funcom_train/22356150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void selectObjectOnRow(int row) { if (row < 0 || row >= sorter.getRowCount()) throw new IndexOutOfBoundsException(); Object obj = sorter.getValueAt(row, TaskTableModel.OBJECT_POS); if (obj != null) { dispatcher.fire(SelectionEvent.create(this, obj, SelectionEvent.ST_DEFAULT)); } } COM: <s> fire selection event for object associated with row </s>
funcom_train/14012888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void registerClientMessagePartProcessor(ClientMessagePartProcessor processor) { if (clientMessagePartProcessorMap.containsKey(processor.getName())) { throw new IllegalStateException("Processor already registered with name \"" + processor.getName() + "\"."); } clientMessagePartProcessorMap.put(processor.getName(), processor); } COM: <s> registers a code client message part processor code to handle a </s>
funcom_train/3363854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public View create(Element elem) { Document doc = elem.getDocument(); Object i18nFlag = doc.getProperty("i18n"/*AbstractDocument.I18NProperty*/); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { // build a view that support bidi return createI18N(elem); } else { return new WrappedPlainView(elem); } } COM: <s> creates a view from the given structural element of a </s>
funcom_train/26598625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SuperComparator getComparator(boolean[] orderColumns,int[] types) throws DException{ int len = types.length ; SuperComparator[] comparator = new SuperComparator[len]; for(int i = 0 ; i < len ; i++ ) comparator[i] = GetByteComparator.getComparator(types[i],true,null); return new ByteComparator(orderColumns,comparator); } COM: <s> to get super comperator </s>
funcom_train/32057602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsHTMLSupported() { Object[] objs = new Object[5]; ConnectionSet cs = new ConnectionSet(); HashMap map = new HashMap(); Rectangle rec = new Rectangle(); GraphTransferable trans = new GraphTransferable(objs, cs, map, rec); assertEquals("isHTMLSupported failed", trans.isHTMLSupported() != true, true); } COM: <s> this function tests is htmlsupported function of graph transferable class </s>
funcom_train/21317996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TestObject getLeafEntries(GEFPaletteEditPart parent) { TestObject entriesList = null; GEFPaletteEditPart firstChild = parent.getChildPart(0); TestObject grandChildren = firstChild.getChildParts(); if (((Boolean)grandChildren.getProperty("empty")).booleanValue()) { firstChild.unregister(); grandChildren.unregister(); entriesList = parent.getChildParts(); } else { grandChildren.unregister(); entriesList = getLeafEntries(firstChild); firstChild.unregister(); } return entriesList; } COM: <s> returns the leaf children of the specified edit part </s>
funcom_train/37125475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String dump() { java.io.StringWriter sw = new java.io.StringWriter(); java.io.PrintWriter pw = new java.io.PrintWriter(sw); dump(pw, 0, new java.util.LinkedList()) ; return sw.getBuffer().toString() ; } COM: <s> dump the object </s>
funcom_train/45692206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNoteMessageEnabledPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GlobalParameters_noteMessageEnabled_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GlobalParameters_noteMessageEnabled_feature", "_UI_GlobalParameters_type"), EsxPackage.Literals.GLOBAL_PARAMETERS__NOTE_MESSAGE_ENABLED, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the note message enabled feature </s>
funcom_train/23941649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AdvanceCompilationResult verify(AdvanceCompositeBlock flow) { try { synchronized (this) { if (localVerify == null) { localVerify = BasicLocalEngine.createCompiler(); } } return localVerify.verify(flow); } catch (Throwable t) { Exceptions.printStackTrace(t); return new AdvanceCompilationResult(); } } COM: <s> verify the flow with a local compiler </s>
funcom_train/118925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getBounds(CellView value) { if (value instanceof EdgeView && value != null) { setView(value); Rectangle r = getPaintBounds(view); Rectangle label = getLabelBounds(view); if (label != null) r = r.union(label); int b = (int) Math.ceil(lineWidth); r.x = r.x - b; r.y = r.y - b; r.width = r.width + 2 * b; r.height = r.height + 2 * b; return r; } return null; } COM: <s> returns the bounds of the edge shape </s>
funcom_train/23045132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (request instanceof ReconnectRequest) { Object view = ((ReconnectRequest) request).getConnectionEditPart() .getModel(); if (view instanceof View) { Integer id = new Integer(ConceptVisualIDRegistry .getVisualID((View) view)); request.getExtendedData().put(VISUAL_ID_KEY, id); } } return super.getCommand(request); } COM: <s> extended request data key to hold editpart visual id </s>
funcom_train/25099214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBaseRangeablePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RangeableValueType_baseRangeable_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RangeableValueType_baseRangeable_feature", "_UI_RangeableValueType_type"), DatatypesPackage.Literals.RANGEABLE_VALUE_TYPE__BASE_RANGEABLE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the base rangeable feature </s>
funcom_train/10858272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStandardTokenizer() throws Exception { Reader reader = new StringReader("Wha\u0301t's this thing do?"); StandardTokenizerFactory factory = new StandardTokenizerFactory(); factory.init(DEFAULT_VERSION_PARAM); Tokenizer stream = factory.create(reader); assertTokenStreamContents(stream, new String[] {"Wha\u0301t's", "this", "thing", "do" }); } COM: <s> test standard tokenizer factory </s>
funcom_train/18049604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getColor(int percent) { Color out = null; percent = percent % 101; if (getInt(1, 100) <= percent) { out = new Color(null, getInt(0, 255), getInt(0, 255), getInt(0, 255)); } return out; } COM: <s> gets the color </s>
funcom_train/29036590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFaultBehaviourTextPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Block_faultBehaviourText_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Block_faultBehaviourText_feature", "_UI_Block_type"), SystemPackage.Literals.BLOCK__FAULT_BEHAVIOUR_TEXT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the fault behaviour text feature </s>
funcom_train/34122669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int draw(Output outputter, int x, int y, int barWidth, int barHeight) throws OutputException { this.xp = (int) x; this.startX = (int) x; this.yp = (int) y; this.barWidth = (int) barWidth; createCodewords(data.toCharArray(), data.length()); createBits(out, outlen, outrows); encode(out, outrows, outputter); return getBarcodeWidth(); } COM: <s> draw the barcode to the specified outputter at the specified origin </s>
funcom_train/44216614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getListScrollPane() { if (listScrollPane == null) { listScrollPane = new JScrollPane(); listScrollPane.setBounds(new java.awt.Rectangle(260,220,260,220)); listScrollPane.setViewportView(getSubframeList()); } return listScrollPane; } COM: <s> this method initializes list scroll pane </s>
funcom_train/8271195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int download(String file, byte[] buffer) { InputStream in = null; int readed = 0; try { URL url = new URL(file); in = url.openStream(); int cont = 0; while ( (cont = in.read(buffer)) != -1 ) { readed+=cont; } } catch (Exception exception) { exception.printStackTrace(); } finally { try { if (in != null) { in.close(); } } catch (IOException ioe) { } } return readed; } COM: <s> download num bytes to be readed from file </s>
funcom_train/32305558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "Edge " + "from (#"+from().getID()+","+which_succ()+") " + "to (#"+to().getID()+","+which_pred()+")"; } COM: <s> returns a human readable representation of the edge </s>
funcom_train/50382183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Project createProject(String projectName, IPath projectLocation) { Project project = (Project) workspace.getRoot().getProject(projectName); // if project already exists, there is nothing to do if (project.exists()) { return project; } // otherwise create the project in the workspace IProjectDescription description = workspace .newProjectDescription(projectName); description.setLocation(projectLocation); try { project.create(description, null); project.open(null); } catch (CoreException e) { } return project; } COM: <s> creates a new open project with a project description built from the </s>
funcom_train/44834362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setValuesFromParameters(JGComponent submitable, JGCycleParameters cycleParameters) { Iterator iter = submitable.getComponents().iterator(); while (iter.hasNext()) { JGComponent component = (JGComponent) iter.next(); component.setValuesFromParameters(cycleParameters); if (!(component instanceof JGSubmitable)) { setValuesFromParametersForContainer(component, cycleParameters); } } } COM: <s> set property values from cycle parameters to components </s>
funcom_train/49266285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element combineDocElement(Element parentDoc, Element elementToAppendDoc) { if (parentDoc == null) return elementToAppendDoc; if (elementToAppendDoc != null) { String value = DOMUtils.getChildCharacterData(elementToAppendDoc); parentDoc.appendChild(parentDoc.getOwnerDocument().createTextNode(value)); } return parentDoc; } COM: <s> combines documentation elements </s>
funcom_train/15518028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reorderSequences (int [] new_order) { // Reorder genomes Genome [] newGenomes = new Genome [genomes.length]; for (int seqI = 0; seqI < genomes.length; seqI++) { newGenomes[seqI] = genomes[new_order[seqI]]; newGenomes[seqI].setViewIndex (seqI); } genomes = newGenomes; fireReorderGenomeEvent (); } COM: <s> reorder genomes according to given permutation array </s>
funcom_train/15606433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUserPreferenceFile(String newFilename, String oldDescription) { if (!newFilename.equals(userFilename)) { setUserFileDescription(oldDescription); closeOutCurrentUserFile(); userFilename = newFilename; initializeMasterInfoObjects(); commitChanges(false); firePreferencesChangedEvent(); } else { setUserFileDescription(oldDescription); } } COM: <s> this method changes the preference file being used by the program </s>
funcom_train/17731245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTotalMillis() { long total = 0; if (days_ > 0) total += days_ * DAY; if (hours_ > 0) total += hours_ * HOUR; if (minutes_ > 0) total += minutes_ * MINUTE; if (seconds_ > 0) total += seconds_ * SECOND; if (millis_ > 0) total += millis_; return total; } COM: <s> returns the total time elapsed in milliseconds </s>
funcom_train/35020245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean display() { String title = NbBundle.getMessage(SessionPropertiesPanel.class, "LBL_SessionPropertiesTitle"); descriptor = new DialogDescriptor(this, title); descriptor.setHelpCtx(new HelpCtx("jswat-session-properties")); Object value = DialogDisplayer.getDefault().notify(descriptor); return value == DialogDescriptor.OK_OPTION; } COM: <s> build and display a dialog for editing the session properties </s>
funcom_train/31894667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(long ms){ if(health.getCurrentHitPoints() > 0){ timeElapsed += ms; if(timeElapsed % 100 == 0){ health.setCurrentHitPoints(health.getCurrentHitPoints() + 30); } if(timeElapsed > Game.SPAWN_TIME / 2){ timeElapsed = 0; if(!spawnQueue.isEmpty()){ Spawnable spawnObject = spawnQueue.remove(0); spawnObject.setWaitingForSpawn(false); spawnObject.spawn(new Vector2(x * Map.TILESIZE, y * Map.TILESIZE)); } } } } COM: <s> updates the factorys state </s>
funcom_train/23390656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeXMLTree(IXMLElement root, OutputStream out) throws Exception { IXMLWriter writer = new XMLWriter(out); // fix bug# 4551 // write.write(root); for (int i = 0; i < installdata.panels.size(); i++) { IzPanel panel = installdata.panels.get(i); panel.makeXMLData(installdata.xmlData.getChildAtIndex(i)); } writer.write(root); } COM: <s> writes an xml tree </s>
funcom_train/15731202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean containsExtensionNamespace(Definition definition) { Collection nspaces = definition.getNamespaces().values(); Iterator it = nspaces.iterator(); boolean found = false; while (it.hasNext()) { String ns = (String)it.next(); if (ns.equalsIgnoreCase(Jbi4CicsExtension.NS_URI_JBI4CICS)) { found = true; } } return found; } COM: <s> true if the definition contains the code jbi4 cics extension </s>
funcom_train/1447506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getInputStream() throws IOException { if (logger.isDebugEnabled()) { logger.debug("getInputStream() - start"); //$NON-NLS-1$ } if (html == null) { throw new IOException(NULL_HTML); } InputStream returnInputStream = new ByteArrayInputStream(html.getBytes()); if (logger.isDebugEnabled()) { logger.debug("getInputStream() - end"); //$NON-NLS-1$ } return returnInputStream; } COM: <s> this method returns an input stream representing the data and throws </s>
funcom_train/37017213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initGroupsModel() { groupListModel.removeAllElements(); String[] groupsArray = us.listGroups(); for (int i=0; i < groupsArray.length; i++) { UserListItem group = new UserListItem(groupsArray[i], UserListItem.GROUP); groupListModel.addElement(group); } } COM: <s> initialize the group list model </s>
funcom_train/28868499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void direct_write(int address, byte val) { if (address < ioreg_end) ioregs[address].write(val); else if (address < sram_end) segment_data[address] = val; else // attempt to write beyond RAM error_watch.fireBeforeWrite(state, address, val); } COM: <s> the code direct write code method writes the value directly into the array </s>