__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/12309945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean restore() {
InputStream in = null;
boolean loaded = false;
clear();
// Test if we have a contribution file to start with
// If this is a clean start, then we will not have a
// contribution file. return false.
if (!file.exists())
return loaded;
try {
in = new FileInputStream(file);
super.load(in);
loaded = true;
} catch (IOException e) {
UpdateCore.log(e);
} finally {
if (in != null)
try {
in.close();
} catch (IOException e) {
}
}
return loaded;
}
COM: <s> restores contents of the properties from a file </s>
|
funcom_train/51782688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double truncateToParentY(double diffy, BooleanHolder success) {
double dy = diffy;
if (node.getParent() != null &&
node.getAbsoluteY1() + diffy < node.getParent().getAbsoluteY1()) {
dy -= ((node.getAbsoluteY1() + diffy) - node.getParent().getAbsoluteY1());
success.setValue(true);
}
return dy;
}
COM: <s> truncates the drag position to the parents absolute y position </s>
|
funcom_train/22750346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCommand(Request request) {
if (request instanceof ReconnectRequest) {
Object view = ((ReconnectRequest) request).getConnectionEditPart()
.getModel();
if (view instanceof View) {
Integer id = new Integer(OrmmetaVisualIDRegistry
.getVisualID((View) view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
}
}
return super.getCommand(request);
}
COM: <s> extended request data key to hold editpart visual id </s>
|
funcom_train/31905246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bottomTextChanged(String text) throws DOMException {
text = "rect(" +
getValue().getTop().getCssText() + ", " +
getValue().getRight().getCssText() + ", " +
text + ", " +
getValue().getLeft().getCssText() + ")";
textChanged(text);
}
COM: <s> called when the bottom value text has changed </s>
|
funcom_train/45392354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void debugObject(UsableObject usable) {
System.out.println(usable.getClass().getSimpleName());
Map<String,Object> properties =
getObjectInfo(usable);
for (Entry<String,Object> property: properties.entrySet()) {
System.out.println(property.getKey() + "=" +
property.getValue());
}
}
COM: <s> prints object info to system </s>
|
funcom_train/50221256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object remove(int index) {
//((GraphicsPrimitive) primitives.remove(index)).destroy();
primitives.remove(index);
AbstractTag t = (AbstractTag) tags.remove(index);
//sometimes tags are reused hence we can't remove them
//t.destroy();
return t;
}
COM: <s> removes the element at the specified position in this list optional </s>
|
funcom_train/19369644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OWLProfileReport checkOntology(OWLOntology ontology) {
OWLOntologyWalker walker = new OWLOntologyWalker(ontology.getImportsClosure());
OWL2ProfileObjectWalker visitor = new OWL2ProfileObjectWalker(walker, ontology.getOWLOntologyManager());
walker.walkStructure(visitor);
Set<OWLProfileViolation> pv = visitor.getProfileViolations();
return new OWLProfileReport(this, pv);
}
COM: <s> checks an ontology and its import closure to see if it is within </s>
|
funcom_train/16791050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void buildEntry(String labelKey, int value, PrintWriter writer) {
writer.printf("<p class=\"entry\"><span class=\"label\">%s</span><span class=\"value\">%d</span></p>\n", this.resources.getString(labelKey), value);
}
COM: <s> display a simple integer entry </s>
|
funcom_train/18029772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setString( Component c, String str ) {
this.parent= c;
bounds = null;
lineBounds = new ArrayList();
this.str = Entities.decodeEntities(str);
this.tokens = buildTokenArray(this.str);
this.draw( c.getGraphics(), c.getFont(), 0f, 0f, false );
}
COM: <s> reset the current string for the gtr to draw calculating the boundaries </s>
|
funcom_train/927063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toXML() {
StringBuffer sb = new StringBuffer();
sb.append("<productconfiguration>");
//Add component groups
if (m_ComponentGroups != null) {
sb.append("<componentgroups>");
Iterator iter = m_ComponentGroups.iterator();
while(iter.hasNext()) {
ComponentGroupNode cgn = (ComponentGroupNode)iter.next();
sb.append(cgn.toXML());
}
sb.append("</componentgroups>");
}
//Add nodes
Enumeration enumer = children();
while(enumer.hasMoreElements()) {
PTNode node = (PTNode)enumer.nextElement();
sb.append(node.toXML());
}
sb.append("</productconfiguration>");
return sb.toString();
}
COM: <s> convert this node and all children to xml </s>
|
funcom_train/18652996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tagSelection(final String tag) {
if (fStyledText.getSelectionCount() != 0) {
Point sel = fStyledText.getSelection();
String selected = fStyledText.getSelectionText();
fStyledText.replaceTextRange(sel.x, sel.y - sel.x, "[" + tag + "]"
+ selected + "[/" + tag + "]");
}
}
COM: <s> embraces the selected text with a tag </s>
|
funcom_train/45806197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getMatchingTopics(TopicMapIF tm, TypeSpecification typeSpec) {
Collection result = new HashSet();
if (typeSpec != null) {
TMObjectMatcherIF matcher = (TMObjectMatcherIF) typeSpec.getClassMatcher();
addTopic(tm, matcher, result);
}
return result;
}
COM: <s> internal gets the topic objects which define a class type by </s>
|
funcom_train/49753523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getComandoIrNuevaDescarga() {
if (comandoIrNuevaDescarga == null) {//GEN-END:|118-getter|0|118-preInit
// write pre-init user code here
comandoIrNuevaDescarga = new Command("Back", Command.BACK, 0);//GEN-LINE:|118-getter|1|118-postInit
// write post-init user code here
}//GEN-BEGIN:|118-getter|2|
return comandoIrNuevaDescarga;
}
COM: <s> returns an initiliazed instance of comando ir nueva descarga component </s>
|
funcom_train/33281161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer jsxGet_cellIndex() {
final HtmlTableCell cell = (HtmlTableCell) getDomNodeOrDie();
final HtmlTableRow row = cell.getEnclosingRow();
if (row == null) { // a not attached document.createElement('TD')
return Integer.valueOf(-1);
}
return Integer.valueOf(row.getCells().indexOf(cell));
}
COM: <s> returns the index of this cell within the parent row </s>
|
funcom_train/18729476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDisplayName() {
if (getOwner() == null) {
return Project.getInstance().getName();
} else {
String lvl = getKindName();
if (lvl == null) {
return name;
} else {
if (name.length() > 0) {
return name + " - " + lvl;
} else {
return lvl;
}
}
}
}
COM: <s> display name used for all occasions where the </s>
|
funcom_train/46860290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMnuitmSaveAs() {
if (mnuitmSaveAs == null) {
mnuitmSaveAs = new JMenuItem();
mnuitmSaveAs.setText("Save As...");
mnuitmSaveAs.setIcon(new ImageIcon(getClass().getResource("/resources/icons/clear.png")));
mnuitmSaveAs.setEnabled(false);
mnuitmSaveAs.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
SaveProjectAs();
}
});
}
return mnuitmSaveAs;
}
COM: <s> this method initializes mnuitm save as </s>
|
funcom_train/42710402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveState(String filename) throws IOException {
File outputFile = FileUtil.resolve(RGIS.getOutputFolder(), filename);
ObjectOutputStream out =
new ObjectOutputStream(
new BufferedOutputStream(
new FileOutputStream(outputFile)));
try {
out.writeObject(this);
}
finally {
out.close();
}
}
COM: <s> write this object and all its data to a binary file </s>
|
funcom_train/42612240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
String selection = e.getActionCommand();
if(selection.equals("Exit"))
{
window.close();
}else if(selection.equals("Open")){
open();
}else if(selection.equals("About")){
window.showAboutDialog();
}else if(selection.equals("Follow Tail")){
followTail();
}else if(selection.equals("Stay On Top")){
stayOnTop();
}else if(selection.equals("Clear Text")){
clearText();
}else if(selection.equals("Reload File")){
reloadFile();
}else if(selection.equals("Save As")){
saveAs();
}else if(selection.equals("Close Current Tab")){
window.removeCurrentTab();
}
}
COM: <s> performs operations depending on the action received from the gui </s>
|
funcom_train/1717996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDefaultWidth() {
Scanner sn;
try {
sn = new Scanner(configFile);
while(sn.hasNextLine()) {
String line = sn.nextLine();
if(line.startsWith("default_width=")) {
int toReturn = Integer.valueOf(line.substring("default_width=".length()));
if(toReturn == 0)
return 768;
return toReturn;
}
}
} catch (FileNotFoundException e) {
e.printStackTrace();
}
return 768;
}
COM: <s> returns the default width from the config file </s>
|
funcom_train/46213795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNotBase() throws AccessException {
if (logger.isDebugEnabled()) {
logger.debug("isNotBase");
logger.debug(" row.path: " + _row.path());
logger.debug(" asTable.path " + _table.path());
logger.debug(" extent: " + _table.getExtent().path());
}
// return (_table != _table.getExtent());
return !_table.isExtent();
}
COM: <s> does this row belong to a base table </s>
|
funcom_train/34451455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConstantPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_MObjectNode_constant_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_MObjectNode_constant_feature",
"_UI_MObjectNode_type"),
M3ActionsPackage.Literals.MOBJECT_NODE__CONSTANT, true, false,
false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the constant feature </s>
|
funcom_train/46622244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ExecTask createExec() throws BuildException {
ExecTask exec = (ExecTask) getProject().createTask("exec");
exec.setOwningTarget(this.getOwningTarget());
exec.setTaskName(this.getTaskName());
exec.setDescription(this.getDescription());
return exec;
}
COM: <s> create a new exec delegate </s>
|
funcom_train/47291089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTargetsSeparator(String targetsSeparator) {
CommanderTask.validateAttribute(targetsSeparator, "targetsSeparator");
//Verifies that the property is a single char.
if (targetsSeparator.length() > 1) {
throw new BuildException("invalid targetSeparator '" + targetsSeparator + "' : must be a single char.");
}
this.targetsSeparator = targetsSeparator;
}
COM: <s> sets the targets separator string </s>
|
funcom_train/10625557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRounds() {
int version = 1;
int rounds = 5;
int wordSize = 16;
RC5ParameterSpec ps = new RC5ParameterSpec(version, rounds, wordSize);
assertTrue("The returned rounds value should be equal to the "
+ "value specified in the constructor.",
ps.getRounds() == rounds);
}
COM: <s> get rounds method testing </s>
|
funcom_train/37242634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveScore() {
FileDialog fd = new FileDialog(this, "Save as a MIDI file...", FileDialog.SAVE);
fd.setFile("FileName.mid");
fd.show();
//write a MIDI file to disk
if ( fd.getFile() != null) {
Write.midi(score, fd.getDirectory() + fd.getFile());
}
}
COM: <s> dialog to save score as a midi file </s>
|
funcom_train/7707945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String sendFile(String folder, String filename, File file, String mime) throws IOException {
if (folderExists(folder)) {
return this.successXml(readResponse(doPost(rawUrlEncode(folder), rawUrlEncode(filename), file, mime)));
}
return errorXml(folder + " not found.");
}
COM: <s> sends file to photoframe </s>
|
funcom_train/21356939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addModification(Modification aModification) {
// Create a storage if it's not already done.
if (iModifications == null) {
if (logger.isDebugEnabled()) {
logger.debug("Created new ArrayList to store modifications for sequence '" + iSequence + "'.");
}
iModifications = new ArrayList<Modification>();
}
iModifications.add(aModification);
}
COM: <s> this method allows the caller to add a modification to the sequence </s>
|
funcom_train/5451270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void EnableEvents(boolean Enable) {
if (MainOptions.IsEventsEnabled() == Enable) return;
if (Enable) {
MainOptions.EnableEvents(Enable);
if (ProjectOptions != null)
ProjectOptions.EnableEvents(Enable);
}
else {
if (ProjectOptions != null)
ProjectOptions.EnableEvents(Enable);
MainOptions.EnableEvents(Enable);
}
}
COM: <s> enables sending the events from main and project options </s>
|
funcom_train/925573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addVendor(int vendorId, String vendorName) {
if (vendorId < 0)
throw new IllegalArgumentException("vendor ID must be positive");
if (getVendorName(vendorId) != null)
throw new IllegalArgumentException("duplicate vendor code");
if (vendorName == null || vendorName.length() == 0)
throw new IllegalArgumentException("vendor name empty");
vendorsByCode.put(new Integer(vendorId), vendorName);
}
COM: <s> adds the given vendor to the cache </s>
|
funcom_train/49659576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onClick(Widget sender) {
if (sender.equals(prevMonth)) {
calendar.prevMonth();
}
else if (sender.equals(prevYear)) {
calendar.prevYear();
}
else if (sender.equals(nextYear)) {
calendar.nextYear();
}
else if (sender.equals(nextMonth)) {
calendar.nextMonth();
}
}
COM: <s> respond to clicks on the within the navigation bar </s>
|
funcom_train/47567724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int print(Graphics g, PageFormat pf, int pageExists) throws PrinterException {
if (pageExists >= 1) {
return Printable.NO_SUCH_PAGE;
}
Graphics2D g2 = (Graphics2D) g;
g2.translate(pf.getImageableX(), pf.getImageableY());
paint(g2);
return Printable.PAGE_EXISTS;
}
COM: <s> used by the printable interface to tell the print job object what </s>
|
funcom_train/49399771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doDelete(T dto) throws BasicException {
try{
if (!this.beforeDelete(dto)){
return;
}
verifyDeleteDependencies(dto);
dto = dao.delete(dto);
this.afterDelete(dto);
}catch(BasicException e){
throw e;
}catch(Exception e){
throw BasicException.basicErrorHandling("Error deleting object", "errorDeletingObject", e, log);
}
}
COM: <s> performs a delete from database by dao and fires before and after events </s>
|
funcom_train/46383190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CellCache createCellCache() {
// create the cell cache and arrange for it to get messages
// whenever a new cell is created
CellCacheBasicImpl cacheImpl =
new CellCacheBasicImpl(this, getClassLoader(),
cellCacheConnection, cellChannelConnection);
cellCacheConnection.addListener(cacheImpl);
return cacheImpl;
}
COM: <s> create the cell cache </s>
|
funcom_train/10787955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void commit() {
try {
lock.lock();
EntityManager em = getEntityManager();
if (isManaged) {
em.flush();
} else {
assertActive();
em.getTransaction().commit();
}
if (scope == PersistenceContextType.TRANSACTION) {
em.clear();
}
} finally {
lock.unlock();
}
}
COM: <s> commits a transaction on the current thread </s>
|
funcom_train/24085057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String buildXMLConfig(Template serTempl, Services services) throws Exception{
WorkflowConf conf = new WorkflowConf();
conf.setServices(services);
conf.setTemplate(serTempl);
try {
return wfConfigUtil.marshalWorkflowConfigToXMLTemplate(conf);
} catch (Exception e) {
log.debug("Unable to build the XMLWorkflowConfiguration",e);
throw e;
}
}
COM: <s> is the same as build workflow conf but returns the xml representation </s>
|
funcom_train/1027639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void closeConnection(Connection conn) {
if (conn != null) {
try {
conn.close();
} catch (SQLException e) {
getLog().error("Failed to close Connection", e);
} catch (Throwable e) {
getLog().error(
"Unexpected exception closing Connection." +
" This is often due to a Connection being returned after or during shutdown.", e);
}
}
}
COM: <s> closes the supplied code connection code </s>
|
funcom_train/46161823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFont(Font font) {
this.drawFont = font.deriveFont(getFontResolution());
this.userFont = font;
BufferedImage tmp0 = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = (Graphics2D) tmp0.getGraphics();
fontRenderContext = g2d.getFontRenderContext();
updateDrawScale();
}
COM: <s> set the font with which to draw this text </s>
|
funcom_train/11101302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private NormalizedMessage getTestMessage() {
NormalizedMessage message = new NormalizedMessageImpl();
message.setProperty(PROPNAME,TEST_STRING);
String xml = "<this><is><some attr='1234'>xml123</some></is></this>";
try {
DocumentBuilder db;
db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document dom = db.parse(new InputSource(new StringReader(xml)));
message.setContent(new DOMSource(dom));
} catch (Exception e) {
fail(e.getLocalizedMessage());
}
return message;
}
COM: <s> helper method to return a new jbi normalized message </s>
|
funcom_train/40945250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeGeneratedColumn(Object id) {
if (columnGenerators.containsKey(id)) {
columnGenerators.remove(id);
if (!items.containsId(id)) {
visibleColumns.remove(id);
}
resetPageBuffer();
refreshRenderedCells();
return true;
} else {
return false;
}
}
COM: <s> removes a generated column previously added with add generated column </s>
|
funcom_train/21506529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItem1() {
if (jMenuItem1 == null) {
jMenuItem1 = new JMenuItem();
jMenuItem1.setText("Alarma desgaitu");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
// TODO Auto-generated Event stub actionPerformed()
jLabel1.setText("ALARMA");
jLabel1.setForeground(Color.gray);
ateKud.ateakItxi();
}
});
}
return jMenuItem1;
}
COM: <s> this method initializes j menu item1 </s>
|
funcom_train/13188830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExpand() {
Range r1 = new Range(0.0, 100.0);
Range r2 = Range.expand(r1, 0.10, 0.10);
assertEquals(-10.0, r2.getLowerBound(), 0.001);
assertEquals(110.0, r2.getUpperBound(), 0.001);
}
COM: <s> a simple test for the expand method </s>
|
funcom_train/41110845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tempLabelImage(int[] pixels) {
for(int y = 0; y < height; y++) {
for(int x = 0; x < width; x++) {
pixels[y*width + x] = Util.setRGB(0, 0, 0);
}
}
for(int y = 0; y < 3; y++){
tempLabelRow(y, y+1, pixels);
}
}
COM: <s> for testing devel use only </s>
|
funcom_train/1104209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAciklamaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EnumDeger_aciklama_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EnumDeger_aciklama_feature", "_UI_EnumDeger_type"),
HarzemliPackage.eINSTANCE.getEnumDeger_Aciklama(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the aciklama feature </s>
|
funcom_train/1552170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addIncidence(GeoElement geo) {
if (incidenceList==null)
createIncidenceList();
if (!incidenceList.contains(geo))
incidenceList.add(geo);
//GeoConicND, GeoLine, GeoPoint are the three types who have an incidence list
if (geo.isGeoConic())
((GeoConicND)geo).addPointOnConic(this);
else if (geo instanceof GeoLine)
((GeoLine)geo).addPointOnLine(this);
//TODO: if geo instanceof GeoPoint...
}
COM: <s> add geo to incidence list of this and also </s>
|
funcom_train/8972906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void time() {
long now = System.currentTimeMillis();
int h,m,s;
now /= 1000;
s = (int)(now % 60);
now /= 60;
m = (int)(now % 60);
now /= 60;
h = (int)(now % 24);
assign((h*100+m)*100+s);
div(10000);
}
COM: <s> assigns this code real code the current time </s>
|
funcom_train/44665064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
String result = null;
result = "ReviewFile \n"
+ "reviewId = " + reviewId + "\n"
+ "fileListId = " + fileListId + "\n"
+ "description = " + description + "\n"
+ "filename = " + filename + "\n";
return result;
}
COM: <s> string representation of this object </s>
|
funcom_train/10628234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFloatValueMinusZero() {
String a = "-123809648392384754573567356745735.63567890295784902768787678287E-400";
BigDecimal aNumber = new BigDecimal(a);
int minusZero = -2147483648;
float result = aNumber.floatValue();
assertTrue("incorrect value", Float.floatToIntBits(result) == minusZero);
}
COM: <s> float value of a small negative big decimal </s>
|
funcom_train/50872895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHasKey() {
OMAttribution attribution = new OMAttribution();
attribution.setConstructor(new OMInteger("1"));
OMSymbol symbol = new OMSymbol("a","a");
OMInteger integer = new OMInteger("1");
attribution.put(symbol, integer);
assertTrue(attribution.hasKey(symbol));
}
COM: <s> test of has key method of class nl </s>
|
funcom_train/8036828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(String name, String value) {
StreamUtil.insertAsciiString(stream, name);
StreamUtil.insertAsciiString(stream, ": ");
StreamUtil.insertAsciiString(stream, value);
StreamUtil.insertAsciiString(stream, "\r\n");
}
COM: <s> insert a new header in the stream </s>
|
funcom_train/46114143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleProcessingInstruction(Tag tag) {
if (ruleState.isExludedState()) {
addToDocumentPart(tag.toString());
return;
}
if (isInsideTextRun()) {
if (ruleState.isInlineExcludedState()) {
eventBuilder.appendCodeData(tag.toString());
eventBuilder.appendCodeOuterData(tag.toString());
return;
} else {
addCodeToCurrentTextUnit(tag);
}
} else {
handleDocumentPart(tag);
}
}
COM: <s> handle processing instructions </s>
|
funcom_train/22969547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MetaModel getMetaModelContainer() throws XavaException {
if (metaModelContainer == null) {
if (Is.emptyString(this.containerModelName)) {
metaModelContainer = getMetaComponent().getMetaEntity();
}
else {
try {
metaModelContainer = getMetaComponent().getMetaAggregate(this.containerModelName);
}
catch (ElementNotFoundException ex) {
metaModelContainer = getMetaComponent().getMetaEntity();
}
}
}
return metaModelContainer;
}
COM: <s> if this is a aggregate the return the container else the main entity </s>
|
funcom_train/34298890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(String productId, Timestamp reservStart, double reservLength, double reservPersons, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, ProductConfigWrapper configWrapper, double selectedAmount) {
return equals(productId, reservStart, reservLength, reservPersons, additionalProductFeatureAndAppls, attributes, prodCatalogId, selectedAmount, configWrapper, false);
}
COM: <s> compares the specified object with this cart item including rental data </s>
|
funcom_train/50689468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getViewportBorderBounds() {
Rectangle borderR = super.getViewportBorderBounds();
/* If there's a visible column footer remove the space it
* needs from the bottem of borderR.
*/
JViewport colFoot = getColumnFooter();
if ((colFoot != null) && (colFoot.isVisible())) {
borderR.height -= colFoot.getHeight();
}
return borderR;
}
COM: <s> returns the bounds of the viewports border </s>
|
funcom_train/886672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleReferenceMark(Element node, LaTeXDocumentPortion ldp, Context oc) {
// Note: Always include \label here, even when it's not used
String sName = node.getAttribute(XMLString.TEXT_NAME);
if (sName!=null) {
ldp.append("\\label{ref:"+refnames.getExportName(sName)+"}");
}
}
COM: <s> p process a reference mark text reference mark tag p </s>
|
funcom_train/37722131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseSkippedChunk(SimpleTokenizer st) throws ParsingException {
st.parseOrdinaryChar('{');
while(!st.nextCharIs('}')) {
if(st.nextCharIs('{')) parseSkippedChunk(st);
else st.getNextToken();
}
st.parseOrdinaryChar('}');
}
COM: <s> parses a unused block </s>
|
funcom_train/22712053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void startJUnitTestCaseImpl(String jUnitTestClassName, String testName) {
// forget, that we have started a test case by name
endTestCaseImpl();
// just log this to reuse it later by ProtocolImpl
this.testCaseStartedClass = jUnitTestClassName;
this.testCaseStartedName = testName;
}
COM: <s> the coverage measurement for a junit test case is started </s>
|
funcom_train/25476803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer readUTF8File(final String file) throws FileNotFoundException, IOException {
bufferedFile = new StringBuffer("");
final InputStream inputStream = openUTF8File(file);
final BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));
String currentLine;
while ((currentLine = br.readLine()) != null) {
bufferedFile.append(currentLine);
}
return bufferedFile;
}
COM: <s> calls to open a file for the given file name and returns a </s>
|
funcom_train/9588511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte get(int index) throws IndexOutOfBoundsException {
if (index < 0) {
throw new IndexOutOfBoundsException("index (" + index
+ ") must be >= 0");
}
if (index >= len) {
throw new IndexOutOfBoundsException("index (" + index
+ ") must be less than length (" + len + ")");
}
return bytes[offset + index];
}
COM: <s> returns the byte in this block at the given index </s>
|
funcom_train/31995144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendLoginChar(int charSelection,String charname) {
try {
write(0x5d); //0 = Packet's ID
writeInt(0xedededed); //1-4 =
sendBufferedString(charname,60); //5-64 =
writeInt(charSelection); //65-68 =
writeInt(0); //69-72 =
flush(); //
log("0x5d"); //
} catch(IOException e) {
}
}
COM: <s> pre login select the character to play </s>
|
funcom_train/17674987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeFromQueryList(QueryEntry e) {
if (e.prev != null) {
e.prev.next = e.next;
} else {
queryTail = e.next;
}
if (e.next != null) {
e.next.prev = e.prev;
} else {
queryHead = e.prev;
}
e.next = e.prev = null;
--queryCount;
}
COM: <s> remove cps from the double linked lru list </s>
|
funcom_train/41209682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertAutopadding(boolean insert) {
horizontalGroup.insertAutopadding(HORIZONTAL, new Vector(1),
new Vector(1), new Vector(1), new Vector(1), insert);
verticalGroup.insertAutopadding(VERTICAL, new Vector(1),
new Vector(1), new Vector(1), new Vector(1), insert);
}
COM: <s> adjusts the autopadding springs for the horizontal and vertical </s>
|
funcom_train/10283971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTitle(TagContent title) throws TagFormatException {
if (title.getTextContent() == null) {
throw new TagFormatException();
}
// write v1
id3.setTitle(title.getTextContent());
(new TextFrameEncoding(id3v2, "TIT2", title, use_compression)).write();
}
COM: <s> set title read from text content </s>
|
funcom_train/13647770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Partner getPartner(String as2ident) {
String query = "SELECT * FROM partner WHERE as2ident='" + as2ident + "'";
Partner[] partner = this.getPartnerByQuery(query);
if (partner == null || partner.length == 0) {
return (null);
}
return (partner[0]);
}
COM: <s> loads a specified partner from the db </s>
|
funcom_train/168014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFormattedTextField getJTimeStep() {
NumberFormatter maskTime = new NumberFormatter();
maskTime.setMinimum(new Double(0.0));
if (jTimeStep == null) {
jTimeStep = new JFormattedTextField(maskTime);
jTimeStep.setColumns(5);
}
jTimeStep.setMinimumSize(jTimeMax.getPreferredSize());
jTimeStep.setHorizontalAlignment(SwingConstants.RIGHT);
jTimeStep.setValue(new Double(0.0));
return jTimeStep;
}
COM: <s> this method initializes j time step </s>
|
funcom_train/26574107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String xmlTextParagraph(java.lang.Long pk, int level) {
String strXML = "";
TextParagraphFactory factory = new TextParagraphFactory(connectionParameter);
try {
TextParagraph paragraph = (TextParagraph) factory.load(pk);
strXML = "<para>" + paragraph.getText() + "</para>\n";
} catch (Exception e) {
JEErrorHandler handler = new JEErrorHandler(connectionParameter.getLogList());
handler.fatalError(e);
}
return strXML;
}
COM: <s> method xml text paragraph </s>
|
funcom_train/21847834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "marksCount=" + getMarksCount() + ", gapStart=" + gapStart
+ ", gapEnd=" + gapEnd + ", dataLen="
+ (Integer.MAX_VALUE - (dataGapEnd - dataGapStart)) + ", dataGapStart="
+ dataGapStart + ", dataGapEnd=" + dataGapEnd + ", dataGapLineCount="
+ dataGapLineCount;
}
COM: <s> get info about code doc marks code </s>
|
funcom_train/11655152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logProperties() {
if (log.isDebugEnabled()) {
PropertyIterator iter = propertyIterator();
while (iter.hasNext()) {
JMeterProperty prop = iter.next();
log.debug("Property " + prop.getName() + " is temp? " + isTemporary(prop) + " and is a "
+ prop.getObjectValue());
}
}
}
COM: <s> log the properties of the test element </s>
|
funcom_train/19102300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDirectoryOrJar(String name) throws IOException {
File file = new File(name);
if (file.isDirectory()) {
directories.add(file);
}
else if (acceptJarFile(file)) {
jarFiles.add(file);
}
else {
throw new IOException("Not a directory or jar file: " + name);
}
}
COM: <s> adds the specified directory or jar file to the collection </s>
|
funcom_train/25203172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String charString(int value) {
String s = "";
if (value >= ' ' && value <= 0x7e) {
StringBuilder sb = new StringBuilder(",`");
sb.append((char) value);
sb.append('\'');
s = sb.toString();
}
return s;
}
COM: <s> generate an alternate description of a character for printable </s>
|
funcom_train/7622910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void animateClose() {
prepareContent();
final OnDrawerScrollListener scrollListener = mOnDrawerScrollListener;
if (scrollListener != null) {
scrollListener.onScrollStarted();
}
animateClose(mVertical ? mHandle.getTop() : mHandle.getLeft());
if (scrollListener != null) {
scrollListener.onScrollEnded();
}
}
COM: <s> closes the drawer with an animation </s>
|
funcom_train/47396454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validate(String size) {
if (!getValidate())
return true;
try {
sunflow.kernelEnd();
} catch (RuntimeException e) {
System.err.println(e.getMessage());
return false;
} catch (Exception e) {
e.printStackTrace();
return false;
}
return super.validate(size);
}
COM: <s> validate the output of the benchmark outside the timing loop </s>
|
funcom_train/35304035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Integer getHighestValue() {
Dictionary dictionary = slider.getLabelTable();
if (dictionary == null) {
return null;
}
Enumeration keys = dictionary.keys();
Integer max = null;
while (keys.hasMoreElements()) {
Integer i = (Integer) keys.nextElement();
if (max == null || i > max) {
max = i;
}
}
return max;
}
COM: <s> returns the biggest value that has an entry in the label table </s>
|
funcom_train/36827523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
adm = new Administrator();
auth = new Authentication();
view.upload(adm);
ok = auth.authAdmin(adm);
if (ok) {
UCUIAdminMainView ucmv = new UCUIAdminMainView();
ucmv.run();
view.dispose();
} else {
UITool.displayError(auth.getErrorMsg(), view);
}
}
COM: <s> use case admin login </s>
|
funcom_train/16175860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putObjectAt(int x, int y, Object object) {
x = xnorm(x);
y = ynorm(y);
Cell c = (Cell) matrix.get(x, y);
if (c == null) {
c = new OrderedCell();
matrix.put(x, y, c);
}
c.add(object);
}
COM: <s> puts the specified object into the cell at the specified coordinates </s>
|
funcom_train/33283177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String jsxGet_namespaceURI() {
final String namespaceURI = this.<DomNode>getDomNodeOrDie().getNamespaceURI();
if (namespaceURI == null && getBrowserVersion()
.hasFeature(BrowserVersionFeatures.JS_XML_SUPPORT_VIA_ACTIVEXOBJECT)) {
return "";
}
return namespaceURI;
}
COM: <s> returns the uri that identifies an xml namespace </s>
|
funcom_train/31557068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnName(int col) {
switch (col) {
case 0: return crossdate.getName();
case 1: return I18n.getText("quantity");
case 2: return I18n.getText("histogram");
default: throw new IllegalArgumentException(); // can't happen
}
}
COM: <s> the column name </s>
|
funcom_train/45622846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOutputPathPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GenerateBootstrapperType_outputPath_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GenerateBootstrapperType_outputPath_feature", "_UI_GenerateBootstrapperType_type"),
MSBPackage.eINSTANCE.getGenerateBootstrapperType_OutputPath(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the output path feature </s>
|
funcom_train/38976810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActiveIngredientRevision reject(User user, int revisionid) throws ActiveIngredientNotFoundException, AccessDeniedException {
if (UserTasks.REVIEW_ENTRY.allowed(user)) {
ActiveIngredientRevision air = getRevisionById(user.getRole(), revisionid);
air.reject(user);
getActiveIngredientManager().updateActiveIngredientRev(air);
return air;
} else {
throw new AccessDeniedException();
}
}
COM: <s> returns the rejected air </s>
|
funcom_train/37228972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PV1Segment getPV1() {
PV1Segment pv1 = (PV1Segment)findSegment( "PV1" );
if( pv1 == null ) {
pv1 = new PV1Segment( this );
pv1.initialize();
if( vSegments == null ) vSegments = new Vector();
// Goes at the beginning
vSegments.add(0,pv1);
}
return pv1;
}
COM: <s> get a reference to the pv1 segemnt contained within this loop </s>
|
funcom_train/13390414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testGetType() {
/* States:
* Type: original, modified
* Argument combinations:
* N/A
*/
ThresholdEvent event = new ThresholdEvent(new Object());
Assert.assertEquals(0, event.getType());
event.setType(1);
Assert.assertEquals(1, event.getType());
}
COM: <s> tests the code get type code method </s>
|
funcom_train/9086717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Employees entity) {
EntityManagerHelper
.log("deleting Employees instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Employees.class,
entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent employees entity </s>
|
funcom_train/45117305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fetchParameters() {
repository = JSystemProperties.getInstance().getPreference(
FrameworkOptions.SCM_REPOSITORY);
if (null == repository || repository.isEmpty()) {
log.fine("No SVN repository was defined");
enabled = false;
}
user = JSystemProperties.getInstance().getPreference(
FrameworkOptions.SCM_USER);
if (null == user) {
user = "";
}
password = JSystemProperties.getInstance().getPreference(
FrameworkOptions.SCM_PASSWORD);
if (null == password) {
password = "";
}
}
COM: <s> get all the required parameters from the jsystem properties file </s>
|
funcom_train/12183009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createAttributeLabel(ControlDetails controlDetails) {
ControlType type = controlDetails.attributesDetails.
getAttributeControlType(controlDetails.attribute);
if (type != ControlType.CHECK_BOX) {
Label label = new Label(controlDetails.attributesComposite, SWT.NONE);
label.setText(getResourceString(controlDetails.attribute));
label.setData(AttributesComposite.LABEL_KEY, controlDetails.attribute);
}
}
COM: <s> all labels are added via this method </s>
|
funcom_train/18319105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toggleBreakpoint(TransitionEditPart t) throws CoreException {
toggleBreakpoint(t, (Transition) t.getModel(), BreakpointPositions
.getPositions(((GTransition) t.getModel()).getStateMachine(),
(Transition) t.getModel()),
((GTransition) t.getModel()).getStateMachine());
}
COM: <s> toggles breakpoint for transition model of given transition edit part </s>
|
funcom_train/3447579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(Object o) {
// Since we don't know whether the key value increased or
// decreased, we just percolate up followed by percolating down;
// one of the two will have no effect.
int cur = getIndex(o);
int newIdx = percolateUp(cur, o);
percolateDown(newIdx);
}
COM: <s> informs the heap that this objects internal key value has been </s>
|
funcom_train/9494460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkRowIndex(final int row) {
if (row < 0 || row >= getRowDimension()) {
throw new MatrixIndexException("row index {0} out of allowed range [{1}, {2}]",
row, 0, getRowDimension() - 1);
}
}
COM: <s> check if a row index is valid </s>
|
funcom_train/7645650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void or(BitSet bs) {
int nbits = bs.length();
int length = nbits / ELM_SIZE + (nbits % ELM_SIZE > 0 ? 1 : 0);
if (length > bits.length) {
growBits(nbits - 1);
}
long[] bsBits = bs.bits;
for (int i = 0; i < length; i++) {
bits[i] |= bsBits[i];
}
}
COM: <s> performs the logical or of this </s>
|
funcom_train/49608825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertCountry(String username,EntityManager em,Country vo) throws Throwable {
try {
JPAMethods.persist(em, username, DefaultFieldsCallabacks.getInstance(), vo);
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
finally {
em.flush();
}
}
COM: <s> insert a country </s>
|
funcom_train/20477872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeNewBackupCal() throws Exception{
calendar = new CalendarEntry();
calendar.setTitle(new PlainTextConstruct("chromeos"));
calendar.setSummary(new PlainTextConstruct("This Calendar is used by your ChromeOS based PC!"));
CalendarEntry returnedCalendar = calService.insert(postUrl,calendar);
}
COM: <s> makes a new backup calendar </s>
|
funcom_train/51102171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getSchemas() throws SQLException {
List schemas = new ArrayList();
ResultSet rs = getMetaData().getSchemas();
try {
while (rs.next()) {
String schema_name = rs.getString(1);
schemas.add(schema_name);
}
}
finally {
rs.close();
}
return schemas;
}
COM: <s> retrieves the schemas for the database </s>
|
funcom_train/17458273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void playNext() throws MPDConnectionException, MPDPlayerException {
try {
mpd.sendMPDCommand(makeCommand(prop.getProperty(MPDPROPNEXT), null));
} catch (MPDResponseException re) {
throw new MPDPlayerException(re.getMessage(), re.getCommand());
}
firePlayerChangeEvent(PlayerChangeEvent.PLAYER_NEXT);
}
COM: <s> plays the next song in the playlist </s>
|
funcom_train/367029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(ItemRegistry registry, double frac) {
synchronized ( m_registry ) {
Iterator iter = m_actions.iterator();
while ( iter.hasNext() ) {
Action a = (Action)iter.next();
try {
if ( a.isEnabled() ) a.run(m_registry, frac);
} catch ( Exception e ) {
e.printStackTrace();
}
}
}
} //
COM: <s> runs this action list </s>
|
funcom_train/23235536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawHair(int code, Graphics g) {
clean(g);
SpriteStore.get().getSprites(OutfitStore.get().getHairSprite(hairs_index), animation, 3, 2, 3)[1].draw(g, 2, 2);
}
COM: <s> draws a hair images from an outfit code </s>
|
funcom_train/38294380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeAID(AID id) throws LEAPSerializationException {
try {
if (id != null) {
writeBoolean(true); // Presence flag true
serializeAID(id);
}
else {
writeBoolean(false); // Presence flag false
}
}
catch (IOException ioe) {
throw new LEAPSerializationException("Error serializing AID");
}
}
COM: <s> writes an aid object to this data output stream </s>
|
funcom_train/37741753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWSDL(String wsdlLocation) {
try {
if ((wsdlLocation == null) || wsdlLocation.equals("")) {
return;
}
WSDLReader rdr = WSDLFactory.newInstance().newWSDLReader();
wsdlDef = rdr.readWSDL(wsdlLocation);
} catch (Exception e) {
logger.error("Error setting WSDL: " + e.getMessage (), e);
}
}
COM: <s> set the definition of wsdl </s>
|
funcom_train/32360950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatch( ICBState cbState, CbClient cbClient )
{
try {
Ack ack = new AdminMessage.Ack( getNotifNumber(), getElementName() );
cbClient.sendFrame( CbFrame.Type.ADMIN, ack.toString().getBytes() );
} catch (IOException ex ) {
logger.severe( ex.getLocalizedMessage() );
}
}
COM: <s> notification messages must be acknowledged </s>
|
funcom_train/24950707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document generateAMD(File file, String filename, String mimeType) {
Document amdDoc = DocumentHelper.createDocument();
Element root = amdDoc.addElement("adminMeta");
//add pid
root.addElement("pid").
addText(getPid());
//add original file name
root.addElement("identifier").
addText(filename);
Element techElem = root.addElement("technical");
//add file size
techElem.addElement("fileSize").
addAttribute("units","bytes").
addText(Long.toString(file.length()));
//add mime type
techElem.addElement("format").
addElement("mimeType").
addText(mimeType);
return amdDoc;
}
COM: <s> generate amd takes a file as an argument and generates </s>
|
funcom_train/3083398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefaultMutableTreeNode getNextSibling() {
DefaultMutableTreeNode retval;
DefaultMutableTreeNode myParent = (DefaultMutableTreeNode) getParent();
if (myParent == null) {
retval = null;
} else {
retval = (DefaultMutableTreeNode) myParent.getChildAfter(this);
// linear search
}
if (retval != null && !isNodeSibling(retval)) {
throw new InternalError("child of parent is not a sibling");
}
return retval;
}
COM: <s> returns the next sibling of this node in the parents children array </s>
|
funcom_train/43688642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setBrowserCaching(HttpServletResponse res) {
if (nocache) {
// HTTP/1.1 + IE extensions
res.setHeader("Cache-Control",
"no-store, no-cache, must-revalidate, "
+ "post-check=0, pre-check=0");
// HTTP/1.0
res.setHeader("Pragma", "no-cache");
// Last resort for those that ignore all of the above
res.setHeader("Expires", EXPIRATION_DATE);
}
}
COM: <s> if the parameter nocache was set to true generate a set of headers </s>
|
funcom_train/15567764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeStringListener(int _index,StringListener _lis) {
if (stringNameList[_index]==null)
return false;
HashSet _listeners;
Object _o = stringListener.get(new Integer(_index));
if (_o!=null) {
_listeners = (HashSet)_o;
_listeners.remove(_lis);
}
return true;
}
COM: <s> code remove string listener code removes a string listener from a field </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.