__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/49320905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JButton makeOpenButton() { if (openButton == null) { openButton = makeButton(target.getOpenAction()); } updateButton(openButton, _I18N.getString("open"), Resources.getIcon("Open24.gif")); target.getOpenAction().setEnabled(true); return openButton; } COM: <s> make the open button if it does not yet exists </s>
funcom_train/1387444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getVibrate(){ final CheckBox vib = (CheckBox) findViewById(R.id.VibrateCheckbox); vib.setChecked(currentSettings.getVibration()); vib.setOnCheckedChangeListener(new OnCheckedChangeListener() { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { currentSettings.setVibration(isChecked); Log.v(TAG, "under onCheckedChanged: " + isChecked); } }); } // ends getVibrate method COM: <s> it is invoked when vibrate is clicked </s>
funcom_train/37071617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAttributionType(String id) throws SQLException { String query = "SELECT attribution_type from pub_attributiontype " + " WHERE id=?"; PreparedStatement stmt = conn.prepareStatement(query); try { stmt.setString(1, id); ResultSet rs = stmt.executeQuery(); while (rs.next()) { return rs.getString(1); } return ""; } finally { stmt.close(); } } COM: <s> get attribution type for a given id </s>
funcom_train/30008548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIf() { System.out.println("If"); Pattern matched = Pattern.with().literal("xml"); Pattern then = Pattern.with().literal("hello"); Pattern otherwise = Pattern.with().literal("something"); Pattern expResult = Pattern.with().choice().If(Pattern.with().literal("xml"), Pattern.with().literal("hello"), Pattern.with().literal("something")); Pattern result = Pattern.with().choice().If(matched, then, otherwise); assertEquals(expResult, result); } COM: <s> test of if method of class com </s>
funcom_train/24519939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readExpectedString (String expectedString) throws IOException { byte [] stringBytes = new byte [expectedString.length()]; // Read in the bytes and convert to a string read (stringBytes, 0, stringBytes.length); String readString = new String (stringBytes); if (readString.equals(expectedString) == false) { throw new IOException ("Expected string " + expectedString + " not found. Found: " + readString); } } COM: <s> read an expected string from the stream </s>
funcom_train/14377784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BasisSituatie readAdapter() throws IOException { if (readInt() != 3988) { Com.DPrintf("wrong read position: readadapter 3988 \n"); } String id = readString(); if (id == null) { // null adapter. :-) return null; } return BasisSituatie.getUitID(id); } COM: <s> reads the adapter id and returns the adapter </s>
funcom_train/2695800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Permission Parse(String userPermission) { if ( userPermission == null ) { this.logger.debug( "user permission string is null" ); return null; } for( Permission permission : getAllPermissions() ) { if ( permission.getLevel().equals( userPermission ) ){ return permission; } } this.logger.debug( String.format( "user permission %s not found", userPermission ) ); return null; } COM: <s> parse user permission if permission was found in this permissions or null if </s>
funcom_train/5859141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeProxy(coca.client.ClientI clientp) { proxy.makeProxy(new PFSDir(this),clientp); for (Enumeration e = this.getFSObjects().elements(); e.hasMoreElements(); ) { ((FSObject) e.nextElement()).makeProxy(clientp); } } COM: <s> makes a proxy of this fsdir on the client passed in parameter </s>
funcom_train/32789578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parentAdded() { if (!m_fUseDefaultIcon) { // Critical state already decided... FolderTreeNode ftnParent = (FolderTreeNode) getParent(); if (m_fCriticalFolder) { ftnParent.notifyCriticalChild(); } else { ftnParent.notifyUnknownChildTurnedUnCritical(); } } } COM: <s> called when this node gets a parent </s>
funcom_train/32057699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStartEditing() { System.out.println("testStartEditing"); // Add your test code below by replacing the default call to fail. boolean b; Object o = new Object(); MouseEvent m = null; BasicGraphUI x = new BasicGraphUI(); b = x.startEditing(o, m); } COM: <s> test of start editing method of class basic graph ui </s>
funcom_train/4817533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImage(Image image) { if (this.image != null) { this.image.dispose(); } if (image != null) { this.image = new Image(getParent().getDisplay(), image, SWT.IMAGE_COPY); setSize(getImageSize()); } else { this.image = null; } redraw(); fireImageChanged(); } COM: <s> sets the image based on an image object </s>
funcom_train/3720841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPreCondition(PreCondition preCondition) throws java.beans.PropertyVetoException { PreCondition oldPreCondition = this.preCondition; vetoableChangeSupport.fireVetoableChange("preCondition", oldPreCondition, preCondition); this.preCondition = preCondition; propertyChangeSupport.firePropertyChange("preCondition", oldPreCondition, preCondition); } COM: <s> setter for property pre condition </s>
funcom_train/2904243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JXMessage switchWindowWorkspace(JXWindow sw, int workspaceID){ if(sw != null){ if(sw.getWorkspaceID() != workspaceID){ long id = sw.getID().longValue(); if(!switchWindowWorkspace0(id, workspaceID)){ return new JXError(getClass(), "Failed to switch window workspace"); } } } else{ return new JXError(getClass(), "Switch window workspace error, window==null"); } return null; } COM: <s> switch the selected window to another workspace </s>
funcom_train/22417365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPropertyOfGetter(String getterName) throws XanotException { String propertyNameCapital = ""; if (getterName.startsWith("get")) { propertyNameCapital = getterName.substring(3); } else if (getterName.startsWith("is")) { propertyNameCapital = getterName.substring(2); } else { throw new XanotException("Not a getter method. " + getterName); } return Character.toLowerCase(propertyNameCapital.charAt(0)) + propertyNameCapital.substring(1); } COM: <s> get the property name of a getter method </s>
funcom_train/4744054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getEmailPassword() { if (emailPassword == null || emailPassword.isEmpty()) { daemonPropeties = new DaemonPropertiesHandler(); daemonActions = new DaemonActions(); emailConfiguration = daemonActions.getEMailConfiguration( daemonPropeties.getDBUserName(), daemonPropeties .getDBPassword()); if (emailConfiguration != null) { this.emailPassword = emailConfiguration.getPassword(); } } return emailPassword; } COM: <s> get the password from the account from which the emails should be sent </s>
funcom_train/34822858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void transform(OutputStream out) { DOMImplementationLS impl = (DOMImplementationLS) domDocument .getImplementation(); LSOutput output = impl.createLSOutput(); output.setByteStream(out); LSSerializer serializer = impl.createLSSerializer(); serializer.getDomConfig().setParameter("format-pretty-print", true); serializer.write(domDocument, output); } COM: <s> transforms the dom to the output stream </s>
funcom_train/47576360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInputActivityPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DataLink_inputActivity_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DataLink_inputActivity_feature", "_UI_DataLink_type"), DfmPackage.Literals.DATA_LINK__INPUT_ACTIVITY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the input activity feature </s>
funcom_train/36148757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumn(int column, Vector<String> data) { int row = 1; for (Enumeration e = data.elements(); e.hasMoreElements();) { setValueAt(new Cell((String)e.nextElement(), row, column), row, column); row++; } } COM: <s> sets the contents of the given column to the given data vector </s>
funcom_train/4094918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypifiedByPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EconomicResource_typifiedBy_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EconomicResource_typifiedBy_feature", "_UI_EconomicResource_type"), ReamodelPackage.Literals.ECONOMIC_RESOURCE__TYPIFIED_BY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the typified by feature </s>
funcom_train/37831289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onTokenMoved(Player player, BoardToken token) { int xIndex = getXIndex(token.getX()); int yIndex = getYIndex(token.getY()); MoveValidator validator = new TicTacToeMovementValidatorChain(); if (!validator.validate(this, player, token, xIndex, yIndex)) { token.undoMove(); return; } completeMove(xIndex, yIndex, token); } COM: <s> handling of moved token </s>
funcom_train/32820913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equivalence(Set nsa, Set nsb) { for(Iterator i = nsa.iterator();i.hasNext();) { State sa = (State)i.next(); for(Iterator j = nsb.iterator();j.hasNext();) { State sb = (State)j.next(); if(!equivalence(sa,sb)) return false; } } return true; } COM: <s> checks that all combination of states from nsa and nsb </s>
funcom_train/1833623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTagger_Merge() throws Exception { // merge - verb indicativ imperfect, persoana întâi, singular assertHasLemmaAndPos("mergeam", "merge", "V0s1000ii0"); // merge - verb indicativ imperfect, persoana întâi, plural assertHasLemmaAndPos("mergeam", "merge", "V0p1000ii0"); // merge - verb indicativ imperfect, persoana întâi, plural } COM: <s> first we test if the tagger works fine with single words </s>
funcom_train/43539821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clickButton(IUIContext ui, String buttonLabel) { try { IWidgetLocator buttonLoc = new ButtonLocator(buttonLabel); waitForControlEnabled(ui, buttonLoc, Button.class); ui.click(buttonLoc); } catch (WidgetSearchException e) { ExceptionHandler.handle(e); } } COM: <s> simple utility for clicking a button </s>
funcom_train/28996490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { adapter.adaptContent(contentItem, properties); } catch (XCSException e) { UnattainableContentSource ucs = new UnattainableContentSource(); ucs.setReasonMessage(e.toString()); contentItem.setSource(ucs); } getSleepThread().interrupt(); } COM: <s> when an object implementing interface code runnable code is used </s>
funcom_train/16947544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validAuthentication(HttpServletRequest request) { String username = (String) request.getSession().getAttribute("user"); String password = (String) request.getSession().getAttribute("pass"); System.out.print("Validating login: " + username + " / " + password + " ->"); if (verifyLogin(username, password)) { System.out.println(" ok"); return true; } else System.out.println(" failed"); return false; } COM: <s> is the user who initated this request having valid credentials </s>
funcom_train/17745558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void centerWindow() { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = frame.getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; frame.setLocation((screenSize.width - frameSize.width)/2, (screenSize.height - frameSize.height)/2); } COM: <s> centers the jframe on the screen </s>
funcom_train/33473191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void layoutContainer(final Container target) { Dimension size = preferredLayoutSize(target); if (size.equals(preferredLayoutSize)) { super.layoutContainer(target); } else { preferredLayoutSize = size; target.invalidate(); Container top = target; // while (top.getParent() != null) if (top.getParent() != null) { top = top.getParent(); } top.validate(); } } COM: <s> lays out the container </s>
funcom_train/18903748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PredicateNode getPredicateNode(AST pred) { if (pred == null) { throw new IllegalArgumentException("Unable to load NULL subjects"); } try { return new URIReferenceImpl(new URI(pred.toString())); } catch (URISyntaxException e) { throw new Error("Antlr generated an invalid predicate node", e); } } COM: <s> convert and validate an ast object into a predicate node </s>
funcom_train/46999390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commitToDatabase() throws Exception { // OrderedStroke stroke; Vector v; StrokesTrack temp = new StrokesTrack(); Vector allStrokes = strokesTrack.get(Long.MAX_VALUE); for (Object s : allStrokes) { OrderedStroke stroke = (OrderedStroke) s; if (stroke.ownerID == ownerID) temp.add(stroke); } // } COM: <s> commits a current state of strokes to the database </s>
funcom_train/20029593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSaveJumpCmd() { if (saveJumpCmd == null) {//GEN-END:|115-getter|0|115-preInit // write pre-init user code here saveJumpCmd = new Command("Ok", Command.BACK, 0);//GEN-LINE:|115-getter|1|115-postInit // write post-init user code here }//GEN-BEGIN:|115-getter|2| return saveJumpCmd; } COM: <s> returns an initiliazed instance of save jump cmd component </s>
funcom_train/50878644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setButtonsVisible(boolean inVisible){ if (inVisible == true) myPopupMenu.setLocation(getLocationOnScreen().x+getWidth()/2, getLocationOnScreen().y+getHeight()/2); myPopupMenu.setVisible(inVisible); } COM: <s> show the cascading buttons </s>
funcom_train/23453073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHasParticipantPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Process_hasParticipant_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Process_hasParticipant_feature", "_UI_Process_type"), ProcessPackage.Literals.PROCESS__HAS_PARTICIPANT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the has participant feature </s>
funcom_train/36247822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnect(ILaunch lastLaunch) { if (lastLaunch == null) return; for (IDebugTarget debugTarget : lastLaunch.getDebugTargets()) { try { debugTarget.disconnect(); } catch (DebugException e) { Status status = new Status(Status.WARNING, Ec2Plugin.PLUGIN_ID, "Unable to disconnect debugger: " + e.getMessage(), e); StatusManager.getManager().handle(status, StatusManager.LOG); logger.warning(status.getMessage()); } lastLaunch.removeDebugTarget(debugTarget); } } COM: <s> disconnects any open debugger connections associated with the specified </s>
funcom_train/50484362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDataSource(Vector v) { DataSource = v; columns = new SimpleColumns() { public int getRowCount() {return DataSource.size();} public Object getValueAt(int i) {return DataSource.get(i);} }; defineColumns(columns); columns.configureTable(this); } COM: <s> set up the table from the given vector of items </s>
funcom_train/21656077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtCancelarAvance() { if (btCancelarAvance == null) { btCancelarAvance = new JButton(); btCancelarAvance.setBounds(new Rectangle(670, 561, 126, 23)); btCancelarAvance.setMnemonic('v'); btCancelarAvance.setText("Volver al Menu"); btCancelarAvance.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ControladorPrincipal.mostrarMenuEditarProyecto(); } }); } return btCancelarAvance; } COM: <s> this method initializes bt cancelar avance </s>
funcom_train/25151886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node loadRegistryRoot(byte[] header) throws IOException { int version = readIntLE(header, I_ENCODING_VERSION); long rootId; if (version == 0) { rootId = 0; } else { if (version != ENCODING_VERSION) { throw new CorruptDatabaseException("Unknown encoding version: " + version); } rootId = readLongLE(header, I_ROOT_PAGE_ID); } return loadTreeRoot(rootId); } COM: <s> loads the root registry node or creates one if store is new </s>
funcom_train/44596523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(ModifierSet ms) { for (org.jmlspecs.eclipse.jmldom.IExtendedModifier m : ms.list) { if (m instanceof org.jmlspecs.eclipse.jmldom.Modifier) add((org.jmlspecs.eclipse.jmldom.Modifier)m); else if (m instanceof org.jmlspecs.eclipse.jmldom.Annotation) add((org.jmlspecs.eclipse.jmldom.Annotation)m); // FIXME else an error } } COM: <s> adds all the modifiers from the given modifier set to the receiver set </s>
funcom_train/50835916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addReceivedChunkNumber(long packetNr) { if(receivedChunks.get(new Long(packetNr)) == null) { receivedChunks.put(new Long(packetNr), new Boolean(true)); progress += DownloadProtocol.CHK_SIZE; Runnable update = new Runnable() { public void run() { if(FilesharingState.downloadpanel != null) FilesharingState.downloadpanel.getTable().updateUI(); } }; SwingUtilities.invokeLater(update); } } COM: <s> sets a chunk as received </s>
funcom_train/28984244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getCbSommerInnen() { if (cbVegRuheInnen == null) { cbVegRuheInnen = new JCheckBox(); cbVegRuheInnen.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { farbenInnen[1] = new Filling(labelVegRuheInnen.getBackground(), cbVegRuheInnen.isSelected()); } }); } return cbVegRuheInnen; } COM: <s> this method initializes cb sommer innen </s>
funcom_train/17025773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChild(BaseElement child) { /* Set sub process reference */ if (child instanceof FlowElement) { this.setSubProcess(this); } /* Insert into appropriate list */ if (child instanceof Artifact) { this.getArtifact().add((Artifact) child); ((Artifact) child).setSubProcess(this); } else if (child instanceof FlowElement) { this.getFlowElement().add((FlowElement) child); } } COM: <s> adds the child to the list of </s>
funcom_train/7618803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { mClosed = true; if (mParcelDescriptor != null) { // If this is a proxy to another file descriptor, just call through to its // close method. mParcelDescriptor.close(); } else { Parcel.closeFileDescriptor(mFileDescriptor); } } COM: <s> close the parcel file descriptor </s>
funcom_train/16676329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FreeValue addPasswordValue(String key, String value) { if (this.type != OptionType.TEXTFIELD && type != OptionType.UNKNOWN) { throw new IllegalStateException(I18n.getString("Option.exception.freeValuesOnlyBeAddedToTextfield")); //$NON-NLS-1$ } FreeValue val = new FreeValue(key, value, value); val.setPassword(true); addValue(val); return val; } COM: <s> adds a user chooseable value to this option which is only </s>
funcom_train/3764047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testloadPlugins_DataExtractors() { try { assertNotNull("DataExtractor plugins list must to be initialized", PluginManager.getDataExtractors()); assertTrue(PluginManager.getDataExtractors().length != 0); } catch (RpException e) { e.printStackTrace(); fail(); } } COM: <s> test the get data extractors method of the plugin manager </s>
funcom_train/4518932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object obj, int row, int col) { if (col != 1) { super.setValueAt(obj, row, col); return; } try { Integer integer = new Integer(obj.toString()); super.setValueAt(checkMinMax(integer), row, col); } catch (NumberFormatException ex) { ex.printStackTrace(); } } COM: <s> this empty implementation is provided so users dont have to implement </s>
funcom_train/1304315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addLine(String fileLine) { boolean result = false; final String[] pieces = StringUtil.splitFields(fileLine, NUM_FIELDS); if (query.equals(pieces[0])) { result = true; this.scrapedAddresses.add(new ScrapedAddress(pieces, this)); unsorted = true; } return result; } COM: <s> add the file line to this chunk if possible </s>
funcom_train/48151875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOverColor(Color overColor) { int i; _overColor = overColor; //set the over color if necessary if (_upperLimit < _size - 1) { for (i = _upperLimit + 1; i < _size; i++) { _rMap[i] = (byte) _overColor.getRed(); _gMap[i] = (byte) _overColor.getGreen(); _bMap[i] = (byte) _overColor.getBlue(); } } } COM: <s> set over color </s>
funcom_train/20645784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getChildrenAL() { ArrayList res= tet.convertToTEN(me.getChildrens()); /** Uncomment to see tarifs in Tree ArrayList tarifs = me.getTarifMapping(); for (int i = 0; i < tarifs.size(); i++) { res.add(new TarificationExplorerTarifNode(tet,this,(Tarif) tarifs.get(i))); } */ return res; } COM: <s> return the childrens vector of tarification explorer node </s>
funcom_train/3517296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Entity findEntity(Collection<? extends Entity> collection, String identifier) { for (Entity entity : collection) { if (identifier.equals(entity.getName()) || identifier.equals(entity.getAlias1()) || identifier.equals(entity.getAlias2())) { return entity; } } return null; } COM: <s> finds the entity represented by code identifier code within </s>
funcom_train/3908967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveDocumentAs(File targetFolder, IProgressMonitor monitor) throws IOException { File targetManifest = new File(targetFolder, getFile().getName()); FileUtils.copyFolder(getProjectFolder(), targetFolder, monitor); // Create new IDENTIFIERs and map to old IDENTIFIERs Hashtable idmap = createNewIDs(getRootElement()); // Change each IDENTIFIERREF to new IDENTIFIERs createNewIDRefs(getRootElement(), idmap); // Save setFile(targetManifest); saveDocument(); } COM: <s> save a copy of this content package to target folder with new guids </s>
funcom_train/2040348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendCommand(String commandType, AsyncSuccessCallback<Void> callback) { AsyncServiceFactory.getCommandServiceAsync().sendCommand( ClientDataBase.getControlPath() + getComponent().getComponentId() + "/" + commandType, ClientDataBase.userInfo.getUsername(), ClientDataBase.userInfo.getPassword(), callback); } COM: <s> send control command to controller </s>
funcom_train/30229420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int advance() { int i,nextPlr = nextPlayer(true); // false=get, true=set. for (i=0; getNumCards(nextPlr)==0 && i < NUM_PLAYERS;i++) nextPlr = nextPlayer(true); // false=get, true=set. if (i<NUM_PLAYERS && nextPlr>=0) return nextPlr; else return -5; } COM: <s> accessor sets and returns the index of the next player in turn </s>
funcom_train/37587373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void threadStarted() { assert EventQueue.isDispatchThread(); _lock.startRead(); try { int size = _listeners.size(); for (int i = 0; i < size; i++) _listeners.get(i).threadStarted(); } finally { _lock.endRead(); } } COM: <s> called when a thread starts </s>
funcom_train/17157511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addSubcommitment(final Commitment subcommitment) { Consistency.notNull(subcommitment, new IllegalArgumentException("subcommitment should not be null")); if(this.equals(subcommitment)) //can't add self return false; for(final Commitment c : this.getSchedule().getCommitments()) if(c.hasSubcommitment(subcommitment)) return false; if(subcommitment.hasSubcommitment(this)) return false; return this.subcommitments.add(subcommitment); } COM: <s> adds the specified subcommitment to the commitments subcommitment set </s>
funcom_train/34342090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTexto5() { if (texto5 == null) {//GEN-END:|33-getter|0|33-preInit // write pre-init user code here texto5 = new TextField("CAMPO 3", null, 5, TextField.NUMERIC);//GEN-LINE:|33-getter|1|33-postInit // write post-init user code here }//GEN-BEGIN:|33-getter|2| return texto5; } COM: <s> returns an initiliazed instance of texto5 component </s>
funcom_train/20307245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int termIndex(int pc) { if (rule == null) return -1; int term = 0; // Trivial linear search because this is only used for logging which is // horribly expensive anyway. while (term < rule.bodyLength()) { if (pc <= termStart[term]) { return term - 1; } term++; } return term - 1; } COM: <s> translate a program counter offset to the index of the corresponding </s>
funcom_train/12116917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC33(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.impegniAggiungiJButton_ActionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c33 impegni aggiungi jbutton </s>
funcom_train/20367895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HybridLattice (Relation relation) { this.relation = new HybridRelation(relation); allObjects = this.relation.getAllObjects(); allAttributes = this.relation.getAllAttributes(); top = conceptFromAttributes(new HybridSet((((HybridRelation)(this.relation))).getAttributeTranslator())); bottom = conceptFromObjects(new HybridSet((((HybridRelation)(this.relation))).getObjectTranslator())); } COM: <s> constructs a lattice from the passed code relation code </s>
funcom_train/36945049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPanel() { if (jContentPanel == null) { jContentPanel = new JPanel(); jContentPanel.setLayout(new BorderLayout()); jContentPanel.add(getJScrollPane(), java.awt.BorderLayout.CENTER); jContentPanel.add(getJPanel(), java.awt.BorderLayout.SOUTH); } return jContentPanel; } COM: <s> this method initializes j content panel </s>
funcom_train/34005420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBCancel() { if (bCancel == null) { bCancel = new JButton(Messages.getString("ProgressBar.1")); //$NON-NLS-1$ bCancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // interrupt scanner threads Client.getScanner().stopScanning(); Task.canceled = true; dispose(); } }); } return bCancel; } COM: <s> this method initializes b cancel jbutton </s>
funcom_train/47209480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeSystemState(int state){ Global.systemStateLock.writeLock().lock(); try{ previousState = Global.systemState; //first save the previous state Global.systemState = state; //go to the new state }finally{ Global.systemStateLock.writeLock().unlock(); } } COM: <s> changes system state to the desired state </s>
funcom_train/2293809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createError(String errorMsg, Throwable t) { StringBuffer msg = new StringBuffer(); msg.append(errorMsg); msg.append("\n"); msg.append(t.getMessage()); msg.append("\n"); msg.append(CmsException.getStackTraceAsString(t)); return createError(msg.toString()); } COM: <s> creates the html code for the given error message and the </s>
funcom_train/34597412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireKeyEvent(int id, int key, char chr) { KeyEvent evt = null; final KeyListener[] listeners = (KeyListener[]) listenerList .getListeners(KeyListener.class); for (int i = 0; i < listeners.length; i++) { // lazily create it if (evt == null) { evt = new KeyEvent(this, id, key, chr); } switch (id) { case KeyEvent.KEY_PRESSED: listeners[i].keyPressed(evt); break; case KeyEvent.KEY_RELEASED: listeners[i].keyReleased(evt); break; } } } COM: <s> fires the specified key event to all key listeners in this component </s>
funcom_train/43185973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object format) { if (format instanceof AudioFormat) { AudioFormat other = (AudioFormat) format; return super.equals(format) && sampleRate == other.sampleRate && sampleSizeInBits == other.sampleSizeInBits && channels == other.channels && endian == other.endian && signed == other.signed && frameSizeInBits == other.frameSizeInBits && frameRate == other.frameRate; } return false; } COM: <s> compares the specified code format code with this code audio format code </s>
funcom_train/28887326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeContent() { // Start the session // AuthenticationUtils.startSession( // AlfrescoDefaultValues.DEFAULT_USERNAME_PROPERTY_VALUE, // AlfrescoDefaultValues.DEFAULT_PASSWORD_PROPERTY_VALUE); createFolders(); // Get the content service ContentServiceSoapBindingStub contentService = WebServiceFactory .getContentService(); try { createNewContent(contentService, IMAGE_PATH, IMAGE_ALFRESCO_PATH); createNewContent(contentService, IMAGE_THUMBS_PATH, IMAGE_ALFRESCO_THUMBS_PATH); } catch (Exception e) { e.printStackTrace(); } } COM: <s> alfresco session must be started by class which runs this method </s>
funcom_train/15922629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Context pushCode(X10CodeDef ci) { assert (depType == null); if (reporter.should_report(TOPICS, 4)) reporter.report(4, "push code " + ci.position()); Context v = push(); v.kind = CODE; v.code = ci; v.inCode = true; v.staticContext = ci.staticContext(); return v; } COM: <s> enter the scope of a method constructor field initializer or closure </s>
funcom_train/23453009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWsdlOperationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WsdlAtomicProcessGrounding_wsdlOperation_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WsdlAtomicProcessGrounding_wsdlOperation_feature", "_UI_WsdlAtomicProcessGrounding_type"), WsdlGroundingPackage.Literals.WSDL_ATOMIC_PROCESS_GROUNDING__WSDL_OPERATION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the wsdl operation feature </s>
funcom_train/28139514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getResumptionToken(Document response) throws Exception { Namespace defaultNS = response.getRootElement().getNamespace(); Element resumptionToken = response.getRootElement().getChild( "ListRecords", defaultNS) .getChild("resumptionToken", defaultNS); if ((resumptionToken != null) && (resumptionToken.getTextTrim().length() > 0)) { return resumptionToken.getTextTrim(); } else { return null; } } COM: <s> returns the resumption token from a list records request returns null if </s>
funcom_train/49236869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Socket tcpConnectForCommunicationChannel(String host, int port) throws IOException { try { connectingCommunicationChannelSocket = new Socket(); connectingCommunicationChannelSocket.setKeepAlive(true); connectingCommunicationChannelSocket.setSoTimeout(readTimeout * 1000); connectingCommunicationChannelSocket.setSoLinger(true, closeTimeout); connectingCommunicationChannelSocket.connect(new InetSocketAddress(host, port), connectionTimeout * 1000); return connectingCommunicationChannelSocket; } finally { connectingCommunicationChannelSocket = null; } } COM: <s> creates a socket and connects it to the given host for a communication </s>
funcom_train/37109872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAllParametersString(ParameterParser pp) { Object[] keys = pp.getKeys(); String returnString = new String(); returnString = "\n"; for (int i = 0; i < keys.length; i++) { returnString += "\"" + keys[i] + "\" = \"" + pp.getObject(keys[i].toString()) + "\"\n"; } return returnString; } COM: <s> returns a string containing all parameters from parameterparser </s>
funcom_train/26485354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Provider getTargetProvider() { if ((targetProvider == null) && (targetDriver != null) && (targetUrl != null) && (targetUserid != null) && (targetPassword != null)) { targetProvider = new ProviderExt(); targetProvider.setConnectionProperties(targetDriver, targetUrl, targetUserid, targetPassword, targetSchemaName); } return targetProvider; } COM: <s> return the target schema database connection properties </s>
funcom_train/12187320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mergeChanges(Map clone) { Map current = map; this.map = clone; Set keys = current.keySet(); for (Iterator iterator = keys.iterator(); iterator.hasNext();) { Object key = iterator.next(); Object property = current.get(key); if (property == REMOVE_ON_MERGE) { removeProperty(key); } else { setProperty(key, property, false); } } } COM: <s> this helper merges the current map into the specified map and sets the </s>
funcom_train/43246124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMaidenName() { System.out.println("getMaidenName"); FamilyDemographicSpouseObject instance = new FamilyDemographicSpouseObject(); String expResult = ""; String result = instance.getMaidenName(); 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 maiden name method of class org </s>
funcom_train/22047451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String showWidth(int iWidth_pos, int Element) { if ((Element == 0) && (getColSize(iWidth_pos) > 0)) { return " WIDTH=\"" + getColSize(iWidth_pos) + (m_fWPercent ? "%" : "") + "\""; } else { return ""; } } COM: <s> used to make code below a little easier to read </s>
funcom_train/180875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void elementValidatedBoolean(String reference, String element, Boolean value, long minOccurs, long maxOccurs) throws Throwable { // validate value if (value == null) { if (minOccurs > 0) { logViolation(reference, element, "Obligatorisch"); element(element); // print empty tag } // else suppress empty tag } else { element(element, encodeBoolean(value)); } } COM: <s> validate a string tag and print it into stream </s>
funcom_train/43637104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateConceptPriors() { for (Concept c : tSet.getConceptSet()) { //Calculate the priors for the concepts int totalConceptCount=0; for (Instance i : tSet.getInstances().values()) { if (i.getConcept().equals(c)) { totalConceptCount++; } } conceptPriors.put(c, new Double(totalConceptCount)); } } COM: <s> strictly speaking these are not the prior probabilities but just the counts </s>
funcom_train/40622761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int insertRow(int beforeRow) { // Specifically allow the row count as an insert position. if (beforeRow != getRowCount()) { checkRowBounds(beforeRow); } Element tr = createRow(); Element beforeRowElem = rowFormatter.getRawElement(beforeRow); bodyElem.insertBefore(tr, beforeRowElem); return beforeRow; } COM: <s> inserts a new row into the table </s>
funcom_train/3986197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public Vector getChildrenNamed(String name) { // Vector result = new Vector(this.children.size()); // Enumeration enum = this.children.elements(); // while (enum.hasMoreElements()) { // XMLElement child = (XMLElement) enum.nextElement(); // String childName = child.getFullName(); // if ((childName != null) && childName.equals(name)) { // result.addElement(child); // } // } // return result; // } COM: <s> returns a vector of all child elements named i name i </s>
funcom_train/3840440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeConnection() { try { /* Fermeture des flux. */ if (_inputData != null) { _inputData.close(); } if (_outputData != null) { _outputData.close(); } /* Fermeture de la connection. */ _server.close(); } catch (IOException ioe) { debugPrintln("Connection closed: " + ioe.toString()); } } COM: <s> cleanly closes the connection between the client and the server </s>
funcom_train/18032208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calcSize() { if (m_image != null) { setPreferredSize(new Dimension( m_image.getWidth(null) + MARGIN * 2, m_image.getHeight(null) + MARGIN * 2)); setSize(new Dimension( m_image.getWidth(null) + MARGIN * 2, m_image.getHeight(null) + MARGIN * 2)); } } COM: <s> claclulates the size of this component </s>
funcom_train/45302916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getInputPanel() { if (inputPanel == null) { inputPanel = new JPanel(); inputPanel.setLayout(new BorderLayout()); JScrollPane input = new JScrollPane(getInputArea()); input.setPreferredSize(new Dimension(350, 500)); inputPanel.add(input, BorderLayout.CENTER); inputPanel.add(getInputControlPanel(), BorderLayout.SOUTH); } return inputPanel; } COM: <s> getter for the input panel </s>
funcom_train/46603762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTeamInfo() throws Exception { System.out.println("getTeamInfo"); String shortname = "testTeam01"; net.eino.tiimikansio.TeamInfo expResult = null; net.eino.tiimikansio.TeamInfo result = u.getTeamInfo(shortname); assertEquals(expResult, result); } COM: <s> test of get team info method of class net </s>
funcom_train/45935939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printDescription(ExecutableMemberDoc doc) { String linkTitle = (doc instanceof MethodDoc) ? "Method" : (doc instanceof ConstructorDoc) ? "Constructor" : "Annotation type"; linkTitle += " in " + containerTypeAndName(doc); String linkClass = (doc instanceof MethodDoc) ? "method" : (doc instanceof ConstructorDoc) ? "constructor" : "annotation_type_element"; printDTWithClass(linkToLabelHrefTargetTitle(doc.name() + getJoinedParameters(doc, false, false, false), hrefToDoc(doc), null, linkTitle), visibilityModifier(doc) + linkClass + deprecationTag(doc)); printDD(getCommentSummary(doc)); } COM: <s> create description for a constructor method or annotation type </s>
funcom_train/25332448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetResult_CallableStatement_int() throws Exception { CoordinateSystemSeqLevelTypeHandler instance = new CoordinateSystemSeqLevelTypeHandler(); final CallableStatement cs = this.context.mock(CallableStatement.class); int columnIndex = 0; Object result = instance.getResult(cs, columnIndex); assertNull(result); } COM: <s> test of get result method of class coordinate system seq level type handler </s>
funcom_train/24126753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long copyInputStreamToOutputStream(InputStream is, OutputStream os) throws IOException { long count = 0; byte[] buffer = new byte[8192]; for (int length; (length = is.read(buffer)) > -1;) { os.write(buffer, 0, length); count+=length; } return count; } COM: <s> kopiert einen inputstream in einen outputstream </s>
funcom_train/35874382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getTxtPanelDescricaoAcabamento() { if (txtPanelDescricaoAcabamento == null) { txtPanelDescricaoAcabamento = new JTextPane(); txtPanelDescricaoAcabamento.setBounds(new Rectangle(140, 55, 572, 147)); txtPanelDescricaoAcabamento.setToolTipText("Digite a descrição do Acabamento interno"); } return txtPanelDescricaoAcabamento; } COM: <s> this method initializes txt panel descricao acabamento </s>
funcom_train/28749538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String newVal) { if ((newVal != null && this.name != null && (newVal.compareTo(this.name) == 0)) || (newVal == null && this.name == null && name_is_initialized)) { return; } this.name = newVal; name_is_modified = true; name_is_initialized = true; } COM: <s> setter method for name </s>
funcom_train/2731617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SequenceCt visit(SequenceCt seqCt) { logger.debug("<SequenceCt>"); SequenceCt newSeqCt = ruleFactory.createSequenceCt(); visitCt(seqCt, newSeqCt); logger.debug("<Before>" + printer.visit(seqCt) + "</Before>"); logger.debug("<After>" + printer.visit(newSeqCt) + "</After>"); logger.debug("</SequenceCt>"); return newSeqCt; } COM: <s> makes substitutions on a sequence comprehension term </s>
funcom_train/42754121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTask(final PipedInputStream aIn, String aAbsoluteFilePath) { // wait for the input stream to become ready synchronized(lock){ try { in = aIn; path = aAbsoluteFilePath; // create the output pipe vOut = new PipedOutputStream(in); // notify waiting thread that their input pipe is now connected lock.notifyAll(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } COM: <s> enqueues the next task for the preprocessor thread </s>
funcom_train/3286589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Document getDescriptorDocument(String aDescriptorSource) throws ImbriumException { try { DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); StringReader reader = new StringReader(aDescriptorSource); InputSource source = new InputSource(reader); return builder.parse(source); } catch (ParserConfigurationException e) { throw new ImbriumException(e); } catch (FactoryConfigurationError e) { throw new ImbriumException(e); } catch (SAXException e) { throw new ImbriumException(e); } catch (IOException e) { throw new ImbriumException(e); } } COM: <s> return an xml document for the given source </s>
funcom_train/41165733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoExercises2 entity) { EntityManagerHelper.log("saving CoExercises2 instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co exercises2 entity </s>
funcom_train/38288197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PageLocator getNext() { List<BaseWizardPage> pageDelegates = pages.get(wizard); if (pageDelegates.size() - 1 > pageIndex) return new PageLocator(wizard, wizardIndex, pageIndex + 1); if (wizards.size() - 1 > wizardIndex) return new PageLocator(wizards.get(wizardIndex + 1), wizardIndex + 1, 0); return null; } COM: <s> returns locator for next page </s>
funcom_train/8803923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Bbuf readFrom(java.io.InputStream in) throws java.io.IOException { byte[] iobuf = new byte[COPY]; int count; while (0 < (count = in.read(iobuf,0,COPY))) this.write(iobuf,0,count); return this; } COM: <s> read the stream contents into memory </s>
funcom_train/4780149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel getGroupAccessRulesPanel() { if (groupAccessRulesPanel == null) { groupAccessRulesPanel = new JPanel(new BorderLayout()); groupAccessRulesPanel.setBorder(BorderFactory.createEmptyBorder(7, 0, 0, 0)); groupAccessRulesPanel.add(createLabel("mainframe.accessrules"), BorderLayout.NORTH); groupAccessRulesPanel.add(getGroupAccessRulesScrollPane(), BorderLayout.CENTER); } return groupAccessRulesPanel; } COM: <s> this method initializes group access rules panel </s>
funcom_train/9695985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { final StringBuffer result = new StringBuffer(getPath()); if (getErrorStackTrace() != null) { result.append(", 1 error"); } if (getFailureStackTrace() != null) { result.append(", 1 failure"); } return result.toString(); } COM: <s> gets string representation of this test </s>
funcom_train/6464715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(String key, Object value) throws AILibException { ParameterDefinition pd = ParameterDefinition.get(key); if(pd == null) throw new InvalidParameterException(this.getClass(), "set(java.lang.String,java.lang.Object)", key); set(pd, value); } COM: <s> assigns the given value to the named parameter </s>
funcom_train/22285912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean handleEvent(Event evt) { PopupMenu menu = getMenu(); if (menu != null) { switch (evt.id) { case Event.MOUSE_ENTER: if (evt.target == this) { menu.select(this); return true; } break; case Event.MOUSE_EXIT: if (evt.target == this) { select(false); // keyboard events can cause a state in which the current is // not this menu item, so the current has to be deselected. if (menu.current != null) { menu.current.select(false); menu.current = null; } return true; } break; } } return super.handleEvent(evt); } COM: <s> handle mouse move events </s>
funcom_train/24086557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCorrectlyWeighted(List<String> errormessages) { // A leaf is always weighted correctly as long as its weight is in [0,1] if (this.weight >= 0 && this.weight <= 1) { return true; } errormessages.add("Leaf " + this.getName() + " has an illegal weight (" + this.weight + ")"); return false; } COM: <s> checks if the weight is in 0 1 </s>
funcom_train/39531103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PossibilitiesList getSuitableSignsForCode(String code) { if (GardinerCode.isCorrectGardinerCode(code)) { if (!possibilityListsForKeyBoard.containsKey(code)) { PossibilitiesList p = distributionInfoManager .getSuitableSignsForCode(code); PossibilitiesList p1 = userInfoManager .getSuitableSignsForCode(code); possibilityListsForKeyBoard.put(code, p.add(p1)); } return possibilityListsForKeyBoard.get(code); } else { return new PossibilitiesList(code); } } COM: <s> get the all the codes which might match a generic gardiner code </s>
funcom_train/9548983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createNewProject() { final IProject newProject = page.getProjectHandle(); WorkspaceModifyOperation op = new WorkspaceModifyOperation() { @Override protected void execute(IProgressMonitor monitor) throws CoreException { newProject.create(monitor); newProject.open(monitor); setNature(newProject, Modula2Nature.NATURE_ID); } }; try { getContainer().run(false, true, op); } catch (Exception e) { MessageDialog.openError(getShell(), Messages.Modula2ProjectWizard_ErrorCreatingProjectTitle, Messages.Modula2ProjectWizard_ErrorCreatingProjectMessage); PluginUI.log(e); } } COM: <s> creates the new project and assigns it the modula 2 nature </s>
funcom_train/4963552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void animateLayoutChanges(){ if(!(layout instanceof CircleLayout)){ Relaxer relaxer = new VisRunner((IterativeContext)layout); relaxer.stop(); relaxer.prerelax(); StaticLayout<Object,Object> staticLayout = new StaticLayout<Object,Object>(g, layout); LayoutTransition<Object,Object> lt = new LayoutTransition<Object,Object>(vv, vv.getGraphLayout(), staticLayout); Animator animator = new Animator(lt); animator.start(); } } COM: <s> this method will animate the transition between two layouts </s>