__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/51646353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void masterDocumentAboutToBeChanged(DocumentEvent masterEvent) {
try {
boolean assertNotNull= adaptProjectionToMasterChange(masterEvent);
fSlaveEvent= normalize(masterEvent);
if (assertNotNull && fSlaveEvent == null)
internalError();
fMasterEvent= masterEvent;
if (fSlaveEvent != null)
delayedFireDocumentAboutToBeChanged();
} catch (BadLocationException e) {
internalError();
}
}
COM: <s> when called this projection document is informed about a forthcoming </s>
|
funcom_train/858400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MouseEvent translateMouseEvent(MouseEvent e) {
return new MouseEvent(TestCaseListPanel.this, e.getID(), e.getWhen(),
e.getModifiers(), e.getX() + getX(), e.getY() + getY(),
e.getClickCount(), e.isPopupTrigger(), e.getButton());
}
COM: <s> translates the given mouse event to the enclosing map panels </s>
|
funcom_train/4074963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(E data) {
/*ans bl*/
if(data instanceof Comparable) {
Comparable element = (Comparable) data;
master.setElement(master.getElement()+1);
if(isEmpty()) {
buildEmpty(data);
}else {
findInsertion(master.getNext(), element);
}
}
else {
addEnd(data);
System.out.println("Cannot sort non-Comparable!\n" +
"Added to the end of list");
}
/*ans ab*/
}
COM: <s> adds the element in sorted order if comparable and throws </s>
|
funcom_train/47673595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pollOnce(int p_id, String p_endpointURI) {
for (Object obj_receiver : getReceivers().values()) {
MessageReceiver receiver = (MessageReceiver) obj_receiver;
if (receiver instanceof VersioningFileMessageReceiver && receiver.getEndpointURI().toString().equals(p_endpointURI)) {
((VersioningFileMessageReceiver) receiver).pollOnce(p_id);
}
}
}
COM: <s> this method triggers the poll once method in all the receivers of class </s>
|
funcom_train/4521198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InstitucionSolicitante update(InstitucionSolicitante entity) {
LogUtil.log("updating InstitucionSolicitante instance", Level.INFO,
null);
try {
InstitucionSolicitante result = entityManager.merge(entity);
LogUtil.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
LogUtil.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved institucion solicitante entity and return it or </s>
|
funcom_train/7929428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Term createTerm(Info info, int pos, String text) {
// Assertion: sortFields has already been called before
Term template = info.template;
if (template == null) { // not yet cached?
String fieldName = (String) sortedFields[pos].getKey();
template = new Term(fieldName, "");
info.template = template;
}
return template.createTerm(text);
}
COM: <s> returns a new term object minimizing string </s>
|
funcom_train/3925536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doubleCapacity() {
int[] newEnvironment = new int[ environment.length * 2 ];
for ( int i = 0; i < environment.length*2; i++ ) {
newEnvironment[i] = -1;
}
for ( int i = 0; i < environment.length; i++ ) {
newEnvironment[i*2] = environment[i];
}
environment = newEnvironment;
}
COM: <s> double the capacity of the environment </s>
|
funcom_train/12081396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand() {
if (okCommand == null) {//GEN-END:|26-getter|0|26-preInit
// write pre-init user code here
okCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|26-getter|1|26-postInit
// write post-init user code here
}//GEN-BEGIN:|26-getter|2|
return okCommand;
}
COM: <s> returns an initiliazed instance of ok command component </s>
|
funcom_train/39243449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
Row r1 = (Row)o1;
Row r2 = (Row)o2;
JobOffer n1 = (JobOffer)r1.getData();
JobOffer n2 = (JobOffer)r2.getData();
int result = n1.getLocation().compareTo(n2.getLocation());
return result;
}
COM: <s> compare job offer locations </s>
|
funcom_train/33072054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseSpringBeansXML(InputStream in) throws Exception {
FuzzyXMLDocument doc = new FuzzyXMLParser().parse(in);
FuzzyXMLNode[] nodes = HTMLUtil.selectXPathNodes(doc.getDocumentElement(),
"/beansProjectDescription/configs/config");
for(int i=0;i<nodes.length;i++){
String value = ((FuzzyXMLElement)nodes[i]).getValue();
if(value!=null){
IFile file = project.getFile(value.trim());
if(file.exists()){
configFiles.add(file);
}
}
}
}
COM: <s> parse the spring ide configuration file </s>
|
funcom_train/4553336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInt(int index) throws JSONException {
Object object = get(index);
try {
return object instanceof Number ?
((Number) object).intValue() :
Integer.parseInt((String) object);
} catch (Exception e) {
throw new JSONException("JSONArray[" + index +
"] is not a number.");
}
}
COM: <s> get the int value associated with an index </s>
|
funcom_train/31662489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSpectrum(Spectrum1D newSpectrum) {
if (this.spectrum != newSpectrum) {
this.spectrum = newSpectrum;
if (peaks != null) {
for (int i = 0; i < this.peaks.length; i++) {
peaks[i].setSpectrum(this.spectrum);
}
}
}
}
COM: <s> assign spectrum to pattern </s>
|
funcom_train/14061628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createSelectionListener() {
selectionListener = new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
Widget widget = event.widget;
if (widget == addButton) {
addPressed();
} else
if (widget == editButton) {
editPressed();
} else
if (widget == removeButton) {
removePressed();
} else
if (widget == upButton) {
upPressed();
} else
if (widget == downButton) {
downPressed();
} else
if (widget == list) {
selectionChanged();
}
}
};
}
COM: <s> creates a selection listener </s>
|
funcom_train/24305552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSchema(Configuration cfg, boolean script, boolean export) {
try {
SchemaUpdate exp = new SchemaUpdate(cfg);
exp.execute(script, export);
} catch (HibernateException ex) {
log.fatal("Cant't update database schema: " + ex.getMessage(), ex);
return;
}
}
COM: <s> updates the current db schema with the schema defined by the hbm </s>
|
funcom_train/33601170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLastEid(int ts, LastEidData lastEid) {
HashSet<LastEidData> last = lastEids.get(ts);
if (last == null) last = new HashSet<LastEidData>();
last.add(lastEid);
lastEids.put(ts, last);
}
COM: <s> keep last eid from an incoming sync message </s>
|
funcom_train/39892878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String addContact(String jabberId, String remoteJabberId) {
String method = "POST";
String url = "/contacts/request";
Map <String, String> paramList = new HashMap<String, String>();
paramList.put("jabberId", jabberId);
paramList.put("remoteJabberId", remoteJabberId);
return TB_Request(method, url, paramList);
}
COM: <s> request a contact relation with this jabberid </s>
|
funcom_train/49263323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showAddDialog() {
Shell shell = tbDrivers.getShell();
String title = Language.getInstance().get(this, "addDialogTitle"); //$NON-NLS-1$
Image icon = UiImageFactory.getInstance().getImage("preference"); //$NON-NLS-1$
AddDriverView view = new AddDriverView(shell, title, icon);
DriverDefinition definition = view.getDriverDefinition();
if (definition != null) {
drivers.add(definition);
updateList();
}
}
COM: <s> shows the add driver dialog </s>
|
funcom_train/14175105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void caretUpdate(CaretEvent e) {
String s = text.getText();
String value = null;
if (s.length() != 0) {
StringBuffer sb = new StringBuffer(s.length());
sb.append(s);
value = sb.toString();
}
if (getLogger().isDebugEnabled()) {
getLogger().debug(
"text is ->" + s + "<-; value is ->" + value + "<-");
}
setValue(value);
}
COM: <s> called whenever the net </s>
|
funcom_train/45074986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void set_domain() {
String domainNameSt = props.getProperty("DomainName");
if (domainNameSt != null) {
AuthorityId id = null;
try {
id = transLib.str_to_authority(domainNameSt);
} catch (Exception e) {
}
if (id != null) {
domain_name_ = id;
cat.debug("set domain name = " + domainNameSt);
}
}
}
COM: <s> set the source domain </s>
|
funcom_train/40729949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDirectoryServicesExternal() throws Exception {
setUpDsExternal();
testAuthentication("llglobal-external", "Gibson");
assertFalse("Internal user who shouldn't be able to log in " +
"through the external web server",
authenticate("llglobal", "Gibson"));
}
COM: <s> tests using the directory services enabled web server with </s>
|
funcom_train/39266197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setMaxTokens() {
maxTokens = 0;
int state = 0; // initially OFF
for (int i = 0; i < stBuffLen; i++) {
switch (state) {
case 0: // OFF
if (!isDelim(stBuff[i])) {
maxTokens++;
state = 1;
}
break;
case 1: // ON
if (isDelim(stBuff[i])) {
state = 0;
}
break;
default:
break;
}
}
}
COM: <s> set the maximum number of tokens in the string </s>
|
funcom_train/37570933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getContentType() throws IOException {
if (m_MIMEType != null)
return m_MIMEType;
else if (m_dataHandler != null) {
readDataFromHandler();
return m_MIMEType;
}
else
throw new IllegalStateException("This LxmlFilingAttachment contains neither a DataHandler nor a byte array. It should have at least one of those things.");
}
COM: <s> return the mime content type of my data </s>
|
funcom_train/6355909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isReportableValue(Object value) {
if(value == null) {
return true;
} else if (value instanceof Enum<?>) {
return true;
} else if (value instanceof String) {
return true;
} else if (value instanceof Boolean) {
return true;
} else if (value instanceof Float || value instanceof Double) {
return true;
} else if (value instanceof Integer || value instanceof Short
|| value instanceof Long) {
return true;
} else if (value instanceof Byte) {
return true;
} else {
return false;
}
}
COM: <s> returns true if a value object is reportable as a primitive value </s>
|
funcom_train/28340014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double normF() {
this.setElem(PhaseIndexHom.HOM, PhaseIndexHom.HOM, 0.0);
double dblNorm = this.getMatrix().normF();
this.setElem(PhaseIndexHom.HOM, PhaseIndexHom.HOM, 1.0);
return dblNorm;
};
COM: <s> return the frobenius norm which is the square root of the </s>
|
funcom_train/2760492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getLogic() {
try {
if(_logic == null) {
if(getImpl() == null) {
_logic = resolveClassOrInterface(getName());
} else {
_logic = resolveClassOrInterface(getImpl());
}
}
return _logic;
} catch(ClassNotFoundException e) {
throw new IllegalStateException("Failed to locate logic for step("+getName()+"):"+e.getMessage());
}
}
COM: <s> returns the logic class for this step </s>
|
funcom_train/22210231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getInlineTextArea() {
if (inlineTextArea == null) {
inlineTextArea = new JTextArea();
//inlineTextArea.setPreferredSize(new java.awt.Dimension(150,19));
inlineTextArea.setRows(5);
inlineTextArea.setLineWrap(true);
inlineTextArea.setColumns(30);
}
return inlineTextArea;
}
COM: <s> this method initializes j text field1 </s>
|
funcom_train/2951622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintChildren(LayoutContext context, int x, int y) {
Box[] children = this.getChildren();
for (int i = 0; children != null && i < children.length; i++) {
Box child = children[i];
child.paint(context, x + child.getX(), y + child.getY());
}
}
COM: <s> paint the children of this box </s>
|
funcom_train/43326951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void writeEA(Printf outfile) throws IOException {
outfile.printf("%5d",n);
outfile.printf(" %c",type);
outfile.printf(" %c",structure);
outfile.printf(" %c",predStructure);
outfile.printf(" %.2f%%",100.0*predH);
outfile.printf(" %.2f%%",100.0*predE);
outfile.printf(" %.2f%%\n",100.0*(1.0 - predH - predE));
}
COM: <s> writes out this residue in ea format </s>
|
funcom_train/47450443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMemberTypeDifferent() {
this.model.getPackages().get(packageName).getMembers().get(id).setType(
"Something_Complete_Different");
Set<ValidationException> validate = sav.validate(model);
assertEquals(1, validate.size());
for (ValidationException ve : validate) {
assertEquals("Specified type Class cannot be different from application Something_Complete_Different", ve
.getMessage());
}
}
COM: <s> test a case where the applied stereotype differ from the valid type and </s>
|
funcom_train/43233769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createFeatureCopy(final FeatureTicketType original) {
try {
final FeatureTicketType concreteCopy =
new FeatureTicketType(TypeManager.this.model, original.getTypeName(),
original.getTypeDescription(), TypeManager.this);
TypeManager.this.setCopy(concreteCopy);
} catch (final IPScrumGeneralException e) {
TypeManager.this.setException(e);
}
}
COM: <s> creates a copy of the feature type </s>
|
funcom_train/8323677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean allowsFromQuery() {
// Older versions of AS400 and MySQL before 4.0 do not allow FROM
// subqueries in the FROM clause.
return !(isMySQL() && productVersion.compareTo("4.") < 0)
&& !isOldAS400() && !isInformix()
&& !isSybase() && !isInterbase();
}
COM: <s> returns whether this dialect allows a subquery in the from clause </s>
|
funcom_train/14364939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IMenuManager createNewSubMenuManager() {
IMenuManager subMenuManager = new MenuManager(Messages.AccountManagerActionProvider_NewMenu_Title, GROUP_NEW_SUB_MENU_ID);
fillContextMenu(subMenuManager, _newActions, null);
return subMenuManager;
}
COM: <s> create new sub menu manager </s>
|
funcom_train/20943824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendComposedText() {
AttributedString as = new AttributedString(buffer.toString());
as.addAttribute(TextAttribute.INPUT_METHOD_HIGHLIGHT,
InputMethodHighlight.SELECTED_RAW_TEXT_HIGHLIGHT);
context.dispatchInputMethodEvent(
InputMethodEvent.INPUT_METHOD_TEXT_CHANGED,
as.getIterator(), 0,
TextHitInfo.leading(insertionPoint), null);
}
COM: <s> send the composed text to the client </s>
|
funcom_train/34028961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte getCharSet() {
CTIntProperty charset = _ctFont.sizeOfCharsetArray() == 0 ? null : _ctFont.getCharsetArray(0);
int val = charset == null ? FontCharset.ANSI.getValue() : FontCharset.valueOf(charset.getVal()).getValue();
return (byte)val;
}
COM: <s> get character set to use </s>
|
funcom_train/1883785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(new BorderLayout());
jPanel.add(getJProgressBar(), BorderLayout.CENTER);
jPanel.add(getJPanel2(), BorderLayout.NORTH);
jPanel.add(getJPanel3(), BorderLayout.EAST);
jPanel.add(getJPanel4(), BorderLayout.WEST);
jPanel.add(getJPanel5(), BorderLayout.SOUTH);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/43014561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMonitoredService(Service service, int i) {
if (monitoredServices == null) {
monitoredServices = new ArrayList<Service>();
}
if (i >= monitoredServices.size()) {
ArrayList<Service> tmp = new ArrayList<Service>(i + 1);
for (int j = 0; j < monitoredServices.size(); j++) {
tmp.add(j, monitoredServices.get(j));
}
monitoredServices = tmp;
}
monitoredServices.add(i, service);
}
COM: <s> add the service in the i position of the monitored services list </s>
|
funcom_train/10871231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRewriteSingleTerm() throws IOException {
AutomatonQuery aq = new AutomatonQuery(newTerm("bogus"), BasicAutomata
.makeString("piece"));
Terms terms = MultiFields.getTerms(searcher.getIndexReader(), FN);
assertTrue(aq.getTermsEnum(terms) instanceof SingleTermsEnum);
assertEquals(1, automatonQueryNrHits(aq));
}
COM: <s> test that rewriting to a single term works as expected preserves </s>
|
funcom_train/47516546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean loadFiles(List<File> files){
String error = null;
for(File file : files){
if(!file.canRead()){
showError(file + " \ndoes not exist or is not readable.");
return false;
}
}
for(File file : files){
error = controller.extractData(file);
if(error != null){
showError("Error reading file: " + error);
break;
}
}
//Error on load. Remove all files loaded before error.
if(error != null){
for(File file : files){
controller.removeResultFile(file.getAbsolutePath());
}
return false;
}
return true;
}
COM: <s> load data from a list of files and store it in memory </s>
|
funcom_train/48338351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean initialize(Environment env) throws Throwable {
this.env = env;
main = new MainComponent(env);
env.link("main", "environment", main);
server = new RemoteManagerWrapper(env, main, port);
client = new RemoteManagerWrapper(env, main, port + 1);
Environment.activate(null, env.getId());
exportEchoHandler();
exportEventStorer();
initialized = true;
return true;
}
COM: <s> initialize this test collection </s>
|
funcom_train/3121553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onUpdate(JWizardPanel pwiz) {
WizardActionPanel pAction;
//// 1. Retrieve the action panel.
pAction = (WizardActionPanel) mapPanelAction.get(pwiz);
//// 2. Update the buttons.
pAction.getBackButton().setEnabled(pwiz.isBackEnabled());
pAction.getNextButton().setEnabled(pwiz.isNextEnabled());
} // of method
COM: <s> update the status of the back next buttons for this wizard </s>
|
funcom_train/38350274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean processDelta(IResourceDelta delta) {
IResource res = delta.getResource();
int kind = delta.getKind();
if (kind == IResourceDelta.ADDED || kind == IResourceDelta.CHANGED || kind == IResourceDelta.REPLACED) {
processResource(res);
} else if (kind == IResourceDelta.REMOVED) {
removeResource(res);
}
return true;
// visit the children
}
COM: <s> processes incremental events from resources and directs the generation of jaxb java </s>
|
funcom_train/28350855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSequence( final AcceleratorSeq sequence ) {
_sequence = sequence;
loadBPMs();
loadCorrectors();
useSetpoints( sequence );
synchronized(_orbitSources) {
Iterator sourceIter = _orbitSources.iterator();
while ( sourceIter.hasNext() ) {
OrbitSource orbitSource = (OrbitSource)sourceIter.next();
orbitSource.setSequence( sequence, _bpmAgents );
}
}
_modificationStore.postModification( this );
_proxy.sequenceChanged(this, sequence);
}
COM: <s> set the selected sequence </s>
|
funcom_train/49009136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setBorder(BorderFactory.createTitledBorder(null,
"\u8f93\u51fa\u7ed3\u679c",
TitledBorder.DEFAULT_JUSTIFICATION,
TitledBorder.DEFAULT_POSITION, new Font("Dialog",
Font.BOLD, 12), new Color(51, 51, 51)));
jScrollPane.setViewportView(getJTable());
}
return jScrollPane;
}
COM: <s> this method initializes j scroll pane </s>
|
funcom_train/46581887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doStartService() throws ServiceException {
DataSource ds = getDataSource();
// get the db type
logInfo("Database = " + getDatabaseName());
if (isLoggingInfo())
logInfo("Initializing schema using datasource " + ds);
if (mCreatingSchemaOnStartup) {
createSchema();
}
super.doStartService();
}
COM: <s> creates schema and continues with sqljms startup </s>
|
funcom_train/40951829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String buildCaptionHtmlSnippet(UIDL uidl) {
String s = uidl.getStringAttribute("caption");
if (uidl.hasAttribute("icon")) {
s = "<img src=\""
+ client.translateToolkitUri(uidl
.getStringAttribute("icon"))
+ "\" alt=\"icon\" class=\"i-icon\">" + s;
}
return s;
}
COM: <s> helper function to build html snippet for column or row headers </s>
|
funcom_train/49658556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean doOfficeNumber(int officeNum) {
boolean done = false;
setOfficeNumber(officeNum);
logger.info(
"SetupOffice.doOfficeNumber: Office number for "
+ "employeeId " + getEmployeeId() + " is " + getOfficeNumber()
+ " (equipment " + getEquipmentList() + ")");
done = checkIfSetupComplete();
return done;
}
COM: <s> the do office number method stores the assigned office </s>
|
funcom_train/17084348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBotDificultad() {
if (botDificultad == null) {//GEN-END:|17-getter|0|17-preInit
// write pre-init user code here
botDificultad = new Command("Dificultad", "Seleccionar Dificultad", Command.ITEM, 1);//GEN-LINE:|17-getter|1|17-postInit
// write post-init user code here
}//GEN-BEGIN:|17-getter|2|
return botDificultad;
}
COM: <s> returns an initiliazed instance of bot dificultad component </s>
|
funcom_train/125491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTSList(TSList newTimeSeriesList) {
tSList = newTimeSeriesList;
TS[] sel = tSList.getSelectedTS();
if (sel.length > 0)
getDescriptionArea().setText(sel[0].project().getDescription());
setLocationRelativeTo(TopFrameReference.getTopFrameRef());
canceled = true;
}
COM: <s> sets code tslist code for this dialog </s>
|
funcom_train/17206794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isConnected(int event) {
if (org.jikesrvm.VM.BuildWithGCSpy) {
if (DEBUG)
Log.writeln("ServerInterpreter.isConnected, server=", server);
if (!initialised)
return false;
int res = sysCall.gcspyMainServerIsConnected(server, event);
return (res != 0);
} else {
return false;
}
}
COM: <s> are we connected to a gcspy client </s>
|
funcom_train/40931503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeActorSession(int actorSessionID) {
ActorSession actorSession= null;
int index = 0;
for (Iterator iter = enumerateActorSession(); iter.hasNext();){
actorSession = (ActorSession) iter.next();
int aSessionID = actorSession.getActorSessionID();
if ( aSessionID == actorSessionID){
actorSessions.remove(index);
QuitEvent quitEv = new QuitEventImpl(actorSessionID);
onQuitEvent(quitEv);
idManager.releaseASID(actorSessionID);
return true;
}
index++;
}
return false;
}
COM: <s> remove the actor session object corresponding to the actor session id </s>
|
funcom_train/49026954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getEliminaB() {
if (eliminaB == null) {
eliminaB = new JButton();
eliminaB.setText("Elimina");
eliminaB.setEnabled(false);
eliminaB.setActionCommand("Elimina");
eliminaB.setIcon(new ImageIcon(getClass().getResource("/icone/remove-icon.png")));
eliminaB.addActionListener(this);
eliminaB.setFont(new Font("Dialog", Font.BOLD, 12));
}
return eliminaB;
}
COM: <s> this method initializes elimina b </s>
|
funcom_train/36192992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReplaceItemAtExamples() {
try {
assertEquals(abcde.replaceItemAt(1, cx).int_size(), axcde.int_size());
assertEquals(abcde.replaceItemAt(1, cx), axcde);
} catch (JMLSequenceException e) {
fail("indexing here should not raise a JMLSequenceException");
}
}
COM: <s> test the examples from the replace item at method </s>
|
funcom_train/3367092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initMnemonics() {
mnemonicToIndexMap = new Hashtable();
mnemonicInputMap = new ComponentInputMapUIResource(tabPane);
mnemonicInputMap.setParent(SwingUtilities.getUIInputMap(tabPane,
JComponent.WHEN_IN_FOCUSED_WINDOW));
SwingUtilities.replaceUIInputMap(tabPane,
JComponent.WHEN_IN_FOCUSED_WINDOW,
mnemonicInputMap);
}
COM: <s> installs the state needed for mnemonics </s>
|
funcom_train/28773760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand1() {
if (okCommand1 == null) {//GEN-END:|79-getter|0|79-preInit
// write pre-init user code here
okCommand1 = new Command("Ok", Command.OK, 0);//GEN-LINE:|79-getter|1|79-postInit
// write post-init user code here
}//GEN-BEGIN:|79-getter|2|
return okCommand1;
}
COM: <s> returns an initiliazed instance of ok command1 component </s>
|
funcom_train/644480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkBoxInstantPreviewSelected(DialogOptions dialogOptions) {
ManagerFrameMain.getManager(dialogOptions.getParent()).applyFontColor(true, new Color(dialogOptions.getSliderRed().getValue(), dialogOptions.getSliderGreen().getValue(), dialogOptions.getSliderBlue().getValue()), false);
}
COM: <s> activates the instant preview for the font color </s>
|
funcom_train/4537396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delPrivacyItem(int order) throws XMPPException {
if ( getPrivacyItems().size() < 1 ) {
return;
}
if ( order > (getPrivacyItems().size() - 1) ) {
throw new PrivacyException("Order is out of range.");
}
getPrivacyItems().remove(order);
}
COM: <s> remove item using its order </s>
|
funcom_train/34289161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSubjects(List<LangText> subjects) {
if (subjects != null) {
// For each creator add property to Resource
for (LangText subject : subjects) {
// If creator is not empty
if (subject != null) {
resource.addProperty(DC_11.description, subject.getText(),
subject.getLang().toString());
}
}
}
}
COM: <s> add a list of subjects </s>
|
funcom_train/8336716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WKDictionary copyWithSetObjectForKey( Object object, Object key ) {
NSMutableDictionary newDict = this.mutableClone();
if ( object == null ) {
newDict.removeObjectForKey( key );
} else {
newDict.setObjectForKey( object, key );
}
return new WKDictionary( newDict.immutableClone() );
}
COM: <s> modifies the immutable dictionary using a temporary mutable copy </s>
|
funcom_train/12117432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC43(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.anticipiAggiungiJButton_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c43 anticipi aggiungi jbutton </s>
|
funcom_train/41278916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeReply(PushReply reply) {
try {
String url=reply.getUrl();
//
// forge request for this reply
//
Request request = HttpManager.getManager().createRequest() ;
request.setMethod("GET");
request.setURL(new URL(url));
//
// remove old page if present
//
removeURL(url);
//
// Store new resource
//
CachedResource res=
new PushEntityCachedResource(_filter, request,reply);
getStore().storeCachedResource(res,res.getContentLength());
_filter.sync();
}
catch(Exception e) {
e.printStackTrace();
}
}
COM: <s> store a push reply in the cache </s>
|
funcom_train/17145965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vertex rotate(RealMatrix rotationMatrix, Vertex pivot) {
MatrixStack max = new MatrixStack();
max.push(MathUtils.getTranslationMatrix(pivot.getReverse()));
max.push(rotationMatrix);
max.push(MathUtils.getTranslationMatrix(pivot));
transform(max.getCurrent());
return this;
}
COM: <s> rotate this vertex in place using the given rotation matrix and </s>
|
funcom_train/36003355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMedia(Object[] arguments, DataProvider reference, boolean after) {
Media media = new Media();
if (arguments[0] != null) {
media.type = Integer.parseInt((String) arguments[0]);
} else {
media.type = 0;
}
String title = (String) arguments[1];
media.title = title;
if (title != null && title != "") {
providers[2].addItem(MediaList.LIST_PROPERTY, media, reference, after);
}
}
COM: <s> add a media to the media list </s>
|
funcom_train/48645823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel1() {
if (jPanel1 == null) {
jPanel1 = new JPanel();
GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
gridBagConstraints4.insets = new Insets(5, 5, 5, 5);
jPanel1.setLayout(new GridBagLayout());
jPanel1.add(getJButton(), gridBagConstraints4);
jPanel1.add(getJPanel2(), new GridBagConstraints());
jPanel1.add(getJButton1(), gridBagConstraints4);
}
return jPanel1;
}
COM: <s> this method initializes j panel1 </s>
|
funcom_train/40627127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EventServiceConfiguration load() {
return new RemoteEventServiceConfiguration(DEFAULT_CONFIG_DESCRIPTION, DEFAULT_MIN_WAITING_TIME, DEFAULT_MAX_WAITING_TIME, DEFAULT_TIME_OUT,
DEFAULT_RECONNECT_ATTEMPTS,
DEFAULT_CONNECTION_ID_GENERATOR_CLASS_NAME, DEFAULT_CONNECTION_STRATEGY_CLIENT_CONNECTOR, DEFAULT_CONNECTION_STRATEGY_SERVER_CONNECTOR, DEFAULT_CONNECTION_STRATEGY_ENCODING);
}
COM: <s> loads the configuration with the loader </s>
|
funcom_train/16937458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCharset(Locale locale) {
String charset = null;
// First, try a full name match (language and country)
charset = map.getProperty(locale.toString());
if (charset != null)
return (charset);
// Second, try to match just the language
charset = map.getProperty(locale.getLanguage());
return (charset);
}
COM: <s> calculate the name of a character set to be assumed given the specified </s>
|
funcom_train/13490628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rule applyToRule(Replacement r) {
cachedToString = null;
RuleImpl rule =
new RuleImpl(new Vector(getBody().size()),
getHead().applyToFact(r));
for (Iterator it = getBody().iterator(); it.hasNext();) {
rule.getBody().add(((Fact) it.next()).applyToFact(r));
}
rule.setBodyOrConnected(isBodyOrConnected());
return rule;
}
COM: <s> apply a replacement to a rule </s>
|
funcom_train/49350433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem newHideOthersMenuItem() {
hideOthersMenuItem = new JMenuItem(resource.getString("hideOthers"));
hideOthersMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
BestHitList genesList = getSelectedBestHits();
GraphicInteractionController.instance().hideOthersSyntenyPaths(genesList);
}
});
return hideOthersMenuItem;
}
COM: <s> this method initializes hide others menu item </s>
|
funcom_train/38947327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getPileCoordinates(int index,double xCoord,double yCoord){
int x=0;int y=0;
x = index*2-2;
y=x+1;
try{
xCoord = pileCoordinates.get(x);
yCoord = pileCoordinates.get(y);
}catch(IndexOutOfBoundsException ex){
xCoord = -1;
yCoord = -1;
}
}
COM: <s> returns the coordinates of the given pile </s>
|
funcom_train/23519355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JavaContextBinding getCurrentBinding(JavaLoc loc) {
for (BindingProvider jbp : bindingProviders) {
List<JavaContextBinding> jcbs = jbp.getBindingsForLocation(loc);
if (jcbs.size() > 1) {
throw new OWLSBuilderException(
"Location {} has multiple bindings: {}", loc, jcbs);
}
if (jcbs.size() == 1) {
return jcbs.get(0);
}
}
return null;
}
COM: <s> returns the first resolved binding for a given location </s>
|
funcom_train/40545643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPassed() {
if (expected == null && actual == null) {
return true;
}
if (expected != null && actual != null) {
if (expected.equals(actual)) {
return true;
}
if (expected instanceof Number && actual instanceof Number) {
if (Math.abs(((Double) expected) - (Double) actual) < EPSILON) {
return true;
}
}
}
return false;
}
COM: <s> gets whether the expected value matches the expected value </s>
|
funcom_train/34998802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadConfiguration() {
this.loadLocales();
this.defaultLocaleName = this.config.getValue(ConfigKeys.I18N_DEFAULT_ADMIN);
this.loadLanguage(defaultLocaleName, null);
String custom = this.config.getValue(ConfigKeys.I18N_DEFAULT);
if (!custom.equals(defaultLocaleName)) {
this.loadLanguage(custom, defaultLocaleName);
this.defaultLocaleName = custom;
}
}
COM: <s> start i18n loading the locales list and default language boards </s>
|
funcom_train/17192829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean twoInEqual(int x, int y, int z){
// returns true is two of x y z are the same but not all three
return((compairInt(x,y)||compairInt(y,z)||compairInt(x,z))&&(!compairThreeInt(x,y,z)));
}
COM: <s> a method that to test if two int are equal in a set </s>
|
funcom_train/5381500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(String name, String value) {
if (value == null)
throw new IllegalArgumentException();
String oldValue = getString(name);
if (value.equals(oldValue))
return;
try {
notify = false;
if (getDefaultString(name).equals(value))
getPluginPreferences(true).remove(name);
else
getPluginPreferences(true).put(name, value);
firePropertyChangeEvent(name, oldValue, value);
} finally {
notify = true;
}
}
COM: <s> sets the current value of the string valued property with the </s>
|
funcom_train/22556642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireMenuSelection(final Object o) {
Object[] listeners = listenerList.getListeners();
for(int i = 0; i < listeners.length; ++i) {
final NavigationBarListener l = (NavigationBarListener)listeners[i];
SafeRunnable.run(new SafeRunnable() {
public void run() {
l.menuObjectSelected(o);
}
});
}
}
COM: <s> fire to listeners that the given object is to be selected </s>
|
funcom_train/25066291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshSiteTable() {
Widget siteDataWidget = populateSiteTable((BioMaterial) currentSites.get(sitesListBox.getSelectedIndex()));
// for unknown reasons the table goes away
getSiteMetaDataTitleBox().clearContent();
getSiteMetaDataTitleBox().add(siteDataWidget);
showMapMarkerPopup(sitesListBox.getSelectedIndex());
}
COM: <s> gets called when user selects a different site in the drop down </s>
|
funcom_train/3290985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addRemoteObserver(String type,MMBaseObserver obs) {
MMObjectBuilder bul=getMMObject(type);
if (bul!=null) {
return bul.addRemoteObserver(obs);
} else {
log.error("addRemoteObserver(): ERROR: Can't find builder : "+type);
return false;
}
}
COM: <s> adds a remote observer to a specified builder </s>
|
funcom_train/25419615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getMapviewerUrl2() throws SearchException {
try {
if(this.getMapViewerUrl() != null && this.getMapViewerUrl().length() > 0)
return new URL(this.getMapViewerUrl());
else
return null;
} catch(Exception e) {
throw new SearchException("Url = " + this.getMapViewerUrl(), e);
}
}
COM: <s> gets the mapviewer as java </s>
|
funcom_train/19064780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireNodesChangedEvent(TreeModelEvent event) {
if (event.getChildIndices().length == 1) {
for (Iterator iter = listeners.iterator(); iter.hasNext();) {
((TreeModelListener) iter.next()).treeNodesChanged(event);
}
} else {
fireNodesRearrangedEvent(event);
}
}
COM: <s> notify all tree model listeners that some nodes childs has been changed </s>
|
funcom_train/21718432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onGroupExpand(int groupPosition) {
String node = (String) mAdapter.getGroup(groupPosition);
try {
EpicCommandInfoImpl[] commands = mEpicService.getRemoteCommands(node);
if(commands==null){
return;
}
for(int i=0; i<commands.length; i++){
((MyExpandableListAdapter) mAdapter).addCommand(node, commands[i]);
}
mListChangeHandler.sendEmptyMessage(0);
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> override this for receiving callbacks when a group has been expanded </s>
|
funcom_train/16258454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateLayout() {
if (legend != null) {
legend.updateLayoutData();
}
if (title != null) {
title.updateLayoutData();
}
if (axisSet != null) {
axisSet.updateLayoutData();
}
layout();
if (axisSet != null) {
axisSet.refresh();
}
}
COM: <s> updates the layout of chart elements </s>
|
funcom_train/42858574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopService(){
Log.i("BackgroundService", "stop service");
// stop the data updates
tempoListener.stopListener();
if (dataExchangeHandle != null){
dataExchangeHandle.cancel(false);
dataExchangeHandle = null;
scheduler.shutdown();
try {
scheduler.awaitTermination(5, TimeUnit.SECONDS);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
scheduler = null;
}
// stop the location listener updates
if (locationManager!=null){
locationManager.removeUpdates(locationListener);
}
// close the connection to the database
headDb.close();
}
COM: <s> method that centralizes stopping the activities that were started in </s>
|
funcom_train/11311122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProperty(String name) {
if (!nodeList.isEmpty()) {
NodeImpl leaf = getLeafNode();
if (leaf != null && leaf.isInIterable() && leaf.getName() == null) {
leaf.setName(name);
return;
}
}
addNode(new NodeImpl(name));
}
COM: <s> encapsulate the node manipulations needed to add a named property to this path </s>
|
funcom_train/46858510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Terrain getTerrainFromCache(Node terrainNode) {
Element terrainElement = Xml.nodeToElement(terrainNode);
final String XML_AT_TERRAIN_ID = "Id";
String terrainId = terrainElement.getAttribute(XML_AT_TERRAIN_ID);
if (terrainId.trim().length() == 0) {
return null;
}
return TerrainFactory.getTerrain(terrainId);
}
COM: <s> from xml helper function </s>
|
funcom_train/11123171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WriteFuture writePacket(Buffer buffer) throws IOException {
// Synchronize all write requests as needed by the encoding algorithm
// and also queue the write request in this synchronized block to ensure
// packets are sent in the correct order
synchronized (encodeLock) {
encode(buffer);
IoBuffer bb = IoBuffer.wrap(buffer.array(), buffer.rpos(), buffer.available());
return ioSession.write(bb);
}
}
COM: <s> encode and send the given buffer </s>
|
funcom_train/37576619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private User get(String name) throws SQLException {
for (int i = 0, uSize = uUser.size(); i < uSize; i++) {
User u = (User) uUser.elementAt(i);
if ((u != null) && u.getName().equals(name)) {
return u;
}
}
throw Trace.error(Trace.USER_NOT_FOUND, name);
}
COM: <s> this private method is used to access the user objects in the </s>
|
funcom_train/14519598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertCustomAccessRules(Admin admin, ArrayList accessrules){
for(int i=0; i < customaccessrules.length; i++){
if(!customaccessrules[i].trim().equals("")) {
addAuthorizedAccessRule(admin, customaccessrules[i].trim(), accessrules);
}
}
}
COM: <s> method that adds the custom available access rules </s>
|
funcom_train/1198945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private byte getFlagByte() {
byte ret = 0;
if( unsynchronisation ) {
ret = BinaryParser.setBit( ret, 7 );
}
if( extended ) {
ret = BinaryParser.setBit( ret, 6 );
}
if( experimental ) {
ret = BinaryParser.setBit( ret, 5 );
}
if( footer ) {
ret = BinaryParser.setBit( ret, 4 );
}
return ret;
}
COM: <s> a helper function for the get bytes function that returns a byte with </s>
|
funcom_train/24049654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsPoint(Coordinate p) {
LinearRing shell = getLinearRing();
Envelope env = shell.getEnvelopeInternal();
if (!env.contains(p))
return false;
if (!RayCrossingCounter.isPointInRing(p, shell.getCoordinates()))
return false;
for (Iterator i = holes.iterator(); i.hasNext();) {
EdgeRing hole = (EdgeRing) i.next();
if (hole.containsPoint(p))
return false;
}
return true;
}
COM: <s> this method will cause the ring to be computed </s>
|
funcom_train/37019935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAtomPropertiesFromFile(String propertiesFile) {
try {
AtomTypeSet ats1 = new AtomTypeSet();
ats1.load(new java.io.FileInputStream(propertiesFile));
} catch (Exception e1) {
e1.printStackTrace();
}
typesReady = true;
ready = areWeReady();
}
COM: <s> takes the argument reads it as a file and allocates this as </s>
|
funcom_train/22654974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScrollLock(boolean lock) {
this.scrollLock = lock;
this.currentLogEventModel.getPageSet().setMutatorType(this.scrollLock ?
ILogEventModelMutator.NON_TAILING_MUTATOR : ILogEventModelMutator.TAILING_MUTATOR);
Iterator iterator = presentationList.iterator();
while(iterator.hasNext()) {
Presentation p = (Presentation)iterator.next();
p.setScrollLock(this.scrollLock);
}
}
COM: <s> sets the status of the scroll lock </s>
|
funcom_train/10533521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void preInvoke(ControlBean cb, Method m, Object[] args) throws InterceptorPivotException {
POST_INVOKE_CALLED = false;
String value = (String) args[0];
if (value.equals("foo")) {
throw new InterceptorPivotException(getClass().getSimpleName(), (Object) "foo VALUE ERROR!");
}
}
COM: <s> called before a control operation is invoked </s>
|
funcom_train/47712305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigDecimal getBalance() {
try {
JSONObject request = createRequest("getbalance");
JSONObject response = session.sendAndReceive(request);
return getBigDecimal(response, "result");
} catch (JSONException e) {
throw new BitcoinClientException("Exception when getting balance", e);
}
}
COM: <s> returns the available balance for the default account </s>
|
funcom_train/37743312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getToolResult() throws NoSuchElementException {
if (result != null) {
return result;
}
if (tool instanceof ResultProvider) {
ResultProvider provider = (ResultProvider) tool;
result = provider.result();
return result;
}
throw new NoSuchElementException("Tool does not provide a result");
}
COM: <s> retrieves the result after a tool invocation </s>
|
funcom_train/2801914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unload() throws SQLException {
if (mLogger.isDebugEnabled()) {
mLogger.debug("Closing prepared statements");
}
mStmtInsertKPI.close();
mStmtInsertHost.close();
mStmtUpdateHost.close();
mStmtInsertHostInfo.close();
}
COM: <s> method to be invoked when the insertion is finished </s>
|
funcom_train/26206020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(final Object o) {
return this == o
|| (o != null && o.getClass() == getClass() && this.id == ((JobIntegerKey) o).id && getMap() == ((JobIntegerKey) o).getMap());
}
COM: <s> checks if the specified object equals this key </s>
|
funcom_train/9930789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getMax() {
if (getAxisAttributes().get("max") == null) {
return axisMax;
} else {
double max = TypeConverter.getDouble(
getAxisAttributes().get("max"), axisMax);
if (max < axisMax)
max = axisMax;
return max;
}
}
COM: <s> gets the max </s>
|
funcom_train/18826119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRowSelection(Object pRow, boolean pScroll) {
int index = ((TableViewAdapter) super.getModel()).indexOf(pRow);
addRowSelectionInterval(index, index);
if (pScroll) {
scrollRectToVisible(this.getCellRect(index, index, true));
}
}
COM: <s> select a new row </s>
|
funcom_train/4519980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPixelColor(int numToAdd) {
int width = bufferedImage.getWidth();
int height = bufferedImage.getHeight();
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
int rgb = bufferedImage.getRGB(x, y);
bufferedImage.setRGB(x, y, rgb + numToAdd);
}
}
}
COM: <s> add color to the rgb of the pixel </s>
|
funcom_train/21995987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTypeForFile(File f) {
int rc = 0;
String ext = HelperFile.getFileExtension(f).toLowerCase();
Integer i_mime_id = (Integer)mime_ext_map.get(ext);
return(i_mime_id != null
? (String)mime_type_map.get(i_mime_id)
: null);
}
COM: <s> obtain the mime type of the specified file </s>
|
funcom_train/2903084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(ZCommand cmd){
int type = cmd.getCommandType();
if(type == ZCommand.BUILD_IN){
String[] arg = cmd.getArguments();
if((arg!=null) && (arg.length>0)){
String[] prop = checkPropertyChange(arg[0]);
if(prop != null){
if(prop[0].compareTo("workspace")==0){
if(frameMenu != null){
switchApplicationWorkspace(prop[1], frameMenu.getWindow());
}
}
}
}
}
if(frameMenu != null){
frameMenu.setVisible(false);
}
}
COM: <s> configure the frame workspace properties </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.