__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/35947268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Text replace(CharSet charSet, java.lang.CharSequence replacement) { int i = indexOfAny(charSet); return (i < 0) ? this : // No character to replace. subtext(0, i).concat(Text.valueOf(replacement)).concat( subtext(i + 1).replace(charSet, replacement)); } COM: <s> replaces the specified characters in this text with the specified </s>
funcom_train/50480732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean createNewSession() throws IOException { if (session != null) { session.invalidate(); sessionID = null; } session = request.getSession(true); if (session != null) { sessionID = session.getId(); if (hasContent(userID)) { session.setAttribute(USER_ID_KEY, userID); } } return hasSession(); } COM: <s> method that creates a new session </s>
funcom_train/1942451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tearOff(CDIInternalFrame comp){ cacheLoc(comp.getId(), comp.getBounds()); DockableJFrame frame = new DockableJFrame(comp.getProperties(), this); frame.setContentPane(comp.getContentPane()); frame.setBounds(comp.getBounds() ); frame.setVisible(true); id2JFrame.put(comp.getProperties(), frame); comp.close(); } COM: <s> tear off given internal frame </s>
funcom_train/4814295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMoveNowhere() { board.addTile(duck, 0, 0); duck.setFaceUp(); try { board.moveTile(humansPlayer, 0, 0, 0, 0); fail("Shouldn't be able to move a tile no spaces"); } catch (IllegalMoveException expected) { // Success } } COM: <s> tests that a move cant have zero distance </s>
funcom_train/49794181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBuildSuccessCount(String user) { List<SensorData> datas = getSensorData(user, "Build"); int success = 0; for (SensorData data : datas) { String result = this.getPropertyValue(data, "Result"); if ("Success".equals(result)) { success++; } } return success; } COM: <s> returns the number of successful builds </s>
funcom_train/22309880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void customiseFont(Graphics g) { g.setXORMode( Color.BLUE); Font currentFont = g.getFont(); Font boldFont = new Font(currentFont.getName(), Font.BOLD, currentFont.getSize()); g.setFont(boldFont); } COM: <s> method to customise the font used to write over image </s>
funcom_train/3447314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float height(float dist) { if (focusHeight == 0) { return 0; } float realFocus = focusRadius / getMaximumScale(); if (dist > lensRadius) { return 0; } else if (dist <= realFocus) { return focusHeight; } else { float t = (dist - realFocus) / (lensRadius - realFocus); return Math.min(focusHeight * lens(t), focusHeight); } } COM: <s> returns the height at the specified distance from the focus </s>
funcom_train/3598102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTimeInteractions() { try { double st = 123.45; double et = 234.56; word.setStartTime(et); word.setEndTime(st); assertEquals(word.getStartTime(), et); assertEquals(word.getEndTime(), st); fail("No exception raised when setting end time after start time!"); } catch (NOMException nex) { // OK nex.printStackTrace(); } } COM: <s> testing what happens when setting invalid times etc </s>
funcom_train/15408805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SocketClusterStatus getStatus() { // count of online members int currentGroupSize = 0; for (int i = 0; i < members.length; i++) { if (members[i].isOnline()) { ++currentGroupSize; } } int txnIn = txnIncoming.get(); int txnOut = txnOutgoing.get(); return new SocketClusterStatus(currentGroupSize, txnIn, txnOut); } COM: <s> return the current status of this instance </s>
funcom_train/50900086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SalesMan getSalesMan(JDCConnection oConn) throws SQLException { if (isNull(DB.gu_sales_man)) { return null; } else { SalesMan oSlm = new SalesMan(); oSlm.load(oConn, getString(DB.gu_sales_man)); return oSlm; } } COM: <s> get sales man </s>
funcom_train/13850687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkPlatform(String classpath, String source) { Message message; String[] paths = parseClasspath(classpath, source); for (int i = 0; i < paths.length; i++) { if (paths[i].endsWith("jsk-platform.jar")) { message = new Message(Reporter.INFO, getString("hasplatform"), getString("platformExp")); Reporter.print(message, source); return; } } message = new Message(Reporter.WARNING, getString("noplatform"), getString("platformExp")); Reporter.print(message, source); } COM: <s> check code classpath code for the existence of </s>
funcom_train/36442612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jFrame.setJMenuBar(getJJMenuBar()); jFrame.setSize(800, 600); jFrame.setContentPane(getJContentPane()); jFrame.setTitle("Definator Admin Client v0.1"); } return jFrame; } COM: <s> this method initializes j frame </s>
funcom_train/9278564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tearDown() throws Exception { Connection conn = getConnection(); Statement stmt = conn.createStatement(); stmt.executeUpdate("DROP TABLE tableWithPK"); stmt.executeUpdate("drop function badfunction1"); stmt.executeUpdate("drop function badfunction2"); stmt.executeUpdate("drop function badfunction3"); stmt.close(); conn.close(); super.tearDown(); } COM: <s> drop the table </s>
funcom_train/7732650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) { remoteDevices.addElement(btDevice); String deviceName; try { deviceName = btDevice.getFriendlyName(false); } catch (IOException e) { deviceName = "Unknown Device"; } deviceNames.addElement(deviceName); } COM: <s> callback for every bt device discovered during inquiry </s>
funcom_train/48524548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void routeMyMsgDirect(NodeHandle nh) { System.out.println(this+" sending direct to "+nh+" at "+endpoint.getEnvironment().getTimeSource().currentTimeMillis()); Message msg = new MyMsg(endpoint.getId(), nh.getId()); endpoint.route(null, msg, nh); } COM: <s> called to directly send a message to the nh </s>
funcom_train/624306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void log(final String logMessage) { // As JTextArea#append is thread-safe it could be called in this thread. // However, if we want the scroll pane to be updated to show the last // inserted line, this method must be called in the event dispatch // thread. SwingUtilities.invokeLater(new Runnable() { public void run() { instance.logArea.append(dateFormat.format(new Date()) + " " + logMessage + "\n"); } }); } COM: <s> add a log message to the main window </s>
funcom_train/3414621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private E unlinkLast() { Node<E> l = last; if (l == null) return null; Node<E> p = l.prev; last = p; if (p == null) first = null; else p.next = null; --count; notFull.signal(); return l.item; } COM: <s> removes and returns last element or null if empty </s>
funcom_train/25710141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int runHillClimb() { String[] command = { binaryDirectory + "hillclimb" + binaryExtension, workingDirectory + "hClimbIn.dat", workingDirectory + "hClimbOut.dat", Boolean.toString(masterVariables.getDebug()) }; return runApplication("Hill Climb", command, true); } COM: <s> runs the hillclimb program </s>
funcom_train/14065498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimpleAction getAction(final DockingWindow window) { return new SimpleAction() { public String getName() { return DockingWindowAction.this.getName(); } public boolean isEnabled() { return DockingWindowAction.this.isPerformable(window); } public void perform() { DockingWindowAction.this.perform(window); } public Icon getIcon() { return DockingWindowAction.this.getIcon(); } }; } COM: <s> creates a simple action that performs this action on a window </s>
funcom_train/3133522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int toDecimal(byte octet){ if(octet >= 'A' && octet <= 'Z') { return (octet - 'A') + 10; } if(octet >= '0' && octet <= '9') { return octet - '0'; } if(octet >= 'a' && octet <= 'f') { return (octet - 'a') + 10; } return -1; } COM: <s> this performs a conversion from a character to an integer </s>
funcom_train/14144028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canAddCondition(Match match, Object value) { try { getContainingRange(match, value, allRangeSets); // at this point we either have a range we can modify or no ranges // need to be modified to add the value return true; } catch(IllegalArgumentException e) { return false; } } COM: <s> returns true if the given match value pair can be added </s>
funcom_train/46189478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCommentIpAddressOnWhitelist() { blog.getPluginProperties().setProperty(IpAddressListener.WHITELIST_KEY, "127.0.0.1"); blog.getPluginProperties().setProperty(IpAddressListener.BLACKLIST_KEY, ""); listener.commentAdded(commentEvent); assertTrue(comment.isApproved()); assertEquals(0, comment.getSpamScore()); } COM: <s> tests a comment from an ip address that is on the whitelist </s>
funcom_train/18645850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TemplateProcessor getTemplateProcessor(String type) { TemplateProcessor ret=null; for (int i=0; ret == null && i < m_annotationsManagers.size(); i++) { ret = m_annotationsManagers.get(i).getTemplateProcessor(type); } if (ret == null) { ret = new org.pi4soa.common.annotations.impl.DefaultTemplateProcessor(); } return(ret); } COM: <s> this method returns the presentation processor associated </s>
funcom_train/45087129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flushBase64() throws IOException { if( position > 0 ) { if( encode ) { out.write( Base64Encoding.encode3to4( b4, buffer, position, options ) ); position = 0; } // end if: encoding else throw new IOException( "Base64 input not properly padded." ); } // end if: buffer partially full } // end flush COM: <s> method added by phil </s>
funcom_train/37836308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addStaticSprite(Sprite sprite, long persistTime, int priority) { int x = (getWidth() - sprite.getWidth()) / 2; int y = getHeight() - sprite.getHeight(); RemovableSprite msg = new RemovableSprite(sprite, x, y, persistTime); msg.setPriority(priority); staticSprites.add(msg); Collections.sort(staticSprites); } COM: <s> add a sprite anchored to the screen bottom </s>
funcom_train/18507271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireNewRowInstance(DataSetEvent e) { if (dataSetListeners != null) { Vector listeners = dataSetListeners; int count = listeners.size(); for (int i = 0; i < count; i++) { ((DataSetListener) listeners.elementAt(i)).newRowInstance(e); } } } COM: <s> fires the new row instance event for all of the listeners </s>
funcom_train/3078856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createSchedule(IRequestCycle cycle) { ensureCurrentTab(); // in case user go back to this page through browser's back button and click on this ScheduleEditor scheduleEditor = (ScheduleEditor) getComponent("scheduleEditorComponent"); Schedule schedule = new Schedule(); schedule.setProject(getProjectPage().getProject()); scheduleEditor.setScheduleToEdit(schedule); setAction("editSchedule"); } COM: <s> create a new schedule </s>
funcom_train/41651095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isCommand(String requestCommand,String commandKey) { String command = SMTPUtils.getCommand(commandKey); if (command!=null) { try { if (requestCommand.substring(0, command.length()).equals(command)) return true; } catch (StringIndexOutOfBoundsException ex) {return false;} } return false; } COM: <s> checks if the given request command is the command </s>
funcom_train/45802879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() { // retrieve parent tag which accepts the produced collection by this tag ValueAcceptingTagIF acceptingTag = (ValueAcceptingTagIF) findAncestorWithClass(this, ValueAcceptingTagIF.class); // kick it over to the accepting tag acceptingTag.accept( resultCollection ); // reset member collection resultCollection = null; return EVAL_PAGE; } COM: <s> process the end tag </s>
funcom_train/9532802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkForIncompleteComps() throws CommitEx { StringBuffer sb = new StringBuffer(""); boolean failed = false; for (Comparison c : getGuiComparisonList()) { if (!c.isComplete()) { sb.append(c+" is incomplete\n"); failed = true; } } if (failed) throw new CommitEx(sb.toString()); } COM: <s> thorws commit ex with error msg if ant comparisons are incomplete </s>
funcom_train/3370271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getColumnIndexAtX(int x) { if (x < 0) { return -1; } int cc = getColumnCount(); for(int column = 0; column < cc; column++) { x = x - getColumn(column).getWidth(); if (x < 0) { return column; } } return -1; } COM: <s> returns the index of the column that lies at position code x code </s>
funcom_train/41742453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void flushCurrentMegaBlock() { if (currentLoopSize == 0) { return; } sendBlock(currentBlock, currentIds); /* int blockId = calcId(currentIds); // Build InstructionBlock InstructionBlock newBlock = new InstructionBlock(currentBlock, 1, blockId); // Send it to listeners noticeListeners(newBlock); */ initCurrentMegaBlock(); } COM: <s> sends the current mega block to registred consumers and resets it </s>
funcom_train/20400377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object parse(String arg) throws ParseException { BigDecimal result = null; try { result = new BigDecimal(arg); } catch (NumberFormatException e) { throw ( new ParseException( "Unable to convert '" + arg + "' to a BigDecimal.", e)); } return (result); } COM: <s> parses the specified argument into a big decimal </s>
funcom_train/6408805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RenderState setRenderState(RenderState rs) { if (rs == null) { return null; } if (renderStateList == null) { renderStateList = new RenderState[RenderState.StateType.values().length]; } RenderState oldState = renderStateList[rs.getStateType().ordinal()]; renderStateList[rs.getStateType().ordinal()] = rs; return oldState; } COM: <s> code set render state code sets a render state for this node </s>
funcom_train/46455609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXYColumnNames(String _xColumnName, String _reColumnName, String _imColumnName) { xColumnName =GUIUtils.parseTeX(_xColumnName); reColumnName =GUIUtils.parseTeX(_reColumnName); imColumnName =GUIUtils.parseTeX(_imColumnName); } COM: <s> sets the column names when rendering this dataset in a jtable </s>
funcom_train/5381329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifyText(ModifyEvent event) { try { // The original sequence. KeySequence originalSequence = getKeySequence(); // The new sequence drawn from the text. String contents = getText(); KeySequence newSequence = KeySequence.getInstance(contents); // Check to see if they're the same. if (!originalSequence.equals(newSequence)) { setKeySequence(newSequence); } } catch (ParseException e) { // Abort any cut/paste-driven modifications setKeySequence(getKeySequence()); } } COM: <s> handles the modify event on the underlying text widget </s>
funcom_train/3712819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayInLocalWindow(ManagedSpectrum msp1, ManagedSpectrum msp2, ManagedSpectrum msp3) { deleteListenersFromPlotWidget(); main_widget = buildPlotWidget(msp1, msp2, msp3); ModelManager mm1 = msp1.getModelManager(); mm1.setPlotWidget(main_widget); if (main_widget != null) { loadPlotWidgetLocally(main_widget, msp1); } } COM: <s> displays three non active spectra in the local window </s>
funcom_train/36557871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void followBakedPath(String pathName) { CharacterBehaviorManager steering = context.getBehaviorManager(); steering.clearTasks(); steering.setEnable(true); AvatarContext ac = ((AvatarContext)context); LocationNode location = ac.goToNearestLocation(); if (location != null) steering.addTaskToBottom(new FollowBakedPath(pathName, location, context)); } COM: <s> follow a pre baked path </s>
funcom_train/22498837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar makeMenuBar() { // menu menuBar = new JMenuBar(); fileMenu = new JMenu("File"); helpMenu = new JMenu("Help"); menuBar.add(fileMenu); menuBar.add(Box.createHorizontalGlue()); menuBar.add(helpMenu); fQuit = makeMenuItem("Quit"); fileMenu.add(fQuit); hHelp = makeMenuItem("Help"); helpMenu.add(hHelp); hAbout = makeMenuItem("About"); helpMenu.add(hAbout); return menuBar; } COM: <s> create the applications menu bar </s>
funcom_train/7508253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDecrypt() { System.out.println("testDecrypt()"); Encryptor instance = ESAPI.encryptor(); try { String plaintext = "test123"; String ciphertext = instance.encrypt(plaintext); assertFalse(plaintext.equals(ciphertext)); String result = instance.decrypt(ciphertext); assertEquals(plaintext, result); } catch( EncryptionException e ) { fail(); } } COM: <s> test of deprecated decrypt method for strings </s>
funcom_train/49836063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String symbolString () { switch (qualification) { case EQUALS: return "="; case NOT_EQUALS: return "!="; case GREATER: return ">"; case LESS: return "<"; case GREATER_EQUALS: return ">="; case LESS_EQUALS: return "<="; } return "?"; } // symbolString() COM: <s> convert the qualification to a string </s>
funcom_train/39871207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUserData(final Account account, final String key, final String value) { if (account == null) throw new IllegalArgumentException("account is null"); if (key == null) throw new IllegalArgumentException("key is null"); try { mService.setUserData(account, key, value); } catch (RemoteException e) { // won't ever happen throw new RuntimeException(e); } } COM: <s> sets one userdata key for an account </s>
funcom_train/6348378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCourses(Course[] added) { int origSize = displayedCourses.size(); for (int i = 0; i < added.length; i++) { if (!displayedCourses.contains(added[i])) { displayedCourses.add(new DetailedCourseHolder(added[i])); } } fireIntervalAdded(this, origSize, displayedCourses.size() - 1); } COM: <s> adds the given courses to the list </s>
funcom_train/18049729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List initModel() { List compactDiscs = new ArrayList(); for (int i = 0; i < 3; i++) { CompactDisc compactDisc = new CompactDisc("cd name " + i); for (int j = 0; j < 10; j++) { Track t = new Track("track " + j, j * j, compactDisc); compactDisc.addTrack(t); } compactDiscs.add(compactDisc); } return compactDiscs; } COM: <s> inits the model </s>
funcom_train/36958413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SearchPatternData getPatternData() { String pattern= getPattern(); SearchPatternData match= findInPrevious(pattern); if (match != null) { fPreviousSearchPatterns.remove(match); } match= new SearchPatternData( getSearchFor(), getLimitTo(), pattern, fCaseSensitive.getSelection(), fRubyElement, getContainer().getSelectedScope(), getContainer().getSelectedWorkingSets(), fIncludeJRECheckbox.getSelection() ); fPreviousSearchPatterns.add(0, match); // insert on top return match; } COM: <s> return search pattern data and update previous searches </s>
funcom_train/48617668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String execute() throws Exception { if( log.isDebugEnabled()) { log.debug("Next researcher Picture"); } // get the first set of researchers researchers = researcherPictureHelper.getResearchers(type, researcherService, currentResearcherLocation); currentResearcherLocation = researcherPictureHelper.getCurrentResearcherLocation(); researcherCount = researcherService.getPublicResearcherCount(); return SUCCESS; } COM: <s> gets the next ir file to be downloaded </s>
funcom_train/48337586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getScrollableUnitIncrement(Rectangle rect, int o, int d) { if (SwingConstants.HORIZONTAL == o) { Font f = getFont(); return (f != null) ? f.getSize() : 1; } else { if (0 == getComponentCount()) { return 0; } else { return getComponent(0).getHeight(); } } } COM: <s> get the unit increment </s>
funcom_train/22169126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node getTopPosition(Document doc, Element runFromConfigFile){ Element processes = XMLUtils.getElementNamed(runFromConfigFile, "processes"); NodeList processes_list = XMLUtils.getElementsNamed(processes, "process"); if(processes_list != null && processes_list.getLength()>0){ return processes_list.item(0); } else return null; } COM: <s> get the first element from a run element in the config file runs </s>
funcom_train/39062029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMaxScorePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IMarkingContainer_maxScore_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IMarkingContainer_maxScore_feature", "_UI_IMarkingContainer_type"), MarkingPackage.eINSTANCE.getIMarkingContainer_MaxScore(), true, ItemPropertyDescriptor.REAL_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the max score feature </s>
funcom_train/48266779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(byte[] theBytes) { if (isRunning) { try { DatagramPacket myPacket = new DatagramPacket(theBytes, theBytes.length, _myNetAddress.inetaddress(), _myNetAddress.port()); send(myPacket); } catch (NullPointerException npe) { SNetwork.printError("Multicast.send", "a nullpointer exception occured." + npe); } } else { SNetwork.printWarning("Multicast.send", "DatagramSocket is not running. Packet has not been sent."); } } COM: <s> send a byte array to the mulitcast address </s>
funcom_train/44872373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Drawable d, int coordRectIndex) { if (coordinateRects == null || coordRectIndex < 0 || coordRectIndex >= coordinateRects.size()) { throw new IllegalArgumentException( "Internal programming error: CoordinateRect index (" + coordRectIndex + ")out of range."); } CoordinateRect c = ((CRData) coordinateRects.elementAt(coordRectIndex)).coords; c.add(d); } COM: <s> add a drawable item to one of the coordinate rects associated with the </s>
funcom_train/9438526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attemptScan() { // Remove any future scans since we're scanning right now removeFutureScans(); if (!mWifiManager.isWifiEnabled()) return; if (!mWifiManager.startScanActive()) { postAttemptScan(); } else { mScanRetryCount = 0; } } COM: <s> attempts to scan networks </s>
funcom_train/25497573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String resolveLink(String target) { //DebugSystem.out.println("resolve link "+target); String record=LinkProperties.getRecordFromString(target); Object rec=null; if (record!=null && template !=null) rec=template.getGroup().findObject(record, true); if (rec !=null && rec instanceof Record) { target=getResolvedName(target); } return target; } COM: <s> subtracts record name from link looks for apropriate record and renames </s>
funcom_train/21036285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doZoomBox(){ Point start = mapImage.getClickPoint(); Point end = mapImage.getReleasePoint(); Rectangle imageSize = new Rectangle(mapImage.getWidth(),mapImage.getHeight()); activeArea = BoundingBoxUtils.calculateNewBBox(maxBounds, activeArea, imageSize,start,end); drawMapImage(mapImage.getWidth(),activeArea); } COM: <s> do zoom box is used to respond to the box drawn listener </s>
funcom_train/12368837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSlider getEdgeSizeSlider() { if (edgeSizeSlider == null) { edgeSizeSlider = new JSlider(); edgeSizeSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { int tmpValue = edgeSizeSlider.getValue(); setEdgeSize(tmpValue); getEdgeSizeTextField().setText(Integer.toString(tmpValue)); } }); } return edgeSizeSlider; } COM: <s> this method initializes edge size </s>
funcom_train/28949591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMissingPath() { XsdMetrix test = new XsdMetrix(); test.setOutputdir("output_directory"); try { test.execute(); fail("No 'no-path'-exception thrown."); } catch (Exception e) { String expected = "xsdmetrix: path not set"; assertEquals("Wrong exception message.", expected, e.getMessage()); } } COM: <s> test with loss of a required parameter path </s>
funcom_train/36777382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validDate() { boolean valid = false; if (today.equalsIgnoreCase(outDay)) { valid = true; } else { boolean respons = new EventMessage("Mismatch Betweeen Dates", "Apparently today is not the right day for checkout on the room,\nAre you sure you want to check the guest out from this room?").showConfirm(); if (respons) { valid = true; } } return valid; } COM: <s> method for checking if today is the day for planned check out </s>
funcom_train/12541147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IVerticalRulerColumn createLineNumberRulerColumn() { if (isPrefQuickDiffAlwaysOn()) { LineNumberChangeRulerColumn column= new LineNumberChangeRulerColumn(getSharedColors()); column.setHover(createChangeHover()); initializeChangeRulerColumn(column); fLineNumberRulerColumn= column; } else { fLineNumberRulerColumn= new LineNumberRulerColumn(); } initializeLineNumberRulerColumn(fLineNumberRulerColumn); return fLineNumberRulerColumn; } COM: <s> creates a new line number ruler column that is appropriately initialized </s>
funcom_train/12162353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertNoAttributes(Element element) throws Exception { Attribute attributes = element.getAttributes(); if (attributes != null) { String unexpectedAttributes = attributes.getName(); while ((attributes = attributes.getNext()) != null) { unexpectedAttributes += ", " + attributes.getName(); } Assert.fail("the following attributes were not expected: " + unexpectedAttributes); } } COM: <s> any attributes in the given element are used to generate a failure of </s>
funcom_train/12828092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove() { PropertiesList head = null; if (debug) { if ((head = getHead()) == (PropertiesList)this) { head = head.next; } } if (next != null) { next.prior = prior; } if (prior != null) { prior.next = next; } next = prior = null; if (debug) { log("*** remove " + toString()); head.dump(true, null); } return true; } COM: <s> remove this object from the list in which its a member </s>
funcom_train/6476840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void perceive() { if (agent.getAgentPlatform().getName() != null) { adoptBelief("BELIEF(homeAMS(ams@" + agent.getAgentPlatform().getName() + "))"); adoptBelief("BELIEF(platformName(" + agent.getAgentPlatform().getName() + "))"); } } COM: <s> generates beliefs about its name and platform </s>
funcom_train/3389877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getNextChar() throws IOException { // Check to see if we have either run out of characters in our // buffer or gotten to EOF on a previous call. if (currentIndex >= numChars) { numChars = in.read(buffer); if (numChars == -1) { // We have reached EOF. return -1; } // No EOF. currentIndex points to first char in buffer. currentIndex = 0; } return buffer[currentIndex++]; } COM: <s> get the next character from our buffer </s>
funcom_train/40382624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onDoubleClick(Element clickedElement, Event event) { if (clickedElement.equals(appointmentCanvas.getElement())) { if (calendarWidget.getSettings().getTimeBlockClickNumber() == Click.Double) { dayClicked(event); } } else { ArrayList<AppointmentWidget> list = findAppointmentWidgetsByElement(clickedElement); if (!list.isEmpty()) { calendarWidget.fireOpenEvent(list.get(0).getAppointment()); } } } COM: <s> handles the double click event to determine if an appointment has been </s>
funcom_train/3172538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String accepts(Object context) { // an indi is fine if (context instanceof Indi) return getName(); // an array of indis is fine as well if (context instanceof Indi[]) { Indi[] indis = (Indi[])context; if (indis.length==2) return getName(); } // no go return null; } COM: <s> special treatmen context argument check </s>
funcom_train/976774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void penReleased(Point p, boolean isDouble) { Point p2 = cellAtPoint(p.x, p.y, null); super.penReleased(p, isDouble); Rect sel = getSelection(null); if ((sel.height == 0 || sel.height == 0) && p2 != null) cursorTo(p2.y, p2.x, true); // if the selection is gone -> reselect // it } COM: <s> this is only necessary to hinder the user to unselect </s>
funcom_train/19380751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getGamePath(String[] romDir, String gameName) { String gamePath = new String(); File f = null; for (int i = 0; i < romDir.length; i++) { f = new File(romDir[i] + gameName + ".zip"); if (f.exists()) { gamePath = romDir[i]; break; } } return gamePath; } COM: <s> this method returns the rom dir path where the given game has been </s>
funcom_train/10548098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean supportsThreadDump() { try { // This checks that we are on a jvm >= 1.5 where we // can actually do threaddumps. Thread.class.getMethod("getAllStackTraces", new Class[] {}); return true; } catch (NoSuchMethodException nsme) { // Ignore exception } return false; } COM: <s> tells if generating a thread dump is supported in the running jvm </s>
funcom_train/4111288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void revertToDefault(String token) { if (template.dataElementExists(token)) { if (!this.dataElementExists(token)) { setDataElement(token, template.getDataElement(token).clone()); } else { this.getDataElement(token).setContent(template.getDataElement(token).getContent()); } } } COM: <s> makes sure that the element exists in this recipe file and </s>
funcom_train/50345307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTrainSkipsLocation(String locationId){ // insert at start of _skipLocationsList, sort later if (_skipLocationsList.contains(locationId)) return; _skipLocationsList.add(0,locationId); log.debug("train does not stop at "+locationId); setDirtyAndFirePropertyChange (STOPS_CHANGED_PROPERTY, _skipLocationsList.size()-1, _skipLocationsList.size()); } COM: <s> train will skip the route location </s>
funcom_train/32978435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int lookupFieldIdx(String fieldName) { /* lookupFieldIdx */ int idx= -1; /* failure default */ for(int i=0; i<tCols; i++) if(fieldName.equals(tFields[i])) { idx= i; break; } return(idx); } /* lookupFieldIdx */ COM: <s> lookup field idx lookup index of field if exists </s>
funcom_train/40853606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ValuedVariable findValue(Variable var, Integer val) { ValuedVariable v = null; Iterator<ValuedVariable> it = values.iterator(); boolean finished = !(it.hasNext()); // Browsing the set until a match is found or the end is reached while (!finished) { v = it.next(); if (v.getVar().equals(var) && v.getVal().equals(val)) { finished = true; } else { finished = !(it.hasNext()); } } return v; } COM: <s> find the valued variable corresponding the given variable and value </s>
funcom_train/41399460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(Object obj) { // return addObject(obj) < 0 ? false : true; // I changed this so that it returns true if // the return from addObject is less than zero // which means the object was inserted and so // the array was modified return (addObject(obj) < 0) ? true : false; } COM: <s> inserts the specified element in order into the list </s>
funcom_train/44592193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readNext(boolean ignoreComments) throws CoreException { int curr= 0; do { try { curr= this.scanner.getNextToken(); if (curr == ITerminalSymbols.TokenNameEOF) { throw new CoreException(createError(END_OF_FILE, "End Of File", null)); //$NON-NLS-1$ } } catch (InvalidInputException e) { throw new CoreException(createError(LEXICAL_ERROR, e.getMessage(), e)); } } while (ignoreComments && isComment(curr)); return curr; } COM: <s> reads the next token </s>
funcom_train/37422722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteAND(int pIndexOR , int pIndexAND){ boolean tRis=false; if(pIndexOR < cVetOR.size()){ Vector tVetAnd = (Vector) cVetOR.get(pIndexOR); if(pIndexAND < tVetAnd.size()){ tVetAnd.remove(pIndexAND); if(tVetAnd.size()==0) cVetOR.remove(pIndexOR); tRis=true; } } return tRis; } COM: <s> deletes a and expression to the transition condition </s>
funcom_train/23070960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLoggingEventClass(String className) { loggingEventClass = className; try { loggingEventWrapperImplementationClass = Class.forName(loggingEventClass); } catch (ClassNotFoundException cnfe) { this.errorHandler.error( "Invalid LoggingEvent class " + className, cnfe, ErrorCode.GENERIC_FAILURE); } } COM: <s> sets the name of class implementing the </s>
funcom_train/17278765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setColor(Color color) { //System.out.println("ColorPanel setColor attributeKey=" + attributeKey + ", color=" + color); colorDisplay.setBackground(color); if(++setValCount < 2) { originalColor = color; } fireColorChanged(); } COM: <s> set the selected color </s>
funcom_train/49106174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NetZoneXmlType createNetworkLossZone() { if(getBaseCase().getLossZoneList() == null){ getBaseCase().setLossZoneList(this.getFactory().createNetworkXmlTypeLossZoneList()); } NetZoneXmlType zone = this.getFactory().createNetZoneXmlType(); getBaseCase().getLossZoneList().getLossZone().add(zone); return zone; } COM: <s> create a loss zone object </s>
funcom_train/17095785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenuEdit() { if (jMenuEdit == null) { jMenuEdit = new JMenu(); jMenuEdit.setText("Edit"); jMenuEdit.add(getJMenuItemInstrBox()); jMenuEdit.add(getJMenuItemSignat1()); jMenuEdit.add(getJMenuItemSignat2()); jMenuEdit.add(getJMenuItemSignat3()); } return jMenuEdit; } COM: <s> this method initializes j menu edit </s>
funcom_train/890809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void defragment() { if (Container.logger.isLoggable(Level.FINER)) { Container.logger.entering("Container", "defragment()", "start"); } if (!Boolean.getBoolean("ov4j.thread.defrag")) { synchronized (Container.classLock) { defrag(); } } else { defrag(); } if (Container.logger.isLoggable(Level.FINER)) { Container.logger.exiting("Container", "defragment()", "end"); } } COM: <s> taken from db4os defragment tool see db4o licenses for usage </s>
funcom_train/40764739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList filterStereotype(ENodeList eltList, String aStereotype) throws ENodeCastException { if (eltList == null) { return null; } ArrayList resultList = new ArrayList(); for (ENodeIterator iter = eltList.iterator(); iter.hasNext();) { Element elt = (Element) iter.next().getEObject(); if (hasStereotype(elt, aStereotype)) { resultList.add(elt); } } return resultList; } COM: <s> filter the element list </s>
funcom_train/34259632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveDesktopPreference() { try { PersistenceHelper.saveGeneralPreferences(this.getDesktopPreference()); } catch(XmlTransformerException xmte) { xmte.printStackTrace(System.out); SaveErrorDialog lSE = new SaveErrorDialog(this.getPreferencesDialog(), "Unable to Save Desktop Preference changes"); lSE.runError();} } COM: <s> saves the desktop preference </s>
funcom_train/51451763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node getNode(String name) { Node node = null; Node rootNode = document; if (rootNode != null) { NodeList NL = rootNode.getFirstChild().getChildNodes(); int i = 0; for (i=0; i<NL.getLength(); i++) { if (NL.item(i).getNodeName().equals(name)) { node = NL.item(i); break; } } } return node; } COM: <s> returns a document subnode with the given name </s>
funcom_train/10914739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResourceGroup getResourceGroup(AFPResourceLevel level) { ResourceGroup resourceGroup = null; if (level.isDocument()) { resourceGroup = document.getResourceGroup(); } else if (level.isPageGroup()) { resourceGroup = currentPageGroup.getResourceGroup(); } else if (level.isPage()) { resourceGroup = currentPageObject.getResourceGroup(); } return resourceGroup; } COM: <s> returns the resource group for a given resource info </s>
funcom_train/31825107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean readAndDispatch () { checkDevice (); drawMenuBars (); runPopups (); if (OS.PeekMessage (msg, 0, 0, 0, OS.PM_REMOVE)) { if (!filterMessage (msg)) { OS.TranslateMessage (msg); OS.DispatchMessage (msg); } runDeferredEvents (); return true; } return runMessages && runAsyncMessages (false); } COM: <s> reads an event from the operating systems event queue </s>
funcom_train/21323909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean handleMessage( Message m, Object object ) { if( super.handleMessage( m, object ) ) return true; if( m.getType().equals("collectiveUpdate-"+job) ) { return collective.handleMessage(m,object); } else { Logger.debug(getClass().getName()+"#handleMessage", m.getType() + " received from " + m.getSender()); return false; } } COM: <s> handles message type code collective update get job code </s>
funcom_train/17046648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prune(boolean disconnectParent, boolean disconnectAsChild) { if (disconnectAsChild && parent != null && parent.children != null) { gotHashCode = false; parent.children.remove(this); if (parent.children.size() == 0) parent.children = null; } if (disconnectParent) this.parent = null; } COM: <s> prune this node from its tree as specified </s>
funcom_train/33233547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getShowMeaningC() { if (showMeaningC == null) {//GEN-END:|79-getter|0|79-preInit // write pre-init user code here showMeaningC = new Command("Show Meaning", Command.BACK, 0);//GEN-LINE:|79-getter|1|79-postInit // write post-init user code here }//GEN-BEGIN:|79-getter|2| return showMeaningC; } COM: <s> returns an initiliazed instance of show meaning c component </s>
funcom_train/37790715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkNakedActions() { if (nakedActions == null) return; // nothing to do int len = nakedActions.size(); for (int i = 0; i < len; i++) { NakedAction na = (NakedAction) nakedActions.get(i); na.checkAbouts(); } } COM: <s> check all naked actions if they are available </s>
funcom_train/2369671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBinary(final byte[] newValue) { if (newValue == null) { this.getRepository().removeEntry(this); } else { final byte[] copy = new byte[newValue.length]; System.arraycopy(newValue, 0, copy, 0, newValue.length); this.data = copy; this.getRepository().valueChanged(this); } } COM: <s> sets the value of the entry </s>
funcom_train/5395475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetFECParameters() { System.out.println("getFECParameters"); FecEncoder instance = null; FECParameters expResult = null; FECParameters result = instance.getFECParameters(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get fecparameters method of class org </s>
funcom_train/50370818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initMatrix(int row, int col, short addingData) { if (matrix.size() == 0) { matrix.add(row, new ArrayList()); } else if (matrix.size() <= row) { matrix.add(row, new ArrayList()); } ((ArrayList) matrix.get(row)).add(col, addingData); } COM: <s> initialize the dynamic matrix </s>
funcom_train/46439756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateFeedJobStats(FeedJob feedJob, EngineContext context) { if (context != null) { feedJob.setFailedRowNumber(context.getRejectedRowNumber()); feedJob.setFailureCode(context.getErrorCode()); feedJob.setFailureMessage(context.getErrorMessage()); } } COM: <s> updates the feed job error information from the context into the feed job </s>
funcom_train/41875175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeading(double heading) { double oldHeading = this.heading; this.heading = heading; while (this.heading < 0) { this.heading += 360; } while (this.heading >= 360) { this.heading -= 360; } calculateCursor = true; fireRobotChangeHeading(oldHeading, this.heading); } COM: <s> sets new heading </s>
funcom_train/14141552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt( int rowIndex, int columnIndex ) { if( rowIndex < 0 || rowIndex >= this.data.size() ) return null; List row = (List) this.data.get( rowIndex ); if( columnIndex < 0 || columnIndex >= row.size() ) return null; Object val = row.get( columnIndex ); return val; } COM: <s> returns the value for the cell at code column index code and </s>
funcom_train/41163147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoKnowledgeField entity) { EntityManagerHelper.log("saving CoKnowledgeField instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co knowledge field entity </s>
funcom_train/50892473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIntFieldValid() throws Exception { IntField field = new IntField(6482); String msg = field.toMessageString(); assertEquals("Must be I46482", msg, "I46482"); int value = field.getValue(); assertEquals("Must be 6482", value, 6482); } COM: <s> test the value of an int field with a correct </s>
funcom_train/10208129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initRecordStore() throws SecureMessengerStoreException { try { // Get the RecordStore instance for the given name recordStore = RecordStore.openRecordStore(name, true); } catch (RecordStoreException rse) { // Rethrow the exception throw new SecureMessengerStoreException(rse.toString()); } } COM: <s> initializes the record store </s>
funcom_train/40433870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MendozaCommandResult assertSignature(final MendozaRequest request) { log.trace("Entering assertSignature"); MendozaAssertSignatureCommand command = new MendozaAssertSignatureCommand(request, this, serverState); command.execute(); log.trace("Leaving assertSignature"); return command.getResult(); } COM: <s> asserts the validation of the cart signature </s>
funcom_train/35300964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void windowClosed(WindowEvent e) { synchronized(getTreeLock()) { Window[] windows = getOwnedWindows(); for (Window window : windows) { if (window != null) { if (window.isDisplayable()) { return; } window.removeWindowListener(this); } } dispose(); } } COM: <s> watches for displayability changes and disposes shared instance if there are no </s>
funcom_train/15622404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeParameter(edu.udo.cs.miningmart.m4.Parameter par) throws M4Exception { // changed code (2 lines): // boolean ret = parArr2par.remove(this, (Parameter) par); // Tries to remove par from the collection. boolean ret = this.parametersV.remove(par); if (ret) { // If the removal succeeded (changed anything) ... this.parameterObjectArray = null; // ... invalidate the prepared array. } return ret; } COM: <s> inverts the code add parameter parameter code functionality </s>