__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/1549628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAll(Collection<? extends E> collection) {
if (fast) {
synchronized (this) {
ArrayList<E> temp = (ArrayList<E>) list.clone();
boolean result = temp.addAll(collection);
list = temp;
return (result);
}
} else {
synchronized (list) {
return (list.addAll(collection));
}
}
}
COM: <s> append all of the elements in the specified collection to the end </s>
|
funcom_train/31929390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SegmentHeader virtualAddressToSegment(int virtualAddress) {
for (int i = 0; i < segmentHeaders.length; i++) {
int offsetWithinSegment = (virtualAddress - segmentHeaders[i].p_vaddr);
if (offsetWithinSegment > 0 && offsetWithinSegment < segmentHeaders[i].p_memsz) {
return segmentHeaders[i];
}
}
return null;
}
COM: <s> returns the segment that the given virtual address belongs to </s>
|
funcom_train/50124090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireResponseError(int requestId, Throwable error) {
synchronized (listeners) {
for (Iterator i = listeners.iterator(); i.hasNext();) {
ResponseListener l = (ResponseListener) i.next();
l.handleResponseError(requestId, error);
}
}
}
COM: <s> plugins should call this method to return an error to the caller </s>
|
funcom_train/16619285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCgview(Cgview cgview) {
this.cgview = cgview;
this.featureThickness = cgview.getFeatureThickness();
this.showShading = cgview.getShowShading();
//go through the existing FeatureSlots to determine which position this one will occupy.
ArrayList featureSlots = cgview.getFeatureSlots();
//add this FeatureSlot to the Cgview featureSlots.
featureSlots.add(this);
}
COM: <s> adds this feature slot to a cgview object </s>
|
funcom_train/41073770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDuration() {
double duration = 0;
try {
if (tagList.hasField("totalduration")) {
duration = Double.parseDouble(tagList
.getValues("totalduration").get(0).toString());
}
duration = Integer.parseInt(tagList.getValues("duration").get(0)
.toString());
} catch (Exception ex) {
}
if (duration <= 0) {
isPlayable = false;
}
return duration;
}
COM: <s> provides the duration in seconds of the video </s>
|
funcom_train/34391417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(PrintWriter writer) {
writer.print("<" + this.elementName);
for (Element element : this.elements) {
String value = element.value;
if (null == value) {
value = "";
}
writer.print(" " + element.name + "=\"" + HtmlUtil.escape(value)
+ "\"");
}
if (null != this.escapedBody) {
writer.println(">");
writer.println(this.escapedBody);
writer.println("</" + this.elementName + ">");
} else {
writer.println("/>");
}
}
COM: <s> outputs the html element to the given writer </s>
|
funcom_train/21154072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean check(long mask) {
_log.finest("Rule ["+getName()+"] this.mask (0x"+Long.toHexString(this.mask)+") & mask (0x"+Long.toHexString(mask)+")=0x"+Long.toHexString(this.mask & mask));
return clauses.containsKey(new Long(mask));
}
COM: <s> checks mask for correspondence to one of available clauses </s>
|
funcom_train/41274983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String generateNOnce(Request request) {
long currentTime = System.currentTimeMillis();
String nOnceValue = ((HttpServletRequest )request).getRemoteAddr() + ":" +
currentTime + ":" + key;
byte[] buffer = null;
synchronized (md5Helper) {
buffer = md5Helper.digest(nOnceValue.getBytes());
}
nOnceValue = md5Encoder.encode(buffer);
return nOnceValue;
}
COM: <s> generate a unique token </s>
|
funcom_train/26489562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getElement() {
if (getContext().isUserLoggedIn())
removeElement("home");
else
removeElement("myhome");
Element check = getElement("backprev");
if(check.getParentNode() != null) {
// Not removed, so backlink don't have a valid URL, so we remove
// it and use backprev instead.
removeElement("backlink");
}
Element elem = null;
try {
elem = super.getElement();
} catch(Exception ex) {
}
return elem;
}
COM: <s> this is supposed to be called by </s>
|
funcom_train/49052928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QuerySet set(String key, String value) throws SQLException {
hasRan();
if (setSet == null) {
setSet = "\nSET ";
} else {
setSet += ",";
}
setSet += key + "=?";
setData.add(value);
return this;
}
COM: <s> builds the set part of an update or insert </s>
|
funcom_train/5728624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private User retrieveUser(UserInfo userInfo) {
Validate.notNull(userInfo, "Parameter userInfo must not be null");
Validate.notNull(userInfo.getId(), "Parameter userInfo must contain a valid id");
User user = getSecurityService().getUserObject(userInfo);
if (user == null) {
throw new CourseServiceException("user_not_found");
}
return user;
}
COM: <s> convert user info into user entity </s>
|
funcom_train/5243912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(BuchiState s) {
// Expand the initial state with the algorithm for creating the automata.
s.expand(this);
numberstates = statesbyNumber.values().size();
if (outputlevel > 0) {
System.err.println(this);
}
TreeSet<Proposition> props = new TreeSet<Proposition>();
for (BuchiState s1: statesbyNumber.values()) {
for (Proposition p1: s1.getProps()) {
if (! props.contains(p1)) {
if (! (p1 instanceof TrueProp)) {
props.add(p1);
}
}
}
}
for (Proposition p: props) {
propmap.put(p, 0);
}
}
COM: <s> initialise the automation by expanding the states and setting current states </s>
|
funcom_train/22432476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getButtonCancel() {
if (buttonCancel == null) {
buttonCancel = new JButton();
buttonCancel.setBounds(new java.awt.Rectangle(325,75,126,26));
buttonCancel.setText(MessageText.getString(
"master.gui.Account.buttonCancel"));
buttonCancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
cancelButtonPressed();
}
});
}
return buttonCancel;
}
COM: <s> this method initializes button cancel </s>
|
funcom_train/951438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String md5 (String password) throws Exception{
byte[] intext = password.getBytes();
StringBuffer sb = new StringBuffer();
MessageDigest md5 = MessageDigest.getInstance("MD5");
byte[] md5rslt = md5.digest(intext);
for( int i = 0 ; i < md5rslt.length ; i++ ){
sb.append(Integer.toHexString( (0xff & md5rslt[i])));
}
String gotit = sb.toString();
return gotit;
}
COM: <s> transform a string into its md5 hash value </s>
|
funcom_train/22308935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public interface ClassValidatorListener {
/**
* Fired when the <tt>ClassValidator</tt> has something to say.
*/
void info(String message);
/**
* Fired when the <tt>ClassValidator</tt> has something important to
* say.
*/
void warning(String message);
/**
* Fired when the <tt>ClassValidator</tt> has something very important
* to say.
*/
void error(String message);
}
COM: <s> listener that will receive update from the tt class validator tt </s>
|
funcom_train/4683460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
status = RUNNING;
while (status == RUNNING) {
try {
String cmd = getCommand();
processCommand(cmd);
} catch (Exception e) {
if (isRunning()) {
System.err.println("[OTACommandServer] Got exception handling session request: ");
e.printStackTrace();
}
}
}
status = STOPPED;
}
COM: <s> should not be invoked from user code call </s>
|
funcom_train/17904949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void minimiseAll() {
for (int i = 0, k = components.size(); i < k; i++) {
TabComponent tabComponent = components.get(i);
parent.minimiseComponent(tabComponent);
fireTabMinimised(new DockedTabEvent(tabComponent));
}
removeAllTabs();
}
COM: <s> minimises all the tabs in the panel </s>
|
funcom_train/43888237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int hashCode = 1;
Iterator i = iterator();
try {
while (i.hasNext()) {
Object obj = i.next();
hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode());
}
return hashCode;
}
finally {
close( i );
}
}
COM: <s> returns the hash code value for this list </s>
|
funcom_train/29272844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String decrypt(String str) {
try {
// Decode base64 to get bytes
byte[] dec = new Base64(true).decode(str);
// Decrypt
byte[] utf8 = dcipher.doFinal(dec);
// Decode using utf-8
return new String(utf8, "UTF8");
} catch (BadPaddingException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return null;
}
COM: <s> takes a encrypted string as an argument decrypts and returns the </s>
|
funcom_train/51078947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JMenu createAttributesMenu() {
CommandMenu menu = new CommandMenu("Attributes");
menu.add(createColorMenu("Fill Color", "FillColor"));
menu.add(createColorMenu("Pen Color", "FrameColor"));
menu.add(createArrowMenu());
menu.addSeparator();
menu.add(createFontMenu());
menu.add(createFontSizeMenu());
menu.add(createFontStyleMenu());
menu.add(createColorMenu("Text Color", "TextColor"));
//menu.setBackground(Color.lightGray);
return menu;
}
COM: <s> creates the attributes menu and its submenus </s>
|
funcom_train/18229796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean asynchronous() {
if (warnedAsynchronousActions.add(getClass())) {
ErrorManager.getDefault().log(
ErrorManager.WARNING,
"Warning - " + getClass().getName() +
" should override CallableSystemAction.asynchronous() to return false"
);
}
return DEFAULT_ASYNCH;
}
COM: <s> if true this action should be performed asynchronously in a private thread </s>
|
funcom_train/29869805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJCenterPanel() {
if (jCenterPanel == null) {
ImageIcon icon = MainFrame.createImageIcon(ICON_LOCATION);
jProgramTitleLabel = new JLabel(icon);
jCenterPanel = new JPanel();
jCenterPanel.setBackground(Color.WHITE);
jCenterPanel.setLayout(new GridBagLayout());
jCenterPanel.setPreferredSize(new Dimension(150, 16));
jCenterPanel.add(jProgramTitleLabel, new GridBagConstraints());
}
return jCenterPanel;
}
COM: <s> this method initializes j center panel </s>
|
funcom_train/4972057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ComplexArray concatenate(ComplexArray rhs) {
ComplexArray result = new ComplexArray(this.getLength() + rhs.getLength());
result.re = DoubleArray.concatenate(this.re, rhs.re);
result.im = DoubleArray.concatenate(this.im, rhs.im);
return result;
}
COM: <s> creates a new complex array that is the concatentation of x and y </s>
|
funcom_train/23868058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OrderByColumn getOrderByColumn(final String columnName) {
for (final OrderByColumn orderByColumn : allowedOrderByColumns) {
if (orderByColumn.getColumnName().equals(columnName)) {
return orderByColumn;
}
}
throw new IllegalArgumentException("No OrderByColumn named '" + columnName + "', exists!");
}
COM: <s> gets an order by column by its column name </s>
|
funcom_train/7607439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addVerticesToSweep(boolean isA, Vector2f[] verts) {
for ( int i = 0, j = verts.length-1; i < verts.length; j = i, i++ ) {
float dist = sweepDir.dot(verts[i]);
insert(i, isA, dist);
insert(j, isA, dist);
}
}
COM: <s> insert a list of edges </s>
|
funcom_train/5866592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedIndex(int jsel) {
if (jsel >= getItemCount())
throw new UiException("Out of bound: "+jsel+" while size="+getItemCount());
if (jsel < -1)
jsel = -1;
if (jsel < 0) {
_selItem = null;
//Bug#2919037: SetSelectedIndex(-1) shall unselect even with constraint
setRawValue(null);
} else {
_selItem = getItemAtIndex(jsel);
setValue(_selItem.getLabel());
}
}
COM: <s> deselects the currently selected items and selects </s>
|
funcom_train/44707365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerPage(ResourceHandler page, String url) {
Resource resource = null;
ResourceType type = null;
ResourceMapping mapping = null;
ContentSection sec = new ContentSection(getContentSectionID());
resource = Resource.findResource(sec, url);
if ( resource == null ) {
// Create the resource.
type = ResourceType.findResourceType("xml");
resource = type.createInstance(page.getClass().getName());
}
mapping = resource.createInstance(sec, url);
mapping.save();
}
COM: <s> register a page to the content section </s>
|
funcom_train/48206733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image loadImage(String id, String path) throws SpartanException{
if(path == null || path.length() == 0)
throw new SpartanException("Image resource [" + id + "] has invalid path");
Image image = null;
try{
image = new Image(path);
} catch (SlickException e) {
throw new SpartanException("Could not load image", e);
}
if ( imageMap.containsKey(id) ){
throw new SpartanException("Id already exists");
}
this.imageMap.put(id, image);
return image;
}
COM: <s> load an image into the resource manager identifying it with the id </s>
|
funcom_train/14649792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(int index, E element) {
if (index > size || index < 0)
throw new IndexOutOfBoundsException(
"Index: "+index+", Size: "+size);
ensureCapacity(size+1); // Increments modCount!!
System.arraycopy(elementData, index, elementData, index + 1,
size - index);
elementData[index] = element;
size++;
}
COM: <s> inserts the specified element at the specified position in this </s>
|
funcom_train/20655970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stepSimulation() {
// clock.incrTime();
// ALL BACKEND SIMUATION COLTROL CODE GOES HERE
for (int i = 0; i < modules.size(); i++) {
(modules.get(i)).step(clock.getTime());
}
for (int i = 0; i < wires.size(); i++) {
(wires.get(i)).step(clock.getTime());
}
}
COM: <s> simulates one step and returns control to manager ui </s>
|
funcom_train/24257909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop(int width, int height, Rectangle2D clip) {
ImageInfo info = new ImageInfo(width, height, clip);
synchronized (renderers) {
// find our renderer
WeakReference rendererRef = renderers.get(info);
if (rendererRef != null) {
PDFRenderer renderer = (PDFRenderer) rendererRef.get();
if (renderer != null) {
// stop it
renderer.stop();
}
}
}
}
COM: <s> stop the rendering of a particular image on this page </s>
|
funcom_train/36680795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(int elapsedTime) {
if (started && canPerformAction(elapsedTime)) {
CWAction currentAction = actions.get(index);
if (!currentAction.isCompleted()) {
performAction(currentAction);
currentAction.update(elapsedTime);
}
if (currentAction.isCompleted()) {
gotoNextAction();
}
}
}
COM: <s> keep looping until all actions have finished </s>
|
funcom_train/42475181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getLongQueryWord(String query) {
assert query != null;
for (StringTokenizer stringTokenizer = new StringTokenizer(query); stringTokenizer.hasMoreTokens();) {
String word = stringTokenizer.nextToken();
if (word.length() > 200) return word;
}
return "";
}
COM: <s> checks if a query word is longer than 200 characters </s>
|
funcom_train/51245945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeLayout() {
getContentPane().add(BorderLayout.NORTH, menuBar);
getContentPane().add(BorderLayout.CENTER, tabPane);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e) {
context.exitApplication();
}
});
}
COM: <s> initializes the layout </s>
|
funcom_train/9238960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void partChannel(final String sChannelName, final String sReason) {
if (getChannelInfo(sChannelName) == null) { return; }
if (sReason.isEmpty()) {
sendString("PART " + sChannelName);
} else {
sendString("PART " + sChannelName + " :" + sReason);
}
}
COM: <s> leave a channel </s>
|
funcom_train/5725410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
if (this == object) {
return true;
}
if (!(object instanceof DepartmentInfo)) {
return false;
}
final DepartmentInfo that = (DepartmentInfo) object;
if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) {
return false;
}
return true;
}
COM: <s> returns code true code if the argument is an department info instance </s>
|
funcom_train/47459979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int parseInitInt(String attribute, String iniFile) {
String parsedInfo = "-1";
int value = -1;
String tagregex = attribute + "=(.*?);";
Pattern p2 = Pattern.compile(tagregex);
Matcher m2 = p2.matcher(iniFile);
if (m2.find()) {
parsedInfo = m2.group(1);
}
try {
value = Integer.parseInt(parsedInfo);
} catch (Exception e) {
print("Can't parse attribute " + attribute);
}
return value;
}
COM: <s> parses the init file for the atribute and returns the value </s>
|
funcom_train/46383379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected LoginControl createLoginControl(AuthenticationInfo info) {
switch (info.getType()) {
case NONE:
return new NoAuthLoginControl(info);
case WEB_SERVICE:
return new UserPasswordLoginControl(info);
case EITHER:
return new EitherLoginControl(info);
default:
throw new IllegalStateException("Unknown login type " +
info.getType());
}
}
COM: <s> create a new login control of the appropriate type </s>
|
funcom_train/42213998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProjectService getProjectService(ProjectType projectType) {
ProjectService projectService = null;
if (projectType == ProjectType.OTRUNK) {
projectService = otrunkProjectService;
} else if (projectType == ProjectType.POTRUNK) {
projectService = potrunkProjectService;
} else if (projectType == ProjectType.ROLOO) {
projectService = rooloProjectService;
} else if (projectType == ProjectType.LD){
projectService = ldProjectService;
} else {
projectService = podProjectService;
}
return projectService;
}
COM: <s> returns a code project service code instance that serves </s>
|
funcom_train/5260826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMadeOperativeByPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Vision_madeOperativeBy_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Vision_madeOperativeBy_feature", "_UI_Vision_type"),
BmmPackage.Literals.VISION__MADE_OPERATIVE_BY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the made operative by feature </s>
|
funcom_train/46932312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCharacter(AccountCharacter character) {
if(characters.contains(character)) {
AccountCharacter old = (AccountCharacter)characters.elementAt(
characters.indexOf(character));
old.setId(character.getId());
old.setName(character.getName());
old.setCorpId(character.getCorpId());
old.setCorpName(character.getCorpName());
} else {
characters.addElement(character);
}
}
COM: <s> add a character to the account </s>
|
funcom_train/41208593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addCmp(Component cmp,int align) {
if (cmp!=null) {
if ((FIXED_WIDTH) && (x+cmp.getPreferredW()>width)) {
newLine(align);
}
curLine.addComponent(cmp);
x+=cmp.getPreferredW();
}
}
COM: <s> adds the given component to the cur line container after performing size checks </s>
|
funcom_train/19254917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreePath getTreePath(Object node) {
Vector path = findTreePath(model.getRoot(), node);
Object[] retPath;
if(path != null) {
retPath = path.toArray();
path.removeAllElements();
path = null;
}
else {
retPath = new Object[]{node};
}
return new TreePath(retPath);
}
COM: <s> returns a tree path from a given node not a real swing </s>
|
funcom_train/12244518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map createCellAttributes(Point2D point) {
Map map = super.createCellAttributes(point);
/*
//LIMPIAR
super.setLocation(100, 111);
Rectangle bounds = new Rectangle((int)point.getX(), (int)point.getY(), 200, 200);
GraphConstants.setBounds(map, bounds);
*/
GraphConstants.setInset(map, 5);
GraphConstants.setGradientColor(map, new Color(200, 200, 255));
return map;
}
COM: <s> hook from graph ed to set attributes of a new cell </s>
|
funcom_train/18999948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
String command = e.getActionCommand();
// dispose();
setVisible(false);
if (command.equals("ok")) {
int index = dataList.getSelectedIndex();
displayPropertyChangeWarning("paperSize", index);
updateViewer();
}
}
COM: <s> perform the requested action </s>
|
funcom_train/14463651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setKeyCol(String c){
keycolname = c;
if((cols!=null)&&(keyCol == null)){
for(int t=0;t<cols.length;t++){
if(cols[t].toString().equals(c))
setKeyCol(cols[t]);
}
}
}
COM: <s> set the key column for this data object manually </s>
|
funcom_train/50716352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopCPhrase() {
if (this.play_method == QUICK_TIME) {
// if(qtu != null) qtu.stopPlayback();
}
if (this.play_method == JAVA_SOUND) {
//close device
if (sequencer != null) {
sequencer.stop();
sequencer.close();
}
if (synthesizer != null) {
synthesizer.close();
}
// set to null so we don't have more threads
sequencer = null;
synthesizer = null;
//instruments = null;
//channels = null;
}
}
COM: <s> stops quick time playback of the music </s>
|
funcom_train/23182794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dropTable(String table) {
logger.info("dropTable(table) - Entry");
PreparedStatement prepstmt = null;
String sql = "DROP TABLE app." + table;
try {
System.out.println(sql);
prepstmt = this.getConnection(DBConnector.ConTypes.DBCREATOR)
.prepareStatement(sql);
prepstmt.execute();
commit(DBConnector.ConTypes.DBCREATOR);
} catch (SQLException e) {
e.printStackTrace();
} finally {
closePreparedStatement(prepstmt);
}
logger.info("dropTable(table) - Exit");
}
COM: <s> this method specifies a certain table to drop </s>
|
funcom_train/20382015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSymbolType(SymbolType symbolType) {
getParent().invalidate();
// will invalidate dependent slices if it was previously a pie slice
invalidateDependentSlices(getCurveIndex(getParent()));
this.symbolType = symbolType;
// will invalidate dependent slices if it is now a pie slice
invalidateDependentSlices(getCurveIndex(getParent()));
}
COM: <s> sets the type of this symbol </s>
|
funcom_train/28168447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handlePopupMenu(MouseEvent evt) {
Point p = new Point(evt.getX(), evt.getY());
Figure figure = getView().findFigure(p);
if (figure != null || drawingActions.size() > 0) {
showPopupMenu(figure, p, evt.getComponent());
} else {
popupMenu = null;
}
}
COM: <s> hook method which can be overriden by subclasses to provide </s>
|
funcom_train/25389809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void FireWeapon(player_t player) {
statenum_t newstate;
if (!player.CheckAmmo())
return;
player.mo.SetMobjState(statenum_t.S_PLAY_ATK1);
newstate = weaponinfo[player.readyweapon.ordinal()].atkstate;
player.SetPsprite(player_t.ps_weapon, newstate);
NoiseAlert(player.mo, player.mo);
}
COM: <s> p fire weapon </s>
|
funcom_train/37215488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Transferable createTransferable(JComponent c) {
Transferable transferable = null;
TreePath selectionPath = ActivityTree.this.getSelectionPath();
if (selectionPath != null) {
Object lastPathComponent = selectionPath.getLastPathComponent();
if (lastPathComponent instanceof ActivityItem) {
ActivityItem activityItem = (ActivityItem) lastPathComponent;
transferable = activityItem.getActivityTransferable();
}
}
return transferable;
}
COM: <s> triggered when a node ie </s>
|
funcom_train/27674673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addLastUnquotedSectionToField() {
// Add the last unquoted section of the field
currentField.append( lastUnquotedSection );
// Reset the last unquoted section buffer, so that
// we are ready to read the next field/value.
lastUnquotedSection = new StringBuffer();
// Remove any leading whitespace from the front of this field, if
// appropriate.
trimLeadingWhitespace();
}
COM: <s> adds the last unquoted section of a field value to the </s>
|
funcom_train/25201071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean set(String name, String tag, String value) {
int i = value.indexOf('=');
if (i < 0 || !name.startsWith(value.substring(0, i))) {
return false;
}
setProperty(tag, value.substring(i + 1));
return true;
}
COM: <s> parse a command line parameter of the form i key i tt tt </s>
|
funcom_train/16909846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calibrate(int x, float value) {
// Get new minimum
if (adcMin[x] == -1f || adcMin[x] > value) {
adcMin[x] = value;
}
// Get new maximum
if (adcMax[x] == -1f || adcMax[x] < value) {
adcMax[x] = value;
}
}
COM: <s> analyze range of values for proper centering and scaling </s>
|
funcom_train/14245589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean transativelyIncludes(DesignMaterial dm) {
Enumeration cur = elements();
while (cur.hasMoreElements()) {
DesignMaterial dm2 = (DesignMaterial) cur.nextElement();
if (dm == dm2) return true;
if ((dm2 instanceof Design) &&
(((Design)dm2).transativelyIncludes(dm))) {
return true;
}
}
return false;
}
COM: <s> reply true if the given design material is part of this design </s>
|
funcom_train/36995263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FlashItem getCopy( ScriptCopier copier ) {
try {
Constructor c = getClass().getConstructor(new Class[]{});
FlashItem o = (FlashItem) c.newInstance(new Object[]{});
return copyInto(o, copier);
} catch( Exception e ) {
return null;
}
}
COM: <s> creates copy of this object using </s>
|
funcom_train/39934999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(String s) throws IOException {
System.out.println("Going to send: " + s);
char[] charArray = s.toCharArray();
this.send(charArray.length);
int i = 0;
for (char c : charArray) {
dos.writeChar(c);
// flush after every 30. char
if (i % 30 == 0) {
dos.flush();
}
i++;
}
// Flush all
dos.flush();
}
COM: <s> sends a string over the connection </s>
|
funcom_train/44824813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel1() {
if (jPanel1 == null) {
GridLayout gridLayout17 = new GridLayout();
jPanel1 = new JPanel();
jPanel1.setLayout(gridLayout17);
gridLayout17.setRows(1);
gridLayout17.setColumns(2);
jPanel1.add(getJPanel2(), null);
jPanel1.add(getJPanel3(), null);
}
return jPanel1;
}
COM: <s> this method initializes j panel1 </s>
|
funcom_train/43572165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getHelpButton() {
if (btnHelp == null) {
btnHelp = new JButton();
btnHelp.setBorder(null);
btnHelp.setIcon(new ImageIcon(getClass().getResource("/resource/icon/16/201.png"))); // help icon
btnHelp.addActionListener(getShowHelpAction());
btnHelp.setToolTipText(Constant.messages.getString("menu.help"));
}
return btnHelp;
}
COM: <s> this method initializes the help button if any button can be applied </s>
|
funcom_train/7270128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addFileToPlayList(final PlayListItem item, final int index ){
GUIMediator.safeInvokeAndWait(new Runnable() {
public void run() {
synchronized(PLAY_LOCK) {
add( item, index);
}
setButtonEnabled( PlaylistButtons.CLEAR_BUTTON, true );
}
});
}
COM: <s> performs the actual add of a single playlist item to the table model </s>
|
funcom_train/5063200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* private Filter makeFilter(String filterName) {
Class c = null;
Filter f = null;
try {
c = Class.forName(filterName);
f = (Filter) c.newInstance();
} catch (Exception e) {
//System.out.println("There was a problem to load the filter class: "
// + filterName);
}
return f;
}*/
COM: <s> private method constructing a filter object with the filter name </s>
|
funcom_train/173808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List transform(List inputNodes) throws XSLTransformException {
JDOMSource source = new JDOMSource(inputNodes);
JDOMResult result = new JDOMResult();
try {
templates.newTransformer().transform(source, result);
return result.getResult();
}
catch (TransformerException e) {
throw new XSLTransformException("Could not perform transformation", e);
}
}
COM: <s> transforms the given input nodes to a list of output nodes </s>
|
funcom_train/41378798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop(BundleContext context) throws Exception {
super.stop(context);
plugin = null;
resourceBundle = null;
Iterator colors = fColors.entrySet().iterator();
while (colors.hasNext()) {
Map.Entry entry = (Entry) colors.next();
((Color)entry.getValue()).dispose();
}
}
COM: <s> this method is called when the plug in is stopped </s>
|
funcom_train/14326494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XComponent getHourlyRatesDataSet() {
if (hourlyRatesDataSet == null) {
XComponent form = data_set.getForm();
if (form != null) {
hourlyRatesDataSet = form
.findComponent(RESOURCES_HOURLY_RATES_DATA_SET);
}
}
return hourlyRatesDataSet;
}
COM: <s> gets the hourly rates data set associated with the current project </s>
|
funcom_train/47399097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyRmdir() {
Runnable runnable = new Runnable() {
public void run() {
IFtpStatistics stat = m_statistics;
if(stat != null) {
int totalRmdir = stat.getTotalDirectoryRemoved();
setValue(I_DIR_REMOVED, String.valueOf(totalRmdir));
}
}
};
SwingUtilities.invokeLater(runnable);
}
COM: <s> directory removal notification </s>
|
funcom_train/21301792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rename() {
String datasetNameParam = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("datasetName");
if(log.isDebugEnabled())log.debug("dataset to rename: " + datasetNameParam);
this.dataset2Rename = datasetNameParam;
this.renameVisible = true;
}
COM: <s> the method that initialises the renaming procedure </s>
|
funcom_train/41866646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User findByNameAndPassword(String name, String pass) {
Map<String, Object> paramsAndValues = new HashMap<String, Object>();
paramsAndValues.put("username", name);
paramsAndValues.put("password",pass);
List<User> users = findAllWhereMultiParam(paramsAndValues);
if (users.size()>1){
throw new RuntimeException("MMM esto no deberia suceder never!");
}
else if (users.size() == 0){
return null;
}
else {
return users.get(0);
}
}
COM: <s> lookups an user by name and pass </s>
|
funcom_train/36642129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writePatternList(XMLWriter writer) {
if (alignment.getDataType() == Nucleotides.INSTANCE && codonHetero) {
for (int i = 1; i <= 3; i++) { writePatternList(i, 3, writer); }
} else {
writePatternList(1, 0, writer);
}
}
COM: <s> writes the pattern lists </s>
|
funcom_train/47107964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemArmor17() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Armor.A_17.getItemName());
menuItem.setEnabled(false);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
controller.setPlrReadiedArmor(Armor.A_17);
}
});
return menuItem;
}
COM: <s> creates the eighteenth choice for the armor menu </s>
|
funcom_train/37578132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void panNorth() {
if((locationPointer.getY() < top) && top != 0) {
this.translateY += stepY;
this.top -= stepY;
this.bottom -= stepY;
}
locationPointer.panNorth();
if(locationPointer.getY() <= 0) {
locationPointer.setPosition(locationPointer.getX(), 0);
}
repaint();
}
COM: <s> pan to the north </s>
|
funcom_train/35528875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String name, PipelineTask pipelineTask) {
// 1. Select process from registered process list
BaseProcess process = KorusRuntime.getRegisteredProcess(name);
if (process == null) {
// Register Process with the name ParallelTask
try {
KorusRuntime.registerProcess(name, pipelineTask);
} catch (ProcessAlreadyExistsException e) {
e.printStackTrace();
}
}
pipelineTaskList.add(pipelineTask);
}
COM: <s> adds a pipeline task to the pipeline queue </s>
|
funcom_train/25747896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void highlightParagraph(String partId, String highlight) {
// unhighlightParagraph
unhighlightParagraph();
// get element
Element el = elementLookup.get(partId);
// store element as last highlighted
lastHighlightedElement = partId;
// store unhighlighted text
unhighlightedText = el.getInnerHTML();
// highlight text
el.setInnerHTML(highlight);
// scroll to part
el.scrollIntoView();
}
COM: <s> highlites a paragraph </s>
|
funcom_train/18849421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopRunning(final boolean block) {
this.running = false;
this.interrupt();
try {
this.serverSocket.close();
} catch (IOException e1) {
// Ignores
}
if (block) {
final Thread threads [] = new Thread [20];
while (group.activeCount() > 0) {
final int size = group.enumerate(threads);
// Waits for all child theads to die.
for (int i = 0; i < size; i++) {
try {
threads[i].join();
} catch (InterruptedException e) {
return;
}
}
}
}
}
COM: <s> stops the execution of this daemon and closes the socket listener </s>
|
funcom_train/37817244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane createConsoleScrollPane() {
JScrollPane consolePane = new JScrollPane();
consolePane
.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
consolePane.setMinimumSize(new Dimension(50, 50));
consolePane.setPreferredSize(new Dimension(50, 50));
consolePane.setMaximumSize(new Dimension(50, 50));
return consolePane;
}
COM: <s> creates the console scroll pane used by pulsemem </s>
|
funcom_train/3411505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object readResolve() throws InvalidObjectException {
if (this.getClass() != TextAttribute.class) {
throw new InvalidObjectException(
"subclass didn't correctly implement readResolve");
}
TextAttribute instance = (TextAttribute) instanceMap.get(getName());
if (instance != null) {
return instance;
} else {
throw new InvalidObjectException("unknown attribute name");
}
}
COM: <s> resolves instances being deserialized to the predefined constants </s>
|
funcom_train/21963868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLength() {
String testString = "a lot of random words";
StringCharacterStream stream = new StringCharacterStream(testString);
int len = 0;
while (stream.hasNext()) {
len++;
stream.getNext();
}
assertEquals(testString.length(),len);
}
COM: <s> tests to make sure the number of iterations matches the number of letters </s>
|
funcom_train/50994425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getSelectedPhotos() {
ArrayList result = new ArrayList();
for( int i = 0; i < photoList.size(); i++ ) {
OutputPhoto outPhoto = (OutputPhoto)photoList.get( i );
if( outPhoto.isSelected() ) {
result.add( outPhoto );
}
}
return result;
}
COM: <s> retrieves a new array list of all selected photos for this source </s>
|
funcom_train/29915870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getActivateCardButton() {
if (activateCardButton == null) {
activateCardButton = new JButton(UIHelper.getText("cardmeny.activatecard"));
activateCardButton.setBounds(new Rectangle(228, 401, 346, 45));
activateCardButton.setIcon(UIHelper.getImage("reactivate.gif"));
activateCardButton.setHorizontalAlignment(SwingConstants.LEFT);
}
return activateCardButton;
}
COM: <s> this method initializes activate card button </s>
|
funcom_train/4223412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean archiveIsUpToDate(String[] files, File dir) {
SourceFileScanner sfs = new SourceFileScanner(this);
MergingMapper mm = new MergingMapper();
mm.setTo(destFile.getAbsolutePath());
return sfs.restrict(files, dir, null, mm).length == 0;
}
COM: <s> is the archive up to date in relationship to a list of files </s>
|
funcom_train/48089073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand() {
if (backCommand == null) {//GEN-END:|40-getter|0|40-preInit
// write pre-init user code here
backCommand = new Command("Voltar", Command.BACK, 0);//GEN-LINE:|40-getter|1|40-postInit
// write post-init user code here
}//GEN-BEGIN:|40-getter|2|
return backCommand;
}
COM: <s> returns an initiliazed instance of back command component </s>
|
funcom_train/4389627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isReadOnly() {
// check to see if each modified code file can be written to
for (int i = 0; i < codeCount; i++) {
if (code[i].modified && !code[i].file.canWrite()
&& code[i].file.exists()) {
// System.err.println("found a read-only file " + code[i].file);
return true;
}
}
return false;
}
COM: <s> returns true if this is a read only sketch </s>
|
funcom_train/22471748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Playlist getTestPlaylist() {
Band band = new Band();
band.setId(100);
band.setName("testband");
Playlist playlist = new Playlist();
playlist.setId(150);
playlist.setName("testplaylist");
for (int i=1;i<9;i++) {
Song song = new Song();
song.setId(10000+i);
song.setName("testsong"+i);
song.setBand(band);
playlist.addSong(song, i);
Keyword kw = new Keyword();
kw.setId(1200L);
kw.setName("keyword1");
List<Keyword> kwlist = new LinkedList<Keyword>();
kwlist.add(kw);
Keywordbag kwb = new Keywordbag();
kwb.setKeywords(kwlist);
song.setKeywordbag(kwb);
}
return playlist;
}
COM: <s> constructs a test playlist to be used in this unittest </s>
|
funcom_train/19621349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SyndEntry buildEntry (Article article, String contextPath) {
SyndEntry entry = new SyndEntryImpl();
entry.setTitle(article.getTitle());
entry.setPublishedDate(article.getDate());
String entryLink = contextPath + "articles.htm?id=" + article.getId();
entry.setLink(entryLink);
SyndContent description = new SyndContentImpl();
description.setType("text/plain");
description.setValue(article.getText());
entry.setDescription(description);
return entry;
}
COM: <s> creates an entry from the provided data </s>
|
funcom_train/15411722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void collectNodeUsage(NodeUsageCollector usageCollector) {
ObjectGraphOrigin origin = usageCollector.getNode().getOriginQueryPoint();
Statistics stats = getQueryPointStats(origin);
if (logging.isTraceUsageCollection()){
System.out.println("... NodeUsageCollector "+usageCollector);
}
stats.collectUsageInfo(usageCollector);
if (logging.isTraceUsageCollection()){
System.out.println("stats\n"+stats);
}
}
COM: <s> collect usage statistics from a node in the object graph </s>
|
funcom_train/48590015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefaultListModel getAllYearValues() {
Vector tmp = getAllYearValues(null, true);
// copy sorted list to the model
DefaultListModel model = new DefaultListModel();
for (Iterator clipIter = tmp.iterator(); clipIter.hasNext();) {
model.addElement(clipIter.next());
}
return model;
} // get all years
COM: <s> gets all years known by the data pool </s>
|
funcom_train/31172536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Method findSetLocator() {
try {
Class cls=getTarget().getClass();
Class[] classes={org.xml.sax.Locator.class};
return cls.getMethod("setDocumentLocator",classes);
} catch(NoSuchMethodException e) {
return null;
} catch(Exception e) {
e.printStackTrace(System.err);
return null;
}
}
COM: <s> find method to set the locator </s>
|
funcom_train/10014468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void launchApplication(String jarFilePath, String[] args) {
try {
String command = "java -jar " + jarFilePath + args;
Process child = Runtime.getRuntime().exec(command);
} catch (Exception e) {
logger.error("Cannot exec application" + ", got exception " + e.getClass() + " with message \"" + e.getMessage() + "\"");
}
}
COM: <s> launches the last version of the application </s>
|
funcom_train/28224645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createColorPickerImage() {
if (colorPickerImage != null && colorPickerColor != null) {
colorPickerImage.dispose();
colorPickerColor.dispose();
}
colorPickerColor = new Color(Display.getCurrent(), color);
colorPickerImage =
new Image(Display.getCurrent(), PICKER_IMG_WIDTH,
PICKER_IMG_HEIGHT);
GC gcImg = new GC(colorPickerImage);
gcImg.setBackground(colorPickerColor);
gcImg.fillRectangle(colorPickerImage.getBounds());
gcImg.dispose();
}
COM: <s> create the image that shows the chosen color for the marker </s>
|
funcom_train/19036763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PostFolder addFolderOnRoot(PostType type, String name){
PostFolder pf = null;
StoredPostFolder root;
if(type != null) {
root = this.getRootFolder(type);
if(root != null) {
pf = this.addFolder(root.getFolder().getPfid(), name);
} else {
Logger.error(ForumServerSystemCodes.UNKNOWN_TYPE_EXCEPTION, new Object[] {type.getName()});
}
}
return pf;
}
COM: <s> adds a new folder to the system </s>
|
funcom_train/51172250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set keySet() {
if (keySet == null) {
keySet = new AbstractSet() {
public java.util.Iterator iterator() {
return new Iterator(KEYS);
}
public int size() {
return OrderedMap.this.size();
}
public boolean contains(Object o) {
return containsKey(o);
}
public boolean remove(Object o) {
return OrderedMap.this.remove(o) != null;
}
public void clear() {
OrderedMap.this.clear();
}
};
}
return keySet;
}
COM: <s> returns a set view of the keys contained in this map </s>
|
funcom_train/43891407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Graphable getParent(Graphable component) {
if (component.equals(getSource())) {
return (null);
}
DijkstraNode dn = (DijkstraNode) m_nodemap.get(component);
if ((dn == null) || (dn.parent == null)) {
return (null);
}
return (dn.parent.node);
//return(((DijkstraNode)m_nodemap.get(component)).parent.node);
}
COM: <s> returns the last node in the known set to update the node </s>
|
funcom_train/1186194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String parseToken(final char[] terminators) {
char ch;
i1 = pos;
i2 = pos;
while (hasChar()) {
ch = chars[pos];
if (isOneOf(ch, terminators)) {
break;
}
i2++;
pos++;
}
return getToken(false);
}
COM: <s> parses out a token until any of the given terminators </s>
|
funcom_train/34478996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CEntity_definition addNewEntityDefinition(CSchema_definition dicsd, String name) throws SdaiException {
CEntity_definition entity = (CEntity_definition) sDictionary.makeInstance(CEntity_definition.class, sessionModel, -1, 0);
entity.setName(null, name);
entity.setComplex(null, false);
entity.owning_model = dicsd.owning_model;
((AEntity)bootEntityAggregate).addUnorderedSY(entity);
counter ++;
return entity;
}
COM: <s> adds definition of an entity of sdai dictionary schema to boot entity aggregate </s>
|
funcom_train/51199742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllContactsFromDB(String sourceURI, long principalId) throws ManagerException {
if (getDb() != null) {
try {
getDb().deleteLocalItems(sourceURI, principalId);
} catch (Exception ex) {
throw new ManagerException(ex.getMessage());
}
}
}
COM: <s> removes all the items from local cache </s>
|
funcom_train/50156699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDisplayText(int level) {
String text = getItemText();
if (level == 1) {
// String pat = "all students should develop";
String pat = "all students should develop understanding of";
int x = text.indexOf(pat);
if (x != -1)
return text.substring(0, x + pat.length());
else {
pat = "all students should develop";
x = text.indexOf(pat);
if (x != -1)
return text.substring(0, x + pat.length());
else
return "** pattern not found **";
}
}
return text;
}
COM: <s> gets the display text attribute of the asf standard object </s>
|
funcom_train/2283647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Network createServiceInstance() {
Network networkInstance = null;
try {
networkInstance = (Network)getServiceClass().newInstance();
if (networkInstance != null) {
networkInstance.init(this);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
return networkInstance;
}
COM: <s> a factory of configured and ready to train neural networks </s>
|
funcom_train/3373498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void next() {
for (nextLeaf(pos); isValid(); nextLeaf(pos)) {
Element elem = pos.current();
if (elem.getStartOffset() >= endOffset) {
AttributeSet a = pos.current().getAttributes();
if (a.isDefined(tag) ||
a.getAttribute(StyleConstants.NameAttribute) == tag) {
// we found the next one
setEndOffset();
break;
}
}
}
}
COM: <s> moves the iterator forward to the next occurrence </s>
|
funcom_train/32962269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TolvenIdEx getTolvenId( long accountId) {
for (TolvenId tolvenId : getTolvenIds()) {
TolvenIdEx tolvenIdEx = (TolvenIdEx) tolvenId;
if ((tolvenIdEx.getIdAsLong() != null && tolvenIdEx.getAccountIdAsLong()==accountId)) return tolvenIdEx;
}
return null;
}
COM: <s> find the tolven id associated with the specified account </s>
|
funcom_train/9546196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getError() {
LognormalDist jitterDistribution = new LognormalDist(m, s);
double error1 = Math.pow((iqr - (jitterDistribution.inverseF(0.75) - jitterDistribution.inverseF(0.25))) / iqr, 2);
double error2 = Math.pow((ew - Math.exp(m + (Math.pow(s, 2) / 2.0))) / ew, 2);
return error1 + error2;
}
COM: <s> error will be minimized within the downhill simplx algorithm </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.