__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/1116568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getButtonPanel() {
if (buttonPanel == null) {
buttonPanel = new JPanel();
buttonPanel.setLayout(new FlowLayout());
buttonPanel.add(getAddbutton(), null);
buttonPanel.add(getChangebutton1(), null);
buttonPanel.add(getDeletebutton1(), null);
buttonPanel.add(getClosebutton1(), null);
buttonPanel.add(getClonebutton1(), null);
}
return buttonPanel;
}
COM: <s> this method initializes button panel </s>
|
funcom_train/36280067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCorrSubqueryInExist() throws Exception {
Operator root = mTestUtils.testQuery(
"CorrSubqueryInExist",
"SELECT e.fname FROM employee AS e WHERE " +
"EXISTS (SELECT * FROM employee s WHERE e.superssn = s.ssn)",
true);
assertEquals(
0, OptimiserUtils.findOccurrences(root, OperatorID.APPLY).size());
}
COM: <s> apply with semi join </s>
|
funcom_train/31468045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(ExclusiveOrAssignExpression node) {
Node left = node.getLeftExpression();
LeftHandSideModifier mod = NodeProperties.getModifier(left);
Object lhs = mod.prepare(this, context);
// Perform the operation
Object result = InterpreterUtilities.xOr
(NodeProperties.getType(node),
lhs,
node.getRightExpression().acceptVisitor(this));
// Cast the result
result = performCast(NodeProperties.getType(left), result);
// Modify the variable and return
mod.modify(context, result);
return result;
}
COM: <s> visits a exclusive or assign expression </s>
|
funcom_train/42332099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initSensorsChess(){
// Declare Rectangle, TextArea
rectangles = new ArrayList<MTRectangle>();
textAreas = new ArrayList<MTTextArea>();
for(int r=0;r<ROWSIZE;r++){
for(int c=0;c<COLUMNSIZE;c++){
int xPos = SENSORSIZE/2 + (pa.width/COLUMNSIZE * c);
int yPos = SENSORSIZE/2 + (pa.height/ROWSIZE * r);
rectangles.add(createRectangle(xPos, yPos, 0, clearColor));
textAreas.add(createTextArea("0", xPos, yPos, 0, null));
}
}
}
COM: <s> draw sensors chess for the first time </s>
|
funcom_train/33436568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map getNameDirectory() throws IOException {
// retrieve directory of named hashtable
long nameDirectory_recid = getRoot(NAME_DIRECTORY_ROOT);
if (nameDirectory_recid == 0) {
_nameDirectory = new HashMap();
nameDirectory_recid = insert(_nameDirectory);
setRoot(NAME_DIRECTORY_ROOT, nameDirectory_recid);
} else {
_nameDirectory = (Map) fetch(nameDirectory_recid);
}
return _nameDirectory;
}
COM: <s> load name directory </s>
|
funcom_train/26464708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(String text) {
m_nCaretColumn = 0;
m_nCaretRow = 0;
m_listTextRows.clear();
int pos, lastPos = 0;
int length;
do {
pos = text.indexOf('\n', lastPos);
if (-1 != pos) {
length = pos - lastPos;
} else {
length = text.length() - lastPos;
}
String sub = text.substring(lastPos, lastPos + length);
m_listTextRows.add(sub);
lastPos = pos + 1;
} while (-1 != pos);
adjustSize();
}
COM: <s> sets the text of the text box </s>
|
funcom_train/43427856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test(){
ConfigManager.INSTANCE.setSearchLanguage(getLanguage());
DidYouMean didYouMean = new DidYouMean() {
@Override
protected StringDistance getStringDistance() {
return DidYouMeanTest.this.getStringDistance();
}
};
String toGuess = getDidYouMean();
System.out.println(toGuess);
System.out.println(didYouMean.didYouMean(toGuess));
didYouMean.close();
}
COM: <s> test the did you mean mechanism </s>
|
funcom_train/8059699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setAllowUnsignedRequests(boolean allowUnsignedRequests) {
if (!allowUnsignedRequests && waveService.getConsumerDataMap().isEmpty()) {
throw new IllegalArgumentException("Please call AbstractRobot.setupOAuth() first to " +
"setup the consumer key and secret to validate the request.");
}
this.allowUnsignedRequests = allowUnsignedRequests;
}
COM: <s> sets whether or not unsigned incoming requests from robot proxy are </s>
|
funcom_train/31338758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restart() {
/* First Check for active Downloads */
if (fDownloadService.isActive()) {
MessageDialog.openWarning(OwlUI.getActiveShell(), Messages.Controller_RESTART_RSSOWL, Messages.Controller_ACTIVE_DOWNLOADS_WARNING);
return;
}
fRestarting = true;
/* Run the restart() */
PlatformUI.getWorkbench().restart();
}
COM: <s> restart the application </s>
|
funcom_train/25217667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scanTo(String text) throws IOException {
char[] ca = text.toCharArray();
int i = 0;
for (;;) {
int c = read();
if (c < 0) {
return;
} else if (c == ca[i]) {
i++;
if (i >= ca.length) {
return;
}
} else {
i = 0;
}
}
}
COM: <s> consume all characters until the end text is found </s>
|
funcom_train/26275139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStylesheet(URL stylesheet) throws Exception {
/* TODO do we still need to do this
if (this.stylesheet != null) {
// do we need to reset templates as well
if (!this.stylesheet.equals(stylesheet)
|| (lastModified != templatesModTime)
|| (lastModified == OldXSLTLiaison.UNKNOWN_TIME))
{
templates = null;
}
}
*/
this.stylesheet = stylesheet;
}
COM: <s> set the stylesheet to use for the transformation </s>
|
funcom_train/25457532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getCBDecompose() {
if (CBDecompose == null) {
CBDecompose = new JCheckBox();
CBDecompose.addItemListener(new java.awt.event.ItemListener()
{
public void itemStateChanged(java.awt.event.ItemEvent e)
{
afnOccFrac.setEnabled(CBDecompose.isSelected());
afnUnoccFrac.setEnabled(CBDecompose.isSelected());
}
});
}
return CBDecompose;
}
COM: <s> this method initializes cbdecompose </s>
|
funcom_train/42364680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char findOppositePlayerSymbol(Player p) {
for (int i = 0; i < ROW_COUNT; i++) {
for (int j = 0; j < COLUMN_COUNT; j++) {
if (playboard[i][j] != '0' && playboard[i][j] != p.getSymbol()) {
return playboard[i][j];
}
}
}
return NEUTRAL_SYMBOL;
}
COM: <s> method that is needed by the computer player to get the opposites player </s>
|
funcom_train/1953383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCurrentMaxPriorityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Qx_currentMaxPriority_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Qx_currentMaxPriority_feature", "_UI_Qx_type"),
EnginePackage.Literals.QX__CURRENT_MAX_PRIORITY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the current max priority feature </s>
|
funcom_train/43199267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void householdsMutualEndorsments(Household household1, Household household2, String label) {
for (Person m1 : household1.getMembers()) {
for (Person m2 : household2.getMembers()) {
if (m1 != null
&& m2 != null
&& m1.isAlive()
&& m2.isAlive()) {
m1.endorsePerson(m2, label);
m2.endorsePerson(m1, label);
}
}
}
}
COM: <s> members of households household1 and household2 endorse each other for the endorsement label </s>
|
funcom_train/25346385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkSources(Activity activity) {
// Check all sources for finished status
boolean sourcesFinished = true;
for (Activity source : activity.getSources()) {
sourcesFinished = sourcesFinished && isFinished(source);
}
// If all finished, check recursively
if (sourcesFinished && activity instanceof ActivityComplex) {
for (Activity child : ((ActivityComplex) activity).getChildren()) {
sourcesFinished = sourcesFinished && checkSources(child);
}
}
return sourcesFinished;
}
COM: <s> checks the sources of the given activity </s>
|
funcom_train/50879041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRectangle(Rectangle inRectangle){
if (inRectangle == null){
myStartPoint = null;
return;
}
myStartPoint = new java.awt.Point(inRectangle.x, inRectangle.y);
myEndPoint = new java.awt.Point(inRectangle.x+inRectangle.width, inRectangle.y+inRectangle.height);
}
COM: <s> set the rectangle to use </s>
|
funcom_train/13996652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void buildActions() {
NodeList pages = dom.getElementsByTagName("action");
for (int i = 0; i < pages.getLength(); i++) {
Element pageElement = (Element) pages.item(i);
DialogAction action = (DialogAction) createPart(pageElement);
action.setActionInformation(pageElement.getAttribute("info"));
result.getParts().put("action." + pageElement.getAttribute("key"), action);
}
}
COM: <s> builds the dialog actions </s>
|
funcom_train/7276628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean consumeBodyIfNeeded() {
if (_downloader.isBodyConsumed()) {
LOG.debug("Not consuming body.");
return false;
}
_downloader.consumeBody(new State() {
protected void handleState(boolean success) {
if (!success)
handleRFDFailure();
}
});
return true;
}
COM: <s> consumes the body of an http request if necessary </s>
|
funcom_train/38878818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notify(int[] eventsNumber) {
stringToRead = "";
if (eventsNumber.length==descriptions.length) {
for (int i=0; i<eventsNumber.length; i++) {
stringToRead = stringToRead + eventsNumber[i] + " " + descriptions[i];
if (i<(eventsNumber.length-1)) {
stringToRead = stringToRead + ", ";
}
}
}
if (ready) { speak(); }
}
COM: <s> this method generates a string based on events number and descriptions </s>
|
funcom_train/7265244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsKey(long key) {
Entry tab[] = table;
int hash = (int)key;
int index = (hash & 0x7FFFFFFF) % tab.length;
for (Entry e = tab[index]; e != null; e = e.next) {
if (e.hash == hash && e.key == key) {
return true;
}
}
return false;
}
COM: <s> p tests if the specified object is a key in this hashtable </s>
|
funcom_train/29722394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemOptions() {
if (jMenuItemOptions == null) {
jMenuItemOptions = new JMenuItem();
jMenuItemOptions.setText(Bundle
.getText("wizardMainFrame.menuBar.tools.options"));
jMenuItemOptions.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new OptionFrame(WizardMainFrame.this);
}
});
}
return jMenuItemOptions;
}
COM: <s> this method initializes j menu item options </s>
|
funcom_train/51782446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void snapRightLower() {
// snap right lower
double x2 = pos.getX() + size.getWidth();
double y2 = pos.getY() + size.getHeight();
Point2D rightLower = new Point2D.Double(x2, y2);
snapping.snap(rightLower);
x2diff = x2 - rightLower.getX();
y2diff = y2 - rightLower.getY();
makeAdjustments();
}
COM: <s> perform a snap on the right lower corner </s>
|
funcom_train/326274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void setSource(PamDataBlock sourceBlock) {
/*
* Several dialogs are not calling setSourceList each time
* they open. Although some are, I've decided to call this here anyway
* since calling it twice is better than not at all.
*/
setSourceList();
/*
* The direct way of doing this seems to have stopped working - very worrying !
*/
sourceList.setSelectedItem(sourceBlock);
//System.out.println("SourcePanel.java :: setSource 2");
// sourceList.setSelectedIndex(2);
}
COM: <s> set the current data source by block reference </s>
|
funcom_train/3343526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillRect(int x, int y, int w, int h, int color, int mode) {
for (int row = 0; row < h; row++) {
drawLine(x, y + row, x + w - 1, y + row, color, mode);
}
}
COM: <s> fill a rectangle with the given color </s>
|
funcom_train/36908657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String next() throws ParsingException{
if(placeHolder != null){
Exception toThrow = placeHolder;
placeHolder = null;
if (toThrow instanceof ParsingException)
throw (ParsingException) toThrow;
else if (toThrow instanceof IOException)
throw (ParsingException) toThrow;
else
throw new RuntimeException("Unexpected type of exception", toThrow);
}
if (getTokensQueue().size() == 0)
throw new NoSuchElementException();
return getTokensQueue().poll();
}
COM: <s> returns the next token from the source being scanned </s>
|
funcom_train/25788897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean supportsRead(Class<?> entityClass, Type genericType) {
if (entityClass == null) {
return false;
}
if (genericType == null) {
// LATER use Type instead of Class
}
if (this.genericMbrType == null) {
return false;
}
return this.genericMbrType.isAssignableFrom(entityClass);
}
COM: <s> checks if this message body reader supports the given type by the type </s>
|
funcom_train/12895964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GenericValue getUpdate(String updateKey) {
GenericValue g = null;
try {
g = getDelegator().findByPrimaryKey(
Fields.SysUpdate.ENTITY_NAME,
UtilMisc.toMap(Fields.SysUpdate.UPDATE_KEY,
updateKey));
} catch (Exception e) {
_log.error("Error loading system update for key " + updateKey, e);
}
return g;
}
COM: <s> get the update record for the provided patch key </s>
|
funcom_train/28178231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPermissionRef(String scopeRef, String op, String auth, String priv){
for(int i = 0;i<getPermission().size();i++){
PermissionType permission = (PermissionType)getPermission().get(i);
if(permission.getScopeRef().equals(scopeRef) && permission.getOperation().equals(op) &&
permission.getAuth().equals(auth) && permission.getPriv().equals(priv)){
return (permission.getId());
}
}
return null;
}
COM: <s> return the id of the permission associated with this property </s>
|
funcom_train/49760547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonRunApp() {
if (jButtonRunApp == null) {
jButtonRunApp = new JButton();
jButtonRunApp.setBounds(new Rectangle(780, 20, 66, 26));
jButtonRunApp.setText("Run");
jButtonRunApp.addActionListener(this);
jButtonRunApp.setEnabled(false);
}
return jButtonRunApp;
}
COM: <s> this method initializes j button run app </s>
|
funcom_train/3702000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initPort() {
while (true) {
try {
if (DEBUG == true) {
System.out.println("Trying UDP port " + port);
}
socket = new DatagramSocket(port);
if (DEBUG == true) {
System.out.println("Waiting on UDP port " + port);
}
return;
}
catch (Exception e) {
port++;
}
}
} // of method
COM: <s> initialize the udp port </s>
|
funcom_train/18112033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_HappeningCategory_State_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_HappeningCategory_State_feature", "_UI_HappeningCategory_type"),
BioDBPackage.Literals.HAPPENING_CATEGORY__STATE,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the state feature </s>
|
funcom_train/23619201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateDEPASteps() {
//if(glodepstep > -1)
//TODO - need a floating point rep
this.stepehot = this.calculateLargestStep(this.getScale());
// PO.p("root = " + this.root + " updating depa steps for scale " + this.getScaleName() + " is " + stepehot);
// else {
// this.stepehot = glodepstep;
// }
}
COM: <s> update the number of passing steps needed in the depa representation </s>
|
funcom_train/9104674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setBounds(new Rectangle(309, 365, 42, 42));
jButton.setIcon(new ImageIcon(getClass().getResource("/Icons/flecha der.png")));
jButton.addActionListener(this);
jButton.setActionCommand("siguiente");
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/174266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matches(Object obj) {
if (obj instanceof Element) {
Element el = (Element) obj;
return
(this.name == null || this.name.equals(el.getName())) &&
(this.namespace == null || this.namespace.equals(el.getNamespace()));
}
return false;
}
COM: <s> check to see if the object matches a predefined set of rules </s>
|
funcom_train/50558461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireOnRenderDisplayer(WorkData data) {
Iterator i = listeners.iterator();
while (i.hasNext()) {
ActionListener listener = (ActionListener) i.next();
((WorkDataImpl)data).createUserContext(listener.getCanyamoContext());
logger.debug("fireOnRenderDisplayer: " + listener.getName());
listener.run(data);
}
}
COM: <s> notifies all listeners that the displayer will be render </s>
|
funcom_train/28116386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJMSXGroupID() throws Exception {
Message message = getContext().getMessage();
for (int i = 0; i < INVALID_GROUP_ID_VALUES.length; ++i) {
Object value = INVALID_GROUP_ID_VALUES[i];
checkProperty(message, GROUP_ID, value);
}
}
COM: <s> verifies that the only allowed type for jmsxgroup id is a string </s>
|
funcom_train/7634742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LocationProvider getProvider(String name) {
if (name == null) {
throw new IllegalArgumentException("name==null");
}
try {
Bundle info = mService.getProviderInfo(name);
if (info == null) {
return null;
}
return createProvider(name, info);
} catch (RemoteException ex) {
Log.e(TAG, "getProvider: RemoteException", ex);
}
return null;
}
COM: <s> returns the information associated with the location provider of the </s>
|
funcom_train/42046011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPrimaryKeyParameterMarkers(ColumnQuoter quoter) {
if (primaryKeyParameterMarkers == null) {
StringBuilder sb = new StringBuilder();
Iterator<String> iter = pkMap.values().iterator();
while (iter.hasNext()) {
String column = iter.next();
if (sb.length() > 0) {
sb.append(" AND ");
}
sb.append(quoter.quote(column));
sb.append(" = ?");
}
primaryKeyParameterMarkers = sb.toString();
}
return primaryKeyParameterMarkers;
}
COM: <s> return the primary key columns with parameter markers </s>
|
funcom_train/39366915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void store(File file) throws IOException {
ParameterSet ps = new ParameterSet("SeisTraceProperties");
SeisTraceProperty tp = null;
for (Object key : _map.keySet()) {
tp = (SeisTraceProperty) _map.get(key);
ps.setString((String) key, tp.toPropString());
}
ParameterSetIO.writeFile(ps, file.getAbsolutePath());
}
COM: <s> store the contents of the trace property catalog to an output file </s>
|
funcom_train/17007029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NtpHeader getHeader() {
byte[] buffer = ntpPacket.getData();
byte[] temp = new byte[NtpOffset.offReferenceTimestamp -
NtpOffset.offHeader];
for (int i = NtpOffset.offHeader; i < NtpOffset.offReferenceTimestamp;
i++) {
temp[i - NtpOffset.offHeader] = buffer[i];
}
return new NtpHeader(temp);
}
COM: <s> gets the header associated to a ntp datagram packet </s>
|
funcom_train/2897747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL createURL(String aURL) throws MalformedURLException {
URLStreamHandler handler = null;
if (myTimeOutValue > -1) {
handler = new HttpTimeoutHandler(myTimeOutValue);
}
if (myProxyURL != null) {
return new URL(myProxyProtocol, myProxyURL, myProxyPort, aURL, handler);
} else {
return new URL(null, aURL, handler);
}
}
COM: <s> creates a new code url code object with the factory default </s>
|
funcom_train/43467238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAppendBoolean() {
ToStringBuilder b = new ToStringBuilder(this);
b.append("yes", true);
b.append("no", false);
assertEquals("ToStringBuilderTest [yes=true,no=false]", b.toString());
}
COM: <s> tests appending of a boolean </s>
|
funcom_train/28340152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Before public void setup() {
// Create a new table group
this.group = new TableGroup(TestTableGroup.NAME_GRP);
// Create and add a table
this.table = TestDataTable.newParticleTable();
this.group.addDataTable(this.table);
// Register for call backs
this.group.addListener(this);
}
COM: <s> setup the test frame </s>
|
funcom_train/47735415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return leadingZero(getDay()) + "-" + month_name[getMonth() - 1] +
"-" + getYear() + " " +
leadingZero(getHour()) + ":" + leadingZero(getMinute())
+ ":" + leadingZero(getSecond());
}
COM: <s> a string representation of the day </s>
|
funcom_train/4787395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FieldDesc getField(int p, int from) {
FieldDesc f;
if ( p >= inputMask.length() ) {
p = inputMask.length() - 1;
}
char c = inputMask.charAt(p);
while ( c == '*' ) {
p--;
if ( p < 0 ) {
return null;
}
c = inputMask.charAt(p);
}
f = fields[c - '0'];
locateField(f, from);
return f;
}
COM: <s> returns the field descriptor corresponding to a given position in the </s>
|
funcom_train/23351032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exportScreenCapture() {
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss");
Date date = new Date();
tree.exportScreenCapture(frame.dir_path+"/tree_screencaps/"+dateFormat.format(date)+".png");
}
COM: <s> exports the current tree view as screencap </s>
|
funcom_train/37608562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void endIt() {
CatchKeys ckey = JavaDriver.getGKeys().getKEPP();
this.dispose();
this.setVisible(false);
Display dsp = ckey.getDisplay();
if (dsp != null)
if (nudge) {
if (dsp != null) dsp.nudgeMap();
} else if (run) {
ckey.postProcessKeyEvent(new KeyEvent(
dsp, KeyEvent.KEY_PRESSED,
System.currentTimeMillis(),
KeyEvent.CTRL_DOWN_MASK,
KeyEvent.VK_R, 'r'));
}
ckey.setDZoom();
run = false;
nudge = false;
} // end endIt()
COM: <s> closes the tt dzoom tt dialog and restarts traffic if it was </s>
|
funcom_train/9235889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void add() {
final Alias alias = new Alias("");
tableModel.addRow(alias);
final int newRow = table.getRowSorter().
convertRowIndexToView(tableModel.indexOf(alias));
table.getSelectionModel().setSelectionInterval(newRow, newRow);
aliasDetails.focusCommand();
}
COM: <s> adds an alias </s>
|
funcom_train/17291848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printTableRow(Row tableRow) {
System.out.println("ID = " + tableRow.getString(0) + ", Name = "
+ tableRow.getString(1) + ", Surname = "
+ tableRow.getString(2) + ", City = "
+ tableRow.getString(3));
}
COM: <s> prints the contents of a single row </s>
|
funcom_train/41393081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int findSubjectLine(String subject) {
String line;
String formattedSubject = "["+subject+"]";
for (int i=0;i<lines.size();i++) {
line = (String)lines.elementAt(i);
if (formattedSubject.equals(line)) return i;
}
return -1;
}
COM: <s> find a subject line within the lines vector </s>
|
funcom_train/45623392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSilentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ResolveAssemblyReferenceType_silent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ResolveAssemblyReferenceType_silent_feature", "_UI_ResolveAssemblyReferenceType_type"),
MSBPackage.eINSTANCE.getResolveAssemblyReferenceType_Silent(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the silent feature </s>
|
funcom_train/49656242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transformXML(String[] tags, Function fn, File in) {
InputStream ins = null;
try {
ins = new BufferedInputStream(new FileInputStream(in));
} catch (Exception e) {
System.err.println("Error reading file " + in + ": " + e);
e.printStackTrace();
}
transformXML(tags, fn, ins, System.out);
}
COM: <s> read xml from the specified file and write xml to stdout </s>
|
funcom_train/1491318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logUsage(HttpServletRequest request, DataResourceDTO dataResource) {
GbifLogMessage gbifMessage = new GbifLogMessage();
gbifMessage.setEvent(LogEvent.USAGE_DATASET_METADATA_VIEW);
gbifMessage.setDataResourceId(parseKey(dataResource.getKey()));
gbifMessage.setDataProviderId(parseKey(dataResource.getDataProviderKey()));
gbifMessage.setTimestamp(new Date());
gbifMessage.setRestricted(false);
gbifMessage.setMessage("Dataset metadata viewed");
userUtils.logUsage(logger, gbifMessage, request);
}
COM: <s> log the usage </s>
|
funcom_train/7292365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (this.getClass() != obj.getClass()) {
return false;
}
Calendar that = (Calendar) obj;
return isEquivalentTo(that) &&
getTimeInMillis() == that.getTime().getTime();
}
COM: <s> compares this calendar to the specified object </s>
|
funcom_train/34041717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addColors(String s) {
StringTokenizer st = new StringTokenizer(s, " ");
while (st.hasMoreTokens()) {
String name = st.nextToken();
if (!st.hasMoreTokens())
break;
String col = st.nextToken();
Colors.addColor(name, col);
// System.out.println(name+" "+col);
}
}
COM: <s> adds color definition to the colors utility class of multivalent to </s>
|
funcom_train/50804022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showInformationOnSelectedPlanet() {
JEditorPane label = new JEditorPane("text/html","<html>"+
mapPanel.getPPanel().getPlanet().getLongDescription(client, client.getData())
+"</html>");
label.setEditable(false);
label.setCaretPosition(0);
label.setPreferredSize(new Dimension(500,400));
JOptionPane.showMessageDialog(
client.getMainFrame(),
new JScrollPane(label),
"Information for "+mapPanel.getPPanel().getPlanet().getName(),
JOptionPane.INFORMATION_MESSAGE);
}
COM: <s> displays a message box with details on the current selected planet </s>
|
funcom_train/2585754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFindDomainBounds() {
XYDataset dataset = createXYDataset1();
Range r = DatasetUtilities.findDomainBounds(dataset);
assertEquals(1.0, r.getLowerBound(), EPSILON);
assertEquals(3.0, r.getUpperBound(), EPSILON);
}
COM: <s> some tests for the find domain bounds method </s>
|
funcom_train/27722858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getOwnerRoleName(Element doElement) {
if (!checkElementName(doElement, "do")) {
System.err.println("Expecting a do element for Role Name");
System.exit(-1);
}
String roleName = "";
roleName = doElement.getAttributeValue("component-role");
//handle a missing roleName
if (roleName == null || roleName.length() == 0) {
roleName = handleMissingRoleName(doElement);
}
previousRoleName = roleName;
return roleName;
}
COM: <s> returns the role name of where the do element happens </s>
|
funcom_train/46456582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAll(Object obj, double xmin, double xmax, double ymin, double ymax) {
double[][][] val = (double[][][]) obj;
copyComplexData(val);
if(griddata.isCellData()) {
griddata.setCellScale(xmin, xmax, ymin, ymax);
} else {
griddata.setScale(xmin, xmax, ymin, ymax);
}
update();
}
COM: <s> sets the values and the scale </s>
|
funcom_train/18241231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToArray() {
byte [] bytes = {1, 2, 3, 4, 5, 6, 7, 8};
short [] shorts = this.shortify(bytes);
ShortFromByteList shortlist = new ShortFromByteList(bytes);
short [] actual = shortlist.toArray();
assertTrue(this.compare(shorts, actual));
}
COM: <s> a simple test of the code to array code method on </s>
|
funcom_train/50530195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createDocument(XsltVersion xsltVersion, Resource path, boolean mutable) throws SAXException, IOException, TransformerException {
modTime = path.lastModified();
if (mutable) {
doc = Xml.parseMutable(path);
} else {
//TODO: avoid exception by providing an appropriate method signature
if(xsltVersion==null) throw new IllegalArgumentException("XsltVersion is required!");
doc = Xml.parse(xsltVersion, path);
}
}
COM: <s> create the internal document </s>
|
funcom_train/6485036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override
public void addSubComponent(String name, IComponent component) throws DuplicatedComponentNameException {
BeanServiceProviderProxy provider = getServiceProviderProxy(component, true);
beanContextSupport.add(provider);
beanContextSupport.addBeanContextServicesListener(provider);
super.addSubComponent(name, component);
}
COM: <s> adds a sub component to this context </s>
|
funcom_train/1058336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WhiteboardDiagram getAdditionalWhiteboard() {
URI wbURI = getNewWBURI(this.iProject);
createAdditionalWBResource(wbURI);
// add resource to the resource set
Resource whiteBoardResource = getResourceSet().getResource(wbURI, true);
additionalWBResources.add(whiteBoardResource);
WhiteboardDiagram whiteBoard = (WhiteboardDiagram) whiteBoardResource.getContents()
.get(0);
additionalWBDiagrams.add(whiteBoard);
return whiteBoard;
}
COM: <s> will create a new whiteboard </s>
|
funcom_train/20621697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFocusConceptCbo (DTSConcept concept) {
if (concept == null) {
return;
}
getFocusConceptCbo().removeItem (concept);
getFocusConceptCbo().addItem (concept);
getFocusConceptCbo().setSelectedItem (concept);
// updating combobox will trigger handleFocusConceptCboItemStateChanged()
}
COM: <s> only sets the combo box </s>
|
funcom_train/7966110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
word.delete(0, word.length());
markersStack.clear();
skipLine = false;
operatorMarker = null;
lookahead = false;
lookAheadBuffer.delete(0,lookAheadBuffer.length());
escape = false;
wordTokenHandler = DEFUALT_WORD_TOKEN_HANDLER;
encloseInParagraphs = false;
}
COM: <s> cleans the converter internal state </s>
|
funcom_train/35221248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JXImagePanel getImagePanel() {
if (imagePanel == null) {
imagePanel = new JXImagePanel();
imagePanel.setEnabled(true);
//imagePanel.setStyle(JXImagePanel.Style.SCALED);
imagePanel.setBounds(new Rectangle(0, -1, 585, 326));
imagePanel.setImage(Toolkit.getDefaultToolkit().getImage("D:/Fotos/Buzios/DSC09598.JPG"));
}
return imagePanel;
}
COM: <s> this method initializes image panel </s>
|
funcom_train/50297461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSigned(int parameter) throws SQLException {
switch (getXsqlvar(parameter).sqltype & ~1) {
case ISCConstants.SQL_SHORT:
case ISCConstants.SQL_LONG:
case ISCConstants.SQL_FLOAT:
case ISCConstants.SQL_DOUBLE:
case ISCConstants.SQL_D_FLOAT:
case ISCConstants.SQL_INT64:
return true;
default:
return false;
}
}
COM: <s> retrieves whether values for the designated parameter can be signed numbers </s>
|
funcom_train/50153720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildModel(StrutsApplicationModel model) throws Exception {
if (this.fileName == null)
{
throw new IllegalStateException("Can't build model with no file name and no input stream.");
}
buildModel(model, new java.io.FileInputStream(this.fileName));
}
COM: <s> method build model </s>
|
funcom_train/15722980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void postIterationCleanup(String size) {
for (String file : config.getOutputs(size)) {
if (file.equals("$stdout") || file.equals("$stderr")) {
} else {
if (!config.isKept(size, file))
deleteFile(new File(scratch, file));
}
}
}
COM: <s> perform post iteration cleanup </s>
|
funcom_train/17006462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent(Graphics g) {
g.setColor(Color.BLACK);
Dimension p = getSize();
g.fillRect(0 , 0 , p.width, p.height);
Font text = new Font("Arial", Font.BOLD, 15);
g.setFont(text);
g.setColor(Color.YELLOW);
g.drawString(counts, 20, 25);
}
COM: <s> refreshes the panel </s>
|
funcom_train/6271031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteOccurrence(String oid, String tid) {
XTMOccurrence oc = new XTMOccurrence(oid,id,tid,true,commander);
System.out.println("Deleting occurrence "+oid+" "+id+" "+tid+" "+oc);
oc.deleteSelf();
}
COM: <s> does this delete any body files </s>
|
funcom_train/36906600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void PrintPerson () throws com.intersys.objects.CacheException {
com.intersys.cache.Dataholder[] args = new com.intersys.cache.Dataholder[0];
com.intersys.cache.Dataholder res=mInternal.runInstanceMethod("PrintPerson",args,com.intersys.objects.Database.RET_NONE);
return;
}
COM: <s> p runs method print person in cache </s>
|
funcom_train/4541553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void clear(int count, int margin) {
if (margin < 64) {
margin = 64;
}
int maxlookup = hashIndex.newNodePointer;
int accessBase = getAccessCountCeiling(count, margin);
for (int lookup = 0; lookup < maxlookup; lookup++) {
Object o = objectKeyTable[lookup];
if (o != null && accessTable[lookup] < accessBase) {
removeObject(o);
}
}
accessMin = accessBase;
}
COM: <s> clear approximately count elements from the map starting with </s>
|
funcom_train/25060350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeProject(File projectsDir, ProjectType jbProject) throws IOException, JAXBException {
File projectFile = FileUtil.createNewFile(projectsDir.getAbsolutePath() + FileUtil.FILE_SEPARATOR + jbProject.getSymbol().replace(" ", "") + ".xml");
writeJaxbObject(jbProject, projectFile);
}
COM: <s> this method writes out an individual project the project directory thats passed in </s>
|
funcom_train/3157341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFigure(Figure figure) {
if (figure != null) {
if (figure.getAttribute("roi") != null) {
addROIFigure(figure);
} else {
if (_figures == null) {
_figures = new LinkedList();
}
if (!_figures.contains(figure)) {
getImageDisplay().addDrawable(figure);
_figures.add(figure);
}
}
}
}
COM: <s> adds a new figure to the drawing </s>
|
funcom_train/14222210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readTag() throws IOException {
if (isAtEnd()) {
lastTag = 0;
return 0;
}
lastTag = readRawVarint32();
if (lastTag == 0) {
// If we actually read zero, that's not a valid tag.
throw InvalidProtocolBufferException.invalidTag();
}
return lastTag;
}
COM: <s> attempt to read a field tag returning zero if we have reached eof </s>
|
funcom_train/37739859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAndSplitOtherwise() throws Exception {
// Uses XPDL imported by testLoop
ProcessMgr mgr = defDir.processMgr("SystemTest", "andOtherwiseTest");
WfProcess proc = mgr.createProcess(requester);
proc.start();
// Wait for completion
assertTrue(stateReached(proc, "closed.completed"));
ProcessData data = proc.processContext();
assertTrue(((Boolean)data.get("Success")).equals(Boolean.TRUE));
assertTrue(((Boolean)data.get("Error")).equals(Boolean.FALSE));
procDir.removeProcess(proc);
defDir.removeProcessDefinition("SystemTest", "andOtherwiseTest");
}
COM: <s> test correct handling of otherwise case within an and split </s>
|
funcom_train/10182950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ObjectRecord createNewObject(Object parameters) {
Object ob = null;
try {
ob = factory.createObject(parameters);
} catch (Exception ex) {
throw new RuntimeException("Could not create connection");
}
if (ob != null) { // if factory can create object
ObjectRecord rec = new ObjectRecord(ob);
synchronized (objects) {
objects.put(ob, rec);
}
return rec;
} else {
throw new RuntimeException("could not create new object!");
}
}
COM: <s> creates a new object </s>
|
funcom_train/2970111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String crunchPhone(String phoneAC, String phonePre, String phoneSuff) {
StringBuffer sb = new StringBuffer();
sb.append("(");
sb.append(phoneAC);
sb.append(") ");
sb.append(phonePre);
sb.append("-");
sb.append(phoneSuff);
return sb.toString();
}
COM: <s> monges the three elements of a phone into a single string </s>
|
funcom_train/17905901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void revert() {
List<DatabaseColumn> newColumns = new ArrayList<DatabaseColumn>();
for (DatabaseColumn i : columns) {
DatabaseTableColumn column = (DatabaseTableColumn)i;
if (!column.isNewColumn()) {
column.revert();
} else {
newColumns.add(column);
}
}
for (DatabaseColumn column : newColumns) {
columns.remove(column);
}
newColumns.clear();
modifiedSQLText = null;
}
COM: <s> reverts any changes made to this table and associated elements </s>
|
funcom_train/10358733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object registerBundle(Bundle bundle) {
URL url = bundle.getResource("/META-INF/mailcap");
if (url != null) {
log(LogService.LOG_DEBUG, "found mailcap at " + url);
mailCaps.put(bundle.getBundleId(), url);
rebuildCommandMap();
}
// the url marks our interest in additional activity for this
// bundle.
return url;
}
COM: <s> perform the check for an existing mailcap file when </s>
|
funcom_train/48082324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Chat createChat(String userJID, String thread, MessageListener listener) {
if (thread == null) {
thread = nextID();
}
Chat chat = (Chat) threadChats.get(thread);
if (chat != null) {
throw new IllegalArgumentException("ThreadID is already used");
}
chat = createChat(userJID, thread, true);
chat.addMessageListener(listener);
return chat;
}
COM: <s> creates a new chat using the specified thread id then returns it </s>
|
funcom_train/44994427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSubTerms(List terms) {
int subTermsNum = 0;
if (terms == null) {
return;
}
subTermsNum = terms.size();
for (int i = 0; i < subTermsNum; i++) {
addSubTerm((IndexTerm) terms.get(i));
}
}
COM: <s> add all the sub terms in the list </s>
|
funcom_train/3772228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getProperties() {
Vector properties = new Vector();
Enumeration enum = revision.enumerateProperties();
while (enum.hasMoreElements()) {
NodeProperty np = (NodeProperty)enum.nextElement();
properties.addElement(new PropertyBean(nat, st, np));
}
return properties;
}
COM: <s> returns the list of properties of the revision </s>
|
funcom_train/12214504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tagMessage(Message msg) {
long number = 0;
synchronized (this) {
number = _tag_count++;
}
msg.getEnvelope().setSlotValue(Service.FIPAOS_MSG_ID_SLOT,
new Long(number));
DIAGNOSTICS.println("Msg id " + number + " assigned to: "
+ msg.getACL(), this);
}
COM: <s> tag the given message so fifo order of stack can be maintained </s>
|
funcom_train/15909579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent editCell(JTable table, int x, int y) {
Point loc = SwingUtilities.convertPoint(layered, x, y, table);
int col = table.columnAtPoint(loc);
int row = table.rowAtPoint(loc);
if (col>-1 && row>-1) {
table.editCellAt(row, col);
if (table.getEditorComponent() instanceof JComponent)
return (JComponent)table.getEditorComponent();
else
return null;
} else
return table;
}
COM: <s> programmaticaly edits a cell in a jtable and returns the editor component </s>
|
funcom_train/29017918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deselect (int index) {
checkWidget ();
int selection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
if (index != selection) return;
OS.SendMessage (handle, OS.CB_SETCURSEL, -1, 0);
sendEvent (SWT.Modify);
// widget could be disposed at this point
}
COM: <s> deselects the item at the given zero relative index in the receivers </s>
|
funcom_train/32307093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPackage() {
if (isPrimitive() || isArray()) return null;
String fullname = getName();
int lastdot = fullname.lastIndexOf('.');
if (lastdot<0) return ""; // no package.
else return fullname.substring(0, lastdot);
}
COM: <s> returns the package name of this code hclass code </s>
|
funcom_train/24216785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(String setup, boolean isAtomic) {
super.init(setup);
lastMove = null;
playing = true;
enabled = true;
whitePlaying = true;
deathMatch = false;
gameOver = false;
hasMoves = true;
kingInRange = false;
whiteKingDead = false;
blackKingDead = false;
squareActive = false;
atomic = isAtomic;
foreseer = !atomic;
jokerPiece = null;
lastMove = null;
checkPlayer();
}
COM: <s> load and start a given setup in this playable board </s>
|
funcom_train/3410528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueIsAdjusting(boolean b) {
boolean oldValue;
synchronized (this) {
oldValue = isAdjusting;
isAdjusting = b;
}
if ((oldValue != b) && (accessibleContext != null)) {
accessibleContext.firePropertyChange(
AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
((oldValue) ? AccessibleState.BUSY : null),
((b) ? AccessibleState.BUSY : null));
}
}
COM: <s> sets the code value is adjusting code property </s>
|
funcom_train/13847154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean completelines(int linecount) {
int oldlines = lines;
int newlines = lines + linecount;
int leveldiff = (newlines / 10) - (oldlines / 10);
// compute the score gained by the lines completion
int linescore = 0;
for (int i = 0; i < linecount ; i++) {
linescore += BASE_SCORE_DELETE_LINE * i;
}
score += linescore;
lines += linecount;
level += leveldiff;
return (leveldiff > 0);
}
COM: <s> increments the cont of lines completed </s>
|
funcom_train/18200646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAdminRight(String userName, boolean value) {
for (JCheckBox check : containterAdmin) {
if (check.getActionCommand().replaceFirst("ADMIN_", "").equals(userName)) {
check.setSelected(value);
return;
} else {
continue;
}
}
}
COM: <s> set the admin right of a specific user to a new value </s>
|
funcom_train/41740401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Field buildField(FieldProxy fp) {
DataBaseModelField field = new DataBaseModelField(fp.field());
if (field.getType() == String.class) {
AnnotationProxy len = fp.annotation(Length.class);
if (len != null) {
Length length = (Length) len.getAnnotation();
field.setLength(length.value());
} else {
field.setLength(DEFAULT_LENGTH);
}
}
AnnotationProxy ann = fp.annotation(Index.class);
if (ann != null) {
field.setIndex(true);
Index index = (Index) ann.getAnnotation();
field.setSequential(index.sequential());
} else {
field.setIndex(false);
field.setSequential(false);
}
return field;
}
COM: <s> build the field model according to annotaion configuration </s>
|
funcom_train/18851857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show(int currentValue, int finalValue) {
if (currentValue>=finalValue)
showBar = false;
else {
percent = Math.min((currentValue+1)/(double)finalValue, 1.0);
showBar = true;
System.out.println("percent="+percent+" showBar="+showBar);
}
repaint();
}
COM: <s> updates the progress bar where the length of the bar is set to </s>
|
funcom_train/10472007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map parseArguments(String[] args) throws FatalToolException {
HashMap result = new HashMap();
int pointer = 0;
while (pointer < args.length) {
String key = args[pointer];
if (isCorrectParameter(key)) {
pointer++;
if (args.length > pointer) {
result.put(key, parseComplexPath(args[pointer]));
pointer++;
}
else {
throw new FatalToolException("Missing parameter for key:" + key);
}
}
else {
throw new FatalToolException("Wrong parameter:" + args[pointer]);
}
}
return result;
}
COM: <s> parses arguments which was passed to the plugin </s>
|
funcom_train/5677847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initWords ()
{ S=new SpellCheck("/rene/spell/"+Language+".words");
if (!S.isValid())
{ Warning w=new Warning(F,
SpellErrorDialog.name("spell.error","Could not find the words!"),
Global.name("warning"),true);
w.center(F);
w.setVisible(true);
return;
}
try
{ Properties p=System.getProperties();
PrivateFile=Global.getParameter("spell."+Language+".privatefile",
p.getProperty("user.home")+
p.getProperty("file.separator")+"private."+Language);
S.loadPrivate(PrivateFile);
}
catch (Exception e) {}
setCharacters();
}
COM: <s> read the words from the word list and create a spell check </s>
|
funcom_train/10951490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadGlobalResults(PackageConfig.Builder packageContext, Element packageElement) {
NodeList globalResultList = packageElement.getElementsByTagName("global-results");
if (globalResultList.getLength() > 0) {
Element globalResultElement = (Element) globalResultList.item(0);
Map<String, ResultConfig> results = buildResults(globalResultElement, packageContext);
packageContext.addGlobalResultConfigs(results);
}
}
COM: <s> load all of the global results for this package from the xml element </s>
|
funcom_train/30009231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveAllAuthors() {
System.out.println("removeAllAuthors");
Document instance = new Document();
int expResult = 0;
int result = instance.removeAllAuthors();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of remove all authors method of class papyrus </s>
|
funcom_train/44865461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MeasurementTool getTool(MeasurementToolRef toolRef) {
if (tools == null)
tools = new HashMap<MeasurementToolRef, MeasurementTool>();
MeasurementTool tool = tools.get(toolRef);
if (tool != null)
return tool;
tool = MeasurementToolRegistry.sharedInstance().getMeasurementTool(toolRef);
if (tool != null)
tools.put(toolRef, tool);
return tool;
}
COM: <s> returns a cached instance of the measurement tool referenced by the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.