__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/21656664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtReporteUsuario() {
if (btReporteUsuario == null) {
btReporteUsuario = new JButton();
btReporteUsuario.setBounds(new Rectangle(500, 185, 130, 30));
btReporteUsuario.setText("Generar Reporte");
btReporteUsuario.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
mostrarReporte();
}
});
}
return btReporteUsuario;
}
COM: <s> this method initializes bt reporte usuario </s>
|
funcom_train/13969498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTicketZipFile (MultiPartEmail mail, Ticket ticket) throws EmailException, IOException {
mail.attach(new ByteArrayDataSource(new SimpleTicketWriter().zipTicketToByteArray(ticket), "application/x-zip"), "ticket.zip", "Zipped Ticket");
}
COM: <s> adds the zipped code ticket code to the mail </s>
|
funcom_train/46787053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBusPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Message_bus_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Message_bus_feature", "_UI_Message_type"),
EZRealtimePackage.Literals.MESSAGE__BUS, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the bus feature </s>
|
funcom_train/4547821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMemoryAreaTotalUsedSize() {
int size = 0;
for (int i=0; i < this.getMemoryAreaCount(); i++)
if (!this.getMemoryArea(i).isInitial())
size += this.getMemoryArea(i).getUsedSize();
return size;
}
COM: <s> returns the total size of all not initial memory areas </s>
|
funcom_train/16736468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void quit() {
SessionHandler.finishSession();
this.currentQuestion = null;
Quiz.currentQuestionNumber = 0;
Quiz.reviewing = false;
Quiz.stopTime = -1;
Quiz.result = -1;
Quiz.startTime = -1;
Quiz.sessionId = -5;
MyApp.setEnd(true);
MyApp.setQuiz(null);
}
COM: <s> quits the current quiz unlike pause it wont save the current session </s>
|
funcom_train/26574288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(LogEntry logEntry) {
Integer y;
y = getCurrentYear();
logEntry.removePropertyChangeListener(this);
if (activities.remove(logEntry)) {
--activitiesCount;
updateCyclist(UPDATE_DELETE, this, logEntry, true);
}
// update map of all log entries
allEntries.remove(currentYear);
allEntries.put(currentYear, activities);
setCurrentYear(y);
}
COM: <s> delete log entry from cyclists list of activities </s>
|
funcom_train/12773995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean passesPred(Collection<InstanceKeyAndState> curP2Set, final Predicate<InstanceKey> ikeyPred) {
return Util.forAll(curP2Set, new Predicate<InstanceKeyAndState>() {
@Override
public boolean test(InstanceKeyAndState t) {
return ikeyPred.test(t.getInstanceKey());
}
});
}
COM: <s> do all instance keys in p2set pass ikey pred </s>
|
funcom_train/39540594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hitHandleDetectionFromProcessMouse(MouseEvent e) {
if (!isHitDetectionFromProcessMouse())
return false;
int col = columnAtPoint(e.getPoint());
boolean hit = ((col >= 0) && expandOrCollapseNode(columnAtPoint(e
.getPoint()), e));
return hit;
}
COM: <s> entry point for hit handle detection called from process mouse </s>
|
funcom_train/28470920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void writeDBSortInfoBlock(int handle, String fileName, byte []bytes) throws SyncException {
DbGenInfo data;
data = new DbGenInfo(fileName, bytes);
verifyResult(SyncWriteDBSortInfoBlock(handle, data),
"Error Writing Database Sort Info Block");
}
COM: <s> instructs the device to write information to </s>
|
funcom_train/14246290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handle(Throwable t) throws Throwable {
if (t.getClass().equals(org.argouml.application.security.ArgoSecurityException.class)) {
// do nothing
// System.err.println ("Uncaught ArgoSecurityException:" + t);
}
else {
// System.err.println ("Uncaught - throwable:" + t);
throw t;
}
}
COM: <s> called from within </s>
|
funcom_train/10927664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getFirstRepositoryId() {
List<RepositoryInfo> repositories = getBinding().getRepositoryService().getRepositoryInfos(null);
assertNotNull(repositories);
assertFalse(repositories.isEmpty());
assertNotNull(repositories.get(0).getId());
return repositories.get(0).getId();
}
COM: <s> returns the id of the first repository </s>
|
funcom_train/44011630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPost_sale() {
System.out.println("post_sale");
TransactionBO tx = null;
UpdateController instance = null;
instance.post_sale(tx);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of post sale method of class edu </s>
|
funcom_train/2272652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prependToHeader(WSSecHeader secHeader) {
Element element = null;
try {
element = (Element) saml.toDOM(document);
} catch (SAMLException ex) {
throw new RuntimeException(ex.toString());
}
WSSecurityUtil.prependChildElement(document, secHeader
.getSecurityHeader(), element, false);
}
COM: <s> prepends the saml assertion to the elements already in the </s>
|
funcom_train/1369954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void findQueryFiles(File directory) {
ArrayList<File> queryFilesFound = new ArrayList<File>();
for (File f : getFileList(directory)) {
String fileName = f.getName();
if (fileName.startsWith("query")) {
// just add the name and not the full path if any
queryFilesFound.add(new File(fileName));
}
}
this.queryFiles = queryFilesFound;
}
COM: <s> finds the query files in a </s>
|
funcom_train/23998582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int checkIncreaseMaxHealth() {
PlayerProfile prof = Storage.get().getActiveProfile();
int maxhealth = prof.getMaxHealth();
int needhoney = 0;
switch ( maxhealth ) {
case 0:
needhoney = 50;
break;
case 1:
needhoney = 100;
break;
case 2:
needhoney = 150;
break;
case 3:
needhoney = 250;
break;
case 4:
needhoney = 350;
break;
default:
needhoney = -1;
}
return needhoney;
}
COM: <s> get amount of needed honey to increase max health attribute </s>
|
funcom_train/17968926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BufferedImage createTransparentImage(final int width, final int height) {
final BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
final int[] data = img.getRGB(0, 0, width, height, null, 0, width);
Arrays.fill(data, 0x00000000);
img.setRGB(0, 0, width, height, data, 0, width);
return img;
}
COM: <s> creates a transparent image </s>
|
funcom_train/39895126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TestCase changeTestCaseState(TestCase testCase, TestCaseState toState) throws InappropriateStateException {
if (!canChangeTestCaseState(testCase, toState)) {throw new InappropriateStateException();}
testCase.setState(toState);
if (!saveTestCaseAtDB(testCase)) {return null; }
return testCase;
}
COM: <s> chenge state of test case and updates test case in data base </s>
|
funcom_train/50576535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectAppMenu(boolean b) {
if (b) {
fileMenu.setSelected(true);
fileMenu.setPopupMenuVisible(true);
} else {
fileMenu.setPopupMenuVisible(false);
fileMenu.setSelected(false);
windowMenu.setPopupMenuVisible(false);
windowMenu.setSelected(false);
}
}
COM: <s> sets whether the application menu is selected or not </s>
|
funcom_train/39539626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireActionPerformed() {
ActionListener[] listeners = getListeners(ActionListener.class);
ActionEvent e = null;
for (ActionListener listener : listeners) {
if (e == null) {
e = new ActionEvent(JXMonthView.this,
ActionEvent.ACTION_PERFORMED,
actionCommand);
}
listener.actionPerformed(e);
}
}
COM: <s> fires an action event to all listeners </s>
|
funcom_train/10298845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(DefaultMutableTreeNode child) {
super.remove(child);
FavoritesItem childItem = (FavoritesItem) ((FavoritesNode) child).getUserObject();
FavoritesItem ParentItem = (FavoritesItem) getUserObject();
if (parent != null)
ParentItem.remove(childItem);
}
COM: <s> removes the child node </s>
|
funcom_train/44137721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void unselectAllComponent() {
Component[] allCompo = this.getComponents();
int nbCompo = allCompo.length;
for(int i = 0;i < nbCompo;i++) {
OSMComponent c = (OSMComponent)allCompo[i];
c.unselect();
}
m_selectedComponents.clear();
this.m_lastSelectedComponent = null;
}
COM: <s> to unselect all component in the panel </s>
|
funcom_train/34247298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getTimeReportingButton() {
if (timeReportingButton == null) {
this.timeReportingButton = ButtonHelper.createButtonNormal(FmsImageManager
.retrieveImageIcon(FmsImageManager.icon_TIME_REPORTING));
this.timeReportingButton.setToolTipText(FmsResourceBundle
.getString(FmsResourceBundleKeys.TIME_REPORTING_cc));
}
return timeReportingButton;
}
COM: <s> returns the get time reporting button </s>
|
funcom_train/25289880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLineAntialiasingEnable(boolean state) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_ANTIALIASING_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("LineAttributes6"));
if (isLive())
((LineAttributesRetained)this.retained).setLineAntialiasingEnable(state);
else
((LineAttributesRetained)this.retained).initLineAntialiasingEnable(state);
}
COM: <s> enables or disables line antialiasing </s>
|
funcom_train/36761502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deposit(accounts.Account acct, double amount) {
try {
java.lang.System.out.println("Deposit Attempt");
stub.deposit(acct, amount);
java.lang.System.out.println("Deposit Made");
updateCustomer(acct.getOwner());
} catch (RemoteException re) {
System.err.println("Network Error: Error Depositing");
re.printStackTrace();
}
}
COM: <s> deposits an amount of money to an account </s>
|
funcom_train/51590286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object addingService(ServiceReference reference) {
Object obj = context.getService(reference);
String[] objClassName = (String[]) reference.getProperty(Constants.OBJECTCLASS);
Object retval = null;
if (!servicesMap.containsKey(objClassName[0])) {
servicesMap.put(objClassName[0], obj);
retval = obj;
if (canStart()) {
doStart();
started = true;
}
}
return retval;
}
COM: <s> used by osgi to signal that a service was added </s>
|
funcom_train/17794386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendHeaders() {
try {
String line;
outHeader.put("Server:",hash.get_s(settings,"Server"));
out.println(hash.get_s(outHeader,"__response"));
outHeader.remove("__response");
for (Enumeration e = outHeader.keys(); e.hasMoreElements();) {
line = e.nextElement().toString();
out.println(line + " " + hash.get_s(outHeader,line));
}
out.println();
}
catch(Exception e) { Dbg.dump("An error occured while trying to send the outgoing headers",e); }
}
COM: <s> dumps the outgoing header hashtable to the client </s>
|
funcom_train/46984876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setup(Canvas source) {
int size;
setArea(source.getArea());
this.canvasRect_.clear();
size = source.canvasRect_.size();
for (int i = 0;i < size;i++) {
addCanvasRect((CanvasRect)source.getCanvasRect(i).clone());
}
}
COM: <s> initializes the code canvas code by the canvas code source code </s>
|
funcom_train/22783712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
// handle some button events
String command = e.getActionCommand();
if (SELECT_COMMAND.equals(command)) {
performSelection();
} else if (START_COMMAND.equals(command)) {
performStart();
} else if (CANCEL_COMMAND.equals(command)) {
performCancel();
} else if (ALBUM_SELECT.equals(command)) {
performAlbumSelection(e);
}
}
COM: <s> this is used to handle button events </s>
|
funcom_train/3482462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLine(int index) {
if (index < 0 || index > text.length()-1)
throw new IndexOutOfBoundsException("index " + index + " out of range " + 0 + ".." + (text.length()-1));
int line = Collections.binarySearch(lines, new Integer(index));
if (line < 0) line = -line - 1;
line++; // adjust to line numbers from array indexes
return line;
}
COM: <s> return the line number that the specified index falls on </s>
|
funcom_train/18846332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getResourceIndex(ArrayList collObj, String resourceID) {
int index = -1;
int counter = 0;
if (! collObj.isEmpty()) {
Iterator collObjIterator = collObj.iterator();
while(collObjIterator.hasNext()) {
String coi = collObjIterator.next().toString();
if (coi == null) {
}
else {
int idx = coi.indexOf(resourceID);
if (idx > 0) {
index = counter;
break;
}
}
counter++;
}
}
return index;
}
COM: <s> get index of object </s>
|
funcom_train/28960746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void testAdd() {
// System.out.println("add");
//
// AtomicPredicate ap = null;
// Predicate instance = new Predicate();
//
// boolean expResult = true;
// boolean result = instance.add(ap);
// 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 add method of class vmp </s>
|
funcom_train/16454126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getFloatValue(String key) {
String value = getPreference(key, "0.0F");
float floatValue = 0.0F;
try {
floatValue = Float.parseFloat(value);
}
catch (NumberFormatException nfex) {
floatValue = 0.0F; // set value to 0 if bad format
}
return floatValue;
}
COM: <s> convenience method for transforming a value to a float </s>
|
funcom_train/22890589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addListener(Component c) {
if (c == null) { return; }
c.addMouseListener(mouseListener);
if (!(c instanceof Container)) { return; }
Container container = (Container) c; // Checks for components added
container.addContainerListener(this);
Component[] children = container.getComponents();
if (children != null || children.length > 0)
{
for (int i=0;i<children.length;i++)
{
addListener(children[i]);
}
}
}
COM: <s> adds the mouselistener to this component as well as its children </s>
|
funcom_train/33849040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassDescriptor getClassDescriptorForDottedClassName(@DottedClassName String dottedClassName) {
assert dottedClassName != null;
ClassDescriptor classDescriptor = dottedClassDescriptorMap.get(dottedClassName);
if (classDescriptor == null) {
classDescriptor = getClassDescriptor(dottedClassName.replace('.', '/'));
dottedClassDescriptorMap.put(dottedClassName, classDescriptor);
}
return classDescriptor;
}
COM: <s> get a class descriptor for a class name in dotted format </s>
|
funcom_train/22000292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NumberFormat getEditFormat() {
NumberFormat numberFormat = NumberFormat.getNumberInstance(defaultLocale);
NumberFormat numberFormat1 = NumberFormat.getCurrencyInstance(locale);
numberFormat.setMinimumIntegerDigits(numberFormat1.getMinimumIntegerDigits());
numberFormat.setMinimumFractionDigits(numberFormat1.getMinimumFractionDigits());
numberFormat.setMaximumFractionDigits(numberFormat1.getMaximumFractionDigits());
return numberFormat;
}
COM: <s> returns a code number format code object to edit this </s>
|
funcom_train/4631325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector crossProduct(Vector v) {
return new Vector(getY()*v.getZ() - getZ()*v.getY(),
getZ()*v.getX() - getX()*v.getZ(),
getX()*v.getY() - getY()*v.getX());
}
COM: <s> get the cross product of this vector with v this x v </s>
|
funcom_train/10662301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnexportObjectRemoteBoolean011() {
Echo e = new Echo_Imp();
try {
UnicastRemoteObject.unexportObject(e, true);
fail("The object is not exported ");
} catch (NoSuchObjectException ex) {
} catch (Throwable ex) {
fail("Failed with:" + ex);
}
}
COM: <s> unexport a echo with force </s>
|
funcom_train/38292543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setActiveState(int newState) {
synchronized (stateLock) {
if (myLifeCycle == myActiveLifeCycle) {
int oldState = myLifeCycle.getState();
if (newState != oldState) {
((ActiveLifeCycle) myLifeCycle).setState(newState);
//#MIDP_EXCLUDE_BEGIN
notifyChangedAgentState(oldState, newState);
//#MIDP_EXCLUDE_END
}
}
else {
// A change state request arrived in the meanwhile.
// Let it take place.
throw new Interrupted();
}
}
}
COM: <s> the active life cycle handles different internal states initiated </s>
|
funcom_train/41440782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void beforeSetCmpField() throws ManagementException, InvalidStateException {
if (logger.isDebugEnabled()) {
logger.debug("beforeSetCmpField() on profile with name "+profileName+" of table "+profileTable.getProfileTableName());
}
if (isProfileWriteable()) {
try {
sleeContainer.getTransactionManager().resume(transaction);
} catch (Throwable e) {
throw new ManagementException(e.getMessage(),e);
}
}
else {
throw new InvalidStateException();
}
}
COM: <s> logic to execute before invoking a cmp setter method on the mbean </s>
|
funcom_train/4923267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDelayStore() throws Throwable {
// Record storing
this.record_instantiate();
this.record_delay(); // storing
this.asynchronousListener.notifyStarted();
this.asynchronousListener.notifyComplete();
// Store
this.replayMockObjects();
HttpSessionAdministration admin = this
.createHttpSessionAdministration();
admin.store();
assertFalse("Should delay storing", admin.isOperationComplete());
this.ensureHttpSessionNotAlterable(this.httpSession);
this.storeOperation.sessionStored();
assertTrue("Should store after delay", admin.isOperationComplete());
this.verifyFunctionality();
}
COM: <s> ensure can delay storing the </s>
|
funcom_train/4008635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(int[] posOfPowerUps) {
// set the background with the images
for (int i = 0; i < posOfPowerUps.length; i++) {
int column = i % NROFCELLSHOR;
int row = (i - column)/NROFCELLSHOR;
this.setCell(column, row, posOfPowerUps[i]);
}
// set the location of the background
this.setPosition(GAME_ORIGIN_X, GAME_ORIGIN_Y);
}
COM: <s> updates the game field with the new positions of the power ups </s>
|
funcom_train/198006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getXMLElementForObject(Document d) {
Element e = d.createElement(getClass().getName());
e.appendChild(figure.getXMLElementForObject(d));
e.setAttribute("layer", Integer.toString(getMapLayer()));
Element element = e;
element.setAttribute("creatorlayer", Integer.toString(creatorLayer));
return element;
}
COM: <s> returns a w3 c dom element with the attributes of this virtual gateway </s>
|
funcom_train/44079962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2D getPoint(int index) {
return GraphConstants.createPoint(points.getX(index), points.getY(index));
/*
Object obj = points.get(index);
if (obj instanceof PortView)
// Port Location Seen From This Edge
return ((PortView) obj).getLocation(this);
else if (obj instanceof Point)
// Regular Point
return (Point) obj;
return null;
*/
}
COM: <s> returns the cached points for this edge </s>
|
funcom_train/23246311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reInitialize(final long aWayID) {
additionalFrom = "";
additionalWhere = " AND w.id = " + aWayID + " ";
this.minLat = Integer.MIN_VALUE;
this.minLon = Integer.MIN_VALUE;
this.maxLat = Integer.MAX_VALUE;
this.maxLon = Integer.MAX_VALUE;
}
COM: <s> re initialize this class to read one way from the database </s>
|
funcom_train/8486194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void browseToRoot() {
String start_path = getIntent().getStringExtra(IntConstants._INTENT_START_PATH_);
File root = Environment.getExternalStorageDirectory();
if (start_path != null) {
File f = new File(start_path);
if (f.exists())
root = f;
}
browseTo(root);
}
COM: <s> this function browses to the root directory of the file system </s>
|
funcom_train/44391731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSashForm() {
sashForm = new SashForm(sShell, SWT.V_SCROLL);
button = new Button(sashForm, SWT.NONE);
button.setText("dddddddddd");
cCombo = new CCombo(sashForm, SWT.NONE);
cCombo.setText("dtdtdt");
}
COM: <s> this method initializes sash form </s>
|
funcom_train/8638885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PdfDictionary getSignatureDictionary(String name) {
getSignatureNames();
name = getTranslatedFieldName(name);
if (!sigNames.containsKey(name))
return null;
Item item = (Item)fields.get(name);
PdfDictionary merged = (PdfDictionary)item.merged.get(0);
return (PdfDictionary)PdfReader.getPdfObject(merged.get(PdfName.V));
}
COM: <s> gets the signature dictionary the one keyed by v </s>
|
funcom_train/32056046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*protected JRootPane createRootPane() {
KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
JRootPane rootPane = new JRootPane();
rootPane.registerKeyboardAction(new ActionListener() {
public void actionPerformed(ActionEvent actionEvent) {
setVisible(false);
}
}, stroke, JComponent.WHEN_IN_FOCUSED_WINDOW);
return rootPane;
}
COM: <s> closes on escape </s>
|
funcom_train/863874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write( OutStream out ) throws IOException {
out.writeUI8( operation.opcode );
ArgType[] argTypes = operation.argTypes;
for (int i = 0; i < argTypes.length; i++) {
argTypes[i].write( out, arguments[i] );
}
}
COM: <s> write the instruction as bytecode data </s>
|
funcom_train/26593013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void orRelation(_AllTablesJoinRelation allTablesJoinRelation0) throws DException {
if (allTablesJoinRelation0 == null) {
allTablesJoinRelation = null;
return;
}
if (allTablesJoinRelation != null) {
if (!allTablesJoinRelation.orRelation(allTablesJoinRelation0.getRelations())) {
allTablesJoinRelation = null;
}
}
}
COM: <s> this method is required by bveplan merger to merged passed joinrelation with </s>
|
funcom_train/86576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LocalField addField(String javaType, String name, int modifiers) {
Type type = factory.type(javaType);
// put it into the class holder right away.
ClassMember field = classHold.addMember(name, type.vmName(), modifiers);
int cpi = classHold.addFieldReference(field);
return new BCLocalField(type, cpi);
}
COM: <s> add a field to this class </s>
|
funcom_train/15607548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OID parseContigOID(String idstr) {
OID returnOID = parseOIDorAlphaNum(idstr);
// Enforce the restriction that the OID be non-scratch.
if (returnOID.isScratchOID()) {
returnOID = null;
FacadeManager.handleException(
new IllegalArgumentException("Illegal namespace contig ID "+idstr+": entered in XML file."));
} // Test for scratch
return returnOID;
} // End method: parseContigOIDTemplateMethod
COM: <s> builds a genomic axis oid with all restrictions and translations required by </s>
|
funcom_train/34061109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawLineBody(Graphics2D g, Body body, Line line) {
g.setColor(Color.black);
Vector[] verts = line.getVertices(body.getPosition(), body.getRotation());
g.drawLine(
(int) verts[0].getX(),
(int) verts[0].getY(),
(int) verts[1].getX(),
(int) verts[1].getY());
}
COM: <s> draw a line into the demo </s>
|
funcom_train/27822805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTermDefinition() throws KAONException {
Property termDefinition=m_entity.getOIModel().getProperty(OMO_termDefinition);
Set result=m_entity.getAllFromPropertyValues(termDefinition);
if (!result.isEmpty()) {
Object object=result.iterator().next();
if (object instanceof String)
return (String)object;
}
return null;
}
COM: <s> returns the definition of a term </s>
|
funcom_train/5721707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRowClasses() {
StringBuilder classes = new StringBuilder();
int lastRowIndexOnPage = firstRowIndex + rowsPerPage;
for (int i = firstRowIndex; i < lastRowIndexOnPage; i++) {
if (i == selectedRowIndex) {
classes.append("selectedRow");
} else if (i % 2 == 0) {
classes.append("even");
} else {
classes.append("odd");
}
if (i < lastRowIndexOnPage - 1) {
classes.append(", ");
}
}
return classes.toString();
}
COM: <s> generate row classes attribute for table component workaround for a </s>
|
funcom_train/40873224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getField(String fieldName, MultiTableField field) {
String result = fieldName + " (";
int cpt = 0;
for (AbstractTable t : field.tables())
result += (cpt++ > 0 ? "," : "") + (t.isPrimaryKey() ? t.getName() : t.getID());
return result + ")";
}
COM: <s> construct and return a field with the given parameters </s>
|
funcom_train/17203731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasInlinedEdge(RVMMethod caller, int bcIndex, RVMMethod callee) {
if (MCInformation == null) return false;
if (inlineEncoding == null) return false;
return OptEncodedCallSiteTree.edgePresent(caller.getId(), bcIndex, callee.getId(), inlineEncoding);
}
COM: <s> this method searches the machine code maps and determines if </s>
|
funcom_train/41299313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getDirB() {
if (dirB == null) {
dirB = new JButton();
dirB.setText("");
dirB.setLocation(new Point(4, 4));
dirB.setSize(new Dimension(32, 19));
dirB.setFont(new Font("Dialog", Font.PLAIN, 12));
}
return dirB;
}
COM: <s> this method initializes dir b </s>
|
funcom_train/11754546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPrefixMap() throws Exception {
HashMap procEnvironment = new HashMap();
procEnvironment.put("JAVA_HOME", "/usr/opt/java");
Map result = MapUtils.prefix(procEnvironment, "env");
assertTrue(procEnvironment.size() == result.size());
assertEquals("/usr/opt/java", result.get("env.JAVA_HOME"));
}
COM: <s> test prefixing of map </s>
|
funcom_train/24262036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRawVariableValidationN4() {
try {
RawVariable rawVariable1 = (RawVariable) ht87.clone();
rawVariable1.setCleaned(true);
rawVariable1.setCleaningStatus("");
curationService.addRawVariable(demoUser, rawVariable1);
fail();
}
catch(MacawException exception) {
int totalNumberOfErrors
= exception.getNumberOfErrors();
assertEquals(1, totalNumberOfErrors);
int numberOfErrors
= exception.getNumberOfErrors(MacawErrorType.INVALID_RAW_VARIABLE);
assertEquals(1, numberOfErrors);
}
}
COM: <s> check that if is cleaned is true cleaning status is not blank </s>
|
funcom_train/3813233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getGlobalProperty(String propertyName) {
// propertyName = propertyName.startsWith("$") ? propertyName : "${" + propertyName + "}";
String globProp = globalProperties.get(propertyName);
return globProp != null ? globProp.toString() : null;
}
COM: <s> returns a global property </s>
|
funcom_train/22278671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean intersects(int anIndex, int aLength) {
boolean result;
int oldIndex = index;
int oldLength = length;
this.intersectWith( anIndex, aLength );
if( index == nullRange().index )
result = false;
else
result = true;
index = oldIndex;
length = oldLength;
return result;
}
COM: <s> returns b true b if the receiver intersects the range defined by </s>
|
funcom_train/41163241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoTest entity) {
EntityManagerHelper.log("saving CoTest instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co test entity </s>
|
funcom_train/36951474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected LibraryInfo getDefaultLibraryInfo(File installLocation) {
IPath[] dflts = getDefaultSystemLibrary(installLocation);
String[] strings = new String[dflts.length];
for (int i = 0; i < dflts.length; i++) {
strings[i] = dflts[i].toOSString();
}
return new LibraryInfo("1.8.4", strings); //$NON-NLS-1$
}
COM: <s> returns default library info for the given install location </s>
|
funcom_train/27779138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doUnknownCmd(String command, String argument) {
//responseBuffer.append("500 ").append(theConfigData.getHelloName())
responseBuffer.append("500 ").append(preferences.get("heloName", DEFAULT_HELO_NAME))
.append(" Syntax error, command unrecognized: ").append(command);
String responseString = clearResponseBuffer();
writeLoggedFlushedResponse(responseString);
}
COM: <s> handler method called upon receipt of an unrecognized command </s>
|
funcom_train/51591453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getColumnClass(int columnIndex)
{ Class c = null;
if ( columnIndex >= 0 && columnIndex < this.propertiesName.length )
{
ColumnDescriptor descriptor = this.getColumnDescriptor(this.propertiesName[columnIndex]);
if ( descriptor != null )
{ c = descriptor.getColumnClass(); }
}
if ( c == null )
{ return Object.class; }
return c;
}
COM: <s> returns the most specific superclass for all the cell values </s>
|
funcom_train/45805257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateFontSelection() {
VizTopicMapConfigurationManager confMan = controller
.getConfigurationManager();
String fontString = confMan.getOccurrenceValue(selectedType,
confMan.getTopicTypeFontTopic());
if (fontString == null)
unselectFont();
else {
Font font = confMan.parseFont(fontString);
setSelectedFont(font);
}
}
COM: <s> make the appropriate font selection or no selection as the case may be </s>
|
funcom_train/37508026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initGUI() {
add(getButtonNew());
add(getButtonLoad());
add(getButtonSave());
addSeparator();
add(getButtonAdd());
add(getButtonDelete());
addSeparator();
add(getButtonFilesystem());
add(getButtonZip());
add(getButtonWebsite());
add(getButtonSlideshow());
}
COM: <s> initializes the gui of the toolbar </s>
|
funcom_train/43910041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getDatabaseMajorVersion(Connection connection) {
int major;
try {
major = connection.getMetaData().getDatabaseMajorVersion();
} catch (SQLException e) {
LOGGER.log(Level.WARNING,
"Failed to retrieve Postgres " + "database version number, assuming 7. Error is: "
+ e.getMessage(), e);
major = 7;
}
return major;
}
COM: <s> retrieves postgresql database major version number </s>
|
funcom_train/8078807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double minAbs ( int i0, int i1, int column ) {
double m = Math.abs(A[i0][column]);
for (int i = i0+1; i <= i1; i++) {
m = Math.min(m, Math.abs(A[i][column]));
}
return m;
}
COM: <s> returns the minimum absolute value of some elements of a column </s>
|
funcom_train/12652961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() {
// If the user has not been persisted then ignore this step
if (isLoggedIn()) {
logger.debug("Deleting patient ##0", patient.getId());
// Because we are deleting the patient and its associations, we do
// not need to re-attach invitations' transient field
merge();
em.remove(patient);
em.flush();
logger.debug("Patient ##0 deleted", patient.getId());
}
logout();
}
COM: <s> deletes a user and logs out </s>
|
funcom_train/51752379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void saveSettings(final Map<String, Object> map, final File file) throws Exception {
if (map != null && file != null) {
final Document doc = toDocument(map);
if (doc != null) {
writeDocument(doc, file);
}
}//else: input unavailable
}//saveSettings()
COM: <s> write settings to xml file </s>
|
funcom_train/19108444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDisplayProg(Prog pNodeProg) {
String strName = getProgName(pNodeProg);
String strVersion = getProgVersion(pNodeProg);
return ((strName == null) ? "" : (strName + " ")) + ((strVersion == null) ? "" : strVersion);
}
COM: <s> gets the programme display name </s>
|
funcom_train/30008533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetParser() {
// change the parser
this.regWizard.setParser(
this.regWizard.getFactory().getParser("Java", "", ""));
// make sure the users get the event
if(!this.setParserChanged)
fail("The parser did not change");
// Make sure the matches boolean is set
}
COM: <s> test of set parser method of class </s>
|
funcom_train/18743828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DefaultNode getValue(DefaultNode featureNode) {
DefaultNode value = null;
for (DefaultEdge outEdge : this.instanceGraph.outEdgeSet(featureNode)) {
if (outEdge.label().text().equals("val")) {
value = outEdge.target();
}
}
return value;
}
COM: <s> for a given node that represents a feature return the node that </s>
|
funcom_train/3849206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() throws IOException {
sock = new Socket (url.getHost(), url.getPort());
ioTelnetOut = new TelnetOutputStream(sock.getOutputStream());
ioTelnetIn = new TelnetInputStream(sock.getInputStream(),
ioTelnetOut, ioHandler);
}
COM: <s> this actually connects to the host at the specified port </s>
|
funcom_train/12110159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC4(java.util.EventObject arg1) {
try {
// user code begin {1}
// user code end
this.vediSVive_AnnullaJButtonAction(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c4 vedi svive </s>
|
funcom_train/10858910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SolrQueryResponse getResponse(SolrQueryRequest req) throws IOException, Exception {
SolrQueryResponse rsp = new SolrQueryResponse();
h.getCore().execute(h.getCore().getRequestHandler(null),req,rsp);
if (rsp.getException() != null) {
throw rsp.getException();
}
return rsp;
}
COM: <s> make sure to close req after you are done using the response </s>
|
funcom_train/49608690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deletePersons(String username,EntityManager em,List<Person> vos) throws Throwable {
try {
for(Person vo: vos) {
vo.setDeleted(Consts.FLAG_Y);
JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo);
}
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
}
COM: <s> delete logically a person </s>
|
funcom_train/7255199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public interface RoutingListener {
/**
* Currently if message crypto is on and default fallback for incoming not
* enabled then we would bounce incoming messages from non-crypto transports
* For example, NAT check
* This method allows auto-fallback for such transports
* @return
*/
public boolean
autoCryptoFallback();
/**
* The given incoming connection has been accepted.
* @param connection accepted
*/
public void connectionRouted( NetworkConnection connection, Object routing_data );
}
COM: <s> listener for routing events </s>
|
funcom_train/2441180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String unescapeName(String name) {
if ((begin.length() > 0 && name.startsWith(begin)) && (end.length() > 0 && name.endsWith(end))) {
return KongaStringUtils.removeStartAndEnd(name, begin, end);
}
return name;
}
COM: <s> removes the begin and end quotes from the given name </s>
|
funcom_train/22655808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FilterProvider (Insight insight) {
this._insight = insight;
this.addMutatorListener (this._insight.getController ());
// Objects for filter evaluation
_criterionEvaluator = new CriterionEvaluatorImpl ();
// explicitly set the priority to normal. Otherwise
// this thread will inherit the priority of the creator thread
// i.e the AWT event dispatch thread that runs with max priority
this.setPriority (Thread.NORM_PRIORITY);
}
COM: <s> constructor to initialise the provider </s>
|
funcom_train/20271270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isGlobalVarReference(String name, Scope s) {
Scope.Var v = s.getVar(name);
if (v == null && externsScope != null) {
v = externsScope.getVar(name);
}
return v != null && !v.isLocal();
}
COM: <s> determines whether a variable name reference in a particular scope is a </s>
|
funcom_train/7581584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOkButton() {
if (okButton == null) {
okButton = new JButton();
okButton.setText(MessageManager.getMessage("okButton"));
okButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
okButtonActionPerformed(e);
}
});
}
return okButton;
}
COM: <s> this method initializes ok button </s>
|
funcom_train/46582134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean ready() {
if (connected) try {
return reader.ready();
} catch (Exception ex) {
try {
System.err.println("RokuConnection.ready() failed.");
/* The RokuConnection must have failed. */
connected = false;
timer.schedule(new ConnectTask(), 0, 1000);
} catch (Exception ex2) {
System.err.println("Could not launch re-connect task.");
}
connected = false;
}
return false;
}
COM: <s> returns true if there is data to read from the sb </s>
|
funcom_train/46760302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OrderTypeModel getOrderType(final long orderTypeId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return OrderData.getOrderType(orderTypeId, chain, call);
}}; return (OrderTypeModel) call(method, call);
}
COM: <s> same transaction return the single order type model for the primary key </s>
|
funcom_train/2853400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NattedAddress (Inet4Address host, int port) {
if (host == null)
throw new IllegalArgumentException("null host");
if (port < 0 || port > 65535)
throw new IllegalArgumentException("port out of range: "
+ port);
localHost = host;
localPort = port;
natType = -1;
}
COM: <s> create an address pair where only the local address is known </s>
|
funcom_train/33006141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(byte[] buffer, int offset, int length) throws IOException {
// return n (number of bytes read), -1 (eof), 0 (asked for zero bytes)
if ( length == 0 )
return 0;
if(data==null)
return 0;
try {
for (int i = offset; i < offset + length; i++)
buffer[i] = data[position++];
return length;
}
catch ( IndexOutOfBoundsException E ) {
return -1;
}
}
COM: <s> block and read data from the stream </s>
|
funcom_train/35562394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addItem(WjrTreeItem item) {
if (item.getParentItem() != null) {
item.getParentItem().removeItem(this);
}
item.setParentItem(this);
children.add(item);
childrenPanel.add(item);
if (children.size() == 1) {
updateState();
}
}
COM: <s> adds the child item </s>
|
funcom_train/21656512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtDepartamentos() {
if (btDepartamentos == null) {
btDepartamentos = new JButton();
btDepartamentos.setBounds(new Rectangle(450, 100, 55, 25));
btDepartamentos.setText("+");
btDepartamentos.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ControladorPrincipal.mostrarAgregarDepartamento();
}
});
}
return btDepartamentos;
}
COM: <s> this method initializes bt departamentos </s>
|
funcom_train/31098004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PDFStream makeStream() {
/*
* create a PDFStream with the next object number and add it
*
* to the list of objects
*/
PDFStream obj = new PDFStream(++this.objectcount);
obj.addDefaultFilters();
/*
if (this.encryption != null) {
obj.addFilter(this.encryption.makeFilter(obj.number,obj.generation));
}
*/
this.objects.add(obj);
return obj;
}
COM: <s> make a stream object </s>
|
funcom_train/10655957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddAttributeNineSameValue() {
AttributeSet as = StyleContextTest.addAttribute(9);
as = sc.addAttribute(as, StyleConstants.Bold, Boolean.TRUE);
assertEquals(9, as.getAttributeCount());
if (!BasicSwingTestCase.isHarmony()) {
assertTrue(as instanceof SimpleAttributeSet);
} else {
assertTrue(as instanceof SmallAttributeSet);
}
}
COM: <s> add nine attributes into a set and try to add the tenth one </s>
|
funcom_train/13874387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAttributePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TupleLiteralPart_attribute_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TupleLiteralPart_attribute_feature", "_UI_TupleLiteralPart_type"),
EssentialoclPackage.Literals.TUPLE_LITERAL_PART__ATTRIBUTE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the attribute feature </s>
|
funcom_train/36629184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void salvar(T obj) throws ApplicationException {
try {
Session session = HibernateUtil.currentLoginSession();
session.save(obj);
} catch (Exception e) {
throw new ApplicationException("mensagem.erro.genericDAO.salvar", getParamsMsg(), e, ApplicationException.ICON_ERRO);
} finally {
try {
HibernateUtil.closeLoginSession();
} catch (Exception e) {
log.error("Erro ao Fechar Conexao com o Hibernate: ", e);
}
}
}
COM: <s> salva o objeto </s>
|
funcom_train/4519226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RButton getRButton31111() {
if (RButton31111 == null) {
RButton31111 = new RButton(1);
RButton31111.setText("HightHeader");
RButton31111.setBounds(new Rectangle(550, 120, 120, 30));
RButton31111.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
(new TestHightHeaderTabel()).setVisible(true);
}
});
}
return RButton31111;
}
COM: <s> this method initializes rbutton31111 </s>
|
funcom_train/29630321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean atInterface(RSInterface rsi, int actionIndex) {
if (actionIndex < 1 || actionIndex > 1)
return false;
else {
int id = -1;
switch (actionIndex) {
case 1:
id = ActionConstants.AtInterface1;
break;
}
if (id != -1) {
rawPacket(id, 0, 0, rsi.interfaceID - 3);
return true;
} else
return false;
}
}
COM: <s> performs an action on an interface by index </s>
|
funcom_train/2452037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(String codebase, String packageName, String className) throws Exception {
this.unit = this.vm.newCompilationUnit(codebase);
this.unit.setNamespace(packageName);
this.cls = this.unit.newClass(className);
this.cls.setAccess(Access.PUBLIC);
}
COM: <s> step 1 internally setup the code compilation unit code and </s>
|
funcom_train/31084703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int gcd (int a, int b) {
if (a < 0)
a = -a;
if (b < 0)
b = -b;
if (b == 0)
return a;
// (The case where a is zero is checked below.)
// Use Euclid's algorithm.
while (true) {
int remainder = a % b;
if (remainder == 0)
return b;
a = b;
b = remainder;
}
}
COM: <s> return the greatest common denomitator of abs a and abs b </s>
|
funcom_train/44823003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassDescriptor getClassDescriptor (String shortClassName) {
for (int i=0; i<classDescriptors.size(); i++) {
ClassDescriptor cdes = (ClassDescriptor) classDescriptors.get(i);
if (cdes.getName().equals(shortClassName)) {
return cdes;
}
}
return null;
}
COM: <s> get a class descriptor based on its name </s>
|
funcom_train/3158261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImageSize(int imgWidth, int imgHeight) {
if (_image != null
&& (imgWidth != _image.getWidth()
|| imgHeight != _image.getHeight())) {
throw new IllegalArgumentException("invalid image size");
}
_imgWidth = imgWidth;
_imgHeight = imgHeight;
setPreferredSize(new Dimension(_imgWidth, _imgHeight));
}
COM: <s> sets the size of the image to be displayed </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.