__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/47308223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage createScaledImage(int width) { float scaleFactor = (float) width / original.getWidth(); int scaledH = (int) (original.getHeight() * scaleFactor); BufferedImage img = new BufferedImage(width, scaledH, original.getType()); Graphics2D g2d = img.createGraphics(); g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); g2d.drawImage(original, 0, 0, width, scaledH, null); g2d.dispose(); return img; } COM: <s> this method returns an image with the specified width </s>
funcom_train/37009499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { if ( this.appContext == null ) { throw new IllegalArgumentException("appContext can not be null"); } attributes = new HashMap<String,String>(this.appContext.getParam().size()); for ( Iterator<?> itr = this.appContext.getParam().iterator(); itr.hasNext(); ) { XwebParameter param = (XwebParameter)itr.next(); attributes.put(param.getKey(),param.getValue()); } } COM: <s> initialize this instance </s>
funcom_train/46762218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SchedulerJobModel getSchedulerJob(final long schedulerJobId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return SystemData.getSchedulerJob(schedulerJobId, chain, call); }}; return (SchedulerJobModel) call(method, call); } COM: <s> same transaction return the single scheduler job model for the primary key </s>
funcom_train/18945743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showSplash() { splash = new JFrame(); ImageIcon spl = new ImageIcon(App.class.getResource("resources/splash.png")); JLabel l = new JLabel(); l.setSize(400, 300); l.setIcon(spl); splash.getContentPane().add(l); splash.setSize(400, 300); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); splash.setLocation( (screenSize.width - 400) / 2, (screenSize.height - 300) / 2); splash.setUndecorated(true); splash.setVisible(true); } COM: <s> method show splash </s>
funcom_train/44297120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateAxes(final CoordinateSystem object) { final int dimension = object.getDimension(); assertStrictlyPositive("CoordinateSystem: dimension must be greater than zero.", dimension); for (int i=0; i<dimension; i++) { final CoordinateSystemAxis axis = object.getAxis(i); mandatory("CoordinateSystem: axis can't be null.", axis); validate(axis); } } COM: <s> performs the validation that are common to all coordinate systems </s>
funcom_train/26453698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocation(String loc) { LOCATION = loc; for (int i=0; i<observers.size(); i++) { SensorObserver observer = (SensorObserver)observers.get(i); if (observer != null) { observer.sensorUpdated(getHostName(), this); } else { observers.remove(i); } } } COM: <s> sets the sensors location </s>
funcom_train/46453801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Polynomial add(Polynomial p) { int n = Math.max(p.degree(), degree())+1; double[] coef = new double[n]; for(int i = 0;i<n;i++) { coef[i] = coefficient(i)+p.coefficient(i); } return new Polynomial(coef); } COM: <s> adds the given polynomial to this polynomial </s>
funcom_train/3929651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Document getDocument(File data) throws BuilderDriverException { if (data == null) throw new BuilderDriverException("Cannot build document from null"); try { // if (isUsingDOM()) return getDOMBuilder().build(data); // else return getSAXBuilder().build(data); return getSAXBuilder().build(data); } catch (JDOMException x) { throw new BuilderDriverException(x.getMessage()); } catch (IOException x) { throw new BuilderDriverException(x.getMessage()); } } COM: <s> get the document from the data sorce </s>
funcom_train/8073990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() throws CloneNotSupportedException { GABitSet temp = new GABitSet(); temp.setObjective(this.getObjective()); temp.setFitness(this.getFitness()); temp.setChromosome((BitSet)(this.m_chromosome.clone())); return temp; //return super.clone(); } COM: <s> makes a copy of this gabit set </s>
funcom_train/48405198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addParentMovedHandler(com.smartgwt.client.widgets.events.ParentMovedHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.ParentMovedEvent.getType()) == 0) setupParentMovedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.ParentMovedEvent.getType()); } COM: <s> add a parent moved handler </s>
funcom_train/49790541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExceptionInvestgation() throws Exception { TransformationException ex = null; try { root = loadAndCodegen(TestExceptionHandling.class, ROOT + "codegen/ThrowException.iaml"); } catch (TransformationException e) { // pass ex = e; } assertNotNull("An exception should have been thrown.", ex); assertNotNull(ex.getCause()); assertEquals("We should be able to catch this exception.", ex.getCause().getMessage()); } COM: <s> when an exception is thrown we should be able to read it </s>
funcom_train/22081262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String list(int sendTo, int replyTo, String actor, UUID actor_id, String attribute) throws SRCPException { return message(sendTo, replyTo, actor, actor_id, "LIST", attribute, ""); } COM: <s> crcf syntax lt actor gt lt actor id gt list lt attribute gt </s>
funcom_train/12189733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNumberInvalidArg() throws Exception { Expression exp = compileExpression("number('one')"); Value result = exp.evaluate(context); assertTrue("fn:number should result in a Double value", result instanceof DoubleValue); assertTrue("fn:number expression result should be NaN", Double.isNaN(((DoubleValue) result).asJavaDouble())); } COM: <s> test the number function with an invalid argument </s>
funcom_train/4300466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLongParameter(int i, long value) throws SQLException { checkSetParameterIndex(i); int outType = parameterTypes[i - 1]; switch (outType) { case Types.BIGINT : Object o = new Long(value); parameterValues[i - 1] = o; break; case Types.BINARY : case Types.OTHER : throw jdbcUtil.sqlException( Trace.error(Trace.INVALID_CONVERSION)); default : setParameter(i, new Long(value)); } } COM: <s> used with long and narrower integral primitives </s>
funcom_train/44167946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void preload() { synchronized (loadingLock) { if (szAnimation == null) { try { szAnimation = new SimpleZippedAnimation(getResourceLocator().toURL()); } catch (IOException e) { logger.log(Level.WARNING, "Could not load SimpleZippedAnimation: " + getResourceLocator(), e); } } } } COM: <s> preloading the animation </s>
funcom_train/4358076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void deployApps() { File appBase = appBase(); File configBase = configBase(); // Deploy XML descriptors from configBase deployDescriptors(configBase, configBase.list()); // Deploy WARs, and loop if additional descriptors are found deployWARs(appBase, appBase.list()); // Deploy expanded folders deployDirectories(appBase, appBase.list()); } COM: <s> deploy applications for any directories or war files that are found </s>
funcom_train/4920379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testObjectAvailable() throws Exception { // Add the Object this.source.addObject("TEST", new AutoWire(String.class)); // Test this.replayMockObjects(); assertTrue("Added type should be available", this.source.isObjectAvailable(new AutoWire(String.class))); assertFalse("Type not added should not be available", this.source.isObjectAvailable(new AutoWire(Integer.class))); this.verifyMockObjects(); } COM: <s> ensure the added object is available </s>
funcom_train/26345254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toStringWP() { StringBuffer s = new StringBuffer(); s.append("ftp://" + user + ":" + passwd + "@"); for (int i = 0; i < hosts.size(); i++) s.append(hosts.elementAt(i) + ","); if (hosts.size() > 0) s.deleteCharAt(s.length() - 1); s.append(":" + port); return s.toString(); } COM: <s> to string with password </s>
funcom_train/42476950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void advancePhase() { phase = phase.advance(); System.out.println("advanced to "+phase); BPController.setMapMode(MapMode.NONE); BPController.switchGameView(); BPController.notifyPartyWatchers(); if (phase.equals(TurnPhase.PRE_Evening)) { executePreEveningPhase(); } else if (phase.equals(TurnPhase.PRE_NOON)) { executePreNoonPhase(); } } COM: <s> advances the code turn code phase </s>
funcom_train/46040840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HttpResponseBuilder addHeader(String name, String value) { if (name != null) { List<String> values = headers.get(name); if (values == null) { values = Lists.newLinkedList(); headers.put(name, values); } values.add(value); } return this; } COM: <s> add a single header to the response </s>
funcom_train/3041722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeSession() throws ResourceException { // single threaded, no need to synchronize if ( session == null ) { initializeConnection(); try { session = ( SessionImplementor ) mcf.getSessionFactory().openSession( connection ); } catch( Throwable t ) { String message = "Cannot allocate Hibernate session!"; log.warn( message, t ); errorNotification(); throw new ResourceException( message, t ); } } } COM: <s> creates a session from the session factory </s>
funcom_train/27822808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OIModelInfo getOIModelInfo(String uri) throws KAONException { OIModelInfo oimodelInfo=(OIModelInfo)m_oimodelInfos.get(uri); if (oimodelInfo==null) { Instance oimodelInstance=m_registryOIModelInstance.getInstance(uri); oimodelInfo=new OIModelInfo(this,oimodelInstance); m_oimodelInfos.put(uri,oimodelInfo); } return oimodelInfo; } COM: <s> returns the oimodel info object for given uri </s>
funcom_train/43325948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dlf( String format, Object... args ) { if (debug == false) return; long millis = System.currentTimeMillis() % NumMillis; System.out.print( c.GREEN + c.BOLD + "DEBUG: " + millis + " " + c.REMOVE ); System.out.printf( format + "\n", args ); } COM: <s> prints with a newline using printf and a debug header </s>
funcom_train/29288066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createResponsibility(Composite parent) { //Responsibilities final Label label = new Label(parent, SWT.NONE); label.setText(Messages.getString("org.isistan.flabot.edit.ucmeditor.dialogs.EditDependencyDialog.conditionResponsibility")); //$NON-NLS-1$ comboResponsibilities = new Combo(parent, SWT.READ_ONLY); comboResponsibilities.setLayoutData(new GridData( GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL)); comboResponsibilities.setEnabled(false); } COM: <s> creates the label and combo box for the condition responsibility nodes </s>
funcom_train/6540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void convertNonSerializableParams(Object[] params) { // Happens when the method is parameter-less if (params == null) { return; } for (int i = 0; i < params.length; i++) { params[i] = Naming.getParameterStubIfNeeded(params[i]); } } COM: <s> replaces method parameters with trmi stubs as needed </s>
funcom_train/11320079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getIconClass(TreeNode treeNode) { if (isExpandedParent(treeNode)) { return EXPAND_ICON; } else if (!treeNode.isExpanded() && treeNode.hasChildren() || treeNode.isChildrenSupported()) { return COLLAPSE_ICON; } else { return LEAF_ICON; } } COM: <s> query the specified tree node and check which css class to apply for </s>
funcom_train/38851203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void actionAnimate() { ActionList animate = new ActionList(1250);// animate.setPacingFunction(new SlowInSlowOutPacer()); animate.add(new QualityControlAnimator()); animate.add(new VisibilityAnimator(GRAPH)); animate.add(new PolarLocationAnimator(NODES, linear)); animate.add(new ColorAnimator(NODES)); animate.add(new RepaintAction()); m_vis.putAction("animate", animate); m_vis.alwaysRunAfter("filter", "animate"); m_vis.alwaysRunAfter("filter", "layout2"); } COM: <s> add the animations for the visualization </s>
funcom_train/3308059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flush() { // If we're stopped, we should start a new LogWriter so the // queue gets output to the output stream. We then set // _run to false, which will cause the worker thread to // exit and flush the output buffers after writing all of the // messages to the queue. We could potentially lose some // messages if new messages arrive after the worker thread // exits. start(_workerThreadPriority); stop(); } COM: <s> flush the contents of the message queue to the output stream </s>
funcom_train/14093247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEvaluateEndsString() { String leftside = "ABC"; String rightside = "BC"; int operation = Operator.Operation.ENDSWITH; boolean ignoreCase = false; boolean expectedReturn = true; boolean actualReturn = Operator.evaluate(leftside, rightside, operation, ignoreCase); assertEquals("return value", expectedReturn, actualReturn); } COM: <s> test endswith true </s>
funcom_train/9235185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean doRemove(final String name) { for (Action alias : AliasWrapper.getAliasWrapper().getActions()) { if (AliasWrapper.getCommandName(alias).substring(1).equalsIgnoreCase(name)) { alias.delete(); ActionManager.unregisterAction(alias); return true; } } return false; } COM: <s> removes the alias with the specified name </s>
funcom_train/37087241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeGroupBuild() { chainOf = new Chain[defaultGroupCount]; group3Of = new String[defaultGroupCount]; seqcodes = new int[defaultGroupCount]; firstNodeIndexes = new int[defaultGroupCount]; currentChainID = '\uFFFF'; currentChain = null; currentGroupInsertionCode = '\uFFFF'; currentGroup3 = "xxxxx"; currentModelIndex = -1; currentModel = null; } COM: <s> also from calculate structures </s>
funcom_train/46580182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting()) { return; } actionsProvider.provide(selectionModel.getSelected()); // hack to stop selection if window is not active // TODO: fix selection mechanism properly TopComponent tc = (TopComponent)itemCountShower; if (!tc.isShowing()) { return; } selectionNotifier.fire(); } COM: <s> receiving a table row selection changed event </s>
funcom_train/12759720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetApplicationIdentityMap() throws EnyWareException { String locationType = PropertyCatalog .getProperty("EnyWareApplicationIdentityMapLocationType"); if (locationType.equals("file")) { getApplicationMapFromFile(PropertyCatalog .getProperty("EnyWareApplicationIdentityMapLocation")); } else if (locationType.equals("database")) { getApplicationMapFromDB(); } else { throw new EnyWareException( "EnyWare Application Identity Map Location Type NOT specified."); } } COM: <s> method reset application identity map </s>
funcom_train/31677995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar getJJMenuBar() { if (jJMenuBar == null) { jJMenuBar = new JMenuBar(); jJMenuBar.add(getJMenuFile()); jJMenuBar.add(getJMenuOptions()); // Generated jJMenuBar.add(getJMenuView()); // Generated jJMenuBar.add(getJMenuHelp()); // Generated } return jJMenuBar; } COM: <s> this method initializes j jmenu bar </s>
funcom_train/51822523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJLoginButton2() { if (JLogoutButton == null) { JLogoutButton = new JButton(); JLogoutButton.setAction(new AbstractAction(){ public void actionPerformed(ActionEvent arg0) { doLogout(); } }); JLogoutButton.setPreferredSize(new Dimension(75, 29)); JLogoutButton.setText("Logout"); JLogoutButton.setVisible(false); } return JLogoutButton; } COM: <s> this method initializes jlogin button </s>
funcom_train/40647922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JClassType getGenericTypedInterface(final JClassType classThatImplementsTheInterface) { JClassType[] interfaces = classThatImplementsTheInterface.getImplementedInterfaces(); if (interfaces.length == 1) { JClassType translatorInterface = interfaces[0]; JParameterizedType type = translatorInterface.isParameterized(); if (type != null) { JClassType[] genericTypes = type.getTypeArgs(); if (genericTypes.length == 1) { return genericTypes[0]; } } } return null; } COM: <s> gets the generic type of the implemented interface </s>
funcom_train/40885688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void compileShaders (String vertexShader, String fragmentShader) { vertexShaderHandle = loadShader(GL20.GL_VERTEX_SHADER, vertexShader); fragmentShaderHandle = loadShader(GL20.GL_FRAGMENT_SHADER, fragmentShader); if (vertexShaderHandle == -1 || fragmentShaderHandle == -1) { isCompiled = false; return; } program = linkProgram(); if (program == -1) { isCompiled = false; return; } isCompiled = true; } COM: <s> loads and compiles the shaders creates a new program and links the shaders </s>
funcom_train/38309289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVisible(String columnName, boolean visible) throws ColumnNotDefinedException { if (hiddenFields == null) { if (visible == true) { // nothing 2 do! return; } hiddenFields = new HashSet<String>(); } if (visible) { hiddenFields.remove(columnName); } else { hiddenFields.add(columnName); } } COM: <s> sets the row specific visibility flag for the given field </s>
funcom_train/13545209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireEdgeRemoved( Edge edge ) { GraphEdgeChangeEvent e = createGraphEdgeChangeEvent( GraphEdgeChangeEvent.EDGE_REMOVED, edge); for (int i = 0; i < this.m_graphListeners.size(); i++) { GraphListener l = (GraphListener) this.m_graphListeners.get(i); l.edgeRemoved( e ); } } COM: <s> notify listeners that the specified edge was removed </s>
funcom_train/51788001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInteractionPartPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Interaction_interactionPart_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Interaction_interactionPart_feature", "_UI_Interaction_type"), RAMPackage.Literals.INTERACTION__INTERACTION_PART, true, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the interaction part feature </s>
funcom_train/2423780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean moveToTop(Object o) { if (o instanceof OperationWrapperNode) { return moveOperationToTop((OperationWrapperNode) o); } else if (o instanceof EmailWrapperNode) { return moveEmailNodeToTop((EmailWrapperNode) o); } else { return movePipelineNodeToTop(o); } } COM: <s> moves the given node to the top of the z order </s>
funcom_train/17795456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readBlocking() { if (DEBUG) logger.debug(name + " read Blocking"); readNonBlocking(); if (DEBUG) logger.debug(name + " wait for process"); waitForProcess(); waitForReaders(); // it seems that thread termination and stream closing is working without // any help process = null; outputReader = null; errorReader = null; if (DEBUG) logger.debug(name + " read done"); } COM: <s> read data from the external process and block the calling thread until </s>
funcom_train/20483566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(OWLEntity obj) throws OWLException { List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>(); for (OntologyBookmarks bm : ontologybookmarks.values()){ changes.addAll(bm.remove(obj)); } if (!changes.isEmpty()){ mngr.applyChanges(changes); refill(); } } COM: <s> always remove from all ontologies bookmark </s>
funcom_train/46617957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDataTypeDefinition(String typeName, Class typeClass) { AntTypeDefinition def = new AntTypeDefinition(); def.setName(typeName); def.setClass(typeClass); updateDataTypeDefinition(def); String msg = " +User datatype: " + typeName + " " + typeClass.getName(); project.log(msg, Project.MSG_DEBUG); } COM: <s> adds a new datatype definition </s>
funcom_train/26433054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSubtitleListener(boolean state) { Util.debug("Setting subtitle listener: " + state); SubtitlingEventControl subtitlingControl = getSubtitlingControl(); if (subtitlingControl == null) { Util.debug("Could not get subtitling control"); return; } if (state) subtitlingControl.addSubtitleListener(this); else subtitlingControl.removeSubtitleListener(this); } COM: <s> sets the appliacation as subtitle listener or removes the </s>
funcom_train/46841421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle2D getAbsoluteBounds() { Area transformedArea = getTransformedArea(); Rectangle2D relativeBounds = transformedArea.getBounds2D(); return relativeBounds; /*new Rectangle2D.Double(relativeBounds.getX(), relativeBounds.getY(), relativeBounds.getWidth(), relativeBounds.getHeight()); */ } COM: <s> returns bounds of the area after transform is applied </s>
funcom_train/18216000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readDBSetup() throws Exception { InputStream fileStream = null; Element configuration; try { fileStream = getStream(DB_DIRECTORY, getDBFilename()); assert fileStream != null : getFilename(DB_DIRECTORY, getDBFilename()); configuration = new SAXBuilder().build(fileStream).getRootElement(); } finally { if (fileStream != null) { fileStream.close(); } } this.bugzillaDbConfigurationElement = configuration .getChild("bugzilladb"); this.scmDbConfigurationElement = configuration.getChild("scmdb"); } COM: <s> reads the database setup for this test </s>
funcom_train/9345629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object doInTransaction(TransactionStatus ts) { try { HtmlDocument temp = htmlDocumentDao.findByUrl(document .getDocUrl()); if (temp != null) { htmlDocumentDao.makeTransient(temp); htmlDocumentDao.flush(); } htmlDocumentDao.makePersistent(document); htmlDocumentDao.flush(); htmlDocumentDao.clear(); contentProcessor.processContent(); } catch (Exception e) { ts.setRollbackOnly(); System.err.println("Error when creating index."); System.err.println(e.getMessage()); e.printStackTrace(); log.error("Error when creating index.", e); } return null; } COM: <s> the range of this transaction is save or update the document to </s>
funcom_train/7466393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void growVisitedArrays() { int oldLen = objects.length; int newLen = oldLen * 2; Object[] newObjects = new Object[newLen]; int[] newOffsets = new int[newLen]; System.arraycopy(objects, 0, newObjects, 0, oldLen); System.arraycopy(offsets, 0, newOffsets, 0, oldLen); objects = newObjects; offsets = newOffsets; } COM: <s> doubles the size of the visited arrays </s>
funcom_train/18427877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String result = "Sequence '" + sequenceName + "' has Motions Id: "; Enumeration enumMotions = motions.elements(); while (enumMotions.hasMoreElements()) { result += (Integer) enumMotions.nextElement() + ", "; } return result; } COM: <s> creates a string representation of a sequence object </s>
funcom_train/535900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRatingsRoot(File mservRoot) { try { this.mservDb = new MservDb(mservRoot); } catch (IOException e) { LOG.fatal("Can't locate mserv db root.", e); FairDj.getFairDj().shutdown(null, FairDj.Shutdown.Now); } } COM: <s> sets the root for the rating files </s>
funcom_train/6504930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LineType (String name, float[] dash) { this.dash = dash; stroke = new BasicStroke (WIDTH, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 2.0f, dash, 0.0f); this.name = new String (name); } COM: <s> creates line type object with dashing pattern </s>
funcom_train/19967567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addConcept(C concept, Float value){ if ((value > new Float(0)) && (value <= new Float(1))){ vector.put(concept, value); return true; } else { System.err.println("Error during addConcept("+concept.toString()+","+value.toString()+"), value must be in [0,1]"); return false; } } COM: <s> used to add a concept and its value in the semantic vector </s>
funcom_train/50802601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tick(boolean real, int miniticks) { try { setTicksUntilRefresh((getTicksUntilRefresh() - miniticks)); if (getTicksUntilRefresh() < 0) { setTicksUntilRefresh(0);//dont let a factory drop below 0 ticks to refresh } } catch (Exception ex) { //this should never be reached, since ticks no longer produce mechs @urgru 2/04/03 MMServ.addToErrorLog(ex); System.out.println(ex.toString()); } } COM: <s> this is called on a tick </s>
funcom_train/22929391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCommandHandler() throws Exception { simpleCompositeCommandHandler.addCommandHandler(commandHandler1); simpleCompositeCommandHandler.addCommandHandler(commandHandler2); assertSame("index 0", commandHandler1, simpleCompositeCommandHandler.getCommandHandler(0)); assertSame("index 1", commandHandler2, simpleCompositeCommandHandler.getCommandHandler(1)); } COM: <s> test the get command handler int method </s>
funcom_train/4709181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initSSLEngine() { Socket socket = getChannel().socket(); engine = useClientMode ? sslc.createSSLEngine(socket.getInetAddress() .getHostAddress(), socket.getPort()) : sslc.createSSLEngine(); engine.setUseClientMode(useClientMode); } COM: <s> subclass can orverride this method to config sslengine </s>
funcom_train/30204879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSpinner getJSpinnerPointBx() { if (jSpinnerPointBx == null && annotation instanceof ExtentAble) { spinnerModelPointBx = new SpinnerNumberModel(); spinnerModelPointBx.setValue(((ExtentAble) annotation).getPointB().x); spinnerModelPointBx.setStepSize(1); jSpinnerPointBx = new JSpinner(spinnerModelPointBx); } return jSpinnerPointBx; } COM: <s> this method initializes j spinner point bx </s>
funcom_train/15482942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getHost() { String host = getSystemProperties().getProperty("mail.smtp.host", null); //$NON-NLS-1$ if (host == null) { throw new IllegalStateException(Messages.getInstance( Messages.DEFAULT_BUNDLE_NAME, this.getClass()).getString( "Eval.Utils.ElectronicMail.invalid_host_part")); //$NON-NLS-1$ } return host; } COM: <s> precond a host must have been defined </s>
funcom_train/16486583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getObject( byte[] bytes ) { Object o = null; try { ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream( bytes ) ); o = in.readObject(); in.close(); } catch ( IOException e ) { kernel.getLog().error( e ); } catch ( ClassNotFoundException e ) { kernel.getLog().error( e ); } return o; } COM: <s> turns bytes into an object </s>
funcom_train/23185032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableCellRenderer getCellRenderer(int row, int column) { if (whiteRenderer == null) { whiteRenderer = new DefaultTableCellRenderer(); } if (grayRenderer == null) { grayRenderer = new DefaultTableCellRenderer(); grayRenderer.setBackground(new Color(238, 246, 255)); } if ((row % 2) == 0) return whiteRenderer; else return grayRenderer; } COM: <s> if row is an even number get cell renderer returns a </s>
funcom_train/27824963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLexicalEntryRow(LexicalEntry lexicalEntry) { for (int i=0;i<m_elements.size();i++) { TableRow tableRow=(TableRow)m_elements.get(i); if (tableRow.m_lexicalEntry.equals(lexicalEntry)) return i; } return -1; } COM: <s> returns the index of the row with given lexical entry </s>
funcom_train/40423699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAddress(IPAddresses ipAddresses) { synchronized (ipAddressVector) { if (!ipAddressVector.contains(ipAddresses)) { logger.debug("Adding new IP Address [" + ipAddresses.getInitialIPAddress().toString() + "]"); ipAddressVector.add(ipAddresses); } } } COM: <s> adds a new address into the permitted list </s>
funcom_train/9701025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String replaceServerSideClass(String storeLocation,String workspacePath, String packageName, String fileName) { String packagePathFragment = packageName.replace('.', File.separatorChar); fileName = File.separator+packagePathFragment+File.separator+fileName; fileName = workspacePath+storeLocation+File.separator+SOURCE_DIRECTORY+fileName; return fileName; } COM: <s> fix the path of a class to be the absolute path </s>
funcom_train/21686781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getIntervalsButton() { if (intervalsButton == null) {//GEN-END:|55-getter|0|55-preInit // write pre-init user code here intervalsButton = new Command("Intervals", Command.OK, 0);//GEN-LINE:|55-getter|1|55-postInit // write post-init user code here }//GEN-BEGIN:|55-getter|2| return intervalsButton; } COM: <s> returns an initiliazed instance of intervals button component </s>
funcom_train/13246577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectCell(int cell) { // get the coordinates at top left of the cursor's current block int x = (cursorX * 3) / 3; int y = (cursorY * 3) / 3; // convert into x,y coordinates setCursorX(x + ((cell - 1) % 3)); setCursorY(y + ((cell - 1) / 3)); setCursorMode(CURSOR_MODE_DIGIT); } COM: <s> sets the cursor to the selected cell within the current block </s>
funcom_train/44779015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAll() { if (myPropertyTreeNode != null) { myPropertyTreeNode.removeAll(); } else if (myValues != null) { synchronized (myValues) { myValues.clear(); } } else { throw new IllegalStateException("HeadTreeNode: removeAll: HeadTreeNode must have either a PropertyTreeNode or list of values."); } } COM: <s> removes all dbelements from this node down </s>
funcom_train/32363048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getMinimumSize() { Dimension ms = super.getMinimumSize(); if (ms == null) { if (minWidth > 0 || minHeight > 0) ms = new Dimension(); else return null; } if (minWidth > 0) ms.width = minWidth; if (minHeight > 0) ms.height = minHeight; return ms; } COM: <s> gets minimum size </s>
funcom_train/18514503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PropertyDescriptor createPropertyDescriptor (String name, String gett, String sett, String group) { PropertyDescriptor pd=null; try { pd = new PropertyDescriptor (name, HodgkinHuxleyModel_1952.class, gett, sett); pd.setShortDescription(group); } catch (IntrospectionException ex) {} return pd; } COM: <s> create a new property descriptor </s>
funcom_train/23411464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addConceptTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DataValue_conceptType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DataValue_conceptType_feature", "_UI_DataValue_type"), SwrlPackage.Literals.DATA_VALUE__CONCEPT_TYPE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the concept type feature </s>
funcom_train/6406421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { GameTask<?> task = queue.poll(); do { if (task == null) return; while (task.isCancelled()) { task = queue.poll(); if (task == null) return; } task.invoke(); } while ((executeAll.get()) && ((task = queue.poll()) != null)); } COM: <s> this method should be invoked in the update or render method </s>
funcom_train/18792995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AlloyExpr visitExistsPred(ExistsPred existsPred) { Pair<List<ExprVar>, AlloyExpr> decls = processQuantPredDecls(existsPred); AlloyExpr pred = processQuantPred(existsPred, true, decls.getSecond()); return pred.forSome(decls.getFirst()); } COM: <s> uses visit to recursively translate variables and predicates </s>
funcom_train/26661922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _updatePatientWithStudies( PatientModel patient, ContentManager cm ) throws Exception { List studies = cm.listStudiesOfPatient( patient.getPk() ); for (int i = 0, n = studies.size(); i < n; i++) studies.set(i, new StudyModel((Dataset) studies.get(i))); patient.setStudies( studies ); } COM: <s> update given patient with studies </s>
funcom_train/18744829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public SystemStore newStore(URL url) throws IOException { SystemStore store = null; try { store = new DefaultArchiveSystemStore(url); } catch (IllegalArgumentException exc) { try { store = new DefaultFileSystemStore(url); } catch (IllegalArgumentException exc1) { throw new IOException(exc1.getMessage()); } } return store; } COM: <s> creates an appropriate system store from a given url </s>
funcom_train/19846208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getArea(int x, int y, int width, int height, ByteBuffer target) { if (target.capacity() < width * height * 4) { throw new IllegalArgumentException( "Byte buffer provided to get area is not big enough"); } predraw(); GL.glReadPixels(x, screenHeight - y - height, width, height, SGL.GL_RGBA, SGL.GL_UNSIGNED_BYTE, target); postdraw(); } COM: <s> get an ara of pixels as rgba values into a buffer </s>
funcom_train/49824149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStartTime(String startDate) { DateTimeFormat dtf = DateTimeFormat.getFormat("MM/dd/yy"); if (null == startDate || 0 == startDate.length()) { this.startTime = new Date(System.currentTimeMillis()); } else { this.startTime = dtf.parse(startDate); } } COM: <s> sets project start date </s>
funcom_train/12162264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClosePaneDoNothing() throws Exception { PaneAttributes attributes = new PaneAttributes(); DOMOutputBuffer dom = setupForPaneTests( PaneRendering.DO_NOTHING, attributes); final Element expected; expected = dom.openStyledElement("body", attributes); dom.appendEncoded("Example"); protocol.closePane(dom, attributes); assertSame("The DOM's current element isn't the body element", dom.getCurrentElement(), expected); } COM: <s> test closing a pane where nothing needed to be done to surround the </s>
funcom_train/49670570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createButtonReloadPlugins() { final Button buttonReloadPlugins = addButton("&Reload Plugins"); final FormData layout = SharedStyle .relativeToBottomRight(buttonGetPlugins); buttonReloadPlugins.setLayoutData(layout); buttonReloadPlugins.addListener(SWT.Selection, new Listener() { public void handleEvent(final Event ev) { reloadPlugins(); MainMenu.getInstance().reloadMenu(false); } }); } COM: <s> creates a button that reloads plugins </s>
funcom_train/10842245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closeInputStreams(final InstallableResource[] resources) { if ( resources != null ) { for(final InstallableResource r : resources ) { final InputStream is = r.getInputStream(); if ( is != null ) { try { is.close(); } catch (final IOException ignore) { // ignore } } } } } COM: <s> try to close all input streams </s>
funcom_train/14241631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getRowWidth(int row) { int currentWidth = 0; for (int i = 0 ; i < _layoutedClassNodes.size(); i++) { if ((getBOTLRuleDiagramNode(i)).getRank() == row) { currentWidth += (getBOTLRuleDiagramNode(i).getSize().width + getHGap()); } } return currentWidth; } COM: <s> calculate the width of the row </s>
funcom_train/38522366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document createDefaultDocument() { StyleSheet defaultStyles = getStyleSheet(); StyleSheet mandyss = new MandyStyleSheet(); mandyss.addStyleSheet(defaultStyles); HTMLDocument doc = new MandyDocument(mandyss); doc.setParser(getParser()); doc.setAsynchronousLoadPriority(4); doc.setTokenThreshold(100); return doc; } COM: <s> create an uninitialized text storage model </s>
funcom_train/33233692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getMeaningMeaningSI() { if (meaningMeaningSI == null) {//GEN-END:|88-getter|0|88-preInit // write pre-init user code here meaningMeaningSI = new StringItem("Meaning", null);//GEN-LINE:|88-getter|1|88-postInit // write post-init user code here }//GEN-BEGIN:|88-getter|2| return meaningMeaningSI; } COM: <s> returns an initiliazed instance of meaning meaning si component </s>
funcom_train/24239836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean systemIsEnabled(){ URLConnection connection = getConnectionToServerScript(); // Create a connection back to the server script DataOutputStream dos = authenticate(8, connection); // Authenticate with the server and tell the server what we want it to do try { dos.flush(); dos.close(); InputStream is = connection.getInputStream(); if(is.read() ==0){ is.close(); return false; }else{ is.close(); return true; } } catch (IOException e) { e.printStackTrace(); } return false; } COM: <s> checks to see if the grad write up system is enabled for students </s>
funcom_train/17674277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private State getForReadState() { if (state.isEmpty()) return null; if (forReadState == null) forReadState = classMetaData.createState(); if (forReadState.isEmpty()) state.fillForRead(forReadState, getPm()); return forReadState; } COM: <s> return a state containing the current values of all fake fields </s>
funcom_train/1723571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean copyRecursive(FileRef[] filesToCopy, FileRef toFolder) throws Exception { for(int i = 0; i < filesToCopy.length; i++) { if(filesToCopy[i].isDirectory()) copyRecursive(list(filesToCopy[i]), mix(filesToCopy[i], toFolder)); else copy(filesToCopy[i], mix(filesToCopy[i], toFolder)); } return true; } COM: <s> copy files to a given folder </s>
funcom_train/39315009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /** public void testViewBitmapActionPerformed() { System.out.println("testViewBitmapActionPerformed"); f.ViewBitmapActionPerformed(actionEvent); t.ViewBitmapActionPerformed(actionEvent); assertNotNull(t.center); assertNotNull(f.center); //needs work } COM: <s> test of spray1 action performed method of class terp paint </s>
funcom_train/265497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireEditingStopped() { CellEditorListener listener; Object[] listeners = getListenerList().getListenerList(); for (int i = 0; i < listeners.length; i++) { if (listeners[i] == CellEditorListener.class) { listener = (CellEditorListener) listeners[i + 1]; listener.editingStopped(changeEvent); } } } COM: <s> notifies all listeners that have registered interest for notification on </s>
funcom_train/25030138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIdenticalTextPadIndex(String path, int paneIdx) { MotherTabbedPane pane = getTabbedPaneAt(paneIdx); int len = pane.getTabCount(); // the number of tabs // checks each tab to see if any have the given path for (int i = 0; i < len; i++) { if (getTextPadAt(pane, i).getPath().equals(path)) { return i; } } return -1; } COM: <s> finds the tab with the given path </s>
funcom_train/11745744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSubentityOf(ObjEntity entity) { if (entity == null) { return false; } if (entity == this) { return false; } ObjEntity superEntity = getSuperEntity(); if (superEntity == entity) { return true; } return (superEntity != null) ? superEntity.isSubentityOf(entity) : false; } COM: <s> returns true if this entity directly or indirectly inherits from a given entity </s>
funcom_train/40450164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdMasInfo() { if (cmdMasInfo == null) {//GEN-END:|88-getter|0|88-preInit // write pre-init user code here cmdMasInfo = new Command("Mas informaci\u00F3n ", Command.OK, 0);//GEN-LINE:|88-getter|1|88-postInit // write post-init user code here }//GEN-BEGIN:|88-getter|2| return cmdMasInfo; } COM: <s> returns an initiliazed instance of cmd mas info component </s>
funcom_train/51812906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MBeanAttributeInfo getAttributeInfo(Attribute attribute) throws AttributeNotFoundException { MBeanInfo info = getMBeanInfo(); MBeanAttributeInfo[] attrs = info.getAttributes(); for ( MBeanAttributeInfo attr : attrs ) { if ( attr.getName().equals(attribute.getName())) return attr; } throw new AttributeNotFoundException(attribute.getName()); } COM: <s> internal helper method for looking up the attribute info for a given </s>
funcom_train/16274398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean readCommittedIsolationMaintained(String scenario) { int isolation = java.sql.Connection.TRANSACTION_READ_UNCOMMITTED; Session testSession = null; try { testSession = openSession(); isolation = testSession.connection().getTransactionIsolation(); } catch( Throwable ignore ) { } finally { if ( testSession != null ) { try { testSession.close(); } catch( Throwable ignore ) { } } } if ( isolation < java.sql.Connection.TRANSACTION_READ_COMMITTED ) { reportSkip( "environment does not support at least read committed isolation", scenario ); return false; } else { return true; } } COM: <s> is connection at least read committed </s>
funcom_train/45244293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonArvore() { if (jButtonArvore == null) { jButtonArvore = new JButton(); jButtonArvore.setLocation(new Point(245, 55)); jButtonArvore.setBackground(new Color(173, 200, 226)); jButtonArvore.setIcon(new ImageIcon(getClass().getResource("/br/uesc/computacao/estagio/apresentacao/figuras/folder.png"))); jButtonArvore.setSize(new Dimension(31, 28)); jButtonArvore.setCursor(new Cursor(Cursor.HAND_CURSOR)); } return jButtonArvore; } COM: <s> this method initializes j button arvore </s>
funcom_train/27779768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long addElement(Object obj) { try { rf.writeLong(rfd.length()); rfd.writeShort(mw.indexOf(obj)); ((org.egothor.data.Saveable) obj).store(rfd); return size++; } catch (IOException x) { logger.log(Level.SEVERE, "cannot do addElement", x); return -1; } } COM: <s> appends a new object to the structure </s>
funcom_train/9957889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createContents(final Composite parent) { // Fill the parent window with the buttons and sash parent.setLayout(new FillLayout()); // Create the SashForm and the buttons final SashForm sashForm = new SashForm(parent, SWT.HORIZONTAL); new Button(sashForm, SWT.PUSH).setText("Left"); new Button(sashForm, SWT.PUSH).setText("Right"); } COM: <s> creates the main windows contents </s>
funcom_train/12192632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReusableStringBuffer append(ReusableStringBuffer rsb) { if (rsb == null) { return append("null"); } int newLength = rsb.length + length; if(newLength > value.length) { expandCapacity(newLength); } System.arraycopy(rsb.value, 0, value, length, rsb.length); setLength(newLength); return this; } COM: <s> append the given reusable string buffer to the end of this </s>
funcom_train/34849935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectionColor(final String stateID, final GLColor color) { WidgetState state = null; if ( stateID == ALL_STATE ) { Iterator<WidgetState> i = getStates().iterator(); while ( i.hasNext() ) { state = i.next(); if ( state instanceof FocusedState ) { ((FocusedState)state).setSelectionColor(color); } } } else { state = getState(stateID); if ( state instanceof FocusedState ) { ((FocusedState)state).setSelectionColor(color); } } } COM: <s> sets the selection color for a state of a widget </s>
funcom_train/10616835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPrincipals_01() { ProtectionDomain pd = new ProtectionDomain(null, null, null, principals); Principal[] got = pd.getPrincipals(); assertNotNull(got); assertNotSame(got, principals); assertNotSame(got, pd.getPrincipals()); assertTrue(got.length == principals.length); } COM: <s> get principals returns new array each time its called </s>
funcom_train/39277505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection values(String groupName) { if (groupName == null) { groupName = DEFAULT_HASH_NAME; } String[] keys = keys(groupName); if (keys == null) { return null; } if (keys.length > 0) { Vector values = new Vector(); for (int x = 0; x < keys.length; x++) { values.add(get(keys[x], groupName)); } return values; } return null; } COM: <s> returns a collection of strings representing the values of the key </s>
funcom_train/8471830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(Object d) { if (d != null) { elements.add(new Element(d, ElementState.WAITING)); close(d); } else { Log.logThis("WARN_STREAM_WRITE_NULL someone wanted to write a null..."); Log.traceThis("WARN_STREAM_WRITE_NULL stacktrace:", new RuntimeException().fillInStackTrace()); } } COM: <s> add a completed object to the stream </s>
funcom_train/14356486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResource(List defaults, String bundleName) { ResourceBundle bundle = ResourceBundle.getBundle(bundleName); for (Enumeration keys = bundle.getKeys(); keys.hasMoreElements(); ) { String key = (String)keys.nextElement(); defaults.add(key); defaults.add(bundle.getObject(key)); } } COM: <s> adds the all keys values from the given named resource bundle to the </s>