__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/31980628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Message getMessage() {
int size = messageBacklog.size();
while (0 == size && !shutdown) {
try {
LOGall.debug("AsyncSender waits for a new message!");
synchronized (this) {
wait();
}
}
catch (InterruptedException ie) {}
LOGall.debug("AsyncSender awakens!");
size = messageBacklog.size();
}
if (shutdown) {
return null;
}
Message m=null;
synchronized (messageBacklog){ //lock the msg queue while we retrieve a message
m = (messageBacklog.remove(0)).getMessage();
}
return m;
}
COM: <s> get the message </s>
|
funcom_train/39911026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetUsername() {
System.out.println("getUsername");
employee_client instance = new employee_client();
String expResult = "";
String result = instance.getUsername();
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 username method of class buissness </s>
|
funcom_train/18008413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImageMask(Image mask) throws DocumentException {
if (this.mask)
throw new DocumentException("An image mask can not contain another image mask.");
if (!mask.mask)
throw new DocumentException("The image mask is not a mask. Did you do makeMask()?");
imageMask = mask;
smask = (mask.bpc > 1 && mask.bpc <= 8);
}
COM: <s> sets the explicit masking </s>
|
funcom_train/7542754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean skipNextIF() {
Assert.isTrue(fToken == Symbols.TokenELSE);
while (true) {
nextToken();
switch (fToken) {
// scopes: skip them
case Symbols.TokenRPAREN:
case Symbols.TokenRBRACKET:
case Symbols.TokenRBRACE:
case Symbols.TokenGREATERTHAN:
skipScope();
break;
case Symbols.TokenIF:
// found it, return
return true;
case Symbols.TokenELSE:
// recursively skip else-if blocks
skipNextIF();
break;
// shortcut scope starts
case Symbols.TokenLPAREN:
case Symbols.TokenLBRACE:
case Symbols.TokenLBRACKET:
case Symbols.TokenEOF:
return false;
}
}
}
COM: <s> skips over the next code if code keyword </s>
|
funcom_train/20750455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doneNode(NodeHandle bootstrap) {
if (leafSetMaintFreq > 0) {
// schedule the leafset maintenance event
scheduleMsgAtFixedRate(new InitiateLeafSetMaintenance(),
leafSetMaintFreq*1000, leafSetMaintFreq*1000);
}
if (routeSetMaintFreq > 0) {
// schedule the routeset maintenance event
scheduleMsgAtFixedRate(new InitiateRouteSetMaintenance(),
routeSetMaintFreq*1000, routeSetMaintFreq*1000);
}
}
COM: <s> called after the node is initialized </s>
|
funcom_train/20727326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean inGroup(ExtendedUser user, List<Group> groupList) {
Iterator<Group> group = groupList.iterator();
Group actualGroup = null;
while(group.hasNext()){
actualGroup = group.next();
if(actualGroup.hasUser(user)) return true;
}
return false;
}
COM: <s> returns true if a user is in a group false otherwise </s>
|
funcom_train/18046904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSimpleName()
{ String result = null;
URL url = this.getValue();
if ( url != null )
{ String file = url.getFile();
if ( file != null )
{ int lastSlashIndex = file.lastIndexOf(File.separator);
if ( lastSlashIndex != -1 )
{ result = file.substring(lastSlashIndex + 1); }
}
}
return result;
}
COM: <s> return the simple name of the item </s>
|
funcom_train/47017046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT:
public final List/*<E>*/subList(int fromIndex, int toIndex) {
if ((fromIndex < 0) || (toIndex > _size) || (fromIndex > toIndex))
throw new IndexOutOfBoundsException("fromIndex: " + fromIndex
+ ", toIndex: " + toIndex + " for list of size: " + _size);
COM: <s> returns a view of the portion of this list between the specified </s>
|
funcom_train/2288870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCronExpression(String cronExpression) {
checkFrozen();
try {
// check if the cron expression is valid
new CronTrigger().setCronExpression(cronExpression);
} catch (Exception e) {
throw new CmsIllegalArgumentException(Messages.get().container(
Messages.ERR_BAD_CRON_EXPRESSION_2,
getJobName(),
cronExpression));
}
m_cronExpression = cronExpression;
}
COM: <s> sets the cron expression for this job entry </s>
|
funcom_train/39825331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newMessage(String sender, int type, String text) {
switch (type) {
case NORMAL:
msgsTA.append(sender + ": " + text + "\n");
break;
case JOIN:
msgsTA.append("*** " + sender + " has joined chat session\n");
break;
case LEAVE:
msgsTA.append("*** " + sender + " has left chat session\n");
break;
default:
}
}
COM: <s> appends the passed message to the chat message text area </s>
|
funcom_train/28278228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveDataToModel() throws CoreException {
RepositoryTaskData model = bugWizard.taskData;
model.setAttributeValue(BugzillaReportElement.PRODUCT.getKeyString(),
(String) ((IStructuredSelection) productList.getViewer().getSelection()).getFirstElement());
BugzillaRepositoryConnector.setupNewBugAttributes(repository, model);
BugzillaCorePlugin.getDefault().setPlatformOptions(model);
}
COM: <s> save the currently selected product to the task data when next is clicked </s>
|
funcom_train/2576963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object object) {
if (object instanceof TickUnit) {
TickUnit other = (TickUnit) object;
if (this.size > other.getSize()) {
return 1;
}
else if (this.size < other.getSize()) {
return -1;
}
else {
return 0;
}
}
else {
return -1;
}
}
COM: <s> compares this tick unit to an arbitrary object </s>
|
funcom_train/8604713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
for (Iterator<Entry<File, ScriptManager>> it = this.map.entrySet().iterator(); it.hasNext();) {
try {
it.next().getValue().shutdown();
}
catch (Exception e) {
log.warn("An exception occured during shudown procedure.", e);
}
it.remove();
}
}
COM: <s> broadcast shutdown to all attached script managers </s>
|
funcom_train/25437026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doPhysic(long now) {
if(GalaxyDomination.isLowPerf){
return;
}
int duration = (int) (now - this.lastTime);
if (duration < 3000) {
return;
}
this.lastTime = now;
int nbStars = this.nbStars;
int[] stars = this.stars;
for (int i = 0; i < nbStars; i++) {
if (random.nextInt(100) < 10) {
int index = i * 3;
stars[index] = random.nextInt(5);
}
}
}
COM: <s> change color of some stars </s>
|
funcom_train/36933081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInteger(int theOffset) {
final int result =
(_myBytes[theOffset] & 0xFF) << 24 |
(_myBytes[theOffset + 1] & 0xFF) << 16 |
(_myBytes[theOffset + 2] & 0xFF) << 8 |
_myBytes[theOffset + 3] & 0xFF;
return result;
}
COM: <s> get an integer 32 bit int from the byte buffer </s>
|
funcom_train/3729173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int changePosition(Node n) {
int type = 0;
Link[] lk = position.getLinks();
position = n;
for (int i = 0; i < lk.length; i++)
if (n.equals(lk[i].getToNode()))
type = lk[i].getType();
prevPositions.add(new Move(n.getPosition(), type));
return type;
}
COM: <s> this method changes the position of the fugitive </s>
|
funcom_train/39911699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetEh3() {
System.out.println("setEh3");
TextField tf = null;
Page1 instance = new Page1();
instance.setEh3(tf);
// 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 eh3 method of class timesheetmanagement </s>
|
funcom_train/26020219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeMyPhotoIcon() throws ContactsManagerException {
if (logger.isActivated()) {
logger.info("Remove my photo-icon");
}
if (!RcsSettings.getInstance().isSocialPresenceSupported()){
return;
}
try {
setContactPhotoIcon(MYSELF, null);
} catch (Exception e) {
if (logger.isActivated()) {
logger.error("Internal exception", e);
}
throw new ContactsManagerException(e.getMessage());
}
}
COM: <s> remove my photo icon in the eab </s>
|
funcom_train/48580552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
GUIConnector connector = new GUIConnector();
for(ValueHeuristicLink current : valueHeuristicLinks) {
connector.addPanel(current.fetchGUIComponent());
}
for(IIntervalHeuristic current : timers) {
connector.addPanel(current.fetchGUIComponent());
}
// Adds the preview option tick box
preview = handler.getOutputPanel();
if(preview != null) {
connector.addPanel(preview);
}
connector.run();
for(IPublisher current : publishers) {
new Thread((Runnable) current).start();
}
for(IIntervalHeuristic current : timers) {
current.run();
}
}
COM: <s> runs the connecting thread sequentially launching the gui the value heuristics </s>
|
funcom_train/1533181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public GeoList List(String label, List<GeoElement> geoElementList, boolean isIndependent) {
if (isIndependent) {
GeoList list = new GeoList(cons);
int size = geoElementList.size();
for (int i=0; i < size; i++) {
list.add(geoElementList.get(i));
}
list.setLabel(label);
return list;
}
else {
AlgoDependentList algoList = new AlgoDependentList(cons, label, geoElementList);
return algoList.getGeoList();
}
}
COM: <s> creates a free list object with the given </s>
|
funcom_train/1064264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIDPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FreeWritingShape_ID_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FreeWritingShape_ID_feature", "_UI_FreeWritingShape_type"),
WhiteboardPackage.Literals.FREE_WRITING_SHAPE__ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the id feature </s>
|
funcom_train/24000137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPostProcess() throws Exception {
Bag<OclObject> previous = new Bag();
previous.add(OclObjectFactory.create(false));
OclObject res = instance.postProcess(new EvaluationContext(), previous);
assertEquals(previous,res.asRawData());
}
COM: <s> test of post process method of class ocl collection select iterator </s>
|
funcom_train/12804237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectQuery getQuery(String anOQLQueryString) throws PersistenceException {
OQLQuery theQuery;
try {
theQuery = getDatabase().getOQLQuery( anOQLQueryString );
}
catch ( PersistenceException pe ) {
throw pe;
}
catch ( Exception e ) {
throw new PersistenceException( e );
}
return new QueryWrapper( theQuery );
}
COM: <s> gets the query object for a given query </s>
|
funcom_train/14228282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SignalDetectorEvent flushBuffer() throws javax.telephony.media.MediaResourceException {
Dictionary<Symbol, Integer> dict = new Hashtable<Symbol, Integer>();
dict.put(SignalDetectorConstants.p_Duration, new Integer(0));
return this.retrieveSignals(Integer.MAX_VALUE, null, null, dict);
}
COM: <s> tell the signal detector to flush all signals so far collected </s>
|
funcom_train/20696340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static protected void setPrefField (final MUPrefs prefs, final Field field, final Object value) {
try {
field.set(prefs, value);
} catch (IllegalAccessException e) {
System.err.print("Load error: Preference '" + field.getName() + "' inaccessible.");
}
}
COM: <s> utility method for setting preference field </s>
|
funcom_train/6329114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeObject(ObjectOutputStream s) throws IOException {
s.defaultWriteObject();
BaseTreeMap.Node node = _org_ozoneDB_firstNode();
while (!node.isNil()) {
s.writeObject(node.getKey());
s.writeObject(node.getValue());
node = _org_ozoneDB_successor(node);
}
}
COM: <s> serializes this object to the given stream </s>
|
funcom_train/14012783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element addPart(String groupId, String processor) {
Element messagePartGroupElement = getPartGroup(groupId);
Element messagePartElement = getDocument().createElement("message-part");
messagePartElement.setAttribute("processor", processor);
messagePartGroupElement.appendChild(messagePartElement);
return messagePartElement;
}
COM: <s> adds a message part to the document that will be processed by the </s>
|
funcom_train/15662828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAppid(Integer newVal) {
if ((newVal != null && this.appid != null && (newVal.compareTo(this.appid) == 0)) ||
(newVal == null && this.appid == null && appid_is_initialized)) {
return;
}
this.appid = newVal;
appid_is_modified = true;
appid_is_initialized = true;
}
COM: <s> setter method for appid </s>
|
funcom_train/39973028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJAboutButton() {
if (jAboutButton == null) {
jAboutButton = new JButton();
jAboutButton.setPreferredSize(new Dimension(100, 40));
jAboutButton.setText("About");
jAboutButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
getAboutDialog().setVisible(true);
}
});
}
return jAboutButton;
}
COM: <s> this method initializes j about button </s>
|
funcom_train/26226923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInitException(BasicBlock bb, Instruction inst) {
if (!(inst instanceof LocalVarInstruction) ||
!((LocalVarInstruction) inst).isStore()) {
throw new InconsistencyException("Instruction in catch block" +
" must be a store");
}
int register = ((LocalVarInstruction) inst).getIndex();
bb.addInstruction(new QDeclareInitialised(generateVar.getVar(register, Constants.TYP_REFERENCE), true));
}
COM: <s> to add an instruction to initialize a catch block with </s>
|
funcom_train/43925725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMultipartContent() {
if (!"post".equals(this.req.getMethod().toLowerCase())) {
return false;
}
String contentType = this.req.getContentType();
if (contentType == null) {
return false;
}
if (contentType.toLowerCase().startsWith("multipart/")) {
return true;
}
return false;
}
COM: <s> utility method that determines whether this request contains multipart content </s>
|
funcom_train/19410958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRelaxedParsing() throws ParseException {
try {
new ExDate(new ParameterList(), "20080315");
fail("Should throw ParseException");
}
catch (ParseException pe) {
LOG.trace("Caught exception: " + pe.getMessage());
}
CompatibilityHints.setHintEnabled(CompatibilityHints.KEY_RELAXED_PARSING, true);
new ExDate(new ParameterList(), "20080315");
}
COM: <s> allow date values by default if relaxed parsing enabled </s>
|
funcom_train/17201307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Instruction createEventCounterInstruction(int handle, int index, double incrementValue) {
// Now create the instruction to be returned.
Instruction c =
InstrumentedCounter.create(INSTRUMENTED_EVENT_COUNTER,
new IntConstantOperand(handle),
new IntConstantOperand(index),
new DoubleConstantOperand(incrementValue, Offset.zero()));
c.bcIndex = INSTRUMENTATION_BCI;
return c;
}
COM: <s> create a place holder instruction to represent the counted event </s>
|
funcom_train/23199585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToolBar getJJToolBarBar() {
if (jJToolBarBar == null) {
RecordToolbar toolBar = new RecordToolbar();
toolBar.setActionListener(getListener());
toolBar.setInfo(getInfo());
jJToolBarBar = toolBar;
}
return jJToolBarBar;
}
COM: <s> this method initializes j jtool bar bar </s>
|
funcom_train/14230076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Serializable sendPrivateData(CallId call, String address, String terminal, Serializable data) throws NotSerializableException, RemoteException {
TelephonyProvider rp = this.getDelegate();
if (rp != null) {
Object o = rp.sendPrivateData(call, address, terminal, data);
if (!(o instanceof Serializable))
throw new NotSerializableException();
return (Serializable)o;
} else
throw new RemoteException();
}
COM: <s> forward send private data method to real tpi provider </s>
|
funcom_train/22929307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runBare() throws Throwable {
LoggingUtil loggingUtil = null;
try {
loggingUtil = LoggingUtil.getTestCaseLogger(this);
loggingUtil.logStartOfTest();
super.runBare();
}
catch (Exception e) {
handleException(e);
}
catch (Error e) {
handleError(e);
}
finally {
if (loggingUtil != null) {
loggingUtil.logEndOfTest();
}
}
}
COM: <s> override the default test run behavior to write out the current test name </s>
|
funcom_train/18726402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setWithArrow(final boolean on) {
if (on != (Boolean) JaxoPrefs.getPref(JaxoPrefs.Preferred.ARROW)) {
firePropertyChange("Jaxo.withArrow", !on, on);
JaxoPrefs.setPref(JaxoPrefs.Preferred.ARROW, on);
}
}
COM: <s> determines whether to draw arrows on lines arcs and loops </s>
|
funcom_train/35876651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isOverridden(final Method method, final Method candidate) {
if (!hasOverridableAccessModifiers(method, candidate)) {
return false;
}
if (!isSubClassOf(candidate.getDeclaringClass(), method.getDeclaringClass())) {
return false;
}
if (!hasTheSameName(method, candidate)) {
return false;
}
if (!hasTheSameParameters(method, candidate)) {
return false;
}
return true;
}
COM: <s> checks if a method has been overridden by a candidate </s>
|
funcom_train/9769579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test(expected=IllegalArgumentException.class) public void testConstructorThreeSuits() {
Combo[] combos = new Combo[] {this.bamboo_seq, this.bamboo_seq2, this.circle_trp, this.circle_pair, this.character_trp};
new Scoreentry_TWO_SUITS_ONLY(combos);
}
COM: <s> check if three suits fails </s>
|
funcom_train/8013990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperties(Properties p) {
super.setProperties(p);
String desc = "base.";
_updateMethod = setIntProperty(p.getProperty(desc + "updateMethod"));
_checkConcurrency = setBoolProperty(p.getProperty(desc + "checkConcurrency"));
_useBind = setBoolProperty(p.getProperty(desc + "useBind"));
_maxRows = setIntProperty(p.getProperty(desc + "maxRows"));
setRemoteID(getStringProperty(p.getProperty(desc + "remoteID")));
}
COM: <s> this method builds the datastore from the information in the properties </s>
|
funcom_train/19826860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintBackground (Graphics2D g, BasicSlidingTabDisplayerUI.IndexButton b) {
Color c = b.isSelected() ? Color.ORANGE : b.getBackground();
g.setColor (c);
g.fillRect (0, 0, b.getWidth(), b.getHeight());
}
COM: <s> paints the tab background </s>
|
funcom_train/14099970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storePage(Page page){
/*
* A kind of write-thru cache is implemented
* by storing to BOTH the vlps and fps,
* though only the vlps will track previous versions.
*/
syncStorage(page.getSubject());
fps.storePage(page);
vlps.storePage(page);
}
COM: <s> stores a page to persistent storage </s>
|
funcom_train/12180191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setElement(ODOMElement policyElement) {
if (policyElement != selectedElement) {
selectedElement = policyElement;
selectedElement.removeChangeListener(selectedElementListener);
setVocabulary(getVocabulary());
setUAProfName(getUAProfName());
selectedElement.addChangeListener(selectedElementListener);
}
setEnabled(true);
}
COM: <s> called when the policy selection has changed </s>
|
funcom_train/26277779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveItemDown(LgTransferQueueItem i_item) {
//get index
int index=this._itemList.indexOf(i_item);
//if item isn't already last, move down
if(index<(this._itemList.size()-1)) {
this._itemList.remove(i_item);
this._itemList.add(++index,i_item);
}
//update gui
this.notifyObserversCompleteUpdate();
}
COM: <s> moves an item down one position </s>
|
funcom_train/20646724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertRecursive(File[] fl) {
for (int j = 0; j < fl.length ; j++) {
if (! fileList.contains(fl[j])) {
if (fl[j].isDirectory()) {
File[] fld = fl[j].listFiles();
for (int i = 0; i < fld.length ; i++) {
insertRecursive(fld[i]);
}
return ;
}
insert(fl[j]);
}
}
}
COM: <s> insert files or directories and all their contents into this package </s>
|
funcom_train/5677853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dospell ()
{ // create a busy dialog and show it
Checker c=new Checker(F);
c.center(F);
c.setState(true);
// int words, if necessary
if (S==null) initWords();
if (!S.isValid()) // wordlist not found
{ c.setState(false); c.dispose();
return;
}
// create an error dialog and let it do the work
SpellErrorDialog SED=new SpellErrorDialog(F,this);
SED.center(F);
SED.spellCheck(S,c);
// finished
c.doclose();
S.savePrivate();
}
COM: <s> the user wants to spell check </s>
|
funcom_train/28352516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeView( final NodeAgent node ) {
removeAll();
if ( node == null ) return;
add( new JLabel( node.getID() ) );
final List parameters = node.getLiveParameters();
for ( int index = 0 ; index < parameters.size() ; index++ ) {
add( new LiveParameterView( (LiveParameter)parameters.get(index) ) );
}
validate();
}
COM: <s> make the view for the specified node </s>
|
funcom_train/12596819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnName(int colIndex) throws IndexOutOfBoundsException {
if (colIndex >= getColumnCount()) {
throw new IndexOutOfBoundsException(
"The given index [" + colIndex + "] is >= the column count [" + getColumnCount() + "]");
}
int cnt = 0;
for (String column : resultMap.keySet()) {
if (cnt == colIndex) {
return column;
}
cnt++;
}
return null;
}
COM: <s> returns the name of the column at the given index </s>
|
funcom_train/36639949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLowerTriangle(double[] values) throws Matrix.NotSquareException {
if (!getIsSquare())
throw new Matrix.NotSquareException();
int k = 0;
int dim = getRowCount();
for (int r = 0; r < dim; r++) {
for (int c = 0; c < r; c++) {
setElement(r, c, values[k]);
k++;
}
}
}
COM: <s> sets the lower triangle </s>
|
funcom_train/9147202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long readGamma() throws IOException {
int numBits = readUnary();
if (numBits > 63) {
String msg = "Gamma code binary part must be <= 63 bits."
+ " Found numBits=" + numBits;
throw new IOException(msg);
}
return readRest(numBits-1,1l);
}
COM: <s> reads the next value from the input using an elias gamma code </s>
|
funcom_train/4922397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHeaders_NoValue() {
this.doMethodTest("GET /path HTTP/1.1\nHeader1\nHeader2 \n\n", true,
"GET", "/path", "HTTP/1.1", "", "Header1", "", "Header2", "");
}
COM: <s> ensure able to have no value for header </s>
|
funcom_train/19707941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getCDCCodeNameAndSapCode(Object objParam) throws Exception {
logger.log(INFO, this, "\n param in getCDCCodeNameAndSapCode: " + objParam);
return super.getObject("MsappGenericMasterSQL.getCDCCodeNameAndSapCode",objParam);
}
COM: <s> get the cdc code description </s>
|
funcom_train/50976773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkValidURL () {
// checks out the validity of the URL
this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
mNotebookURL = mURLPanel.getFieldData();
mWiz.setNBURL(mNotebookURL);
boolean isValidURL = mWiz.validateNotebookURL();
this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
return isValidURL;
}
COM: <s> checks the validity of the url </s>
|
funcom_train/15723728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDirectoryCreation() {
File f = new File(myOperationsDir);
IDirEntity dir = EntityFactory.createDirEntity(f, null, null);
String name = "testDir";
myManager.createDirectory(dir, name, processInfoListener);
f = new File(myOperationsDir + name);
if (!f.exists()) {
fail("Directory creation failed!");
} else {
f.delete();
}
}
COM: <s> tests if directories are created </s>
|
funcom_train/42642913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUseridPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IActor_userid_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IActor_userid_feature", "_UI_IActor_type"),
DigitalHPSPackage.Literals.IACTOR__USERID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the userid feature </s>
|
funcom_train/36958393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isTypeRef(Node node) {
// TODO: Classes can be referred to as a ConstNode; i.e. "class
// Klass;end; k = Klass.new" the last reference is a ConstNode, not a
// ClassNode. Special way to handle this?
return ((node instanceof ClassNode) || (node instanceof ModuleNode) || (node instanceof ConstNode));
}
COM: <s> determines whether a given node is a type reference class module </s>
|
funcom_train/10197549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setObject(int index, Object value) {
if (value == null && notOverwriteWithNulls) {
return false;
}
if (different(getObject(index), value)) {
PersistentEntry entry = entries[index];
entry.setAutoPadChars(autoPadChars);
moveRecordState(entry, value);
return true;
}
return false;
}
COM: <s> sets field value by index </s>
|
funcom_train/40700634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateOneNotNull(){
if (floatDataControlStart.getValue().isNull() && !floatDataControlEnd.getValue().isNull()){
showError(FrameworkLocale.messages().start_range_field_is_required());
}
if (!floatDataControlStart.getValue().isNull() && floatDataControlEnd.getValue().isNull()){
showError(FrameworkLocale.messages().end_range_field_is_required());
}
}
COM: <s> validation of rule all values must be not null or no one </s>
|
funcom_train/3720822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVersion(String version) throws ProfileException {
String oldVersion = this.version;
try {
vetoableChangeSupport.fireVetoableChange("version", oldVersion, version);
} catch (Exception e) {
throw new ProfileException(null, e);
}
this.version = version;
propertyChangeSupport.firePropertyChange("version", oldVersion, version);
}
COM: <s> setter for property version </s>
|
funcom_train/4920720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInputManagedObjectByFlows() {
// Record checking if input managed object
this.recordReturn(this.managedObjectType,
this.managedObjectType.getFlowTypes(),
new ManagedObjectFlowType<?>[] { this.flowType });
// Test
this.replayMockObjects();
boolean isInput = this.loader
.isInputManagedObject(this.managedObjectType);
this.verifyMockObjects();
// Verify that input
assertTrue("Should NOT be input managed object", isInput);
}
COM: <s> validates that determine is </s>
|
funcom_train/311212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testVect2Pix_ring() throws Exception {
System.out.println("Start test Vect2Pix_ring !!!!!!!!!!!!!!!!!!!");
int nside = 4;
int ipix = 84;
long respix = 0;
HealpixIndex pt = new HealpixIndex(nside);
SpatialVector v1 = pt.pix2vec_ring(ipix);
respix = pt.vec2pix_ring(v1);
assertEquals("respix = " + respix, ipix, respix, 1e-10);
System.out.println("------------------------------------------");
System.out.println(" test vec2pix_ring is done");
}
COM: <s> test vect2 pix ring </s>
|
funcom_train/8407710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsKey(Object key) {
key = convertKey(key);
int hashCode = hash(key);
HashEntry entry = data[hashIndex(hashCode, data.length)]; // no local for hash index
while (entry != null) {
if (entry.hashCode == hashCode && isEqualKey(key, entry.key)) {
return true;
}
entry = entry.next;
}
return false;
}
COM: <s> checks whether the map contains the specified key </s>
|
funcom_train/34259755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean shouldModifyFilePreference(String p_aMessage) {
AddNewFileExtensionDialog lAddNewFileExtensionDialog = new AddNewFileExtensionDialog(FlywheelMsApplication.getInstance().getMainFrame(),
p_aMessage);
return lAddNewFileExtensionDialog.shouldAddNewFileExtension();
}
COM: <s> determines if the user has asked to modify the file preference </s>
|
funcom_train/13360722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateAttachment(Attachment attachment) throws AttachmentException {
try {
jdoManager.updateDataObject(attachment, Attachment.class);
} catch (OACException oexp) {
String msg = "Unable to update attachment: " + oexp.getMessage();
LOG.error(this.getClass(), msg);
throw new AttachmentException(msg, oexp);
}
}
COM: <s> method to modify the metadata for an attachments </s>
|
funcom_train/25804208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void redrawResults(PaintEvent e) {
// TODO Auto-generated method stub
for (Object[] result : resultsCache) {
Image image = (Image) result[0];
int x = (int) (((Double) result[1]) * getSize().x);
int y = (int) (((Double) result[2]) * getSize().y);
e.gc.drawImage(image, x, y);
// image.dispose();
}
}
COM: <s> by lst redraw results which has been displayed </s>
|
funcom_train/32830184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertDataSet(File dataSetFile) {
DataSetFactory dataSetFactory = getDefaultDataSetFactory();
DataSetLoadStrategy dataSetLoadStrategy = getDefaultDataSetLoadStrategy();
MultiSchemaDataSet multiSchemaDataSet = dataSetFactory.createDataSet(dataSetFile);
insertDataSet(multiSchemaDataSet, dataSetLoadStrategy);
}
COM: <s> inserts the test data coming from the given db unit dataset file </s>
|
funcom_train/20907318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUnwrappedString() {
if (result != null && result.length() >= 2) {
if (result.charAt(0) == quoteCharacter
&& result.charAt(result.length() - 1) == quoteCharacter) {
return result.substring(1, result.length() - 1);
}
}
return null;
}
COM: <s> returns the unwrapped string for the result value </s>
|
funcom_train/19259232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleDiskTexture( ActionEvent event ) {
try {
byte[] texture = readTextureFromDisk();
if (texture != null) {
renderer.setOverallTM(texture, texSize, texType);
renderer.setDrawMode(LODLandscape.kUseTexture);
renderer.setAltShading(false);
}
} catch (IOException e) {
JOptionPane.showMessageDialog( this, e.getMessage(), "I/O Error", JOptionPane.ERROR_MESSAGE );
e.printStackTrace();
}
}
COM: <s> handles the user clicking on the disk texture menu item </s>
|
funcom_train/50208918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkParameters() throws BuildException {
/*castor if (mappingFile == null) {
throw new BuildException(
"mappingFile attribute must be set!",
getLocation());
}
if (!mappingFile.exists()) {
throw new BuildException(
"mappingFile does not exist!",
getLocation());
}
*/
if (destDir != null && !destDir.isDirectory()) {
throw new BuildException(
"destination directory \""
+ destDir
+ "\" does not exist "
+ "or is not a directory",
getLocation());
}
}
COM: <s> check that all required attributes have been set and nothing </s>
|
funcom_train/13869763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFooterPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FieldValue_footer_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FieldValue_footer_feature", "_UI_FieldValue_type"),
SmartGenPackage.Literals.FIELD_VALUE__FOOTER,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the footer feature </s>
|
funcom_train/16788083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RQLNode copy() {
RQLTagNode result = new RQLTagNode(getName());
// copy all attributes
for (String attributeKey : getAttributeKeys()) {
result.addAttribute(attributeKey, getAttribute(attributeKey));
}
// copy children
RQLNodeList children = getChildren();
for (int i = 0; i < children.size(); i++) {
RQLNode child = children.get(i);
result.addChild(child.copy());
}
return result;
}
COM: <s> returns a new instance with the same data as this node </s>
|
funcom_train/2577116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle2D shrink(Rectangle2D area, Rectangle2D result) {
if (result == null) {
result = new Rectangle2D.Double();
}
result.setRect(
area.getX() + this.left,
area.getY() + this.top,
area.getWidth() - this.left - this.right,
area.getHeight() - this.top - this.bottom
);
return result;
}
COM: <s> shrinks an area by the space attributes </s>
|
funcom_train/14352651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBodyEditor(JComponent bodyEditor) {
bodyEditor.addPropertyChangeListener(AbstractStorableItemGUI.PROPERTY_NEEDS_COMMIT, new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
setNeedsCommit(((Boolean)event.getNewValue()).booleanValue());
}
});
this.add(bodyEditor, BorderLayout.CENTER);
}
COM: <s> set the body editor </s>
|
funcom_train/7718449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prevQuestion() {
do {
mCurrentIndex = mForm.decrementIndex(mCurrentIndex);
} while (mCurrentIndex.isInForm() && !isRelevant(mCurrentIndex));
// recursively skip backwards past any groups, and pop them from our
// stack
if (indexIsGroup(mCurrentIndex)) {
prevQuestion();
}
}
COM: <s> moves index to the previous relevant index representing a question </s>
|
funcom_train/9235959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getOSVersion() {
return System.getProperty("os.name", "unknown") + " "
+ System.getProperty("os.version", "unknown") + " "
+ System.getProperty("os.arch", "unknown") + "; "
+ System.getProperty("file.encoding", "unknown") + "; "
+ Locale.getDefault().toString();
}
COM: <s> returns the systems os version </s>
|
funcom_train/2309564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStateName(int state) {
if (state == PANIC) {
return "PANIC";
} else if (state == ALERT) {
return "ALERT";
} else if (state == ACTIVE) {
return "ACTIVE";
} else if (state == BORED) {
return "BORED";
} else if (state == ASLEEP) {
return "ASLEEP";
} else if (state == UNCONSCIOUS) {
return "UNCONSCIOUS";
}
return String.valueOf(state);
}
COM: <s> return the name of the current state </s>
|
funcom_train/22267935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
this.isActive = true;
this.nextTrigger = cpu.getCycles() + this.latch + START_DELAY;
if (TIMER_DEBUG && c64.getLogger() != null) {
c64.getLogger().info(this.name + ": Starting timer: " + this.latch + ", isOneShot: " + this.isOneShot + ", triggered on: " + this.nextTrigger);
}
}
COM: <s> start the timer </s>
|
funcom_train/14640151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFrom() {
if ("".equals(from))
{
if (getParent() instanceof Entity)
{
from=((Entity)getParent()).getName().toUpperCase();
}
else if (getParent() instanceof Nugget)
{
from=((Nugget)getParent()).getRawFrom().toUpperCase();
}
}
return this.from;
}
COM: <s> returns the parameterized from if it has been defined </s>
|
funcom_train/44420802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendService(){
//TODO: Add outbound filter hooks
//Send message to network
if( msg != null){ //sanity check
messageRelay.putORPGMessage(msg);
}
msg = null;
mode= NONE_MODE;
//return this thread to the pool to get assigned a new message to handle;
this.threadPool.returnServiceThread(this);
}
COM: <s> internal method to handle the threaded send operation </s>
|
funcom_train/33665384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("YearMonthDurationAttribute: [\n");
sb.append(" sign: " + sign);
sb.append(" years: " + years);
sb.append(" months: " + months);
sb.append("]");
return sb.toString();
}
COM: <s> converts to a string representation </s>
|
funcom_train/22527333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setPanelEnabled(boolean enabled) {
fTextHref.setEnabled(!enabled);
fTextTitle.setEnabled(enabled);
fTextURI.setEnabled(enabled);
fComboType.setEnabled(enabled);
fTextInitialValue.setEnabled(enabled);
fComboBoolean.setEnabled(enabled);
fRestrictionTypeEditorPanel.setPanelEnabled(enabled);
}
COM: <s> set the main panel enabled </s>
|
funcom_train/8096289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testListOptions() {
if (m_OptionTesterLoader.getOptionHandler() != null) {
if (!m_OptionTesterLoader.checkListOptions())
fail("Loader: Options cannot be listed via listOptions.");
}
if (m_OptionTesterSaver.getOptionHandler() != null) {
if (!m_OptionTesterSaver.checkListOptions())
fail("Saver: Options cannot be listed via listOptions.");
}
}
COM: <s> tests the listing of the options </s>
|
funcom_train/5872777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addHighlightDecorator(HighlightDecorator hd) {
if (hd == null) return;
String uuid = getUuid();
response("addHighlightDecorator" + hd.getId(), new AuScript(this,
"zk.Widget.$(\""+uuid+"\").addHighlightDecorator(\"" + uuid + "\"" + ","
+ hd.toString() + ")"));
}
COM: <s> add a highlight decorator to bandinfo </s>
|
funcom_train/40312403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsSigned_InvalidColumn1() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.isSigned(-1);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by isSigned method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests is signed with negative column index </s>
|
funcom_train/45133874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GregorianCalendar getValueGregorianCalendar() throws NullPointerException, XMLInvalidTypeException {
GregorianCalendar value;
try {
value = DateUtil.toGregorianCalendar(getValueString(),DATE_MASK);
return value;
} catch (NullPointerException npE) {
throw npE;
}
catch (Exception e) {
throw new XMLInvalidTypeException("Object is not a date");
}
}
COM: <s> returns the gregorian calendar date value of the root tag </s>
|
funcom_train/49952562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void serialize(Object objToSerialize, String fileName) {
try {
ObjectOutputStream out = new ObjectOutputStream(
new FileOutputStream(fileName));
out.writeObject(objToSerialize);
out.close();
System.out.println("Object : " + objToSerialize.getClass()
+ " serialized successfully on disk.");
} catch (Exception ex) {
System.out.println("Error Saving Object to File :"
+ ex.getMessage());
ex.printStackTrace();
}
}
COM: <s> serializes the object to a file </s>
|
funcom_train/7643422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int length() throws UnsupportedOperationException {
if (this.type == TYPE_MALFORMED_INPUT
|| this.type == TYPE_UNMAPPABLE_CHAR) {
return this.length;
}
// niochar.09=The length of the erroneous input is only meaningful to
// a malformed-input error or an unmappble character error
throw new UnsupportedOperationException(Messages
.getString("niochar.09")); //$NON-NLS-1$
}
COM: <s> gets the length of the erroneous input </s>
|
funcom_train/26324859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetChildCountBackgroundCard() throws Exception {
loadStack(SIMPLE_PROJECT);
FCObject bg = _store.getFCObjectByID(FCValue.ZERO);
FCValue count = _store.getChildCount(FCRuntime.CARD_TYPE, bg);
assertEquals("Incorrect card count in background.", 2, count.getAsInt());
}
COM: <s> tests retrieving the number of cards in a background </s>
|
funcom_train/2499682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String extractFields(){
StringBuffer result = new StringBuffer();
if (fields != null){
for (FieldHelper field : fields){
result.append(field.toString()).append("\n");
}
result.append("\n");
// GET and SET Methods
for (FieldHelper field : fields){
if (field.isHasGetMethod()){
MethodHelper getMethod = field.getGetMethod();
result.append(getMethod.toString()).append("\n");
}
if (field.isHasSetMethod()){
MethodHelper setMethod = field.getSetMethod();
result.append(setMethod.toString()).append("\n");
}
}
}
return result.toString();
}
COM: <s> this method converts the list of fields to string with java code restrictions </s>
|
funcom_train/12713221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeParameter( String name ) {
for ( Iterator it = paramList_.iterator(); it.hasNext(); ) {
WekaCeaParameter param = (WekaCeaParameter) it.next();
if ( name.equals( param.getName() ) ) {
it.remove();
return;
}
}
throw new IllegalArgumentException( "No such parameter: " + name );
}
COM: <s> removes a named parameter from this tasks parameter list </s>
|
funcom_train/6476843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void step() {
state = Agent.SUSPENDED;
// This makes a call to the checkpoint manager to see if we are trying
// to step a checkpoint. If this is the case, then this method is called
// recursively to start the relevant checkpoint.
if (!checkpointManager.stepCurrentCheckpoint()) {
thread.interrupt();
}
}
COM: <s> step method should only be invoked by the debugger </s>
|
funcom_train/29380193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValid(String isbn) {
if (isbn == null || isbn.length() < 10 || isbn.length() > 13) {
return false;
}
if (isFormatted(isbn) && !isValidPattern(isbn)) {
return false;
}
isbn = clean(isbn);
if (isbn.length() != 10) {
return false;
}
return (sum(isbn) % 11) == 0;
}
COM: <s> if the isbn is formatted with space or dash separators its format is </s>
|
funcom_train/16380471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTriesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new UnsettablePropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ConfigType1_tries_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ConfigType1_tries_feature", "_UI_ConfigType1_type"),
CTEPackage.Literals.CONFIG_TYPE1__TRIES,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the tries feature </s>
|
funcom_train/29274136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean test(File testFile) {
try {
if (!testFile.canRead()) {
return false;
}
}
catch (Exception ex) {
return false;
}
if (!fileExtensions.contains(ReaderUtils.getExtension(testFile))) {
return false;
}
try {
new WordDocument(new FileInputStream(testFile));
}
catch (Exception ex) {
return false;
}
return true;
}
COM: <s> determines whether a file is an open office writer document </s>
|
funcom_train/18747977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void propagate(int keyIndex, Node image, Map<String,Label> valuation) {
extend(getPosLabelEdgeMap(keyIndex), getPosEdgeSet(image), valuation, true);
extend(getInvLabelEdgeMap(keyIndex), getInvEdgeSet(image), valuation, false);
}
COM: <s> propagates a previously made extension to the matchings by also matching the </s>
|
funcom_train/3876014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newDatabase() {
if (confirmClose()) {
database = new Database();
completionDB = new DynamicCompletionDatabase(database);
tree.setModel(new DatabaseTreeModel(database));
errorsView.reset();
errorsView.setVisible(false);
setTitle(MAIN_TITLE);
}
}
COM: <s> that method is used to remove all the information from the database and </s>
|
funcom_train/3641006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setpointChanged(final double value) {
Set<ProcessControllerListener> lset = null;
synchronized (listenerSet) {
lset = new HashSet<ProcessControllerListener>(listenerSet);
}
for (Iterator<ProcessControllerListener> i = lset.iterator(); i.hasNext();) {
i.next().setpointChanged(this, value);
}
}
COM: <s> notify the listeners about the change </s>
|
funcom_train/30009192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddRoot() {
System.out.println("addRoot");
File root = null;
RootList instance = new RootList();
int expResult = 0;
int result = instance.addRoot(root);
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 add root method of class papyrus </s>
|
funcom_train/20880978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
while (true) {
try {
thread.sleep(sleepTime);
if (System.currentTimeMillis() > (lastuse + 3000)) {
if ((visibility) >= 0.0f) {
visibility -= 0.02f;
}
} else {
if ((visibility) <= 1.0f) {
visibility += 0.02f;
}
}
} catch (InterruptedException e) {
}
}
}
COM: <s> the internal thead for managing visibility </s>
|
funcom_train/32157986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHandler(IHandler handler) {
if (isOpen.get()) {
callCurrentHandlerOnDestroy();
}
IHandlerChangeListener changeListener = handlerReplaceListenerRef.get();
if (changeListener != null) {
IHandler oldHandler = handlerAdapter.getHandler();
changeListener.onHanderReplaced(oldHandler, handler);
}
handlerAdapter = HandlerAdapter.newInstance(handler);
// init app handler
initCurrentHandler();
}
COM: <s> set the handler </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.