__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/21821263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void adjustSize() {
Tree tree = viewer.getTree();
int itemHeight = tree.getItemHeight();
int itemCount = tree.getItemCount();
int height = (itemHeight * itemCount) + tree.getHeaderHeight() + 90;
for (int i = 0; i < itemCount; i++) {
TreeItem item = tree.getItem(i);
height += item.getItemCount() * itemHeight;
}
size = new Point(size.x, Math.min(height, 400));
}
COM: <s> calculates the required height for the tree control depending on how many </s>
|
funcom_train/4258043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int checkAuthorization() {
int result = 0;
if (this.user != null) {
if ((this.login != null) && (this.password != null)) {
// Credentials provided
if (this.userName.equals(this.login)
&& this.password.equals(this.user.getPassword())) {
result = 1;
} else {
result = -1;
}
}
}
return result;
}
COM: <s> check the authorization credentials </s>
|
funcom_train/4285215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AllocationModel_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AllocationModel_name_feature", "_UI_AllocationModel_type"),
AllocationPackage.Literals.ALLOCATION_MODEL__NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the name feature </s>
|
funcom_train/1533939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double upperCumulativeProbability(int x) {
double ret;
final int[] domain = getDomain(populationSize, numberOfSuccesses, sampleSize);
if (x < domain[0]) {
ret = 1.0;
} else if (x > domain[1]) {
ret = 0.0;
} else {
ret = innerCumulativeProbability(domain[1], x, -1, populationSize, numberOfSuccesses, sampleSize);
}
return ret;
}
COM: <s> for this distribution x this method returns p x ge x </s>
|
funcom_train/32767042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getCurrentMaxX() {
if (zoomGridLimitsV.size() == 0) {
if (externalGridLimits == null || externalGridLimits.isSetXmax() == false) {
return getInnerMaxX();
} else {
return externalGridLimits.getMaxX();
}
} else {
GridLimits gl = (GridLimits) zoomGridLimitsV.lastElement();
if (gl.isSetXmax() == false) {
return getInnerMaxX();
}
return gl.getMaxX();
}
}
COM: <s> returns the current max x attribute of the function graphs jpanel object </s>
|
funcom_train/13490768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPredicate(Predicate p) {
Predicate oldPredicate = predicate;
predicate = p;
terms = new Term[p.getStructure().length];
types = p.getStructure();
if ((oldPredicate == null)
? p != null
: !(oldPredicate.equals(p))) {
fireClauseSetChangeEvent(new ClauseSetChangeEvent(this,
oldPredicate, p, ClauseSetChangeEvent.KEY_CHANGED));
}
}
COM: <s> set a new predicate </s>
|
funcom_train/42772934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateExpander() {
if (expanderFigure == null) return;
Activation a = getActivation();
expanderFigure.setSelected(!a.isExpanded());
// Rectangle bounds = (Rectangle) getParentFigure().getLayoutManager().getConstraint(getFigure());
//
// if (bounds == null) {
// bounds = getFigure().getBounds();
// }
// if (bounds != null) {
// expanderFigure.getParent().setConstraint(expanderFigure, new Rectangle(
// bounds.x-1,
// bounds.y+2,
// 9,
// 9
// ));
// }
}
COM: <s> updates the expander figure according to match the visual state of this visual </s>
|
funcom_train/50188968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireEndSourceDocument() {
if (hasTraceListeners()) {
// count of registered tracelisteners
int countListener = traceListeners.size();
for (int i = 0; i < countListener; i++) {
TraceListener currentListener =
(TraceListener) traceListeners.elementAt(i);
// call the according method on tracelistener
currentListener.endSourceDocument();
}
}
}
COM: <s> fire at the end of processing close </s>
|
funcom_train/19456787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPascalFormat() {
if (!(is140KbDisk() || is800KbDisk())) return false;
byte[] directory = readBlock(2);
return directory[0] == 0 && directory[1] == 0
&& directory[2] == 6 && directory[3] == 0
&& directory[4] == 0 && directory[5] == 0;
}
COM: <s> test the disk format to see if this is a pascal formatted </s>
|
funcom_train/3303675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String replace(String s, char marker, String replacement) {
if (s == null)
return null;
String retstr = "";
int state = 0;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (state == 1) {
if (c == marker) {
retstr += replacement;
}
else {
retstr += "%" + c;
}
state = 0;
}
else {
if (c == '%')
state = 1;
else
retstr += c;
}
}
return retstr;
}
COM: <s> this method has been introduced a replacement for replace all method from </s>
|
funcom_train/12239300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMySMSProperty(String keyPrefix, String key) {
String fullPropString = null;
if(keyPrefix == null) {fullPropString = PROPERTY_KEY_PREFIX + "." + key;}
else {fullPropString = PROPERTY_KEY_PREFIX + "." + keyPrefix + "." + key;}
return developerProperties.getProperty(fullPropString,
systemProperties.getProperty(fullPropString));
}
COM: <s> get a property for my sms </s>
|
funcom_train/43245170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEmpStatus() {
System.out.println("getEmpStatus");
EmploymentDataDG1Object instance = new EmploymentDataDG1Object();
String expResult = "";
String result = instance.getEmpStatus();
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 emp status method of class org </s>
|
funcom_train/20205624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Cell insertCell(int row, int column) {
if (row <= 0) {
throw new IndexOutOfBoundsException("row must be > 0");
}
if (column <= 0) {
throw new IndexOutOfBoundsException("column must be > 0");
}
ensureCapacity(row, column);
return getRow(row).getCell(column);
}
COM: <s> adds and creates a new cell at the given row and column </s>
|
funcom_train/7388394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand() {
if (okCommand == null) {//GEN-END:|86-getter|0|86-preInit
// write pre-init user code here
okCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|86-getter|1|86-postInit
// write post-init user code here
}//GEN-BEGIN:|86-getter|2|
return okCommand;
}
COM: <s> returns an initiliazed instance of ok command component </s>
|
funcom_train/11515358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOf(Object key) {
key = convertKey(key);
int i = 0;
for (LinkEntry<K, V> entry = header.after; entry != header; entry = entry.after, i++) {
if (isEqualKey(key, entry.key)) {
return i;
}
}
return -1;
}
COM: <s> gets the index of the specified key </s>
|
funcom_train/8089411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Capabilities getCapabilities() {
Capabilities result = new Capabilities(this);
result.enableAll();
/* // class
if (!m_noClass) {
result.enable(Capability.NOMINAL_CLASS);
result.enable(Capability.MISSING_CLASS_VALUES);
} else {
result.enable(Capability.NO_CLASS);
} */
return result;
}
COM: <s> returns the capabilities of this estimator </s>
|
funcom_train/9804248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void msg(String message, int level) {
if (message==null||message.equals(""))
return;
if (level>QUIET && level<=this.level) {
try {
out.write(message);
if (!message.endsWith(NL))
out.write(NL);
out.flush();
} catch (IOException ex) {
System.out.println(ex.getMessage());
}
}
}
COM: <s> present a message on the debug stream </s>
|
funcom_train/12660774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor() {
ObjectResourcesSelector selector = new ObjectResourcesSelector();
assertNotNull("constructor failed", selector);
// verify the default values
assertEquals("incorrect default relationstype",
selector.getRelationtype(), ObjectResourcesSelector.DEFAULT_RELATIONTYPE);
assertEquals("incorrect default source",
selector.getSource(), ObjectResourcesSelector.CONTEXT_SOURCE);
}
COM: <s> test for valid instanciation </s>
|
funcom_train/31185515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getCatalogs() throws SQLException {
ArrayList al = new ArrayList();
if ( ! doConnect() ) return al;
Connection conn = null;
try {
conn=getPool().getConnection();
ResultSet rs = conn.getMetaData().getCatalogs();
while(rs.next()) { al.add( rs.getString(1) ); }
} finally {
getPool().releaseConnection(conn);
}
return(al);
}
COM: <s> this method returns a vector of different databases using jdbcs </s>
|
funcom_train/28722982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initScrollBars() {
ScrollBar horizontal = getHorizontalBar();
if (horizontal != null) {
horizontal.setEnabled(false);
horizontal.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
scrollHorizontally((ScrollBar) event.widget);
}
});
}
ScrollBar vertical = getVerticalBar();
if (vertical != null) {
vertical.setEnabled(false);
vertical.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
scrollVertically((ScrollBar) event.widget);
}
});
}
}
COM: <s> initalize the scrollbar and register listeners </s>
|
funcom_train/50242150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "Id: " + getId() + " - Seconds: " + getSeconds() + " - Status: " +
(getStatus()== DataObject.CONNECTED?"Computer [" + getId() +"] Connected.": "Computer [" + getId() +"] Disconnected." );
}
COM: <s> converts the code data object code into code string code </s>
|
funcom_train/38528129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Collection getOperations(int k, OperationType type) {
Set set = new HashSet();
for (int i = 0; i < operations[k].length; i++) {
if (operations[k][i].getType() == type) {
set.add(operations[k][i]);
}
}
return set;
}
COM: <s> get the operations of the given type that can transition to </s>
|
funcom_train/31659685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFormlets(String[] fconfIds) {
CompoundFormletConfiguration cfc = (CompoundFormletConfiguration) formletConfiguration;
for (int i = 0; i < fconfIds.length; i++) {
if (!cfc.getExtensionIds().contains(fconfIds[i])) {
cfc.addExtensionId(fconfIds[i]);
formletsModel.addElement(fconfIds[i]);
}
}
notifyChanged(EXTENSIONS_CHANGED);
}
COM: <s> adds the formlets </s>
|
funcom_train/16380711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStrokewidthChangeablePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new UnsettablePropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PaintSubTaskDefType_strokewidthChangeable_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PaintSubTaskDefType_strokewidthChangeable_feature", "_UI_PaintSubTaskDefType_type"),
CTEPackage.Literals.PAINT_SUB_TASK_DEF_TYPE__STROKEWIDTH_CHANGEABLE,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the strokewidth changeable feature </s>
|
funcom_train/45770537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Token getOperandToken(String s, String type) {
Token t = null;
Debug.log(Debug.TRACE,"TokenFactory creating operand (" + type + ") Token : " + s);
try {
t = new Token(s, ParseToken.TOKEN_OPERAND, operandLookup.getIDFromString(type), 0);
} catch (UnsupportedFunctionException eFn) {
Debug.log(Debug.ERROR, eFn.getMessage());
}
return t;
}
COM: <s> the factory method for creating operand tokens </s>
|
funcom_train/11697087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createListener(String delegateKey) throws Exception {
if (controller instanceof AggregateAnalysisEngineController) {
// Fetch an InputChannel that handles messages for a given delegate
InputChannel iC = controller.getReplyInputChannel(delegateKey);
// Create a new Listener, new Temp Queue and associate the listener with the Input Channel
iC.createListener(delegateKey, null);
}
}
COM: <s> this method is called during recovery of failed connection </s>
|
funcom_train/29019632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBounds (int x, int y, int width, int height) {
checkWidget ();
int flags = OS.SWP_NOZORDER | OS.SWP_DRAWFRAME | OS.SWP_NOACTIVATE;
setBounds (x, y, Math.max (0, width), Math.max (0, height), flags);
}
COM: <s> sets the receivers size and location to the rectangular </s>
|
funcom_train/20874938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeVariable(V variable) {
if (variable.getAssignment() != null) {
unassigned(0, variable.getAssignment());
}
variable.removeContstraint(this);
iVariables.remove(variable);
if (iAssignedVariables != null && iAssignedVariables.contains(variable))
iAssignedVariables.remove(variable);
}
COM: <s> remove a variable from this constraint </s>
|
funcom_train/26489726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireUserSignupEvent(UserSignupEvent e) {
Iterator iter = userSignupListenerList.iterator();
while ( iter.hasNext() ) {
try {
((UserSignupListener)iter.next()).onUserSignup(e);
}
catch ( Throwable ex ) {
log.println(Log.ERROR, "Failed to dispatch UserSignupEvent!", ex);
}
}
}
COM: <s> fire a user signup event notifies all registered listeners that a new user </s>
|
funcom_train/13782670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAnyPropertyFilled() {
filledPropsForSearch.clear();
boolean result = false;
for(TableProperty prop : propForSearch) {
if (prop.getValue() != null && StringUtils.isNotEmpty(prop.getDisplayValue())){
filledPropsForSearch.add(prop);
result = true;
}
}
return result;
}
COM: <s> returns code true code if any property on ui was filled for search </s>
|
funcom_train/16538443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuBar getJJMenuBar() {
if (jJMenuBar == null) {
jJMenuBar = new JMenuBar();
jJMenuBar.add(getFileMenu());
// jJMenuBar.add(getEditMenu());
jJMenuBar.add(getConfig());
// jJMenuBar.add(getHelpMenu());
}
return jJMenuBar;
}
COM: <s> this method initializes j jmenu bar </s>
|
funcom_train/45043802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent event) {
log.debug("ActionPerformed: " + event.getActionCommand());
/* The same object is used by the main filter every time, therefore these variables needs to be set back to default */
if (event.getSource().equals(MovieManager.getDialog().getFilter())) {
mainFilter = true;
}
execute();
}
COM: <s> invoked when an action occurs </s>
|
funcom_train/37592659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRootSelected() {
assert (EventQueue.isDispatchThread() || Utilities.TEST_MODE);
TreePath[] ps = getSelectionPaths();
if (ps == null) { return false; }
for(TreePath p: ps) {
TreeNode n = (TreeNode) p.getLastPathComponent();
if (n == _model.getRoot()) { return true; }
}
return false;
}
COM: <s> returns true if the root is selected </s>
|
funcom_train/20044980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _disposing() {
log.println("The method 'disposing'");
log.println("gets called when the broadcaster is about to be"+
" disposed.") ;
log.println("All listeners and all other objects which reference "+
"the broadcaster should release the references.");
log.println("So there is nothing to test here");
tRes.tested("disposing()",true);
}
COM: <s> nothing to test </s>
|
funcom_train/21913304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInheritFromParentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ChildSecurityConstraint_inheritFromParent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ChildSecurityConstraint_inheritFromParent_feature", "_UI_ChildSecurityConstraint_type"),
UIMPackage.Literals.CHILD_SECURITY_CONSTRAINT__INHERIT_FROM_PARENT,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the inherit from parent feature </s>
|
funcom_train/40099321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSingleTallestBuildingIndex() {
boolean isSingleTallest = true;
int index = -1;
int height = 0;
for (int i = 0; i < buildings.length; i++) {
int stories = buildings[i].getStories();
if (stories > height) {
height = stories;
isSingleTallest = true;
index = i;
} else if (stories == height) {
isSingleTallest = false;
}
}
return isSingleTallest ? index : -1;
}
COM: <s> gets the index of the single tallest building in the buildings array </s>
|
funcom_train/8311518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object call(Context context, Vector args) throws FunctionCallException {
if ((args.size()) == 1) {
return IdFunction.evaluate(context.getNodeSet(), args.elementAt(0), context.getNavigator());
}
throw new FunctionCallException("id() requires one argument");
}
COM: <s> returns a list of the nodes with the specified ids </s>
|
funcom_train/40853682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem3() {
if (stringItem3 == null) {//GEN-END:|61-getter|0|61-preInit
// write pre-init user code here
stringItem3 = new StringItem("Username:", user.getLogin());//GEN-LINE:|61-getter|1|61-postInit
// write post-init user code here
}//GEN-BEGIN:|61-getter|2|
return stringItem3;
}
COM: <s> returns an initiliazed instance of string item3 component </s>
|
funcom_train/5553353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addASTChild(ASTPair currentAST, AST child) {
if (child != null) {
if (currentAST.root == null) {
// Make new child the current root
currentAST.root = child;
}
else {
if (currentAST.child == null) {
// Add new child to current root
currentAST.root.setFirstChild(child);
}
else {
currentAST.child.setNextSibling(child);
}
}
// Make new child the current child
currentAST.child = child;
currentAST.advanceChildToEnd();
}
}
COM: <s> add a child to the current ast </s>
|
funcom_train/22383942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void setcursor(ZZCell cur, ZZCell c) {
removeFromCursorList(cur);
if (c != null) addToCursorList(cur, c);
if(cur.s("d.cursor-sub") != null) cur.disconnect("d.cursor-sub", 1);
trigger(cur);
}
COM: <s> set the given cursor cell to point to a cell </s>
|
funcom_train/514835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWithoutDefaultStrategy() throws Exception {
ExecutorDecorator lvExecutorDecorator = new ExecutorDecorator(new RmiExecutor());
Method lvMethod = Calculator.class.getMethod("add", new Class[]{int.class, int.class});
Object lvInvocationStrategy = lvExecutorDecorator.createInvocationStrategy(Calculator.class, lvMethod);
assertNull(lvInvocationStrategy);
}
COM: <s> rmi executor has no invocation strategy return value is null </s>
|
funcom_train/7421735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSendActivity(MessageFlow messageFlow, Element element) {
Activity source = messageFlow.getSource();
if ((source instanceof ServiceTask) || (source instanceof SendTask)) {
element.setAttribute("sendActivity", source.getName());
} else {
this.output.addError("The source object of message flow " +
"is not a sending activity.", messageFlow.getId());
}
}
COM: <s> adds a send activity attribute to the given element </s>
|
funcom_train/18029733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOptionalPositionArgument(int position, String key, String defaultValue, String description) {
if ( key==null ) throw new IllegalArgumentException("null key");
addPositionArgument( position, key, description );
values.put(key,defaultValue);
if ( defaultValue==null ) {
if ( false ) System.err.println("breakpoint");
}
}
COM: <s> specify the ith positional argument which may be left unspecified by </s>
|
funcom_train/40449660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public JsonArray deepCopy() {
JsonArray result = new JsonArray();
result.elements.addAll(elements);
for (int i = 0; i < result.elements.size(); i++) {
result.elements.set(i, result.elements.get(i).deepCopy());
}
return result;
}
COM: <s> returns a deep copy of this array </s>
|
funcom_train/51649529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisible (boolean visible) {
if (visible) configure ();
tip.setVisible (visible);
Display display = getDisplay ();
if (runnable != null) display.timerExec (-1, runnable);
runnable = null;
if (autohide && visible) {
runnable = new Runnable () {
public void run () {
if (!isDisposed ()) setVisible (false);
}
};
display.timerExec(DELAY, runnable);
}
}
COM: <s> marks the receiver as visible if the argument is code true code </s>
|
funcom_train/45499944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void publish( String taskName ) {
// this.taskName = taskName;
// this.taskProgressInformation = "";
// this.taskDetailedProgressInformation = "";
// setProgress( 0 );
// publish( new ProcessUpdateMessage( 0, taskName, taskProgressInformation, taskDetailedProgressInformation ) );
// }
COM: <s> this method publishes a new task that is started </s>
|
funcom_train/40414578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MenuBar buildAddMenu() {
MenuBar bar = createMenuBar(true);
WidgetOption[] a = getWidgetOptionList();
for (int i = 0; i < a.length; i++) {
bar.addItem(createAddMenuItem(a[i]));
}
return bar;
}
COM: <s> build a menu to add new widgets to the layout </s>
|
funcom_train/21878342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getArchiveStream(String projectName, String archiveId) throws DepoException {
String archiveCollection = DepoConstants.DAV_ARCHIVE_URI + "/" + projectName;
DAVMgr davMgr = DAVFacility.instance();
logger.debug("getting binary StoredResource " + archiveCollection + "/" + archiveId);
return davMgr.getResourceStream(archiveId,archiveCollection);
}
COM: <s> get a previously archived project as a byte stream in par format </s>
|
funcom_train/16788747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endSetElementValues() throws RQLException {
if (setElementValuesMap == null) {
throw new RQLException(
"You tried to change element values with one request, but you have to use the method #startSetElementValues() first.");
}
// change the page elem values with only one request
setElementValues(setElementValuesMap);
// prepare for next start
setElementValuesMap = null;
}
COM: <s> stops the mode to add elements which values should be changed </s>
|
funcom_train/40166364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNewGame(final String gameId) {
try {
queue.put(new Runnable() {
public void run() {
GameHandler g = GameHandler.create(NetworkController.this, session, gameId);
gameHandlers.put(gameId, g);
}
});
} catch (InterruptedException ex) {
Logger.getLogger(NetworkController.class.getName()).log(Level.SEVERE, null, ex);
}
}
COM: <s> handles a new game being played by creating the relevant game handler </s>
|
funcom_train/33282388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void jsxFunction_setEndAfter(final Node refNode) {
if (refNode == null) {
throw Context.reportRuntimeError("It is illegal to call Range.setEndAfter() with a null node.");
}
endContainer_ = refNode.getParent();
endOffset_ = getPositionInContainer(refNode) + 1;
}
COM: <s> sets the end of the range to be after the node </s>
|
funcom_train/19895298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSubmissionTime(Date submission_time) throws Exception {
//Theoretically submitting a job before 01 jan 2008 is impossible.
//Note: MR Grid has not been tested at speeds of 88 mph or above.
if(submission_time.getTime() > 1199163600)
this.submission_time = submission_time;
else
throw new Exception("submission_timestamp must be a timestamp greater than midnight on 01 jan 2008");
}
COM: <s> sets the date time the job was submitted to the grid </s>
|
funcom_train/45623033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWarningLevelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CscType_warningLevel_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CscType_warningLevel_feature", "_UI_CscType_type"),
MSBPackage.eINSTANCE.getCscType_WarningLevel(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the warning level feature </s>
|
funcom_train/3026806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkout(Runtime factory, String file) throws IOException {
// Create the executable
String[] args = new String[3];
args[0] = exeFile;
args[1] = "CHECKOUT";
args[2] = getFilename(file);
Process proc = factory.exec(args);
try {
proc.waitFor();
} catch (InterruptedException ie) {
}
}
COM: <s> check out the file </s>
|
funcom_train/32753204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void customizeDesktopCommands( final Commander commander ) {
final Action printAction = new AbstractAction( "print-document-name" ) {
public void actionPerformed( final ActionEvent event ) {
System.out.println( "The document name: " + getTitle() );
Logger.getLogger("global").log( Level.INFO, "Printing the document name: " + getTitle() );
}
};
commander.registerAction( printAction );
}
COM: <s> register document specific actions for the desktop menu </s>
|
funcom_train/5442797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int XTMonitorDigits(int handle,boolean enable) throws MethodNotSupportedException, ResourceUnavailableException, InvalidStateException {
try{
dialogicHandler d = (dialogicHandler)m_devices.get(handle + "");
d.monitorDigits(enable);
return 1;
}catch(Exception e){
return -1;
}
}
COM: <s> begin the media methods </s>
|
funcom_train/11792427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File createFileInTempDir(String filePath) throws Exception {
logger.debug("createFileInTempDir started:" + filePath);
String filePathString = tempDir.getPath() + "/" + filePath;
File file = new File(filePathString);
FileHelper.getInstance().createFile(file);
logger.debug("createFileInTempDir finished");
return file;
}
COM: <s> creates a file with the given path in the temporary directory </s>
|
funcom_train/37515484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void plantBodyBytecode( CodeSequence code ) {
// put the args on the stack
for (int i = 0; i < parameters().length; i++) {
code.plantInstruction(new LocalVarInstruction(
parameters()[i].staticType().getLoadOpcode(), i )
);
}
// update the field's value
target.genStore( code );
// return
code.plantInstruction(
new NoArgInstruction( returnType().getReturnOpcode() ) );
}
COM: <s> plants the bytecode for the body of this method </s>
|
funcom_train/29031243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeContact() {
try {
this.socket = new Socket(host, port);
this.out = new PrintWriter(new OutputStreamWriter(this.socket
.getOutputStream(), Charset.forName("UTF-8")), true);
} catch (UnknownHostException e) {
shutdownLogger.info("Host not found. ");
e.printStackTrace();
} catch (IOException e) {
shutdownLogger.info("Input/Output Error: ");
e.printStackTrace();
}
}
COM: <s> contact the server </s>
|
funcom_train/12674830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processLabel(SymTabAST tree) {
String name = tree.findFirstToken(TokenTypes.IDENT).getText();
LabelDef label = new LabelDef( name, symbolTable.getCurrentScope(),
tree );
symbolTable.defineLabel( label );
walkTree((SymTabAST)tree.getFirstChild().getNextSibling(), false);
}
COM: <s> process the given sym tab ast as a label definition </s>
|
funcom_train/51345079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getLastTimestamp() {
if (getEntryCount() == 0)
return 0L;
return ((Entry) rangeIterator(null, null, 1/* capacity */,
IRangeQuery.DEFAULT | IRangeQuery.REVERSE, null/* filter */)
.next().getObject()).timestamp;
}
COM: <s> return the timestamp associated with the last performance counter value </s>
|
funcom_train/3381308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() throws IOException {
if (connected)
return;
plainConnect();
if (cachedResponse != null) {
// using cached response
return;
}
if (!http.isCachedConnection() && http.needsTunneling()) {
doTunneling();
}
((HttpsClient)http).afterConnect();
}
COM: <s> implements the http protocol handlers connect method </s>
|
funcom_train/47928335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void alterCelestiaCounter(char per, int thisMuch) {
if (per == 'c' && celestiaMultiplierOpp > 0 && celestiaMultiplierOpp < 16) {
celestiaMultiplierOpp = celestiaMultiplierOpp + thisMuch;
}
if (per == 'o' && celestiaMultiplierChar > 0 && celestiaMultiplierChar < 16) {
celestiaMultiplierChar = celestiaMultiplierChar + thisMuch;
}
}
COM: <s> alter celestia multipliers used to strengthen weaken celestia attacks </s>
|
funcom_train/29863297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RelationshipComponent getSource() {
if(isRelationshipArtefact()){
String id;
if(getArtefactType()==Type.INVOCATION)
id = getArtefactIdentifier().substring(0,getArtefactIdentifier().lastIndexOf(INVOCATION_SYMBOL));
else
id = getArtefactIdentifier().substring(0,getArtefactIdentifier().lastIndexOf(ASSOCIATION_SYMBOL));
return new RelationshipComponent(id,RelationshipComponent.Type.SOURCE,this,isProvided());
}
return null;
}
COM: <s> get the identifier of the source artefact that the relationship type </s>
|
funcom_train/37517972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ClassInfo createClassInfo(String qName) {
ClassInfo info;
try {
info = ClassPath.getClassInfo(qName, true);
} catch (ClassFileReadException e) {
CTopLevel.getCompiler().reportTrouble(e);
info = null;
}
if (info != null) {
new CBinaryClass(CTopLevel.getFromClassesCompiler(), info);
}
return info;
}
COM: <s> creates and returns a class info object by reading the symbol </s>
|
funcom_train/46571096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Composite createComposite(final Composite parent, final int numColumns) {
Composite composite = new Composite(parent, SWT.NULL);
//GridLayout
GridLayout layout = new GridLayout();
layout.numColumns = numColumns;
composite.setLayout(layout);
//GridData
GridData data = new GridData();
data.verticalAlignment = GridData.FILL;
data.horizontalAlignment = GridData.FILL;
composite.setLayoutData(data);
return composite;
}
COM: <s> creates composite control and sets the default layout data </s>
|
funcom_train/32081295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawPath (Path path) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (path.handle == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
checkGC(DRAW);
//TODO - check offset to draw in the midle of pixel
OS.PathGeometry_FillRule(path.handle, data.fillRule == SWT.FILL_EVEN_ODD ? OS.FillRule_EvenOdd : OS.FillRule_Nonzero);
OS.DrawingContext_DrawGeometry(handle, 0, data.pen, path.handle);
}
COM: <s> draws the path described by the parameter </s>
|
funcom_train/40940934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isShowCards() {
for(PlayerActivityRecord r : playerActivityRecords) {
//If somebody has folded, then there is no need to show cards
if((r.getPlayerAction() != null) && (r.getPlayerAction().getActionType() == ActionType.FOLD))
return false;
}
return isEndOfGame();
}
COM: <s> returns true if players must show cards </s>
|
funcom_train/4512473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractAction getAbstractActionLogin() {
if(abstractActionLogin == null) {
abstractActionLogin = new AbstractAction("Login", null) {
public void actionPerformed(ActionEvent evt) {
System.out.println("Login button pressed");
getAsm().sendMessage(new UserLogin(getJTextFieldUsername().getText().trim()), new ActorAddress("/classManager", "ClassManager"));
}
};
}
return abstractActionLogin;
}
COM: <s> when the login button is clicked </s>
|
funcom_train/50865574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void centerMap(MainDesktopPane desktop) {
List rows = getSelection();
Iterator it = rows.iterator();
if (it.hasNext()) {
Mission mission = (Mission) it.next();
if (mission.getPeopleNumber() > 0)
desktop.centerMapGlobe(((Unit)mission.getPeople().toArray()[0]).getCoordinates());
}
}
COM: <s> center the map on the first selected row </s>
|
funcom_train/10547576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCloseActiveConnection_CP() throws SQLException {
ConnectionPoolDataSource ds =
J2EEDataSource.getConnectionPoolDataSource();
PooledConnection pc = ds.getPooledConnection();
testCloseActiveConnection(pc.getConnection(), true, false);
Connection c = pc.getConnection();
c.setAutoCommit(false);
testCloseActiveConnection(c, false, false);
pc.close();
}
COM: <s> test that connections retrieved from </s>
|
funcom_train/51575453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayList(final Vector worldList) {
if (worldListModel == null) {
worldListModel = new DefaultListModel();
} // empty any existing elements first
worldListModel.removeAllElements();
// Add the elements
if (!worldList.isEmpty()) {
final int len = worldList.size();
for (int i = 0; i
< len; i++) {
worldListModel.addElement((World) worldList.elementAt(i));
}
}
}
COM: <s> update the display with the given list of worlds </s>
|
funcom_train/9916747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInt() throws EOFException, IOException, NumberFormatException {
String s = get();
if (s == null) {
return 0;
}
if (!trim) {
s = s.trim();
}
if (s.length() == 0) {
return 0;
}
return Integer.parseInt(s);
}
COM: <s> read one integer field from the csv file </s>
|
funcom_train/18012726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String GetSelfIP(){
InetAddress ina;
byte[] ipa;
String ip = "";
ina = CmdSocket.getLocalAddress();
ipa = ina.getAddress();
for (int i=0; i< 4; i++) {
ip = ip + (((int)ipa[i])&0xff) + ","; //I know we have 4 commas!
}
return ip;
}
COM: <s> gets the string of the ip address of localhost </s>
|
funcom_train/20646343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayPhaseComplete( String message ) {
assert m_stage == STAGE_PHASESPROGRESS :
"Must be in second stage";
// swallow this error without warning.
if ( m_stage2CurrentPhase >= m_stage2TotalPhases )
return;
if ( m_progress != null ) {
m_stage2Label.setText( Lang.translate( message ) );
m_stage2CurrentPhase += 1;
m_stage2Progress.setValue( m_stage2CurrentPhase );
}
}
COM: <s> tells the progress bar in stage phasesprogress to </s>
|
funcom_train/33281467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int jsxGet_rowIndex() {
final HtmlTableRow row = (HtmlTableRow) getDomNodeOrDie();
final HtmlTable table = row.getEnclosingTable();
if (table == null) { // a not attached document.createElement('TR')
return -1;
}
return table.getRows().indexOf(row);
}
COM: <s> returns the index of the row within the parent table </s>
|
funcom_train/4377626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkForCrashes() {
File crashReportsDir = Helper.getCrashReportsDirectory();
if(crashReportsDir != null ){
int currentReports = crashReportsDir.list().length;
int existingReports = configurationManager.getLogFilesCount();
if(currentReports != existingReports) {
configurationManager.setLogFilesCount(currentReports);
Toast.makeText(this, R.string.crashDetected, Toast.LENGTH_LONG).show();
}
}
}
COM: <s> checks the application directory on the sd card for any crash logs </s>
|
funcom_train/3392189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildClassHeader() {
String key;
if (isInterface) {
key = "doclet.Interface";
} else if (isEnum) {
key = "doclet.Enum";
} else {
key = "doclet.Class";
}
writer.writeHeader(configuration.getText(key) + " " + classDoc.name());
}
COM: <s> build the header of the page </s>
|
funcom_train/13271998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFurnitureViewedFromTop(boolean furnitureViewedFromTop) {
if (this.furnitureViewedFromTop != furnitureViewedFromTop) {
this.furnitureViewedFromTop = furnitureViewedFromTop;
this.propertyChangeSupport.firePropertyChange(Property.FURNITURE_VIEWED_FROM_TOP.name(),
!furnitureViewedFromTop, furnitureViewedFromTop);
}
}
COM: <s> sets how furniture icon should be displayed in plan and notifies </s>
|
funcom_train/2624831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
final StringBuffer result = new StringBuffer();
result.append(super.toString().replaceAll(".*\\.", ""));
result.append('[');
if (handled) {
result.append("handled");
}
result.append(']');
return result.toString();
}
COM: <s> returns a string representation of this object for debugging purposes </s>
|
funcom_train/51538792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDirtyRegion() {
if (CGraphicsQ.DEBUG) {
System.err.println("Layer " + layerID + ":");
System.err.println("\tMarking entire layer dirty");
}
dirtyBounds[X] = dirtyBounds[Y] = dirtyBounds[W] = dirtyBounds[H] = -1;
setDirty();
}
COM: <s> add this layers entire area to be marked for repaint </s>
|
funcom_train/5787957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void die() {
if(null != clientData) {
node.getNodeServer().removeClient(clientData.getStreamid(), this);
logger.debug("stream "+clientData.getStreamid()+" connection to "+this+" shutdown");
}
try {
out.close();
socket.close();
} catch (IOException e) {
logger.warn("Could not shut down serverconnection properly");
}
}
COM: <s> shut down this server connection properly removing the client and closing </s>
|
funcom_train/26485464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String removeWhitespace(String s) {
logger.info("METHOD_ENTRY: removeWhitespace, s=" + s);
StringBuffer sb = new StringBuffer();
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (!Character.isWhitespace(c)) {
sb.append(c);
}
}
logger.info("METHOD_EXIT: removeWhitespace, returning=" + sb);
return sb.toString();
}
COM: <s> removes embedded whitespace from the string parameter </s>
|
funcom_train/37855176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPropertyValue(String propertyName, String propertyValue) {
if (propertyName == null || "".equals(propertyName.trim())) {
return;
}
getConfigFile().setPropertyValue(SVNKIT_GROUP, propertyName, propertyValue, !myIsReadonly);
}
COM: <s> sets the value of a property from the i svnkit i section </s>
|
funcom_train/25505331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IntegerWidget getNumber() {
if (number == null) {
number = new IntegerWidget(BigInteger.ZERO, IntegerWidget.INTEGER_MAX_VALUE);
number.setColumns(2);
number.setToolTipText(LocalizationData.get("checkbookDialog.number.tooltip")); //$NON-NLS-1$
number.addPropertyChangeListener(IntegerWidget.VALUE_PROPERTY, changeListener);
}
return number;
}
COM: <s> this method initializes number </s>
|
funcom_train/29992065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String tempString, String resString) {
double temperature = Double.parseDouble(tempString);
double resistance = Double.parseDouble(resString);
int numDigits = resString.length();
map.put(temperature, new TableEntry(resistance, numDigits));
}
COM: <s> adds a new temperature resistance pair to this table </s>
|
funcom_train/12636896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveURLSetting() {
String temp;
Exception ex;
temp = urlTextBox.getString();
ex = GraphicalInstaller.saveSettings(temp, MIDletSuite.INTERNAL_SUITE_ID);
if (ex != null) {
displayException(Resource.getString
(ResourceConstants.EXCEPTION), ex.toString());
return;
}
defaultInstallListUrl = temp;
displaySuccessMessage(Resource.getString
(ResourceConstants.AMS_MGR_SAVED));
}
COM: <s> save the url setting the user entered in to the url text box </s>
|
funcom_train/7421566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transition getExit() {
if (this.sinkObject.getSuccessor() == null) {
// multiple successors for source object (loop)
List<Transition> transitions = this.sinkObject.getSourceFor();
for (Iterator<Transition> it =
transitions.iterator(); it.hasNext();) {
Transition trans = it.next();
if (!getTransitions().contains(trans)) {
return trans;
}
}
} else {
return this.sinkObject.getTransitionTo(
this.sinkObject.getSuccessor());
}
return null;
}
COM: <s> returns the exit transition of the component </s>
|
funcom_train/4482824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void executeOperation(Object connection, long operationSequence) {
Record recordToInsert = new Record(numberOfObjects + operationSequence);
long idToDelete = spreadId(operationSequence);
Record recordToUpdate = new Record(halfTheObjects + idToDelete);
((TransactionConnection)connection).performTransaction(recordToInsert, recordToUpdate, idToDelete);
}
COM: <s> deletes records from id zero to id half the objects 1 </s>
|
funcom_train/47678930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pnbRelease() {
if (pnbResultSet != null) {
try {
pnbResultSet.close();
} catch (SQLException e) {
//logError("release resultSet", e);
} finally {
pnbResultSet = null;
}
}
if (pnbStmt != null) {
try {
pnbStmt.close();
} catch (SQLException e) {
//logError("release statement", e);
} finally {
pnbStmt = null;
}
}
}
COM: <s> releases private jdbc resources used by page nav bean statement and resultset </s>
|
funcom_train/29314922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Option getRecord(String arg, ObjectHolder<OptionName> ndescHolder) {
for (int i = 0; i < options.size(); i++) {
Option rec = options.get(i);
for (OptionName ndesc : rec.optionNames) {
if (arg.equals(ndesc.name)) {
if (ndescHolder != null) {
ndescHolder.value = ndesc;
}
return rec;
}
}
}
return null;
}
COM: <s> get the corresponding option for a given argument name </s>
|
funcom_train/6336005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFind() throws Exception {
DataInfo[] temp = getLiveRecords(MIN_RECORDS);
for (int i=0; i < temp.length; i++) {
assertNotNull("Record:\n" + temp[i] + "\nnot found", con.find(temp[i].getValues()[0]));
}
//test no record found...
assertNull("Bogus record found", con.find("qpqoiahsdfpq"));
}
COM: <s> pre tests the find method in data </s>
|
funcom_train/10267118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String checkPermissionToAddInstances(String workItemID, String sessionHandle) throws IOException {
return executeGet(_backEndURIStr + "/workItem/" + workItemID +
"?" +
"action=checkAddInstanceEligible" +
"&" +
"sessionHandle=" + sessionHandle);
}
COM: <s> determines whether or not a task will allow a dynamically </s>
|
funcom_train/10008863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveBuddyNotInList() {
String id = "ben@tafe";
try {
buddyList.removeBuddy(id);
fail("Should've thrown an exception");
} catch (org.sink.chat.ConnectionException ex) {
fail("ConnectionException should not occur in testing");
}
}
COM: <s> spec 2 a removes a non existing buddy </s>
|
funcom_train/27948114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void attachXdata( DataSet d ) {
dataset.addElement(d);
d.xaxis = this;
if( dataset.size() == 1 ) {
minimum = d.dxmin;
maximum = d.dxmax;
} else {
if(minimum > d.dxmin)
minimum = d.dxmin;
if(maximum < d.dxmax)
maximum = d.dxmax;
}
}
COM: <s> attach a data set to a horizontal axis </s>
|
funcom_train/16462943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addComponent(PreviewComponent comp, int x, int y) {
int index = getIndex(y);
if (index == -1 || index >= form.getComponents().size()) {
// We are adding to the end.
form.getComponents().add(comp);
} else {
// We are adding to a specified position.
form.getComponents().add(index, comp);
}
refresh();
}
COM: <s> adds the supplied component to the preview finding the right position </s>
|
funcom_train/8347415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Spacer getSpacer() {
if (spacer == null) {//GEN-END:|71-getter|0|71-preInit
// write pre-init user code here
spacer = new Spacer(16, 1);//GEN-LINE:|71-getter|1|71-postInit
// write post-init user code here
}//GEN-BEGIN:|71-getter|2|
return spacer;
}
COM: <s> returns an initiliazed instance of spacer component </s>
|
funcom_train/14123307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void renumMailItems(int row) {
if (row < MailListTable.ROW_FIRST) {
return;
}
MailItem mailItem;
for (int i = row; i < table.getRowCount(); i++) {
mailItem = (MailItem) table.getWidget(i, MailListTable.COL_FROM);
if (mailItem != null) {
mailItem.setRow(i);
}
}
}
COM: <s> renumerates row indexes holded by mail items </s>
|
funcom_train/648356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String pwd() throws IOException {
if (isConnected()) {
String directory = null, replyline;
control.executeCommand("PWD");
replyline = control.replyOfCommand();
try {
directory = replyline.substring(
replyline.indexOf('\"') + 1,
replyline.lastIndexOf('\"'));
} catch (StringIndexOutOfBoundsException e) {
throw new IOException("Ctrl: PWD, Invalid Format!");
}
return directory;
} else
throw new IOException("Ctrl: PWD, No Connection!");
}
COM: <s> print server working directory </s>
|
funcom_train/17592948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Episode getNewEpisode(BDDInferenceRule rule, int opNumber, long timeStamp, boolean newCollection) {
EpisodeCollection c = newCollection ? findEpisodeCollection(rule, opNumber) : null;
if(c == null){
c = new EpisodeCollection(rule, opNumber);
allTrials.add(c);
}
return c.startNewEpisode(timeStamp);
}
COM: <s> starts a new trial collection and returns it </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.