__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/3561478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFlagHelpText(String flagName, String helpText) {
int pos;
pos = getFlagPos(flagName);
if (pos >= 0) {
try {
setFlagHelpText(pos, helpText);
}
catch (IndexOutOfBoundsException e) {
System.out.println("Not fatal: flag not correctly defined");
}
}
}
COM: <s> sets help text for a flag whose name is specified </s>
|
funcom_train/27722928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isComponentAlreadyDetected(Element doElement) {
//check no other detected component has the same name
boolean found = false;
Element comp = null;
for (int i = 0; i < modelComponents.size() && !found; i++) {
comp = (Element) (modelComponents.elementAt(i));
found =
comp.getAttributeValue("name").trim().equals(
getOwnerComponentName(doElement).trim());
}
return found;
}
COM: <s> returns true if the the component corresponding to the do element </s>
|
funcom_train/7683854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void logRaw(int oneByte) {
if (oneByte == '\r' || oneByte == '\n') {
if (mBufferDirty) {
Log.d(Email.LOG_TAG, mSb.toString());
mSb = new StringBuilder(LINE_TAG);
mBufferDirty = false;
}
} else {
mSb.append((char)oneByte);
mBufferDirty = true;
}
}
COM: <s> write and clear the buffer </s>
|
funcom_train/31916076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanupImageVector() {
allImages.removeAllElements();
for (int y=0; y<allFiles.length; y++) {
allImages.addElement(allFiles[y]);
}
for (int x = 0; x<allImages.size(); x++) {
File tmpFile = (File)allImages.elementAt(x);
checkEnding(tmpFile, x);
}
}
COM: <s> remove directories and non image files from the file list </s>
|
funcom_train/47825404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clear() {
agreementSummaryTable.removeAll();
reportSummaryTable.removeAll();
allReportEntriesTable.removeAll();
matchingTable.removeAll();
parseTable.removeAll();
selectionTable.removeAll();
configurationTable.removeAll();
componentsSummaryTable.removeAll();
configurationSpecificationText.setText("");
}
COM: <s> clear the tables </s>
|
funcom_train/27787591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(EODQuote quote) {
load(quote.getSymbol(),
quote.getDate(),
quote.getDayVolume(),
(float)quote.getDayLow(),
(float)quote.getDayHigh(),
(float)quote.getDayOpen(),
(float)quote.getDayClose());
}
COM: <s> load the given quote into the cache </s>
|
funcom_train/21913242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMasterComponentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DetailPanel_masterComponent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DetailPanel_masterComponent_feature", "_UI_DetailPanel_type"),
UIMPackage.Literals.DETAIL_PANEL__MASTER_COMPONENT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the master component feature </s>
|
funcom_train/43590603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getBlogMenuItem() {
if (blogMenuItem == null) {
blogMenuItem = new JMenuItem();
blogMenuItem.setText("Developer Blog");
blogMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mousePressed(java.awt.event.MouseEvent e) {
ZensesApplication.getApplication().getZenses().openBrowser("http://sixones.com/");
}
});
}
return blogMenuItem;
}
COM: <s> this method initializes blog menu item </s>
|
funcom_train/29937531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getChild(AbstractTPLNode t, StructureParameter child) {
try {
Method readMethod = t.getClass().getMethod("get" +
Character.toUpperCase(child.name().charAt(0)) +
child.name().substring(1));
return readMethod.invoke(t);
} catch (NoSuchMethodException e) {
throw new TreeConstructionException(e);
} catch (IllegalAccessException e) {
throw new TreeConstructionException(e);
} catch (InvocationTargetException e) {
throw new TreeConstructionException(e);
}
}
COM: <s> returns the structure single node or list of nodes for the given child </s>
|
funcom_train/13271610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRightSideShininess(float rightSideShininess) {
if (rightSideShininess != this.rightSideShininess) {
float oldRightSideShininess = this.rightSideShininess;
this.rightSideShininess = rightSideShininess;
this.propertyChangeSupport.firePropertyChange(Property.RIGHT_SIDE_SHININESS.name(), oldRightSideShininess, rightSideShininess);
}
}
COM: <s> sets the right side shininess of this wall </s>
|
funcom_train/5868522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getGanttTaskTooltip(Date start, Date end, Number percent) {
return new MessageFormat("{2,number,0.0%}, {0} ~ {1}")
.format(new Object[] {getDateFormat().format(start), getDateFormat().format(end), percent});
}
COM: <s> returns data tooltiptext of the gantt task </s>
|
funcom_train/45812191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDataType(DataType datatype, String platform) {
if (!datatypes.containsKey(platform)) {
Map types = new HashMap();
types.put(datatype.getName(), datatype);
datatypes.put(platform, types);
} else {
Map types = (Map)datatypes.get(platform);
types.put(datatype.getName(), datatype);
}
}
COM: <s> internal add the platform specific datatype </s>
|
funcom_train/19036355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getFolders(PFIDCollection pfids) {
if(isConnected()) {
try {
synchronized(this) {
this.getOutputStream().writeInt(ClientMessageCode.GETFOLDERS.getIndex());
pfids.sendData(this.getOutputStream());
this.getOutputStream().flush();
}
} catch (IOException e) {
this.messageFailed(e);
}
}
}
COM: <s> ask for information about a series of folders from the server </s>
|
funcom_train/1208527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startMethod(String methodName, String type, short flags) {
short methodNameIndex = itsConstantPool.addUtf8(methodName);
short typeIndex = itsConstantPool.addUtf8(type);
itsCurrentMethod = new ClassFileMethod(methodNameIndex, typeIndex,
flags);
itsMethods.add(itsCurrentMethod);
}
COM: <s> add a method and begin adding code </s>
|
funcom_train/8559066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean groupEquals(Group group) {
// if either of reference is null return false.
if (exclusiveOr(this.group, group)) {
return false;
}
// check if both are non-nulls
if (assertNotNull(this.group) && assertNotNull(group)) {
return stringEquals(this.group.getName(), group.getName());
}
// both are null
return true;
}
COM: <s> check equality for given group object with this profile locators group </s>
|
funcom_train/25639792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Content getTableCaption(String rawText) {
Content title = new RawHtml(rawText);
Content captionSpan = HtmlTree.SPAN(title);
Content space = getSpace();
Content tabSpan = HtmlTree.SPAN(HtmlStyle.tabEnd, space);
Content caption = HtmlTree.CAPTION(captionSpan);
caption.addContent(tabSpan);
return caption;
}
COM: <s> get table caption </s>
|
funcom_train/15466579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendReportDate(Element parent) throws Exception {
Timestamp reportDate = (Timestamp) this.document.getFeatures().get(
"PRINCIPAL_DATE");
if (reportDate != null) {
String reportDateAsString = convertDateToString(new Date(reportDate
.getTime()));
Element reportDateElement = (Element) this.outputDocument
.createElement("ReportDate");
reportDateElement.appendChild(this.outputDocument
.createTextNode(reportDateAsString));
parent.appendChild(reportDateElement);
}
}
COM: <s> method append report date </s>
|
funcom_train/50483419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSquareControlledBy(Coordinate c, boolean white) {
boolean result = false;
List controlledSquares = getControlledSquares(white);
Iterator i = controlledSquares.iterator();
while (i.hasNext() && !result) {
result |= ((Coordinate) i.next()).equals(c);
}
return result;
}
COM: <s> does code white code controlles the given square code c code </s>
|
funcom_train/39016608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeWord(Word word) {
mWords.remove(word);
for (Connection c : new HashSet<Connection>(mConnections)) {
if (c.containsWordID(word)) {
c.removeWord(word);
if (c.getWordIDs().size() < 2) {
removeConnection(c);
}
}
}
setDirtyFlag();
}
COM: <s> removes the given code word code from the set </s>
|
funcom_train/14228804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean allocateMedia(String terminal, int type, Dictionary params) {
TelephonyProvider rp = this.getTerminalSub(terminal);
if (((RawCapabilities)this.getSubToCaps().get(rp)).allocateMedia)
return rp.allocateMedia(terminal, type, params);
else
return true; // The rawProvider guaranteed that it does not need this call.
}
COM: <s> allocate a media type resource to a sub providers terminal </s>
|
funcom_train/21650083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getVersion(){
byte[] buf = new byte[8];
int failed = this.getData(0x00, buf, 8);
if(failed!=0) return "failed. ";
String str="l:";
for(int i=0; i<8; i++){
str+=(char)buf[i];
}
return str;
}
COM: <s> method used to know the version </s>
|
funcom_train/9361132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Canvas canvas, RectF location) {
nativeDraw(canvas.mNativeCanvas, location,
mBitmap.ni(), mChunk,
mPaint != null ? mPaint.mNativePaint : 0,
canvas.mDensity, mBitmap.mDensity);
}
COM: <s> draw a bitmap of nine patches </s>
|
funcom_train/28367440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getCurrentMaxY() {
if (zoomGridLimitsV.size() == 0) {
if (externalGridLimits == null || externalGridLimits.isSetYmax() == false) {
return getInnerMaxY();
} else {
return externalGridLimits.getMaxY();
}
} else {
GridLimits gl = zoomGridLimitsV.lastElement();
if (gl.isSetYmax() == false) {
return getInnerMaxY();
}
return gl.getMaxY();
}
}
COM: <s> returns the current max y attribute of the function graphs jpanel object </s>
|
funcom_train/18758268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean distributeMessage(String destination, Message message) {
boolean handled = false;
if (destination == null) {
handled = handleMessage(message);
} else {
TableHandle tableHandle = tableHandles.get(destination);
if (tableHandle != null) {
handled = tableHandle.handleMessage(message);
}
}
return handled;
}
COM: <s> distributes messages to the proper receiver </s>
|
funcom_train/19051279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g, Shape a) {
Rectangle r;
if (a instanceof Rectangle) {
r = (Rectangle) a;
} else {
r = a.getBounds();
}
painter.paint(g, r.x, r.y, r.width, r.height, this);
super.paint(g, a);
}
COM: <s> renders using the given rendering surface and area on that </s>
|
funcom_train/28346934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void displayWarning( final Exception exception ) {
Toolkit.getDefaultToolkit().beep();
String message = "Exception: " + exception.getClass().getName() + "\n" + exception.getMessage();
displayWarning( exception.getClass().getName(), message );
}
COM: <s> display a warning dialog box with information about the exception </s>
|
funcom_train/38310776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBeginOfYear() throws ExpressionException, ParseException {
assertEquals(exi.evalDate("${birthday beginOfYear}", properties, formatHelper), df.parse("1973-01-01"));
assertEquals(exi.evalDate("${${birthday decrYear 1} beginOfYear}", properties, formatHelper), df.parse("1972-01-01"));
}
COM: <s> tests the begin of year operation </s>
|
funcom_train/1417044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
// Get rid of scrollbars, and clear out the window's built-in margin,
// because we want to take advantage of the entire client area.
Window.enableScrolling(false);
Window.setMargin("1px");
StatusBoardPresenter presenter = new StatusBoardPresenter();
// Add the outer panel to the RootLayoutPanel, so that it will be
// displayed.
RootLayoutPanel root = RootLayoutPanel.get();
presenter.go(root) ;
}
COM: <s> this is the entry point method </s>
|
funcom_train/927204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProductNode getSelectedProductNode() {
TreePath tp = m_Tree.getSelectionPath();
if (tp==null) {
if (getConfigurationNode().getChildCount()>0) {
return (ProductNode)getConfigurationNode().getFirstChild();
}
return null;
}
//ProductNode is at index 1
return (ProductNode)tp.getPathComponent(1);
}
COM: <s> return product node which is which child is selected </s>
|
funcom_train/37228590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPressed() {
Object row = create("row");
Object cell = create("cell");
setString(cell,"text",getString(find("name"), "text"));
add(row,cell);
add(find("nameTable"),row);
//now clear out textbox
setString(find("name"),"text","");
}
COM: <s> example of how to put a value into table </s>
|
funcom_train/27929655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readAddresses() {
if (_addresses.hasChanged()) {
int result = JOptionPane.showConfirmDialog(this,
Language.getProperty("SaveChangesQuestion"),
Language.getProperty("SaveChangesTitel"),
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (result == JOptionPane.YES_OPTION) {
_parent.save();
}
}
_parent.load();
}
COM: <s> called if load was pressed </s>
|
funcom_train/40866296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validate(Order order) {
if(order.getOrderHeader() == null) {
throw new IllegalStateException("[OrderHeader] missing!");
}
if(order.getOrderLines() == null || order.getOrderLines().size() == 0) {
throw new IllegalStateException("[Order] does not have any order lines!");
}
}
COM: <s> performs basic order validation </s>
|
funcom_train/2609774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final JingleSession jingleSession) {
for (JingleMediaManager manager : managers) {
if (manager.getPayloads().contains(payloadType)) {
return manager.createMediaSession(payloadType, remote, local, jingleSession);
}
}
return null;
}
COM: <s> returns a new jingle media session </s>
|
funcom_train/39535431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String relativize(String basePath){
String relativePath=path;
//relativizing the path against the current canvas path
try{
File referenceFile=new File(new URI(basePath));
relativePath=fr.itris.glips.library.Toolkit.getRelativePath(
new URI(path).toASCIIString(), referenceFile.getParentFile().toURI().toASCIIString());
}catch (Exception ex){}
return relativePath;
}
COM: <s> relativizes the path against the provided base path </s>
|
funcom_train/43094076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRoot(Object root) {
if (!Model.getFacade().isAModel(root)) {
throw new IllegalArgumentException();
}
Object treeRoot = Model.getModelManagementFactory().getRootModel();
if (treeRoot != null) {
models.remove(treeRoot);
}
Model.getModelManagementFactory().setRootModel(root);
addModel(root);
}
COM: <s> sets the root </s>
|
funcom_train/19230447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeParent(osid.shared.Id oldParentId, osid.shared.Id newParentId) {
VueQualifier oldParent = (VueQualifier) azMgr.getQualifier (oldParentId);
VueQualifier newParent = (VueQualifier) azMgr.getQualifier (newParentId);
int off = parents.indexOf (oldParent);
parents.set(off, newParent);
newParent.addChild (this.id);
}
COM: <s> replace the old parent indicated with the new one passed </s>
|
funcom_train/25332190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAndSetType() {
DACoordinateSystem instance = new DACoordinateSystem();
EnsemblCoordSystemType expResult = EnsemblCoordSystemType.clone;
EnsemblCoordSystemType result = instance.getType();
assertNull(result);
instance.setType(expResult);
result = instance.getType();
assertEquals(expResult, result);
}
COM: <s> test of get type method of class dacoordinate system </s>
|
funcom_train/46002003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getRandomBytes(byte[] bytes_) {
try {
for (int i=0; i<bytes_.length; i++) {
int random = _in.read();
if (-1 == random)
throw new RuntimeException("/dev/urandom: End of File");
else
bytes_[i] = (byte) random;
}
}
catch (IOException e) {
throw new RuntimeException("/dev/random: " + e.getMessage());
}
}
COM: <s> fill the specified byte array with random bits </s>
|
funcom_train/50464695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object call(Object obj, String methodName, int value) throws ReflectException, InvocationTargetException {
if(obj == null) throw new ReflectException("obj cannot be null");
Class[] types = new Class[]{Integer.TYPE};
return call(obj.getClass(), obj, methodName, new Object[]{new Integer(value)}, types);
}
COM: <s> call a method on a object instance with a single int argument </s>
|
funcom_train/1650404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setURI(boolean isExt, FreenetURI uri) {
NodeUpdater updater;
synchronized(this) {
if(isExt) {
if(extURI.equals(uri)) return;
extURI = uri;
updater = extUpdater;
} else {
if(updateURI.equals(uri)) return;
updateURI = uri;
updater = mainUpdater;
}
if(updater == null) return;
}
updater.onChangeURI(uri);
}
COM: <s> set the uri for either the freenet </s>
|
funcom_train/45250786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isIntroInStack() {
LayoutPart[] kids = getChildren();
for (int i = 0; i < kids.length; i++) {
if (kids[i] instanceof ViewPane) {
ViewPane vp = (ViewPane) kids[i];
if (vp.getID().equals(IIntroConstants.INTRO_VIEW_ID))
return true;
}
}
return false;
}
COM: <s> this is a hack that allows us to preserve the old </s>
|
funcom_train/8012012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setElementAt(int index,Object in){
if (index < 0 || index >= size())
return;
int row = index / _columnCount;
int column = index % _columnCount;
Object[] o = (Object[]) _rows.elementAt(row);
o[column] = in;
// this is to get only the occupied rows and columns
if (_rowSize < row)
_rowSize = row;
if (_columnSize < column)
_columnSize = column;
}
COM: <s> this method sets the value of a cell in the 2 d vector </s>
|
funcom_train/39380569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Option option) {
if (option == null) {
String msg = "option parameter cannot be null";
throw new IllegalArgumentException(msg);
}
getOptionList().add(option);
if (getOptionList().size() == 1) {
setInitialValue();
}
}
COM: <s> add the given option to the select </s>
|
funcom_train/3000432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sort(String columnNameList[]) throws InvalidColumnNameException {
int indexList[] = new int[columnNameList.length];
for (int i = 0; i < indexList.length; ++i) {
indexList[i] = getColumnIndex(columnNameList[i]);
}
java.util.Collections.sort(m_rowList, new MultiColumnComparator(indexList));
}
COM: <s> sorts table on the given list of columns </s>
|
funcom_train/9880717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawColoredBoxAt(Graphics g, int row, int column, Color color) {
g.setColor(color);
g.drawRect(insets.left + column*(elementSize.width+getSpacing()), insets.top + row*elementSize.height, elementSize.width-1, elementSize.height-1);
}
COM: <s> draws a rectangle with specified color </s>
|
funcom_train/31301576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doNextExpression() {
if (moreToDo()) {
ScriptExpression expr = _script.getExpression(_positionInScript);
// do something with expr, _context (possibly by passing to another class)
ExpressionRun run = new ExpressionRun(expr, _context);
run.runExpression();
_positionInScript++;
}
}
COM: <s> evaluates the next expression in the script </s>
|
funcom_train/44623077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void pushback(String dirs, List<String> todo) {
String[] array = dirs.split(java.io.File.pathSeparator);
for (int i=array.length-1; i>=0; --i) {
todo.add(0,array[i]);
}
}
COM: <s> this method is used internally to parse the directory path given in the </s>
|
funcom_train/43935758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getFramePosition(int timestamp) {
log.debug("Get frame position for timestamp: {}", timestamp);
long pos = 0;
if (timePosMap.containsKey(timestamp)) {
pos = timePosMap.get(timestamp);
log.debug("Found position: {}", pos);
} else {
log.info("Frame position was not found for timestamp: {}", timestamp);
}
return pos;
}
COM: <s> returns the position of a frame given the timestamp </s>
|
funcom_train/3837520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFrame getJFrameInstrumentManager() {
if (jFrameInstrumentManager == null) {
jFrameInstrumentManager = new JFrame();
jFrameInstrumentManager.setSize(new java.awt.Dimension(452, 299));
jFrameInstrumentManager.setTitle("Instrument Manager");
jFrameInstrumentManager.setIconImage(Toolkit.getDefaultToolkit()
.getImage(
getClass().getResource(
"/icons/preferences-system.png")));
jFrameInstrumentManager
.setContentPane(getJContentPaneInstrumentsManager());
}
return jFrameInstrumentManager;
}
COM: <s> this method initializes j frame instrument manager </s>
|
funcom_train/18239956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setX(int x) {
int difference = this.x - x;
this.x = x;
if(children !=null){
//recalc children's x
for(Glyph child : children){
child.setX(child.getX() -difference);
}
}
//update our bounds
bounds = calculateBounds();
this.invalidate();
}
COM: <s> changes the x coordinate of this glyph </s>
|
funcom_train/37593802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SymbolData getCommonSuperTypeBaseCase(SymbolData sdLeft, SymbolData sdRight) {
if (sdLeft == SymbolData.EXCEPTION) { return sdRight; }
if (sdRight == SymbolData.EXCEPTION) { return sdLeft; }
if (_isAssignableFrom(sdLeft, sdRight)) {return sdLeft;}
if (_isAssignableFrom(sdRight, sdLeft)) {return sdRight;}
return null;
}
COM: <s> returns the common super type of the two types provided </s>
|
funcom_train/19326610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double traitSpeechRate(final FObj fobj, final FoContext context) {
final PdSpeechRate property = (PdSpeechRate) getProperty(
FoProperty.SPEECH_RATE);
if (property != null) {
return property.getValue(context, fobj);
}
return PdSpeechRate.getValueNoInstance(context, fobj);
}
COM: <s> returns the speech rate property </s>
|
funcom_train/43570736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NameValuePair getParameter(String paramName) {
log.trace("enter PostMethod.getParameter(String)");
if (paramName == null) {
return null;
}
Iterator<NameValuePair> iter = this.params.iterator();
while (iter.hasNext()) {
NameValuePair parameter = (NameValuePair) iter.next();
if (paramName.equals(parameter.getName())) {
return parameter;
}
}
return null;
}
COM: <s> gets the parameter of the specified name </s>
|
funcom_train/12188660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmpty() throws Exception {
RecoverableTransactionStack rts = new RecoverableTransactionStack();
rts.push(STACKABLE);
assertFalse("Stack is not empty.", rts.empty());
rts.pop();
assertTrue("Stack should be empty.", rts.empty());
}
COM: <s> test the method empty </s>
|
funcom_train/35674944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWithJAXBAnnotations() {
try {
String pkg = _coxbGenModel.getJaxbPackageNameFromXsd(new File(
COB_XSD_DIR, "ALLTYPES.xsd"));
assertEquals("com.legstar.test.coxb.alltypes", pkg);
} catch (Exception e) {
fail("No annotations found " + e.getMessage());
}
}
COM: <s> test a valid xml file with jaxb annotation </s>
|
funcom_train/26416107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor() {
StoryOne story = new StoryOne();
assertEquals("stepName wrong", "", story.stepName);
assertEquals("steps() not called", "steps", story.sequence.get(0));
assertSame("steps not set right", story.myOwnSteps, story.mySteps);
}
COM: <s> see that after constructor </s>
|
funcom_train/45119866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperties(Hashtable<Object,Object> p) {
props = new Properties();
for (Enumeration<Object> e = p.keys(); e.hasMoreElements();) {
Object key = e.nextElement();
props.put(key, p.get(key));
}
}
COM: <s> set the properties to be used in the test </s>
|
funcom_train/10798555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isVersionCheckRequired() {
// explicit flag for version check
if ((_flags & FLAG_VERSION_CHECK) != 0)
return true;
if (!_broker.getOptimistic() && !_broker.getConfiguration().
getCompatibilityInstance().getNonOptimisticVersionCheck())
return false;
return _state.isVersionCheckRequired(this);
}
COM: <s> returns whether this instance needs a version check </s>
|
funcom_train/21106299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MJButton getBtBSAccountAs() {
if (btBSAccountAs == null) {
btBSAccountAs = new MJButton();
btBSAccountAs.setPreferredSize(new java.awt.Dimension(85, 20));
btBSAccountAs.setText("aF2 Add");
btBSAccountAs.setMnemonic(KeyEvent.VK_F2);
}
return btBSAccountAs;
}
COM: <s> this method initializes bt bsaccount as </s>
|
funcom_train/17417114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String bytesToString(byte[] inbuf) {
md5Init();
md5Update(inbuf, inbuf.length);
md5Final();
digestHexStr = "";
for (int i = 0; i < 16; i++) {
digestHexStr += byteHEX(digest[i]);
}
return digestHexStr;
}
COM: <s> encode md5 byte to string </s>
|
funcom_train/49352430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeBulkDelete(IPersistenceObject persistenceObject, String hql, BasicDTO dtoEmbeddedArguments) throws BasicException {
try{
persistenceObject.executeBulkDelete(hql, dtoEmbeddedArguments);
}catch(BasicException e){
throw e;
}catch(Exception e){
throw BasicException.basicErrorHandling("Error deleting objects", "errorBODeletingObject", e, log);
}
}
COM: <s> performs a bulk delete from database by persistence object </s>
|
funcom_train/116722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getDate() {
for (int i=0; i<info.length()-9; i++) {
if (Character.isWhitespace(info.charAt(i))) {
String dateString = info.substring(i+1, i+9);
try {
synchronized (formatter) {
return formatter.parse(dateString);
}
}
catch (ParseException pe) { }
break;
}
}
return null;
}
COM: <s> returns the date of the database </s>
|
funcom_train/26227096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateQInsts(final Instruction[] insts, MethodInfo method) {
addInitMethodInstruction(method);
final QuadrupleGenerator genQ = new QuadrupleGenerator(info.getMaxLocals());
graph.visitGraph(start, new NodeVisitor() {
public boolean visit(Node n) {
((BasicBlock) n).constructQuadruple(insts, genQ);
((BasicBlock) n).simplifyNewInstructions();
return true;
}
});
nbVar = genQ.getVarNumber();
}
COM: <s> generate 3 adress instructions in all basic blocks </s>
|
funcom_train/19685501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startPos(double p_x, double p_y) throws IllegalStateException {
if (m_startPosCalled)
throw new IllegalStateException("cannot be called twice");
m_startPosCalled = true;
add(0, p_x, p_y, 0);
}
COM: <s> set the initial position </s>
|
funcom_train/44845935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeListener() {
unusedFileList.addSelectionListener(new ListSelectionListener(unusedFileList, delFileList));
delFileList.addSelectionListener(new ListSelectionListener(delFileList, unusedFileList));
moveToDelBtn.addSelectionListener(new ButtonSelectionListener(unusedFileList, delFileList));
moveToUnusedBtn.addSelectionListener(new ButtonSelectionListener(delFileList, unusedFileList));
}
COM: <s> initialize the listener for the 2 file lists and the move buttons </s>
|
funcom_train/51786925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCachedObject(String name, Object object, boolean inSession) {
Map cache0 = (Map) getSession().getAttribute("actionCache");
if(cache0==null) {
cache0=new HashMap();
getSession().setAttribute("actionCache", cache0);
}
if(this.cache==null)
this.cache=new HashMap(cache0);
this.cache.put(name, object);
if ( inSession )
cache0.put(name, object);
}
COM: <s> add or replace the given object to the action cache </s>
|
funcom_train/16470598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test3() throws Exception {
File baseDir = run("test3", "plugin-config3.xml");
assertXMLEquals(baseDir, "source3_merged.expected", "source3_merged.wsdl");
assertXMLEquals(baseDir, "source3b_merged.expected", "source3b_merged.wsdl");
assertXMLEquals(baseDir, "source3c_merged.expected", "source3c_merged.wsdl");
}
COM: <s> test poorly formatted wsdls </s>
|
funcom_train/1784710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSampleDimension(final VariableDS variable) {
final VariableMetadata m;
if (USE_UCAR_LIB) {
m = new VariableMetadata(variable);
} else {
m = new VariableMetadata(variable, forcePacking("valid_range"));
}
m.copyTo(addBand(getName(variable)));
}
COM: <s> adds sample dimension information for the specified variable </s>
|
funcom_train/5260698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRealizedByPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CourseOfAction_realizedBy_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CourseOfAction_realizedBy_feature", "_UI_CourseOfAction_type"),
BmmPackage.Literals.COURSE_OF_ACTION__REALIZED_BY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the realized by feature </s>
|
funcom_train/40007394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAll() {
System.out.println("getAll");
InstructorServiceImpl instance = new InstructorServiceImpl();
List<Instructor> expResult = null;
List<Instructor> result = instance.getAll();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get all method of class instructor service impl </s>
|
funcom_train/1111146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleEmptyGroups(Object[] groups) {
if (removeEmptyGroups) {
if (groups != null && groups.length > 0) {
if (remove == null)
remove = new Object[] {};
Object[] tmp = new Object[remove.length + groups.length];
System.arraycopy(remove, 0, tmp, 0, remove.length);
System.arraycopy(groups, 0, tmp, remove.length,
groups.length);
remove = tmp;
}
}
}
COM: <s> adds the groups that become empty to the cells that will be removed </s>
|
funcom_train/8241152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInternet2Intranet() throws Exception {
System.out.println("internet2Intranet");
SyncClientService instance = null;
boolean expResult = false;
boolean result = instance.internet2Intranet();
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 internet2 intranet method of class sync client service </s>
|
funcom_train/5580817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _initPasswordData() {
_unregisterListeners();
_pwd = _data.getPassword();
if (_data.getAllowChange()) {
_callowChange.setSelected(true);
} else {
_callowChange.setSelected(false);
}
String changed = (_data.getLastChange() != null) ? _data.getLastChange().toString()
: "---";
_tlastChanged.setText(changed);
_sinterval.setValue(_data.getChangeIntervalInDays());
_registerListeners();
}
COM: <s> sets all controles to the stored password data </s>
|
funcom_train/7355075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processEvents() {
Object event;
while (true) {
synchronized(eventQueue) {
if (eventQueue.isEmpty() || ! isAlive) {
eventProcessor = null;
return;
}
event = eventQueue.removeFirst();
}
try {
processEvent(event);
} catch (Throwable e) {
e.printStackTrace();
}
}
}
COM: <s> this method removes events from the event queue </s>
|
funcom_train/22489547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildGroup () {
final Container group = (Container) getComponent();
if (group == null) {
throw new IllegalArgumentException("no type specified for the group");
}
for (int i = 0; i < _descriptors.size(); i++) {
final EComponentDescriptor compDesc =
(EComponentDescriptor) _descriptors.elementAt(i);
group.add(compDesc.getComponent());
}
}
COM: <s> adds the components from the descriptors added via </s>
|
funcom_train/33896748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DomRepresentation getResult(String resourceUrl, String param){
log.info(resourceUrl + param);
if (param != null)
{
request = new Request(Method.GET,
new Reference(new Reference(url), resourceUrl + param));
}
else
{
request = new Request(Method.GET,
new Reference(new Reference(url), resourceUrl));
}
response = new Response(request);
router.handle(request, response);
return (DomRepresentation)response.getEntity();
}
COM: <s> native method to test the restlet </s>
|
funcom_train/9086787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Accounts entity) {
EntityManagerHelper.log("deleting Accounts instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Accounts.class,
entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent accounts entity </s>
|
funcom_train/13500168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDefaultFindURI() {
String uri = "/objects?terms=*&resultFormat=" + m_defaultFindFormat;
uri = uri + "&maxResults=" + m_defaultFindResults;
for ( String element : m_defaultFindElements )
uri = uri + "&" + element + "=true";
return uri;
}
COM: <s> gets the uri for the default find objects api </s>
|
funcom_train/511190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasOption(String opt) {
// short option
if (opt.length() == 1) {
return shortOpts.containsKey("-" + opt);
}
// long option
else if (opt.startsWith("--")) {
return longOpts.containsKey(opt);
}
// a just-in-case
else {
return shortOpts.containsKey(opt);
}
}
COM: <s> p returns whether the named </s>
|
funcom_train/8376622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addVotingBooth(UserCredentials votingBoothCredentials) {
// get booths
Map<UserCredentials, RegionalInformation> booths = fBoothsPerNamePerOfficeMap.get(votingBoothCredentials.getRegionId());
if (booths == null) {
// no booths yet
booths = new HashMap<UserCredentials, RegionalInformation>();
fBoothsPerNamePerOfficeMap.put(votingBoothCredentials.getRegionId(), booths);
}
// add booth
booths.put(votingBoothCredentials, null);
}
COM: <s> registers a new voting booth with the given crentials to the bean </s>
|
funcom_train/12663086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void extract(final File extDir) {
final Project project = new Project();
final Expand expand = new Expand();
expand.setProject(project);
expand.setSrc(archiveFile);
expand.setDest(new File(extDir, manifest.getExtensionName()));
expand.execute();
project.log("extracted extension archive: " + archiveFile.getName());
}
COM: <s> extracts the archive into the location specifed </s>
|
funcom_train/33622160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem getJRadioButtonMenuItem() {
if (jRadioButtonMenuItem == null) {
jRadioButtonMenuItem = new JRadioButtonMenuItem();
jRadioButtonMenuItem.setText("Nearest");
jRadioButtonMenuItem.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
TextureInfo.MIN_FILTER_PARAM = GL.GL_NEAREST;
}
});
}
return jRadioButtonMenuItem;
}
COM: <s> this method initializes j radio button menu item </s>
|
funcom_train/27851373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer getRequestURL() {
return new StringBuffer().append(getScheme())
.append("://")
.append(serve.hostName)
.append(serve.port==80 ? "" : String.valueOf(serve.port))
.append(getRequestURI());
}
COM: <s> reconstructs the url the client used to make the request </s>
|
funcom_train/3913458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExplicitProperty getProperty(Uol uol, Run run, User user, String propId, int type) throws PropertyException {
String key = getKey(uol, run, user, propId);
ExplicitProperty property = (ExplicitProperty) fetchFromCache(key);
if (property == null) {
property = createProperty(uol, run, user, propId, type);
}
return property;
}
COM: <s> return an explicit property for the passed parameters </s>
|
funcom_train/28425813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireTableChanged(TableModelEvent e) {
Object[] listenerArr = listeners.getListenerList();
for (int i = listenerArr.length-2; i>=0; i-=2) {
if (listenerArr[i]==TableModelListener.class) {
((TableModelListener)listenerArr[i+1]).tableChanged(e);
}
}
}
COM: <s> forwards the given notification event to all </s>
|
funcom_train/50396897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void replaceVariablesInJobName(JSDLUtils ju){
try{
String jobName=ju.getJsdl().getJobDefinition().getJobDescription().getJobIdentification().getJobName();
jobName=expandVariables(jobName);
ju.getJsdl().getJobDefinition().getJobDescription().getJobIdentification().setJobName(jobName);
}catch(Exception ignored){}
}
COM: <s> replace occurences of varname in the job name </s>
|
funcom_train/10205485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCommand(Request request) {
if (request instanceof ReconnectRequest) {
Object view = ((ReconnectRequest) request).getConnectionEditPart()
.getModel();
if (view instanceof View) {
Integer id = new Integer(
com.ssd.mdaworks.classdiagram.classDiagram.diagram.part.ClassdiagramVisualIDRegistry
.getVisualID((View) view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
}
}
return super.getCommand(request);
}
COM: <s> extended request data key to hold editpart visual id </s>
|
funcom_train/4757344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double distance(final Line line) {
final Vector3D normal = Vector3D.crossProduct(direction, line.direction);
final double n = normal.getNorm();
if (n < MathUtils.SAFE_MIN) {
// lines are parallel
return distance(line.zero);
}
// signed separation of the two parallel planes that contains the lines
final double offset = line.zero.subtract(zero).dotProduct(normal) / n;
return FastMath.abs(offset);
}
COM: <s> compute the shortest distance between the instance and another line </s>
|
funcom_train/20486864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int updateIndent(String line) {
String tempLine = line;
int indent = 0;
while (tempLine.contains("{")) {
indent = indent + 1;
tempLine = tempLine.substring(tempLine.indexOf("{") + 1);
}
while (line.contains("}")) {
indent = indent - 1;
line = line.substring(line.indexOf("}") + 1);
}
return indent;
}
COM: <s> given a line to parse return the difference in indent between the given </s>
|
funcom_train/49798421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStable() throws Exception {
String inputText = DefaultIACleaner.readFile(getExpectedFile());
assertNotNull(inputText);
// replace \r\n with \n
inputText = inputText.replace("\r\n", "\n");
IACleaner c = AllTests.getCleaner();
String result = c.cleanScript(getExpectedFile());
assertStringEquals(inputText, result);
// no warnings
assertNoWarnings(c);
}
COM: <s> if we load the expected file it does not change between executions </s>
|
funcom_train/19353128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URI getPhysicalURIFromOntologyURI(URI ontologyURI, boolean quiet) {
for (OWLOntologyURIMapper mapper : uriMappers) {
URI physicalURI = mapper.getPhysicalURI(ontologyURI);
if (physicalURI != null) {
return physicalURI;
}
}
if (!quiet) {
throw new OWLOntologyURIMappingNotFoundException(ontologyURI);
}
else {
return null;
}
}
COM: <s> uses the mapper mechanism to obtain a physical uri for an ontology </s>
|
funcom_train/18786666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
Object oldValue = ReflectUtilities.getProperty(bean, property);
Object value = getValue();
if (((oldValue != null) && !oldValue.equals(value))
|| ((oldValue == null) && (value != null))) {
ReflectUtilities.setProperty(bean, property, value);
}
}
COM: <s> updates the bean with the value edited in the view </s>
|
funcom_train/40729796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValidateConfigIgnoredLivelinkCgi() throws Exception {
Map<String, String> props = getValidProperties();
props.put("livelinkCgi", "/frog");
props.put("https", "false");
ConfigureResponse response =
connectorType.validateConfig(props, defaultLocale,
LivelinkConnectorFactory.getInstance());
assertValid(response);
}
COM: <s> tests the validate config method with http tunneling disabled </s>
|
funcom_train/14215700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getOtherAdjustments() {
return OrderReadHelper.calcItemAdjustmentsBd(new BigDecimal(quantity), new BigDecimal(getBasePrice()), this.getAdjustments(), true, false, false, false, false).doubleValue();
}
COM: <s> returns the other adjustments </s>
|
funcom_train/4008980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(String[] args,ConsoleOutput output) {
if (args == null)
return ;
output.print(args[0]) ;
for (int i=1;i<args.length;i++) {
output.print(' ') ;
output.print(args[i]) ;
}
output.println() ;
}
COM: <s> execute this command </s>
|
funcom_train/48266457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void whisper(String theBuddy, String theMessage) {
_myConnection.deliver(IMChat.DATA, "toc_chat_whisper "
+ IMChat.normalize(_myChannelId)
+ IMChat.normalize(theBuddy) + " \""
+ IMChat.encode(theMessage) + "\"");
}
COM: <s> send a message to a specific buddy in the chat channel </s>
|
funcom_train/30101586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearChildNodes (TreeNode node) {
// process the children
List children = node.getChildren();
while (children.size() > 0) {
TreeNode child = (TreeNode) children.remove(0);
clearChildNodes (child);
child = null;
}
} //end of clearChildNodes
COM: <s> given a tree node that is being deleted </s>
|
funcom_train/7626392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean persistLong(long value) {
if (shouldPersist()) {
if (value == getPersistedLong(~value)) {
// It's already there, so the same as persisting
return true;
}
SharedPreferences.Editor editor = mPreferenceManager.getEditor();
editor.putLong(mKey, value);
tryCommit(editor);
return true;
}
return false;
}
COM: <s> attempts to persist a long to the </s>
|
funcom_train/13650846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String convertListToString(Collection<String> list) {
StringBuilder builder = new StringBuilder();
for (String value : list) {
if (builder.length() > 0) {
builder.append(", ");
}
builder.append(value);
}
return (builder.toString());
}
COM: <s> converts the arraylist content to a comma separated string </s>
|
funcom_train/10616691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testProviderException06() {
ProviderException tE = new ProviderException(null, null);
assertNull("getMessage() must return null", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
COM: <s> test for code provider exception string throwable code constructor </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.