__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/25735779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Peptide getNtFragment(int pos) throws ProcessException {
if (precursor == null) {
throw new ProcessException("Please, call process(precursor) first");
}
if (pos <= 0 || pos > precursor.length()) {
throw new IllegalArgumentException(pos + ": bad ending position");
}
return new Peptide.Builder(precursor).to(pos).cterm(cTerm).build();
}
COM: <s> get the nt peptide to the given excluded index </s>
|
funcom_train/25706787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resortTable() {
if( MessageTreeTableSortStateBean.isThreaded() ) {
return;
}
final FrostMessageObject root = (FrostMessageObject) getTree().getModel().getRoot();
root.resortChildren();
((DefaultTreeModel)getTree().getModel()).reload();
}
COM: <s> resort table based on settings in sort state bean </s>
|
funcom_train/46573766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
setTitle(simpleApplicationInterface.getHeader());
setBounds(0,0,(getToolkit().getScreenSize().width)-250, Math.round(getToolkit().getScreenSize().height/4*3));
setVisible(true);
}
COM: <s> displays the frame </s>
|
funcom_train/1086246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLongitude(String longitude) {
// Konwersja wartosci longitude na typ Double.
try {
this.longitude = Double.parseDouble(longitude);
}
catch (NumberFormatException nfe) {
if (log.isErrorEnabled()) {
log.error("[GeoPoint::setLongitude(String longitude)] Blad konwertowania longitude dla " + longitude);
log.error(nfe.getMessage());
}
}
}
COM: <s> ustawia wartosc longitude </s>
|
funcom_train/23011573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getList(int id){
int n = size();
Vector res = new Vector();
for (int i=0; i<n; i++)
if (((MetaElement)elementAt(i)).id == id) {
res.addElement(((MetaElement)elementAt(i)).value);
}
return res;
}
COM: <s> returns a list of values of metadata elements with a given </s>
|
funcom_train/32156385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getConsoleScrollPane(int width, int height) {
if (consoleScrollPane == null) {
consoleScrollPane = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
consoleScrollPane.setViewportView(getConsole());
consoleScrollPane.setPreferredSize(new Dimension(width, height));
}
return consoleScrollPane;
}
COM: <s> this method initializes console scroll pane </s>
|
funcom_train/49078660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Coupon create(){
String ID = null;
try {
ID = new GUID().generate();
} catch (Exception ex) {
ex.printStackTrace();
}
Coupon coupon = new Coupon();
coupon.setCouponGUID(ID);
Cache c = Cache.getInstance();
c.getInstance().put(ID,coupon);
coupon.setDirty(true);
return coupon;
}
COM: <s> creates a coupon object that is empty except for an id guid </s>
|
funcom_train/10509769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRefid(Reference r) throws BuildException {
if (hasPatterns(defaultPatterns)) {
throw tooManyAttributes();
}
if (!additionalPatterns.isEmpty()) {
throw noChildrenAllowed();
}
if (hasSelectors()) {
throw noChildrenAllowed();
}
super.setRefid(r);
}
COM: <s> make this instance in effect a reference to another instance </s>
|
funcom_train/2760310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Step getStep(String localPart, boolean mustExist) {
for(int i = 0; i < _steps.length; i++) {
if(localPart.equals(_steps[i].getName().getLocalPart())) {
return _steps[i];
}
}
if(mustExist) {
throw new IllegalArgumentException("State("+localPart+") does not exist in flow("+getName()+").");
}
return null;
}
COM: <s> returns the step with the supplied name </s>
|
funcom_train/2802469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show() {
Project project = mMainGui.getProject();
DefaultListModel listModel = (DefaultListModel) mListTransports.getModel();
listModel.clear();
for (RvTransport rvTransport : project.getTransports().values()) {
listModel.addElement(rvTransport);
}
mMainGui.showPlugin("Rendezvous Transport".intern(), mMainPanel);
}
COM: <s> displays this form </s>
|
funcom_train/26587816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSearchable(int index) throws SQLException {
checkValidColumn(index);
try {
int type = columnCharacteristics.getColumnType(index -
DaffodilDBDriver.COLUMN_OFFSET);
int dataType = getDataType(type);
return! (dataType == memoType || dataType == imageType);
}
catch (DException e) {
throw e.getSqlException(connection.getLocale());
}
}
COM: <s> indicates whether the designated column can be used in a where clause </s>
|
funcom_train/545982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double computePositiveMin() {
double mi = Double.MAX_VALUE;
DataList e = theData;
if(hasFilter()) e = theFilteredData;
while (e != null) {
if (e.y > 0 && e.y < mi) mi = e.y;
e = e.next;
}
return mi;
}
COM: <s> compute minimun of positive value </s>
|
funcom_train/22232846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SceneGraphPath getTriggeringPath() {
if (behav == null) {
throw new IllegalStateException(J3dI18N.getString("WakeupOnCollisionMovement5"));
}
synchronized (behav) {
if (!behav.inCallback) {
throw new IllegalStateException
(J3dI18N.getString("WakeupOnCollisionMovement5"));
}
}
return (collidingPath != null ?
new SceneGraphPath(collidingPath): null);
}
COM: <s> retrieves the path describing the object causing the collision </s>
|
funcom_train/37648800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Button buildRuleReferenceButton(Composite parent) {
final Button button = new Button(parent, SWT.CHECK);
button.setText(getMessage(StringKeys.PREF_RULEEDIT_BUTTON_RULE_REFERENCE));
button.setEnabled(false);
button.setSelection(editedRule instanceof RuleReference);
return button;
}
COM: <s> build the rule reference button </s>
|
funcom_train/46281803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IndexWriter indexWriter() throws OmmsIndexerException {
try {
if (m_iwriter == null) {
m_iwriter = new IndexWriter(directory(), analyzer(),
IndexWriter.MaxFieldLength.UNLIMITED);
}
} catch (IOException e) {
e.printStackTrace();
throw new OmmsIndexerException(ErrorCondition.internal_server_error , e.getMessage());
}
return m_iwriter;
}
COM: <s> returns the index writer </s>
|
funcom_train/43101167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAggregation(Object handle, Object aggregationKind) {
if (handle instanceof MAssociationEnd
&& aggregationKind instanceof MAggregationKind) {
((MAssociationEnd) handle).setAggregation(
(MAggregationKind) aggregationKind);
return;
}
throw new IllegalArgumentException("handle: " + handle
+ " or aggregationKind: " + aggregationKind);
}
COM: <s> sets the aggregation of some model element </s>
|
funcom_train/18319433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void z2(StateMachineContext context) throws CommonException {
ThreadInfo ti = (ThreadInfo)context.getEventContext().getParameter(Params.Event.THREAD_INFO);
Position p = (Position)context.getEventContext().getParameter(Params.Event.POSITION);
SMThread thread = (SMThread)threads.get(ti);
thread.suspendedOnStep(p);
}
COM: <s> suspended on step </s>
|
funcom_train/32791007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getColumnName(String attName, Table t) {
if (t.isColumn(attName.toUpperCase())) {
for (int i = 1;; i++) {
if (!t.isColumn(attName.toUpperCase() + "_" + i)) {
return new String(attName.toUpperCase() + "_" + i);
}
}
} else {
return new String(attName.toUpperCase());
}
}
COM: <s> mapping of attribute names to column names </s>
|
funcom_train/50982863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEquals() {
final FakeCommand a = new FakeCommand();
final FakeCommand b = new FakeCommand();
final FakeCommand c = null;
final FakeCommand d =
new FakeCommand() {
private static final long serialVersionUID = 1L;
};
new EqualsTester( a, b, c, d );
}
COM: <s> test the equals method </s>
|
funcom_train/31625410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModelFilledStatus(ModelFillStatus newStatus) {
fillStatus = newStatus;
if (this.getParent() != ModelNode.NO_PARENT) {
DefaultModelNode parent = (DefaultModelNode) this.getParent();
ModelFillStatus oldStatus = parent.getModelFillStatus();
ModelFillStatus newParentStatus = oldStatus.intersect(fillStatus);
parent.setModelFilledStatus(newParentStatus);
}
}
COM: <s> set the model status in terms of filled parts </s>
|
funcom_train/39378985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected TreeNode find(TreeNode node, String id) {
for (Iterator it = iterator(node); it.hasNext();) {
TreeNode result = (TreeNode) it.next();
if (result.getId().equals(id)) {
return result;
}
}
return null;
}
COM: <s> finds and returns the first node that matches the id starting the search </s>
|
funcom_train/14311168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connectToServer(ServerInfo info) {
try {
Display.getDisplay(Ibtu.this).setCurrent(history);
client = new Client(ibtuUuid, MAX_MESSAGE_SIZE,
MAX_MESSAGE_SIZE, new ClientListener(Display
.getDisplay(Ibtu.this), history));
client.connect(info);
} catch (Exception ex) {
Logger.error("Error creating client", ex);
Display.getDisplay(Ibtu.this).setCurrent(
new Alert("Error", "Error creating client: "
+ ex.getMessage(), null, AlertType.ERROR),
conForm);
}
}
COM: <s> intializes client when user decides to act as one </s>
|
funcom_train/6488605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static class Factory {
/** The singleton instance. */
private static Singleton instance = null;
/**
* Obtain the singleton instance.
*
* @return a singleton reference.
*/
public static final Singleton getInstance() {
return instance;
}
/**
* Set the singleton instance. This is a mechanism for configuration
* code to set the singleton instance.
*/
protected static final void setInstance(Singleton instance) {
Singleton.Factory.instance = instance;
}
}
COM: <s> factory for obtaining the singleton instance </s>
|
funcom_train/5165263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPopulations(final List a_populations) {
m_populations = a_populations;
int popSize = m_populations.size();
if (m_maxSize != 0 && popSize > m_maxSize) {
for (int i = m_maxSize; i < popSize; i++) {
m_populations.remove(m_maxSize);
}
}
}
COM: <s> sets the list of populations to the list provided </s>
|
funcom_train/46115904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean nextIsEmpty(StartElement elem){
int index = eventList.indexOf(elem);
XMLEvent nextEvent = eventList.get(index+1);
if(nextEvent != null){
if(nextEvent.isEndElement()){
EndElement nextEndElem = nextEvent.asEndElement();
if(elem.getName().getLocalPart().equals(nextEndElem.getName().getLocalPart())){
return true;
}
}
}
return false;
}
COM: <s> helper method to check if element is empty </s>
|
funcom_train/5021800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IEditorPart openFinancialEditor(ProjectWrapper projectWrapper) {
ProjectFinancialEditorInput elementEditorInput = new ProjectFinancialEditorInput(projectWrapper, projectWrapper.getUuid());
IEditorPart editorPart = doOpen(elementEditorInput, UIConstants.financialeditor_id);
if (editorPart != null) {
addEditor("Financial:" + projectWrapper.getUuid(), editorPart);
}
return editorPart;
}
COM: <s> the financial editor for the project wrapper </s>
|
funcom_train/49752330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getComandoOKProxy() {
if (comandoOKProxy == null) {//GEN-END:|64-getter|0|64-preInit
// write pre-init user code here
comandoOKProxy = new Command("Ok", Command.OK, 0);//GEN-LINE:|64-getter|1|64-postInit
// write post-init user code here
}//GEN-BEGIN:|64-getter|2|
return comandoOKProxy;
}
COM: <s> returns an initiliazed instance of comando okproxy component </s>
|
funcom_train/34256718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleTreePath(TreePath path) {
for (int i = 0; i < collapsablePanelStates.length; i++) {
ChartletCollapsablePanelState state = collapsablePanelStates[i];
Chartlet chartlet = state.getChartlet();
CollapsablePanel panel = (CollapsablePanel) getCollapsablePanelMap().get(state);
handleTreePath(path, chartlet, panel);
}
}
COM: <s> for a given new tree path redraw any affected chartlets </s>
|
funcom_train/47746170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(){
reload=true;
while(reload){
synchronized(this){
try {
reload=false;
wait(DELAY);
yield();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
uwsi.listWebSite.remove(siteName);
uwsi.listThreadDeconnect.remove(siteName);
if(uwsi.listWebSite.size()==0){
WebMonitorGraphic.getGraphicView();
GraphicSubView.manager.deleteUser(uwsi.getUser().getIp());
}
WebMonitorGraphic.getGraphicView();
GraphicSubView.asyncUpdateView();
}
COM: <s> when the delay is finish we delete the record </s>
|
funcom_train/16676539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected AbstractManager() throws InstantiationException {
if (managers.contains(getClass( ).getName( ))) {
throw new InstantiationException(I18n.getString("AbstractManager.exception.onlyOneInstanceAllowed") + getClass( ).getSimpleName( )); //$NON-NLS-1$
}
else {
managers.add(getClass( ).getName( ));
}
}
COM: <s> constructs a new instance of this manager if an instance does </s>
|
funcom_train/44296940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Row createRow(final String code, final IdentifiedObject object) {
final Row row = new Row(escape(code));
if (object != null) {
final Identifier name = object.getName();
if (name != null) {
row.name = escape(name.getCode());
}
row.remark = escape(toString(object.getRemarks()));
}
return row;
}
COM: <s> creates a new row for the given authority code and identified object </s>
|
funcom_train/19370396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RDFLiteralNode createLiteralNodeWithType(final String spec, final IRI dataType){
if (literals.containsKey(spec)){
return literals.get(spec);
}
else{
RDFLiteralNode check = new RDFLiteralNode(spec,dataType);
literals.put(spec,check);
return check;
}
}
COM: <s> creates a literal with associated xsd type </s>
|
funcom_train/30196989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvia() throws Exception {
System.out.println("invia");
/*
ActionMapping mapping = null;
ActionForm form = null;
HttpServletRequest request = null;
HttpServletResponse response = null;
InserisciCVMailAction instance = new InserisciCVMailAction();
ActionForward expResult = null;
ActionForward result = instance.invia(mapping, form, request, response);
assertEquals(expResult, result);
*/
}
COM: <s> test of invia method of class com </s>
|
funcom_train/16796308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasWord(String word) {
int token, tokenAddress;
for (int i=0; i<code.length; i++) {
token = code[i];
if (token<=127) continue;
if (token==EOF) return false;
tokenAddress = token>>TOK_SHIFT;
String str = table[tokenAddress].str;
if (str!=null && str.equals(word)) return true;
}
return false;
}
COM: <s> looks up a word in the symbol table </s>
|
funcom_train/17202573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void failIfYieldpointsDisabled() {
if (!yieldpointsEnabled()) {
VM.sysWrite("No yieldpoints on thread ", threadSlot);
VM.sysWrite(" with addr ", Magic.objectAsAddress(this));
VM.sysWriteln();
VM._assert(false);
}
}
COM: <s> fail if yieldpoints are disabled on this thread </s>
|
funcom_train/41507002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasCopyFromSourceInstructions() {
for(Iterator instrs = instructions(true); instrs.hasNext();) {
SVNDiffInstruction instruction = (SVNDiffInstruction) instrs.next();
if (instruction.type == SVNDiffInstruction.COPY_FROM_SOURCE) {
return true;
}
}
return false;
}
COM: <s> tells whether this window contains any copy from source </s>
|
funcom_train/46821381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
this.getParentNode().removeChild(this);
this.jobDef = null;
this.job = null;
this.mgr = null;
this.contextStack.clear();
if (current.get() == this)
current.remove();
this.transaction = null;
}
COM: <s> clear all the data related to this job node </s>
|
funcom_train/4123742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildNationItem(Nation nation, DefaultMutableTreeNode parent) {
String name = Messages.getName(nation);
ImageIcon icon = getLibrary().getScaledImageIcon(getLibrary().getCoatOfArmsImageIcon(nation), 0.5f);
DefaultMutableTreeNode item = new DefaultMutableTreeNode(new ColopediaTreeItem(nation,
name, icon));
parent.add(item);
}
COM: <s> builds the button for the given nation </s>
|
funcom_train/15396579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JspCompilationInfo compile(String path, Map mockTaglibs) throws Exception {
JspCompilationInfo info = createJspCompilationInfo(path, mockTaglibs);
if (info.jspCompilationRequired()) {
compileJsp(info);
compileJavaToBytecode(info);
} else {
log.debug(" No compilation needed for " + info.getJspSource());
}
return info;
}
COM: <s> compile the specified jsp source file into bytecode </s>
|
funcom_train/31435540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onModule(){
AutoHomeAdminSession.getInstance().printMessage("Sending on command to " + module.getDescription());
try
{
AutoHomeAdminSession.getInstance().sendCommandToX10Module(module, 1);
}
catch(HomeException err)
{
AutoHomeAdminSession.getInstance().printMessage("Failed Transmission because " + err);
}
}
COM: <s> this takes the selected module and turns that device on </s>
|
funcom_train/19252668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttribute(org.infonatural.esb.xml.Attribute[] attributeArray) {
//-- copy array
_attributeList.clear();
for (int i = 0; i < attributeArray.length; i++) {
_attributeList.add(attributeArray[i]);
}
} //-- void setAttribute(org.infonatural.esb.xml.Attribute)
COM: <s> method set attribute </s>
|
funcom_train/28362730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private Problem getProblem( final List<? extends Variable> variables, final Scorer scorer, final Objective objective ) {
final List<Objective> objectives = new ArrayList<Objective>( 1 );
objectives.add( objective );
return new Problem( objectives, variables, getEvaluator( scorer, variables, objective ) );
}
COM: <s> generate a problem from variables a scorer and a single objective </s>
|
funcom_train/27863642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAngle(double ag){
angle = (ag > Utils.TWO_PI) ? (ag % Utils.TWO_PI) : ag;
angleDeg = (int)Math.round(angle * RAD2DEG_FACTOR);
computeSliceEdges();
computePolygonEdges();
VirtualSpaceManager.INSTANCE.repaint();
}
COM: <s> set the arc angle </s>
|
funcom_train/17506397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object staticFieldBase(Class c) {
Field[] fields = c.getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
if (Modifier.isStatic(fields[i].getModifiers())) {
return staticFieldBase(fields[i]);
}
}
return null;
}
COM: <s> returns the base address for accessing some static field </s>
|
funcom_train/171741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(boolean verbose) {
if(((opcode >= Constants.ILOAD_0) &&
(opcode <= Constants.ALOAD_3)) ||
((opcode >= Constants.ISTORE_0) &&
(opcode <= Constants.ASTORE_3)))
return super.toString(verbose);
else
return super.toString(verbose) + " " + n;
}
COM: <s> long output format </s>
|
funcom_train/29954569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshShapeObject() {
ShapeObject shapeObj;
JPanelShapeEdit shapePan;
for (int i=0; i<shapePanels.size(); i++) {
shapeObj = shapes.get(i);
shapePan = shapePanels.get(i);
shapeObj.setNames(shapePan.getNames());
shapeObj.setValues(shapePan.getValues());
}
}
COM: <s> parse the shapes so that they have to right value embeded </s>
|
funcom_train/41722237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean maskMatchesSolutionMask(ColorBlindMask studentMask, TiedNumberExpression<IntegerValue> solutionVariable) {
for (int i = 1; i < 10; i++) {
solutionVariable.setValue(new IntegerValue(i));
ColorBlindMask solutionMask = new ColorBlindMask(this.solution);
if (solutionMask.looksEqualTo(studentMask)) {
return true;
}
}
return false;
}
COM: <s> returns true if given mask matches the mask of the solution </s>
|
funcom_train/11720702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DavResourceLocator getLocatorFromNode(Node repositoryNode) {
String nodePath = null;
try {
if (repositoryNode != null) {
nodePath = repositoryNode.getPath();
}
} catch (RepositoryException e) {
// ignore: should not occur
log.warn(e.getMessage());
}
return getLocatorFromNodePath(nodePath);
}
COM: <s> build a new </s>
|
funcom_train/3738781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void netRegister(byte id, int kills, byte colour, String handle) {
screen.println(Common.formatBasicDate() + " Player: " + id + " (" + handle + "), " + kills + " kills, colour " + colour);
if (ai != null)
ai.netRegister(id, kills, colour, handle);
}
COM: <s> handles recieving information about a player joining </s>
|
funcom_train/29882390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHorizontalMotionIndexHMI(float pHmiValue) {
mCurrentHorizontalMotionIndexHMI = pHmiValue;
mCurrentHorizontalPitch = (120 / mCurrentHorizontalMotionIndexHMI);
// PriDebug.infoln(PriDebug.spacesForPclParseMsgs +
// "PriFonts set Horizontal Motion Index (HMI) to " + pHmiValue);
makeFontCurrent();
}
COM: <s> set horizontal motion index hmi </s>
|
funcom_train/49200588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCategoryPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CategorizedLink_category_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CategorizedLink_category_feature", "_UI_CategorizedLink_type"),
TransformedPackage.Literals.CATEGORIZED_LINK__CATEGORY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the category feature </s>
|
funcom_train/23794488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMonotonicStrideValue() {
if (iteratorInstr instanceof IntSub) {
return -((IntConstantOperand) strideValue).value;
} else if (iteratorInstr instanceof IntAdd) {
return ((IntConstantOperand) strideValue).value;
} else {
throw new Error("Error reading stride value");
}
}
COM: <s> return the stride value for monotonic loops </s>
|
funcom_train/50844738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveRow(CachedObject row) {
writeLock.lock();
try {
copyShadow(row);
setFileModified();
saveRowNoLock(row);
} catch (Throwable e) {
logSevereEvent("saveRow failed", e);
throw Error.error(ErrorCode.DATA_FILE_ERROR, e);
} finally {
writeLock.unlock();
}
}
COM: <s> writes out the specified row </s>
|
funcom_train/44136897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyStopPlaying() {
OSMSoundEvent evt = new OSMSoundEvent(this);
for(int i = 0;i < m_ClientList.size();i++) {
OSMSoundListener lster = (OSMSoundListener)m_ClientList.get(i);
lster.onStopPlaying(evt);
}
}
COM: <s> to notify all the osmsound listener that a sound is stopped playing </s>
|
funcom_train/46477889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCanAccessPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ThreatAgent_CanAccess_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ThreatAgent_CanAccess_feature", "_UI_ThreatAgent_type"),
SecurityContextPackage.Literals.THREAT_AGENT__CAN_ACCESS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the can access feature </s>
|
funcom_train/9352900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void unlistenToAxis(final IAxis removedAxis) {
removedAxis.removePropertyChangeListener(IAxis.PROPERTY_ADD_REMOVE_TRACE, this);
removedAxis.removePropertyChangeListener(IAxis.PROPERTY_LABELFORMATTER, this);
removedAxis.removePropertyChangeListener(IAxis.PROPERTY_PAINTGRID, this);
removedAxis.removePropertyChangeListener(IAxis.PROPERTY_RANGEPOLICY, this);
}
COM: <s> helper that removes this chart as a listener from the required property </s>
|
funcom_train/48475755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addCellOverHandler(com.smartgwt.client.widgets.grid.events.CellOverHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.grid.events.CellOverEvent.getType()) == 0) setupCellOverEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.CellOverEvent.getType());
}
COM: <s> add a cell over handler </s>
|
funcom_train/50603926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object deserialize(Document doc, Element srcElem) throws SOAPException {
TypeMapping mapping = determineTypeMapping(srcElem);
boolean nil = false;
String nilStr = srcElem.getAttribute("xsi:nil");
if (nilStr != null)
nil = Boolean.valueOf(nilStr).booleanValue();
if (nil) return null;
return mapping.deserialize(doc,srcElem,this);
}
COM: <s> deserialize an object </s>
|
funcom_train/51359429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint (Graphics g) {
//Draw the buffer to the real screen
buffer.draw(g);
if (boxSelected) {
g.setColor(Color.red);
//Now make sure the topleft point is at a
//and bottom right point is at b
Rect rect = box.screenNormalize();
g.drawRect((int)rect.a.x, (int)rect.a.y, (int)rect.width(), (int)rect.height());
}
}
COM: <s> this draws the user interface </s>
|
funcom_train/16768410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Aggregate duplicate() throws IOException, ClassNotFoundException {
Aggregate result = new Aggregate();
// serialize
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
writeExternal(oos);
oos.close();
// convert to byte array
byte[] buf = baos.toByteArray();
baos.close();
// create input streams
ByteArrayInputStream bais = new ByteArrayInputStream(buf);
ObjectInputStream ois = new ObjectInputStream(bais);
// deserialize
result.readExternal(ois);
ois.close();
bais.close();
// clone the header if there is one
if (header != null) {
result.setHeader(header.clone());
}
return result;
}
COM: <s> duplicate this message event </s>
|
funcom_train/10628651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPosNegFirstLonger() {
String numA = "2837462783428374767845648748973847593874837948575684767";
String numB = "-293478573489347658763745839457637";
String res = "-2837462783428374767845615168483972194300564226167553532";
BigInteger aNumber = new BigInteger(numA);
BigInteger bNumber = new BigInteger(numB);
BigInteger result = aNumber.xor(bNumber);
assertTrue(res.equals(result.toString()));
}
COM: <s> xor for a positive and a negative numbers the first is longer </s>
|
funcom_train/36763577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getSlotIndex(String code) throws VendingMachineException {
if (code == null){
throw new VendingMachineException(VendingMachine.INVALID_CODE_MESSAGE);
} else if( code.equals(A_CODE)) {
return 0;
} else if ( code.equals(B_CODE)) {
return 1;
} else if ( code.equals(C_CODE)) {
return 2;
} else if ( code.equals(D_CODE)) {
return 3;
} else {
throw new VendingMachineException(VendingMachine.INVALID_CODE_MESSAGE);
}
}
COM: <s> gets the slot index given the code for that slot </s>
|
funcom_train/47160913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMethodResolver(String name, MethodResolver resolver) {
if (methodResolvers == null) {
methodResolvers = new HashMap<String, List<MethodResolver>>();
}
List<MethodResolver> resolvers = methodResolvers.get(name);
if (resolvers == null) {
resolvers = new ArrayList<MethodResolver>();
methodResolvers.put(name, resolvers);
}
resolvers.add(resolver);
}
COM: <s> adds the given method resolver for the given name to this scope </s>
|
funcom_train/31289441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendCommMsg(final String connMsg) {
commMsgs.add(connMsg);
String lowcase = connMsg.toLowerCase().trim();
if ("pass".equals(lowcase)) {
result = TestResult.PASS;
} else if (TestResult.FAIL.equals(lowcase)) {
result = TestResult.FAIL;
reason = FAIL_ASSERT_BY_OUTPUT;
}
}
COM: <s> append a message of communication </s>
|
funcom_train/28702899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasGroup(Group group) {
for (Iterator iterator = getCourseToGroups().iterator(); iterator
.hasNext();) {
CourseToGroup courseToGroup = (CourseToGroup) iterator.next();
if (courseToGroup.getGroup().getId().equals(group.getId())) {
return true;
}
}
return false;
}
COM: <s> checks if the specified group is already assigned </s>
|
funcom_train/22236843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLabel(String lString) {
boolean wasLive = isLive();
NodeProxy parent = null;
if (wasLive) {
// get ref to parent
parent = getParent();
// detach
bg.detach();
}
((Text2D) node).setString(lString);
setCapabilities();
if (!wasLive) {
return;
}
if (parent == null) {
Universe.getLocale().addBranchGraph(bg);
return;
}
parent.getParentGroup().addChild(bg);
}
COM: <s> sets the new label text that will be rendered onto the geometry </s>
|
funcom_train/43898484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetFormattedErrorMessage() {
LOGGER.finer("testGetFormattedErrorMessage");
String exp = "12 / ] + 4";
try {
ExpressionBuilder.parse(exp);
} catch (ParseException pe) {
String formated = ExpressionBuilder.getFormattedErrorMessage(pe, exp);
assertTrue(formated.startsWith("12 / ] + 4\n ^"));
}
}
COM: <s> test of get formatted error message method of class org </s>
|
funcom_train/14233365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getOnlineListName(int listID){
try{
while (true){
PreparedStatement ps=c.prepareStatement("SELECT title FROM lists WHERE list_id="+listID);
ResultSet rs=ps.executeQuery();
if(rs.next())
return rs.getString(1);
else{ // If it doesn't exist, create it, return it.
return null;
}
}
}catch (SQLException e){
e.printStackTrace();
return null;
}
}
COM: <s> gets the name of a list from its list id </s>
|
funcom_train/49046640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem getJRadioButtonMenuButt8toRGB() {
//if (butt8toRGB == null) {
butt8toRGB = new JRadioButtonMenuItem();
butt8toRGB .setText("8bit to RGB");
butt8toRGB .setToolTipText("reforms a 8bit image to a RGB 24bit color image");
butt8toRGB .addActionListener(this);
butt8toRGB .setActionCommand("parameter");
//}
return butt8toRGB;
}
COM: <s> this method initializes the option 8bit to rgb </s>
|
funcom_train/12923928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefineFont2 addAdvance(final int anAdvance) {
if ((anAdvance < Coder.SHORT_MIN)
|| (anAdvance > Coder.SHORT_MAX)) {
throw new IllegalArgumentRangeException(
Coder.SHORT_MIN, Coder.SHORT_MAX, anAdvance);
}
advances.add(anAdvance);
return this;
}
COM: <s> add an advance to the list of advances </s>
|
funcom_train/5078132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Text createText(Composite panel, int style, String text) {
if (getEntry() instanceof PaletteSeparator
|| getPermission() < PaletteEntry.PERMISSION_LIMITED_MODIFICATION) {
style = style | SWT.READ_ONLY;
}
Text textBox = new Text(panel, style);
textBox.setFont(panel.getFont());
if (text != null)
textBox.setText(text);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
data.widthHint = 200;
textBox.setLayoutData(data);
return textBox;
}
COM: <s> creates a code text code </s>
|
funcom_train/167611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetBuffer() {
// 先に、子Nodeの片付けを行う。
super.resetBuffer();
// 再描画バッファを消す。
if (replotBuffer != null) {
replotBuffer = null;
}
// initialize replotBuffer
replotBuffer = new GraphReplotBuffer[nTarget];
for (int i = 0; i < nTarget; i++) {
replotBuffer[i] = new GraphReplotBuffer(this, plotDisplay, values, i);
}
bufferRebuildFlag = true;
}
COM: <s> resets the screen state </s>
|
funcom_train/48889728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Task getTask() {
if (task == null)
task = new Task(txtName.getText(), txtNotes.getText());
task.setName(txtName.getText());
task.setNotes(txtNotes.getText());
task.setDueTo(Helper.decodeDate(txtDueTo.getText()));
task.setTrackable(chkTrackable.isSelected());
task.setTags(txtTags.getText());
return task;
}
COM: <s> retrieves data of task stored in this dialog </s>
|
funcom_train/1531276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean evaluateBoolean(GeoPoint pt) {
if (fVars.length == 1 && "y".equals(fVars[0].toString()))
return evaluateBoolean(new double[] { pt.y / pt.z });
return evaluateBoolean(new double[] { pt.x / pt.z, pt.y / pt.z });
}
COM: <s> evaluates function at given point as boolean </s>
|
funcom_train/15921451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class JLVersion extends polyglot.main.Version {
public String name() { return "jl"; }
public int major() { return 3; }
public int minor() { return 2; }
public int patch_level() { return 0; }
public String toString() { return "3.2.0 (2010-06-03 19:23:58)"; }
}
COM: <s> version information for the base compiler </s>
|
funcom_train/18513942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTask(String t) {
if (t != null) tasks.put(t, t);
this.setString(tasks.size() + " "
+ ResourceManager.getResource("tasks_pending"));
if (tasks.size() > 0) {
this.setValue(tasks.size());
this.setIndeterminate(true);
this.setVisible(true);
}
}
COM: <s> adds new task to list </s>
|
funcom_train/41425639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onSomeOtherRelatedEvent(TimerEvent event, ActivityContextInterface aci) {
try {
trc.info(" --- Special Read: delayed action ---");
OutputStream os = getRequestActivity().getOutputStream();
os.write(SPECIAL_CONTENT.getBytes());
os.flush(); os.close();
} catch (Exception e) {
trc.severe("Error resuming TFTP READ request", e);
}
}
COM: <s> the firing of the related event timeout here actually check the xml </s>
|
funcom_train/9673513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean close(){
// Closing network
if(initialized){
if(network.isRunning()){network.disconnect();}
while(network.isAlive()){try {Thread.sleep(1);} catch (InterruptedException e) {}}
// Saving local settings
network.getUI().message(this.getClass(),UI.ID_NODE_CFG_SAVE,UI.LEVEL_FATAL);
if(!settingsSave(true)){network.getUI().message(this.getClass(),UI.ID_NODE_CFG_SAVE_ERROR,UI.LEVEL_ERROR);}
}
// Finish
started=false;
network.getUI().message(this.getClass(),UI.ID_NODE_CLOSE,UI.LEVEL_INFO);
return(true);
}
COM: <s> shuting down the node </s>
|
funcom_train/10358680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addCommand(Map commandList, String mimeType, CommandInfo command) {
Map commands = (Map) commandList.get(mimeType);
if (commands == null) {
commands = new HashMap();
commandList.put(mimeType, commands);
}
commands.put(command.getCommandName(), command);
}
COM: <s> add a command to a target command list preferred or fallback </s>
|
funcom_train/13679981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ITextEditor getEditor(IWorkbenchPart part) {
if (part instanceof ITextEditor) {
ITextEditor editorPart = (ITextEditor) part;
IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
if (resource != null) {
String extension = resource.getFileExtension();
if (extension != null && extension.equals("j")) {
return editorPart;
}
}
}
return null;
}
COM: <s> returns the editor being used to edit a jasmin file associated with the </s>
|
funcom_train/9805046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasAsynchronousReset(EdifCell cell) {
String str = cell.getName().toLowerCase();
if (str.startsWith("fdc"))
return true;
if (str.startsWith("fddrcpe"))
return true;
if (str.startsWith("fdp"))
return true;
return false;
}
COM: <s> return true if the edif cell ec has an asynchronous reset preset </s>
|
funcom_train/8044093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
Date dt = new Date();
System.out.println(dt.toString() + ": Thread started");
/* try {
sleep(5000);
} catch (InterruptedException e) {
} */
for (int i = 0; i < this.objectList.size(); i++)
{
if (i == this.personNumber)
this.returnObject = (RMITestObject)this.objectList.get(i);
}
dt = new Date();
System.out.println(dt.toString() + ": Thread ended");
}
COM: <s> runmethode des threads </s>
|
funcom_train/50306370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton createButton (String text, String icon) {
URLClassLoader cl = (URLClassLoader) getClass().getClassLoader();
URL url = cl.findResource(icon);
JButton button = new JButton(text,new ImageIcon(url));
button.setBackground(Color.white);
button.setHorizontalTextPosition(SwingConstants.CENTER);
button.setVerticalTextPosition(SwingConstants.BOTTOM);
button.setBorderPainted(false);
button.addActionListener(this);
return button;
}
COM: <s> convenience method for creating buttons </s>
|
funcom_train/39983243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ListBox createColorList() {
ListBox mylistBox = new ListBox();
mylistBox.addChangeHandler(evHandler);
mylistBox.setVisibleItemCount(1);
mylistBox.addItem("Colors");
mylistBox.addItem("white", "white");
mylistBox.addItem("black", "black");
mylistBox.addItem("red", "red");
mylistBox.addItem("green", "green");
mylistBox.addItem("yellow", "yellow");
mylistBox.addItem("blue", "blue");
return mylistBox;
}
COM: <s> method to create the colorlist for the toolbar </s>
|
funcom_train/35036317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int moveDown(NZB nzb) {
int pos=-1;
// If its in the queue and its not the last one
if (queue.contains(nzb) && !queue.getLast().equals(nzb)) {
// Find out it's current position
int currentPos = queue.indexOf(nzb);
queue.remove(nzb);
queue.add(currentPos + 1, nzb);
notifyListeners();
pos=currentPos+1;
}
return pos;
}
COM: <s> moves and nzb down the queue by 1 position </s>
|
funcom_train/26189208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void taskFinished() {
TaskRunner.logger.debug("[TaskRunner] task finished in "+(long) (System.currentTimeMillis()-task_start_time)+" ms");///
task_start_time = System.currentTimeMillis();///
current_task = null; // TODO Possible memory leak
triggerRunTask();
}
COM: <s> to be used be task </s>
|
funcom_train/31900916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStatusBar(StatusBar sb) {
// use super.getContentPane() since this class
// has overridden the functionality
Container pane = super.getContentPane();
if (statusBar != null) {
pane.remove(statusBar);
}
statusBar = sb;
if (statusBar != null) {
pane.add(statusBar, BorderLayout.SOUTH);
}
// validate the current container to repaint the toolbar
invalidate();
validate();
}
COM: <s> sets the given statusbar as the default statusbar </s>
|
funcom_train/50018863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPrefixAndReplacementString(String sPrefix, String sReplacementString) {
PrefixNamespaceNode node = (PrefixNamespaceNode) m_TreeRoots.get(sPrefix.charAt(0));
if (null == node) {
node = new PrefixNamespaceNode(sPrefix.charAt(0));
m_TreeRoots.put(sPrefix.charAt(0), node);
}
node.addChild(sPrefix, 1, sReplacementString);
}
COM: <s> add a prefix and its corresponding replacement string </s>
|
funcom_train/50736591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getUserDetails(PersonSynch userSynch) {
User user = null;
FindUserDetailsCommand command = new FindUserDetailsCommand(userSynch.getId());
if (userSynch == null)
log.error("getUserDetails() - userHolder not given");
CommandDispatcher.getInstance().execute(command);
userSynch.setPerson(command.getPerson());
userSynch.setLastSynch(new Date());
}
COM: <s> retrieve details about the user held by the user synch object </s>
|
funcom_train/38463977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws SQLException {
Iterator it = connections.iterator();
while(it.hasNext()) {
((Connection)it.next()).close();
}
connections.clear();
idle.clear();
url = null;
user = null;
password = null;
open = false;
}
COM: <s> closes the pool </s>
|
funcom_train/40222711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActiveDraggingObject(Widget newActiveDraggingObject, java.awt.event.MouseEvent me) {
activeDraggingObject = newActiveDraggingObject;
if (me == null) {
setDraggingAnchor (null);
return;
}
Point p = new Point (me.getX() - newActiveDraggingObject.getX(), me.getY() - newActiveDraggingObject.getY());
setDraggingAnchor (p);
}
COM: <s> specifies the widget being dragged </s>
|
funcom_train/29926823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void urlAccessViolation(String url) {
TextArea mp = new TextArea("Bad URL\n" +
"There was a security exception accessing the url\n" + url +
"\nremember, applets can only load urls from the same server");
final Frame top = new Frame("Bad URL");
top.addWindowListener(
new WindowAdapter() {
public void windowClosing(WindowEvent windowEvent) {
top.dispose();
}
});
top.add(mp);
top.pack();
top.show();
}
COM: <s> called when a url is improperly accessed </s>
|
funcom_train/19221396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transformation getAbstractHomomorphicImage(Transformation permt){
//GRASP.out.println("Checking:" + permt);
byte[] nt = new byte[n+1];
Iterator sets = vtiles.iterator();
int i = 1;
while (sets.hasNext()){
TiledSet ts = (TiledSet) sets.next();
TiledSet nts = ts.tiledOnAct(permt);
Integer value = (Integer)sets2integers.get(nts);
if (value == null){
nt[i++] = (byte)0;
}
else{
nt[i++] = (byte)value.intValue();
}
}
return new Transformation(nt);
}
COM: <s> returns a partial transformation if it does not permute the tiles </s>
|
funcom_train/45355501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isParentContext(Context ctx, NameClassPair pair) throws NamingException {
Object obj = null;
try {
obj = ctx.lookup(pair.getName());
} catch (Exception e) {
return false;
}
Class theClass = obj.getClass();
Class[] interfaces = theClass.getInterfaces();
for (int i = 0; i < interfaces.length; i++) {
if (interfaces[i].equals(Context.class))
return true;
}
return false;
}
COM: <s> tests if a given pair is a naming context </s>
|
funcom_train/27943575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
if( soundSchemeJarFile != null ) {
try {
soundSchemeJarFile.close();
soundSchemeJarFile = null;
} catch( IOException e ) {
System.err.println( "JSoundSchemeRecord.destroy() - " + e );
}
}
aConfig = null;
bInvalidSoundScheme = true;
}
COM: <s> destroy complete content of object </s>
|
funcom_train/40859618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSpanNearScorerSkipTo1() throws Exception {
SpanNearQuery q = makeQuery();
Weight w = q.weight(searcher);
Scorer s = w.scorer(searcher.getIndexReader(), true, false);
assertEquals(1, s.advance(1));
}
COM: <s> not a direct test of near spans but a demonstration of how when </s>
|
funcom_train/44154567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContainedEntity(ExtentEntity entity) {
Assert.state(!m_frozen, "DataExtent is frozen and cannot be changed anymore");
// Method and Name of entity does not matter
m_containedEntity = entity;
m_containedEntity.setParent(this);
m_collectionId = m_name + "[" + m_containedEntity.toString() + "]";
}
COM: <s> set the entity contained in this collection </s>
|
funcom_train/3371452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void actionPropertyChanged(Action action, String propertyName) {
if (propertyName == Action.ACTION_COMMAND_KEY) {
setActionCommandFromAction(action);
} else if (propertyName == "enabled") {
AbstractAction.setEnabledFromAction(this, action);
} else if (propertyName == Action.SHORT_DESCRIPTION) {
AbstractAction.setToolTipTextFromAction(this, action);
}
}
COM: <s> updates the textfields state in response to property changes in </s>
|
funcom_train/44871636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem createOpenMenuItem() {
JMenuItem openMenuItem = new JMenuItem();
Action openAction = new OpenAction();
openMenuItem.setAction(openAction);
gfIm.put(KeyStroke.getKeyStroke(KeyEvent.VK_O, MENU_MASK), "open");
gfAm.put("open", openAction);
return openMenuItem;
}
COM: <s> this method initializes open menu item </s>
|
funcom_train/36282682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetColumnMetadataByIndex() throws Exception
{
for (int i=0;i<mColumnMetadataList.size();i++)
{
assertEquals(
"Getting column metadata in position " + i,
mColumnMetadataList.get(i),
mMetadata.getColumnMetadata(i) );
}
}
COM: <s> tests the tt get column metadata int tt method that gets column </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.