__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/50570305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { // Save the runtimes to persistent storage. RuntimeManager rm = RuntimeProvider.getRuntimeManager(); rm.saveRuntimes(); // Save the sessions to persistent storage. SessionManager sm = SessionProvider.getSessionManager(); sm.saveSessions(true); super.close(); } COM: <s> called when all modules agreed with closing and the ide will be closed </s>
funcom_train/9457209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DERObjectIdentifier getKey(int n) { if ((n < 0) || (n >= size)) { throw new IndexOutOfBoundsException(Integer.toString(n)); } switch (n) { case 0: return key0; case 1: return key1; case 2: return key2; case 3: return key3; default: return (DERObjectIdentifier) rest.get((n - 4) * 2); } } COM: <s> gets the nth key </s>
funcom_train/37818088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void OnClick(HyperlinkEvent e, Element el){ int pair=Integer.valueOf(GetLinkTarget(el)).intValue(); if(theAlgo.getProblemSet().getSelectedPair()!=pair){ theAlgo.getProblemSet().setSelectedPair(pair); }else theAlgo.getProblemSet().setSelectedPair(-1); theAlgo.notifySelectionChanged(); theAlgo.setMouseDown(false); } COM: <s> called when an element is clicked </s>
funcom_train/32355247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paste(final Node itemCopied) { if (itemCopied instanceof ro.wpcs.traser.model.File) { // project itemCopied.setParent(getSelectedPrj()); getSelectedPrj().addChild(itemCopied); reloadRoot(); } else if (itemCopied instanceof ro.wpcs.traser.model.Project) { itemCopied.setParent(getRoot()); getRoot().addChild(itemCopied); reloadRoot(); } } COM: <s> visually pastes a copied node into a selected node </s>
funcom_train/22126337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPropertyCardinalityDescription(IProperty property) { String ret = "any number of"; int min = concept.getMinCardinality(property); int max = concept.getMinCardinality(property); if (min == 1 && max == 1) ret = "one"; else if (min == 1 && max == 0) ret = "one or more"; else if (min == 0 && max == 0) ret = "zero or more"; return ret; } COM: <s> returns the text that describes the cardinality of the passed property in </s>
funcom_train/25659357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hide( ManageMappingsSearchResults search, String path, String dto, String flow, String role, String userRole ) { for ( ManageMappingsNode node : search.getNodes() ) { if ( node.getDto().getDtoClass().equals(dto) ) { blomoFlowService.hide(node,path,role,flow,userRole); break; } } } COM: <s> hides a mapping </s>
funcom_train/28494173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void followLink(String linkLabel, String identifier) throws RobotException { WebLink link = getLink(linkLabel, identifier); if (link == null) throw new RobotException("no link '" + linkLabel + "' in class '" + identifier + "'"); go(link.getRequest()); } COM: <s> follows a link within an element of the identified html class or id </s>
funcom_train/42226030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getEditarCommand() { if (editarCommand == null) {//GEN-END:|91-getter|0|91-preInit // write pre-init user code here editarCommand = new Command("Ver/Editar", Command.OK, 0);//GEN-LINE:|91-getter|1|91-postInit // write post-init user code here }//GEN-BEGIN:|91-getter|2| return editarCommand; } COM: <s> returns an initiliazed instance of editar command component </s>
funcom_train/20222223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isHex() { switch (this.fldType) { case FIELD_HEADING: return !this.hiRes; case FIELD_STATUS_CODE: case FIELD_SEQUENCE: case FIELD_INPUT_ID: case FIELD_INPUT_STATE: case FIELD_OUTPUT_ID: case FIELD_OUTPUT_STATE: case FIELD_GEOFENCE_ID: return true; default: return false; } } COM: <s> returns true if the type is represented by a hexidecimal number </s>
funcom_train/48713479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TargetXYA getTargetRoute(double ox, double oy){ TargetXYA txya = new TargetXYA(); txya.angle = MathX.getRadAngle(x-ox, y-oy); txya.x = x + collectRadius * Math.cos(Math.PI + txya.angle); txya.y = y + collectRadius * Math.sin(Math.PI + txya.angle); txya.angle *= MathX.RADTODEG; return txya; } COM: <s> calculates the x y coordinates and approach angle from </s>
funcom_train/32618779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getImports() { StringBuffer buf = new StringBuffer(); buf.append( "import com.hp.hpl.jena.rdf.model.*;" ); buf.append( m_nl ); if (useOntology()) { buf.append( "import com.hp.hpl.jena.ontology.*;" ); } return buf.toString(); } COM: <s> determine the list of imports to include in the file </s>
funcom_train/31936714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean bringPartToTop(LayoutPart part) { ILayoutContainer container = part.getContainer(); if (container != null && container instanceof PartTabFolder) { PartTabFolder folder = (PartTabFolder)container; int nIndex = folder.indexOfComponent(part); if (folder.getSelectedIndex() != nIndex) { folder.setSelectedIndex(nIndex); return true; } } return false; } COM: <s> bring a part forward so it is visible </s>
funcom_train/3472286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rebuild(String customizationKey) { if (rootElement != null) { rootElement.setStructure(null); } rootElement = (RootElement) RootElement.parse(env, rootElement, customizationKey); rootElement.setStructure(this); rootElement.setRecord(record); fireCompleteStructureChange(); } COM: <s> rebuilds the structure </s>
funcom_train/19101779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(ListSelectionEvent e) { System.out.println(e); String s = getStatesList().getSelectedValue().toString(); for (int i = 0; i < states.size(); i++){ if (states.elementAt(i).toString().equals(s)) { getDrawingArea().setNetState((Hashtable) states.elementAt(i)); break; } } } COM: <s> this is called when the reached states list is double clicked </s>
funcom_train/5374079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTopPixel(int pixel) { checkWidget(); int lineCount =content.getLineCount(); int height = getClientArea().height; int maxTopPixel = Math.max(0, lineCount * getVerticalIncrement() - height); if (getCharCount() == 0) { return; } if (pixel < 0) { pixel = 0; } else if (pixel > maxTopPixel) { pixel = maxTopPixel; } setVerticalScrollOffset(pixel, true); } COM: <s> sets the top pixel offset </s>
funcom_train/25418422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Schema newSchema(Schemas schemas, CfgContext context, Node node) { if (node != null) { Schema component = new Schema(); component.setPropertyMeanings(schemas.getPropertyMeanings()); component.configure(context,node,node.getAttributes()); return component; } return null; } COM: <s> instantiates and configures a new schema component </s>
funcom_train/16856698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void localUpdate(final String idEvent, final String dateServer){ cache.getLastUpdated(idEvent, new AsyncCallback<String>(){ public void onFailure(Throwable caught) { //local data base does not exist } public void onSuccess(final String dateLocal) { if(dateServer.equals(dateLocal)){ displaySessions(); } else{ createDatabase(idEvent, dateServer); } } }); } COM: <s> updates if necessary the local data base in function of the server date </s>
funcom_train/22077011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void modify(Attribute attr, Resource resource) { Attribute currentAttribute = attr; Attribute a = get(currentAttribute.getId(), resource); fr.norsys.mapper.console.utils.BeanUtils.copyFilledProperties(a, currentAttribute); currentAttribute = a; ExecutionContext.get().getSession().setAttribute(ConsoleCst.CURRENT_ATTRIBUTE,currentAttribute); } COM: <s> action to modify an attribute in session </s>
funcom_train/2760607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContextInstance(Object instance) { // // make sure that the supplied object can be assigned to // the flow type if(instance != null && false == getFlow().getContextLogic().isInstance(instance)) { throw new IllegalArgumentException("Supplied object not assignable to:" + getFlow().getContextLogic().getName()); } _flowContextInstance = instance; } COM: <s> sets the context instance for this execution context </s>
funcom_train/20303454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRC0() throws Exception { String SOURCE = PREFIX + "ex:class a owl:Class ."; testSchemagenOutput( SOURCE, null, new String[] {"-a", "http://example.com/sg#", "--owl"}, new String[] {}, new String[] {".*public static final Resource class .*"} ); } COM: <s> bug report by richard cyganiak </s>
funcom_train/51141910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeToFile() throws Exception { LOG.info("writing options to file"); FileOutputStream out = new FileOutputStream(_propertiesFile); try { XMLUtils.write(serialize(), out, true); } finally { try { out.close(); } catch (IOException e) { LOG.error("error closing file output stream"); } } } COM: <s> write the properties out to the properties file </s>
funcom_train/40341013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GQuery each(Function... f) { if (f != null) { for (Function f1 : f) { int i = 0; for (Element e : elements) { f1.f(e.<com.google.gwt.dom.client.Element>cast(), i++); } } } return this; } COM: <s> run one or more functions over each element of the gquery </s>
funcom_train/5342727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public License copy(String license, URI licenseURI) { CCLicense newL = null; try { newL = (CCLicense)clone(); newL.license = license; newL.licenseLocation = licenseURI; } catch(CloneNotSupportedException error) { ErrorService.error(error); } return newL; } COM: <s> returns a cclicense exactly like this except </s>
funcom_train/3914854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String resolveNodeName(int dataType, boolean multiple){ switch(dataType){ case 1: if(multiple){ return UNITSOFLEARNING; } else{ return UNITOFLEARNING; } case 2: if(multiple){ return RUNS; } else{ return RUN; } case 3: if(multiple){ return ROLES; } else{ return ROLE; } default: return ""; } } COM: <s> is given an int and returns the corresponding string </s>
funcom_train/45262665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldFracaoSitiosInvariantesALPHAKimura() { if (jNumberFloatFieldFracaoSitiosInvariantesALPHAKimura == null) { jNumberFloatFieldFracaoSitiosInvariantesALPHAKimura = new JNumberFloatField(); jNumberFloatFieldFracaoSitiosInvariantesALPHAKimura.setLocation(new Point(519, 279)); jNumberFloatFieldFracaoSitiosInvariantesALPHAKimura.setSize(new Dimension(65, 20)); } return jNumberFloatFieldFracaoSitiosInvariantesALPHAKimura; } COM: <s> this method initializes j number float field fracao sitios invariantes alphakimura </s>
funcom_train/10959154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExcludeProperties(String commaDelim) { Set<String> excludePatterns = JSONUtil.asSet(commaDelim); if (excludePatterns != null) { this.excludeProperties = new ArrayList<Pattern>(excludePatterns.size()); for (String pattern : excludePatterns) { this.excludeProperties.add(Pattern.compile(pattern)); } } } COM: <s> sets a comma delimited list of regular expressions to match properties </s>
funcom_train/39536949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paint(){ for(final SVGPicture picture : pictureToPaintersMap.keySet()){ if(invalidMarkersShown){ clearPainters(); invalidMarkersShown=false; }else{ picture.getCanvas().addPainters(pictureToPaintersMap.get(picture)); invalidMarkersShown=true; } try{ SwingUtilities.invokeAndWait(new Runnable() { public void run() { picture.getCanvas().repaint(); } }); }catch (Exception ex){ex.printStackTrace();} } } COM: <s> paints the image </s>
funcom_train/11674628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NamedColorSpace getNamedColor(String name) { if (this.namedColors != null) { for (int i = 0, c = this.namedColors.length; i < c; i++) { if (this.namedColors[i].getColorName().equals(name)) { return this.namedColors[i]; } } } return null; } COM: <s> returns a named color </s>
funcom_train/32304473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Map takeUsesOutOfEvictables(Instr i) { Map putBackLater = new HashMap(i.useC().size()); Iterator uses = new FilterIterator(i.useC().iterator(), new MRegFilter()); while(uses.hasNext()) { Temp use = (Temp) uses.next(); if (evictables.containsKey(use)) { putBackLater.put(use, evictables.get(use)); evictables.remove(use); } } return putBackLater; } COM: <s> removes uses of i from evictables </s>
funcom_train/5462598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void safelySleep(long timeout) { long begin = System.currentTimeMillis(); long end = begin; while (end - begin < timeout) { try { Thread.sleep(timeout - (end - begin)); } catch (InterruptedException ie) { // that shouldn't be much of a problem } end = System.currentTimeMillis(); } } COM: <s> sleep for the given number of miliseconds </s>
funcom_train/39964420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void shutdownDatabase() { if (database != null) { log("Shutting down database..."); try { database.shutdown(); log("Database shut down."); } catch (XmldbException e) { log("ERROR: " + e.getMessage()); } finally { database = null; } } } COM: <s> shuts down the embedded database </s>
funcom_train/25997761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNewMyLocationPointToMapView() { DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(dm); Canvas canvas = new Canvas(); MyLocationOverlay overlay = new MyLocationOverlay(curPosition .getLatitudeE6(), curPosition.getLongitudeE6(), accuracy, dm, this); overlay.draw(canvas, mapView, true); mapView.getOverlays().add(overlay); } COM: <s> function that create new my location point overlay </s>
funcom_train/47509552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Conhece entity) { EntityManagerHelper.log("saving Conhece instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved conhece entity </s>
funcom_train/3710463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double min() { if (!isBinNumber()) { double hold = Constant.DMAX; for (int i = 0; i < data.length; i++) { if (!Double.isNaN(data[i]) && data[i] < hold) { hold = data[i]; } } return hold; } else { return (0.0); } } COM: <s> returns minimum value in array </s>
funcom_train/3157744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Area getAsArea() { if (getShape() instanceof Area) { return (Area) getShape(); } if (isOneDimensional()) { return new Area(new BasicStroke(1.0F).createStrokedShape(getShape())); } return new Area(getShape()); } COM: <s> gets the figure as an area </s>
funcom_train/44283437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPatchNamePanel(JPanel parentPanel, Patch patch) { JPanel patchNamePanel = new JPanel(); parentPanel.add(patchNamePanel); addWidget(patchNamePanel, new PatchNameWidget("Program Name ", patch),0,0,1,1,1); } COM: <s> adds the patch name panel to the left edit panel </s>
funcom_train/25936146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addAuthors(HTMLDocument fragment, BNode recipe) { final HTMLDocument.TextField[] authors = fragment.getPluralTextField("author"); for(HTMLDocument.TextField author : authors) { conditionallyAddStringProperty( author.source(), recipe, vHRECIPE.author, author.value() ); } } COM: <s> adds the code authors code triples </s>
funcom_train/41647427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getKEGGPairList(){ gLogger.info("comming into getKEGGPairList method of KEGGPairUtil"); if(KEGGPairList == null){ setPairList(); } gLogger.info("out from getKEGGPairList method of KEGGPairUtil"); return this.KEGGPairList; } COM: <s> to get the list of kegg r pair </s>
funcom_train/2296668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateHeader() throws Exception { String userId = "dave"; String name = "david o. evans"; String query = "sdmx-xf:create-header('" + userId + "', '" + name + "', 'OECD', 'Organisation for Economic Co-operation and Development')"; String result = sdmxapiStore.xQuery(xmlTransaction, query); logger.info(result); } COM: <s> use the sdmxapi funtions </s>
funcom_train/42840466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Question findPreviousQuestion(Question q) { DbOomQuery dbOom = query(sql("select $C{q.*} from $T{Question q} where $q.date < :date order by $q.date desc limit 0,1")); dbOom.setMaxRows(1); dbOom.setFetchSize(1); dbOom.setInteger("date", q.getDate()); return dbOom.findOneAndClose(Question.class); } COM: <s> finds previous question of current one </s>
funcom_train/31503998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearQualitativeActivities() { if( myLocalQualitativeActivities == null ) myLocalQualitativeActivities = new ArrayList(); if( myPreToleranceGlobalQualitativeActivities == null ) myPreToleranceGlobalQualitativeActivities = new ArrayList(); if( myPostToleranceGlobalQualitativeActivities == null ) myPostToleranceGlobalQualitativeActivities = new ArrayList(); myLocalQualitativeActivities.clear(); myPreToleranceGlobalQualitativeActivities.clear(); myPostToleranceGlobalQualitativeActivities.clear(); } COM: <s> reset the collection of qualitative task activities </s>
funcom_train/17202936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFLOATINGPOINT() { switch (value) { case CMPL_EQUAL: case CMPL_GREATER: case CMPG_LESS: case CMPL_GREATER_EQUAL: case CMPG_LESS_EQUAL: case CMPL_NOT_EQUAL: case CMPL_LESS: case CMPG_GREATER_EQUAL: case CMPG_GREATER: case CMPL_LESS_EQUAL: return true; default: return false; } } COM: <s> is the condition code a floating point compare </s>
funcom_train/5380873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAll() { super.removeAll(); if (mapMenuToWrapper != null) { Iterator iter = mapMenuToWrapper.values().iterator(); while (iter.hasNext()) { SubMenuManager wrapper = (SubMenuManager) iter.next(); wrapper.removeAll(); } mapMenuToWrapper.clear(); mapMenuToWrapper = null; } } COM: <s> remove all contribution items </s>
funcom_train/2538792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3D normalizeLocal() { // float m = length(); // if (m > 0) { // this.setX(x / m); // this.setY(y / m); // this.setZ(z / m); // } float length = length(); if (length != 0) { float scalar = length; scalar = 1f/scalar; x *= scalar; y *= scalar; z *= scalar; } return this; } COM: <s> normalize the vector to length 1 make it a unit vector </s>
funcom_train/22444828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ActionListener createAboutActionListener() { return new ActionListener() { public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog( DemoFrame.this, "The simple Looks Demo Application\n" + "\n\u00a9 2001-2004 JGoodies Karsten Lentzsch. All Rights Reserved.\n\n"); } }; } COM: <s> creates and answers an action listener that opens the about dialog </s>
funcom_train/41386045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix3f sub(float[] m) { e[XX] -= m[XX]; e[YX] -= m[YX]; e[ZX] -= m[ZX]; e[XY] -= m[XY]; e[YY] -= m[YY]; e[ZY] -= m[ZY]; e[XZ] -= m[XZ]; e[YZ] -= m[YZ]; e[ZZ] -= m[ZZ]; return this; } COM: <s> subtract a matrix from this matrix </s>
funcom_train/49333788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean performItemClick(View view, int position, long id) { if (mOnItemClickListener != null) { playSoundEffect(SoundEffectConstants.CLICK); if (view != null) { view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED); } mOnItemClickListener.onItemClick(/*this*/null, view, position, id); return true; } return false; } COM: <s> call the on item click listener if it is defined </s>
funcom_train/50311491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(int cc) throws IOException { final byte c = (byte) cc; if ((c == '\n') || (c == '\r')) { if (!skip) { processBuffer(); } } else { buffer.write(cc); } skip = (c == '\r'); } // write COM: <s> write the data to the buffer and flush the buffer if a line </s>
funcom_train/35321770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void flip(BufferCapabilities.FlipContents flipAction) { if (peer != null) { Image backBuffer = getBackBuffer(); if (backBuffer != null) { peer.flip(0, 0, backBuffer.getWidth(null), backBuffer.getHeight(null), flipAction); } } else { throw new IllegalStateException( "Component must have a valid peer"); } } COM: <s> flipping moves the contents of the back buffer to the front buffer </s>
funcom_train/24085453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAsString(FacesContext context, UIComponent component, Object value) { if(value == null){ return ""; } double v = ((Double) value).doubleValue(); if (v == 0) { return "0.0"; } else { return Double.toString(v); } } COM: <s> converts the double value to its string representation </s>
funcom_train/21034385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dragEnter(DropTargetDragEvent dtde) { JTree tree = (JTree)((DropTarget) dtde.getSource()).getComponent(); draggedNode = (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent(); if (!AppContext.treeContext().isDragEnabled()) { return; } } COM: <s> called while a drag operation is ongoing when the mouse pointer enters </s>
funcom_train/39399252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String loadFile(String filename) { BufferedReader in = null; try { in = new BufferedReader(new FileReader(filename)); StringBuffer buf = new StringBuffer(); String read; while ((read = in.readLine()) != null) { buf.append(read); buf.append("\n"); } return buf.toString(); } catch (IOException e) { return ""; } finally { try { if (in != null) in.close(); } catch (IOException ioe) { //ignore } } } COM: <s> load the data of a plain text file into a string </s>
funcom_train/21883951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getBasedir(final String type, final String name) { final StringBuffer sb = new StringBuffer(); sb.append("deployment.").append(type + ".").append(name + ".").append(Constants.PROPERTY_DEP_BASEDIR_FIELD); return getProject().getProperty(sb.toString()); } COM: <s> returns the basedir </s>
funcom_train/3889242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateStructureType_MaxLength(String structureType, DiagnosticChain diagnostics, Map context) { int length = structureType.length(); boolean result = length <= 200; if (!result && diagnostics != null) reportMaxLengthViolation(ImscpRootv1p1p2Package.Literals.STRUCTURE_TYPE, structureType, length, 200, diagnostics, context); return result; } COM: <s> validates the max length constraint of em structure type em </s>
funcom_train/32057189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadStringHashtableGPGraph() { TPGraphModelFileFormatSerial x = new TPGraphModelFileFormatSerial(); GPGraph gpg = null; try { GraphModel gm=x.read(new String("test"), new Hashtable(), gpg); assertNull(gm); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> this function tests read function of tpgraph model file format serial class </s>
funcom_train/46578315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Interval getPreviousInterval(Interval interval) { assert (interval != null); Interval lastPeriod = period.getPreviousPeriod(period.getPeriod(interval.start)); Interval firstPeriod = period.addPeriods(lastPeriod, -(frequency - 1)); return new Interval(firstPeriod.start, lastPeriod.end); } COM: <s> gets the previous interval </s>
funcom_train/3315491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean retainAll(Collection<?> c){ boolean reply; BigInteger otherMask = getMaskOf(c); if (otherMask != null){ BigInteger oldMask = mask; mask = mask.and(otherMask); reply = !mask.equals(oldMask); } else { reply = super.retainAll(c); } return reply; } COM: <s> retains only the elements in this collection that are contained in the </s>
funcom_train/36909085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Label getCreateAccountButton(final UserPanel panel, final PanelManager manager) { Label label = createLabel("Create account"); label.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { CreateAccountTab createAccountTab = new CreateAccountTab(panel, manager); panel.addTab(createAccountTab, "Create Account"); } }); return label; } COM: <s> get the button that opens the creation account feature </s>
funcom_train/18008222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeTable(Table table, ByteArrayOutputStream out) throws IOException, DocumentException { inTable = true; table.complete(); RtfTable rtfTable = new RtfTable(this); rtfTable.importTable(table, pageWidth); rtfTable.writeTable(out); inTable = false; } COM: <s> write a code table code </s>
funcom_train/44436173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillSubEntryLists() { if (subEntryListsComplete) return; List<Node> all = FilterNodeList(getAllAttr(), TYPE_ATTRIBUTE, TYPE_SUBNODE); for (Node n : all) if (!subEntryLists.containsKey(n.getNodeName())) fillSubEntryList(n.getNodeName()); // Don't compute all this again. subEntryListsComplete = true; } COM: <s> this function ensures that all sub entry lists are created </s>
funcom_train/12895737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void swapTask(int idx, boolean up) { int idx2 = idx; if (up) { idx2--; } else { idx2++; } if (idx2 >= 0 && idx2 < _taskList.size()) { _log.debug("Swapping task index " + idx + " with " + idx2); // Swap the tasks Collections.swap(_taskList, idx, idx2); setModified(true); } } COM: <s> swaps the position of a task in the list </s>
funcom_train/49103795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CaseData createCaseData(String casename, SimuRunEnum caseType) { if (getCaseData(casename, caseType) == null) { CaseData caseData = new CaseData(); caseData.setCaseName(casename); caseData.setCaseType(caseType); List list = getProjData().getCaseList(); list.add(caseData); IpssLogger.getLogger().info("CaseInfo created, casename: " + casename); return caseData; } else return null; } COM: <s> create a case data object with the casename and put into run form </s>
funcom_train/48664841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleSelectProviders() { try { AgentOptionalProvidersSelectorDialog dlg = new AgentOptionalProvidersSelectorDialog( this.fViewContainer.getAppFrame(), this.fAvailableOptionalProviderInstances, this.fAgentConfig.getProviderInstances()); UIUtils.centerDialogAndShow(fViewContainer.getAppFrame(), dlg); this.fProviderInstancesToActivate = dlg.getSelectedProviders(); } catch(Exception e) { UIExceptionMgr.exception(e); } } COM: <s> selects optional providers to attach to the currently selected agent </s>
funcom_train/2801840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IField getMsgField(int pFieldId) throws IllegalArgumentException { IField field = null; try { TibrvMsgField rvField = mTibrvMsg.getField(pFieldId); if (rvField != null) { field = new RvField(rvField); } } catch (TibrvException e) { throw new IllegalArgumentException(RvUtils.convertTibrvException(e)); } return field; } COM: <s> retrieves the field according to its id </s>
funcom_train/28231459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTableName(String [] tableArray, String [] columnTableArray) { int counter = 0; String tablename =""; for(int i=0; i<tableArray.length; i++) { tablename = tableArray[i].split(Input.SEPARATOR)[2]; for(int j=0; j<columnTableArray.length; j++) { String tempTablename = columnTableArray[j].split(Input.SEPARATOR)[0]; if(tempTablename.equals(tablename)) { counter++; break; } } if(counter>0) break; } tablename = gin.getItem(tablename); return tablename; } COM: <s> this function gives name of table for given object respective to given column </s>
funcom_train/18504243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataRow getRowByIndex(int rowIndex) { DataRow row; row = (DataRow)dataSet.getRowVector().elementAt(rowIndex); if (row == null) throw new FHException("Row cannot be located in the dataset. " + "DataSet: " + dataSet.getName() + " " + "Row: " + rowIndex, logger); return row; } COM: <s> returns with the data row of the dataset selected by the row index </s>
funcom_train/23068030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object object) { if (object instanceof ComparableSelectItem) { ComparableSelectItem that = (ComparableSelectItem) object; if (that.getValue().equals("")) //empty items bubble to the top, usually these are things like "-Choose-" return 1; if (this.getValue().equals("")) return -1; return new CompareToBuilder() .append(this.getLabel(), that.getLabel()) .append(this.getDescription(), that.getDescription()) .toComparison(); } else { return -1; } } COM: <s> compares items based on their label then value then description </s>
funcom_train/47576364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOutputActivityPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DataLink_outputActivity_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DataLink_outputActivity_feature", "_UI_DataLink_type"), DfmPackage.Literals.DATA_LINK__OUTPUT_ACTIVITY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the output activity feature </s>
funcom_train/19536842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newGroupSet() { Groups groups = new Groups(); Group group = new Group(); group.setName("New Group"); groups.addGroup(group); Groups.setLoadedGroupsFile(groups); GroupToolFrame.setGroupsChanged(false); listController.setItems(new ArrayList<Group>(groups.getGroups().values())); } COM: <s> create a new group set </s>
funcom_train/14068946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Title getTitleFromPath(String titlePath){ if(paths.containsValue(titlePath)){ if(titles.containsValue(paths.getKey(titlePath))){ return (Title) titles.getKey(paths.getKey(titlePath)); } } // If title is not in the database, return null. return null; } COM: <s> obtains a title from the database from its path </s>
funcom_train/22470616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activateExternalPage(Object[] args, IRequestCycle cycle) { CoverArtSearchResult cover = null; if(args.length>1 && args[1]!=null) { cover = (CoverArtSearchResult) args[1]; String playlistName = (String) args[2]; PlaylistImportProperties props = getArchive().getPlaylistProperties(playlistName); if(props!=null) { props.setCoverArt(cover.getURI().toString()); } } } COM: <s> interpret parameters from other pages </s>
funcom_train/17805035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMEXPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CommunicationComponent_MEX_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CommunicationComponent_MEX_feature", "_UI_CommunicationComponent_type"), CtbPackage.Literals.COMMUNICATION_COMPONENT__MEX, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the mex feature </s>
funcom_train/18599437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void deleteFile(File file) { if (file != null) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Deleting PDF file: " + file.getName()); } if (!file.delete()) { LOGGER.warn("Cannot delete file:" + file.getAbsolutePath()); } } } COM: <s> if the file is defined delete it </s>
funcom_train/29713954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void windowClosed() { // TODO: Check if it is safe to close the application // Goodbye System.out.println("\nThank you for using Vector Visual 3D (W3D)"); System.out.println("Please Visit: VectorVisual.SourceForge.net"); // Exit application. System.exit(0); } COM: <s> shutdown procedure when run as an application </s>
funcom_train/47675683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int showDiscardTemplateDialog() { return JOptionPane.showConfirmDialog( WindowManager.getDefault().getMainWindow(), Translatrix.getTranslationString("OPTIONPANE_Title_ChangedDiscard"), Translatrix.getTranslationString("OPTIONPANE_Text_ChangedDiscard"), JOptionPane.YES_NO_CANCEL_OPTION); } COM: <s> shows a confirm joption pane dialog that warns the user before he discards </s>
funcom_train/13187830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getObject(int row, int column) { Object result = null; KeyedObjects rowData = (KeyedObjects) this.rows.get(row); if (rowData != null) { Comparable columnKey = (Comparable) this.columnKeys.get(column); if (columnKey != null) { result = rowData.getObject(columnKey); } } return result; } COM: <s> returns the object for a given row and column </s>
funcom_train/48502333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void beginObject(){ checkPropertyName(); writeCammaForValue(); contexts.push(new Context(Context.Mode.OBJECT)); builder.append("{"); } /** * Ends the object mode. */ public void endObject(){ builder.append("}"); contexts.pop(); nextPropertyName = null; } COM: <s> begins the object mode </s>
funcom_train/33510581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void select(int x, int y) { selectedUnits.clear(); Point clicked = new Point(x - Config.getUnitWidth()/2, y - Config.getUnitHeight()/2); for (int i = 0; i < this.getUnitNum(); i++) { if (this.getUnit(i).getPosition().distance(clicked) < 15){ selectUnit(this.getUnit(i)); return; } } } COM: <s> selects the unit at the coordinates given as parameters </s>
funcom_train/3721490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean atSequence(char[] sequence) throws IOException { boolean result = true; int i = -1; int[] data = new int[sequence.length]; while (++i < sequence.length && result == true) { data[i] = super.read(); if ((char) data[i] != sequence[i]) result = false; //includes case where end of stream reached } for (int j = i-1; j >= 0; j--) { this.unread(data[j]); } return result; } COM: <s> tests incoming data for match with char sequence resets reader when done </s>
funcom_train/41174394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean saveSettings() { if (!this.file.exists()) { if (!this.configDir.exists()) { if (!this.configDir.mkdir()) { return false; } } return this.store(); } else if (!this.file.canWrite()) { System.err.println("Exception in saveSettings"); System.err.println("can't write to config file"); return false; } else { return this.store(); } } COM: <s> stores the settings in an xml file placed in the config folder </s>
funcom_train/28762591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCssnamecolor(String newVal) { if ((newVal != null && this.cssnamecolor != null && (newVal.compareTo(this.cssnamecolor) == 0)) || (newVal == null && this.cssnamecolor == null && cssnamecolor_is_initialized)) { return; } this.cssnamecolor = newVal; cssnamecolor_is_modified = true; cssnamecolor_is_initialized = true; } COM: <s> setter method for cssnamecolor </s>
funcom_train/40655872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeEmptyRowsFromBottom() { int rowsToRemove = 0; for (int r=getRowCount()-1; r>=minRows; r--) { if (!isRowEmpty(r)) { break; } rowsToRemove++; } if (rowsToRemove > 0) { resizeRows(getRowCount() - rowsToRemove); } } COM: <s> remove empty rows at bottom of the table </s>
funcom_train/10610148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int skipBytes(int length) throws IOException { // To be used with available. Ok to call if reading primitive buffer if (input == null) { throw new NullPointerException(); } int offset = 0; while (offset < length) { checkReadPrimitiveTypes(); long skipped = primitiveData.skip(length - offset); if (skipped == 0) { return offset; } offset += (int) skipped; } return length; } COM: <s> skips code length code bytes of primitive data from the receiver </s>
funcom_train/38418177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete() { if(this.getSmartTag()!=null) { this.getSheet().remove(this.getSmartTag()); } super.delete(); getSource().removeLink(this); getEnd().removeLink(this); this.mScenarioGroup.delete(); Topiary.getTopiaryUI().getStoryboard().remove(this.mScenarioGroup); } COM: <s> executes when the arrow is deleted </s>
funcom_train/50313770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTopIndex (int index) { checkWidget (); int count = Fox.FXList_getNumItems(handle); if(count > 0) { index = Math.min (count - 1, Math.max (0, index)); Fox.FXScrollArea_setPosition(handle, Fox.FXScrollArea_getXPosition(handle), index); } } COM: <s> sets the zero relative index of the item which is currently </s>
funcom_train/9887051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validateValueConstraints(String algName, String key, String value) { ParameterAttributes atts = this.getParameterAttributes(algName, key); if(atts == null || !atts.hasConstraints()) //if no info on key or no constraints for found param then return true return true; return checkConstraints(value, atts.getValueType(), atts.getMin(), atts.getMax()); } COM: <s> validate values constraints </s>
funcom_train/1095325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g) { if (AeUiPrefs.isDrawDebugLines()) { super.paintComponent(g); int height = this.getHeight(); int width = this.getWidth(); Color c = g.getColor(); g.setColor(getUiPrefs().getDebugActivityColor()); g.drawRect(0, 0, width - 1, height - 1); g.setColor(c); } } COM: <s> overrides method to paint debug draw lines if debug mode is enabled </s>
funcom_train/3080139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getImageUri(Connection conn, String imageName) { String uri; if (images == null) { uri = null; } else { ImagePeer peer = (ImagePeer) images.get(imageName); if (peer == null) { uri = null; } else { uri = peer.getUri(conn); } } return uri; } COM: <s> returns the uri of the image with provided name </s>
funcom_train/3312829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTextSize(){ int textSize = 1000; int tempSize = 0; javax.swing.text.Element root = doc.getDefaultRootElement(); int anfang = 0; int ende = root.getEndOffset(); while(anfang < ende){ cha = doc.getCharacterElement(anfang);//the paragraph element attributeSet = new SimpleAttributeSet(cha.getAttributes()); tempSize = StyleConstants.getFontSize(attributeSet); if(tempSize<textSize) textSize = tempSize; anfang= cha.getEndOffset(); } return textSize; } COM: <s> this method gets the smallest text size used in the text compoent </s>
funcom_train/51792425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void abortProgressEvent() { new MessageBox(midletDisplay, LocalStrings.getString("error"), LocalStrings.getString("con_err")); //we should disconnect and set the multiplayer menu currentConnection.disconnect(); gameIsRun = false; setUserState(U_DISALLOW); setGameState(G_GAMEOVER); //set menu screen menuExistingGame(); } COM: <s> event when progress screen was aborted or timeout expired </s>
funcom_train/18150559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPlayedRole(Role playedRole) { // create the association set if it doesn't exist already if(_playedRole == null) _playedRole = new AssociationSetImpl<Role>(); // add the association to the association set getPlayedRole().add(playedRole); // make the inverse link playedRole.setPlayer(this); } COM: <s> adds an association played role </s>
funcom_train/13276766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDoorOrWindow(Boolean doorOrWindow) { if (doorOrWindow != this.doorOrWindow) { Boolean oldDoorOrWindow = this.doorOrWindow; this.doorOrWindow = doorOrWindow; this.propertyChangeSupport.firePropertyChange(Property.DOOR_OR_WINDOW.name(), oldDoorOrWindow, doorOrWindow); } } COM: <s> sets whether furniture model is a door or a window </s>
funcom_train/21607488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object asObject(String code) throws ConstantException { Assert.notNull(code, "Code must not be null"); String codeToUse = code.toUpperCase(Locale.ENGLISH); Object val = this.fieldCache.get(codeToUse); if (val == null) { throw new ConstantException(this.className, codeToUse, "not found"); } return val; } COM: <s> parse the given string upper or lower case accepted and return </s>
funcom_train/1332990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchAll() { return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_DATE, KEY_PAYEE, KEY_AMOUNT, KEY_CATEGORY, KEY_MEMO, KEY_TAG}, null, null, null, null, KEY_DATE + " desc"); } COM: <s> fetch all entries from the database </s>
funcom_train/10666814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getArg(String name) { if (name == null) { return null; } for (int i = 0; i < (args.length - 1); i++) { try { if (name.equals(args[i])) { return args[i + 1]; } } catch (Exception e) { break; } } return null; } COM: <s> returns the command line argument value </s>
funcom_train/37018311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void show(String parItemSource){ for(int i= 0; i < allMap.size(); i++){ if(parItemSource == ((Map)allMap.elementAt(i)).getTitle() ){ theSelectedMap= (Map)allMap.elementAt(i); } } showMapSelect(); } COM: <s> set and show a map with item source filename </s>
funcom_train/44871351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getAxisColorPanel() { if (axisColorPanel == null) { axisColorLabel = new JLabel(); axisColorLabel.setText("Color "); axisColorPanel = new JPanel(); axisColorPanel.setLayout(new BoxLayout(getAxisColorPanel(), BoxLayout.X_AXIS)); axisColorPanel.add(axisColorLabel, null); axisColorPanel.add(getAxisColorChoice(), null); } return axisColorPanel; } COM: <s> this method initializes axis color panel </s>
funcom_train/46679063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addFormat(Format f){ if (positions.containsKey(f.getID())){ setElementAt(f,lookupID(f.getID())); return false; } addElement(f); positions.put(f.getID(),new Integer(getNumberOfFormats()-1)); return true; } COM: <s> adds the specified format </s>
funcom_train/46617007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshLastOpenedFiles() { lastOpenedMenu.removeAll(); List files = Utils.getLastOpenedFiles(); Iterator it = files.iterator(); while (it.hasNext()) { File file = (File)it.next(); lastOpenedMenu.add(new JMenuItem(new OpenAction(file))); } } COM: <s> refresh last opened files </s>
funcom_train/965173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Icon getIconForTab(int tabIndex) { String title = tabPane.getTitleAt(tabIndex); boolean hasTitle = (title != null) && (title.length() > 0); return !isTabIconsEnabled && hasTitle ? null : super.getIconForTab(tabIndex); } COM: <s> answers the icon for the tab with the specified index </s>