__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/44153194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws MojoExecutionException, MojoFailureException {
execute(new MimeTypeConfiguration(pdfGenerate, "application/pdf", ".pdf"));
execute(new MimeTypeConfiguration(pngGenerate, "image/png", ".png"));
execute(new JpegConfiguration(jpegGenerate, jpegQuality));
execute(new MimeTypeConfiguration(tiffGenerate, "image/tiff", ".tiff"));
}
COM: <s> execute this mojo and generate images from source svg images </s>
|
funcom_train/34526877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @TagHandler("F")
public Object handleDataField(String content) throws EvaluationException, DataSourceException {
EvaluationHelper evaluator = InforamaContext.
getInstance().getEvaluationHelper();
content = evaluator.evaluate(content, context);
DataSet dataSet = context.getDataSet(content);
Object value = (dataSet != null) ? dataSet.getValue() : null;
return (value != null) ? fixValue(value) : NULL_VALUE;
}
COM: <s> handles a data field tag </s>
|
funcom_train/40222478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean valid (Solitaire theGame) {
boolean validation = false;
// VALIDATE:
PositionCard pc = pyramid.peekSelected();
if (pc != null) {
int row = pc.getRow();
int pos = pc.getPosition();
if (!pyramid.isCovered(row, pos)) {
Card drawnCard = justDrawn.peek();
if ((drawnCard.getRank() + pc.getRank()) == 13) {
validation = true;
}
}
}
return validation;
}
COM: <s> validate match pyramid and just drawn move </s>
|
funcom_train/30009239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetNoOfPages() {
System.out.println("getNoOfPages");
Document instance = new Document();
int expResult = 0;
int result = instance.getNoOfPages();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get no of pages method of class papyrus </s>
|
funcom_train/13706878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void declareGlobalActionKeys() {
addGlobalActionKey(ActionFactory.PRINT.getId());
addGlobalActionKey(ActionFactory.SELECT_ALL.getId());
addGlobalActionKey(ActionFactory.COPY.getId());
addGlobalActionKey(ActionFactory.CUT.getId());
addGlobalActionKey(ActionFactory.PASTE.getId());
}
COM: <s> subclasses must implement to declare the set of global action keys </s>
|
funcom_train/49200414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSubTitlePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Slide_subTitle_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Slide_subTitle_feature", "_UI_Slide_type"),
TransformedPackage.Literals.SLIDE__SUB_TITLE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the sub title feature </s>
|
funcom_train/38221976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readDocument(Reader in) throws IOException, CXmlException {
BufferedReader reader = new BufferedReader(in);
String buffer = "";
String line;
while ((line = reader.readLine()) != null)
buffer += line + "\n";
rootElement.clear();
scanner.setBuffer(buffer);
scanner.gotoNextToken();
rootElement.parseChildElements(scanner);
}
COM: <s> reads from input stream parses and build a xml tree structure </s>
|
funcom_train/10268071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initNonPersistedItems() {
_caseData = JDOMConversionTools.stringToElement(_caseDataStr);
_netLevelData = JDOMConversionTools.stringToElement(_netDataStr);
_liveItems = (ArrayList) RdrConversionTools.StringToStringList(_liveItemIDs);
_log = Logger.getLogger("au.edu.qut.yawl.worklet.exception.CaseMonitor");
}
COM: <s> reconstitutes objects persisted as string representations </s>
|
funcom_train/10210804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void changeToYellow() {
if (logicTable.getSelectedColumn() != 0) {
((TLSCellRenderer) logicTable.getDefaultRenderer(Object.class)).getTrafficLightStates()
.get(logicTable.getSelectedRow()).set(logicTable.getSelectedColumn()-1, Color.YELLOW);
}
itemChanged = true;
logicTable.repaint();
logicTable.clearSelection();
}
COM: <s> set the selected table items to yellow </s>
|
funcom_train/50914709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setZFract(double[] value) throws RuntimeException {
if (value == null) {
throw new RuntimeException("null zFract");
}
List<CMLAtom> atomList = this.getAtoms(value.length, "zFract");
int i = 0;
for (CMLAtom atom : atomList) {
atom.setZFract(value[i++]);
}
}
COM: <s> array of fractional z coordinate </s>
|
funcom_train/11123104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIncludes(String[] includes) {
if (includes == null) {
this.includes = null;
} else {
this.includes = new String[includes.length];
for (int i = 0; i < includes.length; i++) {
this.includes[i] = normalizePattern(includes[i]);
}
}
}
COM: <s> sets the list of include patterns to use </s>
|
funcom_train/18543802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String printArmorAndShields() {
String text = "";
text += addAmount();
text += addSize();
text += addPrefix();
text += addBonus();
text += addMaterial();
text += addName();
text += addSuffix();
text += addBrackets();
return text + "\n";
}
COM: <s> handle print jobs for magic armor and shields </s>
|
funcom_train/35019659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
mainFrame = new MainFrame();
currentPanel = getPanel("welcome");
mainFrame.showPanel(currentPanel);
enableButtons();
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
mainFrame.setLocationRelativeTo(null);
mainFrame.setVisible(true);
}
});
}
COM: <s> begins the flow of the installer panels starting with showing the </s>
|
funcom_train/46058740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void closeConnection() {
// Set isConnected to false first since connection.close triggers an
// XMPPConnListener.connectionClosed() event which would result in
// in a cyclic call of this close method.
isConnected = false;
try {
connection.disconnect();
} catch (RuntimeException e) {
Tracing.logWarn("Error while trying to send Instant Messaging packet.", e, InstantMessagingClient.class);
}
}
COM: <s> close the connection to the server </s>
|
funcom_train/14660764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuBar getMainMenuBar() {
if (mainMenuBar == null) {
mainMenuBar = new JMenuBar();
mainMenuBar.add(getSpecMenu());
mainMenuBar.add(getSolveMenu());
mainMenuBar.add(getSimMenu());
mainMenuBar.add(getEstMenu());
}
return mainMenuBar;
}
COM: <s> this method initializes j jmenu bar </s>
|
funcom_train/34677547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Configuration loadCoreDefaultConfig() throws IOException, XMLException {
// load the CoreDefaultConfig resource into an XMLString
InputStream in=this.getClass().getResourceAsStream("CoreDefaultConfig.xml");
XMLString factoryConfigXML=new XMLString(in);
// marshal the config XML into an instance of Configuration
return fromXML(Configuration.class, factoryConfigXML);
}
COM: <s> load config from core default config </s>
|
funcom_train/40526558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CajoledModule getJavascript() {
Job soleJsJob = getConsolidatedOutput(new Criterion<Job>() {
public boolean accept(Job job) {
return job.getType() == ContentType.JS;
}
});
return soleJsJob != null ? (CajoledModule) soleJsJob.getRoot() : null;
}
COM: <s> if the javascript has been compiled and consolidated return the script </s>
|
funcom_train/50394308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String waitUntilDone(int timeout) throws Exception {
ActivityStateEnumeration.Enum status = ActivityStateEnumeration.PENDING;
long start = System.currentTimeMillis();
long elapsed = 0;
while (true) {
if (timeout > 0 && elapsed > timeout)
break;
elapsed = System.currentTimeMillis() - start;
status = getStatus();
if (status == ActivityStateEnumeration.FINISHED)
break;
else if (status == ActivityStateEnumeration.FAILED)
throw new Exception("Job failed");
Thread.sleep(500);
}
return status.toString();
}
COM: <s> convenience method that waits until a job has finished and returns the </s>
|
funcom_train/1951952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double calculateDistance( final PhylogenyNode node1, final PhylogenyNode node2 ) {
final PhylogenyNode lca = obtainLCA( node1, node2 );
final PhylogenyNode n1 = node1;
final PhylogenyNode n2 = node2;
return ( PhylogenyMethods.getDistance( n1, lca ) + PhylogenyMethods.getDistance( n2, lca ) );
}
COM: <s> calculates the distance between phylogeny nodes node1 and node2 </s>
|
funcom_train/44212435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createTodo(String listId, SerializableTodo sTodo) {
Todo todo = new Todo();
todo.setDescription(sTodo.getDescription());
todo.setPriority(sTodo.getPriority());
todosManager.createTodo(listId, todo);
sTodo.setTodoId(todo.getTodoId());
return todo.getTodoId();
}
COM: <s> create a todo on the server </s>
|
funcom_train/25767398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void save(File dir) {
// terms = { "he", "she", "his", "hers" };
AhoCorasickString tree0 = new AhoCorasickString("he", "she");
System.out.println("\n\nTree First Save");
tree0.showStatesTree();
tree0.save(dir);
AhoCorasickString tree1 = new AhoCorasickString(dir);
tree1.addString("his");
tree1.addString("hers");
tree1.prepare();
System.out.println("\n\nTree Second Save");
tree1.showStatesTree();
tree1.save(dir);
}
COM: <s> save in two steps </s>
|
funcom_train/5727101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Folder retrieveFolderOfOwner(DomainObject owner, FolderInfo folderInfo) throws IllegalAccessException, InvocationTargetException {
Folder folder = null;
if (folderInfo != null && folderInfo.getId() != null) {
folder = getFolderDao().load(folderInfo.getId());
}
if (folder == null || !isFolderOfDomainObject(owner, folder)) {
folder = getRootFolderForDomainObject(owner);
}
return folder;
}
COM: <s> this method verifies that the returned folder belongs to the domain object </s>
|
funcom_train/10268221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean suspendCase(String caseID) {
List suspendItems = getListOfSuspendableWorkItems("case", caseID) ;
if (suspendWorkItemList(suspendItems)) {
_log.debug("Completed suspend for case: " + caseID);
return true ;
}
else {
_log.error("Attempt to suspend case failed for case: " + caseID);
return false ;
}
}
COM: <s> suspends all live workitems in the specified case </s>
|
funcom_train/20365009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertInitiative() {
NamedStat alertness = getPerson().getMainStats().getStat("ALT");
NamedStat agility = getPerson().getMainStats().getStat("AGL");
String initiative = agility.getDice()+" + "+alertness.getDice();
assertEquals( initiative, getPerson().getInitiative().getDice() );
}
COM: <s> asserts that the initiative label is correct for the current alertness and agility </s>
|
funcom_train/10906430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRootOutline(PDFOutline out) {
put("Outlines", out.makeReference());
//Set /PageMode to /UseOutlines by default if no other mode has been set
PDFName mode = (PDFName)get("PageMode");
if (mode == null) {
setPageMode(PAGEMODE_USEOUTLINES);
}
}
COM: <s> set the root outline for the pdf document </s>
|
funcom_train/26401192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
if (o1 instanceof BugReport && o2 instanceof BugReport) {
BugReport report1 = (BugReport)o1;
BugReport report2 = (BugReport)o2;
int result = compareTitle(report1.getTitle(), report2.getTitle());
if (result != 0) return result;
return(BugReportIdComparator.compareId(report1.getId(),
report2.getId()));
} else {
throw new IllegalArgumentException();
}
}
COM: <s> compare two objects </s>
|
funcom_train/44125601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllUsers() {
Set userset = privtabs.keySet();
Iterator usersit = userset.iterator();
String username;
/* Remove all panels from the JTabbedPane */
while(usersit.hasNext()) {
username = (String)usersit.next();
tbMain.remove((JPanel)privtabs.get(username));
}
/* Now clear the HashMap */
privtabs.clear();
}
COM: <s> remove all users from the main tabbed pane </s>
|
funcom_train/24081715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createSquares(Properties t){
for(int i=0; i < n_square; i++){
int j = Integer.parseInt(t.getProperty("index"+i));
String s = t.getProperty("title"+i);
int p = Integer.parseInt(t.getProperty("price"+i));
int h = Integer.parseInt(t.getProperty("hotel"+i));
int r[] = new int[6];
String rent[] = t.getProperty("rents"+i).split(",");
for(int f=0; f<6; f++)
r[f] = Integer.parseInt(rent[f]);
squares.remove(j);
squares.add(j, new BuildSite(s,p,p,null,0,h,r));
}
}
COM: <s> creates build site squares </s>
|
funcom_train/36685283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAction(String actionName, int keyCode, AbstractAction action) {
KeyStroke keystroke = KeyStroke.getKeyStroke(keyCode, 0);
myField.getInputMap(JComponent.WHEN_FOCUSED).put(keystroke, actionName);
myField.getActionMap().put(actionName, action);
}
COM: <s> sets a keybinding for an action in this textarea allowing the action to </s>
|
funcom_train/47308065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Graphics2D g2D) {
// Only draw if it's visible
if (alpha > 0) {
g2D.setFont(font);
g2D.setColor(new Color(finalcolor.getRed(), finalcolor.getGreen(), finalcolor.getBlue(), alpha));
g2D.drawString(getText(), (int) position.getX(), (int) position.getY());
}
}
COM: <s> display the text on the screen </s>
|
funcom_train/45830736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scroll (int destX, int destY, int x, int y, int width, int height, boolean all) {
callClient("scroll", destX, destY, x, y, width, height, all);
}
COM: <s> scrolls a rectangular area of the receiver by first copying </s>
|
funcom_train/43098684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDoActivity(Object handle, Object value) {
if (handle instanceof MState
&& (value == null || value instanceof MAction)) {
((MState) handle).setDoActivity((MAction) value);
return;
}
throw new IllegalArgumentException("handle: " + handle
+ " or value: " + value);
}
COM: <s> sets the do activity of a state </s>
|
funcom_train/31051853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged (ListSelectionEvent lse) {
if (lse.getSource() != presetList)
return; // never happen
Object selection = presetList.getSelectedValue();
if ((selection == null) ||
(! (selection instanceof Preset)))
return;
Preset preset = (Preset) selection;
urlField.setText (preset.getURLString());
}
COM: <s> when list selection changes put its url in the url field </s>
|
funcom_train/18625862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addStatusOk(String sectionName, float responseTime) {
ArrayList<ServiceMonitorField> fields;
if (sections.containsKey(sectionName))
fields = sections.get(sectionName);
else
fields = new ArrayList<ServiceMonitorField>();
fields.add(new ServiceMonitorField("status", SERVICE_STATUS_OK));
fields.add(new ServiceMonitorField("responseTime", responseTime + ""));
}
COM: <s> adds status ok to a section of the report </s>
|
funcom_train/19322772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isIIOP() {
if (_isIIOP == null) { // haven been analyze yet, analyze it
_isIIOP = _serviceURL.getProtocol().equals(IIOP_PROTOCOL) ?
(Boolean.TRUE) : (Boolean.FALSE);
}
return _isIIOP.booleanValue();
}
COM: <s> determine if protocol is iiop </s>
|
funcom_train/22345398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void msgOut(String msg, int time) {
// When printing
if (T.sysout == 1) {
// do so
TyBase.printMsg(msg);
} // endif
// When logging, do so
if (T.logUsed) {
// wait up to 10 sec for completion
T.log_tbl.writeMsg(msg, time);
} // endif
} // end-method
COM: <s> write a log and print </s>
|
funcom_train/3332362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getJavaLabelSettings() {
IPreferenceStore settings = getDefault().getPreferenceStore();
try {
return convertJavaLabelSettingsString(settings.getString(
CallersConstants.PREF_JAVA_LABEL_FORMAT));
} catch (Exception e) {
logError("Error getting java label settings", e);
}
return convertJavaLabelSettingsString(settings.getDefaultString(
CallersConstants.PREF_JAVA_LABEL_FORMAT));
}
COM: <s> gets the settings for the format of the java label provider </s>
|
funcom_train/3421472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int addContentSpecNode(short nodeType, String nodeValue) {
// create content spec node
int contentSpecIndex = createContentSpec();
// set content spec node values
fContentSpec.setValues(nodeType, nodeValue, null);
setContentSpec(contentSpecIndex, fContentSpec);
// return index
return contentSpecIndex;
} // addContentSpecNode(short,String):int
COM: <s> create an xmlcontent spec for a single non leaf </s>
|
funcom_train/34989790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDisplayedItem() {
// TODO make the calculation of the display string more robust
// TODO (i.e. use TextProvider interface).
String displayValue = comboBox.getSelectedItem() == null
? "" : comboBox.getSelectedItem().toString();
arrowButton.setText(displayValue);
}
COM: <s> updates the value displayed to match that of </s>
|
funcom_train/41523732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void populateTasks(){
List<Task> aux = null;
if(taskListMode.equals(TASK_MODE_USR)){
Command cmd = getCommand(FindTasksByUser.class);
cmd = runCommand(cmd);
aux = ((FindTasksByUser)cmd).getResult();
}else if(taskListMode.equals(TASK_MODE_IMG)){
Command cmd = getCommand(FindTasksByImage.class);
((FindTasksByImage)cmd).setImage(getSession().getImage());
cmd = runCommand(cmd);
aux = ((FindTasksByImage)cmd).getResult();
}
if(aux != null)
tasks = createTaskItems(aux);
}
COM: <s> it populates the task list by task list mode selected </s>
|
funcom_train/6202536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIgnoreWord(final String word, final int offset, final boolean add) {
UIThreadsUtil.mustBeSwingThread();
if (add) {
Core.getSpellChecker().learnWord(word);
} else {
Core.getSpellChecker().ignoreWord(word);
}
ec.remarkOneMarker(SpellCheckerMarker.class.getName());
}
COM: <s> add a new word to the spell checker or ignore a word </s>
|
funcom_train/5532040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String determineCompositor(ArrayList pAlChildAssoc) throws Exception {
for (int iCt = 0; iCt < pAlChildAssoc.size(); iCt++) {
AssociationChildrenView oAssoc = (AssociationChildrenView)pAlChildAssoc.get(iCt);
if (!"ContainsCCAttribute".equals(oAssoc.getAssociationtype())) {
return oAssoc.getAssociationtype();
}
}
return "";
}
COM: <s> this function loops through an array list association children view objects </s>
|
funcom_train/14615335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Expression parseExpression() throws ParseException {
Expression test = parseUnaryBinaryExpression();
if( skipChar('?')) {
Ternary ternary = new Ternary();
ternary.setTest( test );
ternary.setIfExpression( parseExpression() );
requireChar(':');
ternary.setElseExpression( parseExpression() );
return ternary;
} else {
return test;
}
}
COM: <s> parses and builds an </s>
|
funcom_train/37048438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean leftClick(MouseEvent me) {
if (DEBUG) {
Debug.output("leftClick(MAP) at " + me.getX() + ", " + me.getY());
}
if (grp != null && grp.receivesMapEvents() && me instanceof MapMouseEvent) {
return grp.leftClick((MapMouseEvent) me);
}
return false;
}
COM: <s> handle a left click on the map </s>
|
funcom_train/21285491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testResolveFromMap() {
BASE64 base64 = new BASE64("test".getBytes());
MapProperties map = new MapProperties();
map.putInternal("base64", base64);
Object object = map.get("base64");
assertTrue(object instanceof byte[]);
byte[] bytes = (byte[]) object;
assertTrue(Arrays.equals("test".getBytes(), bytes));
}
COM: <s> tests resolving a byte array from a map </s>
|
funcom_train/39024098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveAll() {
System.out.println("removeAll");
Collection<?> c = null;
FilteredCollection instance = null;
boolean expResult = false;
//boolean result = instance.removeAll(c);
//assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
//fail("The test case is a prototype.");
}
COM: <s> test of remove all method of class filtered collection </s>
|
funcom_train/4145299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private void loadProperties() {
try {
myProp = HTTPPropertyLoader.getExpandedProperties(propertiesURL);
} catch (PropertyLoadException e) {
AuditUtil.getInstance().writeLog(AuditUtil.FILE_TYPE_G4G, e);
} catch (Exception e) {
AuditUtil.getInstance().writeLog(AuditUtil.FILE_TYPE_G4G, e);
}
}
COM: <s> reads a properties list from the given properties file to the my prop </s>
|
funcom_train/42398276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleWriteFailure(final SourceWriter writer, final Throwable cause) {
Checker.notNull("parameter:writer", writer);
Checker.notNull("parameter:cause", cause);
final StringWriter stringWriter = new StringWriter();
final PrintWriter printWriter = new PrintWriter(stringWriter);
cause.printStackTrace(printWriter);
printWriter.flush();
printWriter.close();
writer.println();
writer.beginJavaDocComment();
writer.println(stringWriter.toString());
writer.endJavaDocComment();
}
COM: <s> captures the complete stacktrace of the given exception and writes it </s>
|
funcom_train/21460514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkInternalData() {
for( int i = 1; i <= 3*r; i++ ) {
for( int j = 1; j <= 3*r; j++ ) {
// System.out.println("i = "+i+" j = "+j);
checkSize(i,j);
}
}
}
COM: <s> decomposes the matrix and checks the internal data structure for correctness </s>
|
funcom_train/19824839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer(pkgString());
sb.append('(');
if (zombie) {
sb.append("zombie, ");
}
sb.append(bpkgs.toString());
sb.append(')');
return sb.toString();
}
COM: <s> string describing this object </s>
|
funcom_train/34655654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void savePropertyFile() throws ValidationException {
try {
properties.store(new FileOutputStream(this.filename), null);
this.log.info("{" + this.logId + "} "
+ "property-file saved sucessfully: " + this.filename);
} catch (Exception e) {
this.log.warn("{" + this.logId + "} "
+ "Exception during saving property-file " + this.filename,
e);
throw new ValidationException("Exception in savePropertyFile");
}
}
COM: <s> saves the property file </s>
|
funcom_train/21087555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUIDPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_SNI_Element_UID_feature"),
getString("_UI_SNI_Element_UID_description"),
SNI_Package.Literals.SNI_ELEMENT__UID, false, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
getString("_UI_ElementPropertyCategory"), null));
}
COM: <s> this adds a property descriptor for the uid feature </s>
|
funcom_train/46760997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long store(final AuditModel audit, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
IChainStore chain = new ChainStore();
try {
Long auditId = store(audit, chain, call);
chain.execute();
// return primary key
return auditId;
} catch (Exception ex) {
Log.exception(ex);
Log.error(audit);
chain.rollback();
throw ex;
}
}}; return (Long) call(method, call);
}
COM: <s> save the audit model model creating a new audit or updating existing rows </s>
|
funcom_train/18748941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOkButton() {
if (okButton == null) {
okButton = new JButton("OK");
okButton.addActionListener(new CloseListener() {
@Override
public void actionPerformed(ActionEvent e) {
TableCellEditor editor = getTable().getCellEditor();// Component();
if (editor == null || editor.stopCellEditing()) {
super.actionPerformed(e);
}
}
});
}
return okButton;
}
COM: <s> lazily creates and returns a button labelled ok that signals the </s>
|
funcom_train/50748077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String buildError(Node reference) {
StringBuffer buf = new StringBuffer();
buf.append("No definition or more than one definition could be found for value ");
buf.append(reference.getText());
buf.append(" in element ");
buf.append(reference.getParent().asXML());
return buf.toString();
}
COM: <s> builds an error message using the reference node node selected by the </s>
|
funcom_train/18488459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateCustomLibrary() {
try {
libTools.updateCustomLibrary(this.jarsRootPath + "/" +
this.getCustomLibraryJarName());
} catch (Exception ex) {
String logMessage = "WARNING: - " + this +" - " +
" - Could Not update the view of the custom libraty.";
VSCBLogger.logMessage(logMessage, VSCBLogger.INFO);
}
}
COM: <s> updates ui of custom library after storing parts devices to it </s>
|
funcom_train/17394754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Choice createColorChoice(String attribute) {
ActionChoice choice = new ActionChoice();
for (int i = 0; i < ColorMap.size(); i++) {
choice.addItem(ColorMap.name(i), new ChangeAttributeAction(ColorMap.name(i), attribute,
ColorMap.color(i), view));
}
return choice;
}
COM: <s> creates the color choice for the given attribute </s>
|
funcom_train/33872828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doStartGame() {
if (state != SERVER_STATE.WAITING_FOR_PLAYERS) {
return;
}
state = SERVER_STATE.GAME_STARTED;
unassignedPowers = new ArrayList<StandardToken>(powers());
thisTurn = new TurnInfo();
thisTurn.armyPosition = armyPosition();
thisTurn.scOwnership = supplyOwnership();
thisTurn.turn = thisTurn.armyPosition.getTurn();
for (PlayerInfo player : participants.values()) {
player.startGame();
}
startGame();
}
COM: <s> starts the game </s>
|
funcom_train/44138177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void highLightComponentOnTheLine() {
Iterator ith = this.m_AllComponents.iterator();
while(ith.hasNext()) {
OSMElementComponent c = (OSMElementComponent)ith.next();
if(isOnTheLine(c))
c.setOnTheLine();
else
c.unsetOnTheLine();
}
}
COM: <s> to set on the line all component that are effectivly on the line </s>
|
funcom_train/37246418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void playMIDI(String title) {
Object o = null;
try {
o = getObjectByTitle(title);
} catch (Exception e) {
handleException(e);
}
if (o instanceof Score) Play.midi((Score) o, false);
else if (o instanceof Part) Play.midi((Part) o, false);
else if (o instanceof Phrase)Play.midi((Phrase) o, false);
}
COM: <s> play a score part or phrase in a midi format </s>
|
funcom_train/41621811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Reader setupReader(InputStream stream) {
InputStreamReader streamReader = new InputStreamReader(stream);
this.reader = new StreamTokenizer(streamReader);
this.reader.quoteChar('"');
this.reader.ordinaryChar('{');
this.reader.ordinaryChar('}');
this.reader.ordinaryChar('(');
this.reader.ordinaryChar(')');
this.reader.parseNumbers();
this.reader.slashSlashComments(true);
this.reader.eolIsSignificant(true);
return streamReader;
}
COM: <s> setup the code stream tokenizer code for file reading </s>
|
funcom_train/40439797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Permission mergePermissions(final Permission initialPermission, final Collection<Permission> permissions) {
if (permissions != null)
for (final Permission perm : permissions) {
initialPermission.setRead(initialPermission.hasRead() || perm.hasRead());
initialPermission.setWrite(initialPermission.hasWrite() || perm.hasWrite());
initialPermission.setModifyACL(initialPermission.hasModifyACL() || perm.hasModifyACL());
}
return initialPermission;
}
COM: <s> merge an initial permission object with a collection of individual </s>
|
funcom_train/27822910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Term getTerm(String uri) throws KAONException {
Term term=(Term)m_terms.get(uri);
if (term==null) {
Instance termInstance=m_registryOIModelInstance.getInstance(uri);
term=new Term(this,termInstance);
m_terms.put(uri,term);
}
return term;
}
COM: <s> returns the term object for given uri </s>
|
funcom_train/1344253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restoreDefaultWindowAndSplitterPositions() {
setWindowAndSplitterPositions( "10" + GENERAL_SEPARATOR_CHAR + "10" + GENERAL_SEPARATOR_CHAR + "650" + GENERAL_SEPARATOR_CHAR + "490" + GENERAL_SEPARATOR_CHAR + "340" + GENERAL_SEPARATOR_CHAR + "400" + GENERAL_SEPARATOR_CHAR );
}
COM: <s> restores the default positions of the main frame and the splitters </s>
|
funcom_train/3340733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(MutableTreeNode child, int index) {
if (!_allowsChildren)
throw new IllegalStateException(
"TreeNode does not allow children");
if (_children == null) _children = new Vector<TreeNode>();
_children.insertElementAt(child, index);
child.setParent(this);
}
COM: <s> adds child to this mutable tree node at index </s>
|
funcom_train/3375148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component getLastComponent(Container aContainer) {
if (aContainer == null) {
throw new IllegalArgumentException("aContainer cannot be null");
}
Comparator comparator = getComparator();
if (comparator instanceof LayoutComparator) {
((LayoutComparator)comparator).
setComponentOrientation(aContainer.
getComponentOrientation());
}
return super.getLastComponent(aContainer);
}
COM: <s> returns the last component in the traversal cycle </s>
|
funcom_train/3902481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateLocationType_MaxLength(String locationType, DiagnosticChain diagnostics, Map context) {
int length = locationType.length();
boolean result = length <= 2000;
if (!result && diagnostics != null)
reportMaxLengthViolation(AdlcpRootv1p2Package.Literals.LOCATION_TYPE, locationType, length, 2000, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em location type em </s>
|
funcom_train/38828071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GeomElement getGeomElement(GTransform m) {
// Get the geometry element from the sub-class.
Transformable transElement = getGeomElement();
GeomElement element = transElement;
if (element == null)
return null;
// Apply any rotation matrix.
m = getMatrix(m);
if (!m.equals(GTransform.IDENTITY)) {
// Apply transformation.
element = transElement.getTransformed(m);
}
// Attach some IGES meta-data.
applyMetaData(element);
return element;
}
COM: <s> return a reference to the geom element element contained in this iges entity </s>
|
funcom_train/1672184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(ObjectContainer container) {
if (_registry != null) {
throw new IllegalArgumentException("Already connected to an ObjectContainer");
}
_registry = EventRegistryFactory.forObjectContainer(container);
_registry.queryStarted().addListener(_queryStarted);
_registry.queryFinished().addListener(_queryFinished);
_registry.activated().addListener(_activated);
}
COM: <s> starts gathering query statistics for the specified container </s>
|
funcom_train/9666934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DateTime getEarliestBooking(DatabaseWrapper dbw) {
DateTime result;
try {
String sql = "SELECT BookingDate FROM Booking ORDER BY BookingDate ASC LIMIT 0 , 1";
ResultSet rs = dbw.executeQuery(sql);
rs.first();
result = new DateTime(rs.getString("BookingDate"));
}
catch (SQLException e) {
return null;
}
return result;
}
COM: <s> retrieves the earliest date for a booking found in the database </s>
|
funcom_train/31155803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadImageTest(String path) {
// image file type: jpg, png, and gif supported
//setImage(Utilities.loadBufferedImageFromFile(path));
BufferedImage img = Utilities.loadBufferedImageFromFile(path);
if (img != null) {
_positionedImages.add((PosBuffImage) new PosBuffImage(img, 0, 0));
setImage(img);
}
}
COM: <s> loads an image previously implemented for testing the speed of image </s>
|
funcom_train/44136455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getAbsoluteX() {
OSMElement root = (OSMElement)getRoot();
Enumeration e = pathFromAncestorEnumeration(root);
int x = 0;
for(;e.hasMoreElements();) {
OSMElement elt = (OSMElement)e.nextElement();
x += elt.getX();
}
return x;
}
COM: <s> get absolute x </s>
|
funcom_train/25395608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteCollisionDetector(final boolean aAffectChildren) {
if (collisionDetector != null) {
collisionDetector = null;
}
// update children
if (aAffectChildren) {
for (int i = 0; i < childrens.size(); i++) {
childrens.get(i).deleteCollisionDetector(true);
}
}
}
COM: <s> delete any existing collision detector and set the current cd to null no </s>
|
funcom_train/10844319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document getDocument() {
if (this.result.getNode() == null) {
return null;
} else if (this.result.getNode().getNodeType() == Node.DOCUMENT_NODE) {
return (Document) this.result.getNode();
} else {
return this.result.getNode().getOwnerDocument();
}
}
COM: <s> return the newly built document </s>
|
funcom_train/13274703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTime(long time) {
if (this.time != time) {
long oldTime = this.time;
this.time = time;
this.propertyChangeSupport.firePropertyChange(Property.TIME.name(), oldTime, time);
this.home.getCamera().setTime(time);
}
}
COM: <s> sets the edited time in utc time zone </s>
|
funcom_train/27805533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDeadLine(DeadLine dl, Timestamp date) {
Mysql db = new Mysql();
System.out.println("update deadlines set date='"
+ db.formatDate(date).toString() + "' where name='"
+ dl.toString() + "'");
db.exec("update deadlines set date='" + db.formatDate(date).toString()
+ "' where name='" + dl.toString() + "'");
db.close();
}
COM: <s> function to update the deadline passed by argument </s>
|
funcom_train/7628761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dispatchPortAddressedPdus(byte[][] pdus, int port) {
Uri uri = Uri.parse("sms://localhost:" + port);
Intent intent = new Intent(Intents.DATA_SMS_RECEIVED_ACTION, uri);
intent.putExtra("pdus", pdus);
sendBroadcast(intent, "android.permission.RECEIVE_SMS");
}
COM: <s> dispatches port addressed pdus to interested applications </s>
|
funcom_train/48337614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (this == o) return true;
if (! (o instanceof Runtime)) return false;
Runtime other = (Runtime)o;
return ( (name.equals(other.name))
&& (opcode == other.opcode)
&& (minArgs == other.minArgs)
&& (maxArgs == other.maxArgs));
}
COM: <s> determine whether this runtime operator equals the specified object </s>
|
funcom_train/40765927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Properties extractFeedConfigProperties(FeedConfiguration config) {
Map<String, Object> feedProperties = ((NamespacedFeedConfiguration) config).getProprties();
Properties prop = new Properties();
for (String feedAttributeKey : feedProperties.keySet()) {
prop.setProperty(feedAttributeKey, (String) feedProperties.get(feedAttributeKey));
}
return prop;
}
COM: <s> reads the feed config properties from the given feed configuration and </s>
|
funcom_train/13196740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unHighlightButton(int rInt, int fInt) {
Color origColor = getButtonBgColor(rInt, fInt);
setButtonBackground(rInt, fInt, origColor);
setButtonHighlighted(rInt, fInt, false);
//repaintButton(rInt, fInt);
}
COM: <s> unhighlights the button set bg color set highlight repaint button </s>
|
funcom_train/18661292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void goToLastPage() {
int last = mySetOfNodes.getNumberOfNodes();
int tgtPage = last / Settings.maxThumbnails;
curPage = tgtPage + 1;
startIndex = tgtPage * Settings.maxThumbnails;
thumbnailJScrollPane.getVerticalScrollBar().setValue(0);
nodeLayoutChanged();
setButtonStatus();
}
COM: <s> request that the thumbnail panel show the last page of thumbnails </s>
|
funcom_train/31703332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomOut(Stack zoomStack) {
if (null == zoomStack) {
return;
}
final int graphCount = pane.getGraphCount();
for (int pos = graphCount - 1; pos >= 0; pos--) {
Graph graph = pane.getGraphAt(pos);
graph.zoomOut(zoomStack);
}
restoreUnifiedRectU();
}
COM: <s> zooms out all graphs </s>
|
funcom_train/34563966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int charW(final Graphics g, final int ch) {
return ch == '\t' ? fwidth[' '] * BaseXTextTokens.TAB : ch < ' ' ? 0 :
ch < 256 || g == null ? fwidth[ch & 0xFF] :
g.getFontMetrics().charWidth(ch);
}
COM: <s> returns the width of the specified character </s>
|
funcom_train/9394222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeTail(LinkedEntry<K, V> e) {
// Unlink e
e.prv.nxt = e.nxt;
e.nxt.prv = e.prv;
// Relink e as tail
LinkedEntry<K, V> header = this.header;
LinkedEntry<K, V> oldTail = header.prv;
e.nxt = header;
e.prv = oldTail;
oldTail.nxt = header.prv = e;
modCount++;
}
COM: <s> relinks the given entry to the tail of the list </s>
|
funcom_train/44884476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeDefaults() {
IPreferenceStore store = getPreferenceStore();
store.setDefault(Deployer.KEY_STRICT, false);
store.setDefault(Deployer.KEY_DEBUG, false);
store.setDefault(Deployer.KEY_SERVER, "[remote.server.address]");
store.setDefault(Deployer.KEY_PATH, "[/remote/path/for/file]");
store.setDefault(Deployer.KEY_USER, "[remote username]");
store.setDefault(Deployer.KEY_PORT, "22");
}
COM: <s> sets the default values of the preferences </s>
|
funcom_train/10616698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidKeyException06() {
InvalidKeyException tE = new InvalidKeyException(null, null);
assertNull("getMessage() must return null", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
COM: <s> test for code invalid key exception string throwable code </s>
|
funcom_train/33430002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean showMyFleet() {
if (isFleetShowed) {
return false;
}
if (ProtocolImpl.session == null) {
//owner.map.showError(Locale.get("fleet.notloggedin"));
return false;
}
owner.map.showMessage(Locale.get("fleet.showing"));
isFleetShowed = true;
if (!loadingInProgress) {
loadRadioLocations();
}
return true;
}
COM: <s> loads and displays the fleet if it is not already displayed </s>
|
funcom_train/48909163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtExportarExcel() {
if (btExportarExcel == null) {
btExportarExcel = new JButton();
btExportarExcel.setBounds(new Rectangle(577, 56, 148, 25));
btExportarExcel.setText("Exportar a Excel");
btExportarExcel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
exportarExcel();
}
});
}
return btExportarExcel;
}
COM: <s> this method initializes bt exportar excel </s>
|
funcom_train/2676515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getServiceHandler(IScope scope, String serviceName) {
// Get application scope handler first
Object service = scope.getHandler();
if (serviceName == null || serviceName.equals("")) {
// No service requested, return application scope handler
return service;
}
// Search service resolver that knows about service name
for (IServiceResolver resolver : serviceResolvers) {
service = resolver.resolveService(scope, serviceName);
if (service != null) {
return service;
}
}
// Requested service does not exist.
return null;
}
COM: <s> lookup a handler for the passed service name in the given scope </s>
|
funcom_train/5244620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(ApplicablePlan p) {
if (event.equals(p.getEvent())) {
if (guards.equals(p.getGuard())) {
if (prefix.equals(p.getPrefix())) {
if (n == p.getN()) {
if (theta.equals(p.getUnifier())){
return true;
}
}
}
}
}
return false;
}
COM: <s> helper function for equals in comparable interface </s>
|
funcom_train/22674852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuBar getjMenuBar() {
if (jMenuBar == null) {
jMenuBar = new JMenuBar();
jMenuBar.add( getFileMenu() );
jMenuBar.add( getEditMenu() );
jMenuBar.add( getHelpMenu() );
}
return jMenuBar;
}
COM: <s> this method initializes j menu bar </s>
|
funcom_train/1805411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void listAllTables() throws IOException, ServiceException {
TableFeed feed = service.getFeed(tablesFeedUrl, TableFeed.class);
for (TableEntry entry : feed.getEntries()) {
printTable(entry);
}
if (feed.getEntries().size() == 0) {
out.println("No tables yet! Use the table demo to create one.");
}
}
COM: <s> lists the tables currently available in the sheet </s>
|
funcom_train/26393158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ensureCapacity(int minimumCapacity) {
int maxCapacity = value.length;
if (minimumCapacity > maxCapacity) {
int newCapacity = (maxCapacity + 1) * 2;
if (minimumCapacity > newCapacity) {
newCapacity = minimumCapacity;
}
char newValue[] = new char[newCapacity];
System.arraycopy(value, 0, newValue, 0, count);
value = newValue;
shared = false;
}
}
COM: <s> ensures that the capacity of the buffer is at least equal to the </s>
|
funcom_train/20644661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean drop() {
if (!canBeDroppped()) {
m_log.warn("cannot drop "+this+" they are linked options");
return false;
}
xTarification.tarifsNodesMap.remove(this, null);
// if paired.. break the pairing
if (this instanceof Pairable) {
((Pairable) this).pairedBreak();
}
if (xWorkSheet != null) {
xWorkSheet.setContainer(null);
xWorkSheet.drop();
xWorkSheet = null;
}
//advertise listeners
fireNamedEvent(NamedEvent.TARIF_MAPPING_MODIFIED);
return true;
}
COM: <s> remove a tarif br </s>
|
funcom_train/42869220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void move(double x, double y) {
Move move = new Move(x, y);
if (x < minX) {
minX = x;
}
if (y < minY) {
minY = y;
}
if (x > maxX) {
maxX = x;
}
if (y > maxY) {
maxY = y;
}
elements.add(move);
}
COM: <s> move the pen without drawing any line </s>
|
funcom_train/28545676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IParsedEntity getMainEntity(IParsedSentence aSentence) {
IParsedEntity result = null;
ISentenceType t = aSentence.getSentenceType();
if (hasMainPartConcept(t)) result = getMainConcept(aSentence);
else if (hasMainPartInstance(t)) result = getMainInstance(aSentence);
else if (hasMainPartRelation(t)) result = getMainRelation(aSentence);
return result;
}
COM: <s> returns the main iparsed entity in a sentence </s>
|
funcom_train/37747268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Numeric currentFontSize() throws PropertyException {
PropertyValue fontsize = getPropertyValue(PropNames.FONT_SIZE);
if ( ! (fontsize.getType() == PropertyValue.NUMERIC
&& ((Numeric)fontsize).isLength()))
throw new PropertyException
("font-size value is not a length.");
return (Numeric)fontsize;
}
COM: <s> get the current font size </s>
|
funcom_train/45250783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getKeywordLabels() {
if (keywordLabelCache != null) {
return keywordLabelCache;
}
Collection refs = getKeywordReferences();
if(refs == Collections.EMPTY_SET) {
keywordLabelCache = Collections.EMPTY_SET;
return keywordLabelCache;
}
keywordLabelCache = new ArrayList(refs.size());
Iterator referenceIterator = refs.iterator();
while(referenceIterator.hasNext()){
Object label = KeywordRegistry.getInstance().getKeywordLabel(
(String) referenceIterator.next());
if(label != null) {
keywordLabelCache.add(label);
}
}
return keywordLabelCache;
}
COM: <s> get the labels of all of the keywords of the receiver </s>
|
funcom_train/6475450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processSimulationStart(Element perception, long currenttime) {
// react on simulation Start
gsizeX = Integer.parseInt(perception.getAttribute("gsizex"));
gsizeY = Integer.parseInt(perception.getAttribute("gsizey"));
lineOfSight = 8;
homex1 = Integer.parseInt(perception.getAttribute("corralx0"));
homex2 = Integer.parseInt(perception.getAttribute("corralx1"));
homey1 = Integer.parseInt(perception.getAttribute("corraly0"));
homey2 = Integer.parseInt(perception.getAttribute("corraly1"));
vectorC = new Vector<String>();
vectorD = new Vector<String>();
}
COM: <s> initialisation of main variables and vectors </s>
|
funcom_train/25750323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean showHelpPage() {
parser = ParserRegistry.getHTMLParser();
final BrowserPanel browser = browserProvider.getBrowser(previewPanel, browserToolBar, parser);
if (browser == null) {
UtilFile.launch(Const.HELP_FILE);
return false;
}
file = new File(Const.HELP_FILE);
browser.addProgressListener(new ProgressAdapter() {
public void completed(ProgressEvent event) {
showViewer(browser);
upBt.setEnabled(false);
downBt.setEnabled(false);
occurrenceCounter.setText("0"); //$NON-NLS-1$
}
});
query = null;
browser.setFile(file);
return true;
}
COM: <s> if the internal html viewer is available this method displays the help </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.