__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/5437115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readFully(byte[] buf) throws IOException {
if(buf == null) {
throw new NullPointerException();
}
if(available() < buf.length) {
throw new EOFException();
}
int nRead = read(buf);
if(nRead != buf.length) { // Huh?
throw new IOException("Could read only [" + nRead + "] bytes.");
}
}
COM: <s> attempts to fully read buf </s>
|
funcom_train/2860665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void displayAnchor(ElementInfoObject eio, StringBuffer out){
String tmp = eio.value;
if (tmp==null)
tmp = "";
out.append("<td colspan=\"2\">");
out.append("<a href=\"" + tmp + "\" target=HelpWindow>" +tmp+ "</a>");
out.append("</td>\n");
}//displayAnchor
COM: <s> generate the html to display an anchor display </s>
|
funcom_train/46522867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showView(String panelName) {
if (panelName == null)
return;
for (Iterator<AbstractCalendarView> iter = calendarViews.values().iterator(); iter.hasNext();) {
AbstractCalendarView panel = (AbstractCalendarView) iter.next();
if (panelName.equals(panel.getButton().getActionCommand())) {
panel.getButton().doClick();
return;
}
}
}
COM: <s> show the specified view </s>
|
funcom_train/36466425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document loadFirstPage(NameValuePair[] input) {
PostMethod method = new PostMethod(searchActionUrl);
method.setRequestBody(input);
try{
client.executeMethod(method);
Document firstPage = htmlParser.parse(method.getResponseBodyAsStream(), method.getURI().toString(),
method.getRequestCharSet());
method.releaseConnection();
return firstPage;
}
catch(Exception e) {
e.printStackTrace();
return null;
}
}
COM: <s> loads the first page of a search </s>
|
funcom_train/22757935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final protected FavoriteViewTreeNode fromXML(String input, Connection con) {
FavoriteViewXMLHandler defaultHandler = new FavoriteViewXMLHandler(con);
SAXParserFactory sF = SAXParserFactory.newInstance();
SAXParser parser = null;
try {
ByteArrayInputStream bin =
new ByteArrayInputStream(input.getBytes("UTF-8")); //$NON-NLS-1$
parser = sF.newSAXParser();
parser.parse(bin, defaultHandler);
return defaultHandler.getRoot();
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
COM: <s> takes the xml representation of a favorite view tree structure and </s>
|
funcom_train/49469100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newSheet(String _title) {
String title = _title;
if(title == null)
title = " ";
Matcher m = p_forbidden_chars.matcher(title);
if(m!=null)
title = m.replaceAll("-");
if(title != null && title.length()>31){ //excel limitation
sheet = wb.createSheet(title.substring(0, 28)+"...");
}
else
sheet = wb.createSheet(title);
rowcount =-1;
cellcount = -1;
}
COM: <s> create a new sheet </s>
|
funcom_train/38325657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ReturnVector executeFunction(Rete engine, Parameter[] params) {
boolean successful = false;
TemporalCalculation calculation = new TemporalCalculation();
Collection rules = engine.getCurrentFocus().getAllRules();
successful = calculation.calcuateDistance(engine, rules);
DefaultReturnVector rv = new DefaultReturnVector();
DefaultReturnValue value = new DefaultReturnValue(Constants.BOOLEAN_OBJECT, new Boolean(successful));
rv.addReturnValue(value);
return rv;
}
COM: <s> function isnt implemented yet </s>
|
funcom_train/38513081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyFileGenerated(CompilationEvent pEvent, String pDest) {
if (compilationListener == null) return;
for (Iterator iterator = compilationListener.iterator(); iterator.hasNext();) {
CompilationListener listener = (CompilationListener) iterator.next();
listener.fileGenerated(pEvent, pDest);
}
}
COM: <s> notify all compilation listeners that a file was generated </s>
|
funcom_train/4520066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateAncestorsGreyness(TreePath path) {
TreePath[] parents = new TreePath[path.getPathCount()];
parents[0] = path;
boolean greyAll = isPathGreyed(path);
for (int i = 1; i < parents.length; i++) {
parents[i] = parents[i - 1].getParentPath();
if (greyAll) {
addToGreyedPathsSet(parents[i]);
} else {
updatePathGreyness(parents[i]);
greyAll = isPathGreyed(parents[i]);
}
}
}
COM: <s> update the grayness value of the parents of path </s>
|
funcom_train/207048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDirectory(String dirName) throws FileResourceException {
boolean isDir = true;
String currentDirectory = getCurrentDirectory();
try {
setCurrentDirectory(dirName);
}
catch (FileResourceException e) {
isDir = false;
}
finally {
try {
setCurrentDirectory(currentDirectory);
}
catch (Exception e) {
// do nothihng
// ???
}
}
return isDir;
}
COM: <s> return true if the input is a directory in the ftp resource </s>
|
funcom_train/214765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration listAttributes() {
Vector attList = new Vector();
try {
pStmt = conn.prepareStatement("SELECT attr_id FROM component_attributes");
ResultSet rs = pStmt.executeQuery();
while(rs.next()){
attList.add(rs.getString("attr_id"));
logger.debug("Attr _ Id " + rs.getString("attr_id"));
}
} catch (SQLException e) {
logger.debug("Unable to retrieve attributeId values from component_attributes");
e.printStackTrace();
}
return attList.elements();
}
COM: <s> lists the attributes that are available for the components within this repository </s>
|
funcom_train/13724925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMagicBuiltinsTransformation() throws Exception {
final String prog = "parent(1,2).\n"
+ "parent(?n1,?n2) :- parent( ?n, ?n1 ), ?n+1=?n1, ?n+2=?n2, ?n1 < 10.\n"
+ "parent(10,1).\n"
+ "tc(?x,?y):- tc(?x,?z),parent(?z,?y).\n"
+ "tc(?x,?y):- parent(?x,?y).\n"
+ "?-tc(10,9).\n";
final String expected = "dummy.";
Helper.evaluateWithAllStrategies(prog, expected);
}
COM: <s> tests the correct evaluation of a program containing built ins and </s>
|
funcom_train/30275742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String reconnectOnFailedPing(String oldSessionId) throws DashboardException {
try {
DashboardSessionManager.getInstance().getSession(oldSessionId);
return oldSessionId;
} catch (DashboardException e) {
if (LOG.isWarnEnabled()) {
LOG.warn("Reconnect on failed ping in Dashboard failed"
+ ", oldSessionId = " + oldSessionId
+ ", message:" + e.getMessage());
}
throw e;
}
}
COM: <s> reconnect on failed ping </s>
|
funcom_train/5236061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onMouseEvent(MouseEvent event, int eventType) {
if (event.button == 1) {
Cell cell = agileGrid.getCell(event.x, event.y);
if (cell == Cell.NULLCELL) {
return;
}
cell = agileGrid.getValidCell(cell.row, cell.column);
handleEditorActivationEvent(new EditorActivationEvent(cell, event,
eventType), null);
}
}
COM: <s> processes the mouse event if needed activates the cell editor </s>
|
funcom_train/19412914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void runTask(Task t) {
//Setup runner and monitor
SwingTaskRunner taskRunner = new SwingTaskRunner(t,platform);
monitor = null;
//if (getFrame().isVisible())
monitor = new SimpleProgressDialog(this, taskRunner);
//Start the runner and show the monitor
taskRunner.start();
//if (monitor!=null)
monitor.setVisible(true);
}
COM: <s> should not return until task completed </s>
|
funcom_train/12179323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIncrementalFragments() throws Exception {
initializeTest();
rewrite("icon.jpg#fragment-1", PageURLType.IMAGE);
rewrite("icon.jpg#fragment-2", PageURLType.IMAGE);
assertTrue(prerendererPackageContext.getIncrementalRewrittenURIMap().size() == 1);
}
COM: <s> tests that two uris which differs only by fragment component are treat </s>
|
funcom_train/125828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void tsmonthly() throws ParseException {
Token x;
jj_consume_token(MONTH);
x = jj_consume_token(INTEGER);
int subPeriod = Double.valueOf(x.image).intValue();
TSDate mainDate = (TSDate) argStack.pop();
argStack.push(new TSDate(mainDate.mainPeriod(), subPeriod, 12));
}
COM: <s> monthly 1960 m11 </s>
|
funcom_train/16616545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getJcifsFile() throws FileNotFoundException {
File file = new File(homeDir, Definitions.DIRNAME_CONFIG + File.separatorChar + Definitions.FILENAME_JCIFS);
if (!file.isFile()) {
throw new FileNotFoundException("Could not find jcifs properties file \"" + file.getAbsolutePath() + "\"");
}
return file;
}
COM: <s> returns a file object denoting the jcifs configuration file jcifs </s>
|
funcom_train/38310866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setColumnAttributes(Column column, List<MarkupAttribute> columnAttributes) {
if (columnAttributeMaps == null) {
columnAttributeMaps = new HashMap<String, List<MarkupAttribute>>();
}
columnAttributeMaps.put(column.getName(), columnAttributes);
}
COM: <s> sets the column styles </s>
|
funcom_train/41721919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasRelations() {
Iterator<String> attNameIterator;
for (attNameIterator = relations.keySet().iterator(); attNameIterator.hasNext();) {
String attributeName = attNameIterator.next();
Set<RelationEnd> attributeRelations = relations.get(attributeName);
if (!attributeRelations.isEmpty())
return true;
}
return false;
}
COM: <s> returns true if this simple case has at least one relation false </s>
|
funcom_train/47705102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int disruptService(Map modules) {
String kill = (String) modules.get("kill");
StringBuffer context = HAModuleReader.shellHead(modules, this.server
.getIp(), "root", this.server.getRootpassword());
String temp = kill + SystemConst.LINE_SEPERATOR;
String process = "heartbeat";
temp = temp.replace("$process", process);
context.append(temp);
HAModuleReader.shellTail(modules, context, "kill_heartbeat"
+ this.server.getHostname());
return 0;
}
COM: <s> kill all the service of heartbeat </s>
|
funcom_train/40344610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GQuery nextAll() {
JsNodeArray result = JsNodeArray.create();
for (Element e : elements) {
allNextSiblingElements(e.getNextSiblingElement(), result, null, null);
}
return pushStack(unique(result), "nextAll", getSelector());
}
COM: <s> find all sibling elements after the current element </s>
|
funcom_train/18479408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void retrieveCanvases(org.liberatis.sphaera.mvc.View<?,?> po,Set<Canvas3D> set) {
if (po.getContent() instanceof Canvas3D && po.getParent() != null) {
set.add((Canvas3D)po.getContent()) ;
}
for(org.liberatis.sphaera.mvc.View<?,?> child: po.getChildren()) {
retrieveCanvases(child,set) ;
}
}
COM: <s> retrieves a list of all active canvases in the animation </s>
|
funcom_train/2505003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean verifyCert(CertificateBag certificate) {
if (Constants.USE_SECURITY) {
try {
((X509Certificate) certificate.getKey()).verify(keyManagement.getCACertificate().getPublicKey());
return true;
} catch (Exception e) {
log.error("Couldn't verify authenticity of provided certificate! Reason: " + e.getMessage());
return false;
}
} else
return true;
}
COM: <s> verifies if the provided certificate has been issued and signed from the </s>
|
funcom_train/36950909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(IStructuredSelection selection) {
List newLibraries = new ArrayList();
for (int i = 0; i < fLibraries.length; i++) {
newLibraries.add(fLibraries[i]);
}
Iterator iterator = selection.iterator();
while (iterator.hasNext()) {
Object element = iterator.next();
if (element instanceof LibraryStandin) {
newLibraries.remove(element);
}
}
fLibraries= (LibraryStandin[]) newLibraries.toArray(new LibraryStandin[newLibraries.size()]);
fViewer.refresh();
}
COM: <s> remove the libraries contained in the given selection </s>
|
funcom_train/40851319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getResource(String resourceKey, String defaultValue, Tag tag, PageContext context) {
String i18nStr = BundleCst.BUNDLE.getString(resourceKey);
if (i18nStr == null)
i18nStr = "???" + resourceKey + "???";
if (LOGGER.isDebugEnabled())
LOGGER.debug("displaytag is getting the message for [resourceKey=" + resourceKey + ", defaultValue=" + defaultValue + "] ---> " + i18nStr);
return i18nStr;
}
COM: <s> just get it the way we set it in org </s>
|
funcom_train/39950098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getJComboBoxFormat() {
if (jComboBoxFormat == null) {
jComboBoxFormat = new JComboBox(new String[]{"0","1","2","3"});
jComboBoxFormat.setPreferredSize(new Dimension(150, 27));
jComboBoxFormat.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
jComboBoxFormat.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setDeviceClass();
}
});
}
return jComboBoxFormat;
}
COM: <s> this method initializes j combo box format </s>
|
funcom_train/45453428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedPositions(final String[] selectedPositions) {
if (selectedPositions == null) {
this.selectedPositions = null;
return;
}
this.selectedPositions = new String[selectedPositions.length];
for (int i = 0; i < selectedPositions.length; i++) {
this.selectedPositions[i] = selectedPositions[i];
}
}
COM: <s> sets the indices of the selected positions </s>
|
funcom_train/31414319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addedANode() {
getTree().setCellRenderer(new StandardTreeCellRenderer());
TreePath path = getTree().getSelectionPath();
StandardTreeModel sm = getTreeModel();
if(sm!= null)
sm.fireTreeNodeInserted(this);
getTree().expandPath(path);
}
COM: <s> add a node to the tree </s>
|
funcom_train/48625167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMostRecentLoginDate(Timestamp mostRecentLoginDate) {
if( this.mostRecentLoginDate != null )
{
setLastLoginDate(this.mostRecentLoginDate);
}
else if( lastLoginDate == null && mostRecentLoginDate != null )
{
setLastLoginDate(mostRecentLoginDate);
}
this.mostRecentLoginDate = mostRecentLoginDate;
}
COM: <s> sets the most recent login date and moves the old most </s>
|
funcom_train/35169516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int parse(TestElement el, int parseCount) {
if (this.SOURCE == null) {
this.SOURCE = this.openFile(this.FILENAME);
}
try {
if (this.READER == null) {
this.READER = new BufferedReader(new FileReader(this.SOURCE));
}
return parse(this.READER, el, parseCount);
} catch (Exception exception) {
log.error("Problem creating samples", exception);
}
return -1;// indicate that an error occured
}
COM: <s> parse the entire file </s>
|
funcom_train/10773192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIllegalState() {
EntityManager em = currentEntityManager();
RuntimeTest1 a = new RuntimeTest1("foo", 10);
em.find(RuntimeTest1.class, _id);
try {
em.persist(a);
fail("persist...");
}
catch (Exception ise) {
}
endEm(em);
}
COM: <s> this method tries to perform operations that should lead to illegal </s>
|
funcom_train/43907918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShapesId(int[] ids) {
if (ids == null) {
this.numShapesId = 0;
} else {
this.shapesId = ids;
this.numShapesId = 0;
for (int i = 0; i < ids.length; i++) {
if (ids[i] == -1) {
break;
}
this.numShapesId++;
}
}
}
COM: <s> sets the shape ids </s>
|
funcom_train/16461865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setStatus(SmsInternetServiceStatus status, String detail) {
if(this.status == null || !this.status.equals(status) || this.statusDetail == null || this.statusDetail.equals(detail)) {
this.status = status;
this.statusDetail = detail;
LOG.debug("Status [" + status.name()
+ (detail == null?"":": "+detail)
+ "]");
if (smsListener != null) {
smsListener.smsDeviceEvent(this, status);
}
}
}
COM: <s> set the status of this </s>
|
funcom_train/7660760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetWaitingThreadsIAE() {
final PublicReentrantLock lock = new PublicReentrantLock();
final Condition c = (lock.newCondition());
final PublicReentrantLock lock2 = new PublicReentrantLock();
try {
lock2.getWaitingThreads(c);
shouldThrow();
} catch (IllegalArgumentException success) {
} catch (Exception ex) {
unexpectedException();
}
}
COM: <s> get waiting threads throws iae if not owned </s>
|
funcom_train/32655879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSignature(String signature) {
if(!isPrimitiveType(signature) && !signature.startsWith("[")) {
if(!signature.startsWith("L") && !signature.endsWith(";")) {
this.signature = "L" + signature + ";";
return;
}
}
this.signature = signature;
}
COM: <s> sets the signature </s>
|
funcom_train/22950077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDesiredOutput(int index, double value) throws Exception{
if (index < 0 || index >= this.desiredOutputs.size()) throw new Exception ("TrainingPattern: setDesiredOutput: index of desired output out of range");
this.desiredOutputs.set(index, value);
}
COM: <s> sets desired value at specific output </s>
|
funcom_train/31687305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PropertyInstanceStore getPropertyInstanceStore(String sPropName) {
PropertyInstanceStore propStoreResult = null;
Iterator iter = m_propStores.keySet().iterator();
while (iter.hasNext() == true && propStoreResult == null) {
PropertyInstanceStore propStore =
(PropertyInstanceStore) m_propStores.get(iter.next());
if (propStore.contains(sPropName) == true) {
propStoreResult = propStore;
}
}
return propStoreResult;
}
COM: <s> returns the code property instance store code assocated with the </s>
|
funcom_train/18032112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTree getTree() {
if (m_tree == null) {
m_tree = new JTree();
m_tree.setModel(new CategoryTreeModel());
m_tree.setCellRenderer(new CategoryTreeCellRenderer());
m_tree.setScrollsOnExpand(true);
m_tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
m_tree.setShowsRootHandles(true);
m_tree.setRootVisible(false);
m_tree.addTreeSelectionListener(new MyTreeSelectionListener());
}
return m_tree;
}
COM: <s> returns the tree with the categories </s>
|
funcom_train/12067672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int makeTexture(int[] pixels, int w, int h, boolean anisotropic) {
if (pixels != null) {
pixels = flipPixels(pixels, w, h);
ByteBuffer pixelsRGBA = convertImagePixelsRGBA(pixels);
return makeTexture(pixelsRGBA, w, h, anisotropic);
}
return 0;
}
COM: <s> create a texture from the given pixels in the default java argb int </s>
|
funcom_train/1834460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Date getDate(java.util.regex.Matcher matcher) {
if (matcher.find()) {
String date = matcher.group(1) + ' ' + matcher.group(2);
try {
return dateFormat.parse(date);
} catch (ParseException e) {
LOG.error("Unable to parse the date '" + date + "'", e);
}
}
return null;
}
COM: <s> returns the date that the matcher found </s>
|
funcom_train/3005275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSortingState( int p_sortingIndex, boolean p_isAscending ) {
SortingInfo sortingInfo = null;
if ( p_sortingIndex == -1 ) {
sortingInfo = SortingInfo.NO_SORTING_COLUMN;
} else {
sortingInfo = new SortingInfo( getLogicalTypes()[ p_sortingIndex ], p_sortingIndex, p_isAscending );
}
_sortingInfos = new SortingInfo[]{sortingInfo};
}
COM: <s> sets the state of the model </s>
|
funcom_train/48356778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getDuration(TimeUnit unit) {
long result = 0;
switch (unit) {
case MILLISECONDS:
result = _duration;
break;
case SECONDS:
result = TimeUnit.SECONDS.convert(_duration, TimeUnit.MILLISECONDS);
break;
case MINUTES:
result = TimeUnit.MINUTES.convert(_duration, TimeUnit.MILLISECONDS);
break;
case HOURS:
result = TimeUnit.HOURS.convert(_duration, TimeUnit.MILLISECONDS);
break;
case DAYS:
result = TimeUnit.DAYS.convert(_duration, TimeUnit.MILLISECONDS);
break;
}
return result;
}
COM: <s> returns the duration in the specified time unit </s>
|
funcom_train/3302871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(Writer out) throws IOException {
out.write("<?xml version=\"1.0\"?>\n");
if (doctype!=null) { out.write("<!DOCTYPE"); out.write(doctype); out.write(">\n"); }
root.print(out,0,false);
out.flush();
}
COM: <s> write the xml document </s>
|
funcom_train/13675642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRequest(HttpServletRequest request) {
m_Request = request;
String contentType = request.getContentType();
if (contentType == null || contentType.indexOf("multipart/form-data") == -1) {
m_Multipart = false;
} else {
m_Multipart = true;
}
}//setRequest
COM: <s> sets the reference to the actual tt http servlet request tt </s>
|
funcom_train/7655992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
// obj equal to itself
if (this == other) {
return true;
}
if (other instanceof Certificate) {
try {
// check that encoded forms match
return Arrays.equals(this.getEncoded(),
((Certificate)other).getEncoded());
} catch (CertificateEncodingException e) {
throw new RuntimeException(e);
}
}
return false;
}
COM: <s> compares the argument to the certificate and returns </s>
|
funcom_train/25420204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String normalizeUrl(String url) {
return Pattern.compile("services\\?wsdl/", Pattern.CASE_INSENSITIVE).matcher(
Pattern.compile("\\?wsdl$", Pattern.CASE_INSENSITIVE).matcher(
Val.chkStr(url)
).replaceFirst("")
).replaceFirst("");
}
COM: <s> normalizes url by removing wsdl </s>
|
funcom_train/7292935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return dowToString(get(Calendar.DAY_OF_WEEK)) +
get(Calendar.YEAR) + "of" + get(Calendar.ERA) +
"/" + (get(Calendar.MONTH)+1) +
(get(ChineseCalendar.IS_LEAP_MONTH)==1?"(leap)":"") + "/" +
get(Calendar.DAY_OF_MONTH);
}
COM: <s> return a string representation of this test cases time </s>
|
funcom_train/6257217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void preparePrinting() {
//Initialize Printing Classes
job = PrinterJob.getPrinterJob();
job.setJobName(printJobName);
PageFormat pageFormat = job.defaultPage();
pageFormat.setOrientation(PageFormat.PORTRAIT);
//Parse the PrinterJob into its Pages
PageFactory pageFactory = new PageFactory(component, pageFormat);
job.setPageable(pageFactory.getPages());
}
COM: <s> prepare the printing page break etc </s>
|
funcom_train/16411540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAccessibility(JComponent comp,String key){
AccessibleContext ac = comp.getAccessibleContext();
ac.setAccessibleName(resourceBundle.getString(key+".AccessibleName"));
ac.setAccessibleDescription(resourceBundle.getString(key+".AccessibleDescription"));
comp.setToolTipText(resourceBundle.getString(key+".TooltipText"));
}
COM: <s> sets the accessibility properties for the component </s>
|
funcom_train/856110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Wall getWall(final Direction direction) {
if (direction == null) {
throw new IllegalArgumentException("Argument direction is null.");
}
if (Direction.NORTH.equals(direction)) {
return this.northernWall;
} else if (Direction.EAST.equals(direction)) {
return this.easternWall;
} else if (Direction.SOUTH.equals(direction)) {
return this.southernWall;
}
return this.westWall;
}
COM: <s> returns the wall to the specified direction </s>
|
funcom_train/2290449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDefaultFile(String defaultFile) {
m_defaultFiles.add(defaultFile);
if (CmsLog.INIT.isInfoEnabled()) {
CmsLog.INIT.info(Messages.get().getBundle().key(
Messages.INIT_VFS_DEFAULT_FILE_2,
new Integer(m_defaultFiles.size()),
defaultFile));
}
}
COM: <s> adds a directory default file </s>
|
funcom_train/3319326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addCategory(Category category) {
if (!(category instanceof Notebook)) {
// does the note have a parent, if so remove it from that parent
if (category.getParent() != null) {
Category categoryParent = category.getParent();
categoryParent.removeCategory(category);
}
// set the parent and the root
category.setParent(this);
category.setRoot (this.root);
// add the item to the Vector
return categories.add(category);
} else {
return false;
}
}
COM: <s> adds a category to the list of child categories </s>
|
funcom_train/1304523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean writeMetaData(CrawledPage crawledPage) {
boolean result = false;
CacheEntry entry = lookupEntry(crawledPage.getUrl());
if (entry != null && entry.getMetaData().update(crawledPage)) {
synchronized (dbHandle) {
dbHandle.put(crawledPage.getUrl(), new DbValue(entry));
}
result = true;
}
return result;
}
COM: <s> over write the crawled pages meta data if there is a difference </s>
|
funcom_train/29779483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHorizontalGap(int gap) {
if (gap < 0) {
logger.fatal("Cannot set parameter: "
+ "space between component must be a positive number!");
System.exit(TetrisLayout.FATAL_ERROR);
}
for (int i = 1; i < cBars.length; i++) {
cGaps[i].setSize(gap);
}
}
COM: <s> set horizontal space between components </s>
|
funcom_train/39212761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Control createStackedButtons(Composite composite) {
Composite c = new Composite(composite, SWT.NONE);
c.setLayout(new GridLayout(1, false));
new Button(c, SWT.PUSH).setText("Button One");
new Button(c, SWT.PUSH).setText("Button Two");
return c;
}
COM: <s> creates two stacked buttons </s>
|
funcom_train/36759436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addIndividualConstants(Term term, Domain domain) {
if( term instanceof Compound ) {
for( Term sub : ((Compound) term).getSubterms() ) {
addIndividualConstants(sub, domain);
}
} else if( term instanceof Constant ) {
domain.addConstant(((Constant) term).getName(), "individual");
}
}
COM: <s> adds all constants that occur as arguments of the term to the domain </s>
|
funcom_train/11744176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeListener(Object listener) {
if (listener == null) {
return false;
}
boolean didRemove = false;
synchronized (subjects) {
if (!subjects.isEmpty()) {
for (EventSubject subject : subjects.keySet()) {
didRemove |= this.removeListener(listener, subject);
}
}
}
return didRemove;
}
COM: <s> unregister the specified listener from all event subjects handled by this manager </s>
|
funcom_train/12135857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ToolConfiguration addTool(Site addedSite, String toolId) {
System.out.println("==========================");
System.out.println(toolId);
System.out.println("==========================");
SitePage page = addedSite.addPage();
page.setTitle(defaultTools.get(toolId));
page.setLayout(SitePage.LAYOUT_SINGLE_COL);
ToolConfiguration tools = page.addTool();
Tool tool = ToolManager.getTool(toolId);
tools.setTool(toolId, tool);
return tools;
}
COM: <s> to add tool with given tools id </s>
|
funcom_train/12741975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSelectKey(Table t, Key key)
{
String id = "SELECTKEY_" + t.getUniversalName() + key.getName();
if(!m_strings.containsKey(id))
m_strings.put(id, m_dml.getSelect(t, key));
return (String)m_strings.get(id);
COM: <s> returns a select key where key sql string for a given table </s>
|
funcom_train/25649033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetFile() {
KendoProjectImpl instance = new KendoProjectImpl();
File expResult = new File("test/temp/KendoProjectImplTest/" + System.currentTimeMillis() + ".xml");
instance.setFile( expResult );
File result = instance.getFile();
assertEquals(expResult, result);
}
COM: <s> test of get file method of class com </s>
|
funcom_train/29518436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String SearchIP_AP(String tag){
AP nodo;
for(int i=0; i < accessPoints.size(); i++){
nodo = (AP) accessPoints.get(i);
if(nodo.WhatAP().equals(tag)){return nodo.WhatWifiIP();}
}
return null;
}
COM: <s> return the ip of a desired ap </s>
|
funcom_train/14318172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendOptions() throws IOException {
HashMap<String, String> headers = new HashMap<String, String>();
headers.put("Allow", "OPTIONS, PROPFIND, HEAD, GET, REPORT, PROPPATCH, PUT, DELETE, POST");
sendHttpResponse(HttpStatus.SC_OK, headers);
}
COM: <s> send options response </s>
|
funcom_train/32057441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCloneable() {
System.out.println("testSetCloneable");
jgraph.setCloneable( true );
boolean b = jgraph.isCloneable();
assertEquals( b, true );
jgraph.setCloneable( false );
b = jgraph.isCloneable();
assertEquals( b, false );
}
COM: <s> test of set cloneable method of class jgraph </s>
|
funcom_train/11664336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node parentNode() {
Node node = this.current;
while (node != null) {
if (node == root) {
return null;
}
node = node.getParentNode();
if (node == null) {
return null;
} else if (acceptNode(node)) {
this.current = node;
return this.current;
}
}
return null;
}
COM: <s> moves to and returns the closest visible ancestor node of the current </s>
|
funcom_train/8609342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPosition(VisibleObject object, int mapId, float x, float y, float z, byte heading) {
int instanceId = 1;
if (object.getWorldId() == mapId) {
instanceId = object.getInstanceId();
}
this.setPosition(object, mapId, instanceId, x, y, z, heading);
}
COM: <s> set position of visible object without spawning object will be invisible </s>
|
funcom_train/3736146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanupAll() {
synchronized (this) {
for (int i = 0; i < taskList.size(); i++) {
Task task = (Task) taskList.get(i);
if (task.isCancelled()) {
taskList.remove(i);
if (persistStrategy != null)
persistStrategy.delete(task);
i--;
}
}
}
}
COM: <s> go through the task list and eliminate cancelled tasks </s>
|
funcom_train/28297143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEntryChangeVisual() throws Exception {
Entry entry =
dvm.new Entry(Package.class, Sphere.class, Package.NAME,
Sphere.NAME);
dvm.set(entry);
TestListener listener = new TestListener();
dvm.addListener(listener);
entry.changeVisual(Cube.class, Cube.NAME);
assertEquals(Cube.class, entry.getVisualClass());
assertEquals(Cube.NAME, entry.getVisualName());
assertTrue(listener.wasChanged());
}
COM: <s> test entry change visual </s>
|
funcom_train/9688296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getToDrawX() {
double w2 = to.getWidth() / 2 - 4;
double x1 = from.drawx;
double y1 = from.drawy;
double x2 = to.drawx;
double y2 = to.drawy;
final double distance = distance(x1, y1, x2, y2);
if (distance > 0) {
double shift = (w2 * (x1 - x2)) / distance;
x2 += shift;
}
return x2;
}
COM: <s> decenters to end depending on the angle </s>
|
funcom_train/1823542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List triangles() {
//Some callers depend on the fact that the two triangles are P1-P2-P3
//and P1-P4-P3. [Jon Aquino]
ArrayList triangles = new ArrayList();
triangles.add(new Triangle(p1, p2, p3));
triangles.add(new Triangle(p1, p4, p3));
return triangles;
}
COM: <s> creates two triangles from this quadrilateral </s>
|
funcom_train/44875796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDecorableAllowedWithUnresolvedAndDiffVersion() {
IDecorable decorable = createDecorable(true, true, true, true, true);
populatePreferenceStore(true,true,true,true);
assertTrue("Not allowing non decorable object", instance.select(null, "Parent", decorable));
}
COM: <s> test validating that a decorable with unresolved and diff version is </s>
|
funcom_train/986694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand1() {
if (okCommand1 == null) {//GEN-END:|74-getter|0|74-preInit
// write pre-init user code here
okCommand1 = new Command("Ok", Command.OK, 0);//GEN-LINE:|74-getter|1|74-postInit
// write post-init user code here
}//GEN-BEGIN:|74-getter|2|
return okCommand1;
}
COM: <s> returns an initiliazed instance of ok command1 component </s>
|
funcom_train/25291301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConstantScaleEnable(boolean constantScaleEnable) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_SCALE_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("OrientedShape3D6"));
if (isLive())
((OrientedShape3DRetained)retained).
setConstantScaleEnable(constantScaleEnable);
else
((OrientedShape3DRetained)retained).
initConstantScaleEnable(constantScaleEnable);
}
COM: <s> sets the constant scale enable flag </s>
|
funcom_train/5458026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
Graphics2D pen = (Graphics2D) g;
pen.setColor(getColor());
pen.drawImage(buffer, 0, 0, null);
if (drawLine || lineArrayStarted) {
//pen.draw(line);
drawPermLine(line, pen);
}
if (drawRectangle) {
drawRectangle(box, pen);
}
}
COM: <s> paints the off screen image and any other dynamic graphics that </s>
|
funcom_train/1005995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Area other) {
// REMIND: A *much* simpler operation should be possible...
// Should be able to do a curve-wise comparison since all Areas
// should evaluate their curves in the same top-down order.
if (other == this) {
return true;
}
if (other == null) {
return false;
}
Vector c = new AreaOp.XorOp().calculate(this.curves, other.curves);
return c.isEmpty();
}
COM: <s> tests whether the geometries of the two code area code objects </s>
|
funcom_train/3703606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireSubscribeEvent(Subscription sub) {
SubscriptionListener lstnr = sub.getCallBack();
SubscribeEvent evt = new SubscribeEvent(sub);
if (DEBUG == true) {
System.out.println("Firing event: " + evt);
System.out.println(" From sub: " + sub);
}
lstnr.onSubscribe(evt);
} // of method
COM: <s> fire off a notification that a new subscription has started </s>
|
funcom_train/32069442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAccounts(Collection<Account> accounts) {
boolean addOk = getAccounts().addAll(accounts);
if (addOk) {
for(Account account : accounts) {
account.setAccountGroup((AccountGroup)this);
}
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed accounts collection to the account group collection </s>
|
funcom_train/3026781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void swap(int first, int second) {
Object temp = data[first];
data[first] = data[second];
data[second] = temp;
fireContentsChanged(this,
Math.min(first, second),
Math.max(first, second));
}
COM: <s> swaps two items in the list box </s>
|
funcom_train/37797081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object process(final Element elTypeMap) throws Exception {
LOG.debug(">> process(elTypeMap)");
if (elTypeMap == null) {
throw new SQLUnitException(IErrorCodes.ELEMENT_IS_NULL,
new String[] {"typemap"});
}
return getArguments(elTypeMap.getChildren());
}
COM: <s> processes the jdom element representing the typemap tag returns an </s>
|
funcom_train/50812524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateData (ClientInfo data) {
data.setNickname (this.nickname.getText());
data.setName (this.name.getText());
data.setSurname (this.surname.getText());
data.setEMailAddress (this.email.getText());
data.setLastHost (this.lastHost.getText());
data.setLastPort (this.lastPort.getText());
}
COM: <s> updates entries in provided data handle </s>
|
funcom_train/31070853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void process(NLPDocument doc){
for (Iterator tokIt = doc.tokenIterator(); tokIt.hasNext();) {
Element tokEl = (Element)tokIt.next();
if (isEmail(XmlUtils.getAllTextNested(tokEl))) {
tokEl.setAttribute("type", "email");
} else if (isUrl(XmlUtils.getAllTextNested(tokEl))) {
tokEl.setAttribute("type", "url");
}
}
}
COM: <s> find the email addresses in a document </s>
|
funcom_train/46858703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startTurn(Player activePlayer) {
super.startTurn(activePlayer);
if (owner == activePlayer) {
activePlayer.addToBudget(funds);
}
// If the Capturing JawGameObject has been destroyed
// end the capturing
if (capturer instanceof JawGameObject) {
JawGameObject gameObject = (JawGameObject) capturer;
if (gameObject.isDestroyed()) {
endCapture();
}
}
}
COM: <s> for every start of a turn </s>
|
funcom_train/18745239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeFromLabelEdgeMap(Map<Label,Set<E>> currentMap, E edge) {
if (currentMap != null) {
Set<E> labelEdgeSet = currentMap.get(edge.label());
if (labelEdgeSet != null) {
labelEdgeSet.remove(edge);
}
}
}
COM: <s> removes an edge from a given label to edgeset map </s>
|
funcom_train/21189248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendFileToFTPPath(String text, String path) throws CruiseControlException {
ByteArrayInputStream bais = new ByteArrayInputStream(
text.getBytes());
FTPClient ftp = openFTP();
// we're sending text; don't set binary!
try {
makeDirsForFile(ftp, path, null);
sendStream(ftp, bais, path);
} finally {
closeFTP(ftp);
}
}
COM: <s> sends the specified text into the specified path on the ftp server </s>
|
funcom_train/11005698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void generateData() {
int size = 0;
for(int i=0; i<records.length; i++) {
size += records[i].getRecordSize();
}
data = new byte[size];
size = 0;
for(int i=0; i<records.length; i++) {
int thisSize =
records[i].serialize(size, data);
size += thisSize;
}
}
COM: <s> serialises our escher children back </s>
|
funcom_train/18378712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setProperties(LinkedList subject, String property, Object value) {
try {
Iterator objs = subject.iterator();
while (objs.hasNext()) {
WidgetEditor element = (WidgetEditor) objs.next();
element.getWidgetPeer().setProp(property, value);
}
} catch (Exception e) {
Logger.log().error(e, "Unable to set " + property);
}
}
COM: <s> method set properties </s>
|
funcom_train/29919365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void create() throws SQLException {
sqlMap.startTransaction();
sqlMap.queryForObject("createSQL_Prepared", null);
sqlMap.queryForObject("createSQL_Statement", null);
sqlMap.queryForObject("createSQL_Data", null);
sqlMap.endTransaction();
}
COM: <s> create the database </s>
|
funcom_train/30224191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSerializersForXmlType() {
AdaptiveMapDTO adaptiveMapDTO = this.populateAdaptiveMapDTO();
QName qname = this.getQName("Type");
List<StrategyDTO> list = SOAContextUtil.getSerializersForXmlType(
adaptiveMapDTO, qname);
assertEquals("Vaules of XMLtype in the Strategy DTO, and Qname differ",
qname, list.iterator().next().getXmlType());
}
COM: <s> tests the get deserializers for xml type </s>
|
funcom_train/3080900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
boolean equal;
if (this == o) {
equal = true;
} else if (o instanceof Font) {
Font that = (Font) o;
equal = that.style == this.style && that.size == this.size && Arrays.equals(this.names, that.names);
} else {
equal = false;
}
return equal;
}
COM: <s> returns true if this font is equivalent to the provided object </s>
|
funcom_train/10748425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test2() {
Class[] cs = Helper3.class.getDeclaredClasses();
assertNotNull("List of classes should not be null", cs);
assertEquals("There should be one class in the list", 1, cs.length);
assertSame("Incorrect class returned", Helper3.Inner2.class, cs[0]);
}
COM: <s> the members declared in the super class must not be reflected by </s>
|
funcom_train/3814488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(GrammarNode node, float logProbability) {
// if we are an empty node, a loopback makes no sense.
// this construct can be generated when dealing with recursive
// grammars, so we check for them and toss them out.
//
if (isEmpty() && this == node) {
return;
}
arcList.add(new GrammarArc(node, logProbability));
}
COM: <s> adds an arc to the given node </s>
|
funcom_train/5343007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(Message m) {
if (! supportsGGEP())
m=m.stripExtendedPayload();
// if Hops Flow is in effect, and this is a QueryRequest, and the
// hoppage is too biggage, discardage time...
int smh = hopsFlowMax;
if (smh > -1 && (m instanceof QueryRequest) && m.getHops() >= smh)
return;
_outputRunner.send(m);
}
COM: <s> sends a message </s>
|
funcom_train/8439221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdExitTypeExit() {
if (cmdExitTypeExit == null) {//GEN-END:|176-getter|0|176-preInit
// write pre-init user code here
cmdExitTypeExit = new Command("\u0412\u044B\u0445\u043E\u0434", Command.EXIT, 1);//GEN-LINE:|176-getter|1|176-postInit
// write post-init user code here
}//GEN-BEGIN:|176-getter|2|
return cmdExitTypeExit;
}
COM: <s> returns an initiliazed instance of cmd exit type exit component </s>
|
funcom_train/35020227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPath(List<String> path) {
listModel.clear();
if (path != null) {
for (String entry : path) {
listModel.add(listModel.size(), entry);
}
}
if (writable) {
pathList.setSelectedIndex(0);
updateButtons();
}
}
COM: <s> set the list of path elements that this editor will be editing </s>
|
funcom_train/330488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(int b1, int b2) {
// repacks the data as a six bit character string.
// take six bits at a time and get theinteger, then look up the character
String string = new String();
int i1, i2;
i1 = b1;
i2 = i1 + 5;
int n;
char ch;
while (i2 <= b2) {
n = getUnsignedInteger(i1, i2);
ch = ASCII6[n];
string += ch;
i1 = i2 + 1;
i2 = i1 + 5;
}
return string;
}
COM: <s> gets a string based on packed bits from an ais string </s>
|
funcom_train/19102104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent e) {
requestFocus(); // JDK1.1
java.awt.Point p = constrainPoint(new java.awt.Point(e.getX(), e.getY()));
fLastClick = new java.awt.Point(e.getX(), e.getY());
if (tool() != null) {
tool().mouseDown(e, p.x, p.y);
checkDamage();
}
}
COM: <s> handles mouse down events </s>
|
funcom_train/8318467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getEfficiencyReport() {
final Object[] args = {
new Integer(managedCache.size()),
new Long(recordKeeper.getTotalOperations()),
new Long(recordKeeper.getHits()),
new Float(getAdaptiveRatio()),
new Float(getTotalHitrate())
};
return Messages.getCompoundString("CacheDecorator.efficiency_report", args); //$NON-NLS-1$
}
COM: <s> returns an efficiency report string for this cache </s>
|
funcom_train/365467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getJPanelBottom(), java.awt.BorderLayout.SOUTH); // Generated
jContentPane.add(getJPanelCenter(), java.awt.BorderLayout.CENTER); // Generated
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/27859420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOutEdge(Edge edge) {
if (this.out == null) {
this.out = new Edge[1];
this.out[0] = edge;
} else {
Edge[] tmp = new Edge[this.out.length + 1];
System.arraycopy(this.out, 0, tmp, 0, this.out.length);
tmp[tmp.length - 1] = edge;
this.out = tmp;
}
}
COM: <s> add an outcoming edge to the node </s>
|
funcom_train/34010413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws SQLException, HibernateException {
String idValueString = (String) Hibernate.STRING.nullSafeGet(rs, names[0]);
return idValueString == null ? null : ObjectIdHelper.getIdFrom(idValueString);
}
COM: <s> retrieve an instance of the mapped class from a jdbc resultset </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.