__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/46761084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AuditModel getAudit(final long auditId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return SecurityData.getAudit(auditId, chain, call);
}}; return (AuditModel) call(method, call);
}
COM: <s> same transaction return the single audit model for the primary key </s>
|
funcom_train/18104715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serviceRepaints() {
int x1, y1, x2, y2;
Object target;
synchronized (qLock) {
if (paintX1 == -1) {
return;
}
x1 = paintX1;
y1 = paintY1;
x2 = paintX2;
y2 = paintY2;
target = paintTarget;
paintX1 = paintY1 = paintX2 = paintY2 = -1;
paintTarget = null;
}
repaintScreenEvent(x1, y1, x2, y2, target);
}
COM: <s> service any pending repaints </s>
|
funcom_train/32079593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setControl(Control control) {
checkWidget ();
if (control != null) {
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.parent != parent) error (SWT.ERROR_INVALID_PARENT);
}
this.control = control;
if (control != null) {
control.setVisible (expanded);
int headerHeight = parent.getBandHeight ();
control.setBounds (x + BORDER, y + headerHeight, Math.max (0, width - 2 * BORDER), Math.max (0, height - BORDER));
}
}
COM: <s> sets the control that is shown when the item is expanded </s>
|
funcom_train/49760277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getJPanelParameterIdentifier(),
java.awt.BorderLayout.NORTH);
jContentPane.add(getJPanelButtons(), java.awt.BorderLayout.EAST);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/40545539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPiece(int row, int col, Piece piece) {
for (int r = 0; r < Piece.PIECE_SIZE; r++) {
for (int c = 0; c < Piece.PIECE_SIZE; c++) {
BlockType type = piece.getBlock(r, c);
if (type == null) {
continue;
}
setBlock(r + row, c + col, type);
}
}
}
COM: <s> sets the piece into the given top left position </s>
|
funcom_train/37763476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object invoke(Invocation invocation) throws Throwable {
String out = getName() +"[" + hash +"] called on " + ((MethodInvocation)invocation).getActualMethod();
//System.out.println(out);
ExecutionOrderTest.eventLog.add(out);
return invocation.invokeNext();
}
COM: <s> implementation of the rule on invocation </s>
|
funcom_train/31679377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLObjectWriter setOutput(OutputStream out, String encoding) throws XMLStreamException {
if ((_outputStream != null) || (_writer != null))
throw new IllegalStateException("Writer not closed or reset");
_xml._writer.setOutput(out, encoding);
_outputStream = out;
_xml._writer.writeStartDocument();
return this;
}
COM: <s> sets the output stream and encoding for this xml object writer </s>
|
funcom_train/4253543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SessionDescriptor addMedia(MediaField media, AttributeField attribute)
{ //printlog("DEBUG: media: "+media,5);
//printlog("DEBUG: attribute: "+attribute,5);
addMediaDescriptor(new MediaDescriptor(media,null,attribute));
return this;
}
COM: <s> adds a new attribute for a particular media </s>
|
funcom_train/8064653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPolygon(Polygon p) {
_npoints = p.npoints;
_xpoints = new int[_npoints];
_ypoints = new int[_npoints];
System.arraycopy(p.xpoints, 0, _xpoints, 0, _npoints);
System.arraycopy(p.ypoints, 0, _ypoints, 0, _npoints);
calcBounds();
}
COM: <s> set the current vector of points </s>
|
funcom_train/33393643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseQualifierElements(Element beanEle, AbstractBeanDefinition bd) {
NodeList nl = beanEle.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element && nodeNameEquals(node, QUALIFIER_ELEMENT)) {
parseQualifierElement((Element) node, bd);
}
}
}
COM: <s> parse qualifier sub elements of the given bean element </s>
|
funcom_train/41379690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IAction action) {
RenameWizard wiz = new RenameWizard();
IStructuredSelection sSelection = null;
if(selection instanceof IStructuredSelection) sSelection = (IStructuredSelection) selection;
wiz.init(null, sSelection);
// Create the wizard dialog
WizardDialog dialog = new WizardDialog
(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),wiz);
// Open the wizard dialog
dialog.open();
}
COM: <s> perform the rename action </s>
|
funcom_train/3946006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBasePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ManifestType_base_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ManifestType_base_feature", "_UI_ManifestType_type"),
ImscpRootv1p1p2Package.eINSTANCE.getManifestType_Base(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the base feature </s>
|
funcom_train/9667216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printButtonActionPerformed(ActionEvent e) {
closing = true;
printing = true;
jTable8.setModel(new TableModel(cm, dt.toYearMonthDay(), 0));
JOptionPane.showMessageDialog(this, "Select PAGE SETUP then select LANDSCAPE before printing.", "Printing Note",
JOptionPane.INFORMATION_MESSAGE);
PrintUtilities.printComponent(jTable8);
closing = false;
printing = false;
}
COM: <s> allows the weekly activities to be printed </s>
|
funcom_train/44107795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getOrganizationDirectory(){
String organizationDirectory = ServerConsoleServlet.getResourceLocalDirectory(this.getOrganizationName()).getAbsolutePath();
if ((this.organization != null) && (this.organization instanceof String)){
organizationDirectory += File.separator + this.organization;
} else {
ServerConsoleServlet.printSystemLog("Invalid organization or organization is not set. organization = " + this.organization, ServerConsoleServlet.LOG_ERROR);
return null;
}
return organizationDirectory;
}
COM: <s> get organization directory returns home directory of this organization </s>
|
funcom_train/25332254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetInverse() {
DAEnsemblDNASequenceReader instance = new DAEnsemblDNASequenceReader();
SequenceView expResult = null;
SequenceView result = instance.getInverse();
assertEquals(expResult, result);
String sequence = "ATCTATTG";
instance.setContents(sequence);
assertTrue(instance.getInverse().getSequenceAsString().equals("CAATAGAT"));
}
COM: <s> test of get inverse method of class daensembl dnasequence reader </s>
|
funcom_train/29418676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VizCurve dup() {
VizCurve ans = new VizCurve(startX, startY);
ans.endX = endX;
ans.endY = endY;
for(CubicCurve2D.Double x:list) {
CubicCurve2D.Double c = new CubicCurve2D.Double();
c.setCurve(x);
ans.list.add(c);
}
return ans;
}
COM: <s> make a deep copy of this viz curve object </s>
|
funcom_train/1717494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
byte[] thatA = ((EthernetAddress) o).mAddress;
byte[] thisA = mAddress;
for (int i = 0; i < 6; ++i) {
int cmp = (((int) thisA[i]) & 0xFF) - (((int) thatA[i]) & 0xFF);
if (cmp != 0) {
return cmp;
}
}
return 0;
}
COM: <s> method that compares this ethernet address to one passed in as argument </s>
|
funcom_train/2581407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Paint getColor(double value) {
int izV = (int) (253 * (value - this.minZ)
/ (this.maxZ - this.minZ)) + 2;
return new Color(this.r[izV], this.g[izV], this.b[izV]);
}
COM: <s> returns the color associated with a value </s>
|
funcom_train/32769945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMenuItemLine() {
if (menuItemLine == null) {
menuItemLine = new JMenuItem();
menuItemLine.setText(OpenJCADLanguage.getString("_line_")); // Generated
menuItemLine.addActionListener(new OpenJCADDraw2DLineAction(this.tabbedPane));
}
return menuItemLine;
}
COM: <s> this method initializes menu item line </s>
|
funcom_train/10573822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFailure(Test test, AssertionFailedError t) {
//addFailure(test, (Throwable) t);
if (testRecord == null)
testRecord = getMissingTestRecord();
testRecord.setStatus(TEST_FAILURE);
testRecord.setThrowable(t);
// Record end time now..
}
COM: <s> interface test listener for junit gt 3 </s>
|
funcom_train/19722538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeInvoiceCell(InvoiceCell cell, DataOutputStream dataOut) throws IOException {
/**
* InvoiceCell serialization format is as follows: (String) name of invoice
* cell (int) number of child cells (invoice cell) child 1 ... repeat for
* each child
*/
dataOut.writeUTF(cell.getLabel());
dataOut.writeInt(cell.getRow());
dataOut.writeInt(cell.getCol());
}
COM: <s> writes the given invoice cell to the stream </s>
|
funcom_train/937018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clean() throws Exception {
for(int i = 0; i < delete.size(); i++) {
AbstractFile t=(AbstractFile)delete.get(i);
if (t.isFile()) {
log.debug("deleting temp file:"+t);
t.delete();
}
}
for(int i = 0; i < delete.size(); i++) {
AbstractFile t=(AbstractFile)delete.get(i);
if (t.exists() && !t.isFile()) {
log.debug("deleting temp dir:"+t);
t.delete();
}
}
}
COM: <s> deletes previously created files </s>
|
funcom_train/7223409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ensureEOE(){
if(events_.hasNext()){
String message = MessageUtil.get("ECC02", subject_);
// "Assert.fail" may cause succeed "clear" invocation,
// because it prevents "Producer#produce" from being completed.
// Below assignment prevents "clear" from invoking "getNext()".
failed_ = true;
Assert.fail(message);
}
readyToUse();
}
COM: <s> examine whether event queue has no more ones </s>
|
funcom_train/31208269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCaseSensitive(int column) throws SQLException {
try {
if(Trace.isDetailed()) Trace.trace(getId(),column);
// checkColumnIndex already calls checkClosed
rs.checkColumnIndex(column);
return true;
} catch(Throwable e) {
throw convertThrowable(e);
}
}
COM: <s> checks if this column is case sensitive </s>
|
funcom_train/19410976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDtStartStringTimezone() throws ParseException {
String value = new DateTime().toString();
DtStart dtStart = new DtStart(value, timezone);
assertEquals(timezone, dtStart.getTimeZone());
assertEquals(value, dtStart.getValue());
}
COM: <s> unit tests for value timezone constructor </s>
|
funcom_train/44375656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeFirstOccurrence(Object o) {
checkNullArg(o);
for (;;) {
Node<E> n = header.forward();
for (;;) {
if (n == null)
return false;
if (o.equals(n.element)) {
if (n.delete())
return true;
break; // restart if interference
}
n = n.forward();
}
}
}
COM: <s> removes the first element tt e tt such that </s>
|
funcom_train/7674474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegisterSpecList withFirst(RegisterSpec spec) {
int sz = size();
RegisterSpecList result = new RegisterSpecList(sz + 1);
for (int i = 0; i < sz; i++) {
result.set0(i + 1, get0(i));
}
result.set0(0, spec);
if (isImmutable()) {
result.setImmutable();
}
return result;
}
COM: <s> returns a new instance which is the same as this instance </s>
|
funcom_train/21243978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append('{');
for (int i = 0; i < theFields.size(); i++) {
buffer.append(theFields.get(i));
buffer.append("=");
buffer.append(theValues.get(i));
buffer.append(" : ");
}
buffer.append('}');
return buffer.toString();
}
COM: <s> override of the traditional to string method </s>
|
funcom_train/46477759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAsAssetsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AssetsDiagram_AsAssets_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AssetsDiagram_AsAssets_feature", "_UI_AssetsDiagram_type"),
SecurityContextPackage.Literals.ASSETS_DIAGRAM__AS_ASSETS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the as assets feature </s>
|
funcom_train/21644648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getOptionsBattleAllowColorChangesCheckBox() {
if (optionsBattleAllowColorChangesCheckBox == null) {
optionsBattleAllowColorChangesCheckBox = new JCheckBox(
"Allow robots to change colors repeatedly (Slow, not recommended)");
optionsBattleAllowColorChangesCheckBox.setMnemonic('h');
optionsBattleAllowColorChangesCheckBox.setDisplayedMnemonicIndex(17);
}
return optionsBattleAllowColorChangesCheckBox;
}
COM: <s> return the options battle allow color changes check box </s>
|
funcom_train/9810053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dumpBuf(byte[] buf, int length) {
synchronized (inBuf) {
System.out.println("EncapDSI:dumpingBuf");
GenericPacket pkt = new GenericPacket(0, length);
pkt.putBytes(buf, 0, 0, length);
inBuf.addElement(pkt);
if (inBuf.isEmpty()) {
System.out.println("EncapDSI:inBuf is still empty");
} else {
System.out.println("EncapDSI:inBuf has stuff");
}
}
}
COM: <s> dump buf takes a byte array and its content length make a </s>
|
funcom_train/16388683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean commit() {
log.debug("restartNagios Call made to OpenNMSAdapter to re-load requisition. ");
try{
if (onmsXmlClient.requisitionImport(foreign_source)==false) {
log.error("OpenNMSBcosAdapter import foreign_source= "+foreign_source+" failed ");
return false;
}
} catch (Exception e){
log.error("OpenNMSBcosAdapter restart() command error: ",e);
return false;
}
return true;
}
COM: <s> this method implements the restart nagios method </s>
|
funcom_train/39535039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getEnumeratedTagValueReferenceAttribute(String nodeName, String attributeName){
String enumeratedTagValueReferenceAttribute="";
if(nodeName!=null && ! nodeName.equals("") && attributeName!=null && ! attributeName.equals("")){
enumeratedTagValueReferenceAttribute=refAttributeToEnumeratedTag.get(nodeName+separator+attributeName);
}
return enumeratedTagValueReferenceAttribute;
}
COM: <s> returns the attribute name that contains the referenced tag name </s>
|
funcom_train/35233034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(UnitProperties props, OmniNotifyListener.NotifyType notifyType) {
this.updateName(props.getName(), notifyType);
this.updateUnitType( UnitType.typeAsEnum(props.getUnitType()), notifyType);
this.updateStatus(props.getState(), props.getTime(), notifyType);
}
COM: <s> update the unit from the unit properties </s>
|
funcom_train/46765069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getAccountMenuItem() {
if (accountMenuItem == null) {
accountMenuItem = new JMenuItem();
accountMenuItem.setText(Resources.getString("menu_change_account"));
accountMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
readConnectionConfigurationFromDialog(Resources.getString("msg_new_account_dates"));
}
});
}
return accountMenuItem;
}
COM: <s> this method initializes account menu item </s>
|
funcom_train/20942924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void threadDump() {
if (canDumpLocks) {
if (tmbean.isObjectMonitorUsageSupported() &&
tmbean.isSynchronizerUsageSupported()) {
// Print lock info if both object monitor usage
// and synchronizer usage are supported.
// This sample code can be modified to handle if
// either monitor usage or synchronizer usage is supported.
dumpThreadInfoWithLocks();
}
} else {
dumpThreadInfo();
}
}
COM: <s> prints the thread dump information to system </s>
|
funcom_train/7304592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setNewBase(int newCapacity) {
this.modCountIncr = 1;
Object base = getArray();
Class baseType = base.getClass().getComponentType();
Object newBase = Array.newInstance(baseType, newCapacity);
System.arraycopy(base, 0, newBase, 0, this.capacity);
setArray(newBase);
}
COM: <s> replaces the existing base array in the subclass with a new </s>
|
funcom_train/18358108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Mission getMissionForRover(String roverId) throws RemoteException {
logH.getLogger().info ("Getting mission for rover: " + roverId);
Mission curMission = null;
// TODO - return exception if store is not available yet.
try {
curMission = aStore.findExecutingMissionForRover(roverId);
return curMission;
}
catch (Exception e) {
// TODO: why no mission?
logH.getLogger().severe("No mission: " + e.getMessage());
return null;
}
}
COM: <s> finds a currently executing mission for the rover in question </s>
|
funcom_train/34814840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHotLinkedOligos(){
//if any oligoMatches, make html
if (oligoMatches!=null){
int num = oligoMatches.length;
StringBuffer sb = new StringBuffer();
for (int i=0; i<num; i++){
sb.append("<a href='Oligo?id=");
sb.append(oligoMatches[i].getId());
sb.append("'>");
sb.append(oligoMatches[i].getName());
sb.append("</a> (");
sb.append(oligoMatches[i].getBpMatches());
sb.append(") ");
}
return sb.toString();
}
else return "";
}
COM: <s> returns html for of oligo matches for display </s>
|
funcom_train/5307662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateURL(XYDataset dataset, int series, int item) {
String url = this.prefix;
boolean firstParameter = url.indexOf("?") == -1;
url += firstParameter ? "?" : "&";
url += this.seriesParameterName + "=" + series
+ "&" + this.itemParameterName + "=" + item;
return url;
}
COM: <s> generates a url for a particular item within a series </s>
|
funcom_train/18590892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
fileList_ = new ArrayList();
nameList_ = new ArrayList();
gen_ = null;
currentSize_ = 0;
latency_ = 0.00417; // 4.17 ms in seconds
avgSeekTime_ = 0.009; // 9 ms
maxTransferRate_ = 133; // in MB/sec
}
COM: <s> the initialization of the harddrive is done in this method </s>
|
funcom_train/8691189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUnixMode(int mode) {
// CheckStyle:MagicNumberCheck OFF - no point
setExternalAttributes((mode << 16)
// MS-DOS read-only attribute
| ((mode & 0200) == 0 ? 1 : 0)
// MS-DOS directory flag
| (isDirectory() ? 0x10 : 0));
// CheckStyle:MagicNumberCheck ON
platform = PLATFORM_UNIX;
}
COM: <s> sets unix permissions in a way that is understood by info zips </s>
|
funcom_train/32637856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(java.awt.event.ActionEvent e) {
if(e.getSource() != gettype())
gettype().setText(((JMenuItem)e.getSource()).getText());
for(Iterator i = listeners.iterator(); i.hasNext(); )
((java.awt.event.ActionListener)i.next()).actionPerformed(e);
}
COM: <s> called when menu item gets selected or user enters return </s>
|
funcom_train/10636072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test01() {
SSLEngine e = new mySSLEngine();
assertNull(e.getPeerHost());
assertEquals(e.getPeerPort(), -1);
String[] suites = { "a", "b", "c" };
e.setEnabledCipherSuites(suites);
assertEquals(e.getEnabledCipherSuites().length, suites.length);
}
COM: <s> test for code sslengine code constructor assertion creates </s>
|
funcom_train/2386436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setPhotoList(List photos, boolean preview){
setRowCount(0);
Iterator itPhoto = photos.iterator();
while(itPhoto.hasNext()){
addRow(performPhotoIntoRow((Photo)itPhoto.next(), preview));
}
setMaxWidth(PhotoPlayer.ICONIFIED_WIDTH+1);
}
COM: <s> update the photo list </s>
|
funcom_train/10383514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOmittedMethod(String method) {
if (method == null)
return;
String results[] = new String[omittedMethods.length + 1];
for (int i = 0; i < omittedMethods.length; i++)
results[i] = omittedMethods[i];
results[omittedMethods.length] = method;
omittedMethods = results;
}
COM: <s> add an http request method to the methods explicitly excluded from this </s>
|
funcom_train/21249691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Close() throws TransportLayerException {
//mParentStack.CloseUDP(this);
if(appType==0){
printInfo("SNMP agent closed socket.");
}
else if(appType==1){
printInfo("SNMP manager closed socket.");
}
running = false;
mParentStack.SL().close(appSock);
}
COM: <s> this method stop listening on application port </s>
|
funcom_train/22261287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int handle_pass(String line, StringTokenizer st) {
if (username == null) {
return sendReply(503, "Login with USER first.");
}
if (st.hasMoreTokens())
password = st.nextToken();
if (checkLogin())
return sendReply(230, "User " + username + " logged in.");
else
return sendReply(530, "Password incorrect.");
}
COM: <s> handler fot the pass command send password </s>
|
funcom_train/3990043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNr_stat_chorobyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_HistoriaChoroby_nr_stat_choroby_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_HistoriaChoroby_nr_stat_choroby_feature", "_UI_HistoriaChoroby_type"),
PrzychodniaPackage.Literals.HISTORIA_CHOROBY__NR_STAT_CHOROBY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the nr stat choroby feature </s>
|
funcom_train/2444872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ensureParentFolderExists() throws DataCacheException {
if (!parentDir.exists() && !parentDir.mkdirs()) {
throw new DataCacheException("Failed to create the directory " + parentDir);
}
if (!parentDir.isDirectory()) {
throw new DataCacheException("The file " + parentDir + " is not a directory.");
}
}
COM: <s> checks if the directory in which to create the cache files exists </s>
|
funcom_train/6266330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setZoneAdjustments(Hashtable map) throws SdpException {
if (map == null)
throw new SdpException("The map is null");
else {
for (Enumeration e = map.keys(); e.hasMoreElements();) {
Object o = e.nextElement();
if (o instanceof Date) {
Date date = (Date) o;
ZoneAdjustment zone = new ZoneAdjustment();
zone.setTime(date.getTime());
addZoneAdjustment(zone);
} else
throw new SdpException("The map is not well-formated ");
}
}
}
COM: <s> sets the hashtable of adjustment times where </s>
|
funcom_train/9547802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public interface ChurnAnalyzer extends Analyzer {
/**
* Informs the correspondent churn analyzer about the next session time
* calculated by the applied churn model
*
* @param host
* the next session time in minutes (time = calculatedTime *
* Simulator.MINUTE_UNIT);
*/
public void nextSessionTime(long time);
/**
* Informs the correspondent churn analyzer about the next inter-session
* time calculated by the applied churn model
*
* @param host
* the next inter-session time in minutes (time =
* calculatedTime * Simulator.MINUTE_UNIT);
*/
public void nextInterSessionTime(long time);
}
COM: <s> churn analyzers receive notifications about the session inter session </s>
|
funcom_train/34028874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeTo(OutputStream out) throws IOException {
XmlOptions options = new XmlOptions(DEFAULT_XML_OPTIONS);
//re-create the sst table every time saving a workbook
CTSst sst = _sstDoc.getSst();
sst.setCount(count);
sst.setUniqueCount(uniqueCount);
_sstDoc.save(out, options);
}
COM: <s> write this table out as xml </s>
|
funcom_train/12193630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateImmutableFromMutableReturnsSameHashcode() {
MutableInhibitor mutableMDO = getMutableInhibitor();
ImmutableInhibitor immutableMDO = mutableMDO.createImmutable();
assertEquals("The original mutable object and the created immutable object " +
"should shave the same hashcode",
mutableMDO.hashCode(), immutableMDO.hashCode());
}
COM: <s> tests that a valid </s>
|
funcom_train/8012985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public STableColumn addDisplayColumn(String name, String columnExpression, String caption, SCheckBox cbx) throws DataStoreException {
TableColumnModel mod = getColumnModel();
STableColumn col = new STableColumn(name,this);
col.setHeaderValue(caption);
col.setModelIndex(_ds.getColumnIndex(columnExpression));
CheckBoxCellRenderer rend = new CheckBoxCellRenderer(this, cbx);
col.setCellRenderer(rend);
mod.addColumn(col);
return col;
}
COM: <s> adds a column from the datastore to the visual grid </s>
|
funcom_train/40414387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MenuBar buildReplaceWithMenu(final Widget widget) {
WidgetOption[] a = getWidgetOptionList();
MenuBar bar = createMenuBar(true);
for (int i = 0; i < a.length; i++) {
bar.addItem(createReplaceWithMenuItem(widget, a[i]));
}
return bar;
}
COM: <s> build a menu to replace widget with another widget or container </s>
|
funcom_train/48388568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIFrameURL(String url) {
setContentsURL(url);
if(!isDrawn()) {
setContentsType(ContentsType.PAGE);
} else {
assert getContentsType() == ContentsType.PAGE : "This method cannot be called on a HTMLPane that has a contentsType other than PAGE";
}
}
COM: <s> set the url of the iframe </s>
|
funcom_train/37126681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean nukeDir(File dir) {
if (dir.isDirectory()) {
File[] subfiles = dir.listFiles();
for (int i = 0; i < subfiles.length; i++) {
if (! nukeDir(subfiles[i])) return false;
}
}
boolean deleted = dir.delete();
return deleted;
}
COM: <s> recursively deletes a directory </s>
|
funcom_train/9806068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pruneNonReferencedCells(EdifCell topCell) {
boolean ret = true;
while (ret) {
ret = false;
Collection<EdifCell> toPrune = findNonReferencedCells(topCell);
if (toPrune != null)
for (EdifCell pruneMe : toPrune) {
deleteCell(pruneMe, true);
ret = true;
}
}
}
COM: <s> prune cells that are not referenced recursively by the top cell </s>
|
funcom_train/2759255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resource getResource(String name) throws IOException {
if(false == name.startsWith(_mountPath)) {
throw new IllegalArgumentException("Path does not start with mount point path.");
}
name = name.substring(_mountPath.length());
File file = new File(_root, name);
if(false == file.exists()) {
return null;
} else if(file.isFile()) {
return getFileResource(file);
} else {
return getFolderResource(file);
}
}
COM: <s> returns the resource at the supplied path </s>
|
funcom_train/25545599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHiskiPerson(int idx, PersonShortData pers) {
HiskiImportPanel hiskiPanel = null;
for (int i = 0; i < paneTabs.size(); i++) {
Component pan = paneTabs.get(i).pnl;
if (pan instanceof HiskiImportPanel) {
hiskiPanel = (HiskiImportPanel) pan;
break;
}
}
if (hiskiPanel != null) {
hiskiPanel.setHiskiPerson(idx, pers);
}
}
COM: <s> set a hiskipanel person </s>
|
funcom_train/40360180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmptyTypeName() {
try {
new StoreContext("test", "");
fail("failed to throw exception");
} catch (IllegalArgumentException e) {
assertEquals("StoreContext.typeName may not be null or empty.",
e.getMessage());
}
}
COM: <s> tests if the exception is thrown correctly if the type name is empty </s>
|
funcom_train/45503878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String readString(File file) throws IOException{
BufferedReader input = new BufferedReader(new FileReader(file));
String result = new String();
while(input.ready()){
result += input.readLine();
result += "\n";
}
input.close();
return result;
}
COM: <s> reads the content of a file to a string </s>
|
funcom_train/16864273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ignoreWhenParsing(final int begin, final int end) {
if (wasFullSequentialParseCalled()) throw new IllegalStateException("ignoreWhenParsing can not be used after a full sequential parse has been performed");
if (parseTextOutputDocument==null) {
parseTextOutputDocument=new OutputDocument(getParseText());
parseText=null;
}
parseTextOutputDocument.replaceWithSpaces(begin,end);
}
COM: <s> causes the specified range of the source text to be ignored when parsing </s>
|
funcom_train/6329320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(int index) {
// This is a legal listIterator position, but an illegal get.
if (index == size())
throw new IndexOutOfBoundsException("Index: " + index + ", Size:"
+ size());
return listIterator(index).next();
}
COM: <s> get the element at a given index in this list </s>
|
funcom_train/48099769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openFile(String fileName) {
if (fileName == null)
return;
if (url != null)
backHistory.push(url);
try {
url = FileIO.getURL(fileName, url);
} catch (MalformedURLException ex) {
Logger.getLogger(GUI.class.getName()).
log(Level.SEVERE, null, ex);
}
forwardHistory.clear();
flush();
}
COM: <s> open the given file if there is one </s>
|
funcom_train/12151429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
LogProxy.configure(getDisplay(), getSpectrum());
//Pre-loading form objects here to make them appear quicker later on
getMapKeysForm();
try {
loadRom();
if (!loadLastSnapshot()) {
loadDefaultSnapshot();
}
} catch (Exception e) {
if (Config.DEBUG) {
LogProxy.error(e);
}
}
}
COM: <s> initilizes the application </s>
|
funcom_train/5276176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() {
try {
log4j.debug("before save: " + getPerson().toString());
PersonDelegate.savePerson(getPerson());
log4j.debug("after save: " + getPerson().toString());
} catch (FileNotFoundException e) {
log4j.error("ERROR: " + e.toString());
} catch (DatabaseException e) {
log4j.error("ERROR: " + e.toString());
}
newPerson = false;
}
COM: <s> saves person data by calling remote application via delegate class </s>
|
funcom_train/19388234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isWellFormed() throws IOException {
try {
checkWellFormedness();
} catch (SAXException saxe) {
//nothing wrong here.
//document is just not well-formed.
} catch (ParserConfigurationException pce) {
throw new IOException(pce.getMessage());
}
return m_parsedMode;
}//}}}
//{{{ isValid()
COM: <s> indicates if the document is well formed </s>
|
funcom_train/48072573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendDateRangeCriterion(final ICriteria<? extends E> criteria, final DateRange dr) {
if(dr != null && !dr.isEmpty()) {
criteria.getPrimaryGroup().addCriterion(
CriteriaFactory.buildCriterion("dateCreated", dr, Comparator.BETWEEN, false));
}
}
COM: <s> adds a date range criterion to the given criteria </s>
|
funcom_train/46857852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ProjectChanged(Project project) {
// If the new project is null it means that the project was closed.
if (project == null) {
projectLoaded = false;
roadNetwork = null;
currentTrafficLayer = null;
repaint();
}
// Else it means the project was opened or created
else {
projectLoaded = true;
roadNetwork = project.getRoadNetwork();
ZoomToFitAndCenter();
UpdateScrollBars();
setEditingMode(EditingMode.Map);
}
}
COM: <s> handler for the event of the project change </s>
|
funcom_train/39169448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStorageUrl() {
if(storageDir == null) return null;
URL u = null;
try { u = storageDir.toURI().toURL(); } catch(MalformedURLException e) {
// we can assume that this never happens as storageUrl should always
// be a valid file and therefore convertable to URL
}
return u.toString();
} // getStorageUrl()
COM: <s> get the url for the underlying storage mechanism </s>
|
funcom_train/27695464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Type getBaseType(Enum e) {
Debug.assert(e);
updateModel();
Type result = null;
EnumDeclaration ed = getEnumDeclaration(e);
if (ed == null) {
result = e.getProgramModelInfo().getBaseType(e);
} else {
TypeReference tr = ed.getBaseTypeReference();
if (tr != null && !"void".equals(tr.getName())) {
result = getType(tr);
}
}
return result;
}
COM: <s> returns the basetype of an enum </s>
|
funcom_train/4466981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClickOnItem() {
final FishEyeModule module = new FishEyeModule();
module.onModuleLoad();
final Task task = new Task() {
public void run() {
assertTrue(module.isClicked());
}
};
Timer timer = new Timer() {
public void run(){
TestUtil.fireEvent("click", 35,35,TestUtil.MOUSE_BUTTON_1,1,task);
finishTest();
}
};
this.delayTestFinish(150);
timer.schedule(100);
}
COM: <s> tests if we can click on the item and the associated command with </s>
|
funcom_train/44161609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BaseTakenUp findTable(ArrayList tabls, String id) {
BaseTakenUp tmp = null;
for (int j = 0; j < tabls.size(); j++) {
tmp = (BaseTakenUp)tabls.get(j);
if (tmp.getId().equals(id)) {
return tmp;
}
}
return null;
}
COM: <s> find table finds table by id </s>
|
funcom_train/3464349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParagraph() {
if(parent.isClosed()) {
return;
}
new HTMLEditorKit.InsertHTMLTextAction("Paragraph", "<P>", HTML.Tag.BODY, HTML.Tag.P).actionPerformed(
new ActionEvent(parent, 0, "Paragraph"));
parent.requestFocus();
}
COM: <s> adds a paragraph to at the cursor </s>
|
funcom_train/40299661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double offsetFrom(final DateTimeComponents dateTime) {
final int dateOffset = date.getJ2000Day() - dateTime.date.getJ2000Day();
final double timeOffset = time.getSecondsInDay() - dateTime.time.getSecondsInDay();
return 86400.0 * dateOffset + timeOffset;
}
COM: <s> compute the seconds offset between two instances </s>
|
funcom_train/22492950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCredentialsSecure(boolean credentialsSecure) {
String previous = profileSettings.get(USE_SECURE_CREDENTIALS, null);
profileSettings.putBoolean(USE_SECURE_CREDENTIALS, credentialsSecure);
propertyListeners.firePropertyChange(USE_SECURE_CREDENTIALS, previous, Boolean.valueOf(credentialsSecure));
}
COM: <s> sets whether the credentials for a service are encrypted or plain text </s>
|
funcom_train/16482776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Image createThumbnail(Image image) {
int displayWidth = Display.getInstance().getDisplayWidth();
if (image.getWidth() > displayWidth) {
int thumbWidth = displayWidth - 10;
int thumbHeight = thumbWidth * image.getHeight() / image.getWidth();
return image.scaled(thumbWidth, thumbHeight);
} else {
return image;
}
}
COM: <s> return a scaled version of the image based on the display size </s>
|
funcom_train/40762134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addInputHandler(Project project) throws BuildException {
InputHandler handler = null;
if (inputHandlerClassname == null) {
handler = new DefaultInputHandler();
} else {
handler = (InputHandler) ClasspathUtils.newInstance(
inputHandlerClassname, AntMainForErp.class.getClassLoader(),
InputHandler.class);
project.setProjectReference(handler);
}
project.setInputHandler(handler);
}
COM: <s> creates the input handler and adds it to the project </s>
|
funcom_train/44432336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTheChannel(ChannelIF aChannel) {
if (aChannel == null) {
return;
}
theChannel = aChannel;
// We cast the Channel's items into an ArrayList, so that we can index into the items,
// which wouldn't otherwise be possible.
itemList = new ArrayList(theChannel.getItems());
}
COM: <s> set the channel </s>
|
funcom_train/26401924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
synchronized (pool) {
Connection c = null;
for (Iterator i = pool.iterator(); i.hasNext(); ) {
c = (Connection) i.next();
releaseConnection(c);
try {
c.close();
}
catch (Throwable t) {
// eat all exceptions
}
i.remove();
}
}
}
COM: <s> p close the connection pool </s>
|
funcom_train/46761534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long execute(Session session) throws Exception {
try {
// set the insert and update date time and user
model.setStoreDefault(DateTimeModel.getNow(), call == null ? 0L : call.getUserRefId());
BaseData.store(model, session, call);
return model.getId();
} catch (Exception ex) {
Log.exception(ex);
if (model != null) {
Log.error(model.toString());
}
throw ex;
}
}
COM: <s> execute the store command </s>
|
funcom_train/46729932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setResults(List<ViewPatientModel> results) throws Exception {
getDefaultBaseModel().setSearchResults(BaseModel.getIBaseModels(results));
// create an action to populate the search results table which must have this context
ModifyTableAction populate = new ModifyTableAction(ContextReference.PATIENTSEARCHRESULTSTABLE.getRefId());
// convert search results to a set
populate.setNewTableContents(BaseModel.toTableRows(results));
getFormMediator().receive(ISEvent.EXECUTEMODIFYTABLEACTION, populate);
}
COM: <s> update the table with the list of results </s>
|
funcom_train/34793597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getElementAttribute(int row, int attr) {
if (featuresList.size() == 0) {
return "";
}
ISlideData slideData = (ISlideData)featuresList.get(0);
ISlideDataElement element = slideData.getSlideDataElement(row);
return element.getFieldAt(attr);
}
COM: <s> returns an element attribute for specified row and </s>
|
funcom_train/28750212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProceduretypeiconpath(String newVal) {
if ((newVal != null && this.proceduretypeiconpath != null && (newVal.compareTo(this.proceduretypeiconpath) == 0)) ||
(newVal == null && this.proceduretypeiconpath == null && proceduretypeiconpath_is_initialized)) {
return;
}
this.proceduretypeiconpath = newVal;
proceduretypeiconpath_is_modified = true;
proceduretypeiconpath_is_initialized = true;
}
COM: <s> setter method for proceduretypeiconpath </s>
|
funcom_train/45622787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDisabledWarningsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CscType_disabledWarnings_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CscType_disabledWarnings_feature", "_UI_CscType_type"),
MSBPackage.eINSTANCE.getCscType_DisabledWarnings(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the disabled warnings feature </s>
|
funcom_train/15626007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFilter(@NotNull final String name, @NotNull final Filter<?, ?> filter) {
if (subFilters.containsKey(name)) {
return;
}
subFilters.put(name, filter);
fireEvent(NamedFilterChangeType.ADD, name, filter);
}
COM: <s> adds a sub </s>
|
funcom_train/4539677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePiece(Tile selectedRemoveTile){
if(selectedRemoveTile == null){
return;
}
int i = 0;
for(; i < numberOfQueens; i++){
if(listOfQueens[i].getCurrentTile().equals(selectedRemoveTile)){
listOfQueens[i].undo();
listOfQueens[i] = null;
break;
}
}
for(;i < listOfQueens.length - 1;i++){
listOfQueens[i] = listOfQueens[i + 1];
}
listOfQueens[listOfQueens.length - 1] = null;
numberOfQueens--;
}
COM: <s> this method removes a the queen from a selected tile </s>
|
funcom_train/1068980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Command getCommand() {
List editparts = getSelectedObjects();
CompoundCommand cc = new CompoundCommand();
Debug.debug(this,"Action::getCommand()"+editparts.size(), channel);
for (int i=0; i < editparts.size(); i++) {
EditPart part = (EditPart) editparts.get(i);
cc.add(part.getCommand(request));
}
displayCompoundCommand(cc);
return cc;
}
COM: <s> returns the command that will open the selected diagrams </s>
|
funcom_train/34141614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayAndSpeak(String dispStr, String speakStr) {
if (dispStr == null || speakStr == null) {
return;
}
mainText.setText(dispStr);
if (ttsLoaded) {
Log.d("Locator", "Speaking: " + speakStr);
tts.speak(speakStr, 0, null);
}
}
COM: <s> displays the specified string on the screen and speaks it </s>
|
funcom_train/4761135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int signum() {
// if ( number == null ) { // no synchronization required
// GenPolynomial<C> p = number.val;
// number = ring.realRing.parse(p.toString()); // todo: convert
// //System.out.println("number = " + number);
// }
return number.signum();
}
COM: <s> real algebraic number signum </s>
|
funcom_train/25978886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private GraphInterface assemble(DotToken dt) throws BuilderException {
if (dt instanceof GraphStructure) {
GraphStructure gs = (GraphStructure) dt;
if (this.gb != null) {
return this.gb.build(gs);
} else {
throw new BuilderException("builder null pointer");
}
} else {
throw new BuilderException(
"Item parsed was not a graph, how very strange, someone may have been messing");
}
}
COM: <s> assembles the graph using the graph builder from the graphstrcuture </s>
|
funcom_train/21503626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addManyPortsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InoutputDefinition_manyPorts_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InoutputDefinition_manyPorts_feature", "_UI_InoutputDefinition_type"),
DMLPackage.Literals.INOUTPUT_DEFINITION__MANY_PORTS,
false,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the many ports feature </s>
|
funcom_train/28657728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setPreferredSize(new java.awt.Dimension(75,25));
jButton.setText("OK");
jButton.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
closeDialog();
}
});
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/803812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void convertHighOrderBondsToSpareValencies() throws StructureBuildingException {
for(Bond b : bondList) {
if(b.getOrder() > 1) {
int orderExtra = b.getOrder() - 1;
b.setOrder(1);
getAtomByIDOrThrow(b.getFrom()).addSpareValency(orderExtra);
getAtomByIDOrThrow(b.getTo()).addSpareValency(orderExtra);
}
}
pickUpIndicatedHydrogen();
}
COM: <s> looks for double and higher bonds converts them to single bonds </s>
|
funcom_train/4867720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RemotePlayer getPlayerFromPhysicsObject(PhysicsObject physObj) {
Entity entity = (Entity)physObj.getUserData();
// no data attached
if ( entity == null ) return null;
Components comps = entity.getComponents();
if ( comps.hasComponent(PlayerComponent.class)) {
PlayerComponent pc = comps.getComponent(PlayerComponent.class);
return (RemotePlayer)pc.getPlayer();
}
return null; /* not found */
}
COM: <s> get the player from the physics object </s>
|
funcom_train/12841556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TagProjectionAnnotation getExistingAnnotation(Node node) {
TagProjectionAnnotation anno = null;
if ((node != null) && (!fTagAnnotations.isEmpty())) {
Iterator it = fTagAnnotations.keySet().iterator();
while (it.hasNext() && (anno == null)) {
TagProjectionAnnotation a = (TagProjectionAnnotation) it.next();
Node n = a.getNode();
if (node.equals(n)) {
anno = a;
}
}
}
return anno;
}
COM: <s> find tag projection annotation for node in the current list of projection </s>
|
funcom_train/43579110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeEventListener(String eventName, EventListener eventListener){
if(listeners==null){
return false;
}
List<EventListener> evtList = listeners.get(eventName);
if(evtList == null || !evtList.contains(eventListener)){
return false;
}
evtList.remove(eventListener);
if(evtList.isEmpty()){//unregister this event name from this ZK Widget.
nativeUnlisten(eventName);
}
return true;
}
COM: <s> to unregister an event listener </s>
|
funcom_train/8409564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StrBuilder append(StringBuffer str) {
if (str == null) {
return appendNull();
}
int strLen = str.length();
if (strLen > 0) {
int len = length();
ensureCapacity(len + strLen);
str.getChars(0, strLen, buffer, len);
size += strLen;
}
return this;
}
COM: <s> appends a string buffer to this string builder </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.