__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/48203239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK && event.isTracking()
&& !event.isCanceled()) {
if (saveDataFromViews()) finish();
return true;
}
return super.onKeyUp(keyCode, event);
}
COM: <s> intercept when the user release the back button call the method for </s>
|
funcom_train/20646269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static class DLG {
BCNode destination;
int d , l ,g ;
DLG(BCNode destination,int d, int l, int g) {
this.d = d; this.l = l; this.g = g;
this.destination = destination;
}
/** return a copy of this DLG. like a clone() but no cast needed **/
public DLG getCopy() {
return new DLG(destination,d,l,g);
}
}
COM: <s> distance level generation br </s>
|
funcom_train/19097320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateEnabled() {
// Is an error status set to the wizard.
boolean errorStatus = false;
if (m_Status != null
&& m_Status.getType() == StatusMessage.Type.error) {
errorStatus = true;
}
super.setEnabled(m_UserEnabled && !errorStatus);
}
COM: <s> update the enabled property of the button </s>
|
funcom_train/11317107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void acceptForEachItem(String nodeName, ItemVisitor iv) {
Map<String, PayloadItem> messages = nodeMessages.get(nodeName);
for (String itemID : messages.keySet()) {
iv.visit(itemID, messages.get(itemID));
}
}
COM: <s> go through each message and call visit of the visitor </s>
|
funcom_train/50535106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte add2(long seqno, Message msg) {
Segment segment=current_segment;
if(segment == null || !segment.contains(seqno)) {
segment=findOrCreateSegment(seqno);
if(segment != null)
current_segment=segment;
}
if(segment == null)
return -1;
return segment.add(seqno, msg);
}
COM: <s> adds a message if not yet received </s>
|
funcom_train/5510908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInstanceListId(String listId) throws BuildException {
if( getProject().getReference( listId ) != null ) {
throw new BuildException("The (instance list) id [" + listId +"] already exists in the project", getLocation());
}
m_instanceList.setId(listId);
}
COM: <s> set the id of the instance list that will contain resolved resources </s>
|
funcom_train/7618327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result timeToValues(int msec, float[] values) {
if (values != null && values.length < mValueCount) {
throw new ArrayStoreException();
}
switch (nativeTimeToValues(native_instance, msec, values)) {
case 0: return Result.NORMAL;
case 1: return Result.FREEZE_START;
default: return Result.FREEZE_END;
}
}
COM: <s> given a millisecond time value msec return the interpolated values and </s>
|
funcom_train/4305105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(Transform transform) {
if (transform == this) {
return;
}
else if (transform == null) {
clear();
}
else {
this.m00 = transform.m00;
this.m01 = transform.m01;
this.m02 = transform.m02;
this.m10 = transform.m10;
this.m11 = transform.m11;
this.m12 = transform.m12;
this.type = transform.type;
}
}
COM: <s> sets this transform to a copy of specified transform </s>
|
funcom_train/132778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addGlyph(GlyphI glyph) {
if (glyph != null) {
getGlyph().addChild(glyph);
// transients should be added both to the root glyph (for pick
// traversal, etc.) and to the transients list (for actual drawing),
// but shouldn't be considered in damage expansion...
if (glyph instanceof TransientGlyph) {
addTransient((TransientGlyph)glyph);
}
else {
expandDamage(glyph);
}
}
}
COM: <s> adds another glyph to the scene </s>
|
funcom_train/16218635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shrink(int h, int v) {
if (h >= 0) {
this.width -= h;
} else {
this.x -= h;
this.width += h;
}
if (v >= 0) {
this.height -= v;
} else {
this.y -= v;
this.height += v;
}
}
COM: <s> shrinks this collision rect by code h code width and code v code </s>
|
funcom_train/46335878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetFields() {
System.out.println("getFields");
PlsqlPackage instance = new PlsqlPackage();
List<OpbField> expResult = new ArrayList<OpbField>();
List<OpbField> result = instance.getFields();
assertEquals(expResult, result);
}
COM: <s> test of get fields method of class plsql package </s>
|
funcom_train/37202668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateRefMap(List response) throws Exception {
Map result = new HashMap();
for (Iterator iterator = response.iterator(); iterator.hasNext();) {
SOAPBodyElement bodyElement = (SOAPBodyElement) iterator.next();
String id = bodyElement.getAttribute("id");
if (id != null) {
result.put("#" + id, bodyElement.getAsDOM());
}
}
referenceMap = result;
}
COM: <s> generates a map of each multiref element mapped to its id </s>
|
funcom_train/29722208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
gridBagConstraints1.gridx = 0;
gridBagConstraints1.gridy = 0;
jPanel = new JPanel();
jPanel.setLayout(new BoxLayout(getJPanel(), BoxLayout.X_AXIS));
jPanel.setPreferredSize(new Dimension(68, 30));
jPanel.add(getCancel(), null);
jPanel.add(getOK(), null);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/48877400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reply() {
// remove the leading "sms://" for displaying the destination address
String address = senderAddress.substring(6);
String statusMessage = "Sending message to " + address + "...";
sendingMessageAlert.setString(statusMessage);
sender.promptAndSend(senderAddress);
}
COM: <s> allow the user to reply to the received message </s>
|
funcom_train/51245699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runAllSql() {
for (int i = 0; i < getTabCount(); i++) {
final Component componentAt = getComponentAt(i);
if (componentAt instanceof SqlTabPanel) {
SqlTabPanel tabPanel = (SqlTabPanel) componentAt;
setSelectedIndex(i);
if(!tabPanel.run(getTitleAt(i))) {
break;
}
}
}
}
COM: <s> runs all the sql statements in each tab </s>
|
funcom_train/43246243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDischargeType() {
System.out.println("getDischargeType");
AdmissionObject instance = new AdmissionObject();
String expResult = "";
String result = instance.getDischargeType();
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 discharge type method of class org </s>
|
funcom_train/8520190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void applyViewTransformation(GL gl) {
gl.glTranslated(cameraPos.get(1), cameraPos.get(2), cameraPos.get(3));
gl.glRotated(rotx_camera, 1., 0., 0.);
gl.glRotated(roty_camera, 0., 1., 0.);
gl.glRotated(rotz_camera, 0., 0., 1.);
}
COM: <s> applies camera translation and rotation to the current open gl matrix </s>
|
funcom_train/3598031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applyResources(NOMCorpus corpus, List resources) throws NOMException {
// Note that the clearData call on the NOM clears resource
// prefs - probably shouldn't!
for (Iterator rit = resources.iterator(); rit.hasNext(); ) {
String res = (String) rit.next();
System.err.println("Apply resource: " + res);
nom.forceResourceLoad(res);
}
}
COM: <s> apply a set of resources to a nom i </s>
|
funcom_train/19959891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveObject(int parameterIndex, Object o)throws ParameterIndexOutOfBoundsException {
if(parameterIndex > variables.length)
throw new ParameterIndexOutOfBoundsException("Parameter index of " +
parameterIndex + " exceeds actual parameter count of " + variables.length);
variables[parameterIndex-1] = new DebugObject(o);
}
COM: <s> tests object o for parameter index which parameter is being set and places </s>
|
funcom_train/51616943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
try {
TestNumPair pair = (TestNumPair)super.clone();
pair.results = (Vector<TestEvent>)results.clone();
return pair;
} catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable
throw new InternalError();
}
}
COM: <s> returns a clone of this test num pair </s>
|
funcom_train/6270548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnName(int column) {
if (columnIdentifiers == null || columnIdentifiers.size() <= column) {
return super.getColumnName(column);
}
Object id = columnIdentifiers.elementAt(column);
if (id == null) {
return super.getColumnName(column);
}
else {
return id.toString();
}
}
COM: <s> returns the column name </s>
|
funcom_train/35099531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EntityManager createEntityManager() {
final EntityManager instance = this.entityManagerFactory.createEntityManager(this.jpaProviderProperties);
if ( canDebug ) {
logger.debug("An instance of EntityManager was re-created , and JPA provider properties :[" + jpaProviderProperties + "] , its flush mode is [" + flushModeType + "]");
}
return instance;
}
COM: <s> creates an instance of entity manager </s>
|
funcom_train/28350554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasResponse( final List<CorrectorSupply> supplies, final List<BpmAgent> bpmAgents ) {
// first determine if each corrector supply has a corresponding resonse map
for ( CorrectorSupply supply : supplies ) {
if ( !_responseMap.containsKey( supply.getID() ) ) return false;
}
// check that every BPM is accounted for each corrector supply
for ( CorrectorSupply supply : supplies ) {
if ( !hasResponse( supply, bpmAgents ) ) return false;
}
return true;
}
COM: <s> determine if we have an entry for each corrector supply detector pair </s>
|
funcom_train/23825107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEdgeLabelRenderer(EdgeLabelRenderer edgeLabelRenderer) {
if(edgeLabelRenderer == null) {
throw new NullPointerException("EdgeLabelRenderer must not be null");
}
Object oldValue = this.edgeLabelRenderer;
this.edgeLabelRenderer = edgeLabelRenderer;
firePropertyChangeEvent(Controller.EDGE_LABEL_RENDERER_PROPERTY, oldValue, this.edgeLabelRenderer);
}
COM: <s> sets the renderer used to generate labels for code edges code </s>
|
funcom_train/17788647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() throws IllegalAccessException {
switch (type) {
case CLASSIC:
int lastComp = compsArray[compsArray.length-1];
requiredCompsArray = new int[lastComp+1];
for (int c = 0; c <= lastComp; c++) requiredCompsArray[c] = c;
break;
case RESTART_PERIODIC:
if (restartIndex <= 0) throw new IllegalAccessException();
requiredCompsArray = calculateRequiredComponentsWithRestartPeriodical();
break;
case RESTART_ARBITRARY:
if (restartIndexes == null) throw new IllegalAccessException();
requiredCompsArray = calculateRequiredComponentsWithRestartFixed();
break;
default:
assert(true);
}
}
COM: <s> performs the calculus of the required components </s>
|
funcom_train/8971487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPosition(float x, float y, float z) {
synchronized(model) {
// revert last position
Matrix.translateM(model, 0, position[0], position[1], position[2]);
// set new position
position[0] = x;
position[1] = y;
position[2] = z;
Matrix.translateM(model, 0, -position[0], -position[1], -position[2]);
}
}
COM: <s> set the absolute position of this camera </s>
|
funcom_train/3329253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFieldCount() {
int count = 0;
if (_atts != null)
count += _atts.size();
if (_elements != null)
count += _elements.size();
if (_textField != null) ++count;
return count;
} //-- getFieldCount
COM: <s> returns the number of field info definitions for this class info </s>
|
funcom_train/3391914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void generateTree(List list, String heading) {
if (list.size() > 0) {
ClassDoc firstClassDoc = (ClassDoc)list.get(0);
printTreeHeading(heading);
generateLevelInfo(!firstClassDoc.isInterface()? firstClassDoc : null,
list,
list == classtree.baseEnums());
}
}
COM: <s> generate the heading for the tree depending upon tree type if its a </s>
|
funcom_train/18149496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUserAsLeft(SelectionExpression userAsLeft) {
// create the association set if it doesn't exist already
if(_userAsLeft == null) _userAsLeft = new AssociationSetImpl<SelectionExpression>();
// add the association to the association set
getUserAsLeft().add(userAsLeft);
// make the inverse link
userAsLeft.setLeftSide(this);
}
COM: <s> adds an association user as left </s>
|
funcom_train/37822829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawLeft(Graphics2D g) {
Paint gp = new GradientPaint(0, 0, NODESTACKVIEW_OWNER_COLOR_RIGHT,
getWidth(), 0, NODESTACKVIEW_OWNER_COLOR_LEFT);
g.setPaint(gp);
int xpoints[] = {getWidth(), 0, getWidth()};
int ypoints[] = {0, getHeight() / 2, getHeight()};
g.fillPolygon(xpoints, ypoints, 3);
}
COM: <s> draws a triangle which points to the left with a gradient </s>
|
funcom_train/51121107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String headersToString() {
Enumeration en = headers.keys();
String headerStr = "";
while (en.hasMoreElements()) {
String key = (String) en.nextElement();
headerStr += key + ": " + getHeader(key) + "\n";
}
return headerStr;
}
COM: <s> nasty and inefficient </s>
|
funcom_train/48502398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void begin() {
getCurrentTransactionStack().add(this);
localTransaction = DatastoreUtil.beginTransaction(ds);
timestamp = System.currentTimeMillis();
lockMap = new HashMap<Key, Lock>();
globalJournalMap = new HashMap<Key, Entity>();
localJournalMap = new HashMap<Key, Entity>();
}
COM: <s> begins this global transaction </s>
|
funcom_train/36459808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mapFormat(int rtpType, Format format) {
mappedFormats.put(rtpType, format);
if (receiveManagers != null) {
for (int i = 0; i < receiveManagers.size(); i++) {
receiveManagers.get(i).addFormat(format, rtpType);
}
}
}
COM: <s> maps a format to an rtp type identifier </s>
|
funcom_train/16484655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setText("Lipstik");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
WipideaApplet.getInstance().updateLnf(WipideaApplet.LNF_LIPSTIK);
}
});
}
return jButton1;
}
COM: <s> this method initializes j button1 </s>
|
funcom_train/1711296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getField(int i,String field) {
String returnValue=null;
Object rawAnnot= Annots.get(i);
Map currentAnnot=(Map)currentPdfFile.resolveToMapOrString(field,rawAnnot);
byte[] title=currentPdfFile.getByteTextStringValue(currentAnnot.get(field),fields);
if(title!=null)
returnValue=currentPdfFile.getTextString(title);
return returnValue;
}
COM: <s> a text field </s>
|
funcom_train/48148632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getVariance(double[] distData) {
double sumX = 0;
double sampleMean = getMean(distData);
if (distData.length<2) return 0;
for (int i = 0; i < distData.length; i++)
sumX += Math.pow(distData[i]-sampleMean, 2);
return (sumX/(distData.length-1));
}
COM: <s> this method returns the sample variance of a data series </s>
|
funcom_train/18429125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearRangeCrosshairs() {
if (this.yCrosshairs.isEmpty()) {
return; // nothing to do
}
List crosshairs = getRangeCrosshairs();
for (int i = 0; i < crosshairs.size(); i++) {
Crosshair c = (Crosshair) crosshairs.get(i);
this.yCrosshairs.remove(c);
c.removePropertyChangeListener(this);
}
fireOverlayChanged();
}
COM: <s> clears all the range crosshairs from the overlay and sends an </s>
|
funcom_train/9447963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ensureCapacity(int minimumCapacity) {
Object[] a = array;
if (a.length < minimumCapacity) {
Object[] newArray = new Object[minimumCapacity];
System.arraycopy(a, 0, newArray, 0, size);
array = newArray;
modCount++;
}
}
COM: <s> ensures that after this operation the </s>
|
funcom_train/49651316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ChoiceGroup getChoiceGroup() {
if (choiceGroup == null) {//GEN-END:|99-getter|0|99-preInit
// write pre-init user code here
choiceGroup = new ChoiceGroup("", Choice.MULTIPLE);//GEN-LINE:|99-getter|1|99-postInit
// write post-init user code here
}//GEN-BEGIN:|99-getter|2|
return choiceGroup;
}
COM: <s> returns an initiliazed instance of choice group component </s>
|
funcom_train/1872697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean execute() {
for (int i = 0; i < Network.size(); i++) {
SingleValue prot = (SingleValue) Network.get(i).getProtocol(pid);
prot.setValue(0);
}
SingleValue prot = (SingleValue) Network.get(0).getProtocol(pid);
prot.setValue(value);
return false;
}
COM: <s> initialize an aggregation protocol using a peak distribution </s>
|
funcom_train/37035587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addHost(Host host) {
if (debug >= 3)
engine.log("Adding host '" + host.getName() + "'");
host.addContainerListener(this);
// Register the host name
addAlias(host.getName(), host);
// Register all associated aliases
String aliases[] = host.findAliases();
for (int i = 0; i < aliases.length; i++)
addAlias(aliases[i], host);
}
COM: <s> add a new child host to our associated engine </s>
|
funcom_train/29839095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent event) {
String command = event.getActionCommand();
if (command.equals("OutlineStroke")) {
attemptModifyOutlineStroke();
} else
if (command.equals("OutlinePaint")) {
attemptModifyOutlinePaint();
} else
if (command.equals("BackgroundPaint")) {
attemptModifyBackgroundPaint();
} else
if (command.equals("SeriesFont")) {
attemptModifySeriesFont();
} else
if (command.equals("SeriesPaint")) {
attemptModifySeriesPaint();
}
}
COM: <s> handles user interactions with the panel </s>
|
funcom_train/32656182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Entry createEntry(DataInput in) throws IOException {
Entry entry = null;
int tag = in.readByte();
try {
entry = (PoolEntry)(table[tag]).newInstance();
}
catch(Exception e) {
System.out.println("Unknown tag: " + tag);
}
if(entry != null) {
entry.read(in);
}
return entry;
}
COM: <s> creates a const entry for this constant pool </s>
|
funcom_train/37854608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SVNPropertyValue doGetRevisionProperty(File repositoryRoot, String propName, SVNRevision revision) throws SVNException {
SVNProperties revProps = getProperties(repositoryRoot, propName, null, revision, null, true, true);
return revProps.getSVNPropertyValue(propName);
}
COM: <s> returns the value of a revision property in the given revision </s>
|
funcom_train/43094413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPorts(Object nodeOrEdge) {
Vector res = new Vector(); //wasteful!
if (Model.getFacade().isAActor(nodeOrEdge)) {
res.addElement(nodeOrEdge);
} else if (Model.getFacade().isAUseCase(nodeOrEdge)) {
res.addElement(nodeOrEdge);
}
return res;
}
COM: <s> return all ports on a node or edge supplied as argument </s>
|
funcom_train/25575775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPopup(final JPopupMenu popup) {
final MouseAdapter listener = new MouseAdapter() {
@Override
public void mouseClicked(final MouseEvent event) {
if (event.isPopupTrigger()) {
popup.show(event.getComponent(), event.getX(), event.getY());
}
}
};
setComponentPopupMenu(popup);
addMouseListener(listener);
for (JTextField singleRoleField : this.roleFields) {
singleRoleField.setComponentPopupMenu(popup);
singleRoleField.addMouseListener(listener);
}
}
COM: <s> adds the popup menu for creating editing and removing of relations </s>
|
funcom_train/37488019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isForceMarqueeEvent(MouseEvent e) {
// If Right Mouse Button we want to Display the PopupMenu
if (SwingUtilities.isRightMouseButton(e)) {
// Return Immediately
return true;
}
// Find and Remember Port
port = getSourcePortAt(e.getPoint());
// If Port Found and in ConnectMode (=Ports Visible)
if (port != null && getGraph().isPortsVisible()) {
return true;
}
// Else Call Superclass
return super.isForceMarqueeEvent(e);
}
COM: <s> gets the force marquee event attribute of the marquee handler object </s>
|
funcom_train/7626928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GoogleWebContentHelper setUrlsFromGservices(String secureSetting, String prettySetting) {
ContentResolver contentResolver = mContext.getContentResolver();
mSecureUrl = fillUrl(Settings.Gservices.getString(contentResolver, secureSetting),
mContext);
mPrettyUrl = fillUrl(Settings.Gservices.getString(contentResolver, prettySetting),
mContext);
return this;
}
COM: <s> fetches the urls from gservices </s>
|
funcom_train/13396377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultNotifications(NSArray inDefNotes) throws Exception {
int stop = inDefNotes.count();
int i = 0;
for(i = 0; i < stop; i++) {
if (!allNotes.containsObject(inDefNotes.objectAtIndex(i))) {
throw new Exception("Array Element not in Allowed Notifications");
}
}
defNotes = inDefNotes;
}
COM: <s> set the list of default notfiications </s>
|
funcom_train/43827605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWithPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CPNSubset_with_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CPNSubset_with_feature", "_UI_CPNSubset_type"),
CpntypesPackage.Literals.CPN_SUBSET__WITH,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the with feature </s>
|
funcom_train/32831332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMethodOrClassLevelAnnotation_classLevel() throws Exception {
TestAnnotation testAnnotation = getMethodOrClassLevelAnnotation(TestAnnotation.class, TestClass.class.getDeclaredMethod("unAnnotatedMethod"), TestClass.class);
assertEquals("class", testAnnotation.level());
}
COM: <s> tests getting a class level annotation </s>
|
funcom_train/49706754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null) {
return false;
}
if (o instanceof Enum) {
Enum anEnum = (Enum) o;
if (!name.equals(anEnum.name) || ordinal != anEnum.ordinal) {
return false;
}
return true;
}
return false;
}
COM: <s> this method determines if two enums are equal to each other </s>
|
funcom_train/2385092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush() throws java.io.IOException {
super.flush();
if (position > 0) {
if (encode) {
out.write(Base64.encode3to4(buffer, position));
} // end if: encoding
else {
throw new java.io.IOException(
"Base64 input not properly padded.");
} // end else: decoding
} // end if: buffer partially full
out.flush();
} // end flush
COM: <s> appropriately pads base64 notation when encoding or throws an </s>
|
funcom_train/27862470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWindow(int window, boolean isroot, int x, int y, int w, int h) {
if (verbose)System.out.println("try to add "+window);
if(inSpace.containsKey(window))return;
if(inWaitingRoom.containsKey(window))inWaitingRoom.remove(window);
inWaitingRoom.put(window, new MetisseWindow(isroot,window,x,y,w,h));
if (verbose)System.out.println("added "+window);
}
COM: <s> called by the rfb listener </s>
|
funcom_train/11106732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void calculateImageNames() {
String name = beanClass.getName();
int period = name.lastIndexOf('.');
if (period >= 0) {
name = name.substring(period + 1);
}
iconFileName_C16 = name + "_C16";
iconFileName_C32 = name + "_C32";
iconFileName_M16 = name + "_M16";
iconFileName_M32 = name + "_M32";
}
COM: <s> p calculate and store icon image names for the bean class that is </s>
|
funcom_train/25489347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJContentPane() {
if (jContentPane == null) {
jContentPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
jContentPane.setDividerLocation(250);
jContentPane.setOneTouchExpandable(true);
jContentPane.setTopComponent(getJPanel());
jContentPane.setBottomComponent(getJPanel1());
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/3687352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getNodeByUUID(String uuid) throws ItemNotFoundException, RepositoryException {
NodeImpl node = (NodeImpl) nodesManager.getNodeByUUID(uuid);
if (node != null) {
node.setTicket(this);
} else
throw new ItemNotFoundException("Ticket.getNodeByUUID failed. Node with UUID='" + uuid + "' not found.");
return node;
}
COM: <s> returns the node specifed by the given uuid </s>
|
funcom_train/49066344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public int enablePath(String label) {
if (!pathSet.containsKey(label)) {
return -1;
}
HashSet cov = (HashSet) pathSet.get(label);
Iterator it = cov.iterator();
while (it.hasNext()) {
Requirement req = (Requirement) it.next();
Integer ki = (Integer) required.get(req);
required.put(req, new Integer(ki.intValue() + 1));
}
return cov.size();
}
COM: <s> enable a given path </s>
|
funcom_train/26322615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelAndView getCurrent(HttpServletRequest request, HttpServletResponse response) throws ServletException {
String page = ((PageDefinition) request.getSession().getAttribute(WorkflowConstants.RESPONSE_PAGE)).getFullName();
return new ModelAndView("forward:" + page + "/" + request.getSession().getAttribute("current"));
}
COM: <s> this method is used to retrieve the current view </s>
|
funcom_train/29720677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getIsVisibleNewWorkProductPanel() {
Project project = this.projectService
.getProject((String) WebSessionService
.getAttribute(WebSessionService.PROJECT_ID));
Process process = this.projectService.getProcessFromProject(project);
if (process != null) {
this.isVisibleNewWorkProductPanel = true;
} else {
this.isVisibleNewWorkProductPanel = false;
}
return this.isVisibleNewWorkProductPanel;
}
COM: <s> getter of is visible new work product panel boolean attribute </s>
|
funcom_train/36859385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setRearrangeModeToInsert() {
if (!isOpen())
return false;
if (methods.getSetting(Constants.SETTING_BANK_TOGGLE_REARRANGE_MODE) != 1) {
methods.atInterface(Constants.INTERFACE_BANK, Constants.INTERFACE_BANK_BUTTON_INSERT);
methods.wait(methods.random(500, 700));
}
return methods.getSetting(Constants.SETTING_BANK_TOGGLE_REARRANGE_MODE) == 1;
}
COM: <s> sets the bank rearrange mode to insert </s>
|
funcom_train/37571480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialize() throws SOAPException {
super.initialize();
m_namespaces.put("eb", "http://www.ebxml.org/namespaces/messageHeader");
m_ebxmlHeader = findOrMakeHeaderChild("eb:MessageHeader");
m_ebxmlHeader.setMustUnderstand(true);
m_ebxmlHeader.addAttribute(createName("version"), "1.0");
}
COM: <s> map my specific namespaces </s>
|
funcom_train/26240035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(double number) {
/* Create a new array if necessary. */
if (freeIndex == ARRAY_LENGTH) {
dataList.add(new double[ARRAY_LENGTH]);
freeIndex = 0;
}
((double []) dataList.get(dataList.size()-1))[freeIndex++] = number;
nofElements++;
sum += number;
meanIsUptodate = varianceIsUptodate = false;
}
COM: <s> add a number to be taken into account </s>
|
funcom_train/2860517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String load(java.io.Reader source) throws java.io.IOException {
java.io.BufferedReader reader = new java.io.BufferedReader(source);
char nl = '\n';
StringBuffer buf = new StringBuffer();
while (true) {
String line = reader.readLine();
if (line == null) break;
buf.append(line + nl);
}
return buf.toString();
}
COM: <s> load a string from a reader </s>
|
funcom_train/40105487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private void generateFile(ToK tok, String filepath) throws CoreException, IOException
{
InputStream s = GeneralFunctions.getInputStream(filepath);
// create the path inside the project
IProject proj = tok.getProject();
HTMLPage.generatePath(proj, filepath);
// create the file itself
IFile file = proj.getFile(filepath);
if (!file.exists())
file.create(s, true, new NullProgressMonitor());
}
COM: <s> creates an ifile from an internal file </s>
|
funcom_train/16914616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void normalView() {
sensorMatrixNode.setVisible(true);
sensorMatrixNode.moveToFront();
sensorMatrixNode.setOffset(0.0d, 0.0d);
if (pixelMatrixNode.hasFocus()) {
pixelMatrixNode.setFocus(false);
}
if (!selectionEventHandlerInstalled) {
selectionEventHandlerInstalled = true;
addInputEventListener(selectionEventHandler);
}
centerCamera();
}
COM: <s> switch to the normal view </s>
|
funcom_train/46297645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env) {
Map returnMap = new HashMap();
Iterator namespaceIterator = env.getAllDeclaredNamespaces();
while (namespaceIterator.hasNext()) {
OMNamespace ns = (OMNamespace) namespaceIterator.next();
returnMap.put(ns.getPrefix(), ns.getNamespaceURI());
}
return returnMap;
}
COM: <s> a utility method that copies the namepaces from the soapenvelope </s>
|
funcom_train/21285806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public Term createForAllLazyTerm(Oracle oracle, Object coll, String variableName, Term inner) {
SymbolTerm name = SymbolTerm.makeSymbol("forallLazy", 4);
VariableTerm variable = oracle.getVariable(variableName);
return new StructureTerm(name, new Term[]{variable, new JavaObjectTerm(variableName), new JavaObjectTerm(coll), inner});
}
COM: <s> create a term for a forall connective but lazy loading </s>
|
funcom_train/26401164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openTransaction(Connection con) throws I18NException {
if (con != null) {
try {
con.setAutoCommit(false);
} catch (SQLException e) {
Object[] args = {e.getMessage()};
Message message = new Message("exception.failed.database.error", args);
throw new I18NException(message);
}
}
}
COM: <s> open a new transaction </s>
|
funcom_train/6487626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putBigNum( BigInteger value ) {
// TODO: abs right?
byte[] buf = value.abs().toByteArray();
byte[] tmpBuf = BitHelper.putInt16( value.bitLength());
append( tmpBuf, 2 );
append( buf, buf.length );
}
COM: <s> put a big integer onto the buffer </s>
|
funcom_train/949869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String getPathToNode(Node node) {
if (node.getParentNode()==null) {
if (node.getNodeName().equals("#document")) return "";
else return "/"+node.getNodeName();
}
else return getPathToNode(node.getParentNode())+"/"+node.getNodeName();
}
COM: <s> returns xpath to the given node </s>
|
funcom_train/45384933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMinorVersionValue() {
// gets the VERSION node and update minor version
Element versionNode = (Element) getChildByName(setup, VERSION_ELEMENT);
if (versionNode == null) { throw new RuntimeException(
"No version while updating Setup !"); }
versionNode.setAttribute(MINOR_VERSION_ATTRIBUTE, String
.valueOf(CURRENT_MINOR_VERSION));
}
COM: <s> updates setup for minor version value </s>
|
funcom_train/7621524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void attachViewToParent(View child, int index, LayoutParams params) {
child.mLayoutParams = params;
if (index < 0) {
index = mChildrenCount;
}
addInArray(child, index);
child.mParent = this;
child.mPrivateFlags |= DRAWN;
if (child.hasFocus()) {
requestChildFocus(child, child.findFocus());
}
}
COM: <s> attaches a view to this view group </s>
|
funcom_train/28983585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setList(ObservableList<T> list) {
//Do nothing if list has not actually changed
if (this.list == list) return;
//Swap over listener
if (this.list != null) {
this.list.props().removeListener(this);
}
if (list != null) {
list.props().addListener(this);
}
this.list = list;
//Fire all rows change for new data
fireTableDataChanged();
}
COM: <s> set the list being viewed </s>
|
funcom_train/5573024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toVerboseString() {
StringBuffer buffy = new StringBuffer();
buffy.append(stereotype).append("\n Constraints:\n");
Iterator it = constraints.iterator();
while (it.hasNext()) {
buffy.append(" - ").append(it.next()).append("\n");
}
it = metaInformation.keySet().iterator();
Object next = null;
buffy.append(" MetaInformation:\n");
while (it.hasNext()) {
next = it.next();
buffy.append(" - ").append(next).append(" = ").append(
metaInformation.get(next)).append("\n");
}
return buffy.toString();
}
COM: <s> a more verbose version of to string which can be used for debug </s>
|
funcom_train/18938118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lastNonTerminal() {
int biggerNonTerminalCode = 0;
Iterator<Symbol> symbolsIt = symbols.values().iterator();
while ( symbolsIt.hasNext() ) {
Symbol symbol = symbolsIt.next();
if ( (symbol.isNonTerminal()) && (symbol.getCode() > biggerNonTerminalCode) )
biggerNonTerminalCode = symbol.getCode();
}
return biggerNonTerminalCode;
}
COM: <s> the code of the last non terminal symbol in the grammar </s>
|
funcom_train/35021321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void push(List<ThreadGroupReference> groups) {
// Add this list's iterator to the stack.
stack.push(groups.iterator());
// While the top iterator is empty, pop it off the stack.
// This ensures that the top iterator has something to iterate.
while (!stack.isEmpty() && !peek().hasNext()) {
stack.pop();
}
}
COM: <s> push the given list of thread group iterators onto the stack </s>
|
funcom_train/18219770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readChildSCM() {
Element scmSettings = settings.getChild("scm");
readChildScmSourceSettings(scmSettings.getChild("scmSourceLocation"));
readChildScmImportWorkingDirectory(scmSettings
.getChild("scmImportWorkingDirectory"));
readChildScmImportEventCheckHeuristics(scmSettings
.getChild("scmImportEventCheckHeuristics"));
readChildScmbugSettings(scmSettings.getChild("scmbugSettings"));
}
COM: <s> loads all information from scm element of settings </s>
|
funcom_train/49800139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*public void testGetStringRepresentation() {
System.out.println("getStringRepresentation");
Certificate instance = null;
String expResult = "";
String result = instance.getStringRepresentation();
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 string representation method of class uk </s>
|
funcom_train/4702192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRequestUrl(URL url){
this.ensureInit();
if (SameHost(this.url,url)){
if (SamePort(this.url,url)){
this.url = url;
}
else
throw new IllegalArgumentException("Port changed.");
}
else
throw new IllegalArgumentException("Host changed.");
}
COM: <s> change url before </s>
|
funcom_train/17455778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Form createFormInstance(Object object, Class entity, Class<? extends Form> form) {
try {
Constructor<? extends Form> con = form.getConstructor(entity);
return con.newInstance(object);
} catch (Exception e) {
throw new IllegalArgumentException("Form class must have a constructor with one entity argument.", e);
}
}
COM: <s> creates a new form instance for the provided object </s>
|
funcom_train/12906337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String retval = "BindingSet { " + Constants.NEWLINE;
for(Expr key : dictionary.keySet()) {
ExprBooleanTerminal terminal = (ExprBooleanTerminal) key;
retval += (terminal + " = " + get(terminal) + " ");
}
retval += "}";
return retval;
}
COM: <s> creates a string representation of this binding set by iterating over the </s>
|
funcom_train/24446333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean merge(V v1, V v2, boolean allowNxN) {
int v1Root = find(v1);
int v2Root = find(v2);
BitSet bm1 = getBitMap(v1Root);
BitSet bm2 = getBitMap(v2Root);
if (allowNxN || !bm1.intersects(bm2)) {
merge(v1Root, v2Root);
bm1.or(bm2);
int newRoot = find(v1);
bitMaps[newRoot] = bm1;
return true;
}
return false;
}
COM: <s> tries to merge the two objects into the same set </s>
|
funcom_train/25450707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void truncateTime(Calendar time, int field) {
switch (field) {
case Calendar.YEAR:
time.set(Calendar.MONTH, 0);
case Calendar.MONTH:
time.set(Calendar.DAY_OF_MONTH, 1);
case Calendar.DAY_OF_MONTH:
time.set(Calendar.HOUR_OF_DAY, 0);
case Calendar.HOUR:
case Calendar.HOUR_OF_DAY:
time.set(Calendar.MINUTE, 0);
case Calendar.MINUTE:
time.set(Calendar.SECOND, 0);
case Calendar.SECOND:
time.set(Calendar.MILLISECOND, 0);
}
}
COM: <s> truncate part of time specifed calender field </s>
|
funcom_train/43859027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWrite() throws IOException {
// Get MetaData to embed
MetaData meta = createMeta();
// Read in a FLV file for reading tags
File tmp = new File("test/test.flv");
System.out.println("Path: "+ tmp.getAbsolutePath());
IFLV flv = (IFLV) service.getStreamableFile(tmp);
flv.setCache(NoCacheImpl.getInstance());
// set the MetaService
flv.setMetaService(metaService);
// set the MetaData
flv.setMetaData(meta);
}
COM: <s> test writing meta data </s>
|
funcom_train/37123603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnName(int column) {
switch (column) {
case 0:
return Message.getInstance().getMessage(Batavia.getLocale(), "string.name", "Name");
case 1:
return Message.getInstance().getMessage(Batavia.getLocale(), "string.version", "Version");
case 2:
return Message.getInstance().getMessage(Batavia.getLocale(), "string.state", "State");
}
return "???";
}
COM: <s> gets the column name attribute of the installed plugin table model object </s>
|
funcom_train/1562659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPreferencesXML() {
StringBuilder sb = new StringBuilder();
addXMLHeader(sb);
addGeoGebraHeader(sb, false, null);
//sb.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
//sb.append("<geogebra format=\"" + GeoGebra.XML_FILE_FORMAT
// + "\">\n");
// save gui settings
sb.append(app.getCompleteUserInterfaceXML(true));
sb.append("</geogebra>");
return sb.toString();
}
COM: <s> returns xml representation of all settings without construction </s>
|
funcom_train/44284455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Patch createNewPatch() {
SysexHandler init = new SysexHandler(
"F0 41 10 3D 12 02 00 00 32 05 05 05 01 01 01 6E" +
"00 6E 28 7D 28 28 23 0F 00 31 64 04 00 08 0D 19" +
"28 48 F7");
return new Patch(init.toByteArray(), this);
};
COM: <s> creates new patch based on a sysex message obtained </s>
|
funcom_train/34527769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private EvaluationContext getDataSetIterationEvaluationContext(String projectName, Map<String, Object> parameters) throws InitializationException, ProjectException {
ProjectContext projectContext = getProjectMgrRepository().loadProject(projectName);
EvaluationContext evaluationContext = new DataSetIterationEvaluationContext(projectContext, this);
evaluationContext.setParameters(parameters);
return evaluationContext;
}
COM: <s> gets an evaluation context which should be used for the documents </s>
|
funcom_train/39568536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addEdge( OverlayNode from, OverlayNode to, float distance ){
//add edges in a symmetrically way, i.e. always add two edges
if( from.hasPhyEdge(to) ) return false;
if( !from.wired_link || !to.wired_link)return false;
reroute = true;
from.insertPhyEdge( to, distance );
to.insertPhyEdge( from, distance );
return true;
}
COM: <s> add an physical edge </s>
|
funcom_train/46383070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDatabaseUrl() {
File path = getDatabaseLocation();
String dbUrl;
try {
dbUrl = dbProperties.getProperty("derby.url") + path.getCanonicalPath();
} catch (IOException ioe) {
logger.log(Level.WARNING, "Error getting URL for " + path, ioe);
dbUrl = dbProperties.getProperty("derby.url") + dbName;
}
return dbUrl;
}
COM: <s> returns the url representation of the database </s>
|
funcom_train/49317543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireChange(ChangeEvent e) {
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ChangeListener.class) {
((ChangeListener) listeners[i + 1]).stateChanged(e);
}
}
}
COM: <s> notify any listeners that a new html page is being displayed </s>
|
funcom_train/3678076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initComponents() {
JToolBar toolBar = new JToolBar();
addButtons( toolBar );
setLayout( new BorderLayout() );
add( toolBar, BorderLayout.NORTH );
tabs = new JTabbedPane();
tabs.addChangeListener( this );
add( tabs, BorderLayout.CENTER );
}
COM: <s> instanciates and lays components </s>
|
funcom_train/34428020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void generateHeader(TableInformation info, StringBuffer res) {
res.append("<th class=\"")
.append(this.headerStyleClass)
.append("\">")
.append(info.getColumnLabel(this.labelCode))
.append("</th>");
}
COM: <s> generate the header in the given string buffer </s>
|
funcom_train/8497036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getStringFromInputStream(InputStream is) throws IOException {
if (is != null) {
StringBuilder sb = new StringBuilder();
String line;
try {
BufferedReader reader = new BufferedReader( new InputStreamReader(is, "UTF-8"));
while ((line = reader.readLine()) != null) {
sb.append(line);
}
} finally {
is.close();
}
return sb.toString();
} else {
return "";
}
}
COM: <s> builds a string from an input stream </s>
|
funcom_train/45736870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasSingleChild(String name){
this.setIsUsed(true);
int no = 0;
for(Element child : this.getAllChildren()){
if(child.getName().equals(name)){
no++;
}
}
//Exactly one element should have been found.
if(no==1)
return true;
else
return false;
}
COM: <s> returns true if this element contains exactly one child </s>
|
funcom_train/3523821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueHolder(ValueHolder holder) {
// remove listener from old holder
if (model.getValueHolder() != null)
model.getValueHolder().removeChangeListener(dateChangeListener);
model.setValueHolder(holder);
// register listener with new holder
if (holder != null)
holder.addChangeListener(dateChangeListener); }
COM: <s> sets the value holder for the model </s>
|
funcom_train/18215922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void process(final long id, final String fieldName, final String removed, final String added, final EventListener eventProcessor) {
try {
final Case c = cases.getCase(id);
try {
doProcess(fieldName, removed, added, eventProcessor, c);
} catch (final ValueNotResolvedException e) {
Log.info(this, e, "");
}
} catch (final CaseDoesNotExistException e) {
Log.info(this, e, "");
}
}
COM: <s> processes a change of a field </s>
|
funcom_train/4146424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File f) {
// Check preconditions
MandatoryArgumentChecker.check("f", f);
// Must be an existing readable directory, not hidden, matching the
// regular expression
return f.exists()
&& f.canRead()
&& f.isDirectory()
&& !f.isHidden()
&& f.getName().matches(_namePattern);
}
COM: <s> tests whether or not the specified abstract path name should be </s>
|
funcom_train/29410746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applySetup(){
IPreferenceStore preferences = save();
BflowDiagramEditPart diagramEditPart = null;
try{
diagramEditPart = BflowDiagramEditPart.getCurrentViewer();
}
catch(Exception e){
return;
}
if(diagramEditPart != null){
final Point size = PageInfoHelper.getPageSize(preferences,
diagramEditPart.getMapMode());
diagramEditPart.getDiagramFormLayer().getFormHelper().setMinimumSize(
size.x, size.y);
}
}
COM: <s> applies the entered values </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.