__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/47906337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepareComponent() { if (!captionSynced || !layoutSynced) { int captionWidth = width - 2 * padding - 2 * arrowDimension; captionLines = TextManager.getLines(caption, captionWidth, font); height = (captionLines.length + 1) * font.getHeight() + 3 * padding; captionSynced = true; layoutSynced = true; } } COM: <s> prepares the layout of the option picker </s>
funcom_train/37009238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double crossCovariance(GVector2 v) { double result = 0.; double mean1=mean(), mean2=v.mean(), covariance=0.; for (int u = 0; u < getSize(); u++) { covariance += (getElement(u)-mean1) * (v.getElement(u)-mean2); } covariance /= getSize(); return covariance; } COM: <s> compute the cross covariance of this vector and another </s>
funcom_train/31910646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isNodeDecrementEvent(InputEvent e) { // TODO: Improve code readability! return ((e.getID() == nodeDecrementEventID) && ((e instanceof KeyEvent) ? ( ((KeyEvent) e).getKeyCode() == nodeDecrementEventCode) : true) && ((e.getModifiers() & nodeDecrementEventModifiers) != 0 )); } COM: <s> returns true if the input event e is a node decrement event </s>
funcom_train/37816424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reinit(){ //k�nnte Exception werfen try{ if (JOptionPane.showConfirmDialog(workScreen, Messages.getString("hoare", "wannaReinit"), Messages.getString("hoare","ttt.reinit"), JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { getController().handleEvent(Event.REINIT); } } catch (Exception e){ getController().handleEvent(Event.REINIT); } } COM: <s> clears the workscreen by performing a reinit </s>
funcom_train/13211166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawImage(int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageIcon img, Graphics g) { if (img!=null) { g.drawImage(img.getImage(), transform(dx1), transform(dy1), transform(dx2), transform(dy2), sx1, sy1, sx2, sy2, img.getImageObserver()); } } COM: <s> draw the image zoom dependent </s>
funcom_train/37026570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchToAdvanced(Experiment exp) { if (exp == null) { exp = m_simplePanel.getExperiment(); } if (exp != null) { m_AdvancedSetupRBut.setSelected(true); m_advancedPanel.setExperiment(exp); } remove(m_simplePanel); add(m_advancedPanel, BorderLayout.CENTER); validate(); repaint(); } COM: <s> switches to the advanced setup mode </s>
funcom_train/39968262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void firePropertyChange(String property, int index, int oldVal, int newVal) { if (propertyChangeSupport != null) { // Log.debug("CMIA : fire "+property+" change from "+oldVal+" to "+newVal); propertyChangeSupport.fireIndexedPropertyChange(property, index, oldVal, newVal); } } COM: <s> a convenience method for the midi channels </s>
funcom_train/32631515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Cookie newTimeZoneCookie() { Cookie cookie = new Cookie(fDomain, "DomTimeZonePrfM", "", fPath, fExpiryDate, false); cookie.setValue("+:6" + ":" + fTimeZone.getValue() + ":" + encode(fDst)); return cookie; // TODO check version number of coockies on different versions of Domino } COM: <s> creates the time zone cookie of lotus domino </s>
funcom_train/9384409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void editNewFile(FolderConfiguration configuration) { // update the configuration UI setConfiguration(configuration, true /*force*/); // enable the create button if the current and edited config are not equals mConfigComposite.setEnabledCreate( mEditedConfig.equals(mConfigComposite.getCurrentConfig()) == false); reloadConfigurationUi(false /*notifyListener*/); } COM: <s> sets the ui for the edition of a new file </s>
funcom_train/45736975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TSField buildField(Element elem) throws OdbgenException { String name = elem.getSingleChild(XmlSchemaElement.NAME.getName()).getContent(); DataType type = new DataType(elem.getSingleChild(XmlSchemaElement.FIELDTYPE.getName()).getContent()); TSField f = new TSField( elem, TSModifier.getPrivateModifier(), name, type ); return f; } COM: <s> constructs a field given a xml schema element </s>
funcom_train/17544204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateDataFromModel(Object model, org.openide.filesystems.FileLock lock, boolean modify) { if (model == null) return; try { getDataCache().setNewData(lock, (JavaSpacesEntry)model, modify); } catch (Exception e) { ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); } } COM: <s> transafers data from model to java source file </s>
funcom_train/4227815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFlags(String flags) { this.usePersistentCookie = false; if (!isVoid(flags)) { try { int flagsInt = Integer.parseInt(flags); this.usePersistentCookie = ((flagsInt % 2) == 1); } catch(Exception e) { throw new WLLException("Error: User: Invalid flags: " + flags); } } } COM: <s> sets the use persistent cookie flag for the user </s>
funcom_train/34641534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IResource getContainer(String containerName) throws CoreException { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IResource resource = root.findMember(new Path(containerName)); if (!resource.exists() || !(resource instanceof IContainer)) { throwCoreException("Container \"" + containerName + "\" does not exist.", IStatus.ERROR); } return resource; } COM: <s> returns the container to the corresponding container name </s>
funcom_train/49627306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initAttachments(final Element caseElement) { ArrayList<File> attachments = new ArrayList<File>(); for (Object attObj : caseElement.getChild("attachments").getChildren( "attachment")) { Element attachment = (Element) attObj; try { attachments.add(new File(new URI(attachment .getAttributeValue("uri")).getPath())); } catch (URISyntaxException e) { throw new ConfigurationException(e); } } } COM: <s> initialises the attachments for a case </s>
funcom_train/2583167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getKeyCount(Comparable group) { if (group == null) { throw new IllegalArgumentException("Null 'group' argument."); } int result = 0; Iterator iterator = this.keyToGroupMap.values().iterator(); while (iterator.hasNext()) { Comparable g = (Comparable) iterator.next(); if (group.equals(g)) { result++; } } return result; } COM: <s> returns the number of keys mapped to the specified group </s>
funcom_train/4644729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEstimatedTimePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Task_estimatedTime_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Task_estimatedTime_feature", "_UI_Task_type"), TassooPackage.Literals.TASK__ESTIMATED_TIME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the estimated time feature </s>
funcom_train/44832809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReadOnly(Boolean readOnly) { Boolean result = (Boolean) ComponentUtils.invokeMethod(getPage().getHandler(), getMethod("onSetReadOnly"), new Object[] {readOnly}); this.readOnly = (result != null) ? result : readOnly; } COM: <s> setter for property read only </s>
funcom_train/23977014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addQueryListener() { RestrictionsPanel panel = _restrictionsDialog.getRestrictionsPanel(); panel.addQueryChangeListener(new QueryChangeListener() { public void queryChanged(QueryChangedEvent e) { removeAll(); _query = e.getQuery(); init(); revalidate(); repaint(); } }); } COM: <s> adds a listener for when the query is modified by the restrictions </s>
funcom_train/4745435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KeyPairInfo describeKeypair(String name) { // initialize the interface Jec2 ec2 = new Jec2(getCredentials().getAwsAccessKeyId(), getCredentials().getSecretAccessKey()); try { return ec2.describeKeyPairs(new String[] { name }).get(0); } catch (Exception ex) { Logger logger = Logger.getLogger(this.getClass().getName()); logger.log(Level.SEVERE, "Describing keypair failed: " + ex.getMessage()); return null; } } COM: <s> gets the properties of a specific keypair </s>
funcom_train/26325325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DisplacementAttackAction findTargetedDisplacement() { for (Enumeration<Entity> i = game.getEntities(); i.hasMoreElements();) { Entity other = i.nextElement(); if (other.hasDisplacementAttack() && (other.getDisplacementAttack().getTargetId() == id)) { return other.getDisplacementAttack(); } } return null; } COM: <s> returns any known displacement attacks should only be one that this </s>
funcom_train/33282930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String jsxGet_name() { final String name = ((DomDocumentType) getDomNodeOrDie()).getName(); if ("html".equals(name) && "FF3".equals(getBrowserVersion().getNickname())) { return "HTML"; } return name; } COM: <s> returns the name </s>
funcom_train/35942637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SearchRow getSearchRow(Row row) { SearchRow r = table.getTemplateSimpleRow(columns.length == 1); r.setPosAndVersion(row); for (int j = 0; j < columns.length; j++) { int idx = columns[j].getColumnId(); r.setValue(idx, row.getValue(idx)); } return r; } COM: <s> create a search row for this row </s>
funcom_train/22675214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillSuperInterfaces(Object obj, Set<Class<?>> set) { Class<?> theClass = obj.getClass(); set.add(theClass); while (theClass != null) { fillSuperInterfaces(theClass, set); theClass = theClass.getSuperclass(); } } COM: <s> fill the set with all interfaces </s>
funcom_train/23636073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPeriodEndPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Period_periodEnd_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Period_periodEnd_feature", "_UI_Period_type"), CescsmodelPackage.Literals.PERIOD__PERIOD_END, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the period end feature </s>
funcom_train/39314641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOkActionPerformed() { System.out.println("testOkActionPerformed"); //ff=new TerpPaint(true); preferences myPrefs=new preferences(ff, true); String s=new String("l"); ActionEvent myEvent=new ActionEvent(s, 1, "hello"); //mypreferences.initComponents(); myPrefs.okActionPerformed(myEvent); assertEquals(myPrefs.isVisible(),false); assertEquals(myPrefs.lastSize.isSelected(),true); } COM: <s> test of ok action performed method of class preferences </s>
funcom_train/18183572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConnectionRequestInfoImpl(ConnectionRequestInfoImpl connectionRequestInfoImpl) { if (log.isTraceEnabled()) { log.trace("ENTER/EXIT: setConnectionRequestInfoImpl(ConnectionRequestInfoImpl [" + connectionRequestInfoImpl + "])"); } this.connectionRequestInfoImpl = connectionRequestInfoImpl; } COM: <s> mutator for the property connection request info impl </s>
funcom_train/20043726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _getDisplayDirectory() { requiredMethod("setDisplayDirectory()") ; String gDir = oObj.getDisplayDirectory() ; log.println("Get dir '" + gDir + "'") ; tRes.tested("getDisplayDirectory()", dir.equals(gDir)) ; } COM: <s> gets the current directory </s>
funcom_train/43283563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modelPartSelected(final ModelPart modelPart) { // select the item in my tree // & expand the parent node treeViewer.expandToLevel(modelPart.get_ParentPart(), 1); treeViewer.reveal(modelPart.get_ParentPart()); treeViewer.setSelection(new StructuredSelection(modelPart), true); // show the properties if (showPropertiesOf(modelPart)) { currentSelection = modelPart; } } COM: <s> a model part was selected e </s>
funcom_train/18807724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RegularTimePeriod next() { final Quarter result; if (this.quarter < LAST_QUARTER) { result = new Quarter(this.quarter + 1, this.year); } else { final Year nextYear = (Year) this.year.next(); if (nextYear != null) { result = new Quarter(FIRST_QUARTER, nextYear); } else { result = null; } } return result; } COM: <s> returns the quarter following this one </s>
funcom_train/12911592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean similar(final NestedSequential other) { if (nested.size() != other.nested.size()) { return false; } for (int i = 0; i < nested.size(); ++i) { final UnknownElement me = (UnknownElement) nested.get(i); final UnknownElement o = (UnknownElement) other.nested.get(i); if (!me.similar(o)) { return false; } } return true; } COM: <s> a compare function to compare this with another nested sequential </s>
funcom_train/18255433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ResetableIterator selectAgentIterator() { ResetableIterator agentIterator; if (anyRandom || (iterationCount < scape.getSize())) { agentIterator = scape.getSpace().safeRandomIterator(); } else { agentIterator = scape.getSpace().safeIterator(); } return agentIterator; } COM: <s> select agent iterator </s>
funcom_train/38542750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setOriginalValueAt(Object value, int row, int column) { if (this.report instanceof ModifiableReport) { try { ((ModifiableReport) this.report).setValueAt(value, row, column); } catch (IllegalArgumentException e) { e.printStackTrace(); } } } COM: <s> this method enables to change the value at the original non sorted row </s>
funcom_train/37448922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FeatureBean getFeatureBean(String ac) { // Look in the componets. for (ComponentBean myComponent : myComponents) { List<FeatureBean> features = myComponent.getFeatures(); for (FeatureBean fb : features) { if (fb.getAc().equals(ac)) { return fb; } } } // Not found the bean, return null. return null; } COM: <s> returns the feature bean for given ac </s>
funcom_train/1719213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readExternal(IDataInput input) { id = input.readInt(); ready = input.readBoolean(); name = input.readUTF(); Object o = input.readObject(); if (o instanceof List) { List list = (List) o; array = new Object[list.size()]; int i = 0; for (Object oo : list) { array[i++] = oo; } } else if (o instanceof Object[]) { array = (Object[]) o; } } COM: <s> deserializes the client state of an instance </s>
funcom_train/20128930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDefaultValue(String column) throws SQLException { if (index.containsKey(column)) { return defaultValue[index.get(column).intValue()]; } else { final SqlExceptionState state = SqlExceptionState.COLUMN_NOT_FOUND; throw new SQLException("Column " + column + " does not exist in resultset.", state.name(), state.code()); } } COM: <s> returns the designated columns default value as a string </s>
funcom_train/1752291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String findHighestPriority(Set<PrioritizedProperty> props) { String result = null; int highestPriority = Integer.MAX_VALUE; for (PrioritizedProperty prop : props) { if (prop.getPriority().intValue() < highestPriority) { highestPriority = prop.getPriority(); result = prop.getProperty(); } } return result; } COM: <s> highest priority is 1 </s>
funcom_train/35442578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testState19() { System.out.println("state19"); Partida partida = null; String traduciendo = ""; Fide instance = new Fide(); int[] expResult = null; int[] result = instance.state19(partida ); 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 state19 method of class controller </s>
funcom_train/31467720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(DivideAssignExpression node) { Node left = node.getLeftExpression(); LeftHandSideModifier mod = NodeProperties.getModifier(left); Object lhs = mod.prepare(this, context); // Perform the operation Object result = InterpreterUtilities.divide (NodeProperties.getType(node), lhs, node.getRightExpression().acceptVisitor(this)); // Cast the result result = performCast(NodeProperties.getType(left), result); // Modify the variable and return mod.modify(context, result); return result; } COM: <s> visits an divide assign expression </s>
funcom_train/24002743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exists(final AsyncCallback<Boolean> callback) { fs.getBooleanAttributes(this, new AsyncCallback<Integer>() { public void onSuccess(Integer attributes) { callback.onSuccess(((attributes & FileSystem.BA_EXISTS) != 0)); } public void onFailure(Throwable t) { callback.onFailure(t); } }); } COM: <s> tests whether the file or directory denoted by this abstract pathname </s>
funcom_train/24001729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nextBytes(byte[] bytes) { for (int i = 0, len = bytes.length; i < len; ) for (int rnd = nextInt(), n = Math.min(len - i, Integer.SIZE/Byte.SIZE); n-- > 0; rnd >>= Byte.SIZE) bytes[i++] = (byte)rnd; } COM: <s> generates random bytes and places them into a user supplied </s>
funcom_train/35108834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface Exporter extends Event.Exporter { /** * Adds the method activation that threw the exception. * * @param thrower the thrower */ public void addThrower(Thrower thrower); /** * Adds the exception that was thrown. * * @param exception the thrown exception */ public void addException(Value exception); /** * Adds whether the thrown exception resulted in a popped stack frame. * * @param framePopped <code>true</code> if the exception went unhandled, * otherwise <code>false</code> */ public void addFramePopped(boolean framePopped); } COM: <s> exporter reverse builder for throw events </s>
funcom_train/10681088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void merge(ClassNameSet anotherSet) { classSet.putAll(anotherSet.classSet); Iterator<String> i = anotherSet.packList.iterator(); while (i.hasNext()) { String newPack = i.next(); Iterator<String> j = packList.iterator(); while (j.hasNext()) { if (newPack.equals(j.next())) { i.remove(); break; } } } packList.addAll(anotherSet.packList); } COM: <s> merge another class name set to the current set </s>
funcom_train/3761714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildConfiguration() { configuration = new Configuration(); /** TODO replace the constants */ configuration.setJdbcDriverClassName("org.postgresql.Driver"); configuration.setJdbcUrl("jdbc:postgresql:olymp3"); configuration.setJdbcUser("sysdba"); configuration.setJdbcPassword("sysdba"); configuration.setMaxSQLExceptions(2); } COM: <s> create configuration object </s>
funcom_train/11647304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class normalize( Class clazz ) { Iterator it = normalizations.iterator(); while ( it.hasNext() ) { ListEntry entry = (ListEntry) it.next(); if ( strickCheck ) { if ( entry.match.equals( clazz ) ) { return entry.substitute; } } else { if ( entry.match.isAssignableFrom( clazz )) { return entry.substitute; } } } return clazz; } COM: <s> normalize given class </s>
funcom_train/3447057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BasicVisualizationInteractor create(ItemRenderer renderer) { for (Class cls = renderer.getClass(); cls != Object.class; cls = cls.getSuperclass()) { Creator c = (Creator)getEntry(cls.getName()); if (c != null) { return c.create(renderer); } } return null; } COM: <s> creates an interactor from a renderer </s>
funcom_train/37021292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rotate(int axis, float angle) { if (axis == X_AXIS) { amat.rotX(Math.toRadians(angle)); } else if (axis == Y_AXIS) { amat.rotY(Math.toRadians(angle)); } else if (axis == Z_AXIS) { amat.rotZ(Math.toRadians(angle)); } } COM: <s> added for compatability with rasmol script </s>
funcom_train/31891072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableCellRenderer getCellRenderer(int row, int column) { if (column == 0) { return rend2; } if (row <= ((BeeTableModel) dataModel).folderCount()) { return rend1; } else { return super.getCellRenderer(row, column); } } COM: <s> for first column and rows with folder nodes overrides default </s>
funcom_train/3493174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processPage(HTMLPage page) { // Extract links in order to change them to absolute URL's new LinkExtractor(page).extractLinks(); page.write(saveDir, "P" + MoreString.padWithZeros(count,(int)Math.floor(MoreMath.log(maxCount, 10)) + 1)); } COM: <s> indexes a code htmlpage code </s>
funcom_train/36033951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getCloseConfirmation() { if (luggage != null) { int retVal = JOptionPane.showConfirmDialog(this, "Are you sure you want to close the current luggage?", "Close Luggage?", JOptionPane.YES_OPTION, JOptionPane.QUESTION_MESSAGE); return retVal == 0; } else { return true; } } COM: <s> ask the user for confirmation before closing a luggage </s>
funcom_train/4135378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(IAction action) { if (window != null && varNode != null && method != null) { RenameLocalVariableRefactoring refactoring = new RenameLocalVariableRefactoring(oldName, varNode, method); refactoring.setCompilationUnit(cu); this.run(new RenameLocalVariableWizard(refactoring, "Rename Local Variable"), window.getShell(), "Rename Local Variable"); } } COM: <s> the action has been activated </s>
funcom_train/22054844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawFillProvPoints(Graphics2D g, ProvinceData prov_inf, Color c) { drawFillProvPoints(g, prov_inf.iPoint_X, prov_inf.iPoint_Y, prov_inf.getXOffset(getArea()), prov_inf.getYOffset(getArea()), c); } COM: <s> draws the borders for the province passed in colour passed </s>
funcom_train/38536584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CspBooleanExpr eq (CspBooleanExpr expr) { if (expr instanceof GenericBooleanExpr) return new GenericBooleanExpr(null, this, BoolOperation.EQ, (BooleanExpr) expr, false); else return new BooleanExpr(null, this, BoolOperation.EQ, (BooleanExpr) expr, false); } COM: <s> creates a boolean expression resulting from setting a boolean expression </s>
funcom_train/20514408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Odontopediatrica entity) { LogUtil.log("deleting Odontopediatrica instance", Level.INFO, null); try { entity = entityManager.getReference(Odontopediatrica.class, entity .getNumeroProntuario()); entityManager.remove(entity); LogUtil.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent odontopediatrica entity </s>
funcom_train/50103967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDisplayCol(int columnNumber){ if (columnNumber >= 0) { displayColList.add("col"+columnNumber); displayCols.add((new ColumnData(columnNumber))); } else throw new IllegalArgumentException("The column number must be greater than 0. It was "+columnNumber); } COM: <s> select a column number to be displayed </s>
funcom_train/39909974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateAnswerSheet(String path, int numberOfQuestions) throws FileNotFoundException, DocumentException { Document answerKeyDocument = new Document(); PdfWriter.getInstance(answerKeyDocument, new FileOutputStream(path + "/answer_sheet.pdf")); answerKeyDocument.open(); answerKeyDocument.add(new Paragraph("1) a b c d e")); answerKeyDocument.close(); } COM: <s> generate answer sheet </s>
funcom_train/49352955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryResult executeQueryWithMetadataReturns(IPersistenceObject persistenceObject, String query, BasicDTO dto) throws BasicException { try{ QueryResult queryResult = persistenceObject.executeQueryWithMetadataReturns(query, dto); return queryResult; }catch(BasicException e){ throw e; }catch(Exception e){ throw BasicException.basicErrorHandling("Error executing query", "errorBOExecutingQuery", e, log); } } COM: <s> execute a query and return a structured results the result query object that </s>
funcom_train/27906226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVariable(Object[] varDef, Object value) throws ParserFailure { if (locals.size() > 0 && ((Map) locals.peek()).containsKey(varDef[0])) { setSubVariable(locals.peek(), varDef, value); } else { setSubVariable(globals, varDef, value); } } COM: <s> sets a variable </s>
funcom_train/50342173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFunctionLockable(int fn, boolean lockable) { if (functionLockables == null) { functionLockables = new boolean[MAXFNNUM+1]; // counts zero for (int i = 0; i < functionLockables.length; i++) functionLockables[i] = true; } functionLockables[fn] = lockable; } COM: <s> define whether a specific function is lockable </s>
funcom_train/802643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBooleanPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SupDataType_boolean_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SupDataType_boolean_feature", "_UI_SupDataType_type"), MzdataPackage.Literals.SUP_DATA_TYPE__BOOLEAN, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the boolean feature </s>
funcom_train/32222909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String check_for_symbol(String line) { logger.debug("Checking if line has a symbol: " + line); int symIndex = line.indexOf(":"); String res = ""; if (symIndex != -1) { logger.debug("Line had a symbol!"); res = line.substring(0, symIndex); return res; } return null; } COM: <s> check the line for a label </s>
funcom_train/28472424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Individual getMember(String individualID) throws PedFileException{ if (!(this.members.containsKey(individualID))){ throw new PedFileException("Individual " + individualID + " in family " + familyName + " is referenced, but appears to be missing."); } return (Individual)this.members.get(individualID); } COM: <s> get the individual with individual id </s>
funcom_train/15926209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test13() throws Throwable { XLocal<String> L = cs.makeLocal("L"); FieldLocs Lf = Effects.makeFieldLocs(L, "f"); XLocal<String> M = cs.makeLocal("M"); FieldLocs Mf = Effects.makeFieldLocs(M, "f"); Effect e1 = new Effect_c(Effects.FUN); e1.addRead(Lf); Effect e = e1.exists(L, M); Effect e2 = new Effect_c(Effects.FUN); e2.addRead(Mf); boolean result = e.equals(e2); assertTrue(result); } COM: <s> is read l </s>
funcom_train/167551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setLinks() { super.setLinks(); if (getParent().getParent() instanceof ICanvas) page = (ICanvas) getParent().getParent(); if (units == null) { units = new Component(); ((Component)units).setValueString(getParent().getShortName() + " (" + getUnits() + ")"); } } COM: <s> set link to the viewer to get scale factor later </s>
funcom_train/3541752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printLog(String description, int roleId, String details) { StringBuffer logText = new StringBuffer(); logText.append("Caller user: "); logText.append(sessionContext.getCallerPrincipal().getName()); logText.append(". Role id: "); logText.append(roleId); logText.append(". " + details); log.info(description); log.info(logText.toString()); } COM: <s> prints log information </s>
funcom_train/32809452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ISQLCode createJoinStatements(List<Guide> guides) { ISQLCode joinTemplate = null; for (int i = guides.size() - 1; i > 0; i--) { Guide guide = guides.get(i); guide.reset(); ISQLCode template = createJoinStatement(guide, guides.get(i - 1)); if (joinTemplate != null) { template.addElement("join", joinTemplate); } joinTemplate = template; } return joinTemplate; } COM: <s> generate a join statement with sub joins for the guides </s>
funcom_train/9407608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void siftUp(int k, ScheduledFutureTask key) { while (k > 0) { int parent = (k - 1) >>> 1; ScheduledFutureTask e = queue[parent]; if (key.compareTo(e) >= 0) break; queue[k] = e; setIndex(e, k); k = parent; } queue[k] = key; setIndex(key, k); } COM: <s> sift element added at bottom up to its heap ordered spot </s>
funcom_train/17026845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void putGlobalElementsIntoDefinitions() { for (BPMNElement element : this.bpmnElements.values()) { /* Signals */ if (element.getNode() instanceof Event && ((Event) element.getNode()).isSignalEvent()) { SignalEventDefinition sigEvDev = (SignalEventDefinition) ((Event) element .getNode()) .getEventDefinitionOfType(SignalEventDefinition.class); sigEvDev.insertSignalIntoDefinitions(definitions); } } /* Messages */ this.retrieveAndInsertMessages(); } COM: <s> retrieves all elements like signals and puts them in the appropriate </s>
funcom_train/13988208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { ResourcesPlugin.getWorkspace().removeResourceChangeListener(this); // dispose actionBarContributor? if (propertySheetPage != null) { propertySheetPage.dispose(); } if (contentOutlinePage != null) { contentOutlinePage.dispose(); } LOG.debug("dispose(): deregistering editor"); ForestPluginActivator.getDefault().deRegisterAsActiveEditor(ioController.getForestFileId(), this); super.dispose(); } COM: <s> the code multi page editor part code implementation of this </s>
funcom_train/8064481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(Hashtable args) { addPort(east = new SamplePort2(this)); addPort(west = new SamplePort2(this)); addPort(north = new SamplePort(this)); addPort(south = new SamplePort(this)); System.err.println("inicializado nodo SampleNode ;)"); _number = _NextNumber++; } COM: <s> initialize a new sample node from the given default node and </s>
funcom_train/29970747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exit() { try { // Session session = factory.openSession(); // Connection conn = session.connection(); // conn.createStatement().execute("SHUTDOWN"); // session.close(); factory.close(); } catch (Exception e) { LOG.error("Error shutting Hibernate down! " + e.getMessage()); } } COM: <s> do some cleanup to ensure that the data is written to disk </s>
funcom_train/34319995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addTag(String name, String value, boolean replace) { for (Iterator iter = tags.iterator(); iter.hasNext();) { JavadocTag tag = (JavadocTag) iter.next(); if (tag.getName().equals(name)) { if (tag.getValue().trim().equals(value)) { return false; } if (replace) { tag.setValue(value); return true; } } } JavadocTag newTag = new JavadocTag(name, value); tags.add(newTag); return true; } COM: <s> adds a new javadoc tag to the javadoc comment </s>
funcom_train/3419005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanState() { // save input as shared state only if // authentication succeeded if (succeeded) { if (storePass && !sharedState.containsKey(NAME) && !sharedState.containsKey(PWD)) { sharedState.put(NAME, username); sharedState.put(PWD, password); } } username = null; password = null; if (krb5PrincName != null && krb5PrincName.length() != 0) krb5PrincName.delete(0, krb5PrincName.length()); krb5PrincName = null; if (clearPass) { sharedState.remove(NAME); sharedState.remove(PWD); } } COM: <s> clean out the state </s>
funcom_train/14430736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void playPlacedTile(boolean resetRoll){ $playedPlaces.add($selectedPlace); $selectedPlace.commit(); if($selectedPlace.isForced()){ $forcedSpacesController.remove($selectedPlace.getForcedSpace().getControlledSide().getHead()); $forcedSpacesController.commit(); } updateControlledSides(); $forcedSpacesController.commit(); $selectedPlace = null; $selectedTile = null; if(resetRoll) { $rolledBackPlaces = new Stack<Place>(); $rolledBackRotations = new Stack<Integer>(); } flush(); } COM: <s> play the tile that was on the board on its current place </s>
funcom_train/13304678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMmVersionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Model_mmVersion_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Model_mmVersion_feature", "_UI_Model_type"), NegotiationPackage.Literals.MODEL__MM_VERSION, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the mm version feature </s>
funcom_train/22236957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void transformGeometryRoundTrip(Transform3D t) { NodeProxy parent = null; final boolean wasLive = isLive(); if (wasLive) { parent = this.detach(false, false); } J3DWorkbenchUtility.transformShape(getJ3DNode(), t); if (!wasLive) { return; } if (parent != null) { parent.attachChild(this, false); } else { attachToRoot(); } } COM: <s> permanently transforms the geometry normals texture coords </s>
funcom_train/16631370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getScrollpane_baumEigenschaften() { if (scrollpane_baumEigenschaften == null) { scrollpane_baumEigenschaften = new JScrollPane(); scrollpane_baumEigenschaften.setLocation(new Point(10, 376)); scrollpane_baumEigenschaften.setSize(new Dimension(360, 400)); scrollpane_baumEigenschaften.setPreferredSize(new Dimension(105, 394)); scrollpane_baumEigenschaften.setViewportView(getBaum_eigenschaften()); } return scrollpane_baumEigenschaften; } COM: <s> this method initializes scrollpane baum eigenschaften </s>
funcom_train/4867585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void println(String str, Object ... args) { String formatedStr = String.format(str, args) + "\n"; this.textArea.append(formatedStr); this.textArea.setCaretPosition(this.textArea.getDocument().getLength()); } COM: <s> prints a line to the console with line feed </s>
funcom_train/9550663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonIcon() { if (jButtonIcon == null) { jButtonIcon = new JButton(); jButtonIcon.setBounds(new Rectangle(489, 155, 118, 17)); jButtonIcon.setText("Browse"); jButtonIcon.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getJTextFieldIcon().setText(getThumbnailPathName()); } }); } return jButtonIcon; } COM: <s> this method initializes j button icon </s>
funcom_train/49409123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveResource() { System.out.println("removeResource"); ResourceType resource = new Resource(); Component instance = new Component(); instance.addResource(resource); ResourceType result = instance.removeResource(resource); assertEquals(result, resource); assertEquals(instance.getResources().size(), 0); } COM: <s> test of remove resource method of class info </s>
funcom_train/50872826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetAttributions() { OMAttribution attribution = new OMAttribution(); attribution.setConstructor(new OMInteger("1")); Hashtable hashtable = new Hashtable(); hashtable.put(new OMSymbol("a","a"), new OMInteger("1")); attribution.setAttributions(hashtable); assertTrue(attribution.getAttributions() != null); } COM: <s> test of set attributions method of class nl </s>
funcom_train/40535417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBadRequestWithExtraPath() { makeAsyncCall(GWT.getModuleBaseURL() + "test/bogus/extra/path", new AsyncCallback() { public void onFailure(Throwable caught) { finishTest(); } public void onSuccess(Object result) { finishTest(); assertEquals(new Integer(1), result); } }); } COM: <s> should fail to find an entry point </s>
funcom_train/14266787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(AlternateLocation al) { boolean ret = super.add(al); if (ret) { ManagedDownloader md = _verifyingFile.getManagedDownloader(); if( md != null ) md.addDownload(al.createRemoteFileDesc((int)getSize()),false); } return ret; } COM: <s> adds the alternate location to this file desc and also notifies </s>
funcom_train/43916482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoProjection() { Filter idFilter = ff.id(Collections.singleton(ff.featureId("testType:1"))); Filter clone = (Filter) idFilter.accept(reprojector, null); assertNotSame(idFilter, clone); assertEquals(idFilter, clone); } COM: <s> make sure it does not break with non spatial filters </s>
funcom_train/9293815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getTotalAmount(){ double total = 0; for(SalesLine line: Sale.getInstance().getList()){ total+=(line.getQty() * mainCtr.getItemCtr().getItem(line.getId()).getPrice()); } return total; } COM: <s> this method returns the total amount of the sale </s>
funcom_train/9535782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveConfiguration() { Configuration config = new Configuration(); config.setClientAddress(jTextFieldClientAddress.getText()); config.setClientPort(jTextFieldClientPort.getText()); config.setServerAddress(jTextFieldServerAddress.getText()); config.setServerPort(jTextFieldServerPort.getText()); config.storeConfiguration(); } COM: <s> this method saves the current configuration </s>
funcom_train/26104014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void replyToMessage(final boolean replyToThread) { exitingKeyguardSecurely = true; ManageKeyguard.exitKeyguardSecurely(new LaunchOnKeyguardExit() { public void LaunchOnKeyguardExitSuccess() { Intent reply = smsPopupPager.getActiveMessage().getReplyIntent(replyToThread); SmsPopupActivity.this.getApplicationContext().startActivity(reply); replying = true; myFinish(); } }); } COM: <s> reply to the current message start the reply intent </s>
funcom_train/3155758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteTemporalDatabase() throws IOException { if (_delete_db) { if (_temporalDB != null) { _logger.info(L3Constants.LOG_MSG_DELETE_TEMP_DB); _temporalDB.delete(); _dbFile.delete(); SystemUtils.deleteFileTree(_dbDir); _logger.info(ProcessorConstants.LOG_MSG_SUCCESS); } } } COM: <s> deletes the temporal database if specified to do so </s>
funcom_train/47546506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getClientArea () { checkWidget (); forceResize (); int /*long*/ clientHandle = clientHandle (); int x = OS.GTK_WIDGET_X (clientHandle); int y = OS.GTK_WIDGET_Y (clientHandle); int width = 0, height = 0; if ((state & ZERO_SIZED) == 0) { width = OS.GTK_WIDGET_WIDTH (clientHandle); height = OS.GTK_WIDGET_HEIGHT (clientHandle); } return new Rectangle (x, y, width, height); } COM: <s> returns a rectangle which describes the area of the </s>
funcom_train/37422405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Level findLevelByName(String name) throws ClassNotFoundException, SQLException { String tSql = "select * from level where name = '" + Utility.Replace(name) + "'"; Vector tVect = findLevelByQuery(tSql); if (tVect.size() > 0) return (Level) tVect.firstElement(); else return null; } COM: <s> finds a level in the database using its name </s>
funcom_train/44389316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(int b) throws IOException { if (pos >= buf.length) { byte[] newBuf = new byte[buf.length + INCR_BUFFER_LEN]; System.arraycopy(buf,0,newBuf,0,buf.length); buf = newBuf; } buf[pos] = (byte) (b & 0xff); pos++; } COM: <s> write a byte of data to the internal buffer </s>
funcom_train/28750279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setControllanesonplate(String newVal) { if ((newVal != null && this.controllanesonplate != null && (newVal.compareTo(this.controllanesonplate) == 0)) || (newVal == null && this.controllanesonplate == null && controllanesonplate_is_initialized)) { return; } this.controllanesonplate = newVal; controllanesonplate_is_modified = true; controllanesonplate_is_initialized = true; } COM: <s> setter method for controllanesonplate </s>
funcom_train/28548966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAttributes(IParsedSentence aPS) { // this only shows the sentence, so the begin index should become 0. styleInfoUpdater.setOffset((int) -aPS.getSpan().getBeginIndex()); styleInfoUpdater.visit(aPS); final IParsedResultIterator resultIterator = new ParsedResultIterator(); resultIterator.transverse(aPS, styleInfoUpdater); } COM: <s> uses the default attribute updater to set attributes based on a ps </s>
funcom_train/34709162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getJListFiles() { if (jListFiles == null) { jListFiles = new JList(); jListFiles.setMinimumSize(new Dimension(223, 400)); jListFiles.setPreferredSize(new Dimension(223, 500)); jListFiles .setSelectionMode(DefaultListSelectionModel.SINGLE_SELECTION); jListFiles .addListSelectionListener(new ListFilesListSelectionListener()); } return jListFiles; } COM: <s> this method initializes j list files </s>
funcom_train/31360062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // Monitor for close message from server api.psap.getData(PSAPConnection.CLOSE); /* // Close connection api.psap.shutdown(); try { // api.in.close(); } catch (Exception e) { } // try try { // api.out.close(); } catch (Exception e) { } // try try { // api.psap.close(); } catch (Exception e) { } // try */ // Set Connected state // api.connected = false; api.close(); // Notify shutdown listener if (api.shutdownListener != null) { api.shutdownListener.notifyClose(); } // if } // run() COM: <s> runtime thread that watches for a close event from the server </s>
funcom_train/12831615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openXPathDialog() { XpathDialog dialog = new XpathDialog(getShell(), new LabelProvider(), file, Messages.xpathPopup); if (dialog.getReturnCode() == 0) { Object[] selected = dialog.getResult(); if (selected.length == 1) { tXpath.setText(selected[0].toString()); } } } COM: <s> selection dialog to select the xpath for the element to encrypt </s>
funcom_train/46458129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private XMLControlElement decrypt(XMLControlElement control) { if (control.getObjectClass() != Cryptic.class) return control; Cryptic cryptic = (Cryptic)control.loadObject(null); // get the decrypted xml, make new control and set password String xml = cryptic.decrypt(); XMLControlElement decrypted = new XMLControlElement(xml); return decrypted; } COM: <s> decrypts the specified xmlcontrol </s>
funcom_train/5029599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveFilters(Class<?> targetClass, List<XProcessFilter> filters) { StringBuffer buf = new StringBuffer(); for (XProcessFilter filter : filters) { buf.append((filter.isEnabled() ? ON : OFF) + DELIM); } store.setValue(targetClass.getCanonicalName() + DELIM + FILTERS, buf.toString()); } COM: <s> save the filter status to the preference store </s>
funcom_train/12169874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Element openScriptElement(ScriptAttributes scriptAttributes, DOMOutputBuffer dom) { Element element = dom.openElement("script"); element.setAttribute("type", scriptAttributes.getType()); this.isElementPreFormatted = dom.isPreFormatted(); dom.setElementIsPreFormatted(true); return element; } COM: <s> opens script element with provided attributes </s>
funcom_train/28499221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeColor() { ProgressLogger.getInstance().debug("Enter changeColor()"); counter = (++counter) % colorCombos.length; InputWindow.getInstance(null).setBackColor( Color.decode(colorCombos[counter][0])); InputWindow.getInstance(null).setForeColor( Color.decode(colorCombos[counter][1])); ProgressLogger.getInstance().debug("Exit changeColor()"); } COM: <s> this function changes forgroung and background color </s>
funcom_train/29387505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PageSupport getPreviousPage() { // This assumes that the stack is LIFO and appends at the end of its array // as of java.util.Stack v1.25 int historyLen = pageHistory.size(); if (historyLen > 1) { return getPage((String) pageHistory.elementAt(historyLen - 2)); } return null; } COM: <s> get the page previously displayed by the content target container </s>