__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/49608752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertUser(String username,EntityManager em,User vo) throws Throwable {
try {
vo.setLastPassword(new java.sql.Date(System.currentTimeMillis()));
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 user </s>
|
funcom_train/2437463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshTreeStructures(RefreshStructuresCallback callback) {
ApplicationUiUtils.logIfNotOnEDT(TreeMapper.class, "refreshTreeStructures");
m_mapAreaTable.clear();
m_container.getFormulaDisplayer().applyCurrentFormulas();
loadStructures(false, callback);
}
COM: <s> updates the input and output structures by recreating the jtr files </s>
|
funcom_train/16415348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProgress(final String text, final int cur, final int total) {
if (EventQueue.isDispatchThread()) {
statusLabel.setText(text);
if (cur >= 0 && total > 0) {
progBar.setMinimum(0);
progBar.setValue(cur);
progBar.setMaximum(total);
progBar.setIndeterminate(false);
} else {
progBar.setIndeterminate(true);
}
} else {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
setProgress(text, cur, total);
}
});
}
}
COM: <s> sets the status labels text as well as the progress bars </s>
|
funcom_train/22233648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTextureCoordinateIndex(int texCoordSet, int index) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_COORDINATE_INDEX_READ))
throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray15"));
return ((IndexedGeometryArrayRetained)this.retained).getTextureCoordinateIndex(texCoordSet, index);
}
COM: <s> retrieves the texture coordinate index associated with the vertex at </s>
|
funcom_train/3108436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFirstRowForPage(int page) throws IloaException {
if (page < 0 || page >= this.getPageCount()) {
throw new IloaException("The number of the page is out of range for the datastore '" + this.getType() + "'");
}
if (this.rowsPerPage <= 0) {
return this.getFirstRow();
}
return (new Double(page * this.rowsPerPage)).intValue();
}
COM: <s> return the first row of the page of the datastore </s>
|
funcom_train/42290744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
//Set the clear color and drawing color to black
gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
gl.glColor3f(0.0f, 0.0f, 0.0f);
gl.glShadeModel(gl.GL_SMOOTH);
}
COM: <s> called by the glauto drawable immediately after the open gl </s>
|
funcom_train/43882549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataStore createNewDataStore(Map params) throws IOException{
DataStore ds = null;
String ogrName = (String) OGR_NAME.lookUp(params);
String ogrDriver = (String) OGR_DRIVER_NAME.lookUp(params);
URI namespace = (URI) NAMESPACEP.lookUp(params);
ds = new OGRDataStore(ogrName, ogrDriver, namespace);
return ds;
}
COM: <s> not implemented yet </s>
|
funcom_train/1045442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float readFloatCorrect() throws IOException {
float val;
if (bigendian){
val = readFloat();
}
else {
int x = readUnsignedByte();
x |= ((int)readUnsignedByte()) << 8;
x |= ((int)readUnsignedByte()) << 16;
x |= ((int)readUnsignedByte()) << 24;
val = (float)Float.intBitsToFloat(x);
}
return val;
}
COM: <s> read float correct will return a float from the stream </s>
|
funcom_train/33429944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showHelp(String page) {
if (helpScreen == null) {
helpScreen = new HelpScreen(this);
}
if (page == null) {
page = "help";
}
helpScreen.browser.go("resource://" + page + ".html");
showScreen(helpScreen);
}
COM: <s> opens the help screen with the given help page loaded </s>
|
funcom_train/24150138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getOperationModelReference(edu.uga.cs.lsdis.sawsdl.Operation op) {
List extensibilityElements = op.getExtensibilityElements();
for (Object extensibilityElement : extensibilityElements) {
if (extensibilityElement instanceof AttrExtensions){
AttrExtensions attrExtensions = (AttrExtensions) extensibilityElement;
return attrExtensions.getModelRefStringValue();
}
}
return null;
}
COM: <s> go though the extensibility elements and see whether we can find an extensibility </s>
|
funcom_train/12866977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getEmptySlotCount(List list) {
int empty = 0;
for (int i = 0, size = list.size(); i < size; i++) {
if (list.get(i) == null) {
empty++;
} // end if
} // end for
return empty;
} // end getEmptySlotCount()
COM: <s> returns the number of empty slots in the given list </s>
|
funcom_train/32147604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CommandSet define(CommandAction pAction) {
String key = pAction.getKey();
if (StringUtils.isBlank(key)) {
LOG.error("No key for command.");
} else {
pAction.setParent(this);
getMap().put(key, pAction);
}
return this;
}
COM: <s> add the given command to this set </s>
|
funcom_train/37076950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addResults(Set<SeqFeatureI> results) {
int count = 0;
for (SeqFeatureI result : results) {
if (!result.isAnnot()) {
addResult(result);
count++;
} // else throw and exception?
}
//reformat(); //do I need this?
return count;
}
COM: <s> adds all results in a set to this panel so </s>
|
funcom_train/124386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDataForSymbolName() {
SymbolTable sTable = null;
if (symbolDef != null)
sTable = symbolScope.getSymbolTable(this);
Symbol newSymbol = null;
if (sTable != null && symbolDef != null)
newSymbol = sTable.get(symbolDef);
// special cases
if (newSymbol == symbol)
return;
if (symbol != null)
symbol.removeSymbolListener(this);
symbol = newSymbol;
if (symbol != null)
symbol.addSymbolListener(this);
setSymbolText();
}
COM: <s> gets the data stored in the respective symboltable </s>
|
funcom_train/24237036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createSynonym(String primaryRepresentation, String synonym) {
// find parent synonym fact type
factType = list_checker.checkForFactType(primaryRepresentation);
// create binaryFactType
init(synonym, 0);
if(super.create(true, true, false)) {
super.factSymbol.setPreferred(false);
super.factSymbol.setProhibited(true);
}
}
COM: <s> creates synonym of the given categorization fact type </s>
|
funcom_train/47308243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
// Recreate our transient objects since
// our constructor doesn't get called
initTransientObjects();
// Restart level at offset 0, otherwise we'll start
// where the level editor last stood
offset = 0;
// We always start in normal mode (as in NOT level editor mode)
editormode = false;
}
COM: <s> does a normal serialization of the object and restarts </s>
|
funcom_train/2760317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMessagFilterFilter(MessageFilter msgFilter) {
ArrayList newList = new ArrayList(Arrays.asList(_messageFilters));
newList.add(msgFilter);
_messageFilters = (MessageFilter[]) newList.toArray(new MessageFilter[newList.size()]);
}
COM: <s> adds a message filter to this flow </s>
|
funcom_train/7495830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndRule(int month, int dayOfMonth, int time) {
getSTZInfo().setEnd(month, -1, -1, time, dayOfMonth, false);
setEndRule(month, dayOfMonth, WALL_TIME, time);
}
COM: <s> sets the dst end rule to a fixed date within a month </s>
|
funcom_train/48406470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addValidContextPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Activity_validContext_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Activity_validContext_feature", "_UI_Activity_type"),
SpemxtcompletePackage.eINSTANCE.getActivity_ValidContext(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the valid context feature </s>
|
funcom_train/17773970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTextFieldFromSlider(){
double r = Math.pow(10, getLogRange());
double o = slider.getValue()*1./halfgridsize * r;
try{
setValue(((Number) value.getValue()).doubleValue()+o);
} catch (IllegalArgumentException ex){
slider.setValue(0);
}
}
COM: <s> reads the internal slider value and transfers it to the text field </s>
|
funcom_train/14273846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public vObject getProperty(String key) {
vObject prop = null;
for (int i = 0; i < size(); i++) {
vObject obj = (vObject)elementAt(i);
if (obj.getName().equals(key)) {
prop = obj;
break;
}
}
return prop;
}
COM: <s> gets first property in list with code string key code </s>
|
funcom_train/16629086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(Bot bot, String msg) {
if(msg != null){
if(!msg.startsWith("<font")){
msg = "<font color=#FFFFFF>" + msg + "</font>";
}
messages.add(Message.obtain(handler, TEXT, msg));
}
}
COM: <s> prints a string </s>
|
funcom_train/38588964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSheetnameMaster(String sheetnameMaster) {
log.debug(sheetnameMaster);
if(sheetnameMaster == null) {
log.warn("Set NULL Parameter as Empty String.");
sheetnameMaster = "";
}
String old = getSheetnameMaster();
this.sheetnameMaster = sheetnameMaster;
this.firePropertyChange(MainModel.PROPERTY_SheetnameMaster, old, this.sheetnameMaster );
}
COM: <s> set the master sheet name </s>
|
funcom_train/8631072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection connect(String url, Properties info) throws SQLException {
try {
if (info == null) {
info = new Properties();
}
if (!acceptsURL(url)) {
return null;
}
return new JdbcConnection(url, info);
} catch (Exception e) {
throw Message.convert(e);
}
}
COM: <s> open a database connection </s>
|
funcom_train/22233569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColorIndex(int index, int colorIndex) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_COLOR_INDEX_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray3"));
((IndexedGeometryArrayRetained)this.retained).setColorIndex(index, colorIndex);
}
COM: <s> sets the color index associated with the vertex at </s>
|
funcom_train/19036426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fetchForumProperties() {
if(isConnected()) {
try {
synchronized(this) {
this.getOutputStream().writeInt(ClientMessageCode.FETCHFORUMPROPERTIES.getIndex());
this.getOutputStream().flush();
}
} catch (IOException e) {
this.messageFailed(e);
}
}
}
COM: <s> request the server to tell this client the properties of the server </s>
|
funcom_train/6350011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillContentPage(String screenName, String pageName) {
this.screenName = screenName;
this.pageName = pageName;
try {
contentDOs = contentData.getContentDOs(screenName, pageName);
tableViewer.setInput(contentDOs);
} catch (RemoteException e) {
log.writeLog("error", "RemoteException in ContentPage.fillContentPage: " + e.getMessage());
}
}
COM: <s> get row contents for application and page </s>
|
funcom_train/50142147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addService(String name, String[] dependencies) {
// reset ordered list
orderedList = null;
log.debug("Adding service to service list '" + name + "'...");
if (entries.containsKey(name)) {
log.warn("Duplicate definition of '" + name + "'; ignoring additional one");
}
entries.put(name, dependencies);
}
COM: <s> add a new service given the name and it dependencies </s>
|
funcom_train/32648995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createHorPaddingTextField() {
GridData gridData5 = new GridData();
gridData5.widthHint = 30;
horPaddingTextField = new ThemeTextField(leftComposite, SWT.NONE);
horPaddingTextField.setHelpPage("");
horPaddingTextField.setIntValued(true);
horPaddingTextField.setBindingSubPath("horizontalPadding");
horPaddingTextField.setEmbeddedInBindableGroup(false);
horPaddingTextField.setLayoutData(gridData5);
}
COM: <s> this method initializes hor padding text field </s>
|
funcom_train/29622616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run()
{
ClientModuleManager manager = (ClientModuleManager)ClientModuleManager.getInstance() ;
while (session.sessionEstablished()) {
try {
sleep(15000) ;
} catch (InterruptedException ie) {
ie.printStackTrace() ;
}
NetworkServiceProvider netw = (NetworkServiceProvider)(manager.getLowerLayer().getLowerLayer().getLowerLayer()) ;
netw.onSendingData(session.getSession_id(), " ", false) ;
}
}
COM: <s> run for the thread </s>
|
funcom_train/12554327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object remove() {
Link cur = cursor();
if (cur == null) {
throw new java.util.NoSuchElementException();
}
if (tail == cur) {
tail = pre;
}
if (pre != null) {
pre.next = cur.next;
} else {
head = cur.next;
}
len--;
return cur.data;
}
COM: <s> remove the element under the cursor </s>
|
funcom_train/18743684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public String getValueFromJava(Object constant) {
if (!(constant instanceof java.lang.String)) {
throw new IllegalArgumentException(java.lang.String.format(
"Native int type is %s, not %s",
java.lang.String.class.getSimpleName(),
constant.getClass().getSimpleName()));
}
return toValue((java.lang.String) constant);
}
COM: <s> conversion of native java representation of string constants to </s>
|
funcom_train/40764746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Stereotype getStereotype(Element elt, String stereotype) throws ENodeCastException {
Stereotype result = null;
// search with real stereotype
for (Iterator iter = elt.getAppliedStereotypes().iterator(); iter.hasNext();) {
Stereotype element = (Stereotype) iter.next();
if (element.getName().equals(stereotype)) {
result = element;
}
}
return result;
}
COM: <s> return the stereotype if is applied to element </s>
|
funcom_train/28473156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBrowseButton() {
if (browseButton == null) {
browseButton = new JButton();
browseButton.setActionCommand("Add...");
browseButton.setSelected(false);
browseButton.setPreferredSize(new Dimension(101, 20));
browseButton.setText("Browse...");
browseButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
browse();
}
});
}
return browseButton;
}
COM: <s> this method initializes browse button </s>
|
funcom_train/12553925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws IOException {
setConnected(false);
setLoggedIn(false);
// Here we close the socket and streams
if(outToServer != null) {
outToServer.close();
}
if(inFromServer != null) {
inFromServer.close();
}
if(clientSideSocket != null) {
clientSideSocket.close();
}
}
COM: <s> closes the connection to the server </s>
|
funcom_train/4123412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayChat(String senderName, String message, boolean privateChat) {
if (privateChat) {
chatArea.append(senderName + " (private): " + message + '\n');
} else {
chatArea.append(senderName + ": " + message + '\n');
}
}
COM: <s> displays a chat message to the user </s>
|
funcom_train/3611858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteFirstMessage (Resources ctx, String clientID, String objectID) throws SQLException {
DeleteMessageQuery delQuery = null;
try {
delQuery = new DeleteMessageQuery (ctx);
delQuery.setClientID (clientID);
delQuery.setObjectID (objectID);
delQuery.execute ();
}
finally {
if (delQuery != null)
delQuery.close ();
}
}
COM: <s> method to delete the first changed document for the specified client </s>
|
funcom_train/5373823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFont(Font font) {
checkWidget();
int oldLineHeight = lineHeight;
super.setFont(font);
initializeRenderer();
// keep the same top line visible. fixes 5815
if (lineHeight != oldLineHeight) {
setVerticalScrollOffset(verticalScrollOffset * lineHeight / oldLineHeight, true);
claimBottomFreeSpace();
}
calculateContentWidth();
calculateScrollBars();
if (isBidiCaret()) createCaretBitmaps();
caretDirection = SWT.NULL;
// always set the caret location. Fixes 6685
setCaretLocation();
super.redraw();
}
COM: <s> sets a new font to render text with </s>
|
funcom_train/20840434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isInStackTrace(String thread) {
Map<Thread, StackTraceElement[]> st = Thread.getAllStackTraces();
for (Map.Entry<Thread, StackTraceElement[]> e : st.entrySet()) {
Thread t = e.getKey();
if (thread.equals(t.getName()))
return true;
}
return false;
}
COM: <s> checks if is in stack trace </s>
|
funcom_train/18886811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long longAt(int index) {
/*if (index < 0 || index > size()) {
throw new IndexOutOfBoundsException();
}*/
int pageNum = (index >> exp);
// int offset = index % r;
int offset = index &r;
return ((long[]) bufferArrayList.get(pageNum))[offset];
}
COM: <s> get the long val at given index value </s>
|
funcom_train/17924786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyVector(Expression expression) {
Vector tempVec = ((ExpressionListElement) expression).getExpressions();
for (int i = 0; i < tempVec.size(); i++) {
Expression tempExpr = (Expression) tempVec.elementAt(i);
tempExpr.setParent(this); //belongs into this ParenExpression object
this.add(tempExpr);
}
}
COM: <s> auxiliary method for </s>
|
funcom_train/39309218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hardwareRegistered(HardwareRegisteredEvent event) {
// retrieve a reference to the newly registered hardware object
RegisteredHardware registeredHardware = event.getUpdatedHardware();
UnregisteredHardware unregisteredHardware = event.getOldHardware();
// remove the node from the unregistered branch
removeUnregisteredHardware(unregisteredHardware);
// add it to the registered branch
addRegisteredHardware(registeredHardware);
}
COM: <s> called when a new hardware object is registered </s>
|
funcom_train/29525617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean SaveCastadivaData(String folder, String file) {
StoreData info = new StoreData(minSpeed, maxSpeed, pause, x, y, RTS, GetSimulationTime(),
allAddresses, nodePositions, mobilityModel, routingProtocol);
try {
new SerialScenarioDataStream(folder + File.separator
+ file).save(info);
} catch (IOException ex) {
ex.printStackTrace();
return false;
}
return true;
}
COM: <s> save all data from the scenario definition in a special class </s>
|
funcom_train/20313548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExtendedIterator listComments( String lang ) {
checkProfile( getProfile().COMMENT(), "COMMENT" );
return WrappedIterator.create( listProperties( getProfile().COMMENT() ) )
.filterKeep( new LangTagFilter( lang ) )
.mapWith( new ObjectMapper() );
}
COM: <s> p answer an iterator over all of the comment literals for this resource </s>
|
funcom_train/39537129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void disposeUnusedPictures(){
//getting the list of the pictures
Set<SVGPicture> allPictures=
viewBrowser.mainDisplay.getPictureManager().getPictures();
for(SVGPicture picture : allPictures){
if(picture!=null && ! picture.isDisplayed()){
viewBrowser.mainDisplay.getPictureManager().
removePicture(picture);
picture.dispose();
}
}
}
COM: <s> disposes all the unused pictures </s>
|
funcom_train/23271145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAsText(String text) throws IllegalArgumentException {
if ("HORIZONTAL".equals(text)) {
setValue(PlotOrientation.HORIZONTAL);
}
else if ("VERTICAL".equals(text)) {
setValue(PlotOrientation.VERTICAL);
}
else {
throw new IllegalArgumentException("Unrecognised 'text' argument.");
}
}
COM: <s> sets the current value by parsing the supplied string </s>
|
funcom_train/42046999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OrderLineDO find(int orderNr, int sequence, Lock lockType) throws RimuDBException {
KeyList keylist = new KeyList();
keylist.add(OrderLineDO.F_ORDER_NR, new Integer(orderNr));
keylist.add(OrderLineDO.F_SEQUENCE, new Integer(sequence));
return (OrderLineDO) find(keylist, lockType);
}
COM: <s> return a order line do for the given primary key value s </s>
|
funcom_train/18722056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getSimilarity(int index1, int index2) {
int i1 = Math.min(index1, index2);
int i2 = Math.max(index1, index2);
if (i1>=0 && i1 <dimension && i2>=0 && i2<dimension) {
return similarity[i1][i2];
}
return 0;
}
COM: <s> calculates the similarity between objects using the similarity function for k 0 </s>
|
funcom_train/38827045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Frame handleNew( ActionEvent event ) {
Frame window = null;
try {
// Create an instance of an application window to get the program rolling.
window = MainWindow.newAppWindow(null, null, app);
window.setVisible(true);
this.addWindow(window);
} catch (Exception e) {
ResourceBundle resBundle = getResourceBundle();
AppUtilities.showException(null, resBundle.getString("unexpectedTitle"),
resBundle.getString("unexpectedMsg"), e);
e.printStackTrace();
}
return window;
}
COM: <s> handle the user choosing the new </s>
|
funcom_train/7291475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setIterator(int pos, ParagraphIterator iter) {
if ((pos < 0) || (pos >= fRunArray.getCurTextLength())) {
iter.set(0, 0, kNoRun, null);
return;
}
int run;
if (pos > 0)
run = fRunArray.findRunContaining(pos-1);
else
run = -1;
setIteratorUsingRun(run, iter);
}
COM: <s> called by iterator to get run info </s>
|
funcom_train/31435171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateRow(IX10Module rowData) {
int rownum = ttTippedTable.getSelectedRow();
try
{
rownum = tsSorter.getMappingToRow(rownum);
}
catch (Exception e)
{
}
if (rownum > -1)
{
moduleModel.setValueAt(rowData, rownum);
saveAllData();
}
updateUI();
}
COM: <s> updates the currently selected row </s>
|
funcom_train/50077604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map loadAllData() {
Map returnMap = new HashMap();
for (int i = 0; i < CacheServiceTest.CACHE_SIZE; i++) {
Integer x = new Integer(i);
returnMap.put(x, CacheServiceTest.getCacheValue(x));
}
return returnMap;
}
COM: <s> load the cache with test data elements </s>
|
funcom_train/20889366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processResponsePacket(RumorRoutingResponsePacket packet) {
LOGGER.debug("handles response packet " + packet);
InformationUnit unit = packet.getUnit();
Object searchKey = packet.getSearchKey();
ServiceEndpoint sinkEndpoint = packet.getSinkEndPoint();
FoundInformationEvent event = new FoundInformationEvent(sinkEndpoint, searchKey, unit);
operatingSystem.sendEventSelf(event);
}
COM: <s> processes a response packet </s>
|
funcom_train/41344353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Block readBlock(int blockId) throws IOException {
Pointer pointer = blockAddressTable.getPointer(blockId);
if (pointer != null) {
long startAddr = startAddrClusterBlocks + pointer.startAddr;
// need to read 4 bytes to much since the Deserializer requires that.
int nBytes = pointer.lengthBytes + 4;
raf.seek(startAddr);
byte[] buff = new byte[nBytes];
raf.readFully(buff);
Block block = new Block(blockId, buff, this);
return block;
}
return null;
}
COM: <s> reads a block form secondary storage </s>
|
funcom_train/1536275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean handlePlate(EuclidianView3D ev, LinkedHashMap<String, String> attrs) {
try {
String strShowPlate = (String) attrs.get("show");
// show the plane
if (strShowPlate != null) {
boolean showPlate = parseBoolean(strShowPlate);
ev.setShowPlate(showPlate);
}
return true;
} catch (Exception e) {
//e.printStackTrace();
return false;
}
}
COM: <s> handles plane attributes show plate for euclidian view3 d </s>
|
funcom_train/9698311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBodyASTTest3Main() throws Exception {
cat.info("Testing getBodyAST abstract Test3.main");
final BinCIType test3 =
project.getTypeRefForName("Test3")
.getBinCIType();
final ASTImpl bodyAst = test3.getDeclaredMethods()[0].getBodyAST();
assertNull("getBodyAST()", bodyAst);
cat.info("SUCCESS");
}
COM: <s> tests get body ast on abstract test3 </s>
|
funcom_train/50864749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SalvagePanel getSalvagePanel(SalvageProcess process) {
SalvagePanel result = null;
for (int x = 0; x < processListPane.getComponentCount(); x++) {
Component component = processListPane.getComponent(x);
if (component instanceof SalvagePanel) {
SalvagePanel panel = (SalvagePanel) component;
if (panel.getSalvageProcess().equals(process)) result = panel;
}
}
return result;
}
COM: <s> gets the panel for a salvage process </s>
|
funcom_train/44161496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDriver(ActionEvent ae) {
String value =
((HtmlSelectOneListbox)ae.getComponent()
.findComponent("drivers"))
.getValue().toString();
if (!value.equals("")) {
this.xmluts.removeDriver(value);
}
this.drivers = this.xmluts.getDrivers();
}
COM: <s> remove driver removes driver from application </s>
|
funcom_train/16141191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayResultFor(String path) {
try {
CompileRequest q = PolyMLPlugin.polyMLProcess.compileInfos.getFromPath(path);
CompileResult r = q.getResult();
doc.appendPar("Status for "+path, "info");
displayResult(r);
} catch (NullPointerException e) {
doc.appendPar("No Status for file "+(path==null?"(null)":path)+".", PolyMLError.KIND_WARNING);
scrollToBottom(false);
}
}
COM: <s> appends all errors relating to the given buffer to the document </s>
|
funcom_train/48212425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String convertType(int sqlType, int precision, int scale) {
switch (sqlType) {
case Types.SMALLINT:
return "SMALLINT";
case Types.INTEGER:
return "INTEGER";
case Types.FLOAT:
return "REAL";
case Types.DOUBLE:
case Types.REAL:
return "DOUBLE";
case Types.NUMERIC:
if (precision > 0 && scale > 0) {
return "NUMERIC("+precision+","+scale+")";
} else if (precision > 0) {
return "NUMERIC("+precision+")";
} else {
return "NUMERIC";
}
case Types.TIMESTAMP:
return "DATETIME";
default:
return super.convertType(sqlType, precision, scale);
}
}
COM: <s> overrides the superclasss convert type method where required by </s>
|
funcom_train/9261811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FactoryInstance createFactoryInstance(ConfigMap properties)
{
if (properties == null)
properties = new ConfigMap();
properties.put(FlexFactory.SOURCE, source);
properties.put(FlexFactory.SCOPE, scope);
FactoryInstance factoryInstance = getFactory().createFactoryInstance(getId(), properties);
return factoryInstance;
}
COM: <s> creates a factory instance using the properties passed in </s>
|
funcom_train/32812660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setConnectPool(ExtendedProperties sc) {
if (sc.containsKey(DBCACHE_POOL_PROPERTY)) {
this.connectPool
= (JdbcConnections) sc
.getProperty(DBCACHE_POOL_PROPERTY);
} else {
cat.debug("Creating ConnectPool " + DBCACHE_POOL_PROPERTY );
this.connectPool = new JdbcConnections( sc );
synchronized (sc) {
sc.setProperty(DBCACHE_POOL_PROPERTY, this.connectPool);
}
}
}
COM: <s> retrieve the connect pool from the global properties or create </s>
|
funcom_train/3763780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String fixHref(String href) {
String newhref = href.replace('\\', '/'); // fix sloppy web references
int lastdot = newhref.lastIndexOf('.');
int lastslash = newhref.lastIndexOf('/');
if (lastslash > lastdot) {
if (newhref.charAt(newhref.length() - 1) != '/') {
newhref = newhref + "/"; // add on missing /
}
}
return newhref;
}
COM: <s> repairs a sloppy href flips backwards adds missing </s>
|
funcom_train/32891843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean nodeMayMove(Node n, View view, Point p) {
Class[] sf = { Node.class };
Selection s = new Selection(view, sf, model.getInfrastructure());
Rectangle r = new Rectangle(p);
int growsize = Infrastructure.blockLength * 2 + Infrastructure.blockWidth * 8 + 2;
r.grow(growsize, growsize);
s.newSelection(r);
s.deselect(n);
return s.isEmpty();
}
COM: <s> returns true if given node may be moved to given point </s>
|
funcom_train/11372977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String newStorageID() {
String newID = null;
while(newID == null) {
newID = "DS" + Integer.toString(DFSUtil.getRandom().nextInt());
if (datanodeMap.get(newID) != null)
newID = null;
}
return newID;
}
COM: <s> generate new storage id </s>
|
funcom_train/18518579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addFieldException(UtilFieldValueBusinessException exception) {
fieldExceptions = fieldExceptions == null ? new HashMap() : fieldExceptions;
String fieldName = exception.getFieldName();
if (fieldName != null) {
fieldExceptions.put(fieldName, exception);
}
else {
this.lstExceptions.add(exception);
}
}
COM: <s> stores this exception associated to the field name </s>
|
funcom_train/42709736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dumpXML(PrintStream out) throws JAXBException {
preSave();
JAXBContext context = JAXBContext.newInstance(FittingCriteria.class);
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
m.marshal(this, out);
postSave();
}
COM: <s> create formatted xml from this object </s>
|
funcom_train/25599758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel getPanelMote() {
if (panelMote == null) {
panelMote = new JPanel();
panelMote.setLayout(new ExtendedFlowLayout(FlowLayout.CENTER, 0, 0));
panelMote.setBackground(Color.white);
panelMote.setName("panelMote");
panelMote.setMaximumSize(new Dimension(98, 392));
}
return panelMote;
}
COM: <s> this method initializes panel mote </s>
|
funcom_train/29700335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AcceptanceTestingVelocityDataProducer getAcceptanceTestingVelocityDataProducer() {
if (acceptanceTestingVelocityDataProducer == null) {
acceptanceTestingVelocityDataProducer = new AcceptanceTestingVelocityDataProducer();
}
acceptanceTestingVelocityDataProducer.setProjectId(this.currentProjectId);
acceptanceTestingVelocityDataProducer.execute();
return acceptanceTestingVelocityDataProducer;
}
COM: <s> getter for property acceptance testing velocity data producer </s>
|
funcom_train/38480630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ModelPackage registerPackage(ModelPackage pParent, String pName, IconSet pIcons) {
log.info("registerPackage " + pName);
ModelPackage tPackage = new ModelPackage(pParent, pName);
getModel().addPackage(pParent, tPackage);
return tPackage;
}
COM: <s> creates new model package and adds to the model </s>
|
funcom_train/43232246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeMetaModel(final TypeManager typeManager, final Model model) {
try {
typeManager.setOne(new One(model));
typeManager.setMany(new Many(model));
this.initializeStandardFieldTypes(typeManager, model);
this.initializeStandardStateTypes(typeManager, model);
this.initializeStandardFeature(typeManager, model);
this.initializeStandardBug(typeManager, model);
this.initializeStandardTask(typeManager, model);
} catch (final IPScrumGeneralException e) {
// Some error while initializing the meta model.
}
}
COM: <s> help method for initializing the demo data </s>
|
funcom_train/46157424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float getHeightFraction(Vector3f pos) {
float minimumHeight = 0;
float avatarHeightRelativeToTimeline = pos.y - minimumHeight;
float height = avatarHeightRelativeToTimeline / this.config.getHeight();
// clamp the hight.
if (height > 1.0f) {
height = 1.0f;
}
if (height < 0.0f) {
height = 0.0f;
}
return height;
}
COM: <s> calculates the percentage the specified position is within the height </s>
|
funcom_train/5395485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDecodeFloat() {
System.out.println("decodeFloat");
byte[] buffer = null;
float expResult = 0.0F;
float result = DecodeEncodePrimitives.decodeFloat(buffer);
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 decode float method of class org </s>
|
funcom_train/37413813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long parseHash(String s) throws NumberFormatException {
if (s.length() > 16)
throw new NumberFormatException(s);
long val = 0;
for (int i = 0; i < s.length(); i++) {
int digit;
if ((digit = Character.digit(s.charAt(i), 16)) == -1)
throw new NumberFormatException(s);
val = (val << 4) | digit;
}
return val;
}
COM: <s> parse an unsigned 8 byte hex value </s>
|
funcom_train/38536480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CspBooleanExpr and (CspBooleanExpr expr) {
if (expr instanceof GenericBooleanExpr)
return new GenericBooleanExpr(null, this, BoolOperation.AND, (BooleanExpr) expr, false);
else
return new BooleanExpr(null, this, BoolOperation.AND, (BooleanExpr) expr, false);
}
COM: <s> creates a boolean expression resulting from anding a boolean expression </s>
|
funcom_train/40312084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetColumnDisplaySize_InvalidColumn1() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.getColumnDisplaySize(-1);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by getColumnDisplaySize method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests get column display size with negative index </s>
|
funcom_train/31436370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPlannerCount() throws SQLException {
int retval = 0;
DbConnection dc = new DbConnection();
ResultSet rowCount = dc.execute("SELECT COUNT(userid) FROM planners WHERE eventid =" + eventId);
if (rowCount.next()) {
retval = rowCount.getInt(1);
}
dc.close();
return retval;
}
COM: <s> returns the number of planners including the owner for the current event </s>
|
funcom_train/810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBoardToDisplay(String boardAsString) {
// Create an new board.
board = new Board(application);
// Create an own board from the board of the level.
try {
board.setBoardFromString(boardAsString);
} catch (Exception e) {
e.printStackTrace();
}
// Array containing the information which graphic has to be drawn at a specific position.
graphicStatus = new byte[board.height * board.width];
// New level means every thing has to be recalculated to refresh the Panel.
isRecalculationNecessary = true;
// Repaint this Panel.
repaint();
}
COM: <s> sets the passed board to be displayed </s>
|
funcom_train/10748810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testThrowableStringThrowable() {
Throwable th1 = new Throwable();
Throwable th = new Throwable("aaa", th1);
assertEquals("incorrect message", "aaa", th.getMessage());
assertSame("incorrect cause", th1, th.getCause());
assertTrue("empty stack trace", th.getStackTrace().length > 0);
}
COM: <s> constructor under test throwable string throwable </s>
|
funcom_train/41164267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoParagraphCheckList2 entity) {
EntityManagerHelper.log("saving CoParagraphCheckList2 instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co paragraph check list2 </s>
|
funcom_train/19241644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IPreferenceStore2 getUserPreferences(String userID) {
IPreferenceStore2 userPrefs = getPreferences().getChildNode(
PREF_NODE_USER);
if (!userPrefs.hasChildNode(userID)) {
IPreferenceStore2 prefs = userPrefs.getChildNode(userID);
UIPreferenceInitializer.initializeDefaultUserPreferences(prefs);
return prefs;
}
return userPrefs.getChildNode(userID);
}
COM: <s> get user preferences </s>
|
funcom_train/23782698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAction(Integer state,String a,Action action) {
if (action == null) {
setActions(state,a,null) ;
}
else {
Set<Action> la = new HashSet<Action>() ;
la.add(action) ;
setActions(state,a,la) ;
}
}
COM: <s> sets the action for the given state and terminal </s>
|
funcom_train/33564045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean requiresOps(String text) {
if(!text.startsWith("/"))
return false;
try {
switch(text.charAt(1)) {
case 'b':
return text.startsWith("/ban");
case 'c':
return text.startsWith("/c ")
|| text.startsWith("/clan ");
case 'd':
return text.startsWith("/designate ");
case 'k':
return text.startsWith("/kick ");
case 'u':
return text.startsWith("/unban ");
}
} catch(Exception e) {
// charAt() probably failed; no ops required
}
return false;
}
COM: <s> determine if channel operator status is required to send text </s>
|
funcom_train/38413699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JWizardStep getJWizardStepFromFile( String parametersFile ) {
FileInputStream fis = null;
try{
fis = new FileInputStream(parametersFile);
}
catch( Exception e ) {
e.printStackTrace();
return null;
}
JWizardStepParameters parameters = JWizardStepParameters.loadFromStream( fis );
if(parameters==null)
return null; // load failed
return getJWizardStep(parameters);
}
COM: <s> to get an instance of a jwizard step according to its parameters </s>
|
funcom_train/3379493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMessage() {
StringBuffer message = new StringBuffer();
int returnCode = returnCode();
if (returnCode != 0) {
message.append(returnCodeMessage());
message.append(" (").append(returnCode()).append(')');
}
String consMessage = super.getMessage();
if (consMessage != null && consMessage.length() != 0) {
if (returnCode != 0)
message.append(" - ");
message.append(consMessage);
}
return message.toString();
}
COM: <s> returns messages like </s>
|
funcom_train/38286033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Group loadGroupObject(Object[] obj) {
String shortName = (String)obj[0];
List childs = (List)obj[1];
Group group = new Group(shortName);
for (int i=0; i<childs.size(); i++) {
Object[] childObj = (Object[])childs.get(i);
group.children.add(loadGroupObject(childObj));
}
groupMap.put(group.name, group);
return group;
}
COM: <s> recursively load groups objects from the xml rpc structure </s>
|
funcom_train/19844476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dropOrganizationTypeTable() {
try {
String sqlCmd = "DROP TABLE tbl_ORGANIZATION_TYPE";
stmt = conn.createStatement();
stmt.execute(sqlCmd);
stmt.close();
}
catch (Exception e) {
logger.log(Level.SEVERE, e.toString());
}
}
COM: <s> drops the tbl organization type table </s>
|
funcom_train/12522360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateOptimizedStringConcatenation(BlockScope blockScope, CLICodeStream codeStream, int typeID) {
if (typeID == T_JavaLangString && this.constant != Constant.NotAConstant && this.constant.stringValue().length() == 0) {
return; // optimize str + ""
}
generateCode(blockScope, codeStream, true);
codeStream.invokeStringConcatenationAppendForType(typeID);
}
COM: <s> cil code generation for optimized string concat </s>
|
funcom_train/11590840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isShowAllToolBoxes(){
if (_showAllToolBoxes != null)
return _showAllToolBoxes.booleanValue();
ValueBinding vb = getValueBinding("showAllToolBoxes");
return vb != null ? ((Boolean)vb.getValue(getFacesContext())).booleanValue() : false;
}
COM: <s> shortcut to avoid setting all the show xxtool box to true </s>
|
funcom_train/17676326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sort(Comparator comp) {
if (size <= 1) return;
if (size == 2) {
if (comp.compare(oids[0], oids[1]) > 0) {
OID t = oids[0];
oids[0] = oids[1];
oids[1] = t;
}
return;
}
Arrays.sort(oids, 0, size, comp);
}
COM: <s> sort the oids </s>
|
funcom_train/48663918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processException(Throwable t) throws Throwable {
// this exception is thrown when retrieving the details
// for certain entities (JBoss should be careful here)...
if(Utils.getTrace(t).indexOf("java.io.NotSerializableException") >= 0) {
// ignore
if(logger.isTraceEnabled()) {
logger.error(t);
}
return;
}
super.processException(t);
}
COM: <s> this is overridden because an exception java </s>
|
funcom_train/18325707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTopPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StateMachine_top_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StateMachine_top_feature", "_UI_StateMachine_type"),
CoremodelPackage.Literals.STATE_MACHINE__TOP,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the top feature </s>
|
funcom_train/12685324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initLevelsTable(Vector levels) {
this.levelsTable = new Hashtable();
for (int i = 0; i < levels.size(); i++) {
this.levelsTable.put(((Level) levels.elementAt(i)).toString(),
(Level) levels.elementAt(i));
}
}
COM: <s> initialize the hashtable levels table conisting of all levels and their </s>
|
funcom_train/22232670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertScope(Group scope, int index) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_SCOPE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("ModelClip9"));
if (isLive())
((ModelClipRetained)this.retained).insertScope(scope, index);
else
((ModelClipRetained)this.retained).initInsertScope(scope, index);
}
COM: <s> inserts the specified group node into this model clip nodes </s>
|
funcom_train/38492409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendBoard(Board board) throws JCatanoException{
try {
sendToAll(new ItemMessage<Board>(board));
} catch (JCatanoException e) {
logger.fatal("Couldn't send msg to all players...", e);
System.exit(-1);
}
}
COM: <s> send board to all players </s>
|
funcom_train/9499366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public GeoConic Circle(String label, GeoPoint M, NumberValue r) {
AlgoCirclePointRadius algo = new AlgoCirclePointRadius(cons, label, M, r);
GeoConic circle = algo.getCircle();
circle.setToSpecific();
circle.update();
notifyUpdate(circle);
return circle;
}
COM: <s> circle with midpoint m and radius r </s>
|
funcom_train/1602479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInputEndDateTime(int year, int month, int day, int hour, int minute) {
String minuteString;
if(minute == 0) {
minuteString = "00";
} else {
minuteString = Integer.toString(minute);
}
endYearField.setSelectedItem(year);
endMonthField.setSelectedItem(month);
endDayField.setSelectedItem(day);
endHourField.setSelectedItem(hour);
endMinuteField.setSelectedItem(minuteString);
}
COM: <s> sets the end time and date in the textfields </s>
|
funcom_train/12171770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeCaptionedText(final ObjectAttribute attributes) throws ProtocolException{
final Content textContent = new Content() {
public void addContent() {
context.getCurrentOutputBuffer().writeText(attributes.getTextContainer());
}
};
Captioner captioner = new Captioner();
captioner.caption(textContent,attributes.getCaptionContent(),attributes);
}
COM: <s> write text inside caption </s>
|
funcom_train/4920212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFillMultipleSupplyOrders() {
MockSupplyOrder one = new MockSupplyOrder(new AutoWire(String.class));
MockSupplyOrder two = new MockSupplyOrder(new AutoWire(Property.class));
MockSupplyOrder three = new MockSupplyOrder(new AutoWire(Long.class));
this.fillSupplyOrders(one, two, three);
validateSuppliedManagedObject(one, String.class, 0, 0);
validateSuppliedManagedObject(two, Property.class, 0, 0, "MO_NAME",
"MO_VALUE");
validateSuppliedManagedObject(three, Long.class, 1000, 0);
}
COM: <s> ensure can fill multiple </s>
|
funcom_train/43866483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSet getEnergyProgress(int source) {
try {
statement = connection.createStatement();
resultSet = statement.executeQuery("SELECT Energy FROM transaction WHERE SourceId=" + source);
} catch (SQLException ex) {
Logger.getLogger(DatabaseConnection.class.getName()).log(Level.SEVERE, null, ex);
}
return resultSet;
}
COM: <s> function for getting the energy progress of a source node </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.