__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3290152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MMObjectNode getFreeG2Encoder(g2encoders builder) { log.info("Looking for a free service"); log.info("Contents of freeservices list: "+parent.getContentsOfFreeServicesList()); MMObjectNode freeservice = builder.getHardNode(parent.retrieveService()); log.info("Found free service: "+freeservice.getStringValue("name")+":"+freeservice); log.info("Contents of freeservices list: "+parent.getContentsOfFreeServicesList()); return freeservice; } COM: <s> gets a free g2encoder </s>
funcom_train/45464208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFullScreen() { is_fullscreen = false; fullscreenj.remove(videoPanel); fullscreenj.setVisible(false); getMovie().setSize(videoWidth, videoHeight); System.out.println(videoWidth); System.out.println(videoHeight); getContentPane().add(videoPanel, BorderLayout.CENTER); pack(); // fullscreenj.remove(videoPanel); // frame.getContentPane().add(videoPanel); } COM: <s> remove the full screen mode and come back in window mode </s>
funcom_train/28553716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void entityProcessComplete(CAS aCas, EntityProcessStatus aStatus) { if (aStatus.isException()) { List<?> exceptions = aStatus.getExceptions(); for (int i = 0; i < exceptions.size(); i++) { ((Throwable) exceptions.get(i)).printStackTrace(); } return; } entityCount++; } COM: <s> writes the exceptions to </s>
funcom_train/49792054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IElement assertLabelTextPresent(String text) { assertFalse("Cannot assert the presence of an empty label", text.isEmpty()); IElement match = getElementByXPath("//label[" + getContainsTextXPath(text) + "]"); assertNotNull(match); String textContent = match.getTextContent(); // normalise textContent = normalizeSpace(textContent); assertEquals(text, textContent); return match; } COM: <s> assert that a label exists with the given text </s>
funcom_train/5243242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Att getAttribute(String name) { // System.out.println(attFinalTable.get(name)); if (attFinalTable.get(name) != null) { return (Att)attFinalTable.get(name); } else if (attTempTable.get(name) != null) { return (Att)attTempTable.get(name); } return null; } COM: <s> gets the attribute in either final or temp list </s>
funcom_train/48336393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canHandle(AttributeNameValues inAtts) { for (int i=0; i<inAtts.numAttributeNameValues(); i++) { AttributeNameValue inAtt = inAtts.getAttributeNameValueAt(i); if (!isInAttribute(inAtt.getName())) { return false; } } return true; } COM: <s> this method checks the list of incoming attributes to ensure that the </s>
funcom_train/14462512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getAllSeries() { Vector retVec = new Vector(); for (int i=0;i<chartArr.size();i++) { BiffRec b = (BiffRec)chartArr.get(i); if (b.getOpcode()==SERIES) { Series series = (Series)b; retVec.add(series); } } return retVec; } COM: <s> get all the series objects in this chart </s>
funcom_train/35691022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCustomConfigPath() { if (customConfigPath != null) { return CoreUtils.resolveResourceURL(getFacesContext(), customConfigPath); } ValueBinding vb = getValueBinding("customConfigPath"); return vb != null ? CoreUtils.resolveResourceURL(getFacesContext(), (String) vb.getValue(getFacesContext())) : null; } COM: <s> p return the value of the code custom config path code property </s>
funcom_train/50878390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getIndex(String[] inNames, String inKey){ for (int i=0; i<inNames.length; i++){ if (inNames[i] == inKey) return i; if (inNames[i].equals(inKey)) return i; } return -1; } COM: <s> return the value for the given name </s>
funcom_train/2952596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getToken(String s) { int i = 0; while (i < s.length() && !Character.isWhitespace(s.charAt(i))) { i++; } while (i < s.length() && Character.isWhitespace(s.charAt(i))) { i++; } return s.substring(0, i); } COM: <s> get a token from a string </s>
funcom_train/47998781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean doMove(long originCellID, long targetCellID) throws RemoteException { try { long ping = System.currentTimeMillis(); boolean result = gameStub.doAction(gameLobbyID, sessionID, originCellID, targetCellID); if (ParasitesClient.CURRENT_RENDERER.getTimeModule() != null) ParasitesClient.CURRENT_RENDERER.getTimeModule().setPing(System.currentTimeMillis() - ping); return result; } catch (RemoteException e) { handleException(e); } return false; } COM: <s> sends a move command to the server </s>
funcom_train/17134676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void playMusic() { if (RPG.getSoundSettings().isPlayingSounds() && RPG.getSoundSettings().isBackgroundMusic()) { SoundLoader.getMenuBgMusic().play(1f, RPG.getSoundSettings().getBackgroundMusicVolume()); } } COM: <s> plays the background music </s>
funcom_train/2294594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsRelationFilter filterNotDefinedInContent() { CmsRelationFilter filter = (CmsRelationFilter)this.clone(); if (filter.m_types.isEmpty()) { filter.m_types.addAll(CmsRelationType.getAllNotDefinedInContent()); } else { filter.m_types = new HashSet(CmsRelationType.filterNotDefinedInContent(filter.m_types)); } return filter; } COM: <s> returns an extended filter with not defined in content type restriction </s>
funcom_train/20042598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _removeContainerListener() { requiredMethod("addContainerListener()") ; boolean bResult = true; bElementReplaced = bElementRemoved = bElementInserted = false; oObj.removeContainerListener(listener); bResult &= performChanges(); bResult &= !bElementReplaced; bResult &= !bElementRemoved; bResult &= !bElementInserted; tRes.tested("removeContainerListener()", bResult); } COM: <s> removes listener added before and performs all possible changes </s>
funcom_train/8763499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSlider getSpeedSlider() { if (speedSlider == null) { speedSlider = new JSlider(); speedSlider .addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { float min = 0f; float max = 2f; float inter = speedSlider.getValue() / 100f; simulationView.setSimulationSpeed(min * (1 - inter) + max * inter); simulationView.canvasInstance.repaint(); } }); } return speedSlider; } COM: <s> this method initializes speed slider </s>
funcom_train/38181903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValue(int _idx) { if (_idx < 0) throw new IndexOutOfBoundsException("Index must be >= 0!"); int rangeIdx = Arrays.binarySearch(range, _idx); if (rangeIdx < 0) // index not in list; we got insertion point -> transform this to range it belongs to rangeIdx = (-rangeIdx) -1; return values[rangeIdx]; } COM: <s> returns value mapped to the range corresponding to the given index </s>
funcom_train/37666375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetEditExternalProcessPosition() { _editExternalDialog.setFrameState("default"); if (DrJava.getConfig().getSetting(DIALOG_EDITEXTERNALPROCESS_STORE_POSITION).booleanValue()) { DrJava.getConfig().setSetting(DIALOG_EDITEXTERNALPROCESS_STATE, "default"); } } COM: <s> reset the position of the edit external process dialog </s>
funcom_train/20170156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectNextUnit() { /* this cyles around the list when it is at the end */ int start = this.unitIndex; do { this.unitIndex++; if (this.unitIndex >= this.units.size()) this.unitIndex = 0; if (this.unitIndex == start) { MainScreen.writeToConsole("PlayerStatus: All Units have been moved."); break; } } while (this.getCurrentUnit().getRemainingMoves() == 0); } COM: <s> increment the pointer to the next unit that can move </s>
funcom_train/15453676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initProfile() { // set an empty profile to the user. It has to be implemented the // way it's bellow, otherwise it won't initialize the object properly. Profile profile = new Profile(); profile.setUser(this); profile.initProfile(); this.setProfile(profile); } COM: <s> creates and initializes the profile </s>
funcom_train/12188839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testZero() throws ExpressionException { final Function function = new FloorFunction(); Value result = function.invoke(expressionContextMock, new Value[]{ factory.createDoubleValue(0)}); assertTrue(result instanceof DoubleValue); assertTrue(0.0 == ((DoubleValue) result).asJavaDouble()); } COM: <s> tests if function works correctly for 0 </s>
funcom_train/1942155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void unlock() { try { dbh.unlock(lock); lock = null; } catch (SQLException e) { e.printStackTrace(); //debug JOptionPane.showMessageDialog(infoparent, ((String)lang_hash.get("error_db")).replaceAll("%1%", e.getMessage()), "error", JOptionPane.ERROR_MESSAGE); } } COM: <s> unlocks the code system code </s>
funcom_train/43896447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTransform(final float[] matrix, int offset) { setTransform(matrix[offset], matrix[++offset], matrix[++offset], matrix[++offset], matrix[++offset], matrix[++offset]); } COM: <s> set the transform from a flat matrix </s>
funcom_train/23320193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disposePart(final IWorkbenchPart part) { SafeRunner.run(new ISafeRunnable() { public void run() { IWorkbenchPartSite partSite = part.getSite(); part.dispose(); if (partSite instanceof MultiPageEditorSite) { ((MultiPageEditorSite) partSite).dispose(); } } public void handleException(Throwable e) { // Exception has already being logged by Core. Do nothing. } }); } COM: <s> disposes the given part and its site </s>
funcom_train/19544187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveRectangle(String pref, Rectangle rect) { Preferences prefs = Preferences.userRoot().node(rootPreferencesPath + "/" + pref); prefs.putInt("x", rect.x); prefs.putInt("y", rect.y); prefs.putInt("width", rect.width); prefs.putInt("height", rect.height); } COM: <s> save a rectangle to preferences </s>
funcom_train/32709601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JFlexMojo newMojo(String testCase) throws Exception { File unitBasedir = new File(getBasedir(), "src/test/resources/unit"); File testPom = new File(unitBasedir, testCase + "/plugin-config.xml"); JFlexMojo mojo = new JFlexMojo(); configureMojo(mojo, "maven-jflex-plugin", testPom); if (getVariableValueFromObject(mojo, "project") == null) { setVariableValueToObject(mojo, "project", new MavenProjectStub()); } return mojo; } COM: <s> configures an instance of the jflex mojo for the specified test case </s>
funcom_train/41531248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendDataStart() throws RejectException, BackendRejectException { try { smartClient.dataStart(); } catch (SMTPException e) { throw new BackendRejectException(e, " - Backend rejected DATA"); } catch (IOException e) { throw new RejectException(451, e.getMessage()); } } COM: <s> start the data command on backend server </s>
funcom_train/635572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getAttribute(ObjectName objectName, String attributeName) { List attrList = getAttributes(objectName, new String[]{attributeName}); if(attrList.size() > 0){ ObjectAttribute objAttr = (ObjectAttribute)attrList.get(0); return objAttr.getValue(); } return null; // todo: null is probably not the right value here } COM: <s> gets the value for a single attribute </s>
funcom_train/2583367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultHandler getCurrentHandler() { DefaultHandler result = this; if (this.subHandlers != null) { if (this.subHandlers.size() > 0) { Object top = this.subHandlers.peek(); if (top != null) { result = (DefaultHandler) top; } } } return result; } COM: <s> returns the handler at the top of the stack </s>
funcom_train/14233234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void message(WC3Packet packet) { // Message parser... String msg = ""; int x; byte[] bytes = packet.getData(); for (x = 4; (bytes[x] == WC3Packet.NULL_BYTE) != true; x++) { msg += Parser.byteToString((bytes[x])); } g.addToChatLog(s.getBnetName(),msg,"message"); CopylastPair.catchGameName(s.getBnetName(), msg); if(msg.startsWith("/")){ doCommand(msg.substring(1),packet); } } COM: <s> parses message packets that the user types in for command interpretation </s>
funcom_train/46098904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem5() { if (stringItem5 == null) {//GEN-END:|107-getter|0|107-preInit // write pre-init user code here stringItem5 = new StringItem("", "");//GEN-LINE:|107-getter|1|107-postInit // write post-init user code here }//GEN-BEGIN:|107-getter|2| return stringItem5; } COM: <s> returns an initiliazed instance of string item5 component </s>
funcom_train/50119614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean reset_room(String[] params) { room r = (room) ((living) this_player()).query_environment(); if(r == null) { write("You don't have an environment!"); return true; } r.reset(); write("Ok."); return true; } COM: <s> implementation for the reset command added in the create method </s>
funcom_train/6462162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String parseColumnName(String stmnt) { String colName = null; if (stmnt.indexOf("[[") >= 0 && stmnt.indexOf("]]") >= 0) { colName = stmnt.substring(stmnt.indexOf("[[") + 2, stmnt.indexOf("]]")); } return colName; } COM: <s> parse column name from an unparsed statement </s>
funcom_train/2587656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyFile(File s, File t) { try { FileChannel in = (new FileInputStream(s)).getChannel(); FileChannel out = (new FileOutputStream(t)).getChannel(); in.transferTo(0, s.length(), out); in.close(); out.close(); } catch (Exception e) { System.out.println(e); } } COM: <s> copia un solo archivo </s>
funcom_train/14037271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFile(File file) { if ((this.file != null) && !this.file.equals(file)) { try { this.file.renameTo(file); } catch (Throwable t) { try { this.file.renameTo(file); } catch (Throwable t1) { Logger.getLogger().log(t1); } } } this.file = file; } COM: <s> sets the file where this message is sitting to i file i </s>
funcom_train/35839843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addContext(Object handle, Object behavorialFeature) { if (handle instanceof Signal && behavorialFeature instanceof BehavioralFeature) { ((org.omg.uml.UmlPackage) ((Signal) handle).refOutermostPackage()) .getCommonBehavior().getAContextRaisedSignal().add( (BehavioralFeature) behavorialFeature, (Signal) handle); return; } } COM: <s> add a context to a signal </s>
funcom_train/13567669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHaltestelle(Id id, double x, double y) { CoordImpl coord = new CoordImpl(x, y); SwissHaltestelle swissStop = new SwissHaltestelle(id, coord); this.haltestellen.put(coord.getX(), coord.getY(), swissStop); this.haltestellenMap.put(swissStop.getId(), swissStop); } COM: <s> added this method to be able to add stops not only during initialization </s>
funcom_train/3416004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void schedule(TimerTask task, long delay, long period) { if (delay < 0) throw new IllegalArgumentException("Negative delay."); if (period <= 0) throw new IllegalArgumentException("Non-positive period."); sched(task, System.currentTimeMillis()+delay, -period); } COM: <s> schedules the specified task for repeated i fixed delay execution i </s>
funcom_train/17852383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showNotConfiguredCorrectly(Frame parent) { int ret = JOptionPane.showConfirmDialog(parent, mLocalizer.msg("NotConfiguredCorrectly", "Not configured correctly"), Localizer.getLocalization(Localizer.I18N_ERROR), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE); if (ret == JOptionPane.YES_OPTION) { Plugin.getPluginManager().showSettings(mPlugin); } } COM: <s> shows a warning if the plugin was not configured correctly </s>
funcom_train/22448837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sbuf=new StringBuffer(); sbuf.append("\nRoles\n"); sbuf.append(roles.toString()); sbuf.append("\nAxioms\n"); sbuf.append(axioms.toString()); return(sbuf.toString()); } COM: <s> get a string representation of the tbox </s>
funcom_train/42822714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getDeleteCommand() { if (deleteCommand == null) {//GEN-END:|141-getter|0|141-preInit // write pre-init user code here deleteCommand = new Command("Delete", Command.OK, 0);//GEN-LINE:|141-getter|1|141-postInit // write post-init user code here }//GEN-BEGIN:|141-getter|2| return deleteCommand; } COM: <s> returns an initiliazed instance of delete command component </s>
funcom_train/41266398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Mngmcn entity) { EntityManagerHelper.log("deleting Mngmcn instance", Level.INFO, null); try { entity = getEntityManager().getReference(Mngmcn.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent mngmcn entity </s>
funcom_train/35669856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNodeValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LNodeValueUtility_nodeValue_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LNodeValueUtility_nodeValue_feature", "_UI_LNodeValueUtility_type"), LCPnetPackage.Literals.LNODE_VALUE_UTILITY__NODE_VALUE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the node value feature </s>
funcom_train/7660650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetHoldCount() { ReentrantLock lock = new ReentrantLock(); for(int i = 1; i <= SIZE; i++) { lock.lock(); assertEquals(i,lock.getHoldCount()); } for(int i = SIZE; i > 0; i--) { lock.unlock(); assertEquals(i-1,lock.getHoldCount()); } } COM: <s> get hold count returns number of recursive holds </s>
funcom_train/1444430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double correctValueByOutFact(double value, int bestDir) { this.dummyVektor.copy(this.ballPosition[bestDir]); for (int i = 1; i < 4; i++) { dummyVektor.addToThis(this.ballSpeed[bestDir]); if (!this.getWorld().inField(this.dummyVektor)) { return value * i / 4; } } return value; } COM: <s> corrects a pass value when the pass might go out </s>
funcom_train/39947892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Float getClosestRatioWithinTolerance(Float Ratio) { List<Float> ratiosWithinTolerance = getRatiosWithinTolerance(Ratio); if (ratiosWithinTolerance==null || ratiosWithinTolerance.isEmpty()) return -1F; Float closestRatio = Float.MAX_VALUE; for (Float thisRatio : ratiosWithinTolerance) { Float d1 = Math.abs(thisRatio - Ratio); Float d2 = Math.abs(closestRatio - Ratio); closestRatio = d1 < d2 ? thisRatio : closestRatio; } return closestRatio; } COM: <s> get the ratio closest to the ratio specified </s>
funcom_train/48423056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeVector() throws Exception { DocVectorWriter vectorWriter = new DocVectorWriter(); vectorWriter.write( indexDir, // inputDir vectorFile, // outputFile "body", // field null, // idField dictFile, // dictOut null, // weightOpt null, // delimiter null, // power Long.MAX_VALUE, // max null, // outputWriter 30, // minDF 70); // maxDFPercent } COM: <s> writes the vectors from index </s>
funcom_train/37650148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doubleClickToFileRecord(FileRecord fileRec) { final TreeViewer viewer = this.overview.getViewer(); if (viewer.getExpandedState(fileRec)) { viewer.collapseToLevel(fileRec, 1); } else { viewer.expandToLevel(fileRec, 1); } openEditor((IFile) fileRec.getResource()); } COM: <s> expand or collapse the tree and open the editor </s>
funcom_train/33233784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getFailedSI() { if (failedSI == null) {//GEN-END:|106-getter|0|106-preInit // write pre-init user code here failedSI = new StringItem("Failed:", null);//GEN-LINE:|106-getter|1|106-postInit // write post-init user code here }//GEN-BEGIN:|106-getter|2| return failedSI; } COM: <s> returns an initiliazed instance of failed si component </s>
funcom_train/11728579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node findReferenceable(Node node) throws RepositoryException { Node referenced = null; if (node.isNodeType(mixReferenceable)) { return node; } else { NodeIterator iter = node.getNodes(); while (iter.hasNext()) { Node n = iter.nextNode(); referenced = findReferenceable(n); if (referenced != null) { return referenced; } } } return referenced; } COM: <s> find a referenceable node for uuid test </s>
funcom_train/3990309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPr_rombergaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BadanieOkresowe_pr_romberga_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_pr_romberga_feature", "_UI_BadanieOkresowe_type"), PrzychodniaPackage.Literals.BADANIE_OKRESOWE__PR_ROMBERGA, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the pr romberga feature </s>
funcom_train/23411115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLeftStateFormulaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Conjunction_leftStateFormula_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Conjunction_leftStateFormula_feature", "_UI_Conjunction_type"), OMPackage.Literals.CONJUNCTION__LEFT_STATE_FORMULA, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the left state formula feature </s>
funcom_train/51571958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanOnDelete(List<String> deps, boolean yn) { if (checkDependencies(deps)) { for (String src : deps) { currentNamespace.getCurrentTarget().setCleanOnDelete(src, yn); } log.log(Level.FINER, "clean-on-delete " + (yn ? "on " : "off ") + "for " + deps); } } COM: <s> set whether the current target is clean on delete for the specified </s>
funcom_train/27905550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertTextInElement(String elementID, String text) { assertTrue("Unable to locate element with id \"" + elementID + "\"", getTestingEngine().hasElement(elementID)); assertTrue("Unable to locate [" + text + "] in element \"" + elementID + "\"", getTestingEngine() .isTextInElement(elementID, text)); } COM: <s> assert that a given element contains specific text </s>
funcom_train/25653525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void close() { try { if (videoThread != null) { videoThread.setRunning(false); videoThread.join(); } if (audioThread != null) { audioThread.setRunning(false); audioThread.join(); } if (formatCtx != null) synchronized (AV.FORMAT) { AV.FORMAT.av_close_input_file(formatCtx); formatCtx = null; } if (Prefs.current.debug) System.out.println("Stream down!"); } catch (InterruptedException e) { e.printStackTrace(); } } COM: <s> closes this stream thus stopping fetching and decoding </s>
funcom_train/34667485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLocalProjectRunMenu(Project project) { JSimMenuItem localRunProjectItem = new JSimMenuItem(project); localRunProjectItem.addActionListener(this); JSimMenuItem localAnalyzeProjectItem = new JSimMenuItem(project, true); localAnalyzeProjectItem.addActionListener(this); localRunMenu.add(localRunProjectItem); localAnalyzeMenu.add(localAnalyzeProjectItem); } COM: <s> add a local project to the run and analyze menu </s>
funcom_train/44136906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showDialogAndExit() { String title = "Erreur interne / Internal error"; String msg = m_FrMsg + " / " + m_EnMsg; JOptionPane.showMessageDialog(this, msg, title, JOptionPane.ERROR_MESSAGE); System.exit(-1); } COM: <s> to show an error dialog box and exit application </s>
funcom_train/28877624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element generateTimeItemNode(TimeItem obj) { //create the new element <XMLMessages.xml_session> Element newTimeEl = document.createElement(XMLMessages.xml_session); newTimeEl.setAttribute(XMLMessages.xml_date, obj.getDateToString()); newTimeEl.setAttribute(XMLMessages.xml_username, obj.getUsername()); newTimeEl.setAttribute(XMLMessages.xml_workedtime, obj.getWorkedtimeInSeconds()); return newTimeEl; } COM: <s> generate a node for a time item to be inserted in the dom </s>
funcom_train/43417120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char toLower(final char zsciiChar) { if (isAscii(zsciiChar)) { return Character.toLowerCase(zsciiChar); } if (isAccent(zsciiChar)) { return (char) (accentTable.getIndexOfLowerCase(zsciiChar - ACCENT_START) + ACCENT_START); } return zsciiChar; } COM: <s> converts the character to lower case </s>
funcom_train/49103086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateMenuItems() { menu.removeAll(); JInternalFrame[] iframes = graphpad.getAllFrames(); for (int i = 0; i < iframes.length; i++) { IpssDocInternalFrame iframe = (IpssDocInternalFrame) iframes[i]; menu.add(getMenuComponent(iframe.getDocument().getFrameTitle(), iframe)); } if (menu.getMenuComponentCount() > 0) { setEnabled(true); } else { setEnabled(false); } menu.invalidate(); } COM: <s> update the menu items </s>
funcom_train/7442429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAllowedMethods() { getAllowedMethods().clear(); List<AnnotationInfo> annotations = getAnnotations(); if (annotations != null) { for (AnnotationInfo annotationInfo : annotations) { if (!getAllowedMethods().contains( annotationInfo.getRestletMethod())) { getAllowedMethods().add(annotationInfo.getRestletMethod()); } } } } COM: <s> invoked when the list of allowed methods needs to be updated </s>
funcom_train/1377220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CreditTransaction createCredit(CreditTransaction credit) throws IllegalArgumentException { if (credit == null) throw new IllegalArgumentException("CreditTransaction object can't be null"); DAOFactory factory = DAOFactory.getInstance(MySqlDAOFactory.class); GenericDAO dao = factory.getGenericDAO(); CreditTransaction result = (CreditTransaction) dao.createOrUpdate(credit); return result; } COM: <s> adds the given credit transaction </s>
funcom_train/25706791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MDateEntryField getDate_TFendDate() { if( date_TFendDate == null ) { date_TFendDate = new MDateEntryField(); final MDefaultPullDownConstraints c = new MDefaultPullDownConstraints(); c.firstDay = Calendar.MONDAY; c.changerStyle=MDateChanger.SPINNER; date_TFendDate.setConstraints(c); } return date_TFendDate; } COM: <s> this method initializes j text field4 </s>
funcom_train/19071712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addPreConn(LayerFigure figure, InputPatternListener conn) { if (!fPreConn.contains(figure)) { fPreConn.addElement(figure); Layer ly = (Layer)getLayer(); if (ly != null) ly.addInputSynapse(conn); return true; } else return false; } COM: <s> adds an incoming connection </s>
funcom_train/18241528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assemblyCoordinatorChange(IDatastoreAssembly pNewAssembly, IDatastoreAssembly pOldAssembly) { if (pNewAssembly != null) { pNewAssembly.addAssemblyComplementListener(this); } if (pOldAssembly != null) { pOldAssembly.removeAssemblyComplementListener(this); } this.fireGeometryChange(); } COM: <s> code iassembly coordinator listener code method the assembly </s>
funcom_train/48182976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doFrame() { checkOtherPlayers (); // Have other players moved? moveObjects (); checkCollision (2, 4); // player hits pip checkBGCollision (1, 4); // wall hits player man.time++; if (man.time % timedivisor == 0) man.time += drift; } COM: <s> game logic is done here </s>
funcom_train/38480905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getIdentityProperties() { ArrayList identityProperties = new ArrayList(); for (Iterator i = model.getIdentityProperties().iterator(); i.hasNext();) { identityProperties.add(new ModelPropertyAdapter(this, (ModelProperty) i.next())); } return identityProperties; } COM: <s> get identity properties </s>
funcom_train/50862853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ScientificStudy getOngoingPrimaryStudy(Person researcher) { ScientificStudy result = null; Iterator<ScientificStudy> i = studies.iterator(); while (i.hasNext()) { ScientificStudy study = i.next(); if (!study.isCompleted() && (study.getPrimaryResearcher().equals(researcher))) result = study; } return result; } COM: <s> gets the researchers ongoing primary research scientific study if any </s>
funcom_train/51000077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List selectTemplates() throws SQLException { String query = "SELECT document_template_id, template_title, creator_user_id, " + "description, dt_created FROM document_template " + "ORDER BY template_title"; PreparedStatement ps = getConnection().prepareStatement(query); List result = getTemplateFields(ps.executeQuery()); ps.close(); return result; } COM: <s> selects all records in the code document template code table </s>
funcom_train/51533122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void invoke(int idx) throws Exception { String className = "jbosscachewebtest.test.Tester" + idx; Class clazz = Class.forName(className); Method method = clazz.getDeclaredMethod("test", new Class[0]); log.info("about to invoke test case#" + idx); method.invoke(null); } COM: <s> invokes the test method with the specified index </s>
funcom_train/22284060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { PlayerFrame fw = new PlayerFrame(); fw.util.setController(this); // set the controller first so widgets can find it fw.util.setPresentation(url); // set the presentaton next fw.show(); // show it } catch (Exception e) { e.printStackTrace(System.out); } } COM: <s> shows the view after setting this instance as the controller </s>
funcom_train/20237632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { if (iStandAlone) { if (iConn != null) { //close db connection try { logger.info("Closing db connection"); iConn.close(); } catch (SQLException e) { logger.info("Unable to close database connection!"); } } //exit the program System.exit(0); } else { this.closeFrame(); } } COM: <s> this method will be done when the close button is clicked </s>
funcom_train/3730328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean delegateTheClass (final String name) { if (name.equals("org.jxcl.JXIC")) { return false; } for (int i = 0; i < delegated.size(); i++) { if (name.startsWith( (String)delegated.get(i)) ) { return true; } } return false; } COM: <s> do we delegate loading this to the parent </s>
funcom_train/24118337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doShowWeek(Event event) throws InterruptedException { this.cal.setMold("default"); btn_Show1Day.setStyle(btnOriginColor); btn_Show5Days.setStyle(btnOriginColor); btn_ShowWeek.setStyle(btnPressedColor); btn_Show2Weeks.setStyle(btnOriginColor); btn_ShowMonth.setStyle(btnOriginColor); this.cal.setFirstDayOfWeek("monday"); this.cal.setDays(7); try { synchronizeModel(); } catch (ParseException e) { e.printStackTrace(); } } COM: <s> changes the view for 1 week view </s>
funcom_train/5873970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOwner(Page page) { if (_1stec._owners.isEmpty()) { log.warning("No owner available for "+page); } else { final Component owner = (Component)_1stec._owners.get(0); ((PageCtrl)page).setOwner(owner); if (D.ON && log.finerable()) log.finer("Set owner of "+page+" to "+owner); } } COM: <s> sets the owner of the specified page </s>
funcom_train/38415133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MultiLineText getGameScreenFullPlayerName() { if(gameScreenFullPlayerName==null) { String[] strTemp = { fullPlayerName }; gameScreenFullPlayerName = new MultiLineText(strTemp, 10, 10, Color.black, 15.0f, "Lucida Blackletter", ImageLibRef.TEXT_PRIORITY, MultiLineText.LEFT_ALIGNMENT); } return gameScreenFullPlayerName; } COM: <s> to get the player name to display on the left of the screen </s>
funcom_train/49604208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(Road road) { //TODO: make sure removing a road doesn't create two separate // road networks RoadNode n1 = road.getStart(), n2 = road.getEnd(); n1.removeRoad(road); n2.removeRoad(road); if (n1.connectedRoads() == 0) nodes.remove(n1); if (n2.connectedRoads() == 0) nodes.remove(n2); roads.remove(road); grid.changeObjectValue(road.getPolygon(), -1.0); } COM: <s> removes a road from the road network </s>
funcom_train/11728718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLong() throws RepositoryException { try { property.setValue(123); node.save(); fail("Property.setValue(long) must throw a VersionException " + "immediately or on save if the parent node of this property " + "is checked-in."); } catch (VersionException e) { // success } } COM: <s> tests if set value long throws a version exception immediately </s>
funcom_train/25792871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() { m_breakPointCellRenderer = new BreakPointCellRenderer(); m_expectedBgColor = Color.BLUE; m_expectedSelectionBgColor = Color.GREEN; m_table = new JTable(); m_table.setBackground(m_expectedBgColor); m_table.setSelectionBackground(m_expectedSelectionBgColor); } COM: <s> sets up the test environment </s>
funcom_train/34570329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyStateTo(RrdUpdater other) throws IOException { if(!(other instanceof ArcState)) { throw new IllegalArgumentException("Cannot copy ArcState object to " + other.getClass().getName()); } ArcState arcState = (ArcState) other; arcState.accumValue.set(accumValue.get()); arcState.nanSteps.set(nanSteps.get()); } COM: <s> copies objects internal state to another arc state object </s>
funcom_train/32057854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetColumnRule() { System.out.println("testGetColumnRule"); GPGraphpad pad = new GPGraphpad(); GPGraph graph = new GPGraph(); GraphUndoManager undo = new GraphUndoManager(); GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo); assertEquals("getColumnRule failed", newDoc.getColumnRule() != null, true); } COM: <s> test of get column rule method of class gpdocument </s>
funcom_train/3395548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setOption(String opt, List<String> arguments) { String[] args = new String[arguments.length() + 1]; int k = 0; args[k++] = opt; for (List<String> i = arguments; i.nonEmpty(); i=i.tail) { args[k++] = i.head; } options = options.append(args); } COM: <s> indicate an option with the specified list of arguments was given </s>
funcom_train/48524620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void receive(int index, Object o) { if ((! done) && (! haveResult[index])) { haveResult[index] = true; result[index] = o; try { if (isDone()) { done = true; parent.receiveResult(getResult()); } } catch (Exception e) { done = true; parent.receiveException(e); } } } COM: <s> internal method which receives the results and determines </s>
funcom_train/12175782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(int c) throws IOException { if (debug) { logical.write("["); } if (Character.isWhitespace((char)c)) { logical.writeSpace(); } else { logical.write((char)c); } if (debug) { logical.write("]"); } } COM: <s> writes a char to the output normalising any unneccessary whitespace </s>
funcom_train/41209709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getDragSpeed(boolean yAxis){ float speed; if(yAxis){ speed = impl.getDragSpeed(dragPathY, dragPathTime, dragPathOffset, dragPathLength); }else{ speed = impl.getDragSpeed(dragPathX, dragPathTime, dragPathOffset, dragPathLength); } return speed; } COM: <s> this method returns the dragging speed based on the latest dragged </s>
funcom_train/33512615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void save_list(File file, ArrayList list) { try { PrintWriter writer = new PrintWriter(new BufferedWriter( new FileWriter(file))); for (int i = 0; i < list.size(); i++) { writer.println(list.get(i)); } writer.close(); } catch (IOException ioe) { System.err.println("Error writing file : " + file + " : " + ioe); return; } } COM: <s> saves the list of selected folders to index </s>
funcom_train/50805105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Planet getPlanetByPartialName(String name) { Iterator e = getAllPlanets().iterator(); Planet theone = null; boolean found = false; while (e.hasNext() && !found) { Planet p = (Planet) e.next(); if (p.getName().equals(name)) { theone = p; found = true; } else { if (p.getName().indexOf(name) != -1) { if (theone == null) theone = p; else return null; } } } if (theone == null) return null; return theone; } COM: <s> check if the planetname was only partial and complete it </s>
funcom_train/36428717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void serverStartup() throws GoldenGateDatabaseNoConnectionException, GoldenGateDatabaseSqlException { isServer = true; if ((!useNOSSL) && (!useSSL)) { logger.error("OpenR66 has neither NOSSL nor SSL support included! Stop here!"); System.exit(-1); } pipelineInit(); r66Startup(); startHttpSupport(); startMonitoring(); } COM: <s> startup the server </s>
funcom_train/14177133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateComboForValue(String value) { fValue = value; for (int i = 0; i < fEntryNamesAndValues.length; i++) { if (value.equals(fEntryNamesAndValues[i][1])) { fCombo.setText(fEntryNamesAndValues[i][0]); return; } } if (fEntryNamesAndValues.length > 0) { fValue = fEntryNamesAndValues[0][1]; fCombo.setText(fEntryNamesAndValues[0][0]); } } COM: <s> set the name in the combo widget to match the specified value </s>
funcom_train/43773991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FreeSpace retrieve(int required) { FreeSpace next = header; FreeSpace found = null; while(next != null) { if(next.free >= required) { if(found == null) { found = next; } else if(next.free < found.free) { found = next; } } next = next.next; } return found; } COM: <s> selects a page with the smallest possible page </s>
funcom_train/14306445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tableChanged(TableModelEvent e) { super.tableChanged(e); if (!autoResizeColumns) return; int cc = columnModel.getColumnCount() - 1; for (int col = cc; col >= 0; col--) { int width = getLongestCellTextWidth(col); if (width > 0) { TableColumn tc = columnModel.getColumn(col); tc.setPreferredWidth(width); //tc.setMinWidth(width); //tc.setMaxWidth(width); } } resizeAndRepaint(); if (tableHeader != null) tableHeader.resizeAndRepaint(); } COM: <s> invoked when the table data has changed this method autoresizes </s>
funcom_train/46261669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDragged(MouseEvent e) { Graphics iBGraphics = canvas.getImageBufferGraphics(); iBGraphics.setColor(Color.lightGray); /* draw updated temporary line */ Point newMousePosition = e.getPoint(); drawRectangle(startingMousePosition.x,startingMousePosition.y, newMousePosition.x -startingMousePosition.x, newMousePosition.y- startingMousePosition.y); } COM: <s> draw a temporary rectangle using the initial point and the current mouse location </s>
funcom_train/38158887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reorderInstructors(Vector instructors, Connection conn) { CourseHomeInstructor instructor; for (int i = 0; i < instructors.size(); i++) { instructor = (CourseHomeInstructor) instructors.get(i); instructor.setSortOrder(i + 1); CourseHomeInstructorController.save(instructor, conn); } } COM: <s> order instructors to the same order as the instructors in the passed vector </s>
funcom_train/1241305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getAllKeys() { HashSet set = new HashSet(); set.addAll(super.keySet()); Hashtable p = parent; while (p != null) { set.addAll(p.keySet()); if (p instanceof LockableHashtable) { p = ((LockableHashtable) p).getParent(); } else { p = null; } } return set; } COM: <s> returns the keys in this hashtable and its parent chain </s>
funcom_train/45844632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initTimer() { m_animTimer = new javax.swing.Timer(1, new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { updateAnimTime(); } }); m_animTimer.setInitialDelay(1); } COM: <s> sets up a timer and adds an action listener to the panel </s>
funcom_train/47978016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ImageIcon createImageIcon(String path) { java.net.URL imgURL = getClass().getResource(path); if (imgURL != null) { return new ImageIcon(imgURL); } else { System.err.println("Couldn't find file: " + path); return null; } } COM: <s> returns an image icon or null if the path was invalid </s>
funcom_train/18662122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cylceInfoDisplay() { switch ( showInfo ) { case DISPLAY_NONE: showInfo = DISPLAY_PHOTOGRAPHIC; break; case DISPLAY_PHOTOGRAPHIC: showInfo = DISPLAY_APPLICATION; break; case DISPLAY_APPLICATION: showInfo = DISPLAY_NONE; break; } repaint(); //pictureJPanel.requestFocusInWindow(); } COM: <s> this function cycles to the next info display </s>
funcom_train/40359448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkDocidUniquenessIntegrity() { boolean result = true; Set<String> m = new HashSet<String>(); for (MockRepositoryDocument d : this) { if (!m.add(d.getDocID())) { // this docid appears more than once result = false; logger.info("Docid " + d.getDocID() + " appears more than once!"); } } return result; } COM: <s> checks the docid uniqueness constraint iterates through the documents and </s>
funcom_train/47998619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isExistingUser(String email) throws SQLException { Connection con = getConnection(); Statement stmt = con.createStatement(); String sqlCommand = "SELECT eMail FROM parasites_player WHERE eMail = '" + email + "'"; ResultSet rs = stmt.executeQuery(sqlCommand); if (rs.next() && rs.getString("eMail").equals(email)) { stmt.close(); con.close(); return true; } stmt.close(); con.close(); return false; } COM: <s> check if there already is a user record at the database with the </s>
funcom_train/37208332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDefaults() { // Experimenting with not using bold elements for Button and Label // fonts. Font font = (Font) UIManager.get("Label.font"); UIManager.put("Label.font", font.deriveFont(Font.PLAIN)); font = (Font) UIManager.get("Button.font"); UIManager.put("Button.font", font.deriveFont(Font.PLAIN)); } COM: <s> sets application wide defaults for user interface elements </s>
funcom_train/19583665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IImage copyImage(IImage imageItem, IFrame frame) { IImage copy = StitcherUtils.createPhotoImage(imageItem .getImageUrl()); // float scale = (Float) getScale(((JMERectangularItem) copy) // .getSize()); copy.setRelativeScale(imageItem.getRelativeScale()); copy.addItemListener(new ImageItemListener(stitcherApp)); frame.addItem(copy); return copy; } COM: <s> copy an image </s>