__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/44385814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleConnect(Figure start, Figure end) { super.handleConnect(start, end); JModellerClass startClass = ((ClassFigure)start).getModellerClass(); JModellerClass endClass = ((ClassFigure)end).getModellerClass(); startClass.addAssociation(endClass); endClass.addAssociation(startClass); } COM: <s> hook method to plug in application behaviour into </s>
funcom_train/12561532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endSession() { if (Logging.REPORT_LEVEL <= Logging.INFORMATION) { Logging.report(Logging.INFORMATION, LogChannels.LC_HIGHUI, "[BTIS.endSession]"); } if (currentMode != null) { endInputMode(currentMode); setInputMode(null); } textComponent = null; stickyMode = null; } COM: <s> end the current text input session and do not commit any pending </s>
funcom_train/16380862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IMenuManager createWindowMenu(IWorkbenchWindow window) { IMenuManager menu = new MenuManager( getString("_UI_Menu_Window_label"), IWorkbenchActionConstants.M_WINDOW); addToMenuAndRegister(menu, ActionFactory.OPEN_NEW_WINDOW .create(window)); menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); menu.add(ContributionItemFactory.OPEN_WINDOWS.create(window)); menu.add(ActionFactory.RESET_PERSPECTIVE.create(window)); menu.add(new MenuManager( getString("_UI_Menu_Window_Open_Perspective_label"), "openPerspective")); menu.add(ActionFactory.PREFERENCES.create(window)); return menu; } COM: <s> creates the window menu </s>
funcom_train/15624252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FontMetrics getFontMetrics(final Font font, final Graphics g) { if (font == null) { throw new IllegalArgumentException("font param must not be null"); } updateStyledFont(font); if (fontMetrics == null) { fontMetrics = g.getFontMetrics(lastStyledFont); } assert fontMetrics != null; return fontMetrics; } COM: <s> returns the font metrics for the styled font </s>
funcom_train/39138507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void populatePermissions(String pPermissionStr, Permissions pPerms) { if (pPermissionStr.indexOf("x") > 0) { pPerms.setExecute(true); } if (pPermissionStr.indexOf("r") > 0) { pPerms.setRead(true); } if (pPermissionStr.indexOf("w") > 0) { pPerms.setWrite(true); } } COM: <s> populate a permissions object according to the permission string </s>
funcom_train/47490985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getMarkHomeCommand() { if (markHomeCommand == null) {//GEN-END:|37-getter|0|37-preInit // write pre-init user code here markHomeCommand = new Command("Marcar", Command.OK, 0);//GEN-LINE:|37-getter|1|37-postInit // write post-init user code here }//GEN-BEGIN:|37-getter|2| return markHomeCommand; } COM: <s> returns an initiliazed instance of mark home command component </s>
funcom_train/40120823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String join(final String separator) throws JSONException { final int len = length(); final StringBuffer sb = new StringBuffer(); for ( int i = 0; i < len; i += 1 ) { if ( i > 0 ) { sb.append( separator ); } sb.append( JSONObject.valueToString( this.myArrayList.get( i ) ) ); } return sb.toString(); } COM: <s> make a string from the contents of this jsonarray </s>
funcom_train/18296689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClSimplexSolver getSolver() throws MalformedLayoutHierarchyException { if (solver != null) return solver; LayoutContainer parent = this.parent; ClSimplexSolver returnValue = (parent != null) ? parent.getSolver() : null; if (returnValue != null) { return returnValue; } else { throw new MalformedLayoutHierarchyException("Unable to find solver in layout hierarchy."); } } COM: <s> returns the constraint solver that manages this containers layout </s>
funcom_train/51107785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AccessStackAdapter getAccessStackAdapter(Class adapterClass) { AccessStackAdapter stackAdapter = (AccessStackAdapter) adapterMap .get(adapterClass.getName()); if (stackAdapter == null) { throw new RuntimeException("No AccessStackAdapter for DbAdapter class: " + adapterClass); } // post init stackAdapter.unchecked(this); return stackAdapter; } COM: <s> returns db specific testing adapter </s>
funcom_train/12803913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSelected( String action ) { AbstractButton theButton; ArrayList items = getMenuItems( action ); if (items != null ) { JMenuItem item = (JMenuItem) items.get( 0 ); return item.isSelected(); } theButton = getToolbarButton(action); if (theButton != null) { return theButton.isSelected(); } return false; } COM: <s> gets whether or not the action is selected </s>
funcom_train/14077747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void menuFileNewCitebook(ActionEvent actionEvent) { // Check to see if we need to execute a SaveCitebookAction before // eliminating current data if (GUIUtils.saveCurrentCitebook()) { SaveCitebookAction action = new SaveCitebookAction( SaveCitebookAction.SAVE_ACTION, false); action.performSave(); } Application.initCiteBook(); Application.getMainFrame().refreshGUI(); } COM: <s> file new citebook action performed </s>
funcom_train/8417592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static protected String makeKey(String[] subkeys) { if (1 == subkeys.length) return subkeys[0]; // common case short-circuit String tmp[] = subkeys.clone(); Arrays.sort(tmp); StringBuffer b = new StringBuffer(); for (int i = 0; i < tmp.length; i++) { if (0 < i) b.append(' '); b.append(tmp[i]); } return b.toString(); } COM: <s> turn an unsorted array of strings into a canonical key </s>
funcom_train/45786271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJrbtEdificio() { if (jrbtEdificio == null) { jrbtEdificio = new JRadioButton(); jrbtEdificio.setBounds(new Rectangle(12, 42, 121, 20)); jrbtEdificio.setText("Edificio"); jrbtEdificio.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if (jrbtEdificio.isSelected()) { cargarEdificios(); } } }); } return jrbtEdificio; } COM: <s> this method initializes jrbt edificio </s>
funcom_train/9708207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SOAPFactory getSOAPFactory() { String soapVersionURI = options.getSoapVersionURI(); if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapVersionURI)) { return OMAbstractFactory.getSOAP12Factory(); } else { // make the SOAP 1.1 the default SOAP version return OMAbstractFactory.getSOAP11Factory(); } } COM: <s> return the soap factory to use depending on what options have been set </s>
funcom_train/3137825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hookContextMenu() { MenuManager menuManager = new MenuManager("#PopupMenu"); menuManager.setRemoveAllWhenShown(true); menuManager.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager manager) { MailboxExplorer.this.fillContextMenu(manager); } }); Menu menu = menuManager.createContextMenu(treeViewer.getControl()); treeViewer.getControl().setMenu(menu); getSite().registerContextMenu(menuManager, treeViewer); } COM: <s> sets up the popup menu to dynamically load the menu actions via </s>
funcom_train/32759300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendGuiComponent(Component cmp) { this.add(cmp, this.gbcTxtFlds); this.lstGuiCmps.add(cmp); this.gbcTxtFlds.gridy++; Component cmpStrut = Box.createVerticalStrut( INT_PAD_VER ); this.add( cmpStrut, this.gbcTxtFlds); this.lstGuiCmps.add(cmpStrut); this.gbcTxtFlds.gridy++; } COM: <s> appends the given gui component to the </s>
funcom_train/32633547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addIfaces(Collection result, ClassIdentifier ancestor) { String[] ifaces = ancestor.ifaceNames; ClassInfo[] ifaceInfos = ancestor.info.getInterfaces(); for (int i=0; i < ifaces.length; i++) { ClassIdentifier ifaceident = Main.getClassBundle().getClassIdentifier(ifaces[i]); if (ifaceident != null && !ifaceident.isReachable()) addIfaces(result, ifaceident); else result.add(ifaceInfos[i]); } } COM: <s> add the class info objects of the interfaces of ancestor </s>
funcom_train/22544592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(File file) { super.initialize(file); try { AudioMetaData amd = AudioMetaData.parseAudioFile(initializer); if(amd != null) { length = amd.getLength(); bitrate = amd.getBitrate(); } } catch(IOException ignored) {} name = initializer.getName(); updateTheme(); } COM: <s> sets up the dataline for use with the playlist </s>
funcom_train/28254232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireUserPropertyEdit(PropertyEditEvent e){ for(DataContentListener l : listeners){ switch(e.getType()){ case PropertyEditEvent.ADD: l.userPropertyAdded(e); break; case PropertyEditEvent.REMOVE: l.userPropertyRemoved(e); break; case PropertyEditEvent.CHANGE: l.userPropertyChanged(e); break; } } } COM: <s> fires a property edit event and calls the appropriate method of registered </s>
funcom_train/47104129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadMapFromFile(){ try{ /*FileInputStream fin = new FileInputStream(MiscScenarioData.MAP_PATH); ObjectInputStream ois = new ObjectInputStream(fin); load(ois); ois.close();*/ if(src.Constants.SCENARIO_DEBUG || src.Constants.EDITOR) MapFile.getInstance().load(MiscScenarioData.MAP_PATH); else MapFile.getInstance().load(ScenarioFile.getInstance().getStream(MiscScenarioData.MAP_PATH)); GameWorld.getInstance().setCurrentLevel(0); } catch (Exception ex) { System.out.println("Error reading map file."); } } COM: <s> loads the map file specified in the scenario xml file </s>
funcom_train/7619859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleSslErrorRequest(SslError error) { if (Config.LOGV) { Log.v(LOGTAG, "LoadListener.handleSslErrorRequest(): url:" + url() + " primary error: " + error.getPrimaryError() + " certificate: " + error.getCertificate()); } sendMessageInternal(obtainMessage(MSG_SSL_ERROR, error)); } COM: <s> ssl certificate error callback </s>
funcom_train/4751240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddItem() { Product book2 = new Product("Pragmatic Project Automation", 29.95); cart.addItem(book2); double expectedBalance = book1.getPrice() + book2.getPrice(); assertEquals(expectedBalance, cart.getBalance(), 0.0); assertEquals(2, cart.getItemCount()); } COM: <s> tests adding an item to the cart </s>
funcom_train/31662596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { int n = massSpectra.length; MassSpectrum[] ms = new MassSpectrum[n]; for (int i = 0; i < n; i++) { ms[i] = (MassSpectrum) massSpectra[i].clone(); } GCMSSpectrum spectrum = null; spectrum = (GCMSSpectrum) super.clone(); spectrum.massSpectra = ms; return spectrum; } COM: <s> cloning of the spectrum </s>
funcom_train/4300574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void close() { if (session != null) { session.close(); } session = null; // fredt@user - closing the socket is to stop this thread try { socket.close(); } catch (IOException e) {} synchronized (server.serverConnSet) { server.serverConnSet.remove(this); } } COM: <s> closes this connection </s>
funcom_train/43246129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetMaidenName() { System.out.println("setMaidenName"); String maidenName = ""; FamilyDemographicSpouseObject instance = new FamilyDemographicSpouseObject(); instance.setMaidenName(maidenName); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set maiden name method of class org </s>
funcom_train/38416236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void repairClassPath() { if( Tools.hasJar(jarName) ) return; // our classpath has the current Jar name... nothing to repair. System.setProperty( "java.class.path", System.getProperty("java.class.path", ".") +System.getProperty("path.separator", ";") +jarName); } COM: <s> repares the class path with the eventually missing current jar name </s>
funcom_train/48151306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double simulate() { int step, lastZero = 0, position = 0; for (int i = 1; i <= 2*parameter; i++) { if (Math.random() < 0.5) step = 1; else step = -1; position = position + step; if (position == 0) lastZero = i; } return lastZero; } COM: <s> this method simulates a value from the distribution by simulating a </s>
funcom_train/18304194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getAccountAttributes() { try { if (info == null) { getRegistrationInfo(); } Map attributes = info.getAttributes(); if (attributes != null) { return attributes.keySet().iterator(); } } catch (XMPPException xe) { } return Collections.EMPTY_LIST.iterator(); } COM: <s> returns an iterator for the string names of the required account attributes </s>
funcom_train/21611369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JsonObject arcAsJSON(Arc<Value> arc) { JsonObject triple = new MapValue(); JsonObject predicateObject = new MapValue(); predicateObject.put( arc.getArcLabel().toString(), arc.getToNode().toString() ); triple.put( arc.getFromNode().toString(), predicateObject ); return triple; } COM: <s> converts an arc of the graph as a json object </s>
funcom_train/40311961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAfterLast() { try { metaData = new DefaultResultSetMetaData(new IOMetaDataEntryMockImpl()); values = new Object[][]{{"hello"}}; ResultSet resultSet = new DefaultResultSet(statement, metaData, values); resultSet.afterLast(); assertEquals("afterLast failed: The current row number should be 2", 2, resultSet.getRow()); } catch(SQLException e) { fail("afterLast failed"); } } COM: <s> tests after last successfully </s>
funcom_train/18846422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createSequenceFlowSourceNodeIDMissingException(String tscToken, String componentID, String subSystemCode, String arcID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg = new DiagnosticsListCreator(); String severityType = "E"; String exceptionID = "82030"; propertyMap.addPropertyValuePair("arcID", arcID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> source node id of sequence flow arc not supplied </s>
funcom_train/12640241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean mkdirs() { if (exists()) { return false; } if (mkdir()) { return true; } File canonFile = null; try { canonFile = getCanonicalFile(); } catch (IOException e) { return false; } String parent = canonFile.getParent(); return (parent != null) && (new File(parent).mkdirs() && canonFile.mkdir()); } COM: <s> creates the directory named by this abstract pathname including any </s>
funcom_train/1971624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double simulateTimeToFailure(BDD<T> bdd, Transformer<T, ReliabilityFunction> functionTransformer) { double time = 0; BDD<T> myBDD = bdd.copy(); Set<Failure<T>> failures = getFailures(bdd, functionTransformer); for (Failure<T> failure : failures) { BDD<T> objectVariable = provider.get(failure.getObject()); myBDD.restrictWith(objectVariable.not()); if (myBDD.isZero()) { time = failure.getTime(); break; } } return time; } COM: <s> performs a single simulation run to gather one time to failure </s>
funcom_train/49405920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rate(LanguageDetection ld) { if (isEmpty()){ return; } else { ProbabilityMap<Language> pm = new ProbabilityMap<Language>(); for (Wortform current : wortformen) { if (current.getLanguage() != null){ pm.putWhenGreater(current.getLanguage(), current.getProbability()); } } for(Language language: pm.keySet()){ ld.notifyDetected(language, pm.getProbability(language)); } } } COM: <s> rate the given </s>
funcom_train/17921607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String unfold (String str) { int ind = str.indexOf("\r\n"); if (ind == -1) { return unfoldNewline(str); } else { String tmpString1 = str.substring(0,ind); String tmpString2 = str.substring(ind+2); return unfoldNewline(unfold(tmpString1+tmpString2)); } } COM: <s> unfolds a string i </s>
funcom_train/4744194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T onLoadList(Resettable inputData, List<T> objectList, TableSelector<T> selector) { T newEntry = null; checkForUnselectedObject(inputData); if (checkForNewObject(objectList, selector)) { newEntry = this.newEntry; } checkForDeletedObject(selector); return newEntry; } COM: <s> event handler for the reloading of the table </s>
funcom_train/48887833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createFieldEditors() { FileFieldEditor settingsEditor = new FileFieldEditor( PreferenceConstants.P_PATH, "&Settings location:", true, getFieldEditorParent()); settingsEditor.setEmptyStringAllowed( true ); settingsEditor.setFileExtensions( new String[]{ "*.xml" } ); addField( settingsEditor ); addField( new StringFieldEditor(PreferenceConstants.P_STRING, "&Artifact path: ivy-lib/", getFieldEditorParent())); } COM: <s> creates the field editors </s>
funcom_train/35423302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean isOver() { // Call the isWinner subroutine. This sets the winner variable depending // on the condition of the board this.isWinner(); // Check the value of the winner variable if (this.winner == Board.TIE) { // Game is Over with a Tie return true; } else if (this.winner == Board.EMPTY) { // Game is not complete return false; } // We have a definite winner return true; } COM: <s> check if the game is complete </s>
funcom_train/50877727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Projection getProjection(){ if (myLCCProjection != null){ super.getProjection(); myLCCProjection.setLatitude1(Double.parseDouble(myTextFieldLatitude1.getText())); myLCCProjection.setLatitude2(Double.parseDouble(myTextFieldLatitude2.getText())); } return myLCCProjection; } COM: <s> retrieve the edited projeciton </s>
funcom_train/46395281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doCopyImage() { BufferedImage bimg = new BufferedImage(getPreferredSize().width, getPreferredSize().height, BufferedImage.TYPE_INT_ARGB); Graphics2D g2 = bimg.createGraphics(); paint(g2); g2.dispose(); JLabel lbl = new JLabel(new ImageIcon(bimg)); new ImageSelection().exportToClipboard(lbl, getToolkit().getSystemClipboard(), TransferHandler.COPY); } COM: <s> copy the reputation panel image to clipboard </s>
funcom_train/1805339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete() { if (originalEntry != null) { try { originalEntry.delete(); } catch (ServiceException e) { SpreadsheetApiDemo.showErrorBox(e); } catch (IOException e) { SpreadsheetApiDemo.showErrorBox(e); } } originalEntry = null; newContents = null; } COM: <s> deletes this entry from the backend but not from the list </s>
funcom_train/25187642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetAdditionalItems_JSchema() throws Exception { System.out.println("setAdditionalItems"); JSchema instance = new JSchema(); JSchema expResult = new JSchema(); assertNull(instance.getAdditionalItems()); assertTrue(instance.isAdditionalItems()); instance.setAdditionalItems(expResult); assertTrue(instance.isAdditionalItems()); } COM: <s> test of set additional items method of class jschema </s>
funcom_train/5419928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public int nextDocId( int kind, Session s ) throws HibernateException { int next = 0; Transaction tx = null; try { tx = s.beginTransaction(); DocCounter cnt = getCounterInstance( kind, s); next = cnt.getNextDocId(); tx.commit(); } catch( HibernateException e ) { if( tx != null ) tx.rollback(); throw e; } return next; } COM: <s> return the next doc </s>
funcom_train/44309305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireAlgorithmStarted(int numberOfPhases) { EventListener[] eventListeners=m_listenerList.getListeners(AlgorithmProgressListener.class); for (int i=0;i<eventListeners.length;i++) ((AlgorithmProgressListener)eventListeners[i]).algorithmStarted(this,numberOfPhases); } COM: <s> notifies listeners that the algorithm has started </s>
funcom_train/25293354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTextureBlendColor(Color4f textureBlendColor) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_BLEND_COLOR_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("TextureAttributes2")); if (isLive()) ((TextureAttributesRetained)this.retained).setTextureBlendColor(textureBlendColor); else ((TextureAttributesRetained)this.retained).initTextureBlendColor(textureBlendColor); } COM: <s> sets the texture constant color for this </s>
funcom_train/31038629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IRegion getCoverage() { if (fMap.isEmpty()) return new Region(0, 0); int offset= -1; int endOffset= -1; Iterator e= fMap.values().iterator(); while (e.hasNext()) { IRegion r= (IRegion) e.next(); if (offset < 0 || r.getOffset() < offset) offset= r.getOffset(); int end= r.getOffset() + r.getLength(); if (end > endOffset) endOffset= end; } return new Region(offset, endOffset - offset); } COM: <s> returns the coverage of this event </s>
funcom_train/14052083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setPages(String[] pageNames) { attributeSetIDs = pageNames; attributeSets = new AttributeSet[attributeSetIDs.length]; for (int n = 0; n < attributeSets.length; n++) { attributeSets[n] = new AttributeSet(getNamespace(), attributeSetIDs[n].toString()); attributeSets[n].setOrdinal(n); } } COM: <s> sets the pages attribute of the paged attribute set object </s>
funcom_train/24574792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigInteger getValue(String name) { BigInteger value = localMemory.get(name); if ( value!=null ) { return value; } value = globalMemory.get(name); if ( value!=null ) { return value; } // not found in local memory or global memory System.err.println("undefined variable "+name); return BigInteger.ZERO; } COM: <s> get value of name up call stack </s>
funcom_train/39126517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Graph (String inGraphTitle, String inXTitle, String inYTitle) { // Clear the window and set up the listener clearGraph (inGraphTitle, inXTitle, inYTitle); setupWindowListener (); // Default window size setSize (640, 480); } // Graph (String,String,String) COM: <s> preferred constructor which provides labels for graph x and y axes </s>
funcom_train/882530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLatestTimestamp2() { // performChecks() without conflict CheckerImpl checkerMock = new CheckerImplMock(); List<CheckerImpl> checkerList = new ArrayList<CheckerImpl>(); checkerList.add(checkerMock); ObjectModel om = new ObjectModelMock(); ConflictListImpl cfList = new ConflictListImpl(om, checkerList); try { cfList.performChecks(); } catch (CheckException e) { e.printStackTrace(); fail(); } assertNull(cfList.getLatestTimestamp()); } COM: <s> test method for </s>
funcom_train/40233035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Library parse(ClassDoc[] classes, LibrarySignature librarySignature) { log.info("Parsing " + librarySignature.getShortName() + "..."); Library library = new Library(librarySignature); for (ClassDoc clazz : classes) { Tag tag = parseTag(clazz); if (tag != null) { library.add(tag); } else { recollectFunctionData(clazz, library); } } return library; } COM: <s> create the intermediate memory model for the javadoc information </s>
funcom_train/42385203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OpenMBeanConstructorInfoSupport make() { int sz = sig.size(); OpenMBeanParameterInfoSupport[] arr = new OpenMBeanParameterInfoSupport[sz]; for (int i = 0; i < sz; i++) { arr[i] = sig.get(i).make(); } return new OpenMBeanConstructorInfoSupport(name, desc, arr); } COM: <s> creates a new open mbean constructor info support object populated with </s>
funcom_train/6445968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printDeploymentHtml(PrintWriter body) throws Exception { deployer.finishDeployment(); body.println("<table cellspacing=\"1\" cellpadding=\"2\" border=\"1\">\n"); body.println("<tr align=\"left\">\n"); body.println("<th>Bean Name</th>\n"); body.println("<th>Deployment Id</th>\n"); body.println("<th>Container Id</th>\n"); body.println("<th>Resource References</th>\n"); body.println("</tr>\n"); body.println(deployer.getDeploymentHTML()); body.println("</table>"); } COM: <s> prints a table of deployment html </s>
funcom_train/26345186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeHistory() { try { if (!new File(settings).isDirectory()) { new File(settings).mkdirs(); } BufferedWriter writer = new BufferedWriter(new FileWriter( historyFile)); for (int i = 0; i < history.size(); i++) { writer.write(history.elementAt(i).toStringLong()); writer.newLine(); } writer.close(); } catch (IOException e) { } } COM: <s> this method writes the history to a file </s>
funcom_train/29881828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JButton createCloseFileButton() { JButton tJButton = createToolBarButton("V221CloseFile.png", "Close File (Ctrl F4)"); tJButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) {mOpenPCLViewer.actionCloseFile();} }); return tJButton; } COM: <s> close file toolbar button </s>
funcom_train/38495754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNonNotation() { //provide '<!non-notation' //or '<!NOTATION1' String[] nonNotations = { " ", "\n\t \n", "<!TEST ", "<!ENTITY asdasa", "<!NOTATION1", "<~NOTATION", "NOTATION", "!NOTATION", "<NOTATION", "<!notation", "<!Notation" }; for (int i = 0; i < nonNotations.length; i++) { checkNonNotation(nonNotations[i]); } } COM: <s> cr java doc add javadoc for notation reader impl test test non notation </s>
funcom_train/21907184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String viewAction() { logger.debug("viewAction is invoked"); User userToEdit = (User) userDataTable.getRowData(); setUser (userToEdit); Map requestParameters = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap(); String viewType = (String)requestParameters.get(VIEW_TYPE); if ( "edit".equals( viewType )) { return NavigationResults.EDIT_USER; } else { return NavigationResults.VIEW_USER; } } COM: <s> view an user </s>
funcom_train/33371324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Symbol guess() { StatisticalSelector stat = new StatisticalSelector(); Set symbols = getPossibleSymbols(lastInput); Iterator it = symbols.iterator(); while(it.hasNext()) { Symbol x = (Symbol)it.next(); int[] w = getWeights(lastInput, x); float weight = 0; for(int i=0; i<w.length; i++) weight += ((float)w[i]) * levels[i]; stat.add(x, weight); } return (Symbol)stat.select(); } COM: <s> attemts to guess the next symbol based on the current </s>
funcom_train/46321869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyAcceleration(TextObject to, PVector acceleration) { PVectorProperty totalForce = (PVectorProperty) to.getProperty("Force"); PVector newForce = new PVector(acceleration.x, acceleration.y, acceleration.z); newForce.mult(getMass(to).get()); PVector newTotalForce = totalForce.get(); newTotalForce.add(newForce); totalForce.set(newTotalForce); } COM: <s> applies an acceleration to a text object </s>
funcom_train/11648857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSectionProperty(String sectionName, String propertyName, String propertyValue) { String name = cleanName(sectionName); Section section = getSection(name); if (section == null) { section = addSection(name); } section.put(propertyName, propertyValue); } COM: <s> sets a name value pair for the section with the given </s>
funcom_train/33734509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputStream getInputStream(String fileName, final boolean fromCache) throws Exception { FileInputStream stream = null; if(!fromCache) { downloadImageToCache(fileName); } log.debug("Obtaining input stream from cache file."); try { stream = this.context.openFileInput(fileName); } catch(Exception ex) { log.error("Error opening a stream to the local file", ex); throw ex; } return stream; } COM: <s> method to obtain the input stream from either the cache or a url </s>
funcom_train/21112900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void extend() { this.setLayout(new TableLayout(this.extended)); this.add(this.topBar, "0,0,2,0"); this.add(new JScrollPane(this.content), "1,1"); this.setSize(new Dimension(this.topBar.getSize().width, this.topBar .getSize().height + this.content.getSize().height)); /* * Must notify the container that the contents have chnaged. */ this.repaint(); this.revalidate(); } COM: <s> extends the given drop down widget </s>
funcom_train/16524205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFilter() throws Exception { String filter = ""; if (reader != null) { filter += reader.getFilter(); } if (writer != null) { filter += (filter.length() > 0 ? "," : "") + writer.getFilter(); } return filter; } COM: <s> returns the filters of both the reader and writer as a </s>
funcom_train/13636292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getExpectedSenderNum() { try { return state.getMessageStore().getNextSenderMsgSeqNum(); } catch (final IOException e) { getLog().onErrorEvent("getNextSenderMsgSeqNum failed: " + e.getMessage()); return -1; } } COM: <s> retrieves the expected sender sequence number </s>
funcom_train/47833673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkPeriodicallyForMonitoringResults() { // initialise a new MonitoringResultsManager thread monResultTimer = new Timer(); //MonitoringResultsManager manager = new MonitoringResultsManager(slaId, ndaec); monResultTimer.schedule(monitoringResultsManager, 10000, 20000); logger.debug("scheduledExecutionTime: " + monitoringResultsManager.scheduledExecutionTime()); } COM: <s> checks periodically for monitoring results generated by everest </s>
funcom_train/32966022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OutputStream marshalToStream(Response response,OutputStream output) throws JAXBException { Marshaller m = getMarshaller(); m.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE ); //m.setProperty("com.sun.xml.bind.namespacePrefixMapper", new TranscendNameSpacePrefixMapper()); m.marshal(response, output ); return output; } COM: <s> method to convert trim to a payload </s>
funcom_train/36717307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int update(ManagedSXE updatedMessage) { timeLastSeen = Calendar.getInstance(); uri = updatedMessage.getUri(); System.err.println("Previous message from " + updatedMessage.id + " had resources " + availResources + ", new message reports " + updatedMessage.availResources ); if(availResources != updatedMessage.availResources){ int diff = availResources - updatedMessage.availResources; availResources = updatedMessage.availResources; return diff; } return 0; } COM: <s> sets time last seen to be right now </s>
funcom_train/14057546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDisabled(boolean disabled) { if(this._disabled != disabled) { _disabled = disabled; Node node = this.getOwnerNode(); if(node != null) { node.setUserData(KEY_DISABLED_CHANGED, Boolean.valueOf(disabled), null); } } } COM: <s> we will need to respond more fully if a stylesheet is disabled probably </s>
funcom_train/19424250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getStartIndex(String startsWith, List options) { int startIndex = 0; for (int x=0; x<options.size()&&startIndex==0; x++) { LabelValueBean lvb = (LabelValueBean) options.get(x); String label = lvb.getLabel().toLowerCase(); if (label.startsWith(startsWith) || label.compareTo(startsWith) > 0) { startIndex = x + 1; } } return startIndex; } COM: <s> p this method determines the starting index when a search is performed </s>
funcom_train/42991641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String visit(AssignUnaryConversion i) { String instruction = ""; instruction = "\t" + JasminType.getInstructionPrefix(i.getLhs()) + "load " + i.getRhs().getNumber() + "\n"; instruction += "\t" + JasminType.getInstructionPrefix(i.getLhs()) + "store " + i.getLhs().getNumber(); return instruction; } COM: <s> visits unary conversion e </s>
funcom_train/6205788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initDebugValues() { String flag; flag = Platform.getDebugOption(TRACING_DEBUG); TRACING_DEBUG_VALUE = (TRACING_TRUE_VALUE.equals(flag) || DEBUG_ALL); flag = Platform.getDebugOption(TRACING_DEBUG_MODEL); TRACING_DEBUG_MODEL_VALUE = TRACING_TRUE_VALUE.equals(flag) || DEBUG_ALL; flag = Platform.getDebugOption(TRACING_DEBUG_TEMPLATES); TRACING_DEBUG_TEMPLATES_VALUE = TRACING_TRUE_VALUE.equals(flag) || DEBUG_ALL; } COM: <s> caches the debug values on startup </s>
funcom_train/9119118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWarnings(List<ValidationMessage> warnings, boolean forAttributes) { for (ValidationMessage warning : warnings) { String newLocator = getQualifiedName() + (forAttributes ? "" : getLocatorSuffix()) + warning.getLocator(); getWarnings().add(ValidationMessage.newWarning(warning.getText(), newLocator)); } } COM: <s> convenience method to add multiple warnings to the list of validation warnings </s>
funcom_train/8072496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String limit(String sql, int n) { n++; Matcher m = Pattern.compile(" where", Pattern.CASE_INSENSITIVE).matcher(sql); if (!m.find()) { return (sql + " WHERE ROWNUM<" + n); } return (sql.substring(0, m.end()) + " ROWNUM<" + n + " AND " + sql.substring(m.end())); } COM: <s> makes an sql query limited to n results </s>
funcom_train/17489603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void message(String messageString) { final String msg = messageString; javax.swing.SwingUtilities.invokeLater (new Runnable() { public void run() { try { textPane.setEditable(true); document.insertString(document.getLength(), msg, style); frame.setVisible(true); } catch (BadLocationException e) { throw new IllegalStateException("Failed to display message: " + msg); } textPane.setEditable(false); } }); } COM: <s> print a message string in the window </s>
funcom_train/31361503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Map getEntityPool(String entityName) { Map entityPool = null; if (entityPools.containsKey(entityName)) { entityPool = (Map) entityPools.get(entityName); } else { //checked the entity existance. ObjectMap objectMap = ObjectMapPool.getInstance().getObjectMap(entityName); if( objectMap == null ) return null; entityPool = new Hashtable(); entityPools.put(entityName, entityPool); } return entityPool; } COM: <s> get entity pool </s>
funcom_train/45711636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Manifest getManifestFromProject(Resource aResource) throws IOException { try { for (File manifestFolder : aResource.getFile().listFiles(m_ManifestDirectoryFilter)) { for (File manifestFile : manifestFolder.listFiles(m_ManifestFilter)) return new Manifest(new FileInputStream(manifestFile)); } } catch (IOException aEx) { log.error("Problem reading MANIFEST.MF from resource" + aResource.getFilename()); throw aEx; } return null; } COM: <s> return an eclipse projects manifest </s>
funcom_train/3915264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddResourceAsFile_NoResourceName() throws Exception { registerDefaultDatabase(); XMLResource resource = xindiceEmbeddedDatabaseManager.addResourceAsFile(COLLECTION_NAME, xmlFile, null); assertNotNull("XMLResource was null", resource); assertNotNull("XMLResource ID wrong", resource.getId()); } COM: <s> check that a resource id name is created if one is not provided </s>
funcom_train/2002388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int readInt32() throws IOException{ int retval = 0; //System.out.println("Readint32 " + bit_input.available()); for(int i = 0; i < 4; i++){ int b = (int)bit_input.readBits(8); //System.out.println("Byte : " + i + " = " + b); retval |= (b << (4-i-1)*8); } return retval; } COM: <s> reads a 32 bit integer from the bit stream </s>
funcom_train/23271206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof KeyedPaint)) { return false; } KeyedPaint that = (KeyedPaint) obj; if (!ObjectUtilities.equal(this.key, that.key)) { return false; } if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } return true; } COM: <s> tests if this object is equal to another </s>
funcom_train/15627358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean doSaveMapAs(final boolean performAction) { final MapControl<G, A, R> mapControl = currentMapControl; if (mapControl == null) { return false; } if (performAction) { if (!fileControl.saveAs(mapControl)) { return false; } } return true; } COM: <s> executes the save map as action </s>
funcom_train/21503362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFractionalLengthPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FixedPointDataType_fractionalLength_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FixedPointDataType_fractionalLength_feature", "_UI_FixedPointDataType_type"), DMLPackage.Literals.FIXED_POINT_DATA_TYPE__FRACTIONAL_LENGTH, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the fractional length feature </s>
funcom_train/3430328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWriter(Writer writer) { // if we are tracing events we need to trace what // characters are written to the output writer. if (m_tracer != null && !(writer instanceof SerializerTraceWriter) ) m_writer = new SerializerTraceWriter(writer, m_tracer); else m_writer = writer; } COM: <s> specifies a writer to which the document should be serialized </s>
funcom_train/48146078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void data2Table(String[] raw_y, double[] transformed, String colname1, String colname2, int row_count){ int columnCount =2; rowNumber = row_count; columnNumber = columnCount; example = new String[rowNumber][columnNumber]; columnNames = new String[columnNumber]; columnNames[0]=colname1; columnNames[1]=colname2; for (int i=0; i<rowNumber; i++){ example[i][0] = raw_y[i]; example[i][1] = Double.toString(transformed[i]); } dataTable = new JTable(example, columnNames); return; } COM: <s> for qqpower use data from one array to fill a jtable </s>
funcom_train/49080852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reads(int readCount) { hashMap.put("key", "value"); stopWatch.startTimer(); for (int i=0; i<readCount; i++) hashMap.get("key"); stopWatch.reportElapsedTime(numberFormat.format(readCount) + " reads"); } COM: <s> might be a better test if it read six to ten values </s>
funcom_train/50737834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processWindowEvent(WindowEvent e) { //log.debug("processWindowEvent() - method to monitor low level windows events"); super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { jMenuFileExit_actionPerformed(null); } } COM: <s> overridden so we can exit when window is closed </s>
funcom_train/43245542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRegistrationDate() { System.out.println("getRegistrationDate"); ApplicationObject instance = new ApplicationObject(); Calendar expResult = null; Calendar result = instance.getRegistrationDate(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get registration date method of class org </s>
funcom_train/16304227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNeuron(int idx, Neuron neuron) { neuron.setParentLayer(this); this.neurons = Arrays.copyOf(neurons, neurons.length+1); // first grow array to make space for new neuron for (int i = neurons.length-1; i > idx; i++ ) // shift neurons right to make space at idx position this.neurons[i] = this.neurons[i-1]; this.neurons[idx] = neuron; } COM: <s> adds specified neuron to this layer at specified index position </s>
funcom_train/5244416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Token emit() { Token t = new CommonToken(input, state.type, state.channel, state.tokenStartCharIndex, getCharIndex()-1); t.setLine(state.tokenStartLine); t.setText(state.text); t.setCharPositionInLine(state.tokenStartCharPositionInLine); emit(t); return t; } COM: <s> the standard method called to automatically emit a token at the </s>
funcom_train/7421668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component computeWellStructured() { Component result = computeFlow(false); if (result == null) { result = computeSpecialFlow(false); } if (result == null) { result = computeIf(false); } if (result == null) { result = computePick(false); } if (result == null) { result = computeWhile(); } if (result == null) { result = computeRepeat(); } if (result == null) { result = computeRepeatWhile(); } return result; } COM: <s> computes a well structured component in the container </s>
funcom_train/15490918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nudgeCorner(int key) { if (type>OVAL || clipboard!=null) return; switch(key) { case KeyEvent.VK_UP: height--; if (height<1) height = 1; break; case KeyEvent.VK_DOWN: height++; if ((y+height) > yMax) height = yMax-y; break; case KeyEvent.VK_LEFT: width--; if (width<1) width = 1; break; case KeyEvent.VK_RIGHT: width++; if ((x+width) > xMax) width = xMax-x; break; } updateClipRect(); imp.draw(clipX, clipY, clipWidth, clipHeight); oldX = x; oldY = y; cachedMask = null; showStatus(); } COM: <s> nudge lower right corner of rectangular and oval rois by </s>
funcom_train/44216660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JTextField getEndTextField() { if (endTextField == null) { endTextField = new JTextField(); endTextField.setHorizontalAlignment(JTextField.RIGHT); endTextField.setEditable(true); endTextField.setBounds(new java.awt.Rectangle(260,15,70,20)); } return endTextField; } COM: <s> this method initializes end text field </s>
funcom_train/21952069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNextState(String currentState) { int current = mStateList.indexOf(mState); if (current > -1 && current < (mStateList.size() -1)) { String newState = mStateList.get(current + 1); return newState; } else { return null; } } COM: <s> gets the next state </s>
funcom_train/19054410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ToggleListAction(WWEListDialog dlg, Element currentElement) { String currentTag = dlg.getListTag(); AttributeSet ats = dlg.getAttributes(); String newTag = dlg.getListTag(); if (newTag == null) { m_editor.toggleList(newTag, ats, true); } else { m_editor.toggleList(newTag, ats, false); } } COM: <s> used in insert list action and format list action </s>
funcom_train/49009223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton3() { if (jButton3 == null) { jButton3 = new JButton(); jButton3.setText("清除杂点"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { Filter filter = new ClearFilter(); doFilter(filter, true); } }); } return jButton3; } COM: <s> this method initializes j button3 </s>
funcom_train/36493919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String start() { if (this.executor == null) { this.addActionError("Executor task does not exist"); } if (this.executor.isStarted()) { this.addActionError("Executor task already started"); } else { this.log.info("Starting executor"); this.executor.run(); } return SUCCESS; } COM: <s> p start the main export operation loaded by an hidden iframe </s>
funcom_train/14296221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cm3Wizard Wizard() { if (myWizard == null) { for (Iterator i = Requirement().iterator(); i.hasNext();) { Dependency d = (Dependency) i.next(); if (d.Supplier() instanceof Cm3Wizard) { myWizard = (Cm3Wizard) d.Supplier(); break; } } } return myWizard; } COM: <s> returns the associated wizard </s>
funcom_train/40791939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand() { if (okCommand == null) {//GEN-END:|20-getter|0|20-preInit // write pre-init user code here okCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|20-getter|1|20-postInit // write post-init user code here }//GEN-BEGIN:|20-getter|2| return okCommand; } COM: <s> returns an initiliazed instance of ok command component </s>
funcom_train/45384736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataFrame addFrame() { DataFrame f = getActiveFrame(); if (createFrame || (getDataFrames().size() == 0)) { f = new DataFrame(title + " <" + frameIndex + "> ", this); frameIndex++; this.add(f); } return f; } COM: <s> creates and adds new data frame </s>
funcom_train/32861637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onClickMap(int[] destination) { MapElement clicked; clicked = converter.whatIs(destination); String clickedName; clickedName = clicked.toString(); if (clickedName == "Automat") { if (automatControl.buy() == true) inventory.addItem(new Item()); } } COM: <s> called with a screen position on the map field to handle probable action </s>
funcom_train/22640623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(T... items) { if (mOriginalValues != null) { synchronized (mLock) { for (T item : items) { mOriginalValues.add(item); } if (mNotifyOnChange) notifyDataSetChanged(); } } else { for (T item : items) { mObjects.add(item); } if (mNotifyOnChange) notifyDataSetChanged(); } } COM: <s> adds the specified items at the end of the array </s>