__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/795281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton1() { if (jButton1 == null) { jButton1 = new JButton(); jButton1.setText("Resetta"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { jShowBack.setBackground( null ); resetBack = true; } }); } return jButton1; } COM: <s> this method initializes j button1 </s>
funcom_train/49469098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Date getDateValueForSql(Date d) throws Exception { switch(restrictionType){ //NOPMD don't bother me with breaks, i have returns case Filter.IS_NULL : case Filter.IS_NOT_NULL : return null; case Filter.EQUALS : case Filter.DIFFERENT : case Filter.LOWER : case Filter.LOWER_OR_EQUALS : case Filter.HIGHER : case Filter.HIGHER_OR_EQUALS : return DateHelper.roundDownLocal(d); default: throw new Exception("Unknown comparison type"); } } COM: <s> generate the sql date that will be put in the prepared statement </s>
funcom_train/25646318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String next(int n) throws JSONException { if (n == 0) { return ""; } char[] buffer = new char[n]; int pos = 0; while (pos < n) { buffer[pos] = next(); if (end()) { throw syntaxError("Substring bounds error"); } } return new String(buffer); } COM: <s> get the next n characters </s>
funcom_train/41759188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|101-getter|0|101-preInit // write pre-init user code here backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|101-getter|1|101-postInit // write post-init user code here }//GEN-BEGIN:|101-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/6441294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void do500(HttpRequest request, HttpResponse response, String message) { response.reset(500, "Internal Server Error."); java.io.PrintWriter body = response.getPrintWriter(); body.println("<html>"); body.println("<body>"); body.println("<h3>Internal Server Error</h3>"); body.println("<br><br>"); if (message != null) { StringTokenizer msg = new StringTokenizer(message, "\n\r"); while (msg.hasMoreTokens()) { body.print(msg.nextToken()); body.println("<br>"); } } body.println("</body>"); body.println("</html>"); } COM: <s> creates and internal server error page </s>
funcom_train/43245625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetConfAddressType() { System.out.println("setConfAddressType"); String confAddressType = ""; AddlDemographicsDG1Object instance = new AddlDemographicsDG1Object(); instance.setConfAddressType(confAddressType); // 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 conf address type method of class org </s>
funcom_train/25212892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Count getCount(String name) { if (countMap != null) { Count count = countMap.get(name); if (count != null) { return count; } } if (next != null) { return next.getCount(name); } Count count = new Count(0); if (countMap == null) { countMap = new HashMap<String, Count>(); } countMap.put(name, count); return count; } COM: <s> getter for the named count register in the current group </s>
funcom_train/11379107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void failJob(Job job) throws IOException { // assume no files have been fixed LOG.error("DistBlockFixer job " + job.getJobID() + "(" + job.getJobName() + ") finished (failed)"); for (CorruptFileInfo fileInfo: jobIndex.get(job)) { fileInfo.fail(); } numJobsRunning--; } COM: <s> handle a failed job </s>
funcom_train/15811677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Context doSIPreqProcess(Context context, SIPTransactionUser tu, TransactionEntry trnsct) { switch (trnsct.getTransactionType()) { case TRANSACTIONTYPE_INV_UAC: case TRANSACTIONTYPE_NONINV_UAC: return doSIPreqUACProcess(context, tu, trnsct); /* NOTREACHED */ case TRANSACTIONTYPE_INV_UAS: case TRANSACTIONTYPE_NONINV_UAS: return doSIPreqUASProcess(context, tu, trnsct); /* NOTREACHED */ default: break; } /* * XXX Invalid statement. */ return null; } COM: <s> max forwards handler for sip request message </s>
funcom_train/38416366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addConfig( ServerConfig newConfig ) { if (configs == null) { configs = new ServerConfig[1]; configs[0] = newConfig; } else { ServerConfig myConfigs[] = new ServerConfig[configs.length+1]; System.arraycopy(configs, 0, myConfigs, 0, configs.length); myConfigs[configs.length] = newConfig; configs = myConfigs; } } COM: <s> to add a new server config to our list </s>
funcom_train/10505859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void mergeAll(ModuleDescriptor parent) { ModuleRevisionId sourceMrid = parent.getModuleRevisionId(); mergeInfo(parent); mergeConfigurations(sourceMrid, parent.getConfigurations()); mergeDependencies(parent.getDependencies()); mergeDescription(parent.getDescription()); mergeLicenses(parent.getLicenses()); } COM: <s> merge everything from a given parent </s>
funcom_train/46125627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CPTreeDataModel buildTreeDataModel() { String orgaIdentifier = getFirstOrganizationInManifest().getIdentifier(); // For the root node id of the ext-js tree we use an md5 hash. This is to // make sure that no unwanted characters are handed over to JS. String rootNodeId = Encoder.encrypt(orgaIdentifier); CPTreeDataModel treeData = new CPTreeDataModel(orgaIdentifier, rootNodeId); treeData.setContentPackage(this); return treeData; } COM: <s> return the tree data model used for gui tree </s>
funcom_train/30196986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetLuogoRecapito() { System.out.println("setLuogoRecapito"); String luogoRecapito = "test"; Persona instance = new Persona(); instance.setLuogoRecapito(luogoRecapito); String result = instance.getLuogoRecapito(); assertEquals("test", result); } COM: <s> test of set luogo recapito method of class com </s>
funcom_train/36659450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendLoginFailureAndDisconnect() { // TBD: identity may be null. Fix to pass a non-null identity // when scheduling the task. scheduleNonTransactionalTask( new AbstractKernelRunnable("SendLoginFailureMessage") { public void run() { sendLoginProtocolMessage( loginFailureMessage, Delivery.RELIABLE, false); handleDisconnect(false, false); } }); } COM: <s> sends the login failure protocol message to the client and </s>
funcom_train/11391184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getPos() throws IOException { if (!(in instanceof Seekable) || !(in instanceof PositionedReadable)){ //This way of getting the current position will not work for file //size which can be fit in an int and hence can not be returned by //available method. return (this.maxAvailableData - this.in.available()); } else{ return ((Seekable)this.in).getPos(); } } COM: <s> this method returns the current position in the stream </s>
funcom_train/43402619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QMatrix scaled(Rational scalar) { QMatrix m = new QMatrix(rows, columns); for (int r = 0; r < rows; r++) { for (int c = 0; c < columns; c++) { m.coefficients[r][c] = scalar.product(coefficients[r][c]); } } return m; } COM: <s> returns this matrix scaled by code scalar code </s>
funcom_train/39967123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void closeConnectionFrom(AudioOutput output ) { String name = output.getName(); String location = output.getLocation(); AudioConnection connection = getConnectionFrom(name, location); if ( connection == null ) { System.err.println("Failed to close connection from "+name+" @ "+location); return; } closeConnection(connection); } COM: <s> auto disconnect an audio output from an audio mixer strip </s>
funcom_train/41041027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() { if (mData != null && mData.length != 0) { String url = mSettings.getString("map_provider_name", S.OpenCycleMapsURL); TileFactory.SaveTile(url, mData, X, Y, Z); } } COM: <s> save the tile on the local source </s>
funcom_train/29696162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rollInitiative() { if(game.getOptions().booleanOption("individual_initiative")) { TurnOrdered.rollInitiative(game.getEntitiesVector()); } else { // Roll for initative on the teams. TurnOrdered.rollInitiative(game.getTeamsVector()); } transmitAllPlayerUpdates(); } COM: <s> rolls initiative for all the players </s>
funcom_train/14170781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(Set<IExtensionPoint> extensionPoints) { synchronized (otherPlugins) { if (extensionPoints.contains(HubListReaderExtensionPoint .getInstance())) { for (IPlugin otherPlugin : HubListReaderExtensionPoint .getInstance().getPlugins()) { if (!this.equals(otherPlugin)) { otherPlugins.add((IHubListReaderPlugin) otherPlugin); } } } } } COM: <s> this scans all other plugins registered with </s>
funcom_train/38577994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createInitialLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); layout.setEditorAreaVisible(true); layout.setFixed(true); IFolderLayout folderleft = layout.createFolder( "WC.folderleft", //id IPageLayout.LEFT, //placement 0.25f,//largeur editorArea); //id Perspective folderleft.addView( WeightCALListView.ID); IFolderLayout folderright = layout.createFolder( "WC.folderright", //id IPageLayout.BOTTOM, //placement 0.75f,//largeur editorArea); //id Perspective folderright.addView(WeightCALLogView.ID); } COM: <s> this class creates and initializes the perspectives for stati cal tool </s>
funcom_train/18808378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof HistogramDataset) { final HistogramDataset dataset = (HistogramDataset) obj; final boolean b0 = ObjectUtils.equal(dataset.type, this.type); final boolean b1 = ObjectUtils.equal(dataset.list, this.list); return b0 && b1; } return false; } COM: <s> tests this dataset for equality with an arbitrary object </s>
funcom_train/46384454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeMetaData() throws IOException, JAXBException { /* Check to see if the cell is no longer valid */ super.checkInvalid(); /* Make sure the thread has write permissions */ this.wfsRef.get().checkOwnership(); if (this.getVersion() != null) { this.getVersion().encode(this.delegate.getWriter(WFSRootDirectory.VERSION)); } } COM: <s> writes the wfs meta information e </s>
funcom_train/14239149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getAttribute(String name) { Property property = getProperty(name); if (property == null) { return null; } if (property instanceof Attribute) { Attribute attribute = (Attribute) property; return attribute.getValue(); } else { throw new JpaUnitException(String.format( "The property '%s' of %s is not an attribute", name, this)); } } COM: <s> returns the value of the attribute with the given name </s>
funcom_train/10980985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSimpleString() { Object value = dynaForm.get("stringProperty"); assertNotNull("Got a value", value); assertTrue("Got correct type", (value instanceof String)); assertEquals("Got correct value", (String) value, "This is a string"); } COM: <s> test get simple property on a string property </s>
funcom_train/7418526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toShape(Shape shape) { shape.setResourceId(this.getId()); shape.putProperty("name", (this.getName()!= null ? this.getName() : "")); for(Edge edge : this.getOutgoing()) { shape.getOutgoings().add(new Shape(edge.getId())); } } COM: <s> basic method to set properties on the shape object </s>
funcom_train/22555114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getQuestionIndex(Question q) { if (questionURIs==null) return -1; for (int i=0;i<questionURIs.size();i++) { Question q2 = (Question) QAFactory.getResource((String)this.questionURIs.get(i)); if (q2.equals(q)) return i; } return -1; // no index found } COM: <s> returns the index of the given question object from the vector </s>
funcom_train/39193816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkSuffixes(String path, Iterable<ResourceSpec> specs) { String suffix; if (_suffixMismatchStrategy != SuffixMismatchStrategy.IGNORE && (suffix = getSuffix(path)) != null) { for (ResourceSpec spec : specs) { if (!Strings.isEqual(suffix, getSuffix(spec.getFile()))) { onSuffixMismatch(path, spec.getFile()); } } } } COM: <s> check if suffixes of path and each respurce spec file match </s>
funcom_train/16380237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNegativePointsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new UnsettablePropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RegularType_negativePoints_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RegularType_negativePoints_feature", "_UI_RegularType_type"), CTEPackage.Literals.REGULAR_TYPE__NEGATIVE_POINTS, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the negative points feature </s>
funcom_train/31771765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class loadPlugIn(String str_File, String str_ClassName) { Class c = null; byte[] classData = null; try { classData = loadClassFromDirectory(new File(str_File)); } catch(IOException ioe) { classData = null; } if (classData != null) { // Define the class c = defineClass(str_ClassName, classData, 0, classData.length); } return c; } COM: <s> loads a plugin </s>
funcom_train/28224153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getAllDistances(String startLocation, List<String> allLocations, List<Integer> allDistances, List<Integer> allRoutes) { // reset out parameters allDistances.clear(); allRoutes.clear(); allLocations.clear(); int index = getIndexForName(startLocation); if(index < 0) return; int p[]; p = new int[graph.length]; int d[]; d = new int[graph.length]; dijkstra(index, p, d); // copy out parameters for (int i = 0; i < graph.length; i++) { allDistances.add(d[i]); allRoutes.add(p[i]); allLocations.add(locationNames.get(i)); } } COM: <s> calculate all distances and routes from start location the distance </s>
funcom_train/26574251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(java.awt.event.ActionEvent e) { JComboBox cb = (JComboBox) e.getSource(); Integer y = (Integer) cb.getSelectedItem(); if ((y != null) && (!y.equals(currentYear))) { setCurrentYear(y); } } COM: <s> react to changes in visual proxy to select year </s>
funcom_train/28751122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDept(String newVal) { if ((newVal != null && this.dept != null && (newVal.compareTo(this.dept) == 0)) || (newVal == null && this.dept == null && dept_is_initialized)) { return; } this.dept = newVal; dept_is_modified = true; dept_is_initialized = true; } COM: <s> setter method for dept </s>
funcom_train/7981056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void innerProcess(CrawlURI curi) { contentSinceCheck += curi.getContentSize(); synchronized (this) { if (contentSinceCheck/1024 > ((Integer) getUncheckedAttribute(null, ATTR_RECHECK_THRESHOLD)).intValue()) { checkAvailableSpace(curi); contentSinceCheck = 0; } } } COM: <s> notes a crawl uris content size in its running tally </s>
funcom_train/19174584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public class ExerciseStartComparator implements Comparator { /** * */ public ExerciseStartComparator() { super(); } /* * (non-Javadoc) * * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) */ public int compare(Object arg0, Object arg1) { if (arg0.equals(arg1)) { return 0; } if (arg0 instanceof IExercise && arg1 instanceof IExercise) { IExercise exe0 = (IExercise)arg0; IExercise exe1 = (IExercise)arg1; return exe0.getStart().compareTo(exe1.getStart()); } else { throw new ClassCastException(); } } } COM: <s> exercise start comparator </s>
funcom_train/13994641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMaximumBounds() { Dimension frameSize = getSize(); Dimension desktopSize = getDesktopPane().getSize(); Rectangle inside = getRootPane().getBounds(); super.setBounds(-inside.x, -inside.y, desktopSize.width + (frameSize.width - inside.width), desktopSize.height + (frameSize.height - inside.height)); } COM: <s> resizes and positions the frame in a way that it appears maximized </s>
funcom_train/10616739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGeneralSecurityException01() { GeneralSecurityException tE = new GeneralSecurityException(); assertNull("getMessage() must return null.", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } COM: <s> test for code general security exception code constructor assertion </s>
funcom_train/4831486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteMessage(final JButton button) { button.setEnabled(false); m_pool.execute(new Runnable() { @Override public void run() { DefaultMutableTreeNode node = (DefaultMutableTreeNode)m_tree.getSelectionPath().getLastPathComponent(); ForumCell cell = (ForumCell) node.getUserObject(); m_pipe.deleteMessage(cell.getId(),button); } }); } COM: <s> deletes the selected message </s>
funcom_train/5372567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTopRight(Control c) { checkWidget(); if (c != null && c.getParent() != this) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } if (this.topRight != null && !this.topRight.isDisposed()) { Point size = this.topRight.getSize(); this.topRight.setLocation(OFFSCREEN - size.x, OFFSCREEN - size.y); } this.topRight = c; layout(false); } COM: <s> set the control that appears in the top right corner of the pane </s>
funcom_train/18215477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkInputOK() { String dateCheckError = evaluationTime.checkDates(); if (!dateCheckError.equals("")) { displayError(dateCheckError); return false; } boolean selected = false; for (int i = 0; i < radioButtons.length; i++) { if (radioButtons[i].getValue()) { selected = true; break; } } if (!selected) { displayError("Please select a metric to proceed"); return false; } return true; } COM: <s> goes through the input fields of the gui and check the validity and </s>
funcom_train/25752060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeEdgeTrigger(String name) { for (Enumeration<IOption> i = getOptions(PilotOptions.EDGE_ADVANTAGES); i.hasMoreElements();) { IOption ability = i.nextElement(); if(ability.getName().equals(name)) { ability.setValue(!ability.booleanValue()); } } } COM: <s> this will flip the boolean status of the current edge trigger </s>
funcom_train/6255047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { synchronized (lock) { if (closed) return; closed = true; } /* * Iterating over connections without synchronization is * safe at this point because no other thread will access * it without verifying that closed is false in a * synchronized block first. */ for (Iterator iter = connections.iterator(); iter.hasNext(); ) { ((ServerConnectionImpl) iter.next()).close(); } connections.clear(); try { serverSocket.close(); } catch (IOException e) {} try { serverCred.dispose(); } catch (GSSException e) {} logger.log(Level.FINE, "Listen operation {0} has been closed", this); } COM: <s> close the server socket and all accepted connections </s>
funcom_train/8362186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCommandEnabled(String command, boolean enable) { Set set = (Set) this.commandSets.get(command); if (set != null) { Iterator iterator = set.iterator(); while (iterator.hasNext()) { Component component = (Component) iterator.next(); component.setEnabled(enable); } } } COM: <s> enables disables all gui components that execute the same command </s>
funcom_train/12639349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Identity getIdentity(PublicKey key) { if (key == null) { return null; } Enumeration e = identities(); while (e.hasMoreElements()) { Identity i = (Identity)e.nextElement(); PublicKey k = i.getPublicKey(); if (k != null && keyEqual(k, key)) { if (i instanceof Signer) { localCheck("get.signer"); } return i; } } return null; } COM: <s> get an identity by key </s>
funcom_train/12383836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFreeChart createChart(ValueDataset dataset) { CompassPlot plot = new CompassPlot(dataset); plot.setSeriesNeedle(7); plot.setSeriesPaint(0, Color.red); plot.setSeriesOutlinePaint(0, Color.red); JFreeChart chart = new JFreeChart(plot); return chart; } COM: <s> creates a chart </s>
funcom_train/31529898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getAbsoluteHREF() { try { String _href = getHREF(); if(_href == null || _href.length()==0) return null; if(mainURL != null) return new URL(mainURL, getHREF()); else return new URL(getHREF()); } catch(MalformedURLException _exp) { _exp.printStackTrace(); } return null; } COM: <s> get the absolute url for the href attribute </s>
funcom_train/22238114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void importNamespace(String prefix, String ns, String location) throws LSIDException { Definition importDef = null; try { WSDLReader reader = new WSDLReaderImpl(); importDef = reader.readWSDL(new LSIDWSDLLocator(location)); } catch (WSDLException e) { throw new LSIDException(e, "Error importing namespace: " + ns); } wsdlDef.addNamespace(prefix, ns); Import imp = wsdlDef.createImport(); imp.setLocationURI(location); imp.setNamespaceURI(ns); imp.setDefinition(importDef); wsdlDef.addImport(imp); } COM: <s> import the given namespace into the def </s>
funcom_train/2861119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer str = new StringBuffer( "GroupInfo: GroupSymbol(" + GroupSymbol + ") GroupName(" + GroupName + ") GroupType(" + GroupType + ") NumOfInsts(" + NumOfInsts + ")\n\tInstSyms(" + InstSyms + ")\n"); return str.toString(); } COM: <s> generate a string representation of this object </s>
funcom_train/2437452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MappingTreeStructure refreshInputStructure(Transformation tf, CallbackResult callback) { MappingTreeStructure input = RefreshStructuresJob.refreshInput(tf, callback, progressMonitors, logger); if (input != null) { tf.setInputMappingStructure(input); cacheInputStructure(tf, input); } return input; } COM: <s> recreates the code mapping tree structure code for the input of the given </s>
funcom_train/26239686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addQuestion(StudentQuestion question, OnlineClientRecord client) { if (selfAskedQuestionSet.contains(question)) { question.getQuestionRating().setIndividualRating(StudentQuestionRating.INTERESTED); } super.addQuestion(question, client); if (questionAddListener != null) { questionAddListener.tableChanged( new TableModelEvent(this, questionList.size(), questionList.size(), TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT)); } } COM: <s> add a new question to the table model </s>
funcom_train/40880232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean switchContentView(ViewType type){ if((type == ViewType.NONE) || (currentViewType == type)){ Log.e(TAG, "view type error"); return false; } if(this.currentView != null){ currentView.release(); currentView = null; System.gc(); } currentViewType = type; switch(currentViewType){ case MAIN_MENU: currentView = new MainMenuView(context,this); break; case GAME: currentView = new GameView(context,this); break; case HELP_ABOUT: currentView = new HelpView(context); break; default: break; } this.updateCanvas(); return true; } COM: <s> switch content view </s>
funcom_train/39885151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrintWriter format(Locale l, String format, Object... args) { if (format == null) { throw new NullPointerException("format == null"); } new Formatter(this, l).format(format, args); if (autoflush) { flush(); } return this; } COM: <s> writes a string formatted by an intermediate </s>
funcom_train/8960839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDocumentTypeDeclaration(int style) throws UnsupportedOperationException { if (style<-2 || style>1) { throw new IllegalArgumentException("Paramter style must be in range [-2,1] (was "+style+")."); } if(style>=0 && this.DOCUMENT_TYPE_DECLARATION[style]==null) { throw new UnsupportedOperationException("The specified document type declaration style is not supported."); } this.documentTypeDeclarationStyle=style; } COM: <s> sets the document type declaration style used when writing serializing </s>
funcom_train/50703280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAllOpen(boolean o) { if (node.hasSubGraph()) { Collection<HiFamilyPanel> subFamilies = subGraphPanel.getTopPanels(); for (HiFamilyPanel sf : subFamilies) { sf.getParentPanel().setAllOpen(o); } // revalidate(); setSubgraphOpen(o); } Collection<HiFamilyPanel> chldFamilies = superFamilyPanel.getChildren(); for (HiFamilyPanel cf : chldFamilies) { cf.getParentPanel().setAllOpen(o); } } COM: <s> sets all to be open or closed </s>
funcom_train/48189957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(PosFloatRate entity) { LogUtil.log("deleting PosFloatRate instance", Level.INFO, null); try { entity = entityManager.getReference(PosFloatRate.class, entity .getId()); 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 pos float rate entity </s>
funcom_train/12866269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage() { if (messageParameters != null) { try { return MessageFormat.format(super.getMessage(), (Object[]) getMessageParameters()); } catch (Throwable t) { return super.getMessage(); } } else { return super.getMessage(); } } COM: <s> returns the error message string of this throwable object </s>
funcom_train/28352191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateMinimumElementCount() { final Number value = ELEMENT_COUNT_CONTROL_MODEL.getNumber(); final Integer minimumCount = new Integer( _bumpShapeAdaptor.getMinimumElementCount() ); ELEMENT_COUNT_CONTROL_MODEL.setMinimum( minimumCount ); if ( minimumCount.intValue() > value.intValue() ) { ELEMENT_COUNT_CONTROL_MODEL.setValue( minimumCount ); } } COM: <s> update the minimum element count </s>
funcom_train/49673177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node getNodeFromListIfExists(int i, int j, List nodesList) { Iterator iterator = nodesList.iterator(); while (iterator.hasNext()) { Node n = (Node) iterator.next(); if (n.i == i && n.j == j) { return n; } } return null; } COM: <s> returns the node with the appropriate x and y values or null instead </s>
funcom_train/28296227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLearnerID(String iLearnerID) { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - setLearnerID"); System.out.println(" ::--> " + iLearnerID); } mLearnerID = iLearnerID; if (_Debug) { System.out.println(" :: SeqActivity --> END - setLearnerID"); } } COM: <s> associates an id with learner of this activity </s>
funcom_train/37039316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeErrorPage(ErrorPage errorPage) { String exceptionType = errorPage.getExceptionType(); if (exceptionType != null) { synchronized (exceptionPages) { exceptionPages.remove(exceptionType); } } else { synchronized (statusPages) { statusPages.remove(new Integer(errorPage.getErrorCode())); } } fireContainerEvent("removeErrorPage", errorPage); } COM: <s> remove the error page for the specified error code or </s>
funcom_train/11005807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFontName(String fontName) { if (slideShow == null) { //we can't set font since slideshow is not assigned yet _fontname = fontName; } else { // Get the index for this font (adding if needed) int fontIdx = slideShow.getFontCollection().addFont(fontName); setCharTextPropVal("font.index", fontIdx); } } COM: <s> sets the font name to use </s>
funcom_train/10208795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Line2D nearestPolygonLine(final Point2D point, final Polygon2D polygon, final double epsilon) { final Pair<Integer, Integer> points = pointsOfNearestPolygonLine(point, polygon, epsilon); if (points.getLeft() != -1) { return new Line2D.Double(polygon.xpoints[points.getLeft()], polygon.ypoints[points.getLeft()], polygon.xpoints[points .getRight()], polygon.ypoints[points.getRight()]); } else { return null; } } COM: <s> returns the nearest polygon line for a given point and polygon </s>
funcom_train/22047606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getFlagType(String FlagText) { try { if (FlagText.length() == 8) { // Ensure's it's a proper flag return (FlagText.substring(3).equals("~")); } else { return false; } } catch (Exception e) { return false; } } COM: <s> returns true if the flag is a start flag </s>
funcom_train/4882933
/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:|309-getter|0|309-preInit // write pre-init user code here cancelCommand = new Command ("Cancelar", Command.CANCEL, 0);//GEN-LINE:|309-getter|1|309-postInit // write post-init user code here }//GEN-BEGIN:|309-getter|2| return cancelCommand; } COM: <s> returns an initiliazed instance of cancel command component </s>
funcom_train/25582201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadDistributeReasonerFactoryConfiguration(String filename) { InputStream in; try { in = new FileInputStream(filename); loadDistribute(in); } catch (FileNotFoundException e) { System.out.println("The confilguration file distributeFactory.xml can not be found!"); e.printStackTrace(); } catch (XMLStreamException e) { System.out.println("The format of the confilguration file " + "distributeFactory.xml is not correct!"); e.printStackTrace(); } } COM: <s> load the configuration file of distribute reasoner factory </s>
funcom_train/42652457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRestrictionDataTypeAcceptance() { Application app = CriteriaTest.createTestApplication(); new PropertyRestriction("account", Operation.TEST_IS_NULL).checkValid(app, SimpleEntity.class.getName()); new PropertyRestriction("name", Operation.TEST_IS_NULL).checkValid(app, String.class.getName()); } COM: <s> checks that restrictions can apply to both simple types and entities </s>
funcom_train/32869812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (!(o instanceof MethodSurrogate)) return false; MethodSurrogate other = (MethodSurrogate) o; if (!this.getName().equals(other.getName())) return false; if (this.parameterTypes.length != other.parameterTypes.length) return false; for (int i=0; i<this.parameterTypes.length; i++) if (!this.parameterTypes[i].equals(other.parameterTypes[i])) return false; return true; } COM: <s> compares this instance with the passed object </s>
funcom_train/26207900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InfoSapientController getController(java.io.PrintWriter pout)throws IllegalArgumentException { if (pout == null) throw new IllegalArgumentException("PrintWriter cannot be null."); if (theController == null) { theController = new InfoSapientServletController(pout); } else if (pout != theController.getOut()) { theController = new InfoSapientServletController(pout); } return theController; } COM: <s> return the fzy engine controller </s>
funcom_train/21178173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void propagatePropagator(String level, Propagator p, MetricDescriptor m) { String nextLevel = MetricDescriptor.getNextLevel(level); Propagator nextP = p.createNextLevel(); while (nextLevel != null) { getCalculators(nextLevel).add(nextP); //System.err.println("Added a " + nextP + " at level " + nextLevel); nextLevel = MetricDescriptor.getNextLevel(nextLevel); nextP = nextP.createNextLevel(); } } COM: <s> create max max avg avg and sum calculators at each level above </s>
funcom_train/16869137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() throws ProcessException { // get values for input components // note: you can rename these variable names to match your code double inputValueData = inputValue.getData().getDoubleValue(); double thresholdData = threshold.getData().getDoubleValue(); // set values for output components trueOrFalse.getData().setBooleanValue(inputValueData > thresholdData); } COM: <s> executes the process </s>
funcom_train/20219238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHandleProperty() throws Exception{ PropertyHandler propertyHandler = new WeekOfMonthHandler(); Calendar calendar = Calendar.getInstance(); Date dt = new Date(); calendar.setTime(dt); calendar.set(Calendar.YEAR, 2008); calendar.set(Calendar.MONTH, Calendar.MARCH); calendar.set(Calendar.DAY_OF_MONTH, 14); assertEquals(new Integer(3), propertyHandler.doProperty(calendar.getTime())); } COM: <s> week of month handler </s>
funcom_train/11724099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void execute(Operation workspaceOperation) throws RepositoryException, ConstraintViolationException, AccessDeniedException, ItemExistsException, NoSuchNodeTypeException, UnsupportedRepositoryOperationException, VersionException { log.debug("executing " + workspaceOperation.getName()); workspaceOperation.accept(this); } COM: <s> executes the operations on the repository service </s>
funcom_train/35319089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int hash = mask; if (rangeSet != null) { // Use the CONTEXTUAL_MASK bit only for the enum-based // NumericShaper. A deserialized NumericShaper might have // bit masks. hash &= CONTEXTUAL_MASK; hash ^= rangeSet.hashCode(); } return hash; } COM: <s> returns a hash code for this shaper </s>
funcom_train/49463442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date findUpToDate(RemoteFileState in) throws Exception { Db db = getDb(); try { db.enter(); ps_find_date.setString(1, in.url); ps_find_date.setInt(2, in.remote_file_state_id); ResultSet rs = db.executeQuery(ps_find_date); if (rs.next()) { return DateHelper.toDateOrNull(rs.getTimestamp(1)); // we can get nulls from this query. } else return null; } finally { db.exit(); } } COM: <s> get the date of the most up to date file given the same </s>
funcom_train/39485210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MethodInfo getInvokedMethod (ThreadInfo th) { // since INVOKESPECIAL is only used for private methods and ctors, // we don't have to deal with null object calls if (invokedMethod == null) { ClassInfo ci = ClassInfo.getClassInfo(cname); invokedMethod = ci.getMethod(mname, true); } return invokedMethod; // we can store internally } COM: <s> we can do some more caching here the method info should be const </s>
funcom_train/9564776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Font createfont(String fontName) { Font f1 = null; int pos=-1; do { f1 = FontFactory.getFont(fontName); if(f1.getBaseFont() != null) break; // found a font, exit the do/while pos = fontName.lastIndexOf(' '); // find the last space if(pos>0) { fontName = fontName.substring(0, pos ); // truncate it to the last space } } while(pos>0); return f1; } COM: <s> create a font via the code font factory code </s>
funcom_train/17978698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Field getFieldByName(Class clazz, String fieldName) { // with access to fields in super class hierarchy Field field = null; try { field = clazz.getDeclaredField(fieldName); } catch (NoSuchFieldException e) { Class superClass = clazz.getSuperclass(); while (superClass != null) { try { field = superClass.getDeclaredField(fieldName); return field; } catch (NoSuchFieldException elow) { superClass = superClass.getSuperclass(); } } } return field; } COM: <s> gets the field by its name </s>
funcom_train/34104811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void verifyRelationalTypeCompatibility() { System.out.println("****** Verifying relational type compatibility******"); KeyWord t1 = pop(); KeyWord t2 = pop(); System.out.println("****************************************************"); if(!verifyTypeCompatibility(t1, t2)){ semanticException.addError(scanner.getLineNumber(), "The relational operations are undifined for the argument type(s) "+ t1.getToken() + ", " + t2.getToken()); } } COM: <s> verify the compatibility type in the relational expression </s>
funcom_train/48005563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(javax.swing.event.ListSelectionEvent evt) { try { setOperationPanel(); } catch( Exception error ){ // log error log.log( this, KMetaUtilsClass.getStackTrace( error ) ); // show error message KMetaUtilsClass.showErrorMessageFromException( parentWindow, error ); }; } COM: <s> process for list selectoin change </s>
funcom_train/35328947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mergeAdobeNode(Node node) throws IIOInvalidTreeException { AdobeMarkerSegment adobe = (AdobeMarkerSegment) findMarkerSegment(AdobeMarkerSegment.class, true); if (adobe != null) { adobe.updateFromNativeNode(node, false); } else { AdobeMarkerSegment newGuy = new AdobeMarkerSegment(node); insertAdobeMarkerSegment(newGuy); } } COM: <s> merge the given adobe app14 node into the marker sequence </s>
funcom_train/47561546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Creature mate(Creature partner) { ArrayList<Chromosome> childCode = cross(toGeneticCode(), partner.toGeneticCode()); Creature child = new Creature(childCode, parentSimulation); if (parentSimulation != null) { parentSimulation.addCreature(child); } return child; } COM: <s> helper function for scripted mating </s>
funcom_train/1151134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetIp() { user.setIp("223.121.78.32"); assertEquals("223.121.78.32", user.getIp()); user.setIp("23"); assertEquals("", user.getIp()); user.setIp("157.323.77.89"); assertEquals("", user.getIp()); } COM: <s> test of set ip method of class user </s>
funcom_train/1989390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void report(View view, ValidationReport report) { if (report != null && !report.isOk()) { StringBuffer displayedMessage = new StringBuffer(); for (ValidationError error : report.getValidationErrors()) { String errorMessage = error.getDetailedMessage(); String errorLine = MessageFormat.format(messageLine, errorMessage); displayedMessage.append(errorLine); } GUIUtils.getAlertManager().error(view, messageCode, displayedMessage); } } COM: <s> builds the validation report as a string and displays it in message box </s>
funcom_train/4557925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPaymentSettingCloseButtonForWhatIsIt() { repEng.newStep("340", "Payment Setting- Close button for What is this? window"); //1. Goto User Settings:Payment Settings page //2. Click What is this? link to open the window //3. Click Close button on What is this? window // The window should be closed. } COM: <s> 340 payment setting close button for what is this window </s>
funcom_train/16177379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModel(SimModel model) { super.setModel(model); params.setModelParameters(model); model.addSimEventListener(this); // if(model != null) { // anObjectDataRecorder = new ObjectDataRecorder(model.getName()+".out","Tick\t"+ParameterUtility.getInstance().getPropertyNamesHeader(model)); // } } COM: <s> sets the model to be controlled by this batch controller </s>
funcom_train/17901701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doBackwardSearch() { String text = getText(); if (text == null) { historyPrevious(); return; } for(int i = index + 1; i < historyModel.getSize(); i++) { String item = historyModel.getItem(i); if (item.startsWith(text)) { setText(item); index = i; return; } } } COM: <s> search backward in the history for a matching command </s>
funcom_train/19777025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doPost(String fixesXml) { Queue queue = QueueFactory.getDefaultQueue(); TaskOptions options = url("/processFix").method(Method.POST); options = options.param("fixes", fixesXml); queue.add(options); log.fine("enqueued fixes via POST\n" + fixesXml); } COM: <s> post the xml to the task queue that processes fixes </s>
funcom_train/49409119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetValue() { System.out.println("putgetValue"); AbstractAttribute instance = new MyAttr(); String key = "key"; Object value = "value"; instance.setValue(key, value); Object result = instance.getValue(key); assertEquals(value, result); } COM: <s> test of get value method of class info </s>
funcom_train/34585569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar getJJMenuBar() { if (jJMenuBar == null) { jJMenuBar = new JMenuBar(); jJMenuBar.add(getJFileMenu()); jJMenuBar.add(getJNetMenu()); jJMenuBar.add(getJShowMenu()); jJMenuBar.add(getJConfigurationMenu()); jJMenuBar.add(getJAboutMenu()); } return jJMenuBar; } COM: <s> this method initializes j jmenu bar </s>
funcom_train/2711011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHandlingInstructions(List instructions) { if (instructions == null) { this.instructions = instructions; } else { this.instructions = null; Iterator iterator = instructions.iterator(); while (iterator.hasNext()) { try { addHandlingInstruction((IHandlingInstruction) iterator.next()); } catch (ClassCastException ccex) { // do nothing on this exception, we just don't add it // to the list. } } } } COM: <s> sets the list of handling instructions to the list given </s>
funcom_train/498141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int deleteAuthPair(Connection conn, SystemContext ctx, String id_entity) throws SQLException, ApsSystemException{ PreparedStatement stat = null; int i=0; try{ stat = conn.prepareStatement(this.DELETE_USERAUTH_PAIR); stat.setString(1, id_entity); i=stat.executeUpdate(); stat = conn.prepareStatement(this.DELETE_ENTITY_PAIR); stat.setString(1, id_entity); i=stat.executeUpdate(); }catch (Throwable t) { processDaoException(t, ctx, "Errore in eliminazione lista di entità", "cancellazione userauth"); } finally { closeDaoStatement(ctx, null , stat); } return i; } COM: <s> cancella il legame fra gli users dellentit id entity e lentit stessa </s>
funcom_train/27977070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(ServletConfig config) throws ServletException { if(config.getInitParameter("enabled") == null){ throw new ServletException("servlet int parameter 'enabled' "+ " must be set for security reasons"); } super.init(config); Db.addInterceptor(interceptor); enabled = true; } COM: <s> initializes the servlet </s>
funcom_train/1800485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String key, double value) { if (value == Double.POSITIVE_INFINITY) { put(key, "INF"); } else if (value == Double.NEGATIVE_INFINITY) { put(key, "-INF"); } else { put(key, Double.toString(value)); } } COM: <s> associates the specified double value with the specified key in this map </s>
funcom_train/17005718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getProperties(Properties _defaults) { Properties props = new Properties(_defaults); Enumeration e = store.keys(); while (e.hasMoreElements()) { String _key = (String)e.nextElement(); String _value = store.get(_key).toString(); props.setProperty(_key, _value); } return props; } COM: <s> returns all the properties that have been read from the specified </s>
funcom_train/5381005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Composite getFieldEditorParent() { if (style == FLAT) { // Create a new parent for each field editor Composite parent = new Composite(fieldEditorParent, SWT.NULL); parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); return parent; } // Just return the parent return fieldEditorParent; } COM: <s> returns a parent composite for a field editor </s>
funcom_train/14400391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void trace(Level pLevel, String pMessage) { try { if (isLoggableTrace(pLevel)) { final List<TraceListener> traceListeners = getTraceListeners(); StackTraceElement caller = getCaller(); for (int i = 0; i < traceListeners.size(); ++i) { traceListeners.get(i).trace(pLevel, caller, pMessage); } } } catch (Exception e) { // don't crash for logging } } COM: <s> forwards a trace message to the registered trace listeners </s>
funcom_train/50865589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getObject(int row) { HistoricalEvent event = cachedEvents.get(row); Object result = null; if (event != null) { Object source = event.getSource(); if (source instanceof Unit) result = source; else if (source instanceof Building) result = ((Building) source).getBuildingManager().getSettlement(); } return result; } COM: <s> get the unit at the specified row </s>
funcom_train/21501153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getLightColor(int value) { if (value == 0) { return "yellow.bmp"; } else if (value == 1) { return "red.bmp"; } else if (value == -1) { return "green.bmp"; } else { return "null.bmp"; } } COM: <s> gets the color bitmap which represents the threshold level of the current time </s>
funcom_train/7387713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOrthogonal(mxCellState edge, mxCellState vertex) { mxEdgeStyle.mxEdgeStyleFunction tmp = view.getEdgeStyle(edge, null, null, null); return tmp == mxEdgeStyle.ElbowConnector || tmp == mxEdgeStyle.SideToSide || tmp == mxEdgeStyle.TopToBottom || tmp == mxEdgeStyle.EntityRelation; } COM: <s> returns true if perimeter points should be computed such that the </s>
funcom_train/46640252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Paragraph createContent(BlogPost content) { Paragraph contentParagraph = new Paragraph("", PdfFont.kContentFont.getFont()); contentParagraph.setIndentationLeft(kContentIndent); contentParagraph.setIndentationRight(kContentIndent); // and finally our content Chunk contentChunk = new Chunk(content.getText(), PdfFont.kContentFont.getFont()); contentParagraph.add(contentChunk); contentParagraph.add(kNewLine); return contentParagraph; } COM: <s> creates our content body </s>