__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/651625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateColors() { if (this.fStore != null) { StyledText styledText = getTextWidget(); Color color = null; if (!this.fStore.getBoolean(BACKGROUND_DEFAULT_COLOR)) { color = createColor(BACKGROUND_COLOR, styledText.getDisplay()); } styledText.setBackground(color); if (this.fBackgroundColor != null) { this.fBackgroundColor.dispose(); } this.fBackgroundColor = color; } } COM: <s> updates the previewer colors </s>
funcom_train/17928724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static class ArrayListLineListener implements LineListener { private ArrayList<String> arrayList; public ArrayListLineListener(final ArrayList<String> arrayList) { this.arrayList = arrayList; if (arrayList == null) { throw new IllegalArgumentException("ArrayList 'arrayList' may not be null"); } } public void processLine(String line) { arrayList.add(line); } } COM: <s> collects lines into an array list </s>
funcom_train/13959043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean useEditingContextUnlocker() { Boolean useUnlocker = null; if (ERXProperties.stringForKey("er.extensions.ERXApplication.useEditingContextUnlocker") != null) { useUnlocker = Boolean.valueOf(ERXProperties.booleanForKeyWithDefault("er.extensions.ERXApplication.useEditingContextUnlocker", false)); } return useUnlocker; } COM: <s> decides whether to use editing context unlocking </s>
funcom_train/2269500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float distance(Point2d p) { return (float) ( Math.abs(this.getA() * p.getX() - this.getB() * p.getY() + this.getC()) / Math.sqrt(Math.pow(this.getA(),2) + Math.pow(this.getB(), 2))); } COM: <s> returns the distance to given point </s>
funcom_train/3736887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FilterConfig config) throws ServletException { // Save config filterConfig = config; // Get stylesheet paths (the parameters must be named stylesheet1, stylesheet2, etc.) for (int i = 1; ; i++) { String param = config.getInitParameter("stylesheet" + i); if (param == null) break; stylesheetNames.add("/WEB-INF/" + param); } } COM: <s> initialize the filter </s>
funcom_train/28426480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyLogout(IConnection connection) { StatisticsObserver observer = this.observer; if (observer != null) { // is anonymous login User user = connection.getRequest().getUser(); boolean anonymous = false; if(user != null) { String login = user.getName(); anonymous = (login != null) && login.equals("anonymous"); } observer.notifyLogout(anonymous); } } COM: <s> observer logout notification </s>
funcom_train/38724756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String algorithmBinaryFormat(MatchAlgorithm ma) { if (ma instanceof JavaAlgorithm) { return "Java .class file"; } else if (ma instanceof NativeAlgorithm) { return "Native dynamic library (" + StringEscapeUtils.escapeHtml(OperatingSystem.nativeLibFileExtensionsToString()) + ")"; } else { return "<i>unknown</i>"; } } COM: <s> determines if the given algorithm is an java oder jni plugin </s>
funcom_train/13847503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List processBadLeases(long now) { List bad = null; synchronized (LeaseRenewalManager.this) { for (Iterator iter = bList.iterator(); iter.hasNext(); ) { Entry e = (Entry) iter.next(); if (e.endTime <= now) { iter.remove(); logExpiration(e); removeLeaseInRenew(e); if (e.listener != null) { if (bad == null) bad = new ArrayList(1); bad.add(e); } } } } return bad; } COM: <s> find any expired leases remove them from b list and </s>
funcom_train/13385030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createNewProfile(){ Application app = Application.getInstance(); AppConfigurationOpen config = new AppConfigurationOpen(app.getConfig()); config.setRepositoryName(profileID.getText()); config.setLocalPath(repoPath.getText()); config.setMetaLocal(metaPath.getText()); config.setHostname(locationID.getText()); app.setConfiguration(new AppConfigurationFixed(config)); app.createProfile(); } COM: <s> create new synchronization repository entry in meta db </s>
funcom_train/12195022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConnectCallsCheckStatus() { AbstractRepository repository = createTestableRepository(); repository.terminating = true; repository.terminated = true; try { repository.connect(); fail("The connect() method is not calling checkStatus() or " + "checkStatus() is broken."); } catch (RepositoryException e) { // Success; } } COM: <s> tests that the connect method calls check status </s>
funcom_train/9873950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFontSize(int width) { if (userFontSize==0){ if (width > 16) { width = 16; } }else if(userFontSize==-1){ //fit, so width = width } else { width = userFontSize; } setFont(new Font(userFont, Font.PLAIN, width)); } COM: <s> sets the component font size </s>
funcom_train/21612104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeclarationValidationInForListStatement() { try { interpreter.process( " P1(v1) : for( L(vX), var, P(var) ); " ); fail("Expected failure"); } catch (InterpreterException ie) { assertTrue( "Unespected cause.", ie.getCause() instanceof ValidationException ); } } COM: <s> tests validation in for statement with undefined variables </s>
funcom_train/38552298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while(alive) { try { if(this.timing) { Thread.sleep(this.timerTime); this.listener.notifyTimerThreadListener(); this.timing = false; } else { Thread.sleep(LONG_SLEEP_TIME); } } catch (InterruptedException e) { //Do nothing, thread is awakin } } } COM: <s> runs the thread </s>
funcom_train/15677017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2D vertex(int i) { switch (i) { case 0: return new Point2D(x, y); case 1: return new Point2D(x+width, y); case 2: return new Point2D(x+width, y+height); case 3: return new Point2D(x, y+height); default: throw new IndexOutOfBoundsException(); } } COM: <s> returns the i th vertex of the polygon </s>
funcom_train/13978170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date _addDefaultFileHeader() { final Date now = new Date(); _add(new Expr() { public void doCreate() { String year = MessageFormat.format("{0,date,yyyy}", now); docBegin(); // courtesy of 'com.o3tt3rli' doc(year + " - o3tt3rli.com"); docEnd(); } }.create().toString()); return now; } COM: <s> adds the default file header </s>
funcom_train/48600953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (e.getSource() == button1 || e.getSource() == getFrame().menuNewExtra1) { addDefaultValue("packagereference",packageReference); addDefaultValue("application",application); addDefaultValue("classname",name); actionNew("classcode"); } } COM: <s> manages buttons and menus </s>
funcom_train/8013823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doDataStoreRetrieve(String where) throws Exception { if (where != null && where.length() == 0) where = null; DataStoreBuffer ds = getDataStore(); if (ds instanceof DataStore) ((DataStore) ds).retrieve(where); else if (ds instanceof BeanDataStore) ((BeanDataStore) ds).retrieve(where); } COM: <s> override this method in subclasses to change the way the datastore is retrieved </s>
funcom_train/43523358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setDirectorySelected(final boolean directorySelected) { super.setDirectorySelected(directorySelected); final JFileChooser chooser = this.getFileChooser(); if(directorySelected) { this.approveButton.setText(this.directoryOpenButtonText); this.approveButton.setToolTipText(this.directoryOpenButtonToolTipText); } else { this.approveButton.setText(this.getApproveButtonText(chooser)); this.approveButton.setToolTipText(this.getApproveButtonToolTipText(chooser)); } } COM: <s> property to remember whether a directory is currently selected in the ui </s>
funcom_train/26023911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setColor(Map m, Color color) { if (type == TYPE_GRADIENT) { GraphConstants.setGradientColor(m, color); GraphConstants.setOpaque(m, true); } else if (type == TYPE_LINECOLOR) { GraphConstants.setLineColor(m, color); } else { GraphConstants.setBackground(m, color); GraphConstants.setOpaque(m, true); } } COM: <s> sets the specified color in code map code according to the type </s>
funcom_train/8094554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Capabilities getCapabilities() { Capabilities result = super.getCapabilities(); result.disableAll(); // attributes result.enableAllAttributes(); result.enable(Capability.MISSING_VALUES); // class result.enableAllClasses(); result.enable(Capability.MISSING_CLASS_VALUES); result.enable(Capability.NO_CLASS); return result; } COM: <s> returns the capabilities of this filter </s>
funcom_train/16481862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBoolean() { if (value != null) { if (value instanceof Boolean) { return ((Boolean) value).booleanValue(); } else if (value instanceof String) { return Boolean.parseBoolean((String) value); } } else { return false; } throw new IllegalStateException(); } COM: <s> accessor for the specified property as a boolean </s>
funcom_train/45251617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setContentAndLabelProviders(TreeViewer treeViewer) { treeViewer.setLabelProvider(new PreferenceBoldLabelProvider( filteredTree)); IContributionService cs = (IContributionService) Workbench .getInstance().getActiveWorkbenchWindow().getService( IContributionService.class); treeViewer.setComparator(cs.getComparatorFor(getContributionType())); treeViewer.setContentProvider(new PreferenceContentProvider()); } COM: <s> set the content and label providers for the tree viewer </s>
funcom_train/25248606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLastWeek() { DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); Calendar currDate = Calendar.getInstance(); currDate.add(Calendar.DATE, -7); //go back 7 days currDate.getTime(); return dateFormat.format(currDate.getTime()); } COM: <s> it calculates and returns the lastweeks date 7 days ago from current date </s>
funcom_train/7732683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCompatibleFormat(String s, int expTimeMS, double expLat, boolean expNs, boolean expFix){ Waypoint wp = parser.parse(s); assertEquals(wp.timeMS, expTimeMS); assertTrue(wp.latitude < expLat + 0.000001 && wp.latitude > expLat - 0.000001); // assertEquals(wp.ns, expNs); assertEquals(wp.fix, expFix); } COM: <s> check the correctness of parsing compatible format sentence </s>
funcom_train/17847696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFieldCount() { int count = 0; for (int mIntValue : mIntValues) { if (mIntValue != -1) { count++; } } for (Object mObjectValue : mObjectValues) { if (mObjectValue != null) { count++; } } return count; } COM: <s> gets the number of fields this program has </s>
funcom_train/44824242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryExpression getQueryExprByName (String name) { java.util.Iterator it = queryExprs.iterator(); while (it.hasNext()) { QueryExpression qe = (QueryExpression) it.next(); if (name.equals(qe.getName())) return qe; } return null; } COM: <s> get a query expression based on its name </s>
funcom_train/43318049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*public void setModel(String resourceID,Object model,EventContext eventCtx){ if (model instanceof String){ ModelHandler.processModel(resourceID,(String)model,eventCtx,this); } else if (model instanceof Class){ ModelHandler.processModel(resourceID,(Class)model,eventCtx,this); } else { ModelHandler.processModel(resourceID,model,eventCtx,this); } }*/ COM: <s> set the underlying data model for a resource </s>
funcom_train/11345175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addInterface(String itf) { if (m_interfaces.length > 0) { String[] newInstances = new String[m_interfaces.length + 1]; System.arraycopy(m_interfaces, 0, newInstances, 0, m_interfaces.length); newInstances[m_interfaces.length] = itf; m_interfaces = newInstances; } else { m_interfaces = new String[] { itf }; } } COM: <s> adds the interface to the list </s>
funcom_train/8534309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getChildren() { if (fChildren == null) { fChildren = new ArrayList(); for (Iterator iterator = getChildrenIterator(fNode); iterator .hasNext();) { Object node = iterator.next(); XMLNode xmlNode = newNode(node); if (xmlNode != null) { fChildren.add(xmlNode); } } } return fChildren; } COM: <s> returns a list of all children of this element </s>
funcom_train/14100357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float SVD(Matrix3f rot) { // this is a simple svd. // Not complete but fast and reasonable. // See comment in Matrix3d. double s = Math.sqrt( ( m00*m00 + m10*m10 + m20*m20 + m01*m01 + m11*m11 + m21*m21 + m02*m02 + m12*m12 + m22*m22 )/3.0 ); // zero-div may occur. double t = (s == 0.0 ? 0.0 : 1.0/s); if (rot != null) { this.getRotationScale(rot); rot.mul((float)t); } return (float)s; } COM: <s> performs svd on this matrix and gets the scale and the pure rotation </s>
funcom_train/35108852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface Importer { /** * Get a contour creation record that describes the method contour. If the * method does not have a contour (i.e. it is out of the model), then this * will return null. * * @return a contour creation record or null */ public MethodContourCreationRecord provideContourCreationRecord(); } COM: <s> a builder for an in model target </s>
funcom_train/17465035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setText(String text){ boolean b = false; if (this.isFile() && this.canWrite()){ try { FileOutputStream fos = new FileOutputStream(this); FileChannel fc = fos.getChannel(); ByteBuffer bb = ByteBuffer.allocate(text.getBytes().length); bb.put(text.getBytes()); bb.rewind(); fc.write(bb); fc.close(); fos.close(); b = true; } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } return b; } COM: <s> sets the contents of the file not overwrites only no appending </s>
funcom_train/39285965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Button createCheckBox(Composite parent, String name, SelectionListener listener) { Button button= new Button(parent, SWT.CHECK | SWT.LEFT); button.setText(name); //$NON-NLS-1$ button.setEnabled(true); button.setSelection(true); button.addSelectionListener(listener); GridData gd= new GridData(GridData.FILL, GridData.CENTER, false, false); button.setLayoutData(gd); return button; } COM: <s> creates the controls for the buttons </s>
funcom_train/18807588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RegularTimePeriod previous() { final Day result; final int serial = this.serialDate.toSerial(); if (serial > SerialDate.SERIAL_LOWER_BOUND) { final SerialDate yesterday = SerialDate.createInstance(serial - 1); return new Day(yesterday); } else { result = null; } return result; } COM: <s> returns the day preceding this one </s>
funcom_train/40858087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DocSet convertFilter(Filter lfilter) throws IOException { BitSet bs = lfilter.bits(this.reader); OpenBitSet obs = new OpenBitSet(bs.size()); for(int i=bs.nextSetBit(0); i>=0; i=bs.nextSetBit(i+1)) { obs.fastSet(i); } return new BitDocSet(obs); } COM: <s> converts a filter into a doc set </s>
funcom_train/8012461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSaveButtonDisplay(String name) throws Exception { if (_btnSave != null) { if (_btnSave instanceof HtmlSubmitButton) { ((HtmlSubmitButton) _btnSave).setDisplayName(name); } else { throw new FormException("_btnSave is not a submit button"); } } } COM: <s> sets display name for save button </s>
funcom_train/38993866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Program transformConstraintRule(int max_level, ConstraintRule cr, Set<String> fluents, int ruleIndex) { Program p = new Program(); addComment(p," constraint "+ruleIndex); for (int i = 0; i <= max_level; i++) { Program p2 = transformConstraintRule2(i+"_",cr,fluents,ruleIndex); p.add(p2); } return p; } COM: <s> this method transforms a constraint rule into </s>
funcom_train/21017766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTextElementHit(IElementLocator locator, IMouseEvent event) { boolean result = false; ElementPath path = locator.getElementAt(event.getX(), event.getY(), 1); if ((path != null) && (path.getLength() > 1)) { path.removeLastElement(); result = getTextAreaPath(path) != null; } return result; } COM: <s> checks whether a text element inside a text area is hit or not </s>
funcom_train/7531919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startIdentification() { if (PGridP2P.sharedInstance().getRoutingTable().isNewIdentity()) { // 3.1 Bootstrap phase String keys[] = SecurityHelper.generateKeys(); mPublicKey = keys[0]; mPrivateKey = keys[1]; mPGridP2P.getLocalHost().setPublicKey(mPublicKey); mLeaveJoinPolicy.newlyJoined(); } else { loadPrivateKey(); loadPublicKey(); mLeaveJoinPolicy.join(); } mStorageManager.saveDataTable(); } COM: <s> perform the bootstrap phase or the startup phase of the maintenance </s>
funcom_train/9994243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeSession(final SocketSession session) { if (!mOldSessions.contains(session)) { mOldSessions.add(session); mChannels.get("info").send(session.getName() + " closed session."); for (String channelName : session.getChannels()) { mChannels.get(channelName).remove(session); } } } COM: <s> indicate session as old for removal </s>
funcom_train/48070773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToMap(int key, int etype, int client) { String value; if (clientEntPrefsAsMap.containsKey(key)) { value = clientEntPrefsAsMap.get(key) + ":" + Integer.toString(client) + ":" + etype; clientEntPrefsAsMap.put(key, value); } else { value = Integer.toString(client) + ":" + etype; clientEntPrefsAsMap.put(key, value); } } COM: <s> constructs a map keyed by ticket cost the values are strings of </s>
funcom_train/35848468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPropertySetClass() { Model.getPump().addClassModelEventListener(listener, elem.getClass(), new String[] { "isAbstract", }); Model.getCoreHelper().setAbstract(elem, true); Model.getPump().flushModelEvents(); assertTrue(eventcalled); } COM: <s> tests if a listener that registered for a property set event on </s>
funcom_train/14661732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expression replaceSymbol(Symbol s, Expression expr) { List newList = new List(); for (int i = 0; i < entries.size(); i++) { newList.addEntry(getEntry(i).replaceSymbol(s, expr)); } return newList; } COM: <s> replaces all symbols equal to s in this list with the specified </s>
funcom_train/18594819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Rectangle getDecorationBounds() { Rectangle r = new Rectangle(super.getDecorationBounds()); r.setLocation(COLORED.x, COLORED.y); r.width = Math.min(getComponent().getWidth()-1, SIZE); r.height = Math.min(getComponent().getHeight()-1, SIZE); return r; } COM: <s> decorate all but the outermost pixels up to size max w h </s>
funcom_train/12775121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean handleTrackedPred(final MutableIntSet curTrackedSet, PointerKeyAndState predPkAndState, IFlowLabel label) { if (addAllToP2Set(pkToTrackedSet, predPkAndState, curTrackedSet, label)) { addToTrackedPToWorklist(predPkAndState); return true; } return false; } COM: <s> handle a predecessor when processing some tracked locations </s>
funcom_train/8662562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAload(int n) { if (n < 4) addOpcode(42 + n); // aload_<n> else if (n < 0x100) { addOpcode(ALOAD); // aload add(n); } else { addOpcode(WIDE); addOpcode(ALOAD); addIndex(n); } } COM: <s> appends aload or wide aload lt n gt </s>
funcom_train/1440712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notestGetLog4jLevel() { System.out.println("getLog4jLevel"); String levelName = ""; Level expResult = null; Level result = ServerLogsLevelProvider.getLog4jLevel(levelName); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get log4j level method of class server logs level provider </s>
funcom_train/29690411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DoubleVector add(DoubleVector summand) { DoubleVector sum = new DoubleVector(); if (summand.size() != _vector.size()) return null; for (int i = 0; i < _vector.size(); i++) { sum.add(summand.get(i) + ((Double) _vector.get(i)).doubleValue()); } return sum; } COM: <s> vector addition of two vectors </s>
funcom_train/35727615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText() { try { return new String(data, "UTF-16BE"); } catch (UnsupportedEncodingException uee) { char[] chars = new char[data.length/2]; for (int i = 0, j = 0; i < chars.length && j < data.length; i++, j+=2) { chars[i] = (char)(((data[j] & 0xFF) << 8) | (data[j+1] & 0xFF)); } return new String(chars); } } COM: <s> returns the text contained in this resource </s>
funcom_train/1539869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDetermined() { for (ColorPolynomial<C> s : list) { if (s.isZERO()) { continue; } if (!s.isDetermined()) { System.out.println("not simple determined " + s); System.out.println("condition: " + condition); return false; } if (!condition.isDetermined(s)) { return false; } } return true; } COM: <s> is this colored system completely determined </s>
funcom_train/3722192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int moveUp(AbstractEvent selectedEvent) { int oldIndex = myEvents.indexOf(selectedEvent); if (oldIndex > 0) { AbstractEvent replacing = myEvents.get(oldIndex - 1); myEvents.set(oldIndex - 1, selectedEvent); myEvents.set(oldIndex, replacing); sortInterfaces(); return oldIndex - 1; } return oldIndex; } COM: <s> moves the item up in the list </s>
funcom_train/22718462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeLocale(String x, String y) throws IOException { writeStartElement(FileOpener.XML_ELEMENT_LOCALE, FileOpener.ATTRIBUTE_LOCALE_X, x, FileOpener.ATTRIBUTE_LOCALE_Y, y, true); writeEndElement(FileOpener.XML_ELEMENT_LOCALE, false); } COM: <s> write the locale part of a table element in xml format denoting </s>
funcom_train/48908187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean closeDoor(){ this.bv = this.driver.readCoils(0, this.bitVectorLength, this.unitNumber); this.bv.setBit(0, true); //DO0 //is closing this.bv.setBit(1, false); //DO1 //is stopped //TODO add check this.logger.debug("closeDoor: " + this.driver.writeMultipleCoils(0, this.bv, this.unitNumber)); return true; } COM: <s> gives command to close door </s>
funcom_train/2422558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTransactionIsolactionLevel(TransactionIsolationLevel level) { TransactionIsolationLevel old; synchronized (getDataLock()) { old = getTransactionIsolationLevel(); getData().putInt(TRANSACTION_ISOLATION_LEVEL, level.getCode()); } if (level != old) { firePropertyChange(TRANSACTION_ISOLATION_LEVEL, old, level); } } COM: <s> sets the transaction isolation level for this code database location code </s>
funcom_train/14306731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void filesAdded(ProjectEvent pe) { Log.log(Log.ERROR, this, "Multiple files added!"); for (Iterator i = pe.getAddedFiles().iterator(); i.hasNext(); ) { Log.log(Log.ERROR, this, "File added: " + ((VPTFile)i.next()).getFile().getAbsolutePath()); } } COM: <s> method called when several files have been added to a project </s>
funcom_train/32763802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PhaseMap pullback(PhaseMap mapLeft) { PhaseMap mapNew = new PhaseMap(); mapNew.setZeroOrder( mapLeft.getZeroOrder().plus( this.getZeroOrder() ) ); mapNew.setFirstOrder( mapLeft.getFirstOrder().times( this.getFirstOrder() ) ); return mapNew; } COM: <s> non destructive map pull back that is the complement </s>
funcom_train/47491167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Connection setupConnection(KtnDatagram synpack) throws IOException { lastValidPacketReceived = synpack; state = State.SYN_RCVD; remoteAddress = synpack.getSrc_addr(); remotePort = synpack.getSrc_port(); // sender SYN_ACK sendAck(synpack, true); // skal få ACK KtnDatagram ret = receiveAck(); if (!isValid(ret)) { state = State.CLOSED; throw new IOException("Failed to setup connection"); } state = State.ESTABLISHED; System.out.println("ESTABLISHED incomming"); return this; } COM: <s> sets up the received connection for accept </s>
funcom_train/17967804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getIntervalWidth() { if (isAutoWidth() && !Double.isInfinite(this.autoIntervalWidth)) { // everything is fine: autoWidth is on, and an autoIntervalWidth // was set. return this.autoIntervalWidth; } else { // either autoWidth is off or autoIntervalWidth was not set. return this.intervalWidth; } } COM: <s> returns the full interval width </s>
funcom_train/29706522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshSelectors() { // Template ? if(_template != getBoard().getState().getTemplate()) { _template = getBoard().getState().getTemplate(); TEventManager.getInstance().fireEvent( new TEvent(IEventTypes.TEMPLATE_CHANGED, this, _template)); } _templateSelector.select(_template); _skillSelector.select(getBoard().getState().getSkill()); _autoPlayHandler.onUserAction(); } COM: <s> refresh the selectors according to current state </s>
funcom_train/39378318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void render(HtmlStringBuffer buffer) { buffer.elementStart("div"); buffer.appendAttribute("id", getId()); buffer.appendAttribute("style", "overflow:auto; position:relative; height:" + getChartHeight() + "px; width:" + getChartWidth() + "px;"); buffer.elementEnd(); } COM: <s> render the html representation of the chart </s>
funcom_train/4925109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doLinkToTemplate(int templateIndex) { // Obtain the items to link WoofTemplateOutputModel templateOutput = this.model.getWoofTemplates() .get(templateIndex).getOutputs().get(0); WoofTemplateModel template = this.model.getWoofTemplates().get(B); // Link the template output to template Change<WoofTemplateOutputToWoofTemplateModel> change = this.operations .linkTemplateOutputToTemplate(templateOutput, template); // Validate change this.assertChange(change, null, "Link Template Output to Template", true); } COM: <s> undertakes linking to a </s>
funcom_train/13502907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { switch (state) { case READY: throw new IllegalStateException("File " + tempFile + " hasn't been opened yet."); case CLOSED: throw new IllegalStateException("File " + tempFile + " has been closed already."); default: // OPEN fileWriter.close(); tempFile.renameTo(file); state = State.CLOSED; } } COM: <s> close the writer and rename the file </s>
funcom_train/18739786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RuleGraph computeCreatorGraph() { RuleGraph result = rhs().newGraph(getFullName() + "(creators)"); result.addNodeSet(Arrays.asList(getCreatorNodes())); result.addEdgeSet(Arrays.asList(getCreatorEdges())); return result; } COM: <s> computes a creator graph consisting of the creator nodes together with </s>
funcom_train/9849827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PreparedStatement getPreparedStatement(String sql) throws SQLException { Connection conn = db.getConnection(); PreparedStatement ps = null; try { if(conn.getMetaData().supportsGetGeneratedKeys()) { ps = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); } else { ps = conn.prepareStatement(sql); } } catch (SQLException e) { log.log(Level.SEVERE, "getPreparedStatement failed: " + e.getMessage(), e); throw e; } return ps; } COM: <s> helper function to get a prepared statement </s>
funcom_train/29274977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanDirs(File _workingDir) { for (String s : new String[] { "data.prd", "data.ti", "data.tbp.dir", "data.ebp.dir", "plugin.out", "plugin.log" }) { clean(new File(_workingDir, s)); } } COM: <s> clean the data </s>
funcom_train/29838574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTickMarkPaint(Paint paint) { // check arguments... if (paint == null) { throw new IllegalArgumentException("Axis.setTickMarkPaint(...): null not permitted."); } // make the change (if necessary)... if (!this.tickMarkPaint.equals(paint)) { this.tickMarkPaint = paint; notifyListeners(new AxisChangeEvent(this)); } } COM: <s> sets the paint used to draw tick marks if they are showing </s>
funcom_train/20747945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsEmpty() { System.out.println("isEmpty"); List<ISIMetaData> instance = jaseSearchable.search("no term"); boolean expResult = true; boolean result = instance.isEmpty(); assertEquals(expResult, result); instance = jaseSearchable.search("sample"); expResult = false; result = instance.isEmpty(); assertEquals(expResult, result); } COM: <s> test of is empty method of class org </s>
funcom_train/25924108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDirection(GeoPoint myLocation) { double lonDiff = (getPoint().getLongitudeE6() - myLocation.getLongitudeE6()) / 1E6; double latDiff = (getPoint().getLatitudeE6() - myLocation.getLatitudeE6()) / 1E6; direction = Math.toDegrees(Math.atan2(lonDiff, latDiff)); } COM: <s> sets the direction of this item from the specified location </s>
funcom_train/32955444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addValidationData(HSSFDataValidation dataValidation) { if (dataValidation == null) { throw new IllegalArgumentException("objValidation must not be null"); } DataValidityTable dvt = _sheet.getOrCreateDataValidityTable(); DVRecord dvRecord = dataValidation.createDVRecord(this); dvt.addDataValidation(dvRecord); } COM: <s> creates a data validation object </s>
funcom_train/25217879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printFunctions(PrintStream stream) { for (LSymbol k : functions.keySet()) { stream.print("(defun "); stream.print(k.getValue()); stream.print(" "); functions.get(k).print(stream); stream.println(")"); } } COM: <s> print all functions to a stream </s>
funcom_train/8888006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { DOM.setInnerHTML(RootPanel.get("loading-msg").getElement(), MessageFactory.getInstance().loadobjects() + "..."); ServiceFactory.getOlapService().setApplicationContext(GWT.getHostPageBaseURL(), new AsyncCallback<Boolean>() { @Override public void onSuccess(Boolean arg0) { loadGUI(); } @Override public void onFailure(Throwable arg0) { // TODO Auto-generated method stub } }); } COM: <s> this is the entry point method </s>
funcom_train/3330088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean resolvable() { //-- if resolver is null, the referent must be known, or //-- never will be known, so return true if ( _resolver == null) return true; //-- otherwise check resolver to see if it can resolve the id return (_resolver.resolve(_id) != null); } //-- resolvable COM: <s> determines whether or not the reference can be resolved at the </s>
funcom_train/50220981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shiftTagPosition(AbstractTag tag, Point offset, boolean rebuildContainment) { if (!offset.equals(zeroPoint) && isEditable()) { if (selection.contains(tag.getElement()) && !tag.isSelectionTag()) { // shift the whole selection changeAbsolutePositionofSelection(offset, rebuildContainment); } else { changeAbsolutePosition(tag, offset, rebuildContainment); } } } COM: <s> change temporily the position of the tag and associated element </s>
funcom_train/39171316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAlias(String key, String alias, float score) { key = key.toUpperCase(); Set<AliasData> aliases = data.get(key); if(aliases == null) { aliases = new HashSet<AliasMap.AliasData>(); data.put(key, aliases); } aliases.add(new AliasData(alias, score)); } COM: <s> associate a new alias with the given key </s>
funcom_train/28170766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetControlPoint() { System.out.println("setControlPoint"); int index = 0; Point2D.Double p = null; BezierPath.Node instance = new BezierPath.Node(); instance.setControlPoint(index, p); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set control point method of class org </s>
funcom_train/7626364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int monthDay, int month, int year) { this.allDay = true; this.second = 0; this.minute = 0; this.hour = 0; this.monthDay = monthDay; this.month = month; this.year = year; this.weekDay = 0; this.yearDay = 0; this.isDst = -1; this.gmtoff = 0; } COM: <s> sets the date from the given fields </s>
funcom_train/1301867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KeyedWork getWork(WorkRequest workRequest) { KeyedWork result = null; final DbHandle dbHandle = getDbHandle(workRequest); if (dbHandle != null) { final LongKeyValuePair earliest = dbHandle.popEarliestLong(); if (earliest != null) { result = new KeyedWork(earliest.getKey(), earliest.getPublishable()); } } return result; } COM: <s> get pop work from the beginning of this queue </s>
funcom_train/3556165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(char[] cbuf, final int offset, final int maxChars) throws Exception { int left = Math.min(_length - _readOffset, maxChars); if (left > 0) { System.arraycopy(_data, _offset + _readOffset, cbuf, offset, left); _readOffset += left; return left; } else { return -1; } } COM: <s> this method copies the available data into the given buffer according to </s>
funcom_train/39314748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCloseDialog(){ System.out.println("testCloseDialog"); WindowEvent myevent = new WindowEvent(tester, 4); //AllLayers tester = new AllLayers(f, false, new main_canvas()); tester.closeDialog(myevent); assertFalse(tester.isVisible()); } COM: <s> test of close dialog of class all layers </s>
funcom_train/37820113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean moveTask(AnimationTask task) { Rectangle rect = task.display.getBounds(); float step; step = task.step * calculateAnimationStep(); if ( ((rect.x + step >= task.dest) && (task.step > 0)) || ((rect.x + step <= task.dest) && (task.step < 0)) ) return true; rect.x += step; task.display.setBounds(rect); return false; } COM: <s> executes all move actions of one particular animation task </s>
funcom_train/30188541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTableNoP() { if (! is_NoP) { this.numRegionPix = new int[this.maxOfLabels + 1]; for (int i=0; i <= this.maxOfLabels; i++) numRegionPix[i] = 0; for (int y=0; y < this.ymax; y++) for (int x=0; x < this.xmax; x++){ numRegionPix[ this.tabLabel[x][y] ]++; } } //if } COM: <s> create table number of pixels on region </s>
funcom_train/31538841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readFile(String className, InputStream in) throws IOException { byte[] buff = this.getClassBytes( in ); classes.put( className, this.defineClass(className, buff, 0, buff.length) ); this.log.info("Class loaded: "+className); } COM: <s> load a class object given file passed as parameter </s>
funcom_train/34188755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set_client_stop() { if (udp_c != null) udp_c.setStop(true); this.client_state = false; try { client_thread.join(); } catch (InterruptedException iex) { event.core_message("UDP:E>" + iex.getLocalizedMessage()); } } COM: <s> softly stops client thread </s>
funcom_train/39245174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getExe() { if (dotExe == null) { File gv = Config.getInstance().getGraphvizDir(); if (gv == null) { // default to finding dot in the PATH dotExe = "dot"; } else { // pull dot from the Graphviz bin directory specified dotExe = new File(new File(gv, "bin"), "dot").toString(); } } return dotExe; } COM: <s> returns the executable to use to run dot </s>
funcom_train/51429775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getParameter(Form requestHeaders,String paramName,String description, boolean mandatory) throws ResourceException { Object o = requestHeaders.getFirstValue(paramName); if (o == null) if (mandatory) throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST,String.format("Parameter %s [%s] is mandatory!", paramName,description)); else return null; else return o.toString(); } COM: <s> returns parameter value and throwsan exception if value is missing of mandatory parameter </s>
funcom_train/41575990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Sprite loadSprite(String path, int numberOfFrames) { int frameWidth, frameHeight; Image img = loadImage(path); frameWidth = img.getWidth() / numberOfFrames; frameHeight = img.getHeight(); log(". creating sprite from " + path + " with " + numberOfFrames + " frames (" + frameWidth + "x" + frameHeight + ")"); return new Sprite(img, frameWidth, frameHeight); } COM: <s> load a sprite from a horizontal strip </s>
funcom_train/11641220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getLong(int columnIndex) throws SQLException { Object obj = this.currentRow[columnIndex - 1]; this.setWasNull(obj); try { return (obj == null) ? Long.valueOf(0) : Long.valueOf(obj.toString()); } catch (NumberFormatException e) { throw new SQLException(e.getMessage()); } } COM: <s> gets the long value at the given column index </s>
funcom_train/5373349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSelected (int index) { checkWidget (); /* LVITEM lvItem = new LVITEM (); lvItem.mask = OS.LVIF_STATE; lvItem.stateMask = OS.LVIS_SELECTED; lvItem.iItem = index; int result = OS.SendMessage (handle, OS.LVM_GETITEM, 0, lvItem); return (result != 0) && ((lvItem.state & OS.LVIS_SELECTED) != 0); */ return false; } COM: <s> returns code true code if the item is selected </s>
funcom_train/39468064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testLegalRemap() { final SimpleNamespaceContext testling = new SimpleNamespaceContext(); testling.map("xml", "http://www.w3.org/XML/1998/namespace"); testling.map("xmlns", "http://www.w3.org/2000/xmlns/"); } COM: <s> tests that legal remappings of the default namespaces are accepted </s>
funcom_train/44627512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmptySignalsOnly() { helpTC(" class A { \n" +"//@ requires true;\n" +"//@ signals_only ;\n" +"int m() { return 0; }\n" +"}" ,"/TEST.java:3: Use \\nothing to denote an empty list of exceptions in a signals_only clause",18 ); } COM: <s> tests empty signals only </s>
funcom_train/38416561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExternalScriptsDir() { if( inClientJar ) return null; // this method is for the server side only if( Tools.isWindowsOS() ) return DEFAULT_BIN_PATH+File.separator+WIN_BINARY_DIR+File.separator; else return DEFAULT_BIN_PATH+File.separator+UNIX_BINARY_DIR+File.separator; } COM: <s> to get the path to the os dependent scripts </s>
funcom_train/26016413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFromMergeTable(SIPServerTransaction tr) { if (stackLogger.isLoggingEnabled()) { this.stackLogger.logDebug("Removing tx from merge table "); } String key = ((SIPRequest) tr.getRequest()).getMergeId(); if (key != null) { this.mergeTable.remove(key); } } COM: <s> remove a transaction from the merge table </s>
funcom_train/986819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand() { if (cancelCommand == null) {//GEN-END:|102-getter|0|102-preInit // write pre-init user code here cancelCommand = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|102-getter|1|102-postInit // write post-init user code here }//GEN-BEGIN:|102-getter|2| return cancelCommand; } COM: <s> returns an initiliazed instance of cancel command component </s>
funcom_train/50849504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyPressed(final int keyCode) { for (int pos = 0; pos < keyCount; pos++) { if (keyCode == keyCodes[0][pos]) { keyPress[pos]++; return; } else if (keyCode == keyCodes[1][pos]) { keyPress[pos]--; return; } } } COM: <s> counts one keypress increases count opposites decreases count </s>
funcom_train/37651409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputStream tryToGetStreamTo(String name) throws RuleSetNotFoundException { InputStream in = classLoader ().getResourceAsStream(name); if (in == null) { throw new RuleSetNotFoundException("Can't find ruleset " + name + "; make sure that path is on the CLASSPATH"); } return in; } COM: <s> uses system class loader to get the stream </s>
funcom_train/41739042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void diffCompleted(IMirrorDiff diff) { double executionTime; if(diff instanceof DOMMirrorDiff ) { try{ System.out.println("Saving " + diff.getFileName()); ((DOMMirrorDiff)diff).save(); executionTime = (new GregorianCalendar().getTimeInMillis() - startTimeInMillis) / 1000.0; System.out.println("Done in " + executionTime + " seconds"); }catch(IOException ioe) { System.err.println(ioe.getMessage()); } } } COM: <s> this method is called by a code idiff generator code when </s>
funcom_train/4196824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerExtensions() { extensions.add(new WEB()); extensions.add(new MKV()); extensions.add(new M4A()); extensions.add(new MP3()); extensions.add(new ISO()); extensions.add(new MPG()); extensions.add(new JPG()); extensions.add(new OGG()); extensions.add(new PNG()); extensions.add(new GIF()); extensions.add(new TIF()); extensions.add(new FLAC()); extensions.add(new DVRMS()); extensions.add(new RAW()); } COM: <s> add a known set of extensions to the extensions list </s>
funcom_train/23998647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean increaseJuiceCollectionRate() { int needhoney = checkIncreaseJuiceCollectionRate(); if ( needhoney < 0 ) return false; PlayerProfile prof = Storage.get().getActiveProfile(); if ( needhoney > prof.amountHoney ) return false; prof.juiceCollectionRate++; prof.amountHoney -= needhoney; Storage.get().saveProfiles(); return true; } COM: <s> increase the juice collection rate attribute if possible </s>
funcom_train/36131250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateFields(){ //tfMinGap.setValue(typeParam.reactionTimeDeviation); tfAccelAve.setValue(typeParam.averageAcceleration); tfAccelMax.setValue(typeParam.maxAcceleration); tfDecelAve.setValue(typeParam.averageDeceleration); tfLength.setValue(typeParam.length); tfMaxSightDist.setValue(typeParam.maxSight); tfReactionTime.setValue(typeParam.reactionTime); tfReactionTimeDev.setValue(typeParam.reactionTimeDeviation); } COM: <s> update the fields when the user selects other type of vehicle </s>
funcom_train/1589215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Interval withDurationAfterStart(ReadableDuration duration) { long durationMillis = DateTimeUtils.getDurationMillis(duration); if (durationMillis == toDurationMillis()) { return this; } Chronology chrono = getChronology(); long startMillis = getStartMillis(); long endMillis = chrono.add(startMillis, durationMillis, 1); return new Interval(startMillis, endMillis, chrono); } COM: <s> creates a new interval with the specified duration after the start instant </s>