__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/22578259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testColon() {
try {
Map<String, Double> tagCloud = new TreeMap<String, Double>();
tagCloud.put("This string has a : in it", 0d);
new TagCloudException(null, null, tagCloud);
fail("Should have thrown an exception by now");
} catch (IllegalArgumentException ex) {
assertTrue(true);
}
}
COM: <s> make sure tag cant contain a colon </s>
|
funcom_train/11652816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void executeAndShowRegexpTester(String textToParse) {
if (textToParse != null && textToParse.length() > 0
&& this.regexpField.getText().length() > 0) {
this.regexpResultField.setText(process(textToParse));
this.regexpResultField.setCaretPosition(0); // go to first line
}
}
COM: <s> launch regexp engine to parse a input text </s>
|
funcom_train/32753873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write( final DataAdaptor adaptor ) {
final Orbit latestOrbit = getOrbit();
if ( latestOrbit != null ) {
final SimpleDateFormat dateFormat = new SimpleDateFormat( "MM/dd/yyyy HH:mm:ss" );
final String snapshotLabel = getLabel() + " (" + dateFormat.format( latestOrbit.getTimeStamp() ) + ")";
final SnapshotOrbitSource snapshot = new SnapshotOrbitSource( snapshotLabel, latestOrbit );
snapshot.write( adaptor );
}
}
COM: <s> write the live orbit source as a snapshot orbit </s>
|
funcom_train/11111556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void consumeErrorStream() throws IOException {
int n;
while ((n = error.available()) > 0) {
byte[] b = new byte[n];
n = error.read(b);
if (n > 0) {
System.err.write(b, 0, n);
}
}
}
COM: <s> consumes all pending bytes from the standard error stream of the </s>
|
funcom_train/1531618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public boolean includesDivisionBy(ExpressionValue val) {
if (operation == DIVIDE) {
if (right.contains(val))
return true;
if (left.isExpressionNode()
&& ((ExpressionNode) left).includesDivisionBy(val))
return true;
} else {
if (left.isExpressionNode()
&& ((ExpressionNode) left).includesDivisionBy(val))
return true;
if (right != null && right.isExpressionNode()
&& ((ExpressionNode) right).includesDivisionBy(val))
return true;
}
return false;
}
COM: <s> returns true if this tree includes a division by val </s>
|
funcom_train/1676677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeDataObject() {
int i = dataIndex;
DatabaseEntry keyEntry = new DatabaseEntry(keys[i]);
DatabaseEntry priKeyEntry = (keys != priKeys)
? (new DatabaseEntry(priKeys[i]))
: keyEntry;
DatabaseEntry valuesEntry = new DatabaseEntry(values[i]);
dataObject = coll.makeIteratorData(this, keyEntry, priKeyEntry,
valuesEntry);
}
COM: <s> sets data object to the iterator data for the element at data index </s>
|
funcom_train/2949530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(MemoryValueEvent mve) {
//convert the reported bytevalues to megabytes and then to Strings
jvmValue.text=MemoryMonitor.byteToMegaByteString(mve.getJVMMemory());
totalValue.text=MemoryMonitor.byteToMegaByteString(mve.getTotalMemory());
usedValue.text=MemoryMonitor.byteToMegaByteString(mve.getUsedMemory());
freeValue.text=MemoryMonitor.byteToMegaByteString(mve.getFreeMemory());
repaint();
}
COM: <s> implementation of the memory value listener interface </s>
|
funcom_train/17624574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showAboutBox() {
JOptionPane.showMessageDialog(this, settings.getString("MESSAGE_GAME_ABOUT"),
settings.getString("TITLE_GAME_ABOUT"), JOptionPane.INFORMATION_MESSAGE,
new ImageIcon(this.getClass().getClassLoader().getResource("images/icon.png")));
}
COM: <s> method shows about box </s>
|
funcom_train/22495815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int sphereTest(Vector3f pos, float radius) {
float d;
float r = -radius;
int hits = 0;
for (int i = 0; i < 6; i++) {
d = plane[i].evaluatePoint(pos);
if (d < r) {
// Sphere is outside the frustum
return iOutside;
} else if (d >= radius) {
// Sphere intersects at least one frustum plane
hits++;
}
}
if (hits == 6) {
// Sphere is fully inside the frustum
return iInside;
} else {
// Sphere intersects the frustum
return iIntersect;
}
}
COM: <s> tests if sphere is either inside outside or intersecting the frustum </s>
|
funcom_train/21106192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MJButton getBtBS_SetBKDT() {
if (btBS_SetBKDT == null) {
btBS_SetBKDT = new MJButton();
btBS_SetBKDT.setText("Set");
btBS_SetBKDT.setPreferredSize(new java.awt.Dimension(75, 20));
}
return btBS_SetBKDT;
}
COM: <s> this method initializes bt bs set bkdt </s>
|
funcom_train/42110242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean canJump(float[] diffs, float extraDist) {
// Vertical limit
float vertLimit = (extraDist != 0) ? cellSize * 1.5f : 0;
if (diffs[1] <= MAX_JUMP_HEIGHT - vertLimit) {
// Horizontal limit
float canJumpDist = diffs[0] + diffs[1] + extraDist;
if (canJumpDist < MAX_JUMP_DIST_RUNNING)
return true;
}
return false;
}
COM: <s> a basic method which checks if a thing can be jumped onto over </s>
|
funcom_train/8715921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMode(int m) {
int mode = 0;
if ((m & 0x1) == 0) {
mode |= PDFShapeCmd.FILL;
}
if ((m & 0x4) != 0) {
mode |= PDFShapeCmd.CLIP;
}
if (((m & 0x1) ^ ((m & 0x2) >> 1)) != 0) {
mode |= PDFShapeCmd.STROKE;
}
this.tm= mode;
}
COM: <s> set the mode of the text </s>
|
funcom_train/8358834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean printPrintable(Printable printable) {
PrinterJob job = PrinterJob.getPrinterJob();
job.setPrintable(printable);
boolean showPrintDialog = Config.getBoolean(Config.SHOW_PRINT_DIALOG);
boolean doPrint = true;
if (showPrintDialog) {
doPrint = job.printDialog();
}
if (doPrint) {
try {
job.print();
return true;
} catch (PrinterException e) {
log.error("Failed to print.", e);
}
}
return false;
}
COM: <s> printing printable object with showing print dialog </s>
|
funcom_train/23168691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildInstructionBytes() {
if (theCode != null) {
/* Make sure instructions have correct offsets */
int size = resolveOffsets();
theCodeBytes = new byte[size];
Insn insn = theCode;
int index = 0;
while (insn != null) {
index = insn.store(theCodeBytes, index);
insn = insn.next();
}
}
}
COM: <s> derive the instruction byte codes from the instruction list </s>
|
funcom_train/35723296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generate() {
SimpleDateFormat df = new SimpleDateFormat(dateFormat);
Calendar today = Calendar.getInstance();
//Apply offsets
for(Map.Entry<Integer, Integer> offset : offsets.entrySet()) {
today.add(offset.getKey(), offset.getValue());
}
return df.format(today.getTime());
}
COM: <s> read out date </s>
|
funcom_train/36858613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToQueue(final EventObject e) {
// System.out.println(("addToQueue - " + EventManager.queue.size());
synchronized (queue) {
boolean added = false;
for (int off = 0; off < queue.size(); off++) {
if (!queue.containsKey(off)) {
queue.put(off, e);
added = true;
break;
}
}
if (!added) {
queue.put(queue.size(), e);
}
queue.notifyAll();
}
}
COM: <s> adds the event to the queue for the event manager to process </s>
|
funcom_train/48869806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Product create() {
String id = GUID.generate();
Product p = new ConceptualRental(id);
Cache.getInstance().put(id, p);
System.out.println("The Product id in the ConceptualRental create method is: " + p.getId());
return p;
}
COM: <s> creates a conceptual rental object based on the transaction it is associated with </s>
|
funcom_train/30009219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetNoOfTopics() {
System.out.println("getNoOfTopics");
CategoryList instance = new CategoryList();
int expResult = 0;
int result = instance.getNoOfTopics();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get no of topics method of class papyrus </s>
|
funcom_train/16818451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isAlive(Stub stb) {
try {
ChannelVerifier cv = (ChannelVerifier)OrbAccessor.getServiceHandler(RmeServiceHandlerFc.CHANNEL_VERIFIER);
cv.setProtocol(OrbAccessor.getProtocol());
Connector c = OrbAccessor.getConnector();
MultiReference mr = stb.getRemoteReferences();
Epid epid = mr.nextReference().getEpid();
c.connect(cv, epid);
return cv.isOpen();
} catch (NetworkException e) {
return false;
}
}
COM: <s> verifies if the remote object referenced by stb is receiving calls </s>
|
funcom_train/51591518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireCloseTabEvent(MouseEvent e, int overTabIndex)
{ /* update context */
this.overTabIndex = overTabIndex;
/* and tell others the new */
Iterator it = this.closePageListeners.iterator();
while(it.hasNext())
{ ((CloseListener)it.next()).closeOperation(e, overTabIndex); }
}
COM: <s> sends a code mouse event code whose source is this tabbedpane to </s>
|
funcom_train/40874485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getSelectedFile() {
TreePath treePath = getSelectionPath();
if (treePath == null)
return null;
DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();
BaseNode fileTreeNode = (BaseNode)treeNode.getUserObject();
return fileTreeNode.file;
}
COM: <s> returns the selected file in the tree </s>
|
funcom_train/29871319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int request(int bytes) {
long currentTime = System.currentTimeMillis();
if (startTime == 0) {
startTime = currentTime;
return Math.min(bytes, maxRate);
} else {
while (true) {
long maxTransferred = maxRate*(currentTime - startTime)/1000L;
if (transferred < maxTransferred) {
return Math.min(bytes, (int)Math.max(maxRate, maxTransferred-transferred));
} else {
try {
Thread.sleep(100);
}
catch (InterruptedException ex) {
// Do nothing
}
currentTime = System.currentTimeMillis();
}
}
}
}
COM: <s> request transfer of a given number of bytes </s>
|
funcom_train/11703826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private UimaTimer getTimer() throws Exception {
String uimaTimerClass = cpeFactory.getCPEConfig().getCpeTimer().get();
if (uimaTimerClass != null) {
new TimerFactory(uimaTimerClass);
return TimerFactory.getTimer();
}
// If not timer defined return default timer based on System.currentTimeMillis()
return new JavaTimer();
}
COM: <s> return timer to measure performace of the cpm </s>
|
funcom_train/33942990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransactionFilter(int filter) {
// Set the label with the filter string
filterLabel.setText("Dieser Vorgang");
filterLabel.pack(true);
// Reset category and contact filter, set transaction filter
contentProvider.setTransactionFilter(filter);
contentProvider.setContactFilter(-1);
contentProvider.setCategoryFilter("");
// Reset the addNew action.
if (addNewAction != null) {
addNewAction.setCategory("");
}
this.refresh();
}
COM: <s> set the transaction filter </s>
|
funcom_train/7343420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setObject(Object object, String name, Object value) {
if (object instanceof Map) {
MAP_PROBE.setObject(object, name, value);
} else if (object instanceof org.w3c.dom.Document) {
DOM_PROBE.setObject(object, name, value);
} else {
BEAN_PROBE.setObject(object, name, value);
}
}
COM: <s> sets an object in a map or bean </s>
|
funcom_train/43327977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double calcMaxX() {
if (graphs==null) return 0.0;
double rv;
Graphable2D gr;
gr = (Graphable2D)graphs.elementAt(0);
rv = gr.maxX();
for (int i=1; i<graphs.size(); i++) {
gr = (Graphable2D)graphs.elementAt(i);
double m = gr.maxX();
if (m > rv) rv = m;
}
return rv;
}
COM: <s> returns the maximum x value from all the graphs </s>
|
funcom_train/42646538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showPrintSetupDialog() {
PrintHelper printHelper = viewModel.getPrintHelper();
// create a new pring helper for this document instance.
printHelper = new PrintHelper(documentViewController, getPageTree());
viewModel.setPrintHelper(printHelper);
viewModel.getPrintHelper().showPrintSetupDialog();
}
COM: <s> show a print setup dialog to alter the viewer models page format </s>
|
funcom_train/14623158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addClassesFromFile(final String fileName) throws IOException, ClassParseException {
final File indexFile = new File(fileName);
BufferedReader indexReader = null;
try {
indexReader = new BufferedReader(new FileReader(indexFile));
for (String line; (line = indexReader.readLine()) != null;) {
addClass(new File(line));
}
} finally {
IOUtils.closeQuietly(indexReader);
}
}
COM: <s> add all the classes from the provided file </s>
|
funcom_train/8492324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector3f min() {
float minX, minY, minZ;
Vector3f v;
minX = (v = getMesh(0).min()).x;
minY = v.y;
minZ = v.z;
for (int i = 1; i < objects.size(); i++) {
if (minX > (v = getMesh(i).min()).x)
minX = v.x;
if (minY > v.y)
minY = v.y;
if (minZ > v.z)
minZ = v.z;
}
return new Vector3f(minX, minY, minZ);
}
COM: <s> returns the min x y z </s>
|
funcom_train/18569447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getTab3Panel() {
if (tab3Panel == null) {
tab3Panel = new JPanel();
tab3Panel.setLayout(new BorderLayout());
tab3Panel.add(getHeading3Panel(), java.awt.BorderLayout.NORTH);
tab3Panel.add(getDetail3Panel(), java.awt.BorderLayout.WEST);
}
return tab3Panel;
}
COM: <s> this method initializes tab3 panel </s>
|
funcom_train/23012123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addAttribute(XmlElement element,String attr,String value){
if((element!=null)&&
(!Strings.isNullOrBlank(attr))&&
(!Strings.isNullOrBlank(value)))
{
element.addAttribute(attr,value);
}
}
COM: <s> adds specified attribute to the xml element if the specified parameters </s>
|
funcom_train/41281529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHttpExtDecl(HttpExtList exts) {
setNamespaces(exts);
switch (exts.getManOptFlag())
{
case HttpExtList.MAN:
setHeaderValue(H_MAN_EXT, exts);
break;
case HttpExtList.CMAN:
setHeaderValue(H_CMAN_EXT, exts);
break;
case HttpExtList.OPT:
setHeaderValue(H_OPT_EXT, exts);
break;
case HttpExtList.COPT:
setHeaderValue(H_COPT_EXT, exts);
break;
default:
setHeaderValue(H_MAN_EXT, exts);
}
}
COM: <s> set the extension declaration </s>
|
funcom_train/28116565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
_start = System.currentTimeMillis();
runProtected();
} catch (Exception exception) {
_log.debug("ThreadAction caught exception", exception);
setException(exception);
} finally {
_end = System.currentTimeMillis();
}
_completedLock.release();
if (_listener != null) {
_listener.completed();
}
}
COM: <s> run the action </s>
|
funcom_train/18242585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void rebuildMap() throws SeqdataException {
double mag = this.displayerPrefs.getOverviewHorizontalMagnification();
int width = this.characterMetrics.width;
IBaseAssembly assembly = this.assemblyCoordinator.getAssembly();
this.mapInit(assembly.getCoverageMap());
this.mapTransform(mag, width);
}
COM: <s> describe code rebuild map code method here </s>
|
funcom_train/44138143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void clearSelection() {
Iterator it = m_selectedComponents.iterator();
while(it.hasNext()) {
OSMElementComponent c = (OSMElementComponent)it.next();
c.unselect();
}
m_selectedComponents.clear();
this.m_lastSelectedComponent = null;
}
COM: <s> to unselected all component on the panel </s>
|
funcom_train/9912031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Path getParent() {
try {
switch (keys.size()) {
case 0:
return null;
case 1:
return new Path(keys.subList(0, 0));
default:
return new Path(keys.subList(0, keys.size() - 1));
}
} catch (TreeException e) {
logger.error("Impossible exception", e);
}
return null;
}
COM: <s> returns the parent of this node path </s>
|
funcom_train/37637608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBorder(int row, int column, Border border){
borders.setElementAt(row, column, border);
// Set adjancent cells
AttributeModelEvent e = new AttributeModelEvent(this, AttributeModelEvent.CELLS_UPDATED, row, column, 1, 1);
fireDataChanged(e);
}
COM: <s> set the border for cell row column </s>
|
funcom_train/2628486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddValueByName() {
System.out.println("addValueByName");
String sTitle = "";
String sName = "";
String sValue = "";
GUITypeWrapper instance = null;
instance.addValueByName(sTitle, sName, sValue);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of add value by name method of class guitype wrapper </s>
|
funcom_train/7482738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onCommit(List commits) {
// Note that commits.size() should normally be 2 (if not
// called by onInit above):
int size = commits.size();
for(int i=0;i<size-1;i++) {
((IndexCommitPoint) commits.get(i)).delete();
}
}
COM: <s> deletes all commits except the most recent one </s>
|
funcom_train/31801713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnderFlow() {
throw new UnsupportedOperationException("Not yet converted");
/* // this threw an StackUnderflowException
StackFactory sf = new StackFactory(getMethod("getIntArray"));
sf.calculateMethodStacks();
// Stupid fix for eclipase warning:
inBuf = new byte[3];
getIntArray();*/
}
COM: <s> tests for a stack underflow </s>
|
funcom_train/3156812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransparency(float transparency) {
if (transparency < 0.0F || transparency > 1.0F) {
throw new IllegalArgumentException("transparency must be >= 0 and <= 1");
}
if (_transparency != transparency) {
_transparency = transparency;
fireProductNodeChanged(PROPERTY_NAME_TRANSPARENCY);
setModified(true);
}
}
COM: <s> sets the transparency value </s>
|
funcom_train/28170558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Writer out) throws IOException {
if (doctype != null) {
out.write("<!DOCTYPE ");
out.write(doctype);
out.write(">\n");
}
XMLWriter writer = new XMLWriter(out);
writer.write((XMLElement) document.getChildren().get(0));
}
COM: <s> writes the contents of the domoutput into the specified writer </s>
|
funcom_train/2587460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configureReader(final XMLReader reader, final FrontendDefaultHandler handler) {
try {
reader.setProperty
("http://xml.org/sax/properties/lexical-handler", handler.getCommentHandler());
}
catch (SAXException se) {
Log.debug("Comments are not supported by this SAX implementation.");
}
}
COM: <s> configures the xml reader </s>
|
funcom_train/19407926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SetValue union(SetValue v) {
if (!v.elemType().isSubtypeOf(elemType()))
throw new IllegalArgumentException("type mismatch");
if (v.isEmpty())
return this;
SetValue res = new SetValue(elemType());
// add elements of this set to result
Iterator it = fElements.iterator();
while (it.hasNext()) {
res.fElements.add(it.next());
}
// add elements of v set to result
it = v.iterator();
while (it.hasNext()) {
res.fElements.add(it.next());
}
return res;
}
COM: <s> returns a new set which is the union of this and v </s>
|
funcom_train/13914091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMethod() {
System.out.println("getMethod");
ProxymaFacade proxyma = new ProxymaFacade();
ProxymaContext context = proxyma.getContextByName("default");
ProxymaServletRequest instance = new ProxymaServletRequest(request, context);
String expResult = request.getMethod();
String result = instance.getMethod();
assertEquals(expResult, result);
}
COM: <s> test of get method method of class proxyma servlet request </s>
|
funcom_train/42536070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o){
if(!(o instanceof HeadReq))return false;
if(o == this)return true;
HeadReq oo = (HeadReq)o;
return (((Object)url).equals(oo.url))&&(((Object)ver).equals(oo.ver));
}
COM: <s> is the given object equal to this head req </s>
|
funcom_train/18187438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getGaussianSmooth() {
if (gaussianSmooth == null) {
gaussianSmooth = new JMenuItem("Gaussian Smoothing");
gaussianSmooth.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
optionsPanel.removeAll();
ImageTransformation t = new GaussianSmoothTransformation();
optionsPanel.add(new TransformationEditor(t,img));
optionsPanel.updateUI();
jSplitPane.updateUI();
}
});
}
return gaussianSmooth;
}
COM: <s> this method initializes gaussian smooth </s>
|
funcom_train/23764496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setReParam(IShapeNode mapObject, IPlainTextAnnotationProperty prop, MetabolicReaction re) {
IValidationRuleDefinition rd = loader.getRuleById(MetabolicRuleStore.RE_PARAM_ERROR_ID);
IParserRule r = rules.get(rd);
r.setRefObject(mapObject);
if (r.validate(reportBuilder)) {
re.setParameters(prop.getValue());
}
}
COM: <s> check validity of parameter string in the process node </s>
|
funcom_train/44778732 | /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();
for (int i=0, n=size(); i<n; i++) {
buffer.append(myList.get(i));
buffer.append("\n");
}
return buffer.toString();
}
COM: <s> returns string representation of this group </s>
|
funcom_train/20625530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAttributeAndChangeType(Object oldAttribute, Object newAttribute) {
//Add a new attribute
if (oldAttribute == null){
if (newAttribute != null) {
changeType = NEW;
}
}
else {
//Update an attribute
if (newAttribute != null){
changeType = MODIFY;
}
//Delete an attribute
else {
changeType = DELETE;
}
}
this.oldAttribute = oldAttribute;
this.newAttribute = newAttribute;
}
COM: <s> initializes the change type based on the value passed </s>
|
funcom_train/33606153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean crossed(Edge a,Edge b){
int va=a.getSource();
int va2=a.getSink();
int vb=b.getSource();
int vb2=b.getSink();
return (va-vb)*(va2-vb)*(va-vb2)*(va2-vb2)<0;
}
COM: <s> as above but with edges </s>
|
funcom_train/4780371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String cloneGroup(Document document, String groupName, String cloneName) throws AppException, AppException {
if (groupName == null) {
throw new AppException("application.error.grouprequired");
}
if (cloneName == null) {
throw new AppException("application.error.clonerequired");
}
Group group = document.findGroup(groupName);
if (group == null) {
throw new AppException("application.error.unabletofindgroup", groupName);
}
document.cloneGroup(group, cloneName);
return new FileGenerator(document).generate(true);
}
COM: <s> clone existing group </s>
|
funcom_train/34030359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeColumnBreak(int column) {
CTBreak[] brkArray = getSheetTypeColumnBreaks().getBrkArray();
for (int i = 0 ; i < brkArray.length ; i++) {
if (brkArray[i].getId() == column) {
getSheetTypeColumnBreaks().removeBrk(i);
}
}
}
COM: <s> removes a page break at the indicated column </s>
|
funcom_train/15884730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JMenu getOptionMenu() {
if (optionMenu == null) {
optionMenu = new JMenu();
optionMenu.setText("Options");
optionMenu.setMnemonic(KeyEvent.VK_O);
optionMenu.add(getLookAndFeelMenu());
}
return optionMenu;
}
COM: <s> this method initializes option menu </s>
|
funcom_train/39965657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSchemaRootDir(String path) {
File dir = new File(path);
if (dir.exists() && dir.isDirectory() && dir.canRead()) {
schemaRootDir = dir;
updateSchemas();
} else {
throw new IllegalArgumentException("Invalid schema root directory: " + path);
}
}
COM: <s> sets the schema root directory </s>
|
funcom_train/3890735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleSelectionChanged(ISelection selection) {
EObject component = (EObject)((IStructuredSelection)selection).getFirstElement();
_actionDelete.setEnabled(component != null &&
component != _parentComponent &&
RemoveCommand.create(editor.getEditingDomain(), selection).canExecute());
}
COM: <s> tree selection handler </s>
|
funcom_train/8525631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addHttpService(String name, HttpService httpService) {
Object oldService = serviceMap.put(name, httpService);
if (oldService != null && LOG.isWarnEnabled()) {
LOG.warn("Duplicate mapping for '" + name
+ "'. Previous mapping removed");
}
LOG.debug("New HttpService registered against key '{}'",name);
}
COM: <s> adds an code http service code against a service name </s>
|
funcom_train/802619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(MzdataPackage.Literals.DESCRIPTION_TYPE1__ADMIN,
MzdataFactory.eINSTANCE.createAdminType()));
newChildDescriptors.add
(createChildParameter
(MzdataPackage.Literals.DESCRIPTION_TYPE1__INSTRUMENT,
MzdataFactory.eINSTANCE.createInstrumentDescriptionType()));
newChildDescriptors.add
(createChildParameter
(MzdataPackage.Literals.DESCRIPTION_TYPE1__DATA_PROCESSING,
MzdataFactory.eINSTANCE.createDataProcessingType()));
}
COM: <s> this adds to the collection of </s>
|
funcom_train/19748257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearDeleteUpdateFields() {
setObjectsIds(null);
setNewUri(null);
setContentLocaleId(null);
setCharset(null);
setWidth(null);
setHeight(null);
setPublicationDate(null);
setExpirationDate(null);
setUpdateAction(null);
setDeleteAction(null);
setPath(null);
setNewPath(null);
}
COM: <s> sets fields which are needed only for deletion or updating to null </s>
|
funcom_train/31487172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean resetTooltip() {
// both null, or same
if(((lastTooltip==null && defaultTooltip == null) || (defaultTooltip != null && defaultTooltip.equals(lastTooltip))))
return true;
firePropertyChange(JComponent.TOOL_TIP_TEXT_KEY, null, defaultTooltip);
lastTooltip = defaultTooltip;
return true;
}
COM: <s> put the tooltip back to its original short description per constructor </s>
|
funcom_train/8656141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LSSerializer createLSSerializer() {
try {
Class serializerClass = ObjectFactory.findProviderClass(
"org.apache.xml.serializer.dom3.LSSerializerImpl",
ObjectFactory.findClassLoader(), true);
return (LSSerializer) serializerClass.newInstance();
}
catch (Exception e) {}
// Fall back to Xerces' deprecated serializer if
// the Xalan based serializer is unavailable.
return new DOMSerializerImpl();
}
COM: <s> dom level 3 ls cr experimental </s>
|
funcom_train/173223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setButtonSize(Button button, GridData buttonData) {
buttonData.heightHint =
convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
int widthHint =
convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
buttonData.widthHint =
Math.max(
widthHint,
button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
button.setLayoutData(buttonData);
}
COM: <s> set the layout data of the button to a grid data with </s>
|
funcom_train/1560389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInitialCellSelection(int row, int column) {
setSelectionType(CELL_SELECT);
if (column == -1) column = 0;
if (row == -1) row = 0;
minSelectionColumn = column;
maxSelectionColumn = column;
minSelectionRow = row;
maxSelectionRow = row;
getColumnModel().getSelectionModel().setSelectionInterval(column, column);
getSelectionModel().setSelectionInterval(row, row);
}
COM: <s> sets the initial selection parameters to a single cell </s>
|
funcom_train/25623598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUp() {
configureProject("src/etc/testcases/taskdefs/java.xml");
//final String propname="tests-classpath.value";
//String testClasspath=System.getProperty(propname);
//System.out.println("Test cp="+testClasspath);
String propname="tests-classpath.value";
String runFatal=System.getProperty("junit.run.fatal.tests");
if(runFatal!=null)
runFatalTests=true;
}
COM: <s> configure the project </s>
|
funcom_train/44870340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMDisplayCanvasBean getWCMDisplayCanvasBean() {
if (WCMDisplayCanvasBean == null) {
WCMDisplayCanvasBean = new WCMDisplayCanvasBean();
WCMDisplayCanvasBean.setHandleMouseZooms(true);
WCMDisplayCanvasBean.add(getGridBean(), null);
WCMDisplayCanvasBean.add(getWcmAxes(), null);
WCMDisplayCanvasBean.add(getWCMPannerBean(), null);
WCMDisplayCanvasBean.add(getDrawBorder(), null);
}
return WCMDisplayCanvasBean;
}
COM: <s> this method initializes wcmdisplay canvas bean </s>
|
funcom_train/50396744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkDependencies(Activity a, Activity excludedDep){
//do not check if type is MERGE
if(MergeType.MERGE.equals(a.getMergeType()))return true;
List<Transition>tr=findIncomingTransitions(a);
for(Transition t: tr){
Activity from=getActivity(t.from);
if(excludedDep!=null && from.id.equals(excludedDep.id))continue;
ActivityStatus dep=from.status;
if(ActivityStatus.SUCCESS!=dep)return false;
}
return true;
}
COM: <s> check that all activities that have a transition to the given activity </s>
|
funcom_train/25313610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean searchMiddle() {
long begin = System.currentTimeMillis();
search = new DepthFirstSearch();
SelectChoicePoint select = new SimpleSelect(vars.toArray(new Var[1]),
null, new IndomainMiddle());
boolean result = search.labeling(store, select);
long end = System.currentTimeMillis();
System.out.println("Number of milliseconds " + (end - begin));
return result;
}
COM: <s> it searches using an input order search with indomain based on middle value </s>
|
funcom_train/34029576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSheetName(int sheet, String name) {
validateSheetIndex(sheet);
validateSheetName(name);
if (containsSheet(name, sheet ))
throw new IllegalArgumentException( "The workbook already contains a sheet of this name" );
workbook.getSheets().getSheetArray(sheet).setName(name);
}
COM: <s> set the sheet name </s>
|
funcom_train/7476637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopAnimation(final boolean jumpToTarget) {
final AbstractAnimationRunner currentAnimationRunner = this.mCurrentAnimationRunner;
if (currentAnimationRunner != null && !currentAnimationRunner.isDone()) {
currentAnimationRunner.interrupt();
if (jumpToTarget) {
setCenter(new GeoPoint(currentAnimationRunner.mTargetLatitudeE6,
currentAnimationRunner.mTargetLongitudeE6));
}
}
}
COM: <s> stops a running animation </s>
|
funcom_train/8469994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getScore(int[] contingencyTable, SignificanceTest test) {
switch (test) {
case PMI:
return pmi(contingencyTable);
case CHI_SQUARED:
return chiSq(contingencyTable);
case LOG_LIKELIHOOD:
return logLikelihood(contingencyTable);
default:
throw new Error(test + " not implemented yet");
}
}
COM: <s> returns the score of the contingency table using the specified </s>
|
funcom_train/49469214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newTitleCell(String title, int width) {
// Create a cell and put a int value in it.
// as a date.
HSSFCell cell = createCell();
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
// we style the cell as center.
HSSFCellStyle style = getTitleCellStyle();
cell.setCellStyle(style);
cell.setCellValue(title);
sheet.setColumnWidth((short)(cellcount), (short)(width*256));
}
COM: <s> create a new title cell with the specified width </s>
|
funcom_train/44156650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws MojoExecutionException, MojoFailureException {
System.setProperty(CoberturaRuntimeControllerImpl.COBERTURA_RUNTIME_DATA_DIRECTORY,
coberturaDataDirectory.getAbsolutePath());
System.setProperty(CoberturaRuntimeControllerImpl.COBERTURA_RUNTIME_DATA_FILENAME,
coberturaDataFilename);
System.setProperty(CoberturaRuntimeControllerImpl.COBERTURA_RUNTIME_SRC_COL_DIR_NAME,
sourceCollectorDirectoryName);
System.setProperty(CoberturaRuntimeControllerImpl.COBERTURA_RUNTIME_KEEP_REPORTS,
keepReports);
CoberturaRuntimeControllerImpl impl = new CoberturaRuntimeControllerImpl(true);
String reportDirectory = impl.generateReport();
getLog().info("Report generated in directory '" + reportDirectory + "'.");
}
COM: <s> executes the plugin </s>
|
funcom_train/46293826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SnapshotInfo loadMaxSnapshotInfo() throws Exception {
List<InfoHeader> infos = getLastInfos(5);
if (infos.size() == 0) return null;
String xml = loadData(infos.get(0));
Element element = XMLUtil.parseElement(xml);
return new SnapshotInfo(element);
}
COM: <s> load the max snapshot info </s>
|
funcom_train/50325699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getSystemName(Element elem) {
if ( elem.getChild("systemName") != null) {
return elem.getChild("systemName").getText();
}
if ( elem.getAttribute("systemName") != null) {
return elem.getAttribute("systemName").getValue();
} return null;
}
COM: <s> get the system name from an element defining a named bean </s>
|
funcom_train/18068115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearSnakeFromGameField(Snake s) {
setGameFieldObject(OBJECT_NULL, s.getHead());
for (ListIterator<GameFieldCoordinate> itr = s.getTail().listIterator(); itr.hasNext();) {
GameFieldCoordinate gfc = itr.next();
setGameFieldObject(OBJECT_NULL, gfc);
}
}
COM: <s> clears the traces of specified snake from the game field </s>
|
funcom_train/46457484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseMoved(MouseEvent e) {
TreePath path = tree.getPathForLocation(e.getX(), e.getY());
if (path == null) return;
if (e.getX() > tree.getPathBounds(path).x + hotspot-3 ||
e.getX() < tree.getPathBounds(path).x + 2)
tree.setCursor(Cursor.getDefaultCursor());
else {
tree.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
}
}
COM: <s> handles mouse moved events </s>
|
funcom_train/47106776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemWeapon24() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Weapon.W_24.getItemName());
menuItem.setEnabled(false);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setPlrReadiedWeapon(Weapon.W_24);
}
});
return menuItem;
}
COM: <s> creates the twenty fifth choice for the weapon menu </s>
|
funcom_train/3156415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Parameter getParameter(String name) {
Guardian.assertNotNull("name", name);
Parameter pRet = null;
Parameter param = null;
for (int n = 0; n < _parameters.size(); n++) {
param = (Parameter) _parameters.elementAt(n);
if (ObjectUtils.equalObjects(param.getName(), name)) {
pRet = param;
break;
}
}
return pRet;
}
COM: <s> retrieves a parameter by name </s>
|
funcom_train/22383881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration cells() {
return new Enumeration() {
ZZCell next = getHomeCell();
ZZCell slice = next; // Homecell of current slice
public boolean hasMoreElements() {
if(next == null)
return false;
return true;
}
public Object nextElement() {
if(next == null)
throw new NoSuchElementException();
ZZCell ret = next;
next = next.s(d.cellcreation, 1);
if(next == null) // End of this slice
slice = next =
slice.s(d.slices, 1);
return ret;
}
};
}
COM: <s> returns enumeration over the cells in this space also in slices </s>
|
funcom_train/6494130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int invokeMethod( Object obj, java.lang.reflect.Method m ) throws InvocationTargetException {
try {
Object o = m.invoke( obj, null );
return ( ( Integer ) o ).intValue();
}
catch ( InvocationTargetException ite ) {
throw ite;
}
catch ( Exception e ) {
return 0;
}
}
COM: <s> invokes the given method </s>
|
funcom_train/22396456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addOutgoingServer() {
OutgoingConfig outgoingConfig = new OutgoingConfig();
OutgoingConfigScreen outgoingConfigScreen = new OutgoingConfigScreen(outgoingConfig);
UiApplication.getUiApplication().pushModalScreen(outgoingConfigScreen);
if(outgoingConfigScreen.acctSaved()) {
mailSettings.addOutgoingConfig(outgoingConfig);
mailSettings.saveSettings();
}
}
COM: <s> adds a new outgoing server </s>
|
funcom_train/35320265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Font deriveFont(float size){
if (values == null) {
return new Font(name, style, size, createdFont, font2DHandle);
}
AttributeValues newValues = getAttributeValues().clone();
newValues.setSize(size);
return new Font(newValues, null, -1, createdFont, font2DHandle);
}
COM: <s> creates a new code font code object by replicating the current </s>
|
funcom_train/7732671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSplittedStrings(String original, String separator, String[] expected) {
String[] actual = parser.split(original, separator);
for (int i = 0; i < expected.length; i++) {
assertEquals("testSplittedStrings", expected[i], actual[i]);
}
}
COM: <s> asserts the splitted string elements are equal to the original </s>
|
funcom_train/12165322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStandardColors() throws Exception {
List list = new ArrayList();
for (int i = 0; i < standardColors.size(); i++) {
list.add(standardColors.get(i));
}
list.add("Aqua");
list.add("Fuchsia");
doTest((ColorValidator) createValidator(NamedColor.getStandardColors()), list, Status.OK);
}
COM: <s> test standard color items </s>
|
funcom_train/35671147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lookForSpace() throws IOException {
lastChar = '\0';
while (lastChar != ' ') {
if (actual >= readed) {
if (available() <= 0) break;
readed = super.read(buffer);
actual = 0;
}
lastChar = (char)buffer[actual++];
}
}
COM: <s> loops to a space </s>
|
funcom_train/51412511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh() {
try {
tFieldWinActionType.setText(MCompiereAspectLogWinAction.getTypeAsString(clogWinActionPKey));
tFieldWinActionType.setToolTipText(tFieldWinActionType.getText());
} catch (CMExceptionTable e) {
tFieldWinActionType.setText("");
tFieldWinActionType.setToolTipText(null);
}
}
COM: <s> refreshes the panel </s>
|
funcom_train/31133223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String QtoString() {
StringBuffer res = new StringBuffer("Begin "+QueueName+" queue:\n");
for(int i=0;i<size(); i++)
{
res.append(((AvnmpState) get(i)).toString()+"\n");
}
return res.append("End "+QueueName+" queue").toString();
}
COM: <s> display the state queue </s>
|
funcom_train/21154194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
HashSet <String>valset = new HashSet<String>();
valset.add("1");
valset.add("Blue");
hashDecomposer = new HashDecomposer(new String[]{"color","wife"}, valset);
actionDispatcher = new ActionDispatcher("TestCaseDispatcher", hashDecomposer);
}
COM: <s> sets up the fixture for example open a network connection </s>
|
funcom_train/13712330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Reader handleComment(Reader toParse) throws Exception{
int iChar;
char cChar;
char prevChar = ' ';
while ((iChar = toParse.read()) != -1){
cChar = (char) iChar;
if (prevChar == '-' && cChar == '>'){
return toParse;
}
prevChar = cChar;
}
throw new RuntimeException("Comment is not correctly closed in Line:"+line);
}
COM: <s> parses the comments of a xml document </s>
|
funcom_train/17624337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveToStream(OutputStream out) throws IOException {
for (int i = 0; i < Layout.FIELD; i++) {
for (int j = 0; j < Layout.FIELD; j++) {
out.write(bricks[i][j].getColor().getIndex());
out.write(bricks[i][j].getOrientation().ordinal());
}
}
}
COM: <s> method stores field state to stream </s>
|
funcom_train/14245051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getAllBehavioralFeatures(MModelElement element) {
Iterator it = element.getModelElementContents().iterator();
List list = new ArrayList();
while (it.hasNext()) {
Object o = it.next();
if (o instanceof MClassifier) {
list.addAll(getAllBehavioralFeatures((MClassifier)o));
} else {
list.addAll(getAllBehavioralFeatures((MModelElement)it.next()));
}
}
return list;
}
COM: <s> returns all behavioralfeatures found in this element and its children </s>
|
funcom_train/7998318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveEnvironmentElement(){
try{
/*Now take the file in RAM and write it out to disk*/
FileOutputStream fos = new FileOutputStream(fileLocation);
OutputFormat of = new OutputFormat("XML","ISO-8859-1",true);
of.setLineWidth(Integer.MAX_VALUE);
XMLSerializer serializer = new XMLSerializer(fos,of);//prepare a serialiser for
//generating XML documents
// As a DOMSerializer
serializer.asDOMSerializer();
serializer.serialize( xmldoc.getDocumentElement() );//get the root element and start writing
fos.close();
}catch(Exception e ){
e.printStackTrace();
}
}
COM: <s> save this element to file do not call ever </s>
|
funcom_train/4692129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getB_todos() {
if (b_todos == null) {
b_todos = new JButton();
b_todos.setText("Todos");
b_todos.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
}
});
}
return b_todos;
}
COM: <s> this method initializes b todos </s>
|
funcom_train/1541055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getGroup(Object groupID) {
Collection result = new LinkedList();
Iterator i = orderedObjects.iterator();
while (i.hasNext()) {
Entry entry = (Entry) i.next();
if (groupID.equals(entry.groupID)) {
result.add(entry.object);
}
}
return result;
}
COM: <s> returns all objects belonging to a particular group </s>
|
funcom_train/42858961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand1() {
if (exitCommand1 == null) {//GEN-END:|32-getter|0|32-preInit
// write pre-init user code here
exitCommand1 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|32-getter|1|32-postInit
// write post-init user code here
}//GEN-BEGIN:|32-getter|2|
return exitCommand1;
}
COM: <s> returns an initiliazed instance of exit command1 component </s>
|
funcom_train/37444254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long getLong(final String key) {
CDebug.checkParameterNotEmpty(key, "key");
Long resource = null;
final String stringResource = getString(key);
if (stringResource != null) {
try {
resource = Long.valueOf(stringResource);
} catch (final NumberFormatException exception) {
LOGGER.warn(createNotALongMessage(key, stringResource));
}
}
return resource;
}
COM: <s> gets a long resource from the list of resource bundles </s>
|
funcom_train/48129566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionForward search(ActionMapping map, ActionForm form, HttpServletRequest req, HttpServletResponse resp) throws Exception {
SearchProjectsForm searchForm = (SearchProjectsForm) form;
req.setAttribute("search", true);
ProjectsListManager projList = new ProjectsListManager(searchForm.getStatus());
projList.setSubject(searchForm.getSubject());
projList.setShortDescription(searchForm.getShortDescription());
req.setAttribute("projects",projList);
return map.findForward("list");
}
COM: <s> for the search with subject project </s>
|
funcom_train/20729507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ValidationSummary validate(Object o) throws ValidationException{
String name = o.getClass().getName();
Collection<TargetClass> c = htc.values();
TargetClass correct = null;
for(TargetClass tc : c){
if(tc.getName().equals(name)){
if(correct == null)
correct = tc;
else
throw new ValidationException("Object " + o + " has " +
"multiple target classes.");
}
}
if(correct != null){
ValidationSummary v = new ValidationSummary();
return validate(o,correct,v);
}
else
throw new ValidationException("No target class for object " + o);
}
COM: <s> method for validating an object </s>
|
funcom_train/8073708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String globalInfo() {
return "ExhaustiveSearch : \n\nPerforms an exhaustive search through "
+"the space of attribute subsets starting from the empty set of "
+"attrubutes. Reports the best subset found. If a start set is "
+"supplied, the algorithm searches backward from the start point "
+"and reports the smallest subset with as good or better evaluation "
+"as the start point.\n";
}
COM: <s> returns a string describing this search method </s>
|
funcom_train/24535802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getJavaInitializationString() {
if( fCursor == null) return ""; //$NON-NLS-1$
String realName = (String)typeToReal.get(new Integer(((Cursor)fCursor).getType()));
return "new java.awt.Cursor(" + "java.awt.Cursor."+ realName + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
COM: <s> this method is intended for use when generating java code to set </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.