__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/777560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEqualMessages() throws ACLCodec.CodecException { AclMsgCmp amc = new AclMsgCmp(); ACLMessage msg1 = AclMsgCmp.stringToMessage( proxyMsg ); ACLMessage msg2 = AclMsgCmp.stringToMessage( proxyMsg ); String diffMsg = amc.compare( msg1, msg2 ); assertNull( "erroneously found difference:"+diffMsg, diffMsg ); } COM: <s> test that equal messages are returned as equal </s>
funcom_train/7275946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean multicastFetch(long now) { if(nextAllowedMulticastTime < now && !ConnectionSettings.DO_NOT_MULTICAST_BOOTSTRAP.getValue()) { LOG.trace("Fetching via multicast"); PingRequest pr = pingRequestFactory.createMulticastPing(); multicastService.get().send(pr); nextAllowedMulticastTime = now + POST_MULTICAST_DELAY; return true; } return false; } COM: <s> attempts to fetch via multicast returning true </s>
funcom_train/33240154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawError(Graphics g, Dimension d) { g.drawRect(0,0,d.width-1,d.height-1); g.setColor(Color.red); g.fillRect(1,1,d.width-3,d.height-3); g.setColor(getForeground()); g.drawString("Can't load image",5, (int)(getSize().height/2)); } COM: <s> what you want to show up if the image failed to load </s>
funcom_train/35461034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPropagationToHierarchy() throws Exception { enhanceAndCheck("dcl a aligned, 2 b, 3 c fixed bin;", "(DATA_ITEM (NAME a) (ALIGNMENT ALIGNED)" + " (DATA_ITEM (LEVEL 2) (NAME b) (ALIGNMENT ALIGNED)" + " (DATA_ITEM (LEVEL 3) (NAME c) (ARITHMETIC FIXED BINARY) (ALIGNMENT ALIGNED))))" ); } COM: <s> alignment should propagate down a hierarchy </s>
funcom_train/36683783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPolygonCoordinate() { Vector2f relative = new Vector2f(1, 0); Vector2f centroid = new Vector2f(2, 2); Assert.assertEquals(Vector2f.getRealCordinates(relative, centroid, 0), new Vector2f(3, 2)); Assert.assertEquals(Vector2f.getRealCordinates(relative, centroid, Math.PI / 2), new Vector2f(2, 3)); } COM: <s> tests whether we can translate between relative coordinates of a shape </s>
funcom_train/4759853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRandom2() { float q = (float) 0.2; a = ExpVector.EVRAND(5,10,q); b = ExpVector.create( "" + a ); assertEquals("a == b", true, a.equals(b) ); c = b.subtract(a); assertTrue("a-b = 0",c.isZERO()); } COM: <s> test random exp vector 2 </s>
funcom_train/35312174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AttributeSet getAttributes() { Element elem = pos.current(); if (elem != null) { AttributeSet a = (AttributeSet) elem.getAttributes().getAttribute(tag); if (a == null) { a = elem.getAttributes(); } return a; } return null; } COM: <s> returns the attributes for this tag </s>
funcom_train/41179097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void interpretation(String interpretation) { // Bouml preserved body begin 0006B77B this.interpretation = interpretation; if (this.stat == AnalysisState.Validated) { this.stat = AnalysisState.Interpreted; } Batch my_batch = API_bdd.loadBatch(this); my_batch.checkAnalysis(); API_bdd.saveAnalysis(this); // Bouml preserved body end 0006B77B } COM: <s> more than a settter </s>
funcom_train/50393225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assureDefaultProcessingAvailable(){ if(!haveProcessingFor(XNJSConstants.asyncCommandType)){ setProcessingChain(XNJSConstants.asyncCommandType, null, new String[]{AsyncCommandProcessor.class.getName()}); } if(!haveProcessingFor(SweepProcessor.sweepActionType)){ setProcessingChain(SweepProcessor.sweepActionType, null, new String[]{SweepProcessor.class.getName()}); } } COM: <s> make sure the processor chains for some default cases </s>
funcom_train/36125426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addAsStringEscapingCharacters(Object object) { addCharacter('"'); CharacterIterator it = new StringCharacterIterator(object.toString()); for (char c = it.first(); c != CharacterIterator.DONE; c = it.next()) { switch (c) { case '"': addAsString("\\\""); break; case '\\': addAsString("\\\\"); break; case '/': addAsString("\\/"); break; case '\b': addAsString("\\b"); break; case '\f': addAsString("\\f"); break; case '\n': addAsString("\\n"); break; case '\r': addAsString("\\r"); break; case '\t': addAsString("\\t"); break; default: addCharacter(c); } } addCharacter('"'); } COM: <s> adds the specified object as string escaping selected characters </s>
funcom_train/36639925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMatrix(Matrix matrix) { int rc = matrix.getRowCount(); int cc = matrix.getColumnCount(); for (int r = 0; r < rc; r++) { for (int c = 0; c < cc; c++) { setElement(r, c, matrix.getElement(r, c)); } } } COM: <s> sets the matrix from another matrix object </s>
funcom_train/2578272
/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 ColorBlock)) { return false; } ColorBlock that = (ColorBlock) obj; if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } return super.equals(obj); } COM: <s> tests this block for equality with an arbitrary object </s>
funcom_train/12957785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String locator(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) { if (value == null) return ""; int M_Product_ID = Env.getContextAsInt(ctx, WindowNo, "M_Product_ID"); checkQtyAvailable(ctx, mTab, WindowNo, M_Product_ID, null); return ""; } COM: <s> movement line locator modified </s>
funcom_train/19312827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractBorderStyle getBorderStyle() { if (! (value() instanceof PropertyCollection)) { return null; } final PropertyCollection collection = (PropertyCollection) value(); final Property property = collection.findProperty( FoProperty.BORDER_STYLE); if (property instanceof AbstractBorderStyle) { return (AbstractBorderStyle) property; } return null; } COM: <s> returns the border style component of this compound property </s>
funcom_train/46152904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void retryRequest(Action action, String xmlString, String docURI, Point position, Float zoom) { LOGGER.fine("whiteboard: creating retry thread for: " + action + ", " + xmlString + ", " + position); new ActionScheduler(action, xmlString, docURI, position, zoom).start(); } COM: <s> retries a whiteboard action request </s>
funcom_train/37062976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setErgoPerson( IErgoPerson newPerson ) { person = newPerson; int w = (person.getWeight()==0)?IErgoPerson.DEFAULT_WEIGHT:person.getWeight(); int h = (person.getWeight()==0)?IErgoPerson.DEFAULT_HEIGHT:person.getWeight(); utils.setPersonData( w, h ); } COM: <s> set a new person update the weight and height data in </s>
funcom_train/28276953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSortOrder(int sortOrder) { StructuredViewer viewer = getViewer(); switch (sortOrder) { case ORDER_ID: viewer.setSorter(new SearchResultSorterId()); break; case ORDER_DESCRIPTION: viewer.setSorter(new SearchResultSorterDescription()); break; case ORDER_PRIORITY: viewer.setSorter(new SearchResultSorterPriority()); break; default: // If the setting is not one of the four valid ones, // use the default order setting. sortOrder = ORDER_DEFAULT; viewer.setSorter(new SearchResultSorterPriority()); break; } currentSortOrder = sortOrder; getSettings().put(KEY_SORTING, currentSortOrder); } COM: <s> sets the new sorting category and reorders all of the tasks </s>
funcom_train/34962011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOpenBase() { if (openBase == null) { openBase = new JButton(); openBase.setText("Open base"); openBase.setToolTipText("Open a base langauge file (the left one)"); openBase.addActionListener(this); } return openBase; } COM: <s> this method initializes open base </s>
funcom_train/44482504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkForHelpWanted(String[] args) { String shortOpt = "-h"; String longOpt = "--help"; for (int i = 0; i < args.length; ++i) { if (args[i].equals(shortOpt) || args[i].equals(longOpt)) { userWantsHelp = true; return; } } } COM: <s> scans the runtime command line arguments looking for h or </s>
funcom_train/28960722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void testToString() { // System.out.println("toString"); // Target instance = null; // String expResult = ""; // String result = instance.toString(); // 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 to string method of class target </s>
funcom_train/6359953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initProvider(IObservableSet knownElements) { AlreadyInitializedException.assertOk(_provider==null, this, "initProvider() has already been called."); CoreUtils.assertNonNullArg(knownElements); IBeanValueProperty[] props = BeanProperties .values(new String[] {"children"}); IObservableMap[] maps = Properties.observeEach(knownElements, props); _provider = new MyProvider(maps) { }; initializeImageDescriptors(); } COM: <s> builds the label provider </s>
funcom_train/34340077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCodigovendedor() { if (codigovendedor == null) {//GEN-END:|23-getter|0|23-preInit // write pre-init user code here codigovendedor = new TextField("Ingrese el numero de vendedor", null, 3, TextField.NUMERIC);//GEN-LINE:|23-getter|1|23-postInit // write post-init user code here }//GEN-BEGIN:|23-getter|2| return codigovendedor; } COM: <s> returns an initiliazed instance of codigovendedor component </s>
funcom_train/19408472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expression getExpressionForViolatingInstances() { ObjectType t = TypeFactory.mkObjectType(fClass); try { Expression allInstances = new ExpAllInstances(t); VarDecl decl = new VarDecl((fVar == null) ? "self" : fVar, t); return new ExpReject(decl, allInstances, fBody); } catch (ExpInvalidException ex) { throw new RuntimeException( "getExpressionForViolatingInstances failed: " + ex.getMessage()); } } COM: <s> returns an expression for selecting all instances that violate the </s>
funcom_train/16600399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateIsReadable() { if ( fIsRunning ) { String message = "Cannot read a stopwatch which is still running."; throw new IllegalStateException(message); } if ( !fHasBeenUsedOnce ) { String message = "Cannot read a stopwatch which has never been started."; throw new IllegalStateException(message); } } COM: <s> throws illegal state exception if the watch has never been started </s>
funcom_train/34146482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addGeom( PlaceableGeom geom ) { // assert !geoms.contains(geom) : "Geom already exists in the Body!"; // adds to geom list geoms.add( geom ); // sets the geom to be this body (by calling Ode.dGeomSetBody) geom.setBody( this ); if ( ( this.name != null ) && ( geom.getName() == null ) ) { geom.setName( name ); } } COM: <s> adds a geom to this body </s>
funcom_train/41979260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean save (String title) { int result = JOptionPane.showConfirmDialog (frame, "Would you like to save what you are working on?", title, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); switch (result) { case JOptionPane.CANCEL_OPTION: return false; case JOptionPane.YES_OPTION: controller.save (); default: return true; } } COM: <s> prompts to save the current puzzle </s>
funcom_train/51360199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Joystick (int xPotPin, int yPotPin, int xSwitchPin, int ySwitchPin) { this.xPotPin = xPotPin; this.yPotPin = yPotPin; this.xSwitchPin = xSwitchPin; this.ySwitchPin = ySwitchPin; // make switch pins inputs CPU.setInput(xSwitchPin); CPU.setInput(ySwitchPin); } COM: <s> creates analog joystick object </s>
funcom_train/12663663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (!(o instanceof Property)) return false; Property property = (Property) o; if (property.getName() == null || !property.getName().equals(getName())) return false; if (property.getValue() == null || !property.getValue().equals(getValue())) return false; return true; } COM: <s> returns whether the object passed is equal to this property </s>
funcom_train/34446584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (request instanceof ReconnectRequest) { Object view = ((ReconnectRequest) request).getConnectionEditPart() .getModel(); if (view instanceof View) { Integer id = new Integer(M3ActionsVisualIDRegistry .getVisualID((View) view)); request.getExtendedData().put(VISUAL_ID_KEY, id); } } return super.getCommand(request); } COM: <s> extended request data key to hold editpart visual id </s>
funcom_train/17942456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateWidth() { try { if (imageConstrainProps.isSelected()) { int newHeight = calcAspectRatioLength(new BigDecimal(imageWidth.getText()), false); imageHeight.setText("" + newHeight); } } catch (Exception e) { log.error("error while trying to update the image width: " + e.fillInStackTrace()); } } COM: <s> updates the width if maintain aspectratio is true height is automatically updated too </s>
funcom_train/12641608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { DateFormat formatter = null; if (simpleFormatter != null) { formatter = (DateFormat)simpleFormatter.get(); } if (formatter == null) { /* No cache yet, or cached formatter GC'd */ formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US); simpleFormatter = new SoftReference(formatter); } synchronized (formatter) { formatter.setTimeZone(TimeZone.getDefault()); return formatter.format(this); } } COM: <s> converts this code date code object to a code string code </s>
funcom_train/22237891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LSIDMetadataPort getMetadataPort() { LSIDMetadataPort port = getMetadataPortForProtocol(HTTP); if (port != null) return port; port = getMetadataPortForProtocol(FTP); if (port != null) return port; if (!lsidMetadataPorts.keys().hasMoreElements()) return null; return (LSIDMetadataPort) lsidMetadataPorts.get(lsidMetadataPorts.keys().nextElement()); } COM: <s> get an arbitrary metadata port if one exists </s>
funcom_train/8078841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DoubleVector getColumn( int i0, int i1, int j ) { DoubleVector v = new DoubleVector( i1-i0+1 ); double [] a = v.getArray(); int count = 0; for( int i = i0; i <= i1; i++ ) { a[count] = A[i][j]; count++; } return v; } COM: <s> return a double vector that stores some elements of a column of the </s>
funcom_train/38351738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPropertyTorusHeight(Integer height) { if (height.intValue() < 1) return; int dim = ((GeneralString)getSchedule().getPhenotypeSearchSpace()).getDimension(); // check if the dimension of the search space is divisable by height if (height.intValue() * (dim / height.intValue()) == dim) { torusHeight = height.intValue(); torusWidth = (dim / height.intValue()); } } COM: <s> sets the new torus height and adjusts the width accordingly </s>
funcom_train/28108509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopSelecting() { if (isSelecting) { if (this.configuratorUI.getConfigurator() != null) { this.configuratorUI.getConfigurator().getSelectionManager().removeExclusiveListener(selListener); } if (selectDialog != null) { selectDialog.setVisible(false); } // selectButton.setEnabled(true); isSelecting = false; } } COM: <s> hides the information dialog and re enables the parameters select </s>
funcom_train/1241203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScheme(String p_scheme) throws MalformedURIException { if (p_scheme == null) { throw new MalformedURIException( "Cannot set scheme from null string!"); } if (!isConformantSchemeName(p_scheme)) { throw new MalformedURIException("The scheme is not conformant."); } m_scheme = p_scheme.toLowerCase(); } COM: <s> set the scheme for this uri </s>
funcom_train/5862281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMoved(Component oldparent, Page oldpg, Page newpg) { final Desktop dt; if (oldpg != null) dt = oldpg.getDesktop(); else if (newpg != null) dt = newpg.getDesktop(); else return; ((WebAppCtrl)dt.getWebApp()) .getUiEngine().addMoved(this, oldparent, oldpg, newpg); } COM: <s> called when this component is moved from the specified parent </s>
funcom_train/22678793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyDialogPanel(OMElement element) { XmlUtils.setAttribute(factory, element, ID, readerNames[2]); XmlUtils.setAttribute(factory, element, TraserConstants.CLASS, readerOptions[2].value); XmlUtils.addElement(factory, element, READER_DRIVER, Option.valueOf(dialogDriver)); } COM: <s> apply changes on the dialog page </s>
funcom_train/31457116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutDownNodes() { updateLock.WaitForFreeAndLock(); nodesLock.writeLock().lock(); for (NodeItem n : nodes.values()) { try { n.getNode().shutDown(); } catch (RemoteException re) { Log.event(Log.WARNING, "failed to shutdown node " + n.getID()); } } nodes.clear(); nodesLock.writeLock().unlock(); updateLock.UnLock(); } COM: <s> shuts down all nodes </s>
funcom_train/5450938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnabled (boolean isEnabled) { Disabled = !isEnabled; if ((Disabled) && (States > 1)) RealImagePos = IconWidth - 4; else { if ((!Disabled) && (States > 2) && (IsMouseInside)) RealImagePos = (IconWidth - 4) * 2; else RealImagePos = 0; } if (isShowing()) repaint(); } COM: <s> sets the state of the image if it has disabled state </s>
funcom_train/37816276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initVariableView(Variable v) { VariableView variableView = createVariableView(v); variableView.setBounds(0, variableViews.size()*(int)variableView.getPreferredSize().getHeight(), (int)variableView.getPreferredSize().getWidth(), (int)variableView.getPreferredSize().getHeight()); variableViews.put(v.getName(), variableView); variablesView.add(variableView); } COM: <s> creates a new code variable view code for the specified variable </s>
funcom_train/45786256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJrbtEmpresa() { if (jrbtEmpresa == null) { jrbtEmpresa = new JRadioButton(); jrbtEmpresa.setBounds(new Rectangle(143, 42, 80, 24)); jrbtEmpresa.setText("Empresa"); jrbtEmpresa.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if (jrbtEmpresa.isSelected()) { cargarEmpresas(); } } }); } return jrbtEmpresa; } COM: <s> this method initializes jrbt empresa </s>
funcom_train/8188388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Customer getCustomerById(int id) { Transaction tx = getSession().beginTransaction(); String hql = "from Customer as customer where customer.id = '"+ id +"'"; Query query = getSession().createQuery( hql ); query.setMaxResults( 1 ); Customer customer = (Customer) query.uniqueResult(); tx.commit(); return customer; } COM: <s> method returns customer by his id </s>
funcom_train/2379316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getButtonPanel() { if (ButtonPanel == null) { GridBagConstraints gridBagConstraints31 = new GridBagConstraints(); ButtonPanel = new JPanel(); ButtonPanel.setLayout(new GridBagLayout()); gridBagConstraints31.gridx = 0; gridBagConstraints31.gridy = 1; ButtonPanel.setPreferredSize(new java.awt.Dimension(1,1)); ButtonPanel.add(getAddButton(), new GridBagConstraints()); ButtonPanel.add(getDeleteButton(), gridBagConstraints31); } return ButtonPanel; } COM: <s> this method initializes j panel </s>
funcom_train/38490663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireNodesRemovedFromSelection(Collection<Node> nodes) { EventListener[] listeners=eventListenerList.getListeners(SelectionListener.class); for (int i=0;i<listeners.length;i++) ((SelectionListener)listeners[i]).nodesRemovedFromSelection(this,nodes); } COM: <s> fires the event that the nodes have been removed from the selection </s>
funcom_train/16795219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMacroTool(String name, MacroInstaller macroInstaller, int id) { if (id==0) { for (int i=SPARE1; i<NUM_TOOLS-1; i++) { names[i] = null; icons[i] = null; if (menus[i]!=null) menus[i].removeAll(); } } this.macroInstaller = macroInstaller; addTool(name); } COM: <s> used by the macro installer class to install macro tools </s>
funcom_train/44185716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initLifecycleProcessor() { ConfigurableListableBeanFactory beanFactory = getBeanFactory(); if (!beanFactory.containsLocalBean(LIFECYCLE_PROCESSOR_BEAN_NAME)) { HeritrixLifecycleProcessor obj = (HeritrixLifecycleProcessor)beanFactory.createBean(HeritrixLifecycleProcessor.class); beanFactory.registerSingleton(LIFECYCLE_PROCESSOR_BEAN_NAME,obj); } super.initLifecycleProcessor(); } COM: <s> initialize the lifecycle processor </s>
funcom_train/37593745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetJarOptionsDialogPosition() { _jarOptionsDialog.setFrameState("default"); if (DrJava.getConfig().getSetting(DIALOG_JAROPTIONS_STORE_POSITION).booleanValue()) { DrJava.getConfig().setSetting(DIALOG_JAROPTIONS_STATE, "default"); } } COM: <s> reset the position of the create jar from project dialog </s>
funcom_train/28752937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCdna50xlotnum(String newVal) { if ((newVal != null && this.cdna50xlotnum != null && (newVal.compareTo(this.cdna50xlotnum) == 0)) || (newVal == null && this.cdna50xlotnum == null && cdna50xlotnum_is_initialized)) { return; } this.cdna50xlotnum = newVal; cdna50xlotnum_is_modified = true; cdna50xlotnum_is_initialized = true; } COM: <s> setter method for cdna50xlotnum </s>
funcom_train/14094122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Point convertToSource(final Component comp, final Point p) { Point screen = comp.getLocationOnScreen(); screen.translate(p.x, p.y); if (m_origPoint == null) { return p; } int dx = screen.x - m_origPoint.x; int dy = screen.y - m_origPoint.y; Point delta = new Point(p); delta.translate(dx, dy); return delta; } COM: <s> convert the point to the source coordinate system </s>
funcom_train/16743902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void alloc(int numSitesInChr) { mPhased = new BitSetByUnit[NumPhases]; for (int i = 0; i < mPhased.length; i++) { mPhased[i] = new BitSetByUnit(mAlleleSize, numSitesInChr); } mMinorAlleleCount = new short[numSitesInChr]; Arrays.fill(mMinorAlleleCount, (short) 0); } COM: <s> allocate memory for the chromosome </s>
funcom_train/15609335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsSubFeature(Feature aSubFeature) { // Check for null argument... if (aSubFeature == null) { return false; } // Check that we have a collection... if (subFeatures == null) { return false; } // Check in the collection... return subFeatures.contains(aSubFeature); } COM: <s> check to see if a given feature is contained by this feature </s>
funcom_train/3903860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMinNormalizedMeasurePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ObjectiveType1_minNormalizedMeasure_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ObjectiveType1_minNormalizedMeasure_feature", "_UI_ObjectiveType1_type"), ImsssPackage.Literals.OBJECTIVE_TYPE1__MIN_NORMALIZED_MEASURE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the min normalized measure feature </s>
funcom_train/35072723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDiscount() { if (PERCENT.equals(discountType)) { return Formats.Percent.format(getDiscountAmount()/100); } else if (FIXED.equals(discountType)) { return "$"+Formats.Money.format(getDiscountAmount()); } else { throw new IllegalArgumentException("The discount type "+getDiscountType().name()+" is not supported."); } } COM: <s> a presentable representation of the </s>
funcom_train/26567427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getPixels(short pix[], int offset, int scanlen, int x, int y, int width, int height, int format) { System.out.println("public void getPixels(short pix[], int offset, int scanlen, int x, int y, int width, int height, int format)"); throw new IllegalArgumentException(); } COM: <s> only type ushort 4444 argb format supported </s>
funcom_train/4010278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeErasedSmileys() { StringTokenizer st = new StringTokenizer(s); while (st.hasMoreTokens()) { smileys[Integer.parseInt(st.nextToken())][Integer .parseInt(st.nextToken())] = 0; } erasedSmileys += count; if (erasedSmileys >= MAX_SMILEYS_ERASED) // Change the level of the game // depending on number of // removed puyos. { changeLevel(); } score += MARKS_PER_PUYO * count; } COM: <s> updates the score card and changes level if required </s>
funcom_train/39314502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetScrollableBlockIncrement() { System.out.println("testGetScrollableBlockIncrement"); int actual = sp.getScrollableBlockIncrement(rect,1,1); assertEquals(9,actual); actual = sp.getScrollableBlockIncrement(rect,0,1); assertEquals(9, actual); System.out.println("Done getScrollableBlockIncrement"); } COM: <s> test of get scrollable block increment method of class scrollable picture </s>
funcom_train/40386677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAuthenticateServletPath(String authUrl) { logger.debug("Setting authUrl: " + authUrl); // Cache value this.authUrl = authUrl; // Protection if ((this.authUrl == null) || (this.authUrl.equals(""))) { // Log error logger.error("Valve parameter [authenticateServletPath] has not been set correctly"); // Set flag isActive = false; } } COM: <s> sets the authenticate servlet path </s>
funcom_train/46975024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MetricElement addOtherTag(String nameIn, String valueIn) { Element tempElement = this.getChild(nameIn); if (null!=tempElement) { tempElement.setText(valueIn); } else { tempElement = new Element(nameIn).setText(valueIn); this.addContent(tempElement); } return this; } COM: <s> adds additional miscellaneous tags as children of this metric element </s>
funcom_train/20440051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMinutePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ESMFTime_minute_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ESMFTime_minute_feature", "_UI_ESMFTime_type"), ESMFPackage.Literals.ESMF_TIME__MINUTE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the minute feature </s>
funcom_train/28151861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public String toString() { String answer = ""; boolean first = true; for(AlloyType type: getTypes()) { if (first) {first=false; answer=answer+getName()+" : ";} else answer=answer+" -> "; answer=answer+type.getName(); } return answer; } COM: <s> this value is used to display this type in the visualizers customization screen </s>
funcom_train/12671034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetMaxEnergyLife() { System.out.println("setMaxEnergyLife"); float mel = 0.0F; AntImpl instance = new AntImpl(); instance.setMaxEnergyLife(mel); // 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 max energy life method of class engine </s>
funcom_train/10519323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void execute(String[] args, CCFile file) throws BuildException { args[args.length - 1] = file.getPath(); CmdResult res = utils.cleartool(args); if (res.getStatus() != 0){ throw new BuildException(res.getStdErr()); } } COM: <s> calls the cleartool command with the appropriate parameters </s>
funcom_train/4558635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateSingleStat(MapleStat stat, int newval, boolean itemReaction) { Pair<MapleStat, Integer> statpair = new Pair<MapleStat, Integer>(stat, Integer.valueOf(newval)); MaplePacket updatePacket = MaplePacketCreator.updatePlayerStats(Collections.singletonList(statpair), itemReaction); client.getSession().write(updatePacket); } COM: <s> updates a single stat of this maple character for the client </s>
funcom_train/1800482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String key, float value) { if (value == Float.POSITIVE_INFINITY) { put(key, "INF"); } else if (value == Float.NEGATIVE_INFINITY) { put(key, "-INF"); } else { put(key, Float.toString(value)); } } COM: <s> associates the specified float value with the specified key in this map </s>
funcom_train/43038454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reconnect(String hostName, int port) throws IOException { log.info("disconnecting from auth server/connecting to BOS server..."); // disconnect from authentication server / connect to BOS disconnect(); connectToHost(hostName, port, Status.BOS_CONNECTING); writer = new WriterThread(connection, writeBuffer); writer.start(); } COM: <s> reconnect to host used during the oscar authentication processing </s>
funcom_train/44011547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetCustEmail() { System.out.println("setCustEmail"); String custEmail = ""; CustomerBO instance = null; instance.setCustEmail(custEmail); // 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 cust email method of class edu </s>
funcom_train/40448632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dump(Hashtable<Node,Integer> ht) { System.err.print("locn["); for (int i=0; i<label.length; i++) { Node n= label[i]; //if (n==null) continue; //if (n==graph.eigenNode) continue; Integer p= ht.get(n); System.err.print(" "+p); } System.err.print(" ]"); } COM: <s> used to display the permutation implied by a position hashtable </s>
funcom_train/45741492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand1 () { if (okCommand1 == null) {//GEN-END:|108-getter|0|108-preInit // write pre-init user code here okCommand1 = new Command ("Ok", Command.OK, 0);//GEN-LINE:|108-getter|1|108-postInit // write post-init user code here }//GEN-BEGIN:|108-getter|2| return okCommand1; } COM: <s> returns an initiliazed instance of ok command1 component </s>
funcom_train/33703993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDescriptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Element_description_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Element_description_feature", "_UI_Element_type"), BankabeulePackage.Literals.ELEMENT__DESCRIPTION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the description feature </s>
funcom_train/4461787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File getFile(String title, int flag) { File file = null; FileDialog fd = new FileDialog(matrix.getFrame(), title, FileDialog.SAVE); fd.setVisible(true); if(fd.getFile() != null) { if(fd.getDirectory() != null) { file = new File(fd.getDirectory() + fd.getFile()); } else { file = new File(fd.getFile()); } } return file; } COM: <s> get a file from the user </s>
funcom_train/16623922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void goToDestination(ActionEvent event) { try { int pageNumber = Integer.parseInt( FacesUtils.getRequestParameter("pageNumber")); currentDocumentState.setPageCursor(pageNumber + 1); // refresh current page state. refreshDocumentState(); } catch (Throwable e) { logger.log(Level.WARNING, "Error goign to specified page number."); } } COM: <s> go to the page number specified by the request param page number </s>
funcom_train/29938749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deletesAfter(AbstractBlockBound bound) { if (bound != null) { String boundKeyword = bound.keyword(); String closingKeyword = keyword(); return BlockBoundLoader.deletesOpeningKeywordAfter(sourceFileType(), closingKeyword, boundKeyword); } else { return false; } } COM: <s> returns true if this bound should be deleted if placed just after the </s>
funcom_train/21846555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static interface ContentModel { /** @return the Content tree part of this model */ public Content getContent(); /** * @return Set of Elements which are additionally possible anywhewe * (recursively) in the content of the Element which has this * ContentModel, unless explicitely excluded. Inclusion can not * override explicit exclusion. */ public Set getIncludes(); /** * @return Set of Elements which are recursively excluded from ContentModel * of all Elements inside the Element with this ContentModel. * Exclusion overrieds inclusion, but not otherwise. */ public Set getExcludes(); } COM: <s> the interface representing content model of an element </s>
funcom_train/10204878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReferencesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MAnnotation_references_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MAnnotation_references_feature", "_UI_MAnnotation_type"), ClassDiagramPackage.Literals.MANNOTATION__REFERENCES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the references feature </s>
funcom_train/49760784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBoxData() { if (jCheckBoxData == null) { jCheckBoxData = new JCheckBox(); jCheckBoxData.setBounds(new Rectangle(5, 130, 131, 24)); jCheckBoxData.setText("Data Structure"); jCheckBoxData.addItemListener(myListener); } return jCheckBoxData; } COM: <s> this method initializes j check box data </s>
funcom_train/511008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void broadcastSystemStreamContents() { this.redirectSysOut.flush(); this.redirectSysErr.flush(); String out = new String(this.redirectSysOutDest.toByteArray()); String err = new String(this.redirectSysErrDest.toByteArray()); ResultFormatter.setSystemOutput(out, err); // clear the byte array streams this.redirectSysOutDest.reset(); this.redirectSysErrDest.reset(); } COM: <s> update the formatters with any bytes that were written to the system </s>
funcom_train/41728145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadLoginForm() { // Assemble login panel. signInLink.setHref(loginInfo.getLoginUrl()); userInfoPanel.add(loginLabel); userInfoPanel.add(signInLink); if (RootPanel.get("userInfo").getWidgetCount() != 0) { RootPanel.get("userInfo").remove(0); } RootPanel.get("userInfo").add(userInfoPanel); } COM: <s> load login form </s>
funcom_train/4694891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field getFieldASTNodeRec(ICClass icClass, String fieldName){ for(Field f: icClass.getFields()){ if (f.getName().equals(fieldName)) return f; } if (icClass.hasSuperClass()){ return getFieldASTNodeRec(global.getClass(icClass.getSuperClassName()).getIcClass(), fieldName); } else System.err.println("*** BUG: TranslatePropagatingVisitor getFieldASTNodeRec bug"); return null; } COM: <s> returns the astnode field for the given field name </s>
funcom_train/25501279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isRemoteAccessibility(String url) { try { URL targetURL = new URL(url); URLConnection urlConnection = targetURL.openConnection(); urlConnection.setReadTimeout(10000); urlConnection.connect(); if( urlConnection instanceof HttpURLConnection ) { int responseCode = ((HttpURLConnection) urlConnection).getResponseCode(); if (responseCode == 200) return true; return false; } return true; } catch (IOException e) { return false; } } COM: <s> checks whether a file represented by an url is accessible </s>
funcom_train/3847142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object o1, Object o2){ if( o1 instanceof Element && o2 instanceof Element ){ Element e1 = (Element)o1; Element e2 = (Element)o2; String a1 = e1.getAttribute(attributeName); String a2 = e2.getAttribute(attributeName); if( a1 == null ) a1 = ""; if( a2 == null ) a2 = ""; return a1.compareTo(a2); } throw new ClassCastException("Invalid class type."); } COM: <s> compares its two arguments for order </s>
funcom_train/45708034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateNames(Meta elt) { String name = elt.getName(); ArrayList<UID> list; if (m_names.containsKey(name)) { list = m_names.get(name); } else { list = new ArrayList<UID>(); } list.add(elt.getUID()); m_names.put(name, list); } COM: <s> internal function which updates names cache </s>
funcom_train/18662275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxWordsToShow( int wordsToShow ) { // never trust inputs if ( wordsToShow < 1 ) { LOGGER.finest( String.format( "wordsToShow was %d which is less than 1; setting to 1.", wordsToShow ) ); wordsToShow = 1; } this.wordsToShow = wordsToShow; } COM: <s> sets the maximum number of words to show </s>
funcom_train/35925550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateItems(){ gui.setNotificationMessage("Communicating with server, please wait"); try { if(serverInt!=null){ ArrayList<Item> items = serverInt.inspectItems(); gui.updateItemsList(items); gui.setNotificationMessage("Items list updated"); } else { gui.setNotificationMessage("Can't connect to the server"); } } catch (RemoteException e) { gui.setNotificationMessage("Error connecting to server"); System.err.println("[LOG] RemoteException when updating items list"); } } COM: <s> the method connects to the server retrieves items list and </s>
funcom_train/4124909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBonus(GoodsType goodsType, UnitType unitType, int potential) { Set<Modifier> productionBonus = type.getProductionModifier(goodsType, unitType); int bonusAmount = (int) FeatureContainer.applyModifierSet(potential, null, productionBonus) - potential; if (quantity > -1 && bonusAmount > quantity) { return potential + quantity; } else { return potential + bonusAmount; } } COM: <s> returns the bonus checking available stock for next turn </s>
funcom_train/9568796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(ChangeEvent evt) { int picture = Integer.parseInt(jSpinner.getValue().toString()); if (picture < 0) { picture = 0; jSpinner.setValue("0"); } if (picture >= total_number_of_pictures) { picture = total_number_of_pictures - 1; jSpinner.setValue(String.valueOf(picture)); } layout.show(image_panel, String.valueOf(picture)); image_panel.repaint(); } COM: <s> reflects the change event in the jspinner object </s>
funcom_train/23632112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 && !e.getComponent().getName().trim().equals("")) { viewChanger.show(center, DAY); } int s = Integer.parseInt(e.getComponent().getName()); if( s < 1 || s > curMonths[calendar.getCurrentMonth()-1]){ s = calendar.getCurrentDay(); } setCurrentDay(s); } COM: <s> called when there is a mouse event </s>
funcom_train/20898589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNextEntry() { if (logger.isFinerEnabled()) { logger.finer("Attempting to read next entry."); } MatchResult result = entryMatcher.getMatch(); if (logger.isFinestEnabled()) { logger.finest("Entry: " + result.toString()); } return result.toString(); } COM: <s> the code get next entry code method returns the next available entry </s>
funcom_train/31484528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invalidateSession(String uid, String sid) { cat.debug("==> invalidateSession("+String.valueOf(uid)+", "+String.valueOf(sid)+")"); synchronized(lock) { uid2sid.remove(uid); sid2ssc.remove(sid); } cat.debug("<== invalidateSession()"); } COM: <s> removes the mapping between the designated sm2 client identifier and </s>
funcom_train/10522768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testResultSetReturnType() throws Exception { assertNotNull(testCtrl); ResultSet rs = testCtrl.getAllUsers(); assertNotNull(rs); rs.next(); String name = rs.getString("FNAME"); assertEquals(name, "tester1"); rs.close(); } COM: <s> test query return result set </s>
funcom_train/4953401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateModuleTestCaseInfo(BufferedWriter buf) throws IOException { buf.write("<a name=\"testcases\"/><H3 class=\"title\">Test cases in this module</H3>" + c_LF); buf.write("This list shows the average pass rate and execution times for all test cases in this test module.<br/><br/>" + c_LF); } COM: <s> generates the informational text preceding the test case pass rate list </s>
funcom_train/50440164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(){ try { Vector m_vec=(Vector)ADFOrb.getInstance().lookup("_SATURATION_CONSTANTS"); m_dblValue=((doubleArray2D)m_vec.firstElement()).get(m_intIdxK[0],m_intIdxK[1]); } catch (Exception error){ error.printStackTrace(); } } COM: <s> init initialization method goes to orb and gets value </s>
funcom_train/18597480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String concatSortFields(SortField[] sortFields) { if (sortFields == null) { return null; } StringBuilder sb = new StringBuilder(); for (SortField sf : sortFields) { if (sf != null) { sb.append(sf.getField()).append(" ").append(sf.getReverse() ? "DESC" : "ASC").append(","); } } if (sb.length() > 0) { sb.deleteCharAt(sb.length()-1); } return sb.toString(); } COM: <s> concatenates the given sort fields into a single string of the form </s>
funcom_train/21656392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /**private JButton getBtAgregarFilaCronologia() { if (btAgregarFilaCronologia == null) { btAgregarFilaCronologia = new JButton(); btAgregarFilaCronologia.setBounds(new Rectangle(752, 360, 43, 25)); btAgregarFilaCronologia.setText("+"); btAgregarFilaCronologia.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { agregarFila(); } }); } return btAgregarFilaCronologia; } COM: <s> this method initializes bt agregar fila cronologia </s>
funcom_train/34594491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process(Source xml, Source xsl, Result result) throws TransformerException { try { Templates template = factory.newTemplates(xsl); Transformer transformer = template.newTransformer(); transformer.transform(xml, result); } catch (TransformerConfigurationException tce) { throw new TransformerException(tce.getMessageAndLocation()); } catch (TransformerException te) { throw new TransformerException(te.getMessageAndLocation()); } } COM: <s> transform an xml source using xslt based on a new template </s>
funcom_train/40884141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean boundsInFrustum (BoundingBox bounds) { Vector3[] corners = bounds.getCorners(); int len = corners.length; for (int i = 0, len2 = planes.length; i < len2; i++) { int out = 0; for (int j = 0; j < len; j++) if (planes[i].testPoint(corners[j]) == PlaneSide.Back) out++; if (out == 8) return false; } return true; } COM: <s> returns wheter the given </s>
funcom_train/12175452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialiseCanvas() { setAlignTableCellSupport(); setCenterElementSupport(); if (logger.isDebugEnabled()) { logger.debug("Initialising canvas resources associated with " + this); } createWriters(); // If this is an included page we must get the page header of // of our including page so that our header information, such as // validation JavaScript is written out. if (pageHead == null) { initialisePageHead(); } } COM: <s> this method is called at the end of the mariner page contexts </s>
funcom_train/37519268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWindowState() { // Set the window state to the preferred window state. If there // is no preference set, the window will appear as normal (not // maximized) int windowState = preferences.getInt( toolName + windowName + "WindowState", Frame.NORMAL); window.setExtendedState(windowState); } COM: <s> set the window to the users preferred window state </s>
funcom_train/45776147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void broadcast() { for (IoSession session : listeners) { if (session.isConnected()) { Offset offset = (Offset) session.getAttribute("OFFSET"); ByteBuffer buffer = ByteBuffer.wrap(data, offset.value, index - offset.value); offset.value = index; WriteFuture future = session.write(buffer); future.addListener(new IoFutureListener() { @Override public void operationComplete(IoFuture arg0) { logger.log(Level.FINE, "Broadcast ok"); } }); } } } COM: <s> send new replay data to all listeners </s>
funcom_train/37211110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getBiomartServiceLocation(String biomartLocation) { StringBuffer sb = new StringBuffer(); if (biomartLocation.endsWith("martservice")) { sb.append(biomartLocation); } else if (biomartLocation.endsWith("martview")) { sb.append(biomartLocation.substring(0, biomartLocation .lastIndexOf("martview"))); sb.append("martservice"); } else if (biomartLocation.endsWith("/")) { sb.append(biomartLocation); sb.append("martservice"); } else { sb.append(biomartLocation); sb.append("/martservice"); } return sb.toString(); } COM: <s> attempts to construct a valid mart service url from the location given </s>