__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/36125655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expendStack() {
// doubling here is probably overkill, but anything that needs to
// double more than once (32 levels deep) is very atypical anyway.
ParserState[] newstack = new ParserState[this.stack.length << 1];
System.arraycopy(this.stack, 0, newstack, 0, this.stack.length);
this.stack = newstack;
}
COM: <s> expands the stack </s>
|
funcom_train/9994212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetGauge() throws AssertionFailedException {
System.out.println("setGauge");
AbstractLoadScreen instance = null;
int cur_1 = 0;
int max_1 = 0;
instance.setGauge(cur_1, max_1);
fail("The test case is a prototype.");
}
COM: <s> test of test set gauge method of class abstract load screen </s>
|
funcom_train/31069625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeProperties(Properties properties) throws PropertyException {
try {
properties.setIntProperty(PK_RESPONSE_STATUS, status);
properties.setStringProperty(PK_RESPONSE_NAME, name);
properties.setStringProperty(PK_RESPONSE_VALUE, value);
} catch (Exception ex) {
}
}
COM: <s> output the local variables to the persistent properties see </s>
|
funcom_train/41826876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAborted(boolean aborted) {
if (aborted == false) {
// logger.severe("cannot unabort a link. use reset()");
return;
}
if (getDownloadLinkController() == null) {
logger.severe("Tried to abort download even it has no downloadController");
linkStatus.setInProgress(false);
return;
}
getDownloadLinkController().abortDownload();
}
COM: <s> kann mit set aborted true den download abbrechen </s>
|
funcom_train/31526009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printSelf(PrettyPrinter printout) throws IOException {
SymTabAST leftBranch = (SymTabAST)nodeToPrint.getFirstChild();
SymTabAST rightBranch = (SymTabAST)leftBranch.getNextSibling();
PrinterFactory.makePrinter(leftBranch).print(printout);
printDot(printout);
PrinterFactory.makePrinter(rightBranch).print(printout);
}
COM: <s> prints a dotted name to the pretty printer </s>
|
funcom_train/51812382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSerializeNull() throws Exception {
serializer.serialize(oos, null);
ObjectInputStream ois = new ObjectInputStream( new ByteArrayInputStream( bytesOut.toByteArray()));
Method method = serializer.deserialize(ois);
assertNull("Method not null", method);
}
COM: <s> test that verifies that serialization of a null method object works </s>
|
funcom_train/13895978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String addOSFromTransfer(Transfer transfer) {
String sResult = "false";
try {
String sNewNum = this.generateOSNum();
transfer.setNewInventoryNumber(sNewNum);
if (this.osd.addOSFromTransfer(transfer) != 0) {
sResult = sNewNum;
}
} catch (Exception e) {
this.log
.warning("An attempt was made to add an OS from a transfer it failed.");
this.log.warning(e.getMessage());
} finally {
this.cleanUp();
}
return sResult;
}
COM: <s> creates an opensource item from a transfer </s>
|
funcom_train/10517667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCheckoutExceptions() {
configureProject("src/etc/testcases/taskdefs/optional/vss/vss.xml");
expectSpecificBuildException("vsscheckout.1", "some cause", "vsspath attribute must be set!");
expectSpecificBuildException("vsscheckout.2", "some cause", "blah is not a legal value for this attribute");
}
COM: <s> test vsscheckout required attributes </s>
|
funcom_train/1826685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSpacer() {
JPanel filler = new JPanel();
filler.setPreferredSize(new Dimension(5, 5));
filler.setMinimumSize(new Dimension(5, 5));
filler.setMaximumSize(new Dimension(5, 5));
add(filler);
}
COM: <s> unlike add separator works for vertical toolbars </s>
|
funcom_train/50486721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addContributor(ContributorBean newContributor) {
String role = newContributor.getRole();
ArrayList contribList = (ArrayList)contributors.get(role);
if(contribList == null) {
contribList = new ArrayList();
contributors.put(role, contribList);
}
contribList.add(newContributor);
}
COM: <s> adds a contributor to the set of contributors for </s>
|
funcom_train/48400868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendReady() throws Exception {
if (_dos != null) {
_dos.write(MsgTypes.TYPE_CONTROL);
_dos.write(MsgTypes.TYPE_CONTROL_START_GAME);
_dos.flush();
}// throw new UnsupportedOperationException("Not supported yet.");
}//End of sendReady()
COM: <s> used to notify that clients servers are ready for the game to start </s>
|
funcom_train/18253824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List retrieveAgentAccessors(LocatedAgent agent) {
List agentAccessors = null;
try {
agentAccessors = PropertyAccessor.determineReadWriteAccessors(agent, Agent.class, true);
} catch (IntrospectionException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
return agentAccessors;
}
COM: <s> retrieve agent accessors </s>
|
funcom_train/21727831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startGame() {
if(c == null){
c = new Controller(model);
}
if(loginScreen != null) {
model.deleteObserver(loginScreen);
loginScreen = null;
}
if(registration != null) {
model.deleteObserver(registration);
registration = null;
}
model.deleteObserver(view);
view = new View(model, c, this);
view.setVisible(true);
view.requestFocus();
frame.setContentPane(view);
frame.setResizable(true);
frame.setTitle("Tank @ War - Playing");
frame.repaint();
view.revalidate();
view.repaint();
view.requestFocus();
}
COM: <s> method that starts shows to the game </s>
|
funcom_train/17938959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumRecordsInRange(int axisnum, float min, float max){
int count = 0;
for (int i=0; i<getNumRecords(); i++){
float val = getValue(i, axisnum);
if ((val >= min) && (val < max))
count++;
}
return count;
}
COM: <s> returns the number of records in the given value range </s>
|
funcom_train/32137919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final String[] log) {
table.getControl().getDisplay().syncExec(new Runnable() {
boolean stop = false;
public void run() {
if(stop) return;
try {
table.addRow(log);
try {
PlatformUI.getWorkbench().getWorkbenchWindows()[0].getActivePage().showView(ID);
} catch(PartInitException pie) {
} catch(NullPointerException npe) {}
} catch (Exception e) {
stop = true;
}
}
});
}
COM: <s> adds the log details to the table of errors </s>
|
funcom_train/20117142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(HostContext hostContext, ServletConfig servletConfig) throws Exception {
this.servletContext = servletConfig.getServletContext();
Assert.notNull(hostContext, "hostContext is null");
this.hostContext = hostContext;
this.hostContext.init(servletConfig);
logger.info(version() + ": initiated.");
startTime = System.currentTimeMillis();
}
COM: <s> init mozart with ready </s>
|
funcom_train/8037717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeStoreQty(char type, int idx, int qty) {
//StoreController sctrl = mCtrl.getStoreController();
try {
mpanel.updateQtyDisplay(type, idx, qty);
mpanel.initCollectCash();
mpanel.initTotalCash();
} catch (VMCSException e) {
System.out.println("MaintenanceController.changeStoreQty:" + e);
}
}
COM: <s> this operation updates the quantity to be displayed at the panel based </s>
|
funcom_train/1590017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int hash = 317351877;
hash += (getLowerLimit() != null ? getLowerLimit().hashCode() : 0);
hash += (getUpperLimit() != null ? getUpperLimit().hashCode() : 0);
hash += getBase().hashCode() * 7;
return hash;
}
COM: <s> a suitable hashcode for the chronology </s>
|
funcom_train/20479477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeLocationToFile(Location loc) {
if (mDebug) {
// Log.d(Constants.LOG_TAG, "Writing NMEA to file.");
FileWriter fout;
try {
fout = new FileWriter(new File(mLocationTraceFile), true);
fout.write(loc.toString() + "\n");
fout.flush();
fout.close();
} catch (IOException e) {
sLog.log(Level.WARNING,
"Failed to write location string to file "
+ mLocationTraceFile, e);
}
}
}
COM: <s> writes the latest location object to the trace file </s>
|
funcom_train/18149738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExecutionAndDeliveryTime(TS executionAndDeliveryTime) {
if(executionAndDeliveryTime instanceof org.hl7.hibernate.ClonableCollection)
executionAndDeliveryTime = ((org.hl7.hibernate.ClonableCollection<TS>) executionAndDeliveryTime).cloneHibernateCollectionIfNecessary();
_executionAndDeliveryTime = executionAndDeliveryTime;
}
COM: <s> sets the property execution and delivery time </s>
|
funcom_train/29031564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPaneHelp() {
jScrollPaneHelp.setBounds(10, 10, 600, 600);
jScrollPaneHelp
.setHorizontalScrollBarPolicy(jScrollPaneHelp.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPaneHelp.setViewportView(gethtmlDisplay());
jScrollPaneHelp.getViewport().setOpaque(false);
jScrollPaneHelp.setOpaque(false);
return jScrollPaneHelp;
}
COM: <s> this method initializes j scroll pane </s>
|
funcom_train/35848503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNamespace() {
Object o =
Model.getUmlFactory().buildNode(Model.getMetaTypes().getModel());
assertNotNull("Didn't create object", o);
assertTrue("Should be a base", Model.getFacade().isAUMLElement(o));
assertTrue("Should be a model", Model.getFacade().isAModel(o));
runTruthTests(o);
}
COM: <s> test the creation of a namespace </s>
|
funcom_train/47712447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String help(String command) {
try {
JSONArray parameters = new JSONArray().element(command);
JSONObject request = createRequest("help", parameters);
JSONObject response = session.sendAndReceive(request);
return response.getString("result");
} catch (JSONException e) {
throw new BitcoinClientException("Exception when getting help for a command", e);
}
}
COM: <s> return help for a command </s>
|
funcom_train/43245127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSSN() {
System.out.println("getSSN");
PatientDemographicsDG1Object instance = new PatientDemographicsDG1Object();
String expResult = "";
String result = instance.getSSN();
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 ssn method of class org </s>
|
funcom_train/44770291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InternalValue internalGetValue() throws RepositoryException {
// check state of this instance
sanityCheck();
// check multi-value flag
if (definition.isMultiple()) {
throw new ValueFormatException(safeGetJCRPath()
+ " is multi-valued and can therefore only be retrieved as an array of values");
}
PropertyState state = (PropertyState) getItemState();
return state.getValues()[0];
}
COM: <s> returns the internal values of this property </s>
|
funcom_train/17619091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGreatestCommonDivisor() {
System.out.println("greatestCommonDivisor");
assertEquals(Mathematics.greatestCommonDivisor(BigInteger.valueOf(20), BigInteger.valueOf(10)), BigInteger.valueOf(10));
assertEquals(Mathematics.greatestCommonDivisor(20, 10), 10);
}
COM: <s> test of greatest common divisor method of class mathematics </s>
|
funcom_train/4519986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rotateRight() {
int width = bufferedImage.getWidth();
int height = bufferedImage.getHeight();
BufferedImage result = new BufferedImage(height, width,
BufferedImage.TYPE_INT_BGR);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
int rgb = bufferedImage.getRGB(x, y);
result.setRGB(height - y - 1, x, rgb);
}
}
bufferedImage = result;
}
COM: <s> rotates image 90 degrees to the right </s>
|
funcom_train/7511690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemDefectTypes() {
if (jMenuItemDefectTypes == null) {
jMenuItemDefectTypes = new JMenuItem();
jMenuItemDefectTypes.setText(Messages.getString("MainFrame.menu.defectTypes")); //$NON-NLS-1$
registerAction(jMenuItemDefectTypes, Actions.DEFECT_TYPES);
}
return jMenuItemDefectTypes;
}
COM: <s> this method initializes j menu item defect types </s>
|
funcom_train/37854626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SVNPropertyValue doGetRevisionProperty(File repositoryRoot, String propName, String transactionName) throws SVNException {
SVNProperties revProps = getProperties(repositoryRoot, propName, null, null, transactionName, true, true);
return revProps.getSVNPropertyValue(propName);
}
COM: <s> returns the value of a revision property for the given transaction </s>
|
funcom_train/17892757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJOkCancelPanel() {
if (jOkCancelPanel == null) {
jOkCancelPanel = new JPanel();
jOkCancelPanel.setLayout(new FlowLayout(FlowLayout.CENTER,
10, 5));
jOkCancelPanel.add(getJButtonOK(), null);
jOkCancelPanel.add(getJButtonCancel(), null);
}
return jOkCancelPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/13596159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startPlay() {
if (sourceLine == null) // Verify we have a line
{
DefaultLogs.getDefaultSystemLog().info("Audio Player",
"Error: No line available");
displayErrorMessage("Audio Error", "No line available");
return;
}
thread = new Thread(this); // Create the playing thread
playing = true; // Set the control to true
thread.start(); // Start the thread
}
COM: <s> start playing the currently loaded audio file by setting up and </s>
|
funcom_train/26315252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void select(Coords coords) {
if ((coords == null) || game.getBoard().contains(coords)) {
setSelected(coords);
moveCursor(selectedSprite, coords);
moveCursor(firstLOSSprite, null);
moveCursor(secondLOSSprite, null);
processBoardViewEvent(new BoardViewEvent(this, coords, null,
BoardViewEvent.BOARD_HEX_SELECTED, 0));
}
}
COM: <s> determines if this board contains the coords and if so selects that </s>
|
funcom_train/44772251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof PropDefImpl) {
PropDefImpl other = (PropDefImpl) obj;
return super.equals(obj)
&& requiredType == other.requiredType
&& Arrays.equals(valueConstraints, other.valueConstraints)
&& Arrays.equals(defaultValues, other.defaultValues)
&& multiple == other.multiple;
}
return false;
}
COM: <s> compares two property definitions for equality </s>
|
funcom_train/6023181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dragdropTo(String locatorOfObjectToBeDragged, String from, String to) {
Selenium browser = getCurrent();
browser.mouseDownAt(locatorOfObjectToBeDragged, from);
browser.mouseMoveAt(locatorOfObjectToBeDragged, to);
browser.mouseUpAt(locatorOfObjectToBeDragged, to);
}
COM: <s> drags and drops the specific element from its specific area to another area </s>
|
funcom_train/26401932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LinkedList validate() {
LinkedList errors = new LinkedList();
if (getTitle() == null || getTitle().equals(""))
errors.add("errors.missing.title");
if (getDescription() == null || getDescription().equals(""))
errors.add("errors.missing.description");
if (getPackageName() == null || getPackageName().equals(""))
errors.add("errors.missing.packagename");
if (getErrorLevel() == null || getErrorLevel().equals(""))
errors.add("errors.missing.errorlevel");
if (getGroupid() == null || getGroupid().equals(""))
errors.add("errors.missing.groupid");
return errors;
}
COM: <s> check if all mandatory fields are set </s>
|
funcom_train/13995503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testObjectAttribute() throws Exception {
assertEquals("invalid default value", null, oa1.getStringAttribute());
oa1.setStringAttribute(STRINGS[0]);
assertEquals("invalid attribute value", STRINGS[0], oa1.getStringAttribute());
oa1.setStringAttribute(STRINGS[1]);
assertEquals("invalid attribute value", STRINGS[1], oa1.getStringAttribute());
}
COM: <s> tests an object e </s>
|
funcom_train/18199635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(Logging log) {
try {
FileReader fr = new FileReader(log.getFile());
BufferedReader br = new BufferedReader(fr);
FileWriter fw = new FileWriter(logging, true);
String line;
for (int i = 0; i < 4; i++) {
if (br.ready()) {
br.readLine();
}
}
while (br.ready()) {
line = br.readLine();
fw.write(line);
}
br.close();
fw.flush();
fw.close();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> merge two logging files </s>
|
funcom_train/51073231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateIcon() {
BufferedImage bufferedImage = new BufferedImage(20, 20, BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = bufferedImage.createGraphics();
graphics.setColor(Color.YELLOW);
graphics.fillRect(0, 0, 20, 20);
graphics.setColor(Color.BLACK);
graphics.drawString(name, 1, 10);
icon = bufferedImage;
}
COM: <s> dummy icon generation code for test purposes </s>
|
funcom_train/3294339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDepth() {
Node n1=document.getFirstChild();
if (n1!=null) {
Node n2=n1.getFirstChild();
while (n2!=null) {
if (n2.getNodeName().equals("depth")) {
Node n3=n2.getFirstChild();
String tmp=n3.getNodeValue();
try {
return Integer.parseInt(tmp);
} catch(Exception e) {
return -1;
}
}
n2=n2.getNextSibling();
}
}
return -1;
}
COM: <s> retrieves the depth to which to serach </s>
|
funcom_train/26212370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transform() throws Exception {
if (_ui == null) {
return;
}
String xml = _ui.getXMLText();
String xsl = _ui.getXSLTText();
File xslFile = _ui.getXSLTFile();
if (xml.trim().length() == 0) {
_ui.showMessage(ResourceAnchor.text("error.select_source"));
return;
}
if (xsl.trim().length() == 0) {
_ui.showMessage(ResourceAnchor.text("error.select_xslt"));
return;
}
String output = transform(xml, xsl, xslFile);
_ui.setOutputText(output);
}
COM: <s> initiates the transformation process </s>
|
funcom_train/11705613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enqueueFeaturesOfIndexed() throws SAXException {
final int max = indexedFSs.size();
for (int i = 0; i < max; i++) {
int addr = indexedFSs.get(i);
int heapVal = cas.getHeapValue(addr);
enqueueFeatures(addr, heapVal);
}
}
COM: <s> enqueue everything reachable from features of indexed fss </s>
|
funcom_train/32069338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAccountingMovements(Collection<AccountingMovement> accountingMovements) {
boolean addOk = getAccountingMovements().addAll(accountingMovements);
if (addOk) {
for(AccountingMovement accountingMovement : accountingMovements) {
accountingMovement.setAccounting((Accounting)this);
}
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed accounting movements collection to the accounting collection </s>
|
funcom_train/23297576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomIn(Point2D pt) {
Double zoom_factor = Tree2DPanelPreferences.getDefaultZoomFactor();
this.fZoomFactor *= zoom_factor + this.fZoomIncrement;
zoom(pt, zoom_factor + this.fZoomIncrement);
this.fTreePanel.setZoomFactor(this.fZoomFactor);
this.notifyTree2DPaneChangeListeners(new Tree2DPaneChangeEvent(this));
}
COM: <s> zoom in using the point given to center and the current zoom increment </s>
|
funcom_train/20769659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void setPositionComputer(PositionComputer positionComputer) {
this.positionComputer = positionComputer;
putString("positionComputer", positionComputer.toString());
switch (positionComputer) {
case DirectionSelectiveFilter:
dirFilter.setFilterEnabled(true);
opticalGyro.setFilterEnabled(false);
break;
case OpticalGyro:
opticalGyro.setFilterEnabled(true);
dirFilter.setFilterEnabled(false);
}
}
COM: <s> chooses how the current position of the scene is computed </s>
|
funcom_train/31152338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintCursor(int position) {
term.setCursor(position);
Point2D p = getLocation(0, 0, null);
fillLocation(position,
colorMap.translateColor(ColorMap.CURSOR_BACKGROUND), p);
drawString(position, "" + term.rw.getChar(position).getDisplayChar(),
colorMap.translateColor(ColorMap.CURSOR_FOREGROUND), p);
paintStatus();
}
COM: <s> paints the cursor at the given location forces a repaint of the </s>
|
funcom_train/20897530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void beginTransaction() throws SQLException {
try {
// Set the autocommit flag to false to enable transactions
if (connection.getAutoCommit() == true) {
connection.setAutoCommit(false);
}
Statement stmt = connection.createStatement();
stmt.execute("SET CHAINED OFF");
connection.commit();
stmt.execute("BEGIN TRANSACTION");
} catch (SQLException sqle) {
throw sqle;
}
}
COM: <s> the code begin transaction code method executes the commands needed to being </s>
|
funcom_train/9546166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getObjectiveValueMonitor() {
double value = 0.0;
for (int i = 0; i < this.getNumberOfMonitors() - 1; i++) {
for (int j = i + 1; j < this.getNumberOfMonitors(); j++) {
value = value + monitorPositions[i].getDownhillSimplexError(monitorPositions[j]);
}
}
return value;
}
COM: <s> objective function for monitor downhill simplex </s>
|
funcom_train/18737420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTargetEnum(ClassScope classScope,String kind) {
if ((onTypeBinding.getAccessFlags() & ACC_ENUM)!=0) {
classScope.problemReporter().signalError(sourceStart,sourceEnd,
"can't make inter-type "+kind+" declarations on enum types.");
ignoreFurtherInvestigation = true;
return true;
}
return false;
}
COM: <s> checks that the target for the itd is not an enum </s>
|
funcom_train/39379855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setForward(Class pageClass) {
String target = getContext().getPagePath(pageClass);
// If page class maps to a jsp, convert to htm which allows ClickServlet
// to process the redirect
if (target != null && target.endsWith(".jsp")) {
target = StringUtils.replaceOnce(target, ".jsp", ".htm");
}
setForward(target);
}
COM: <s> set the request to forward to the given page class </s>
|
funcom_train/50940153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getNewBean() {
Account bean = (Account)super.getNewBean();
if ( bean != null ) {
int nb = EuroBudget.getInstance().getDataModel().getAccounts().size() +1;
bean.setName(i8n.getString("edAcc_Account#")+nb);
}
return bean;
}
COM: <s> get a new bean </s>
|
funcom_train/34587424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void syncBegin(SyncSourceEvent event) {
if (Logger.isLoggable(Logger.DEBUG)) {
Logger.debug("SyncSourceEvent - Sync begin - date: " +
event.getDate () +
" - sourceUri: " +
event.getSourceUri () +
" - sync mode: " +
event.getSyncMode () );
}
}
COM: <s> notify a sync source begin synchronization </s>
|
funcom_train/986798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand5() {
if (backCommand5 == null) {//GEN-END:|98-getter|0|98-preInit
// write pre-init user code here
backCommand5 = new Command("Back", Command.BACK, 0);//GEN-LINE:|98-getter|1|98-postInit
// write post-init user code here
}//GEN-BEGIN:|98-getter|2|
return backCommand5;
}
COM: <s> returns an initiliazed instance of back command5 component </s>
|
funcom_train/39487652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getTextValue(Element el, String tagName) {
String txtVal = null;
NodeList nl = el.getElementsByTagName(tagName);
if(nl != null && nl.getLength() > 0 && nl.item(0).getFirstChild() != null) {
txtVal = ((Element)nl.item(0)).getFirstChild().getNodeValue();
}
return txtVal;
}
COM: <s> get the value from a text node </s>
|
funcom_train/11757575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone(){
Flag f = new Flag();
f.name=name;
f.valueList=(Struct)valueList.copy();
f.value=value.copy();
f.defaultValue=defaultValue.copy();
f.modifiable=modifiable;
f.libraryName=libraryName;
return f;
}
COM: <s> gets a deep copy of the flag </s>
|
funcom_train/2731607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BagValue visit(BagTerm bagTerm) {
logger.debug("<BagTerm>");
Collection<?>/*<Term>*/ terms = bagTerm.getTerm();
List<Value> bag = new ArrayList<Value>();
for (Object o : terms) {
Term nextTerm = MDRConnector.toTerm(o);
Value nextValue = visit(nextTerm);
bag.add(nextValue);
}
logger.debug("<Value>" + bag + "</Value>");
logger.debug("</BagTerm>");
return new BagValue(bag);
}
COM: <s> evaluates a bag term </s>
|
funcom_train/2027758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsNew() throws Exception {
assertFalse(this.rootNode.isNew());
Node a = this.rootNode.addNode("a");
assertTrue(a.isNew());
this.session.save();
assertFalse(a.isNew());
Property p = a.setProperty("p", false);
assertTrue(p.isNew());
this.session.save();
assertFalse(p.isNew());
}
COM: <s> tests new state </s>
|
funcom_train/39243485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getCountryItems() {
//TODO: select the country from a list using ajax
List countryList = adminService.getCountries();
List items = new ArrayList();
for (Iterator iterator = countryList.iterator(); iterator.hasNext();) {
Country country = (Country) iterator.next();
items.add(new SelectItem(country.getName()));
}
return items;
}
COM: <s> retrieve the list of countries for display in a popup </s>
|
funcom_train/28902071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SetOfStatements toRDF() {
Set<Statement> statements = new HashSet<Statement>();
for (Map.Entry<String,String> e: this.entrySet()) {
statements.add(new StatementImpl(RDFConstants.LARKC_ATTVALUESUBJECT,
RDFConstants.LARKC_ATTVALUE, new LiteralImpl(e.getKey() + "->" + e.getValue()))); // TODO check again for "->"
}
return new SetOfStatementsImpl(statements);
}
COM: <s> get an rdf representation of the attribute value map </s>
|
funcom_train/48443709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopAll() {
for (String pluginId : plugins.keySet()) {
if (runningPlugins.containsKey(pluginId)) {
try {
stopPlugin(pluginId);
} catch (PluginException e) {
System.err.println("Failed to stop: " + pluginId + ": " + e.toString());
}
}
}
}
COM: <s> stop all currently running plugins </s>
|
funcom_train/4305011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void animate(int fromValue, int toValue, int duration) {
int fFromValue = CoreMath.toFixed(fromValue);
int fToValue = CoreMath.toFixed(toValue);
setBehavior(new Tween(fFromValue, fToValue, duration));
}
COM: <s> animates this property from the one integer from value to another to value </s>
|
funcom_train/43692310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected RecordDTO createSearchData(RecordDTO data) {
RecordDTO searchData = new RecordDTO();
searchData.setExternalId(data.getExternalId());
searchData.setRecordType(data.getRecordType());
searchData.setRepositoryCode(data.getRepositoryCode() != null ? data.getRepositoryCode() : defaultRepositoryCode);
return searchData;
}
COM: <s> create a lightweight </s>
|
funcom_train/27859399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String printOption(String attribute, String[] value) {
String ret = attribute + "=\"";
for (int i = 0; i < value.length; i++) {
if (i > 0)
ret += " ";
ret += value[i];
}
return ret + "\" ";
}
COM: <s> write a string list option </s>
|
funcom_train/33705728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDescription(String description) {
LOGGER.entering("UserStory", "setDescription", description);
if (description == null) {
throw new IllegalArgumentException("Description should not be "
+ "null");
}
this.description = description;
LOGGER.exiting("UserStory", "setDescription", this.description);
}
COM: <s> changes the description of this </s>
|
funcom_train/7708017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String successXml(String message) {
String error = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
error += "<success><message>" + message + "</message></success>";
return error;
}
COM: <s> change success message to xml </s>
|
funcom_train/19765773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand1() {
if (backCommand1 == null) {//GEN-END:|70-getter|0|70-preInit
// write pre-init user code here
backCommand1 = new Command("\u540E\u9000", Command.BACK, 0);//GEN-LINE:|70-getter|1|70-postInit
// write post-init user code here
}//GEN-BEGIN:|70-getter|2|
return backCommand1;
}
COM: <s> returns an initiliazed instance of back command1 component </s>
|
funcom_train/31873345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String receiveMessage() {
String message = "";
try {
MessagingSocket dataSocket = new MessagingSocket(this.connectionSocket.accept());
//System.out.println("Connection accepeted.");
// receive message
message = dataSocket.receiveMessage();
//System.out.println("Message received: "+message);
// close the data socket
dataSocket.close();
}
catch(Exception e) {
//System.out.println("Creating socket failed. "+connectionSocket);
}
return message;
}
COM: <s> receive a message on the socket </s>
|
funcom_train/45070340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean handleDirs(final ZipEntry entry, final String name, final File directory) {
if (entry.isDirectory()) {
if (!name.startsWith(SAR_INF)) {
final File newDir = new File(directory, name);
newDir.mkdirs();
}
return true;
}
else {
return false;
}
}
COM: <s> handle expansion of dirs in the zipfile </s>
|
funcom_train/21437802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addObject(String name, Object o) {
if( o!=null ) {
Vector<Object> v = sub_objects.get(name);
if( v==null )
sub_objects.put(name,v = new Vector<Object>());
v.add(o);
}
}
COM: <s> add a sub object with a given name </s>
|
funcom_train/7295892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void register(final String pattern, final HttpRequestHandler handler) {
if (pattern == null) {
throw new IllegalArgumentException("URI request pattern may not be null");
}
if (handler == null) {
throw new IllegalArgumentException("Request handler may not be null");
}
matcher.register(pattern, handler);
}
COM: <s> registers the given </s>
|
funcom_train/2023182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createDialog() {
setSize(WIDTH, HEIGHT);
setCenteredLocation();
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
// remove the listener - otherwise we get the strange behavior that one
// frame receives a window-event for every single open frame!
removeWindowListener(this);
// add listener anew
addWindowListener(this);
}
COM: <s> creates the frame </s>
|
funcom_train/14460699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCell(CellHandle ch){
if(cr!=null)cr.addCellToRange(ch);
// get cellrange coords fr,fc,lr,lc
try{
int[] coords = cr.getRangeCoords();
// update the coords of this rec
// ccf = ; always ONE?
// grbit = ; who knows??
rwFirst = (short)coords[0];
colFirst = (short)coords[1];
rwLast = (short)coords[2];
colLast = (short)coords[3];
}catch(Exception e){
Logger.logWarn("re-initializing Conditional format failed: " + e.toString());
}
}
COM: <s> add a cell to this conditional format </s>
|
funcom_train/21022752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRolesToNotify() {
String roles = "";
if (dataTable.getRowCount()>0) {
for (int i = 0; i<dataTable.getRowCount(); i++){
roles += dataTable.getText(i,0) + ",";
}
}
// Removes last ',' character
if (roles.length()>0) {
roles = roles.substring(0, roles.length()-1);
}
return roles;
}
COM: <s> gets the users string to notify </s>
|
funcom_train/23261529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServiceExecutor getServiceExecutor(String serverUrl) {
//TODO refactor this
String withoutXmlRpc = serverUrl.replaceAll("/xmlrpc.cgi", "");
if (!executors.containsKey(withoutXmlRpc)) {
executors.put(withoutXmlRpc, new ServiceExecutor(serverUrl));
}
return executors.get(withoutXmlRpc);
}
COM: <s> return same object for same server </s>
|
funcom_train/36678892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void supplyUnitsInTransport() {
if (stats.canTransport() && !transport.isEmpty()) {
for (Locatable locatable : transport) {
Unit unit = (Unit) locatable;
if (stats.canSupplyUnitInTransport(unit)) {
supplyInTransport(unit);
unit.heal(stats.healRate);
}
}
}
}
COM: <s> if this unit is transporting units and it can supply the units </s>
|
funcom_train/46156311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void compute(ProcessorArmingCollection collection) {
if(frameIndex > (30*seconds)) {
ClientContextJME.getWorldManager().removeEntity(this.getEntity());
this.getEntity().removeComponent(JBulletProcessor.class);
}
world.stepSimulation(1/60f, 10);
frameIndex +=1;
}
COM: <s> the calculate method </s>
|
funcom_train/33281485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String jsxGet_defaultValue() {
String value = ((HtmlTextArea) getDomNodeOrDie()).getDefaultValue();
if (getBrowserVersion().hasFeature(BrowserVersionFeatures.TEXTAREA_CRNL)) {
value = NORMALIZE_VALUE_PATTERN.matcher(value).replaceAll("$1\r\n");
}
return value;
}
COM: <s> returns the textareas default value used if the containing form gets reset </s>
|
funcom_train/2897844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dragEnter(DropTargetDragEvent e) {
if (isDragOk(e) == false) {
this.dropComponent.dragUnderFeedback(false, e);
e.rejectDrag();
return;
}
this.dropComponent.dragUnderFeedback(true, e);
e.acceptDrag(e.getDropAction());
}
COM: <s> start drag under feedback on component </s>
|
funcom_train/50166919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String validateRequiredField(String value) {
if (isFieldRequired == false) {
return null;
} //end if ()
if (value.equals(PedroResources.EMPTY_STRING) == true) {
String message
= PedroResources.getMessage("validation.fieldCantBeEmpty",
fieldName);
return message;
} //end if ()
else {
return null;
} //end else
}
COM: <s> checks to make sure that a required field has a non empty value </s>
|
funcom_train/35082414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent event) {
if (event.getSource() == useProperties) {
if (useProperties.isSelected()) {
this.jndiICF.setEnabled(false);
this.urlField.setEnabled(false);
} else {
this.jndiICF.setEnabled(true);
this.urlField.setEnabled(true);
}
}
}
COM: <s> when the state of a widget changes it will notify the gui </s>
|
funcom_train/12563041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void completed(Thread thr, LinkMessage msg, Throwable exc) {
synchronized (lock) {
assertFalse("shouldn't be done already",
doneset.containsKey(thr));
doneset.put(thr, thr);
if (msg != null) {
messages.put(thr, msg);
}
if (exc != null) {
throwables.put(thr, exc);
}
}
}
COM: <s> common code for completion callbacks for logging receiver and </s>
|
funcom_train/16103227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnChooseStartPage() {
if (btnChooseStartPage == null) {
btnChooseStartPage = new JButton();
btnChooseStartPage.setText(rb.getString("panel.admin.host.choose")); //$NON-NLS-1$
}
btnChooseStartPage.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
btnChooseStartPageActionPerformed(e);
}
});
return btnChooseStartPage;
}
COM: <s> this method initializes btn choose start page </s>
|
funcom_train/26655583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OtherPatientID getOtherPatientIDForIssuer(String issuer) {
if (otherPatientIDs == null || otherPatientIDs.size() == 0) {
return null;
}
for (OtherPatientID opid : otherPatientIDs) {
if (issuer.equals(opid.getIssuerOfPatientID())) {
return opid;
}
}
return null;
}
COM: <s> given an issuer find the corresponding patient id </s>
|
funcom_train/24187501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendVALUEPseudo(String variableID, Val value, String child) {
if(LOG)
log(variableID, "Sending a VALUE message to pseudo_child " + child);
VALUEmsgPseudo<Val> msg = new VALUEmsgPseudo<Val>(variableID, child, value);
sendMessageToVariable(child, msg);
}
COM: <s> send a value message to a pseudo child </s>
|
funcom_train/19454747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(ObjectCache anObjectCache) {
Enumeration theKeys = anObjectCache.getKeys();
String theClassName = null;
Vector theObjects = null;
while (theKeys.hasMoreElements()) {
theClassName = (String) theKeys.nextElement();
theObjects = anObjectCache.getObjects(theClassName);
add(theClassName, theObjects);
}
}
COM: <s> adds the given object cache contents to this object cache </s>
|
funcom_train/45692152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFxSendPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PartWithCommon_fxSend_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PartWithCommon_fxSend_feature", "_UI_PartWithCommon_type"),
EsxPackage.Literals.PART_WITH_COMMON__FX_SEND,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the fx send feature </s>
|
funcom_train/35832864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPreviewVisibility ( boolean visible ) {
if (!visible) {
Image i = new BufferedImage(width,width,BufferedImage.TYPE_INT_RGB);
Graphics image_g = i.getGraphics();
image_g.drawImage(background, -pos.x, -pos.y, this);
Graphics g = getGraphics();
g.drawImage(i, 0, 0, this);
} else {
repaint();
add(previewBox);
}
}
COM: <s> repaints the preview box area to show background if it is not </s>
|
funcom_train/51558156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSelectedXSD(){
I_CmsXmlContentValue value = getDocument().getValue(m_xsdXpath, getLocale());
if (value != null){
return value.getStringValue(m_adminCms);
} else {
LOG.info("No selected XSD found for XPath: " + m_xsdXpath);
//LOG.info("Document: " + getDocument());
return null;
}
}
COM: <s> read the xsd with the m xsd xpath from the current document </s>
|
funcom_train/36931962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fallOff(final float theConstant, final float theLinear, final float theQuadratic){
if(theConstant < 0 || theLinear < 0 || theQuadratic < 0)throw new CCGraphicsException("Only use non negative fall off values.");
_myCurrentLightFalloffConstant = theConstant;
_myCurrentLightFalloffLinear = theLinear;
_myCurrentLightFalloffQuadratic = theQuadratic;
}
COM: <s> sets the fall off rates for point lights spot lights and ambient lights </s>
|
funcom_train/28975673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConfiguration(final Source source) throws Exception {
if (source.exist()) {
logger.info(" -> adding source: " + source.getSourceName() + " - "
+ source.getClass() + " - " + source.toString());
final Element root = XmlHandling.readXml(source);
addConfiguration(root);
} else {
logger.warn("source doesn't exist!");
}
}
COM: <s> adds another configuration file to this configurator usefull if you </s>
|
funcom_train/18837404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeAllJobs() {
((DefaultListModel) this.jobsList.getModel()).removeAllElements();
try {
SessionHandler.getService().abort(new Long(-1), ComputingInterface.ABORT_AND_REMOVE);
} catch (RemoteException e) {
}
}
COM: <s> remove all jobs from local list and release their resources from the </s>
|
funcom_train/31684318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSummary(String sSummary) {
if (sSummary == null) {
sSummary = "";
}
if (m_bIsPopulated) {
if ((m_sSummary == null && sSummary != null)
|| (m_sSummary.trim().equals(sSummary.trim()) == false)) {
m_bIsChanged = true;
}
}
m_sSummary = sSummary;
}
COM: <s> set the object summary </s>
|
funcom_train/27824243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInsertPosition(InferedOIModelNode node,InferedOIModelNode newNode) {
TreeNode[] children=node.getChildren();
for (int i=0;i<children.length;i++) {
int result=PropertyInstanceNodeComparator.INSTANCE.compare(children[i],newNode);
if (result>=0)
return i;
}
return children.length;
}
COM: <s> returns the position at which the supplied node should be inserted </s>
|
funcom_train/19209076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getPersistentAsSet(IResource resource) throws CoreException{
Set result= (Set)defaultValue;
String storedValue= resource.getPersistentProperty(key);
if(storedValue != null){
result= new HashSet();
final String[] splittedValues= VALUE_SEPARATOR_REGEX.split(storedValue, -1);
for(int i= 0; i < splittedValues.length; i++){
result.add(unescapeValue(splittedValues[i]));
}
}
if(result != null){
result= Collections.unmodifiableSet(result);
}
return result;
}
COM: <s> gets a persisted property as a unmodifiable set of strings </s>
|
funcom_train/43297184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MglStreams(final String dev_filename){
System.out.println("OS name is "+System.getProperty("os.name"));
setOsType(System.getProperty("os.name"));
if(!open(dev_filename)){
System.out.println("MglStreams.open() error\n");
}
reset();
}
COM: <s> device file constructor </s>
|
funcom_train/17935173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem getABPSjMenuItem() {
if (abpsjMenuItem == null) {
abpsjMenuItem = new JRadioButtonMenuItem();
abpsjMenuItem.setText("ABPS");
abpsjMenuItem.setSelected(true);
abpsjMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent e) {
setLookAndFeel("org.jvnet.substance.skin.SubstanceModerateLookAndFeel");
}
});
}
return abpsjMenuItem;
}
COM: <s> this method initializes get abpsj menu item </s>
|
funcom_train/15603745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveToFrame(int frame, SubjectAndQueryComparisonGlyph glyph) {
TierGlyph currentParent = (TierGlyph)glyph.tierAncestor();
TierGlyph tier = getTierForFrame(frame);
if ( currentParent == tier ) return;
currentParent.removeGenomicChild(glyph);
glyph.setNewFrame(frame);
tier.addGenomicChild(glyph);
if ( tier.getState() != TierGlyph.EXPANDED ) {
showFrame(frame, true);
}
}
COM: <s> move the glyph from its current tier to the specified tier </s>
|
funcom_train/38998756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int checkFcmp(float input) {
if (input == 0) {
return 700;
} else if (input >= 1 && input <= 10) {
return 800;
} else if (input > 10 && input < 100) {
return 900;
} else if (input != 100) {
return 1000;
}
return 2000;
}
COM: <s> checks all fcmp opcodes </s>
|
funcom_train/41417043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void joinPlayer(int id, String name, long challenge) {
super.joinPlayer(id, name, challenge);
// broadcast all active players
sendActive();
// send a game start if it's already running
if (this.game.isStarted()) {
super.send(Event.GAME_START, null);
}
}
COM: <s> a new player has connected </s>
|
funcom_train/35742732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addService(ModuleClassID mcid, Object module) {
if(null == mcid) {
throw new IllegalArgumentException("Illegal ModuleClassID");
}
if(null == module) {
throw new IllegalArgumentException("Illegal module");
}
services.put(mcid, module);
}
COM: <s> add a service to the set of services entries described in this </s>
|
funcom_train/6473932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scheduleAction( Commitment commitment, Action action ) {
Logger.getLogger( name ).log( Level.FINE, "[" + getName() + "]: Scheduling: " + commitment.getActivity().toString() );
schedule.add( new ScheduleItem( commitment, action ) );
}
COM: <s> this method is called from the commitment manager and is used to </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.