__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/48210509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setup(SQLObject parent, String name, String remarks, String objectType) {
super.setParent(parent);
super.setName(name); // this.setName will try to be far to fancy at this point, and break stuff
this.remarks = remarks;
this.objectType = objectType;
super.setPhysicalName(name);
updatePKIndexNameToMatch(null, name);
if (this.objectType == null) throw new NullPointerException();
}
COM: <s> sets up the values for the new table </s>
|
funcom_train/37637620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVerticalAlignment(int row, int column, int verticalAlign){
verticalAlignment.setElementAt(row, column, new Integer(verticalAlign));
AttributeModelEvent e = new AttributeModelEvent(this, AttributeModelEvent.CELLS_UPDATED, row, column, 1, 1);
fireDataChanged(e);
}
COM: <s> set the vertical alignment of cell row column </s>
|
funcom_train/44572415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean verifyNormalSpecBody(JmlSpecBodyClause[] clauses) {
boolean result = true;
for (int i = 0; i < clauses.length; i++)
if (!clauses[i].isNormalSpecBody()) {
utility.reportTrouble( new PositionedError(
clauses[i].getTokenReference(),
JmlMessages.BAD_NORMAL_SPEC_BODY ));
result = false;
}
return result;
}
COM: <s> returns true if all elements of the argument are normal spec body </s>
|
funcom_train/50533079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void ReceiveUpEvent(Event evt) {
if(up_handler == null) {
if(observer != null) { // call debugger hook (if installed)
if(observer.Up(evt, up_queue.Size()) == false) { // false means discard event
return;
}
}
Up(evt);
return;
}
try {
up_queue.Add(evt);
}
catch(Exception e) {
Trace.warn("Protocol.ReceiveUpEvent()", "exception: " + e);
}
}
COM: <s> internal method should not be called by clients </s>
|
funcom_train/40871888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBinding(final String name, final String value, final String datatype) throws InvalidValueException {
if (value == null && datatype == null) {
this.bindings.putTyped(name, null);
} else {
TypedValue typeValue = new TypedValue(VmBindings.XMLSchemaDatatype.valueByURI(datatype), value);
this.bindings.putTyped(name, typeValue);
}
}
COM: <s> add a binding to this packet </s>
|
funcom_train/28158456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void send(final ManagedPackage p) {
addStatus("Sending:\n" + p);
try {
final ManagedPackage response = connection.sendPackage(p);
if (p.getType() == ManagedPackage.TYPE_REQUEST) {
addStatus("Response:\n" + response);
}
} catch (PackageConnectionException e) {
e.printStackTrace();
}
}
COM: <s> send a package </s>
|
funcom_train/9442752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean changeKeyboard(Keyboard keyboard) {
if (keyboard == null) {
return false;
}
if (mCurrentKeyboard != keyboard) {
mKeyboardView.setKeyboard(keyboard);
mKeyboardView.setShifted((mShiftOn == 0) ? false : true);
mCurrentKeyboard = keyboard;
return true;
} else {
mKeyboardView.setShifted((mShiftOn == 0) ? false : true);
return false;
}
}
COM: <s> change the keyboard </s>
|
funcom_train/37590348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updatePanel() {
// The following lines were commented out when update delays in this class were disabled
// synchronized(_updateLock) {
// _updatePending = false;
// _lastChangeTime = _frame.getLastChangeTime();
// }
// traversePanel();
_regTreeModel.reload();
// revalidate(); //
expandTree();
repaint();
}
COM: <s> forces this panel to be completely updated </s>
|
funcom_train/938046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setShowingYear(final int year) {
showingyear = year;
for (int i = 0; i < months.length; i++) {
cal.setTime(months[i].getMonth());
cal.set(Calendar.YEAR, year);
months[i].setMonth(cal.getTime());
}
refreshSelection();
}
COM: <s> sets the year shown </s>
|
funcom_train/8084111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyTestSetAvailable(TestSetEvent e) {
Vector l;
synchronized (this) {
l = (Vector)m_testSetListeners.clone();
}
if (l.size() > 0) {
for(int i = 0; i < l.size(); i++) {
((TestSetListener)l.elementAt(i)).acceptTestSet(e);
}
}
}
COM: <s> notify all test set listeners that a test set is available </s>
|
funcom_train/7847150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void apply (Target target, boolean pressed) throws IOException {
if (target == null) throw new IllegalArgumentException("target cannot be null.");
if (target instanceof Button)
apply((Button)target, pressed);
else if (target instanceof Axis)
apply((Axis)target, pressed ? 1 : 0);
else
throw new IllegalArgumentException("target must be a button or axis.");
}
COM: <s> sets the button or axis state </s>
|
funcom_train/7223098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String forwards(ConsumerContext context){
Iterator conditions = conditionList_.iterator();
while(conditions.hasNext()){
ForwardCondition condition = (ForwardCondition)(conditions.next());
String forwardTo = condition.forwards(context);
if(null != forwardTo){ return forwardTo; }
}
return null;
}
COM: <s> decide destination to forward servlet control </s>
|
funcom_train/376154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
out.setLength(0);
out.append("recv=").append(getRecv());
out.append(", drop=").append(getDrop());
out.append(", ifdrop=").append(getIfDrop());
out.append(", capt=").append(getCapt());
out.append(", netdrop=").append(getNetdrop());
out.append(", sent=").append(getSent());
return out.toString();
}
COM: <s> dumps all the values as a string </s>
|
funcom_train/4184304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configureGraphicalViewer() {
super.configureGraphicalViewer();
GraphicalViewer viewer = getGraphicalViewer();
viewer.setEditPartFactory(new ShapesEditPartFactory());
viewer.setRootEditPart(new ScalableFreeformRootEditPart());
viewer.setKeyHandler(new GraphicalViewerKeyHandler(viewer));
// configure the context menu provider
ContextMenuProvider cmProvider = new ShapesEditorContextMenuProvider(
viewer, getActionRegistry());
viewer.setContextMenu(cmProvider);
getSite().registerContextMenu(cmProvider, viewer);
}
COM: <s> configure the graphical viewer before it receives contents </s>
|
funcom_train/14396175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expectTokenType(int tokenType) throws ParseException {
if(theTokenizer.getTokenType() != tokenType) {
handleTokenError(MOFParserException.EXPECTTOKENTYPE_UNEXPECTED_TOKEN_TYPE,
", expected token type: "+MOFTokenizer.getTokenTypeString(tokenType));
}
}
COM: <s> checks if the actual token has the given expected token type </s>
|
funcom_train/46432554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void persistObject(OpObjectIfc object) {
try {
logger.debug("before session.save()");
session.save(object);
logger.debug("after session.save()");
}
catch (HibernateException e) {
logger.error("OpHibernateConnection.persistObject(): Could not save object: ", e);
// *** TODO: Throw OpPersistenceException
}
}
COM: <s> persist provided object </s>
|
funcom_train/51604778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextPane getJTextPaneInformations() {
if (jTextPaneInformations == null) {
jTextPaneInformations = new JTextPane();
jTextPaneInformations.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent e) {
variety.setInformations(jTextPaneInformations.getText());
}
});
}
return jTextPaneInformations;
}
COM: <s> this method initializes j text pane informations </s>
|
funcom_train/50911982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXMLContent(String value) throws RuntimeException {
if (_xmlContent == null) {
_xmlContent = new DoubleArraySTAttribute("_xmlContent");
}
_xmlContent.setCMLValue(value);
String attval = _xmlContent.getValue();
this.removeChildren();
this.appendChild(attval);
}
COM: <s> an unbounded line in 3 space </s>
|
funcom_train/22232628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDistanceGain(Point2f[] attenuation) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_GAIN_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("PointSound3"));
((PointSoundRetained)this.retained).setDistanceGain(attenuation);
}
COM: <s> sets this sounds distance gain attenuation where gain scale factor </s>
|
funcom_train/2955788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private LayoutContext createLayoutContext() {
if (graphicsEnvironment == null) {
graphicsEnvironment =
GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gdev = graphicsEnvironment.getDefaultScreenDevice();
GraphicsConfiguration gconf = gdev.getDefaultConfiguration();
dummyImage = gconf.createCompatibleImage(1, 1);
}
Graphics g = graphicsEnvironment.createGraphics(dummyImage);
return this.createLayoutContext(g);
}
COM: <s> creates a graphics context similar to the screen </s>
|
funcom_train/3064178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Entry getPrecedingEntry(Object key) {
Entry p = root;
if (p==null)
return null;
while (true) {
int cmp = compare(key, p.key);
if (cmp > 0) {
if (p.right != null)
p = p.right;
else
return p;
} else {
if (p.left != null) {
p = p.left;
} else {
Entry parent = p.parent;
Entry ch = p;
while (parent != null && ch == parent.left) {
ch = parent;
parent = parent.parent;
}
return parent;
}
}
}
}
COM: <s> returns the entry for the greatest key less than the specified key if </s>
|
funcom_train/29711766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void dumCopyChildren(Element src, Element dest) {
Node node = src.getFirstChild();
Document destDoc = dest.getOwnerDocument();
for (; node != null; node = node.getNextSibling()) {
if (!shouldIgnore(node)) {
Node n = DOMUtil.cloneNodeDeepIgnoreError(destDoc, node);
dest.appendChild(n);
}
}
}
COM: <s> utility method for those converter that directly copy children </s>
|
funcom_train/20397197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Session getCurrentSession() {
SessionFactory sessionFactory = null;
if (sessionFactoryType.equals("ks")) {
sessionFactory = (org.hibernate.SessionFactory) applicationContext.getBean("sessionFactoryks");
} else {
sessionFactory = (org.hibernate.SessionFactory) applicationContext.getBean("sessionFactory");
}
return sessionFactory.getCurrentSession();
}
COM: <s> get the current hibernate session </s>
|
funcom_train/30197035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIntervistatore() throws Exception {
System.out.println("intervistatore");
/*
ActionMapping mapping = null;
ActionForm form = null;
HttpServletRequest request = null;
HttpServletResponse response = null;
EntraAction instance = new EntraAction();
ActionForward expResult = null;
ActionForward result = instance.intervistatore(mapping, form, request, response);
assertEquals(expResult, result);
*/
}
COM: <s> test of intervistatore method of class com </s>
|
funcom_train/23678428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSqlTypeCodePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Column_sqlTypeCode_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Column_sqlTypeCode_feature", "_UI_Column_type"),
MetadataPackage.Literals.COLUMN__SQL_TYPE_CODE,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the sql type code feature </s>
|
funcom_train/3786411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String lookupChkboxMenuItem(CheckboxMenuItem cbmi)
{ /* lookupChkboxMenuItem */
if(cbmi==null)
return(null);
ChkBoxMenuData cbmd= (ChkBoxMenuData)chkBoxMenuItemDataHT.get(cbmi);
if(cbmd==null)
return(null);
String cmd= cbmd.cmd;
return(cmd);
} /* lookupChkboxMenuItem */
COM: <s> lookup chkbox menu item lookup string command entry in </s>
|
funcom_train/18880914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JCheckBox getJCheckBoxInstableWindDir() {
if (jCheckBoxInstableWindDir == null) {
jCheckBoxInstableWindDir = new JCheckBox();
jCheckBoxInstableWindDir.setBounds(new Rectangle(255, 17, 131, 25));
jCheckBoxInstableWindDir.setSelected(simToolBox.instableWindDirection);
jCheckBoxInstableWindDir.setText("instable");
}
return jCheckBoxInstableWindDir;
}
COM: <s> this method initializes j check box instable wind dir </s>
|
funcom_train/1952358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDevicesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SmartObject_devices_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SmartObject_devices_feature", "_UI_SmartObject_type"),
SmartPackage.Literals.SMART_OBJECT__DEVICES,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the devices feature </s>
|
funcom_train/10252276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dropUser(String name) {
boolean reservedUser = GranteeManager.isReserved(name);
if (reservedUser) {
throw Error.error(ErrorCode.X_28502, name);
}
boolean result = granteeManager.removeGrantee(name);
if (!result) {
throw Error.error(ErrorCode.X_28501, name);
}
User user = (User) userList.remove(name);
if (user == null) {
throw Error.error(ErrorCode.X_28501, name);
}
}
COM: <s> attempts to drop a user object with the specified name </s>
|
funcom_train/133858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshSequence(Sequence theSeq) {
this.seq.setResidues(theSeq.getResidues());
getResidueGlyph().setSequence(this.seq);
getNumGlyph().setSequence(this.seq);
residue_map.scrollRange(0);
residue_map.zoomRange(getResiduePixelWidth());
num_map.scrollRange(0);
stretchToFit(false,false);
// Why is it needed at all? It screws up editing. -- elb 3/16/99
calcNumPixelWidth();
updateWidget();
}
COM: <s> trying to refresh the widget when the sequence has changed </s>
|
funcom_train/37797012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void skippedTest(String name, int testIndex, String desc) {
for (Iterator i = reporters.iterator(); i.hasNext(); ) {
IReporter r = (IReporter)i.next();
r.skippedTest(name, testIndex, desc);
}
}
COM: <s> called when the test is skipped </s>
|
funcom_train/10912507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int alloc(int size) {
int index = n;
int len = array.length;
if (n + size >= len) {
char[] aux = new char[len + blockSize];
System.arraycopy(array, 0, aux, 0, len);
array = aux;
}
n += size;
return index;
}
COM: <s> this is to implement memory allocation in the array </s>
|
funcom_train/5553312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean sameSignature(Rule rule) {
boolean nSame=true;
boolean aSame=true;
boolean rSame=true;
nSame = name.equals(rule.getName());
if ( args!=null ) {
aSame = args.equals(rule.getArgs());
}
if ( returnValue!=null ) {
rSame = returnValue.equals(rule.getReturnValue());
}
return nSame && aSame && rSame;
}
COM: <s> two rules have the same signature if they have </s>
|
funcom_train/35811889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void logRotate() {
// check whether log rotate should be performed
if (logRotateStrategy != null) {
long currentTime = System.currentTimeMillis();
Date strategyRotateDate = logRotateStrategy.getRotationDate();
if (strategyRotateDate != null) {
if (currentTime >= strategyRotateDate.getTime()) {
logRotateStrategy.rotate();
logRotateStrategy.updateRotationDate();
}
}
}
}
COM: <s> checks whether its time to perform logs rotation and if so performs it </s>
|
funcom_train/20278640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOptimizationsRemoveParentAfterRemoveChild() {
currentPeepholePasses = ImmutableList.<AbstractPeepholeOptimization>of(
new RemoveNodesNamedXOptimization(),
new RemoveParentVarsForNodesNamedX());
test("var x,y; var z;", "var y; var z;");
}
COM: <s> test the case where the first peephole optimization removes a node and the </s>
|
funcom_train/44839078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void challengeCredentials(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, int loginAttempts) throws java.io.IOException, javax.servlet.ServletException {
RequestDispatcher dispatcher = request.getRequestDispatcher(loginPage);
dispatcher.forward(request, response);
}
COM: <s> uses a request dispatcher to forward the user to a preconfigured login page </s>
|
funcom_train/3044475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addClass( String className, boolean verbose ) {
Class clazz = checkClassNamed( className, verbose );
if( clazz != null ) {
ReflectedClass rc = reallyAdd( clazz, verbose );
if( rc == null && verbose ) {
buf.append("<!-- ")
.append(clazz.getName())
.append(" cannot be added, no UID found! -->\n");
}
}
}
COM: <s> add a class to the map and reflect upon it </s>
|
funcom_train/10207268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getCleanUpMenu() {
if (sCleanUpMenu == null) {
sCleanUpMenu = Application.getMenu(Application.messages[NewsReader.MSG_ME_CLEANUP], NewsReader.ME_CLEANUP, -1, Application.cBACK);
}
return sCleanUpMenu;
}
COM: <s> gets the clean up menu </s>
|
funcom_train/3410280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGlobalCurrentFocusCycleRoot(Container newFocusCycleRoot) {
Container oldFocusCycleRoot;
synchronized (KeyboardFocusManager.class) {
oldFocusCycleRoot = getCurrentFocusCycleRoot();
currentFocusCycleRoot = newFocusCycleRoot;
}
firePropertyChange("currentFocusCycleRoot", oldFocusCycleRoot,
newFocusCycleRoot);
}
COM: <s> sets the current focus cycle root </s>
|
funcom_train/32081488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillRectangle (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(FILL);
if (width < 0) {
x = x + width;
width = -width;
}
if (height < 0) {
y = y + height;
height = -height;
}
int rect = OS.gcnew_Rect(x, y, width, height);
OS.DrawingContext_DrawRectangle(handle, data.currentBrush, 0, rect);
OS.GCHandle_Free(rect);
}
COM: <s> fills the interior of the rectangle specified by the arguments </s>
|
funcom_train/2860412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayUneditable(ElementInfoObject eio, StringBuffer out){
String tmp = eio.value;
if(tmp!=null)
tmp = escape(eio.value);
else
tmp = "";
if(!raggedDisplay)
out.append("<td>");
out.append("<font color=green>" + tmp + "</font>\n");
}//displayUneditable
COM: <s> generate the html to display uneditable content in the record editor </s>
|
funcom_train/26490710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateCurrentStateMembers() {
long now = System.currentTimeMillis();
synchronized (members) {
// Be sure that the new time will be at least 1 msec greater
// than the old time.
if (now <= lastStateChangeTimeMembers)
// Extremely rare.
lastStateChangeTimeMembers++;
else
// Most of the time.
lastStateChangeTimeMembers = now;
// Wake up any pending readers.
members.notifyAll();
}
}
COM: <s> create a new unique identifier for the current state </s>
|
funcom_train/3561451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getFlagValue(String flagName) {
int pos;
pos = getFlagPos(flagName);
if (pos >= 0) {
try {
return getFlagValue(pos);
}
catch (IndexOutOfBoundsException e) {
System.out.println("Not fatal: flag not correctly defined");
}
}
return false;
}
COM: <s> returns the value of a flag whose name is specified </s>
|
funcom_train/29768317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(OutputStreamWriter streamWriter) {
Iterator<String> it = this.sectionOrder.iterator();
PrintWriter writer = new PrintWriter(streamWriter, true);
while (it.hasNext()) {
Section sect = getSection((String) it.next());
writer.println(sect.header());
sect.save(writer);
}
}
COM: <s> writes this instance in ini format to an output stream writer </s>
|
funcom_train/17462968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public A next2()
{
A next = null;
if( _iter != null && _iter.hasNext() ) {
next = _iter.next();
} else {
try {
prepareNext();
} catch ( IOException except ) {
throw new IOError( except );
}
if ( _iter != null && _iter.hasNext() ) {
return next2();
}
}
return next;
}
COM: <s> returns the next object </s>
|
funcom_train/44450691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void save(String preference) {
Preferences prefs = SrcMLPlugin.getDefault().getPluginPreferences();
StringBuilder sb = new StringBuilder();
boolean first = true;
for (String id : fac2str.values()) {
if (first) first = false;
else sb.append("###");
sb.append(id);
}
prefs.setValue(preference, sb.toString());
if (prefs.needsSaving()) {
SrcMLPlugin.getDefault().savePluginPreferences();
}
}
COM: <s> saves the currently selected adapter factories as defaults into the plug in preferences </s>
|
funcom_train/34111525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedPanel(boolean selected) {
// Case panel is not still selected and must enable this and disable browser panel
if (!isPanelSelected() && selected) {
Main.get().mainPanel.browser.fileBrowser.setSelectedPanel(false);
}
// Before making other operation must change value of panel selected
panelSelected = selected;
if (selected) {
addStyleName("okm-PanelSelected");
} else {
removeStyleName("okm-PanelSelected");
}
}
COM: <s> sets the selected panel value </s>
|
funcom_train/28658665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void rowPaint(Graphics g) {
processFieldPaintEvent(new XI5250FieldPaintEvent(XI5250FieldPaintEvent.ROW_PAINT,
this, g));
if (!ivEnabled) {
Rectangle rt = getBoundingRect();
g.setColor(Color.white);
int hh = rt.height;
for (int x = -hh; x < rt.width; x += 8)
g.drawLine(x, hh, x + hh, 0);
}
}
COM: <s> called for each rectangle returned by get rows rects </s>
|
funcom_train/5669042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(int numRuns, int numSteps, File backEndFolder, ParameterWindow paramWin, File backEnd)
{
runs = new Run[numRuns];
makeRunFolder();
for (int x = 0; x< numRuns; x++)
runs[x] = new Run(makeComFolder(x), numSteps, paramWin);
setChanged();
notifyObservers(runs);
notifyObservers(null);
}
COM: <s> initializes all the runs and makes them their own directory to work in </s>
|
funcom_train/32057498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSelectionCells() {
System.out.println("testGetSelectionCells");
JGraph jp = new JGraph();
DefaultGraphSelectionModel dg = new DefaultGraphSelectionModel(jp);
Object[] obj = new Object[5];
dg.addSelectionCells(obj);
assertTrue(dg.getSelectionCells() != null);
}
COM: <s> this function tests get selection cells function of default graph cell class </s>
|
funcom_train/14462484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(String newText) {
for (int i=0;i<chartArr.size();i++) {
BiffRec b = (BiffRec)chartArr.get(i);
if (b.getOpcode()==SERIESTEXT) {
SeriesText st = (SeriesText) b;
st.setText(newText);
}
}
}
COM: <s> set the text of this text display object </s>
|
funcom_train/6267491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getParameterAsInt(String parameterName) {
if (this.getParameterValue(parameterName) != null) {
try {
if (this.getParameterValue(parameterName) instanceof String) {
return Integer.parseInt(this.getParameter(parameterName));
} else {
return ((Integer) getParameterValue(parameterName))
.intValue();
}
} catch (NumberFormatException ex) {
return -1;
}
} else
return -1;
}
COM: <s> get the parameter as an integer value </s>
|
funcom_train/34529664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BaseDialogPage showDialog(String name, String title, int width, int height) {
XProject project = XProjectManager.getCurrentProject();
XPageDialog dialog = new XPageDialog( project.getAppFrame() );
return dialog.showDialog( name, title, width, height, false );
}
COM: <s> shows and returns the dialog for the specified name </s>
|
funcom_train/46857556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SimTimeEdit getSteIncomingBeginTime() {
if (steIncomingBeginTime == null) {
steIncomingBeginTime = new SimTimeEdit();
steIncomingBeginTime.setEnabled(false);
steIncomingBeginTime.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent e) {
currentHotSpot.setDirectionInBeginTime(steIncomingBeginTime.getValue());
}
});
}
return steIncomingBeginTime;
}
COM: <s> this method initializes ste incoming begin time </s>
|
funcom_train/11103029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void preprocess() {
log("Detail.preprocess(" + isPostBack() + ")");
String mode = (String) retrieveData(MODE_KEY);
if (mode != null) {
setMode(mode);
}
Subscription subscription = (Subscription) retrieveData(SUBSCRIPTION_KEY);
if (subscription != null) {
this.subscription = subscription;
} else {
setup();
}
}
COM: <s> p restore the code user code instance we are creating or editing </s>
|
funcom_train/19977745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int selectCountBetween(java.util.Date date1, java.util.Date date2) throws SQLException {
return selectCount("dateadded", "BETWEEN '" + DateConverter.getSQLDateString(date1) + "' AND '" + DateConverter.getSQLDateString(date2) + "'");
}
COM: <s> count rows in a time frame </s>
|
funcom_train/2853896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSingleCharOps() throws Exception {
//String str = "|+=-*/<>";
String str = "|+=-";
lexer = new Tokenizer(str);
for (int i = 0; i < str.length(); i++)
expectedOp (str.charAt(i));
}
COM: <s> xxx cannot yet handle characters also beginning multi char ops </s>
|
funcom_train/43430151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel displayGif(final String gif) {
JPanel ret = new JPanel(new BorderLayout());
JLabel img = new JLabel(new ImageIcon(getClass().getResource(gif)));
img.setBorder(BorderFactory.createEmptyBorder(-5,-5,5,5));
ret.add(img,BorderLayout.CENTER);
return ret;
}
COM: <s> returns a jpanel with the given image </s>
|
funcom_train/43579918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getDocEvalGo() {
if (docEvalGo == null) {
docEvalGo = new JButton();
docEvalGo.setBounds(new Rectangle(182, 109, 70, 16));
docEvalGo.setText("Go");
docEvalGo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
DocumentEvalFrame documentEvalFrame = new DocumentEvalFrame();
documentEvalFrame.setVisible(true);
hideMe();
}
});
}
return docEvalGo;
}
COM: <s> this method initializes doc eval go </s>
|
funcom_train/21439212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFullySpecifiedSubtree() {
// check current
if( !isFullySpecified() )
return false;
// check children
for( Iterator<Linkage> i=children_linkages.iterator(); i.hasNext(); ) {
if( !i.next().getChildResidue().isFullySpecified() )
return false;
}
return true;
}
COM: <s> return code true code if the linkage position are defined </s>
|
funcom_train/46107150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File f) {
String extension = getExtension(f);
if (extension != null) {
if (extension.equals("gif") ||
extension.equals("jpeg") ||
extension.equals("jpg") ||
extension.equals("png")) {
return true;
} else {
return false;
}
}
return false;
}
COM: <s> accept only jpg png and gif </s>
|
funcom_train/12367875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void runDisplayGroupsListener() {
Graph activeGraph = getOneActiveGraph();
if (activeGraph != null) {
if ((!(indivService.isGraphLoaded(activeGraph))) ||
(indivService.isGraphReduced(activeGraph))) {
displayErrorMessage(10);
} else {
boolean success = indivService.displayGroups(activeGraph);
if (!success) {
displayErrorMessage(11);
}
}
}
}
COM: <s> listener function to display groups generated for active graph </s>
|
funcom_train/46322374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void colourFlagChanged(ColorProperty newColProp) {
if (newColProp.getName() == "StrokeColor")
stroked = newColProp.get().getAlpha()>0;
else if (newColProp.getName() =="Color")
filled = newColProp.get().getAlpha()>0;
}
COM: <s> set the flag colour of a glyph </s>
|
funcom_train/46680543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSpeaker(Speaker s) throws JexmaraldaException {
if (positions.containsKey(s.getID())){throw new JexmaraldaException(11, s.getID());}
addElement(s);
positions.put(s.getID(),new Integer(getNumberOfSpeakers()-1));
}
COM: <s> adds the specified speaker to the speakertable </s>
|
funcom_train/11112828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handle(Iterator<Directory> directories) throws MetadataException {
while (directories.hasNext()) {
Directory directory = directories.next();
for (int i = 0; i < handlers.length; i++) {
if (handlers[i].supports(directory.getClass())) {
handlers[i].handle(directory, metadata);
}
}
}
}
COM: <s> copies extracted tags to tika metadata using registered handlers </s>
|
funcom_train/48151748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameters() {
double prod = 1;
if (sampleSize > popSize) p = 1.00;
else {
for (int i = 1; i <= sampleSize; i++)
prod = prod * (popSize - i + 1) / popSize;
p = 1 - prod;
}
matchDist.setProbability(p);
reset();
}
COM: <s> compute the probability of a match </s>
|
funcom_train/51821577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNewHeader(int index, String title) {
String[] s = gp.getGraphData(0).getAlterDataTitles();
s[index] = title;
for (int i = 0; i < gp.getNetCount(); i++) {
gp.getGraphData(i).setAlterDataTitles(s);
}
gp.setAlterDataTitles(s);
}
COM: <s> sets a new header if the current one has been modified </s>
|
funcom_train/8197721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRenderer(PolarItemRenderer renderer) {
if (this.renderer != null) {
this.renderer.removeChangeListener(this);
}
this.renderer = renderer;
if (this.renderer != null) {
this.renderer.setPlot(this);
}
notifyListeners(new PlotChangeEvent(this));
}
COM: <s> sets the item renderer and notifies all listeners of a change to the </s>
|
funcom_train/26221288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getMainContentPane() {
if (mainContentPane == null) {
mainContentPane = new JPanel();
mainContentPane.setLayout(new BorderLayout());
mainContentPane.add(getAgentStarterPanel(), BorderLayout.CENTER);
}
return mainContentPane;
}
COM: <s> this method initializes main content pane </s>
|
funcom_train/14329502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNonRpcProc1() throws Exception {
Statement stmt = con.createStatement();
stmt.execute(
"create proc #testsp1 @p1 int, @p2 int out as set @p2 = @p1");
stmt.close();
CallableStatement cstmt = con.prepareCall("{call #testsp1(100, ?)}");
cstmt.setInt(1, 1);
cstmt.execute();
cstmt.close();
}
COM: <s> test that procedure calls with both literal parameters and parameterr </s>
|
funcom_train/33279656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void year(final List<String> lines, final String path) {
final int year = Calendar.getInstance().get(Calendar.YEAR);
if (lines.size() < 2 || !lines.get(1).contains("Copyright (c) " + year)) {
addFailure("Incorrect year in " + path);
}
}
COM: <s> checks the year in the source </s>
|
funcom_train/10822300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toProjectionString() {
String result = new String();
ColumnSchema fs;
for (int i = 0; i < mFields.size(); i++) {
if (i > 0) result += ",";
if ((fs = mFields.get(i)) != null) result += fs.name;
}
return result;
}
COM: <s> return untyped schema string for projection </s>
|
funcom_train/43246016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetEmergencyResponseIndicator() {
System.out.println("setEmergencyResponseIndicator");
String emergencyResponseIndicator = "";
PatientDataObject instance = new PatientDataObject();
instance.setEmergencyResponseIndicator(emergencyResponseIndicator);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set emergency response indicator method of class org </s>
|
funcom_train/18089012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendLine(final String line) throws IOException {
if (socket == null) {
throw new IOException("SimpleFTP is not connected.");
}
try {
writer.write(line + "\r\n");
writer.flush();
if (SimpleFTP.DEBUG) {
System.out.println("> " + line);
}
} catch (final IOException e) {
socket = null;
throw e;
}
}
COM: <s> sends a raw command to the ftp server </s>
|
funcom_train/50877430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onMessage(Message message ){
String request = null;
try{
request = ( (TextMessage) message).getText();
// call 'handleRequest' to process the request.
// hanldeRequest is implemented by the subclasses.
handleRequest( request );
}catch( JMSException e ){
logger.log(Level.SEVERE,"error responding to request " + request, e );
}
}
COM: <s> on message processes the message delivered implemented by the subclass </s>
|
funcom_train/21944356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeUserPasswordDigestFile () throws IOException {
BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor ();
String encryptedPassword = passwordEncryptor.encryptPassword ( password );
FileWriter fw = new FileWriter ( userPasswordDigestFile );
BufferedWriter bw = new BufferedWriter ( fw );
bw.write ( encryptedPassword + "\n" );
bw.close ();
fw.close ();
System.out.println ( "Wrote password: " + password );
}
COM: <s> write the current user password as a password digest to our user password </s>
|
funcom_train/15928138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendTypeParameterSignaturesLabel(String[] typeParamSigs, long flags) {
if (typeParamSigs.length > 0) {
fBuffer.append(getLT());
for (int i = 0; i < typeParamSigs.length; i++) {
if (i > 0) {
fBuffer.append(X10ElementLabels.COMMA_STRING);
}
// fBuffer.append(Signature.getTypeVariable(typeParamSigs[i]));
}
fBuffer.append(getGT());
}
}
COM: <s> appends labels for type parameters from a signature </s>
|
funcom_train/2310008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void batchProcessURL(URL url, Network network) {
if (url == null) {
return;
}
log("Input", Pandora.FINE, url);
Element root = parseURL(url);
if (root != null) {
int attempt = 0;
Exception failure = null;
while (attempt < RETRY) {
attempt++;
try {
processRoot(root, url, network);
network.save();
break;
} catch (Exception failed) {
failure = failed;
log(failed.toString(), Pandora.WARNING);
log("Retrying", Pandora.WARNING);
}
}
if (attempt == RETRY) {
log("Retry failed", Pandora.WARNING);
log(failure);
}
}
}
COM: <s> process the url as part of a batch </s>
|
funcom_train/72340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Component createInputComponents() {
cards = new JPanel(new CardLayout());
cards.add(createCard1(), "INPUT");
cards.add(createCard2(), "SEARCHING");
cards.add(createCard3(), "LIST");
cards.add(createCard4(), "RETRIEVING");
cards.add(createCard5(), "INFO");
return cards;
}
COM: <s> as seen below </s>
|
funcom_train/51588740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean implies(final Permission p) {
if (p instanceof TopicPermission) {
TopicPermission target = (TopicPermission) p;
if ((action_mask & target.action_mask) == target.action_mask) {
if (prefix != null) {
return target.getName().startsWith(prefix);
} else {
return target.getName().equals(getName());
}
}
}
return false;
}
COM: <s> check if the permission implies another permission </s>
|
funcom_train/11320063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAll(String[] options) {
if (options == null) {
String msg = "options parameter cannot be null";
throw new IllegalArgumentException(msg);
}
for (int i = 0; i < options.length; i++) {
String option = options[i];
getOptionList().add(new Option(option, option));
}
}
COM: <s> add the given array of string options to the pick list </s>
|
funcom_train/41431161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAvatar(URL avatarURL) {
byte[] bytes = new byte[0];
try {
bytes = getBytes(avatarURL);
}
catch (IOException e) {
e.printStackTrace();
}
String encodedImage = StringUtils.encodeBase64(bytes);
avatar = encodedImage;
setField("PHOTO", "<TYPE>image/jpeg</TYPE><BINVAL>" + encodedImage + "</BINVAL>");
}
COM: <s> set the avatar for the vcard by specifying the url to the image </s>
|
funcom_train/13298196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMessageNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Message_messageName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Message_messageName_feature", "_UI_Message_type"),
NegotiationPackage.Literals.MESSAGE__MESSAGE_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the message name feature </s>
|
funcom_train/36005074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBorderStroke() {
if (!checkValidCachedFlag(VALID_CACHED_FLAG_BORDER_STROKE)) {
Object borderStrokeValue = getStylePropertyValue(KuixConstants.BORDER_STROKE_STYLE_PROPERTY, false);
if (borderStrokeValue != null) {
cachedBorderStroke = ((Integer) borderStrokeValue).intValue();
} else {
cachedBorderStroke = Graphics.SOLID;
}
validCachedFlags |= VALID_CACHED_FLAG_BORDER_STROKE;
}
return cachedBorderStroke;
}
COM: <s> returns the border stroke int value </s>
|
funcom_train/8690221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean execute() throws BuildException {
attributes.log("Using kjc compiler", Project.MSG_VERBOSE);
Commandline cmd = setupKjcCommand();
cmd.setExecutable("at.dms.kjc.Main");
ExecuteJava ej = new ExecuteJava();
ej.setJavaCommand(cmd);
return ej.fork(getJavac()) == 0;
}
COM: <s> run the compilation </s>
|
funcom_train/28753922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAccessrole(String newVal) {
if ((newVal != null && this.accessrole != null && (newVal.compareTo(this.accessrole) == 0)) ||
(newVal == null && this.accessrole == null && accessrole_is_initialized)) {
return;
}
this.accessrole = newVal;
accessrole_is_modified = true;
accessrole_is_initialized = true;
}
COM: <s> setter method for accessrole </s>
|
funcom_train/20764516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override
public void startAEReader() throws HardwareInterfaceException { // raphael: changed from private to protected, because i need to access this method
setAeReader(new RetinaAEReader(this));
allocateAEBuffers();
getAeReader().startThread(3); // arg is number of errors before giving up
HardwareInterfaceException.clearException();
}
COM: <s> starts reader buffer pool thread and enables in endpoints for aes </s>
|
funcom_train/16651773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void queryInstitutes(){
institutes = new ArrayList<Institute>();
institutes = atarrabiQuery.fetchInstitutes(institutesSearchString, institutesPage, PAGE_SIZE);
if(institutes != null){
setInstitutesNextPageAvailable(institutes.size() > PAGE_SIZE);
setInstitutesPrevPageAvailable(getInstitutesPage() > 0);
if (isInstitutesNextPageAvailable()) {
setInstitutes(new ArrayList<Institute>(institutes.subList(0,PAGE_SIZE)));
}
else {
setInstitutes(institutes);
}
}
}
COM: <s> query for institutes </s>
|
funcom_train/37102059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getAttachment(File f) throws RemoteException {
Object[] attachments = srsServiceStub.getAttachments();
AttachmentPart attachPart = (AttachmentPart) attachments[0];
try {
DataHandler resultFile = attachPart.getDataHandler();
FileOutputStream fos = new FileOutputStream(f);
resultFile.writeTo(fos);
fos.flush();
fos.close();
} catch (IOException ioe) {
System.err.println("Caught IO Exception");
ioe.printStackTrace();
} catch (SOAPException soe) {
System.err.println("Caught SOAP Exception");
soe.printStackTrace();
}
}
COM: <s> function to store the soap attachment into a local file </s>
|
funcom_train/49200403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLinksPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_VSpaceMap_links_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_VSpaceMap_links_feature", "_UI_VSpaceMap_type"),
TransformedPackage.Literals.VSPACE_MAP__LINKS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the links feature </s>
|
funcom_train/8087352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix times(double s) {
Matrix X = new Matrix(m,n);
double[][] C = X.getArray();
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
C[i][j] = s*A[i][j];
}
}
return X;
}
COM: <s> multiply a matrix by a scalar c s a </s>
|
funcom_train/5395588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMatchWhiteSpaceDelimnatedWords() {
System.out.println("matchWhiteSpaceDelimnatedWords");
CharBuffer cb = null;
ByteEncodingAlgorithm.WordListener wl = null;
ByteEncodingAlgorithm instance = new ByteEncodingAlgorithm();
instance.matchWhiteSpaceDelimnatedWords(cb, wl);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of match white space delimnated words method of class org </s>
|
funcom_train/43903463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printSummary(final Exception exception) {
final String type = Utilities.getShortClassName(exception);
String message = exception.getLocalizedMessage();
if (message == null) {
message = Vocabulary.format(VocabularyKeys.NO_DETAILS_$1, type);
} else {
err.print(type);
err.print(": ");
}
err.println(message);
err.flush();
}
COM: <s> prints a summary of the specified exception without stack trace </s>
|
funcom_train/26489939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRadius() {
if ((startAngle == 0 && stopAngle == 360) || (startAngle == stopAngle))
return cellRadius;
int start = startAngle;
int stop = stopAngle;
radius = (outerRadius + innerRadius)/2;
if (start > stop)
stop += 360;
double angle = (double) ((stop - start)/2);
double r = Math.tan(Math.toRadians(angle)) * radius;
return (int)r;
}
COM: <s> gets the radius of the location area </s>
|
funcom_train/9140554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeFlush() {
try {
if (bitOffset > 0)
outBuffer.write(buffer);
if (isLastByteIncomplete) {
writeFile.seek(file.length() - 1);
writeFile.write(outBuffer.toByteArray());
} else
writeFile.write(outBuffer.toByteArray());
} catch(IOException ioe) {
logger.error("Input/Output exception while writing to the file. Stack trace follows.", ioe);
}
}
COM: <s> flushes the in memory buffer to the file after </s>
|
funcom_train/26200455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void end() {
try {
pdfDocument.write(os);
} catch(IOException ioe) {
// Ideally we should throw this. However, PrintJob doesn't throw
// anything, so we will print the Stack Trace instead.
ioe.printStackTrace();
}
// This should mark us as dead
os = null;
pdfDocument = null;
}
COM: <s> this writes the pdf document to the output stream finishing the </s>
|
funcom_train/27713263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endNamespaceDeclScope(int prefix) throws Exception {
if (fContentHandler != null || DEBUG_CALLBACKS) {
// strings
String p = fStringPool.toString(prefix);
// perform callback
if (DEBUG_CALLBACKS) {
System.err.println("endNamespaceDeclScope(" + p + ")");
}
if (fContentHandler != null) {
fContentHandler.endPrefixMapping(p);
}
}
}
COM: <s> report the end of the scope of a namespace declaration </s>
|
funcom_train/2893245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidProject(String id) {
if (projects == null)
return false;
int nProjects = projects.size();
Project project = null;
for (int i = 0; i < nProjects; i++) {
project = (Project) projects.get(i);
if (project.id.getKey().equals(id))
return true;
}
return false;
}
COM: <s> check if project is in cached list </s>
|
funcom_train/19536546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCreature(CreatureInitItem creature) {
if (creatures.indexOf(creature) >= 0)
throw new IllegalArgumentException("Can not add the same creature twice: " + creature.getName());
int index = creatures.size();
creatures.add(creature);
if (selectedCreatures != null)
selectedCreatures.add(Boolean.FALSE);
fireTableRowsInserted(index, index);
}
COM: <s> add a creature to the table model </s>
|
funcom_train/11024204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecuteWithSimpleIntPropertyAndIntegerValue() {
TestBean testBean = new TestBean();
new BeanPropertyValueChangeClosure("intProperty", expectedIntegerValue).execute(testBean);
assertTrue(expectedIntegerValue.intValue() == testBean.getIntProperty());
}
COM: <s> test execute with simple int property and integer value </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.