__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/5863595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component newInstance(Page page, Component parent) {
Object impl = evalImpl(page, parent);
ComponentsCtrl.setCurrentInfo(this);
final Component comp;
try {
comp = impl instanceof Class ?
_compdef.newInstance((Class)impl):
impl instanceof Component ? (Component)impl:
_compdef.newInstance(page, (String)impl);
} catch (Exception ex) {
throw UiException.Aide.wrap(ex);
} finally {
ComponentsCtrl.setCurrentInfo((ComponentInfo)null);
}
if (comp instanceof DynamicTag)
((DynamicTag)comp).setTag(_tag);
return comp;
}
COM: <s> creates an component based on this info never null </s>
|
funcom_train/50869768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void storeStringList(String section, String key, List list) {
Iterator it = list.iterator();
int index = 1;
while (it.hasNext()) {
String cur = (String) it.next();
properties.setProperty(section + "-" + key + "-" + index, cur);
index++;
}
}
COM: <s> stores a list of strings </s>
|
funcom_train/48764861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List visitList(List l, NodeVisitor v) {
if (l == null) {
return null;
}
List result = l;
List vl = new ArrayList(l.size());
for (Iterator i = l.iterator(); i.hasNext(); ) {
Node n = (Node) i.next();
Node m = visitChild(n, v);
if (n != m) {
result = vl;
}
vl.add(m);
}
return result;
}
COM: <s> visit all the elements of a list </s>
|
funcom_train/8357770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel getPnlAttributeHistogram() {
if (pnlAttributeHistogram == null) {
pnlAttributeHistogram = new JPanel();
pnlAttributeHistogram.setLayout(new BorderLayout());
pnlAttributeHistogram.setBorder(BorderFactory.createTitledBorder(null, "Histogram", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
}
return pnlAttributeHistogram;
}
COM: <s> this method initializes pnl attribute histogram </s>
|
funcom_train/8512275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean inBounds(float valor, float minValue, float maxValue) {
boolean pass = false;
try {
if (valor >= minValue && valor <= maxValue ) {
pass = true;
}
} catch (Exception ex) {
pass = false;
ex.printStackTrace();
}
return pass;
}
COM: <s> returns if a value is between the two given values </s>
|
funcom_train/12812585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUnit () {
double f = factor;
/* Transform the value as a part of Unit */
if (Double.isNaN(value)) return;
if ((mksa&_log) != 0) {
if ((mksa&_mag) != 0) value *= -2.5;
factor *= AstroMath.dexp(value);
value = 0;
}
else {
factor *= value;
value = 1.;
}
// Transform also the symbol
if (f != factor) {
if (symbol == null) symbol = edf(factor);
else symbol = edf(factor) + toExpr(symbol);
}
}
COM: <s> convert the current number unit into a unit </s>
|
funcom_train/46842050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBindings(Bindings bindings, int scope){
if (scope == GLOBAL_SCOPE){
this.globalBindings = bindings;
} else if (scope == ENGINE_SCOPE){
if (bindings instanceof PnutsBindings){
this.engineBindings = (PnutsBindings)bindings;
} else if (bindings != null){
this.engineBindings = new PnutsBindings(bindings);
}
} else {
throw new IllegalArgumentException("Illegal scope value.");
}
if (bindings != null){
bindingsPackage.setBindings(bindings, scope);
context.setCurrentPackage(bindingsPackage);
}
}
COM: <s> associates a bindings instance with a particular scope in </s>
|
funcom_train/38829988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void calcNodeInfos(Graphics g, Tree<? extends Symbol> tree){
this.nodeInfos = new ArrayList<NodeInfo>();
if (tree != null) calcNodeInfos(g ,tree, null, 0, this.nodeInfos,new Point(0,0), 0);
}
COM: <s> calculates position text and annotations for all nodes in the given tree </s>
|
funcom_train/3746803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void merge() throws IOException {
JarOutputStream target = null;
JarFile source = null;
target = new JarOutputStream(new FileOutputStream(targetFilePath));
for (int i = 0; i < sourceFilePaths.length; ++i) {
source = new JarFile(sourceFilePaths[i]);
addJarFile(source, target);
source.close();
}
target.close();
}
COM: <s> merges a set of jar files into one target jar file </s>
|
funcom_train/31658557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent getContainerChooserLayout() {
JButton importButton = createButton(expandListOfContainers);
JButton removeButton = createButton(removeContainerFromList);
JPanel hbox = new JPanel();
hbox.setLayout(new BorderLayout());
hbox.add(containerBox, BorderLayout.CENTER);
Box buttonBox = Box.createHorizontalBox();
buttonBox.add(importButton);
buttonBox.add(removeButton);
hbox.add(buttonBox, BorderLayout.EAST);
hbox.setBorder(BorderFactory.createTitledBorder("Select File:"));
return hbox;
}
COM: <s> gets the container chooser layout </s>
|
funcom_train/42642980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addObjectPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IRelation_object_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IRelation_object_feature", "_UI_IRelation_type"),
DigitalHPSPackage.Literals.IRELATION__OBJECT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the object feature </s>
|
funcom_train/46775307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValues() throws IOException, ClassNotFoundException {
noHeader = noHeaderS.equalsIgnoreCase("true");
outputMin = outputMinS.equalsIgnoreCase("true");
outputMax = outputMaxS.equalsIgnoreCase("true");
outputAverage = outputAverageS.equalsIgnoreCase("true");
outputTotal = outputTotalS.equalsIgnoreCase("true");
if (tiersS != null) {
tiers = Util.parseIntegers(tiersS.split(","));
}
database = Database.openDatabase(arguments.get(0));
}
COM: <s> sets all the values of the required fields from the options specified </s>
|
funcom_train/13491879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Clause apply( Replacement r ) {
TmpClause c = new TmpClause();
c.positiveLiterals = new Vector(positiveLiterals.size());
c.negativeLiterals = new Vector(negativeLiterals.size());
for( Iterator it = positiveLiterals.iterator(); it.hasNext(); ) {
c.positiveLiterals.add(((Fact) it.next()).apply(r));
}
for( Iterator it = negativeLiterals.iterator(); it.hasNext(); ) {
c.negativeLiterals.add(((Fact) it.next()).apply(r));
}
return c;
}
COM: <s> apply a substitutions </s>
|
funcom_train/3652801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void read(ClassInput classInput) throws IOException {
int poolSize = classInput.readShort();
constants.add(null); // First slot (0) is always unused.
for (int i = 1; i < poolSize; i++) {
byte tag = classInput.readByte();
i += readConstant(classInput, tag);
}
}
COM: <s> reads the constant pool into memory </s>
|
funcom_train/34536171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Fact createFact (AcctSchema as,ConnectionProvider conn,Connection con,VariablesSecureApp vars) throws ServletException{
// Purchase Order
if (DocumentType.equals(AcctServer.DOCTYPE_POrder))
updateProductInfo(as.getC_AcctSchema_ID(), conn, con);
// create Fact Header
Fact fact = new Fact(this, as, Fact.POST_Actual);
return fact;
} // createFact
COM: <s> create facts the accounting logic for </s>
|
funcom_train/14163063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParameterValue(String pName) {
String value = fParamStorage.getParameterValue(pName);
/*
* -- I don't remember why we're stripping off the path
* information from the param data. I guess I'll have to
* see who screams loudest. -DT
*
if ("file".equals(pName)) {
File f = new File(value);
value = f.getName();
}
*/
return value;
}
COM: <s> special case if its a file we want to strip off the directory </s>
|
funcom_train/47920513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveHeaderWindow(Rectangle screenBounds) {
// Move the window.
if (this.windowDirectionDown) {
PCPPauseGUI.this.header
.setBounds(screenBounds.x,
PCPPauseGUI.this.header.getY() + this.STEP,
screenBounds.width,
PCPPauseGUI.this.header.getHeight());
} else {
PCPPauseGUI.this.header
.setBounds(screenBounds.x,
PCPPauseGUI.this.header.getY() - this.STEP,
screenBounds.width,
PCPPauseGUI.this.header.getHeight());
}
}
COM: <s> move the header window a step </s>
|
funcom_train/40658997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disable(){
while(actuators.elements().hasMoreElements()){
((Actuator) (actuators.elements().nextElement())).stopActuator();
}
while(sensors.elements().hasMoreElements()){
((Sensor) (sensors.elements().nextElement())).stopSensor();
}
System.out.println("DISABLED: "+this);
}
COM: <s> safety shutoff for all actuators in a mechanism </s>
|
funcom_train/16981071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearQueryPipes() {
// Remove our query ID from our list
if (myQueryID != null) {
activeQuerySet.remove(myQueryID);
}
for (int j = 0; j < querySender.length; j++) {
if (querySender[j] != null) {
querySender[j].terminate();
querySender[j] = null;
}
}
}
COM: <s> clear all previously open pipe </s>
|
funcom_train/3423652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIndex(String qName) {
for (int i = 0; i < fLength; i++) {
Attribute attribute = fAttributes[i];
if (attribute.name.rawname != null &&
attribute.name.rawname.equals(qName)) {
return i;
}
}
return -1;
} // getIndex(String):int
COM: <s> look up the index of an attribute by xml 1 </s>
|
funcom_train/29390089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void print_debug(Document d) {
Document d2 = getDocumentBuilder().newDocument();
d2.appendChild(d2.importNode(d.getDocumentElement(), true));
DOMSource ds = new DOMSource(d2);
StreamResult sr = new StreamResult(System.out);
try {
Transformer trans = transFactory.newTransformer();
trans.transform(ds, sr);
} catch (TransformerException e) {
e.printStackTrace();
}
System.out.println();
System.out.println();
}
COM: <s> print a document to system </s>
|
funcom_train/8376390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void approve(){
_pending = false;
//set all NodeSubscriptions to approved.
Collection<Map<String, NodeSubscription>> subMaps = _subscriptions.values();
for(Map<String, NodeSubscription> subMap : subMaps){
Collection<NodeSubscription> subs = subMap.values();
for(NodeSubscription sub : subs){
sub.approve();
}
}
System.out.println("Node creation is approved, pending: "+_pending);
}
COM: <s> node is approved can be subscribed without further approve </s>
|
funcom_train/3363042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultButton(JButton defaultButton) {
JButton oldDefault = this.defaultButton;
if (oldDefault != defaultButton) {
this.defaultButton = defaultButton;
if (oldDefault != null) {
oldDefault.repaint();
}
if (defaultButton != null) {
defaultButton.repaint();
}
}
firePropertyChange("defaultButton", oldDefault, defaultButton);
}
COM: <s> sets the code default button code property </s>
|
funcom_train/48982808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void performValidateAdd() {
if (topic == null) {
addActionError(getText("topic.input.validation.required"));
}
// verifies if the title is empty
if (!StringUtils.hasText(topic.getTitle())) {
addActionError(getText("topic.input.validation.title"));
}
}
COM: <s> perform a validation in the add method </s>
|
funcom_train/10666064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean compareAttrValues(Attribute attr1, Attribute attr2) {
if (attr1 == null || attr2 == null || (attr1.size() != attr2.size())) {
return false;
}
for (int i = 0; i < attr1.size(); i++) {
try {
return attr2.contains(attr1.get(i));
} catch (NamingException e) {
return false;
}
}
return true;
}
COM: <s> compares values of two attribute objects </s>
|
funcom_train/2292363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CmsObject getCloneCms() throws CmsException {
if (m_cloneCms == null) {
m_cloneCms = OpenCms.initCmsObject(getCms());
m_cloneCms.getRequestContext().setRequestTime(CmsResource.DATE_RELEASED_EXPIRED_IGNORE);
}
return m_cloneCms;
}
COM: <s> returns a cloned cms instance that prevents the time range resource filter check </s>
|
funcom_train/50310806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void centerFrame() {
if (frame != null) {
Window win = (Window)frame;
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
Dimension splash = win.getSize();
screen.width -= splash.width;
screen.height -= splash.height;
screen.width /= 2;
screen.height /= 2;
win.setLocation(screen.width, screen.height);
}
}
COM: <s> calculates and centers the splash page on teh screen </s>
|
funcom_train/40498639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Destination getDestination(DestinationInfo info) throws NamingException,IOException{
Destination destination = destinations.get(info);
if(destination != null){
return destination;
}
Context ctx = getInitialContextForServerURL(info.getServerUrl());
destination = (Destination) ctx.lookup(info.getDestinationName());
destinations.put(info, destination);
log.info("adding new destination to store");
if(! destinationInfoCollection.contains(info)){
addInfoToStore(info);
}
return destination;
}
COM: <s> returns existing destination or creates it </s>
|
funcom_train/31651985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList interpret( InterpreterContext c ){
super.context = c;
ArrayList deList = new ArrayList( ); //returns list of data elements
ArrayList deStringList = dataElementStringList( segment );
Iterator iterator = deStringList.iterator( );
while ( iterator.hasNext( ) ){
String de = ( String ) iterator.next( );
DataElement elmt = getDataElement( de );
deList.add( elmt );
}
return deList;
}
COM: <s> return a array list of data elements </s>
|
funcom_train/34257918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isUsingCommunityRole(CommunityRole aRole) {
return (this.getPrimarySprintTeamRole() != null &&
this.getPrimarySprintTeamRole().getOid().equals(aRole.getOid())) ||
(this.getPrimaryStakeholderRole() != null &&
this.getPrimaryStakeholderRole().getOid().equals(aRole.getOid()));
}
COM: <s> has it as a primary role </s>
|
funcom_train/4194726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void call(String target_url)
{ ua.hangup();
ua.printLog("UAC: CALLING "+target_url);
if (!ua.user_profile.audio && !ua.user_profile.video) ua.printLog("ONLY SIGNALING, NO MEDIA");
ua.call(target_url);
}
COM: <s> makes a new call </s>
|
funcom_train/12103482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calculateTransformation() {
Matrix4 parentTopTransformation_os2ws = parentBranch.getOs2tsTransformation().multiply(new Matrix4(new Point3D(0, parentBranch.getLength()*0.9f, 0), true));
transformation_os2ts = parentTopTransformation_os2ws.multiply(yawMatrix.multiply(rollMatrix));
}
COM: <s> calculates object space to tree space transformation </s>
|
funcom_train/7867055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractTableRow getTableRow(int aRowIndex) {
if ((iVisibleTableRows.size() != getNumberOfVisibleRows()) || (iNumberOfVisibleRowsChanged == true)) {
createVisibleTableRows();
}
return (AbstractTableRow) iVisibleTableRows.get(aRowIndex);
}
COM: <s> returns the corresponding tablerow </s>
|
funcom_train/51584891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void extractActionData(IAction action) {
notNull(action);
fromActionAccelerator(action.getAccelerator());
fromActionDefinition(action.getActionDefinitionId());
// retarget action?
if (action instanceof RetargetAction) {
final RetargetAction a = (RetargetAction) action;
if (a.getActionHandler() != null) {
extractActionData(a.getActionHandler());
}
}
fromActionBinding(action);
}
COM: <s> scans action for data to populate action event </s>
|
funcom_train/32778640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void register(OutputType file) {
if (file == null) {
sendWarning("Can not register OutputType! Command ignored.",
"Experiment '" + getName()
+ "' method void register(OutputType file).",
"The parameter given was a null reference.",
"Make sure to only connect valid OutputType at the Experiment.");
return;
}
if (_registryOutputType.contains(file))
return; // file already registered
_registryOutputType.add(file);
}
COM: <s> registers a file output report trace error debug in specific formats </s>
|
funcom_train/4098414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Enumeration mergeParams(Enumeration params1, Enumeration params2) {
Vector temp = new Vector();
while (params1.hasMoreElements()) {
temp.add(params1.nextElement());
}
while (params2.hasMoreElements()) {
temp.add(params2.nextElement());
}
return temp.elements();
}
COM: <s> merges 2 enumeration of parameters as one </s>
|
funcom_train/44850161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean save(ConfigurationItem inConfiguration) {
configHelper = new ConfigurationHelper(inConfiguration);
boolean outShowSuccess = inConfiguration.saveChanges();
switch (configHelper.getConfigurationTask()) {
case DB:
handleDBAccess(configHelper);
return false;
case INDEX:
showNotification(Activator.getMessages().getMessage("admin.config.language.feedback"), Notification.TYPE_HUMANIZED_MESSAGE); //$NON-NLS-1$
sendEvent(RefreshIndexTask.class);
return false;
}
return outShowSuccess;
}
COM: <s> callback method to save the changed configuration settings </s>
|
funcom_train/32144471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveButtonsState() {
Map<String, Object> buttonsMap = new HashMap<String, Object>();
WizardComponentList<WizardButton> buttons = getCurrentPanelButtons();
for (WizardButton button : buttons) {
buttonsMap.put(button.getId(), button.saveState());
}
panelButtonStates.put(currentPanel.getId(), buttonsMap);
}
COM: <s> saves the state of all buttons in the current panel </s>
|
funcom_train/3365113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean mousePressedImpl(MouseEvent me) {
component = (JComponent)me.getSource();
if (mapDragOperationFromModifiers(me, component.getTransferHandler())
!= TransferHandler.NONE) {
motionThreshold = DragSource.getDragThreshold();
dndArmedEvent = me;
return true;
}
clearState();
return false;
}
COM: <s> returns whether or not the event is potentially part of a drag sequence </s>
|
funcom_train/21633449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CalculationResult calculateError() {
if (this.busy) {
return new CalculationResult(false, false);
}
try {
this.busy = true;
final CalculationResult result = new CalculationResult(true, true);
this.kernelCalc.calculate(0, (int)this.calc.getTrainingData().getRecordCount());
result.setError(this.kernelCalc.getError());
return result;
} finally {
this.busy = false;
}
}
COM: <s> calculate the error for the neural network using the training set </s>
|
funcom_train/4306525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawLine(double x1, double y1, double x2, double y2) {
drawLineFixedPoint(
CoreMath.toFixed(x1),
CoreMath.toFixed(y1),
CoreMath.toFixed(x2),
CoreMath.toFixed(y2));
}
COM: <s> draws a line using the current color </s>
|
funcom_train/22471223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Song shallowCopy() {
Band bandCopy = new Band();
bandCopy.setName(getBand().getName());
Song songCopy = new Song();
songCopy.setBand(bandCopy);
songCopy.setId(getId());
if (_keywordbag != null) {
songCopy.setKeywordbag(_keywordbag.shallowCopy());
}
return songCopy;
}
COM: <s> creates a shallow clone of this song </s>
|
funcom_train/43221288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getGraph() {
NodeList nl = getElement().getChildNodes();
Vector ans = new Vector(nl.getLength());
for (int i = 0; i < nl.getLength(); i++) {
GraphElement ge = GraphElement.forElement((Element) nl.item(i));
if (ge != null)
ans.add(ge);
}
return ans;
}
COM: <s> returns a vector of graph elements if any to be used for drawing </s>
|
funcom_train/44338996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleNotification(Notification notification, Object handback) {
// do not block the notification thread
runQueue.start(); // make sure the queue is running
runQueue.execute(new Runnable() {
public void run() {
try {
undeploy();
deploy();
} catch(Exception e) {
System.err.println("Could not redeploy "+instance.getObjectName());
}
}
});
}
COM: <s> upon receiving a notification redeploys the mbean </s>
|
funcom_train/5340248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void callback(final String url) {
if ( enabled && ExternalControl.isInitialized() ) {
Runnable runner = new Runnable() {
public void run() {
try {
ExternalControl.handleMagnetRequest(url);
} catch(Throwable t) {
// Make sure we catch any errors.
GUIMediator.showInternalError(t);
}
}
};
SwingUtilities.invokeLater(runner);
} else {
this.url = url;
}
}
COM: <s> called by the native code </s>
|
funcom_train/47724830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String parseString() throws IOException {
short length = parseShort();
byte[] bytes = new byte[length];
m_input.readFully(bytes);
return new String(bytes, "UTF-8");
//return new String(bytes, UTF8_CHARSET);
} // end parseString()
COM: <s> parses a string 16 bit length 8 length bit character data </s>
|
funcom_train/35847259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleSettingsTabSave() {
// savePosition(prpTodo, TabToDo.class);
// savePosition(prpProperties, TabProps.class);
// savePosition(prpDocumentation, TabDocumentation.class);
// savePosition(prpStyle, TabStyle.class);
// savePosition(prpSource, TabSrc.class);
// savePosition(prpConstraints, TabConstraints.class);
// savePosition(prpTaggedValues, TabTaggedValues.class);
}
COM: <s> when the ok or apply button is pressed </s>
|
funcom_train/12562537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MIDletProxy findMIDletProxy(int suiteId, String classname) {
synchronized (midletProxies) {
for (int i = midletProxies.size() - 1; i >= 0; i--) {
MIDletProxy current = (MIDletProxy)midletProxies.elementAt(i);
if (current.getSuiteId() == suiteId &&
current.getClassName().equals(classname)) {
return current;
}
}
}
return null;
}
COM: <s> find the midlet proxy that has matching suite id and classname </s>
|
funcom_train/33368135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStudent(int studentID) throws SQLException {
dbm.exec
("delete from StudentHandins where handinID = '" + getID() + "'");
dbm.exec
("insert into StudentHandins (studentID, handinID) " +
"values ('" + studentID + "', '" + getID() + "')");
}
COM: <s> sets the id of the student that is responsible for this handin </s>
|
funcom_train/6261084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetNonEmptyFreeCollection2EmptyClass() {
listenerClsEmpty.colCopy = new ArrayList( clsEmpty.getSetRole() );
clsEmpty.getSetRole().addAll( nonEmptyFreeCol );
assert( compare2Collections( listenerClsEmpty.colCopy, clsEmpty.getSetRole() ) );
assertCorrectCollection( listenerClsEmpty.colCopy, clsEmpty, "getListRole" );
}
COM: <s> tests undo redo operations setting collection of participants to participant2 </s>
|
funcom_train/38727983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void userLoginFailEvent(String userName) {
Integer retryCounter = loginRetryCounter.get(userName);
if (retryCounter == null) {
retryCounter = new Integer(0);
}
retryCounter = new Integer(retryCounter.intValue() + 1);
loginRetryCounter.put(userName, retryCounter);
if (retryCounter.intValue() >= MAX_LOGIN_RETRIES) {
disabledUsers.put(userName, new Long(System.currentTimeMillis()
+ 1000 * 60 * USER_DISABLED_MINS));
}
}
COM: <s> this should be called when user supplied bad password </s>
|
funcom_train/8900464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeStats getAttributeStats(int attIndex) {
if (attributeStats == null || attributeStats[attIndex] == null) {
attributeStats = new AttributeStats[numAttributes];
Arrays.fill(attributeHasChanged, true);
}
attributeStats[attIndex] = new AttributeStats(this, attributes[attIndex]);
attributeHasChanged[attIndex] = false;
return attributeStats[attIndex];
}
COM: <s> calculates summary statistics on the values that appear in each </s>
|
funcom_train/40712909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertNodeCopy() {
PageNode node = new PageNode(curNode);
PageNode parent = (PageNode)curNode.getParent();
if(parent == null) {
Toolkit.getDefaultToolkit().beep();
return;
}
model.insertNodeInto(node, parent,
model.getIndexOfChild(parent, curNode) + 1);
scrollPathToVisible(new TreePath(node.getPath()));
Main.frame.gotoPage(node, true);
}
COM: <s> inserts a copy of the selected page immediately after the selected page </s>
|
funcom_train/10602240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setHistory(Request request) {
Session session = request.getCocoonSession(true);
Stack history = (Stack) session.getAttribute(HISTORY);
if (history == null) {
history = new Stack(10);
session.setAttribute(HISTORY, history);
}
String url = request.getRequestURI();
String context = request.getContextPath();
if (context == null) {
context = "";
}
url = url.substring(context.length());
history.push(url);
}
COM: <s> adds the current url to the history </s>
|
funcom_train/24117693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedObjects(List list) {
deselectAll();
if (list != null) {
int size = getModel().getSize();
Iterator it = list.iterator();
while (it.hasNext()) {
Object obj = it.next();
for (int i = 0; i < size; i++) {
if (obj.equals(getModel().getElementAt(i))) {
checkState.addSelectionInterval(i, i);
i = size;
}
}
}
}
}
COM: <s> select a list of objects after deselecting all items </s>
|
funcom_train/46490253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isRelvantType(ITypeBinding typeBinding) {
return !typeBinding.isAnnotation()
&& !typeBinding.isAnonymous()
&& !typeBinding.isEnum()
&& !typeBinding.isGenericType()
&& !typeBinding.isNullType()
&& !typeBinding.isParameterizedType()
&& !typeBinding.isPrimitive()
&& !typeBinding.isRawType()
&& !typeBinding.isSynthetic()
&& !typeBinding.isTypeVariable()
&& !typeBinding.isWildcardType();
}
COM: <s> only existing and named types are relevant </s>
|
funcom_train/40423909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logout() throws AuthenticationFailedException{
String username = getCurrentUser().getUsername();
try {
m_userHandler.logout(username);
logger.info("Logout request of user: "+ username+ " Succeeded");
}
catch (AuthenticationFailedException e){
logger.error("Logout request failed: "+ e.getMessage());
throw e;
}
}
COM: <s> perform logout operation of current user </s>
|
funcom_train/18489517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStringValue() {
if (value == null) {
return null;
}
if (value instanceof File) { // get more or less platform independent form
return value.toString().replace('\\', '/');
} else if (value instanceof Double) {
return FormatUtility.toString(getDoubleValue());
}
return value.toString();
}
COM: <s> get parameter value as code string code </s>
|
funcom_train/47270085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void simulate(ProgramStatement statement) throws ProcessingException {
float floatValue = 0;
try
{
floatValue = SystemIO.readFloat(this.getNumber());
}
catch (NumberFormatException e)
{
throw new ProcessingException(statement,
"invalid float input (syscall "+this.getNumber()+")",
Exceptions.SYSCALL_EXCEPTION);
}
Coprocessor1.updateRegister(0, Float.floatToRawIntBits(floatValue));
}
COM: <s> performs syscall function to read the bits of input float into f0 </s>
|
funcom_train/32790228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AssociationEndCallExp createAssociationEndCall(OclExpression src, String name) throws WellFormednessException{
AssociationEndCallExp result = factory.createAssociationEndCallExp();
AssociationEnd ae = typeEvl.getType(src).lookupAssociationEnd(name);
result.setReferredAssociationEnd(ae);
result.setSource(src);
typeEvl.getType(result);
return result;
}
COM: <s> creates an instance of association end call exp </s>
|
funcom_train/25765722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeTagsByName(Node node, String name) {
if (name.equalsIgnoreCase(node.getNodeName())) {
removeElement(node);
} else {
// see http://blogger.ziesemer.com/2007/02/java-iterating-over-xml-dom-nodes.html
for (Node childNode = node.getFirstChild(); childNode != null;) {
Node nextChild = childNode.getNextSibling();
removeTagsByName(childNode, name);
childNode = nextChild;
}
}
}
COM: <s> remove recursively all tags with the given name </s>
|
funcom_train/14180566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawReserveFieldBackground(Graphics2D bgbrush2D) {
RoundRectangle2D.Double rectangle;
rectangle = new RoundRectangle2D.Double(0, 0, width, height, 30, 30);
bgbrush2D.setPaint(gp);
bgbrush2D.fill(rectangle);
bgbrush2D.setColor(Color.black);
bgbrush2D.setStroke(new BasicStroke());
bgbrush2D.setFont(new Font("algerian", Font.BOLD, 160));
bgbrush2D.setColor(new Color(90, 74, 40));
bgbrush2D.drawString("R", 50,
300);
}
COM: <s> draws the background of the reserve field </s>
|
funcom_train/33639692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsCycle() {
//initialize visited counter
m_nvisited = 0;
//create the traversal that uses the topological iterator
GraphTraversal traversal = new BasicGraphTraversal(
m_graph, this, m_iterator
);
traversal.init();
traversal.traverse();
//if all nodes visited then no cycle
if (m_graph.getNodes().size() == m_nvisited) return(false);
return(true);
}
COM: <s> performs the iteration to determine if a cycle exits in the graph </s>
|
funcom_train/15452305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void listOfYears(HttpServletRequest request) {
Set listOfYears = new LinkedHashSet();
Calendar calendar = new GregorianCalendar();
int currentYear = calendar.get(Calendar.YEAR);
for (int i=0;i<3;i++) {
Year year = new Year();
year.setDescription(currentYear - i+"");
year.setCodeYear(currentYear - i);
listOfYears.add(year);
}
request.setAttribute(WebConstraints.YEAR_LIST_KEY, listOfYears);
}
COM: <s> list the last 3 years to populate the year combobox </s>
|
funcom_train/42652318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Criteria removePrefixFromPropertyNames(final String prefix) {
return applyOperationOnPropertyNames(new Transformer<String,String>() {
public String transform(String pName) {
if(! pName.startsWith(prefix)) {
throw new RuntimeException("Property name does not start with prefix '" + prefix + "': " + pName);
}
return pName.substring(prefix.length());
}
});
}
COM: <s> removes the given prefix from all the names of properties mentioned </s>
|
funcom_train/3119088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void add(final int index, final Control child) {
final PageRegion oldRegion = child.getPageRegion(getDeviceType());
if (oldRegion != null) {
oldRegion.remove(child);
}
prepareLayoutVoiceControls();
controls.add(index, child);
child.setPageRegion(getDeviceType(), this);
fireElementAdded(index, child);
layoutVoiceControls();
}
COM: <s> adds the specified control to this page region at the specified position </s>
|
funcom_train/1440652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClearLogs() {
System.out.println("clearLogs");
Server server = new Server();
context.addServer(server);
LogData data1 = new LogData();
LogData data2 = new LogData();
context.getServerDataContainer(server).addLogData(data1);
context.getServerDataContainer(server).addLogData(data2);
assertEquals(2, ServerDataProvider.getServerLogs(server).size());
ServerDataProvider.clearLogs(server);
assertTrue(ServerDataProvider.getServerLogs(server).isEmpty());
}
COM: <s> test of clear logs method of class server data provider </s>
|
funcom_train/37448469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteInteractionRow(String ac) {
// Create a dummy row data for comparision.
InteractionRowData dummy = new InteractionRowData(ac);
// Compare with the existing rows.
if (myInteractions.contains(dummy)) {
int pos = myInteractions.indexOf(dummy);
myInteractions.remove(pos);
return true;
}
return false;
}
COM: <s> deletes the row matching the given ac </s>
|
funcom_train/49073505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void transcodeFillShapePainter(FillShapePainter painter) {
try {
Field paintFld = FillShapePainter.class.getDeclaredField("paint");
paintFld.setAccessible(true);
Paint paint = (Paint) paintFld.get(painter);
if (paint == null)
return;
transcodePaint(paint);
} catch (Exception exc) {
exc.printStackTrace();
}
Shape shape = painter.getShape();
// offset(offset);
// printWriter.println("FillShapePainter");
transcodeShape(shape);
printWriter.println("g.setPaint(paint);");
printWriter.println("g.fill(shape);");
}
COM: <s> transcodes the specified fill shape painter </s>
|
funcom_train/12081577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getExpenditure() {
if (expenditure == null) {//GEN-END:|132-getter|0|132-preInit
// write pre-init user code here
expenditure = new TextField("Expenditure", "", 32, TextField.DECIMAL);//GEN-LINE:|132-getter|1|132-postInit
// write post-init user code here
}//GEN-BEGIN:|132-getter|2|
return expenditure;
}
COM: <s> returns an initiliazed instance of expenditure component </s>
|
funcom_train/4363633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFakeAttribute(Object object, String name) {
if (fakeAttributes == null) {
return false;
}
List<String> result = fakeAttributes.get(object.getClass());
if (result == null) {
result = fakeAttributes.get(Object.class);
}
if (result == null) {
return false;
} else {
return result.contains(name);
}
}
COM: <s> determine if an attribute is a fake attribute </s>
|
funcom_train/13583883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double kurtosis() {
double mu = mean();
double devsum = 0;
double wsum = 0;
int size = values.size();
for(int i = 0; i < size; i++) {
double dev = values.get(i) - mu;
devsum += Math.pow(dev, 4.0d) * weights.get(i);
wsum += weights.get(i);
}
double mu4 = devsum/wsum;
double s4 = Math.pow(variance(), 4.0/2.0);
return mu4/s4;
}
COM: <s> returns the weighted kurtosis not excess kurtosis of all samples </s>
|
funcom_train/39384550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String read (int iLen) {
int iChr = 0;
String sRet = "";
try {
while (iLen > 0 && (iChr = this.in.read()) != -1) {
sRet += (char) iChr;
iLen--;
}
} catch (IOException e) {
}
return sRet;
}
COM: <s> read a string of given length from the socket </s>
|
funcom_train/30309124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public M1User getUser(String orgName, String userNickName) {
try {
String query = "from M1UserImpl u where u.webUserId = :userNickName and u.organization.nickName = :orgName";
M1User user = (M1User) em.createQuery(query).setParameter(
"orgName", orgName).setParameter("userNickName",
userNickName).getSingleResult();
DataInitializer.initUserPhones(user);
return user;
} catch (NoResultException e) {
return null;
}
}
COM: <s> get user from db </s>
|
funcom_train/50796150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IAction action) {
try {
// System.out.println(action);
String url = XPEFrame.getDefaultUrlString();
String xpath = "//";
xpeframe = XPEFrame.displayFrame(url, xpath);
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> the action has been activated </s>
|
funcom_train/49655182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTeams2projects() {
for (Entry<Team, Project> entry : this.teams2projects.entrySet()) {
TeamProject project = ProjectManager.getInstance().getTeamProject(entry.getValue().getName());
this.teamProjects.put(entry.getKey(), project);
}
}
COM: <s> sets the teams and projects map </s>
|
funcom_train/15740628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshUIElements(final String[] commandIDs) {
ICommandService commandService = (ICommandService) PlatformUI
.getWorkbench().getActiveWorkbenchWindow()
.getService(ICommandService.class);
if (commandService == null)
return;
for (String commandID : commandIDs)
commandService.refreshElements(commandID, null);
}
COM: <s> refreshes all ui elements that display the given </s>
|
funcom_train/13479790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperties(String prefix, String name, Properties properties) {
Enumeration e = properties.propertyNames();
while(e.hasMoreElements()) {
String key = (String)e.nextElement();
String value = properties.getProperty(key);
String property = prefix + "." + name + "." + key;
configProp.setProperty(property, value);
}
}
COM: <s> sets the value of some properties to those passed </s>
|
funcom_train/31100280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void store(String role, String key, Object value) {
activeConfiguration = (Map)configuration.get(role);
if (activeConfiguration != null) {
activeConfiguration.put(key, value);
} else {
MessageHandler.errorln("Unknown role >" + role
+ "< for new configuration entry. \n"
+ "Putting configuration with key:" + key
+ " into standard configuration.");
}
}
COM: <s> stores configuration entry into configuration map according to the role </s>
|
funcom_train/19147476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createFieldEditors() {
//Initalisierung der Default-Werte erzwingen
super.createFieldEditors();
Composite composite = getFieldEditorParent();
addField(
new BooleanFieldEditor(
PerlSpellCheckerPreferences.IGNORECOMPOUNDS,
"Ignore &Compounds (Words containing '->' or '::')",
composite));
addField(
new BooleanFieldEditor(
PerlSpellCheckerPreferences.CHECKPOD,
"Check &POD",
composite));
addField(
new BooleanFieldEditor(
PerlSpellCheckerPreferences.CHECKCOMMENTS,
"Check C&omments",
composite));
addField(
new BooleanFieldEditor(
PerlSpellCheckerPreferences.CHECKSTRINGLITERALS,
"Check String &Literals",
composite));
}
COM: <s> wir f gen java spezifische optionen zu den feldeditoren hinzu </s>
|
funcom_train/21487630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SplashScreen getFrmSplash() {
if (frmSplash == null) {
// write pre-init user code here
frmSplash = new SplashScreen(getDisplay());
frmSplash.setTitle("splashScreen");
frmSplash.setCommandListener(this);
frmSplash.setImage(getImage1());
frmSplash.setText("Link Quality Mobile Application");
// write post-init user code here
}
return frmSplash;
}
COM: <s> returns an initiliazed instance of frm splash component </s>
|
funcom_train/12842867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*protected String getInsertString(Shell host) {
if (fItem == null)
return ""; //$NON-NLS-1$
String insertString = null;
if (fItem.getVariables().length > 0) {
insertString = VariableItemHelper.getInsertString(host, fItem);
}
else {
insertString = StringUtils.replace(fItem.getContentString(), "${cursor}", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
return insertString;
}*/
COM: <s> gets the string to be inserted by interacting further with the user if </s>
|
funcom_train/36063897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEmailSMTPPort(int port) throws InputValidationException, SQLException, NoDatabaseConnectionException{
if( port < 0 || port > 65535){
throw new InputValidationException("The port provided is invalid", "SMTP Port", String.valueOf(port));
}
appParams.setParameter("Administration.EmailSMTPPort", String.valueOf(port));
}
COM: <s> set the port to use when sending email via smtp </s>
|
funcom_train/18321891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object _execute(Action action, StateMachineContext context) throws SystemException {
String coName = action.getObject().getName();
ControlledObject controlledObject = controlledObjectsMap.getControlledObject(coName);
return
ClassHelper.invoke(
controlledObject,
action.getActionName(),
new Class[] { StateMachineContext.class },
new Object[] { context });
}
COM: <s> this executes given action </s>
|
funcom_train/1069028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Command getCommand() {
List editparts = getSelectedObjects();
CompoundCommand cc = new CompoundCommand();
Debug.debug(this,"Action::getCommand()"+editparts.size(), 21);
for (int i=0; i < editparts.size(); i++) {
EditPart part = (EditPart) editparts.get(i);
cc.add(part.getCommand(request));
}
displayCompoundCommand(cc);
return cc;
}
COM: <s> returns the command that will delete the selected elements </s>
|
funcom_train/1877501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String normalize(String data) {
if (data != null) {
int endOfFirstLine = data.indexOf("?>") + 2;
String result = data;
if (endOfFirstLine > 0) {
result = data.substring(endOfFirstLine);
}
return super.normalize(result);
}
else{
LOG.warn("Data to normalize was null");
}
return null;
}
COM: <s> make the xml version encoding normal </s>
|
funcom_train/43827624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLengthHighPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CPNString_lengthHigh_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CPNString_lengthHigh_feature", "_UI_CPNString_type"),
CpntypesPackage.Literals.CPN_STRING__LENGTH_HIGH,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the length high feature </s>
|
funcom_train/41053833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object invoke(final Object object,final Method method,final Object[] args,final boolean invokeRaw) throws Throwable{
return invoke(new MethodInvocation(){
public Method getMethod() {
return method;
}
public Object[] getArguments() {
return args;
}
public AccessibleObject getStaticPart() {
return method;
}
public Object getThis() {
return object;
}
public Object proceed() throws Throwable {
return getMethod().invoke(getThis(), getArguments());
}
},invokeRaw);
}
COM: <s> method interceptor invoke raw </s>
|
funcom_train/17850902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSpinner getConnectionTimoutSpinner() {
if (connectionTimoutSpinner == null) {
connectionTimoutSpinner = new JSpinner();
SpinnerNumberModel spinnerModel = new SpinnerNumberModel();
spinnerModel.setMinimum(10);
spinnerModel.setMaximum(120000);
connectionTimoutSpinner.setModel(spinnerModel);
}
return connectionTimoutSpinner;
}
COM: <s> this method initializes connection timout spinner </s>
|
funcom_train/3096071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void mutate() {
Object state = this.clone();
// synchronized (this.history) {
// addLast. Bad List interface...
this.history.push(state);
// }
// synchronized (this.redo) {
while (this.redo.size() > 0)
this.redo.pop();
// }
}
COM: <s> part of the ihistory implementation </s>
|
funcom_train/3087235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ComponentStyle createOuterStyle(NewsTicker ticker) {
ComponentStyle style = EchoPointComponentPeer.forComponent(this, true);
style.addElementType(ElementNames.DIV);
UIHelper.setPositionableStyle(ticker, style);
UIHelper.setScrollableStyle(ticker, style);
UIHelper.setClippableStyle(ticker, style);
UIHelper.setBorderableStyle(ticker, style);
UIHelper.setInsetsStyle(ticker.getOutsets(),style,"margin");
return style;
}
COM: <s> creates the style for the outer div tag </s>
|
funcom_train/37619955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int newInterface() {
S.assume(S.a&& !hasBeenInitialized);
int iid = nInterfaces();
Interface iface = new Interface(this, iid);
interfaces.add(iface);
if (debugK0) {
System.err.println("newInterface in #" + ID + " -> " + iid);
}
return iid;
}
COM: <s> add a new interface to the constraint and returns its id </s>
|
funcom_train/13479472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canBuildSettlement(Ship ship) {
Player player = controller.whoami();
if ((player == null) || (ship == null))
return false;
if (!player.equals(ship.getOwner()))
return false;
if (!star.getCoordinate().equals(ship.getCoordinate()))
return false;
if (ship instanceof OutpostShip) {
if (!hasAccess(ACCESS_BUILD_OUTPOST))
return false;
}
else if (ship instanceof ColonyShip) {
if (!hasAccess(ACCESS_BUILD_COLONY))
return false;
}
else {
return false;
}
return true;
}
COM: <s> checks if the ship can be used to build a settlement here </s>
|
funcom_train/50545353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearSession() {
try {
SessionData.setCurrentSession(new SessionData());
getComms().sessionData.set("AdminSessionData", getSessionData());
} catch (KeywordValueException ex) {
writeDebugMsg("Problem getting session data from session: ".concat(String
.valueOf(String.valueOf(ex.getMessage()))));
}
}
COM: <s> clears the current users session </s>
|
funcom_train/571308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean isGuiRunning(){
boolean quit = false;
try {
InetAddress addr = InetAddress.getByName( "127.0.0.1" );
Socket socket = new Socket( addr, port );
if( socket != null ){
quit = true;
} else {
quit = false;
}
} catch (UnknownHostException e) {
quit = false;
// e.printStackTrace();
} catch (IOException e) {
quit = false;
// e.printStackTrace();
}
return quit;
}
COM: <s> search socket 9660 to check if a gui is running </s>
|
funcom_train/15957524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getResult1(final String line) {
StringTokenizer st = new StringTokenizer(line);
final int size = st.countTokens();
for (int i = 0; i < size; i++) {
String r = st.nextToken();
if (i == 3)
return Integer.parseInt(r);
}
return 42;
}
COM: <s> returns the result of a round for the second team from the passed </s>
|
funcom_train/7510785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerResetSearchButton(JButton button) {
if (resetSearchButton != null) {
throw new IllegalStateException("'resetSearchButton' button already registered ("
+ searchButton.getText() + ").");
}
if (button == null) {
throw new IllegalStateException("Internal error. Parameter 'button' must be not null.");
}
this.resetSearchButton = button;
button.setActionCommand("resetSearch");
button.setName("resetSearch");
Utils.addCheckedListener(button, this);
}
COM: <s> register reset search button on dialog </s>
|
funcom_train/33948181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected URL adjustURL(URL url) {
if (url.toExternalForm().startsWith("file:/")) {
try {
url = new URL(markupModel.fileURLToRemoteURL(url.toExternalForm(),getMarkupModel().getImageServerURL()));
} // try
catch (Exception ex) { ex.printStackTrace(); }
} // if
return url;
}
COM: <s> adjusts the url as needed </s>
|
funcom_train/18459643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMainTab(String label, Component component) {
int numTabs = mainTabbedPane.getTabCount();
mainTabbedPane.insertTab(label, null, component, label, numTabs);
mainTabbedPane.setTabComponentAt(numTabs, new CloseTab(label,
mainTabbedPane));
mainTabbedPane.setSelectedIndex(numTabs);
}
COM: <s> adds a tab to the main tabs window </s>
|
funcom_train/28171024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPathIterator() {
System.out.println("getPathIterator");
AffineTransform at = null;
BezierPath instance = new BezierPath();
PathIterator expResult = null;
PathIterator result = instance.getPathIterator(at);
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 path iterator method of class org </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.