__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/25648404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToolButtonsVisible(boolean isVisible) {
stateButton.setVisible(isVisible);
entryPointButton.setVisible(isVisible);
exitPointButton.setVisible(isVisible);
inGateButton.setVisible(isVisible);
outGateButton.setVisible(isVisible);
executeButton.setVisible(!isVisible);
}
COM: <s> show or hide the toolbar buttons </s>
|
funcom_train/21688813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayAgentNode(SearchAgentNode searchAgentNode) {
SnippetSearchAgent agent = searchAgentNode.getAgent();
codeEditorPane.setEditorKit(null);
codeEditorPane.setText(agent.getDescription());
htmlPane.setText(agent.getDescription());
currentCodeSnippetIndex = -1;
}
COM: <s> display agent info </s>
|
funcom_train/49694604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintSpot(Graphics g, int row, int col, double t) {
int rowPos = row * CELL_HEIGHT;
int colPos = col * CELL_WIDTH;
double cellTemp = t;
int col_red = 0;
col_red = (int) ((cellTemp/100.0)*255);
Color c = new Color(col_red,0,0);
g.setColor(c);
g.fillRect(colPos, rowPos, CELL_WIDTH, CELL_HEIGHT);
}
COM: <s> paints one cell of the grid </s>
|
funcom_train/43267366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private UserAccountComboBox getNameComboBox() {
if (nameComboBox == null) {
nameComboBox = new UserAccountComboBox();
nameComboBox.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
updateUserAccount(getNameComboBox().getSelectedUserAccount());
}
});
}
return nameComboBox;
}
COM: <s> this method initializes name combo box </s>
|
funcom_train/31456947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getInformation(String information) {
if (information.equals(TaskRegistryRI.INFORMATION_TYPE )) return getID();
if (information.equals(TaskRegistryRI.INFORMATION_ENABLED)) return Boolean.toString(enabled);
if (information.equals(TaskRegistryRI.INFORMATION_COUNTER)) return Integer.toString(getCounter());
if (information.equals(TaskRegistryRI.INFORMATION_STATISTICS)) {
// TODO - extension
}
return "";
}
COM: <s> gets code task code informations </s>
|
funcom_train/13120043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List listPublishers(int numberOfPublishersToList) throws PersistentException, SQLException {
SqlMapClient sqlMap = SqlMapBooksConfig.getSqlMap();
try {
sqlMap.startTransaction();
List list = sqlMap.queryForList("getAllPublishers", null);
sqlMap.commitTransaction();
return list;
} catch (Exception e) {
sqlMap.endTransaction();
throw (SQLException) e.fillInStackTrace();
}
}
COM: <s> return list with publishers </s>
|
funcom_train/37587353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void regionAdded(Breakpoint bp) {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) { _listeners.get(i).regionAdded(bp); }
}
finally { _lock.endRead(); }
}
COM: <s> called when a breakpoint is set in a document </s>
|
funcom_train/5669350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object resolveEntity(String publicID, String systemID) {
if (publicID != null &&
publicID.equals("-//UC Berkeley//DTD PlotML 1//EN")) {
// This is the generic MoML DTD.
return new StringReader(PlotML_DTD_1);
} else {
return null;
}
}
COM: <s> resolve an external entity </s>
|
funcom_train/809184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IMenuManager createHelpMenu(IWorkbenchWindow window) {
IMenuManager menu = new MenuManager(getString("_UI_Menu_Help_label"), IWorkbenchActionConstants.M_HELP);
// Welcome or intro page would go here
// Help contents would go here
// Tips and tricks page would go here
menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_START));
menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_END));
menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
return menu;
}
COM: <s> creates the help menu </s>
|
funcom_train/46457348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(Job job, Tool replyTo) throws RemoteException {
save(job, replyTo);
job = convert(job);
if(child.equals(replyTo)) { // job comes from child, so send replies
sendReplies(job);
} else { // forward job to child
forward(job);
}
}
COM: <s> sends a job to this tool </s>
|
funcom_train/40226419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Model copy(final CopyCriteria criteria) {
ICopyPredicate cp;
switch(criteria.getMode()) {
case SUBSET:
cp = new SubsetPredicate(criteria.getWhitelistProps());
break;
case CHANGES:
cp = new ChangesPredicate(criteria.getWhitelistProps());
break;
case NO_REFERENCES:
cp = new NoReferencesPredicate();
break;
case KEEP_REFERENCES:
cp = new KeepReferencesPredicate();
break;
default:
case ALL:
cp = new AllPropsPredicate();
break;
}
return copy(null, this, cp, new BindingRefSet<Model, Model>());
}
COM: <s> deep copies this instance creating a new distinct model instance containing </s>
|
funcom_train/48982111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendSynchronously(String[] to, String from, String subject, String content, boolean retry) {
subject = getText(subject);
content = getText(content);
MailSender sender = new MailSenderText(to, from, subject, content);
sender.setRetry(retry);
sender.setPropagateExceptions(true);
sender.run();
}
COM: <s> send an email synchronously any exception that occurs will be propagated </s>
|
funcom_train/42044536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
if (e.getSource() == okButton) {
ValidationMessage messages[] = propertyValidator.validate(this);
if (messages != null) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < messages.length; i++) {
sb.append(messages[i]);
sb.append("\n");
}
JOptionPane.showMessageDialog(this, sb.toString(), "Error", JOptionPane.ERROR_MESSAGE);
return;
}
result = ACTION_OK;
dispose();
return;
}
if (e.getSource() == cancelButton) {
result = ACTION_CANCEL;
dispose();
return;
}
}
COM: <s> invoked when an action occurs </s>
|
funcom_train/21645118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getNumRoundsTextField() {
if (numRoundsTextField == null) {
numRoundsTextField = new JTextField();
numRoundsTextField.setAutoscrolls(false);
// Center in panel
numRoundsTextField.setAlignmentX((float) .5);
// Center text in textfield
numRoundsTextField.setHorizontalAlignment(JTextField.CENTER);
}
return numRoundsTextField;
}
COM: <s> return the num rounds text field </s>
|
funcom_train/32825751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeDefinitionsCombo() {
Object inputObject = new Object(); // Instance doesn't matter for this provider
definitionsComboViewer.setInput(inputObject);
IStructuredContentProvider contentProvider =
(IStructuredContentProvider) definitionsComboViewer.getContentProvider();
Object[] content = contentProvider.getElements(inputObject);
if ((content != null) && (content.length > 0)) {
definitionsComboViewer.setSelection(new StructuredSelection(content[0]));
}
}
COM: <s> initialize the definitions combo box and selection </s>
|
funcom_train/49092175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int fixCoords(int t, String types, int e, int h, int l) {
if (l != AxedArea.borderLeft) {
return t;
}
if (e == 0) {
return t;
}
for (int i = e - 1; i >= 0; i--) {
if (types.charAt(i) == 'c') {
return t + h;
}
}
return t;
}
COM: <s> workaround stupid ie bug </s>
|
funcom_train/32752518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueAt( final Object value, final int row, final int column ) {
final HostSetting setting = _hostSettings.get( row );
if ( setting == null ) return;
switch( column ) {
case ENABLE_COLUMN:
setting.setEnabled( value != null ? ((Boolean)value).booleanValue() : false );
HOST_CONFIGURATION.refreshEnabledHosts();
break;
case HOST_COLUMN:
setting.setHost( value != null ? value.toString() : "" );
break;
default:
break;
}
MODEL.postModifications();
}
COM: <s> set the value of the specified cell </s>
|
funcom_train/21636303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void contributeToToolBar(IToolBarManager toolBarManager) {
toolBarManager.add(getAction(ActionFactory.UNDO.getId()));
toolBarManager.add(getAction(ActionFactory.REDO.getId()));
toolBarManager.add(new Separator());
toolBarManager.add(getAction(GEFActionConstants.ZOOM_IN));
toolBarManager.add(getAction(GEFActionConstants.ZOOM_OUT));
toolBarManager.add(new ZoomComboContributionItem(getPage()));
}
COM: <s> add actions to the given toolbar </s>
|
funcom_train/20215717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getRemoveCommand() {
if (removeCommand == null) {//GEN-END:|106-getter|0|106-preInit
// write pre-init user code here
removeCommand = new Command("Remove", Command.ITEM, 0);//GEN-LINE:|106-getter|1|106-postInit
// write post-init user code here
}//GEN-BEGIN:|106-getter|2|
return removeCommand;
}
COM: <s> returns an initiliazed instance of remove command component </s>
|
funcom_train/3176293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPropertyPosition(Property prop) {
if (children==null)
throw new IllegalArgumentException("no such property");
for (int i=0;i<children.size();i++) {
if (children.get(i)==prop)
return i;
}
throw new IllegalArgumentException("no such property");
}
COM: <s> returns a sub property position </s>
|
funcom_train/25478176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getRegionsAsText(Region[] regions) {
if (regions == null) {
return null;
}
StringBuffer sb = new StringBuffer();
for (int i = 0; i < regions.length; i++) {
sb.append(regions[i].getBeginPosition() + 1);
sb.append(' ');
sb.append(regions[i].getEndPosition() + 1);
sb.append('\n');
}
return sb.toString();
}
COM: <s> creates a text string to be edited by the user representing </s>
|
funcom_train/24121291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(InputStream in) throws IOException {
// First word: the start value
this.start = WMFConstants.readLittleEndianShort(in);
// Second word: number of entries
short numberOfEntries = WMFConstants.readLittleEndianShort(in);
this.paletteEntries = new PaletteEntry[numberOfEntries];
for(int i=0; i<numberOfEntries; i++)
this.paletteEntries[i] = new PaletteEntry(in);
}
COM: <s> reads a palette object data from a stream </s>
|
funcom_train/49320931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JButton makeMenuButton(String toolTip, final JPopupMenu menu) {
JButton button = makeButton(null);
button.setToolTipText(toolTip);
button.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
Component c = e.getComponent();
menu.show(c, 0, c.getHeight());
}
});
return button;
}
COM: <s> make and return a menu button with the given tool tip and menu </s>
|
funcom_train/5802700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getDaysForMonth(long endTime) {
GregorianCalendar calendar = new GregorianCalendar();
calendar.setTime(new java.util.Date(endTime));
int month = calendar.get(Calendar.MONTH);
int year = calendar.get(Calendar.YEAR);
return (getDays(calendar.isLeapYear(year), month));
}
COM: <s> returns the number of days in the month </s>
|
funcom_train/45251369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleException(Throwable e) {
IPluginContribution contribution = (IPluginContribution) Util.getAdapter(wizardElement, IPluginContribution.class);
statuses[0] = new Status(
IStatus.ERROR,
contribution != null ? contribution.getPluginId() : WorkbenchPlugin.PI_WORKBENCH,
IStatus.OK,
WorkbenchMessages.WorkbenchWizard_errorMessage,
e);
}
COM: <s> add the exception details to status is one happens </s>
|
funcom_train/7894641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendTo(StringBuilder buffer) {
for (Map.Entry<String, StringBuilder> entry : busyMap.entrySet()) {
buffer.append("FREEBUSY;FBTYPE=").append(entry.getKey())
.append(':').append(entry.getValue()).append((char) 13)
.append((char) 10);
}
}
COM: <s> append freebusy information to buffer </s>
|
funcom_train/12566419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runCommand() {
args = getArgument(0);
if(args != null && !(args.equals(""))) {
list(args);
return;
}
// Get the user's current working directory.
String curDir = System.getProperty("user.dir");
if(curDir == null) {
throw new Error("Can not find user.dir ??");
}
getOut().println("The content of directory " + curDir);
getOut().println();
list(curDir);
}
COM: <s> perform the ls command </s>
|
funcom_train/10587179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDefaultSizePts() throws IOException {
if (_default_size_pts == null) {
String value = getValue(_default_size_pts_attribute);
if (value == null || value.trim().equals("")) {
value = DEFAULT_SIZE_PTS;
}
_default_size_pts = NumericConverter.extractDouble(value);
}
return _default_size_pts.doubleValue();
}
COM: <s> get the default size of rows in points </s>
|
funcom_train/21611896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Value processOperation(OperationsSequence sequence) throws ProcessorException {
if( sequence == null ) {
throw new ProcessorException("Cannot process null invoke operation.");
}
try {
executionStack.pushLevel(executionContext, sequence);
return executionStack.getLastExecutionValue();
} catch (Exception e) {
throw new ProcessorException("Error while processing sequence.", e);
}
}
COM: <s> processes the given anonynous operations senquence in this processor </s>
|
funcom_train/37556032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getSelection () {
checkWidget ();
if ((style & SWT.DROP_DOWN) != 0 && (style & SWT.READ_ONLY) != 0) {
return new Point (0, OS.GetWindowTextLength (handle));
}
int [] start = new int [1], end = new int [1];
OS.SendMessage (handle, OS.CB_GETEDITSEL, start, end);
return new Point (start [0], end [0]);
}
COM: <s> returns a code point code whose x coordinate is the start </s>
|
funcom_train/31023386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeActionPath(String actionId) throws ApplicationConfigException {
ActionConfig action = (ActionConfig) actionConfigs.get(actionId);
if ( findActionConfig(action.getPath()) != null ) {
throw new ApplicationConfigException(ApplicationConfigException.EXIST,action);
}
actionConfigs.remove(actionId);
renameXMLActionConfig(actionId,action.getPath());
actionConfigs.put(action.getPath(),action);
}
COM: <s> change action id in collection </s>
|
funcom_train/818656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyPieChart() {
for (int j = 0; j < metadataIndices.length; j++) {
int metanode = metadataIndices[j];
PieChartNode node = new PieChartNode(metanode, (PGraphView) view, getDetection(metanode));
try {
view.addNodeView( metanode, node );
} catch ( Exception e ) {
System.err.println( "MetaNode: "+node+" is having trouble getting updated...");
break;
}
}
}
COM: <s> applies the pie chart node to the meta node </s>
|
funcom_train/28542028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deactivate(boolean forceVisibility) {
Map globalActionHandlers = getGlobalActionHandlers();
if (globalActionHandlers != null) {
for (Iterator iter = globalActionHandlers.keySet().iterator(); iter.hasNext();) {
String actionId = (String) iter.next();
getParent().setGlobalActionHandler(actionId, null);
}
}
super.deactivate(forceVisibility);
updateActionBars();
}
COM: <s> we have to remove from the parent composite editor action bars </s>
|
funcom_train/47734315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startElement (String uri, String name,String qName, Attributes atts){
if(!name.equals("CONFIG")){
//needs to be saved since the other element names occure more than once in the config-file
if(parentElementName==null){
parentElementName= name;
}
elementName = name;
for( int i = 0; i < atts.getLength(); i++ ){
key = atts.getValue(i);
}
}
}
COM: <s> this method is called when a new xml element starts </s>
|
funcom_train/43474620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deliver (Id id, Message message) {
if (message instanceof DHTPeerTestMessage) {
DHTPeerTestMessage mesg = (DHTPeerTestMessage) message;
System.out.println("["+this.endPoint.getId()+"] has received ["+ mesg.getData()+"] from ["+mesg.getSourceNodeId()+"]");
}
}
COM: <s> this method is called on the application at the destination node </s>
|
funcom_train/16912669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JCheckBoxMenuItem getShowIOInfoMenuItem() {
// TODO: Creating the wrapper in the getter is problematic. Remove where
// it occurs.
JCheckBoxMenuItem actionWrapper = new JCheckBoxMenuItem(
showIOInfoAction);
actionWrapper.setSelected(networkPanel.getInOutMode());
return actionWrapper;
}
COM: <s> return the show io information check box menu item </s>
|
funcom_train/7681945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void signOut(long account) {
if (LOCAL_DEBUG) log("signOut for account " + account);
Intent intent = new Intent();
intent.setData(ContentUris.withAppendedId(Im.Account.CONTENT_URI, account));
intent.setClassName("com.android.im", "com.android.im.app.SignoutActivity");
startActivity(intent);
}
COM: <s> sign out of the service for the account passed in </s>
|
funcom_train/31652359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isRequired(Linkable target){
if(target.isLinked( )) return true;
if(target.getDefault( )!=null) return true;
java.util.Vector children = target.getChildren( );
java.util.Iterator iter = children.iterator( );
while(iter.hasNext( )){
if(isRequired((Linkable) iter.next( ))){
return true;
}
}
return false;
}
COM: <s> checks a target to see if it can be ignored or is required </s>
|
funcom_train/2713288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isExecutableFile(String executable) {
if (FileUtil.isFileExists(executable)) {
if (executable.indexOf(".") != -1) {
if (DocumentType.isExecutable(executable.substring(executable.
indexOf(".") + 1).
toUpperCase())) {
return true;
}
}
}
return false;
}
COM: <s> determines whether or not the underlying file in given absolute path is </s>
|
funcom_train/328631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeSpectrogram() {
/* create the scaled spectrogram image */
scaledSpectrogram =
createImage(new FilteredImageSource(spectrogram.getSource(),
scaleFilter));
Dimension sz = getSize();
revalidate();
repaint();
// repaint(0, 0, 0, sz.width - 1, sz.height - 1);
}
COM: <s> create the scaled spectrogram image </s>
|
funcom_train/33426756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameters(Parameters params) {
minXField.setText(params.getMinX().toString());
minYField.setText(params.getMinY().toString());
maxXField.setText(params.getMaxX().toString());
maxYField.setText(params.getMaxY().toString());
} // setParameters
COM: <s> update the settings display to show the given parameter values </s>
|
funcom_train/1120930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void okPressed() {
password = passwordField.getText();
username = usernameField.getText();
Map<String, String> info = new HashMap<String, String>();
info.put("username", username);
info.put("password", password);
try {
Platform.addAuthorizationInfo(new URL("http://bank.com"), location, "", info);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
super.okPressed();
}
COM: <s> notifies that the ok button of this dialog has been pressed </s>
|
funcom_train/14077082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unregisterCategory(Category category) {
int index = Utils.getPosInIterator(categories.values().iterator(), category);
categories.remove(new Integer(category.getId()));
if (parent != null) category.unregisterCitation(parent);
this.adapters.fireIntervalRemoved(this, null, index, index);
Application.getCiteBook().setSaveFlag();
}
COM: <s> unlink a given category from those associated with the parent citation </s>
|
funcom_train/26201630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printTodoHeader() {
printHeader(getText("doclet.Window_Todo_List",
Standard.configuration().windowtitle));
navLinks(true);
hr();
center();
h2();
boldText("doclet.Todo");
h2End();
centerEnd();
}
COM: <s> print the navigation bar and header for the todo listing </s>
|
funcom_train/22467630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("LogEntry(timestamp=");
sb.append(timestamp);
sb.append(", userId=");
sb.append(userId);
sb.append(", action=");
sb.append(action);
sb.append(", params=(");
sb.append(param1);
sb.append(", ");
sb.append(param2);
sb.append(", ");
sb.append(param3);
sb.append(", ");
sb.append(param4);
sb.append(", ");
sb.append(param5);
sb.append("))");
return sb.toString();
}
COM: <s> get the string representation of this object </s>
|
funcom_train/9886484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getCY3(int index) {
ISlideDataElement sde = (ISlideDataElement)elementAt(index);
if(normalizedState == ISlideData.NO_NORMALIZATION)
return sde.getTrueIntensity(ISlideDataElement.CY3);
else
return sde.getIntensity(ISlideDataElement.CY3);
}
COM: <s> returns cy3 value for specified index </s>
|
funcom_train/25504717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color loadWidgetColor(String[] widgetKey) throws ResourceUnavailableException {
assert widgetKey != null;
assert widgetKey.length == 2;
assert widgetKey[0] != null;
assert widgetKey[1] != null;
final String[] key = new String[] { widgetKey[0], widgetKey[1] + ".color" };
return loadColor(key);
}
COM: <s> load a widgets color attribute </s>
|
funcom_train/30251413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Agenda getAgendaFromDate(Session session, long agendaId, Date fromDate) {
return (Agenda) (
session.createCriteria(Agenda.class).add(Expression.eq("id", agendaId)
).createCriteria("activities").add(Expression.gt("timeStart", fromDate))
)
.addOrder(Order.desc("timeStart"))
.uniqueResult();
}
COM: <s> return a agenda filled with the activities </s>
|
funcom_train/32649304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCellHeightThemeTextField() {
RowData rowData5 = new org.eclipse.swt.layout.RowData();
rowData5.width = 30;
cellHeightThemeTextField = new ThemeTextField(globalComposite, SWT.NONE);
cellHeightThemeTextField.setIntValued(true);
cellHeightThemeTextField.setHelpPage("");
cellHeightThemeTextField.setEmbeddedInBindableGroup(false);
cellHeightThemeTextField.setBindingSubPath("cellHeight");
cellHeightThemeTextField.setLayoutData(rowData5);
}
COM: <s> this method initializes cell height theme text field </s>
|
funcom_train/48979189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SourceViewerDecorationSupport getSourceViewerDecorationSupport(ISourceViewer viewer) {
if (fSourceViewerDecorationSupport == null) {
fSourceViewerDecorationSupport= new SourceViewerDecorationSupport(viewer, getOverviewRuler(), getAnnotationAccess(), getSharedColors());
configureSourceViewerDecorationSupport(fSourceViewerDecorationSupport);
}
return fSourceViewerDecorationSupport;
}
COM: <s> returns the source viewer decoration support </s>
|
funcom_train/18367889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean makePassLineBet(Table table, int point) {
if(getBalance() < getUnits())
return false;
//put a bet on the pass line
Bet b = new Bet(this, getUnits());
if(!subtractFromBalance(getUnits()))
return false;
table.addPassLineBet(b);
return true;
}
COM: <s> default implementation of a common pass line bet </s>
|
funcom_train/38813614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initLastOpenedMenu() {
for (int i = 0; i < MAX_LAST_OPENED; i++) {
String key = String.format("program.open.last.%d", i);
String filePath = Main.options.get(key);
if (filePath != null) {
lastOpened.add(filePath);
}
}
rebuildLastOpenedMenu();
}
COM: <s> populate the last opened project menu with data from the options </s>
|
funcom_train/42658590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSelectedInputName() {
if (this.jTableInputs != null && this.jTableInputs.getModel() != null) {
// Selected row
int row = this.jTableInputs.getSelectedRow();
if (row >= 0) {
// Protection on the selected row
return (String) this.jTableInputs.getValueAt(row, 0);
}
}
return "";
}
COM: <s> returns the selected input name if none it returns the empty string </s>
|
funcom_train/42427536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedIndex(int index) {
getSelectionModel().setSelectedIndex(index);
if(userTabSelections != null)
for(ActionListener listener : userTabSelections)
{
System.out.println("-------------->>>Selection listener...");
listener.actionPerformed(new ActionEvent(this, ""));
}
}
COM: <s> sets the selected index of the tabbed pane </s>
|
funcom_train/17624619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateTitle() {
String type = this.settings.getString(this.settings.getGameType().getTitleId());
((JFrame) this.getParent().getParent().getParent()).setTitle(settings.getString("TITLE") + " - " + type);
}
COM: <s> updates game window title depending on game type </s>
|
funcom_train/311355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMaxResolution() throws Exception {
System.out.println(" Start test MaxRes !!!!!!!!!!!!!!!!!!!!!");
// long nside = 1048576;
long nside = 8192;
double res = HealpixIndex.getPixRes(nside);
System.out.println("Minimum size of the pixel side is " + res
+ " arcsec.");
assertEquals("res = " + res, 25.76, res, 1e-1);
System.out.println(" End of MaxRes test _______________________");
}
COM: <s> test max resolution </s>
|
funcom_train/26441801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addCouple(String name, Channel ch, int nbrUsers ) {
boolean b = false;
if(!nameChannel.containsKey(name)) {
nameChannel.put(name, ch);
b = true;
}
if(nameChannel.containsKey(name)) {
Channel tmp = (Channel) nameChannel.get(name);
tmp.setNbrUsers(nbrUsers);
}
return b;
}
COM: <s> add a couple channelname channel in the hashtable name channel </s>
|
funcom_train/10749195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToString() {
ThreadGroup tg = new ThreadGroup("tg");
String toString = "java.lang.ThreadGroup[name=tg,maxpri=";
assertEquals("incorrect representation",
0, tg.toString().indexOf(toString));
}
COM: <s> verify to string output </s>
|
funcom_train/9389437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayPage(int index) {
Composite page = mPages.get(index);
if (page != null) {
mStackLayout.topControl = page;
mPagesRootComposite.layout(true);
if (!mInternalPageChange) {
mInternalPageChange = true;
mPageList.setSelection(index);
mInternalPageChange = false;
}
}
}
COM: <s> displays the page at the given index </s>
|
funcom_train/27787633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void importQuotesFromInternet() {
if(parseInternetFields()) {
if(webSiteComboBox.getSelectedIndex() == GOOGLE_SITE)
importQuotesFromGoogle();
else if(webSiteComboBox.getSelectedIndex() == YAHOO_SITE)
importQuotesFromYahoo();
else
importQuotesFromFloat();
}
}
COM: <s> import quotes from the internet </s>
|
funcom_train/4447850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Pager getAggregationPager(String groupHandle, int sinceDays, int length) {
String pagerUrl = urlStrategy.getWeblogPageURL(weblog,
weblogRequest.getLocale(), pageLink,
null, null, null, null, 0, false);
return new PlanetEntriesPager(
urlStrategy,
null,
groupHandle,
pagerUrl,
weblogRequest.getLocale(),
sinceDays,
pageNum,
length);
}
COM: <s> get pager for weblog entry objects from specified </s>
|
funcom_train/18807676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getFirstMillisecond(final Calendar calendar) {
final int year = this.day.getYear();
final int month = this.day.getMonth() - 1;
final int day = this.day.getDayOfMonth();
calendar.set(year, month, day, this.hour, 0, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime().getTime();
}
COM: <s> returns the first millisecond of the hour </s>
|
funcom_train/17675255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(int index, int value) {
ensureCapacity(size + 1);
if (index == size) {
buf[size++] = value;
} else {
System.arraycopy(buf, index, buf, index + 1, size - index);
buf[index] = value;
}
}
COM: <s> add a value at a specified index in the array </s>
|
funcom_train/8806327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ASRegion getRegion(ASSourceAST ast) {
int offset = getOffset(ast);
int length = getLength(ast);
int line;
int numLines;
try {
line = document.getLineOfOffset(offset);
numLines = document.getLineOfOffset(offset + length) - line + 1;
} catch (BadLocationException e) {
logger.error(e);
return null;
}
return new ASRegion(offset, length, line, numLines);
}
COM: <s> returns a region for an ast node </s>
|
funcom_train/40927359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getMensajeListaLeerCommand() {
if (mensajeListaLeerCommand == null) {//GEN-END:|156-getter|0|156-preInit
// write pre-init user code here
mensajeListaLeerCommand = new Command("Leer seleccionado", Command.OK, 0);//GEN-LINE:|156-getter|1|156-postInit
// write post-init user code here
}//GEN-BEGIN:|156-getter|2|
return mensajeListaLeerCommand;
}
COM: <s> returns an initiliazed instance of mensaje lista leer command component </s>
|
funcom_train/3714800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setPreferredUnits() {
UnitsView uw = new UnitsView(true, null, frame.getFrame(), "");
Units xunits = uw.getSelectedXUnits();
Units yunits = uw.getSelectedYUnits();
if (xunits != null && yunits != null) {
setPreferredUnits(xunits.toString(), yunits.toString());
}
}
COM: <s> sets the prefered units </s>
|
funcom_train/31690166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isVersioned() throws WebDAVException {
boolean bIsVersioned = false;
if (m_child != null) {
try {
bIsVersioned =
(m_child.isHistorical() == true
|| m_child.getLiveVersion() != null);
} catch (DataAccessException e) {
throw new WebDAVException(
WebDAVStatus.SC_INTERNAL_SERVER_ERROR,
e.getLocalizedMessage());
}
}
return bIsVersioned;
}
COM: <s> returns code true code if this resource is under version control in the </s>
|
funcom_train/43210424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBasicUsage() {
assertEquals(1, Anagrams.numberOfAnagrams("a"));
assertEquals(1, Anagrams.numberOfAnagrams("aaaa"));
assertEquals(120, Anagrams.numberOfAnagrams("apfel"));
assertEquals(6, Anagrams.numberOfAnagrams("otto"));
assertEquals(34650, Anagrams.numberOfAnagrams("mississippi"));
assertEquals(105594705216000l, Anagrams
.numberOfAnagrams("softwareengineering"));
}
COM: <s> tests a basic case </s>
|
funcom_train/15411145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dnode parseXml(InputStream in) {
try {
InputSource inSource = new InputSource(in);
DnodeParser parser = new DnodeParser();
XMLReader myReader = XMLReaderFactory.createXMLReader();
myReader.setContentHandler(parser);
myReader.parse(inSource);
return parser.getRoot();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
COM: <s> parse the xml inputstream returning the dnode tree </s>
|
funcom_train/24011874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String generateQueryString(String where, String orderBy) {
final StringBuffer sb = new StringBuffer(256);
sb.append("FROM "+Vehicle.class.getName());
if (!Strings.isBlank(where)) {
sb.append(" WHERE "+where);
}
if (!Strings.isBlank(orderBy)) {
sb.append(" ORDER BY "+orderBy);
}
return sb.toString();
}
COM: <s> generate query string </s>
|
funcom_train/37448660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDescription () {
SourceBean bean = (SourceBean) this.getCurrentRowObject();
if (bean == null) return "";
String description = bean.getDescription();
if (description == null || description.trim().length() == 0) {
description = "<span style=\"font-color:#898989;text-align:left;\"> No description available </span>";
}
return description;
}
COM: <s> send back the desciption of the source and in case it doesnt exists </s>
|
funcom_train/10519319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void preExecute() throws BuildException {
if (viewpath == null){
throw new BuildException("Invalid viewpath");
}
if (comment != null){
commentFile = CCUtils.createCommentFile(comment);
}
Vector v = getOptions();
options = new String[v.size()];
v.copyInto(options);
}
COM: <s> check for attributes and builds the options array </s>
|
funcom_train/32978768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float scaleIntensityData(float rawIntensityPoint)
{ /* scaleIntensityData */
float scaledData= (rawIntensityPoint * ss.sampleScaleFactor) +
ss.sampleOffset;
if(DBUG_FLAG)
System.out.println("GNP-SID.1 rawIntensityPoint="+rawIntensityPoint+
" scaledData="+scaledData);
return(scaledData);
} /* scaleIntensityData */
COM: <s> scale intensity data scale raw intensity data as fct of normalization mode </s>
|
funcom_train/11734441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean enterElement(String name) {
NodeList children = current.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE
&& name.equals(child.getNodeName())) {
current = (Element) child;
return true;
}
}
return false;
}
COM: <s> enters the named child element </s>
|
funcom_train/1169577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUntil(Player p, Command c) {
if(null == p) p = AllZone.getPhase().getPlayerTurn();
if(until.containsKey(p)) until.get(p).add(c);
else until.put(p, new CommandList(c));
}
COM: <s> p add until </s>
|
funcom_train/40465222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateComments(int id, String comments) {
String sql = "UPDATE resume SET additional_comments='" +
addSlashes(comments) + "' WHERE id=" + id;
try {
dbStatement = connection.createStatement();
dbStatement.execute(sql);
;
return true;
}
catch(SQLException e) {
return false;
}
}
COM: <s> updates the comments in the resume record </s>
|
funcom_train/45249539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateTabList() {
Composite parent = getParent();
if (parent != null) { // parent may be null on startup
EditorStack wb = getActiveWorkbook();
if (wb == null) {
parent.setTabList(new Control[0]);
} else {
parent.setTabList(wb.getTabList());
}
}
}
COM: <s> updates the editor areas tab list to include the active </s>
|
funcom_train/3672536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void savePreferredRenderers() {
if (configFileOut != null) {
try {
preferredRenderers.store(configFileOut,
"Configuration File for Object Renderers.");
} catch (IOException e) {
logger.warn("Could not write to object renderers' configuration file. - "
+ e.getMessage());
}
}
}
COM: <s> saves the current user configuration to disk </s>
|
funcom_train/3701871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void receiveResult(QueryResult result) {
//get handler for this result
QueryResultHandler qrh = (QueryResultHandler)s_Callbacks.get(result.getQid());
//pitch result that direction
if (qrh != null) {
qrh.queryResultEvent(result.getQid(), result.getRi());
} else {
s_logger.warn("received result for unknown QueryID");
}
}
COM: <s> receives a result item from a remote query processor </s>
|
funcom_train/3102239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void restoryBuiltinFilters(final IMemento memento) {
Assertion.valid(memento);
final IMemento filters= memento.getChild(TAG_FILTERS);
if (filters != null) {
final IMemento[] children= filters.getChildren(TAG_CHILD);
for (int index= 0; index < children.length; index++) {
fEnabled.put(children[index].getString(TAG_ID), Boolean.valueOf(children[index].getString(TAG_ENABLED)));
}
}
}
COM: <s> restores the state of the builtin filters </s>
|
funcom_train/21612734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printProgrammativeContext(StringBuilder sb) {
ProgrammativeInvocable[] pis = getProgrammativeInvocables();
int size = pis.length;
int row = 0;
for(ProgrammativeInvocable pi : pis) {
generateRowComment(sb, row++, size);
sb.append(" ");
sb.append( pi.getTreeNode().getRoot().getName() );
sb.append("\n");
}
}
COM: <s> prints out the list of programmative invocables </s>
|
funcom_train/39395675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String addressesToString(Address[] addresses) {
if (addresses != null) {
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < addresses.length; i++) {
if (i != 0) { // add separator between cc-addresses
buffer.append("; ");
}
buffer.append(addresses[i].toString());
}
return buffer.toString();
}
return "N/A";
}
COM: <s> returns a formatted string of all addresses in the given array </s>
|
funcom_train/21335273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(String uri) throws IOException, SAXException {
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
AutoTestContentHandler handler = new AutoTestContentHandler(this.path);
parser = factory.newSAXParser();
XMLReader reader = parser.getXMLReader();
reader.setContentHandler(handler);
reader.parse(uri);
} catch (ParserConfigurationException e) {
e.printStackTrace();
} catch (SAXException e) {
e.printStackTrace();
}
}
COM: <s> parse an xml file </s>
|
funcom_train/23182833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initDatabase() {
logger.info("initDatabase() - Entry");
this.dbCreator = new DBCreator();
// TODO: if db was not initialized properly application can be shutdown
// now just inform user without exit
try {
this.dbCreator.dbCheckAndInit();
} catch (DBException e) {
e.printStackTrace();
}
logger.info("initDatabase() - Exit");
}
COM: <s> this method initializes the database support </s>
|
funcom_train/31911556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void managerResumed(final UpdateManagerEvent e) {
EventQueue.invokeLater(new Runnable() {
public void run() {
Object[] dll = updateManagerListeners.toArray();
if (dll.length > 0) {
for (int i = 0; i < dll.length; i++) {
((UpdateManagerListener)dll[i]).
managerResumed(e);
}
}
}
});
}
COM: <s> called when the manager was resumed </s>
|
funcom_train/6353499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTitleText(String text) {
AssertUtils.assertNotDisposed(this);
if (_frame == null && _dialog == null)
throw new IllegalStateException(
"Must first call initWindowGraphic().");
if (text == null) text = "";
if (_name != null) text = _name + " " + text;
if (_frame != null) {
_frame.setTitle(text);
} else if (_dialog != null) {
_dialog.setTitle(text);
}
}
COM: <s> sets the text in the window title </s>
|
funcom_train/41210990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Component findFirstFocusable(Container c) {
int size = c.getComponentCount();
for (int iter = 0; iter < size; iter++) {
Component current = c.getComponentAt(iter);
if(current.isFocusable()){
return current;
}
if (current instanceof Container) {
Component cmp = findFirstFocusable((Container)current);
if(cmp != null){
return cmp;
}
}
}
return null;
}
COM: <s> find the first focusable component </s>
|
funcom_train/14396824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == null) return false;
if (!(obj instanceof CIMValue)) return false;
CIMValue that = (CIMValue)obj;
if (!(this.type==null ? that.type==null : this.type.equals(that.type)))
return false;
return (this.value == null? that.value == null: this.value.equals(that.value));
}
COM: <s> compares the current cim value with the specified object </s>
|
funcom_train/18351890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean connectionCheck(QueryGraph graph, CapEdge edge) {
boolean valid = true;
CapNode parent = edge.getParentNode();
if ((parent instanceof OperandQueryComponent)
|| (parent instanceof ConceptQueryComponent)) {
if (!(edge.getChildNode() instanceof ConceptQueryComponent)) {
message = "Operand and Concept components can only have "
+ "Concept child components.";
valid = false;
}
}
return valid;
}
COM: <s> operands and concepts can only have concepts as a child </s>
|
funcom_train/42645491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseMoved(MouseEvent e) {
// change state of mouse from pointer to text selection icon
if (documentViewModel.getViewToolMode() ==
DocumentViewModel.DISPLAY_TOOL_TEXT_SELECTION) {
Page currentPage = pageViewComponent.getPageLock(this);
selectionMouseCursor(currentPage, e.getPoint());
pageViewComponent.releasePageLock(currentPage, this);
}
}
COM: <s> invoked when the mouse cursor has been moved onto a component </s>
|
funcom_train/39882134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean readHeader() throws IOException {
if (consecutiveLineBreaks > 1) {
// break a section on an empty line
consecutiveLineBreaks = 0;
return false;
}
readName();
consecutiveLineBreaks = 0;
readValue();
// if the last line break is missed, the line
// is ignored by the reference implementation
return consecutiveLineBreaks > 0;
}
COM: <s> read a single line from the manifest buffer </s>
|
funcom_train/37576463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveRow(CachedRow r) throws IOException, SQLException {
rFile.seek(r.iPos);
DatabaseRowOutputInterface out;
if (newCacheType) {
out = new BinaryServerRowOutput(r.storageSize);
} else {
out = new BinaryDatabaseRowOutput(r.storageSize);
}
r.write(out);
rFile.write(out.toByteArray());
}
COM: <s> writes out the specified row </s>
|
funcom_train/39219598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
if (this == o) {
return(0);
}
if (!bySize) {
if (nodes > ((SGBin)o).nodes) {
return(-1);
} else {
return(1);
}
} else {
double a1 = width * height;
double a2 = ((SGBin)o).width * ((SGBin)o).height;
if (a1 < a2) {
return(1);
} else {
return(-1);
}
}
}
COM: <s> reverses the order because we want largest </s>
|
funcom_train/47537029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void computerEmpiricalExpectations(){
ArrayMath.set(empiricalExpectations, 0);
TIntArrayList valuesIds = counts.getAvailableStates(variable);
for (int i = 0; i < valuesIds.size(); i++) {
int state = valuesIds.getQuick(i);
StaticUtils.plusEquals(empiricalExpectations, fxy.apply(variable,state),counts.getCounts(variable, state));
}
}
COM: <s> for each variable x and each value y compute the empirical counts </s>
|
funcom_train/5312381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(Number x, Number y) {
int index = indexOf(x);
if (index < 0) {
throw new SeriesException("No observation for x = " + x);
}
else {
XYDataItem item = getDataItem(index);
item.setY(y);
fireSeriesChanged();
}
}
COM: <s> updates an item in the series </s>
|
funcom_train/32943065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContentTypePatterns(Map<String, List<String>> patterns) {
for(String contentType:patterns.keySet()) {
if(!contentTypePatterns.containsKey(contentType)) {
contentTypePatterns.put(contentType, new LinkedList<Pattern>());
}
List<Pattern> l = contentTypePatterns.get(contentType);
for(String strPattern: patterns.get(contentType)) {
l.add(Pattern.compile(strPattern));
}
}
}
COM: <s> sets the replacement patterns for generic regular expressions </s>
|
funcom_train/32355138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isUniqueUserName(String name) {
String properties[] = new String[3];
String values[] = new String[3];
properties[0] = UserConstants.NAME;
properties[1] = UserConstants.STATUS;
properties[2] = UserConstants.TYPE;
values[0] = name;
values[1] = ItemConstants.ACTIVE;
values[2] = String.valueOf(User.TYPE);
boolean exists = dtAdapter.itemExists(properties, values);
return !exists;
}
COM: <s> checks the username to be unique </s>
|
funcom_train/20245337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintPositions(Graphics g) {
// Draw red crosshairs at center
paintMarker(Color.RED, xCenter, yCenter, g);
// Draw blue crosshairs at the current mill location
if (millPoint != null) {
paintMarker(Color.BLUE, millPoint.x, millPoint.y, g);
}
}
COM: <s> draws the center and mill position icons </s>
|
funcom_train/20883280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dump(PrintWriter pw, int pad, String title) {
Utilities.dump(pw, pad, "========= Relation: " + title +
" =========");
Item item = head;
while (item != null) {
item.dump(pw, pad + 4, title);
item = item.getNext();
}
}
COM: <s> dumps this relation to the print writer </s>
|
funcom_train/15798601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changedUpdate(DocumentEvent e, Shape a, ViewFactory f) {
super.changedUpdate(e, a, f);
float align = getVerticalAlignment();
int height = fHeight;
int width = fWidth;
initialize(getElement());
boolean hChanged = fHeight != height;
boolean wChanged = fWidth != width;
if (hChanged || wChanged || getVerticalAlignment() != align) {
getParent().preferenceChanged(this, hChanged, wChanged);
}
}
COM: <s> my attributes may have changed </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.