__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/44222801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLayersFromCurrentLevel(Vector layerNameVec) {
for (int i = 0; i < layerNameVec.size(); i++) {
String name = (String) layerNameVec.get(i);
LayerStack stack = (LayerStack) this.stackHash.get(name);
if (stack != null) {
stack.remove(String.valueOf(this.currentLevel));
}
}
}
COM: <s> p remove the atlas layer objects with the given layer names in </s>
|
funcom_train/37415908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initializeData(Attributes attr) {
String tmp;
try {
Attribute a;
a = attr.get("grifid");
if (a != null) {
_docid = a.get().toString();
}
a = attr.get("griftitle");
if (a != null) {
_doctitle = a.get().toString();
}
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> intializes the structure based on the ldap attributes </s>
|
funcom_train/43245932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetMothersName() {
System.out.println("setMothersName");
String mothersName = "";
PatientDataObject instance = new PatientDataObject();
instance.setMothersName(mothersName);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set mothers name method of class org </s>
|
funcom_train/26558198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char getCharProperty(String name) throws IntrospectionException, NoSuchPropertyException {
Object obj = getProperty(name);
if (! (obj instanceof Character))
throw new NoSuchPropertyException("There is no char property '"+name+"' (but a property with type '"+obj.getClass().getName()+"' does exist)");
return ((Character)obj).charValue();
}
COM: <s> return the value of the property as a char </s>
|
funcom_train/7661589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testContainsAll() {
CopyOnWriteArrayList full = populatedArray(3);
Vector v = new Vector();
v.add(one);
v.add(two);
assertTrue(full.containsAll(v));
v.add(six);
assertFalse(full.containsAll(v));
}
COM: <s> contains all returns true for collection with subset of elements </s>
|
funcom_train/21188322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFormatExpanded(char format) throws CruiseControlException {
if ("evstx".indexOf(format) < 0) {
throw new CruiseControlException(
"Invalid format specifier (use one of 'e' 'v' 's' 't' 'x') " + format);
}
addOption("-f", new String(new char[]{format}));
}
COM: <s> selects a format for hist as in f </s>
|
funcom_train/14311163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void startApp() throws MIDletStateChangeException {
final Display display = Display.getDisplay(this);
splashScreen = new SplashScreen(display, initialDisplayable);
display.setCurrent(splashScreen);
Timer splashTimer = new Timer();
splashTimer.schedule(new TimerTask() {
public void run() {
if (display.getCurrent() == splashScreen)
display.setCurrent(initialDisplayable);
}
}, 5000);
}
COM: <s> starts the i blue tooth you midlet application </s>
|
funcom_train/25820541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List createDefaultStepFiltersList() {
IPreferenceStore defaultStore = AnyEditToolsPlugin.getDefault()
.getPreferenceStore();
String[] strings = EclipseUtils.parseList(defaultStore
.getDefaultString(IAnyEditConstants.PREF_ACTIVE_FILTERS_LIST));
return Arrays.asList(strings);
}
COM: <s> returns a list of active step filters </s>
|
funcom_train/3351124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getProperty(ResourceBundle rb, String key) {
try {
String res = rb.getString(key);
res = res.trim();
return (res.length() == 0) ? null : res;
} catch (RuntimeException e) { /* ClassCastException or MissingResourceException */
return null;
}
}
COM: <s> get a string valued property value from the resource bundle dealing </s>
|
funcom_train/783476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharBuffer put(CharBuffer src) {
if (src == this) {
throw new IllegalArgumentException();
}
if (src.remaining() > remaining()) {
throw new BufferOverflowException();
}
char[] contents = new char[src.remaining()];
src.get(contents);
put(contents);
return this;
}
COM: <s> writes all the remaining code char code s of the code src code </s>
|
funcom_train/5712808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmptyGetBytes(){
FacilityRequestParameter frp = new FacilityRequestParameter();
frp = new FacilityRequestParameter(frp.getBytes(), frp.getFacilitySelector());
assertEquals("check facility-selector", IFacilityConstants.FACILITYSELECTOR_HANDSET, frp.getFacilitySelector());
}
COM: <s> tests the values being created from get bytes directly after instantiation </s>
|
funcom_train/21022401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeRename() {
if (Main.get().mainPanel.desktop.browser.fileBrowser.isPanelSelected()) {
Main.get().mainPanel.desktop.browser.fileBrowser.rename();
} else if (Main.get().activeFolderTree.isPanelSelected()) {
Main.get().activeFolderTree.rename();
}
fireEvent(HasToolBarEvent.EXECUTE_RENAME);
}
COM: <s> executes rename option </s>
|
funcom_train/12165331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidColors() throws Exception {
List list = new ArrayList();
for (int i = 0; i < invalidColors.size(); i++) {
list.add(invalidColors.get(i));
}
list.add("Cat");
list.add("Dog");
doTest((ColorValidator) createValidator(NamedColor.getAllColors()), list, Status.ERROR);
}
COM: <s> test invalid color items </s>
|
funcom_train/13964038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendOpenModalDialogFunction(WOResponse response, WOContext context) {
response.appendContentString(" options = ");
AjaxOptions.appendToResponse(createModalBoxOptions(), response, context);
response.appendContentString(";\n");
response.appendContentString(" if (titleBarText) options.title = titleBarText;\n");
response.appendContentString(" Modalbox.show('");
response.appendContentString(openDialogURL(context));
response.appendContentString("', options);\n");
}
COM: <s> appends function body to open the modal dialog window </s>
|
funcom_train/34604061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStyles(String style) {
String astyles[] = style.split(";");
for (int j = 0; j < astyles.length; j++) {
String astyle[] = astyles[j].split(":");
if (astyle.length == 2) {
setStyle(astyle[0].trim(), astyle[1].trim());
}
}
}
COM: <s> sets styles on the style object based on a formatted style string </s>
|
funcom_train/35875112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnLimparVeiculo() {
if (btnLimparVeiculo == null) {
btnLimparVeiculo = new JButton();
btnLimparVeiculo.setBounds(new Rectangle(229, 39, 92, 22));
btnLimparVeiculo.setText("Limpar");
btnLimparVeiculo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
txtPaneVeiculo.setText("");
}
});
}
return btnLimparVeiculo;
}
COM: <s> this method initializes btn limpar veiculo </s>
|
funcom_train/29623103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCGForegroundImage(int x, int y,int width, int height,Image onTopImage) throws ImageNullException, DrawOutOfBoundsException
{
Point controlSize = this.control.getSize();
if ( x+width > controlSize.x || y+height > controlSize.y || width <= 0 || height <= 0)
{
throw new DrawOutOfBoundsException();
}
foregroundBounds = new Rectangle(x,y,width, height);
foregroundImgs = onTopImage;
bufferingCGImages();
}
COM: <s> set and paint the foreground image </s>
|
funcom_train/5723918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isFileExistingInNewSubmission(){
DefaultDomainObject domainObject = new DefaultDomainObject(paperSubmissionInfo.getId());
return (isExistingFile() && paperSubmissionInfo.getSubmissionStatus().equals(SubmissionStatus.NOT_IN_TIME)
&& !getDocumentService().getFileEntries(domainObject).contains(selectedFile));
}
COM: <s> checks if a new file is existing in a new paper submission </s>
|
funcom_train/19381299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void gotoDetailPage(int row) throws Exception {
if (row == -1) {
getCurrentResponse().sendRedirect(getDetailPage());
return;
} else {
getCurrentResponse().sendRedirect(getDetailPage() + "?" + REQUEST_DETAIL_ID + "=" + getRecordId(row));
}
}
COM: <s> navigates to the detail page of the record for the given row </s>
|
funcom_train/36889379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createPool(){
DataSourceCollection dataSourceCollection = null;
Iterator iterator = null;
DataSourceBean dataSourceBean = null;
try{
dataSourceCollection = DataSourceCollection.getInstance();
iterator = dataSourceCollection.iterator();
while( iterator.hasNext()){
dataSourceBean = (DataSourceBean)iterator.next();
pool.put(dataSourceBean.getName(), createDataSource(dataSourceBean) );
}
}catch( NumberFormatException numberFormatException ){
numberFormatException.printStackTrace();
}
}
COM: <s> create pool with data store in data source collection </s>
|
funcom_train/4875388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setComment(String c) {
if (c == null || c.equals("")) //$NON-NLS-1$
comment =LabelFormatter.getFormattedLabel(Messages.getString("QuestionQcmPreview.25")); //$NON-NLS-1$
else {
info.add(comment);
comment = LabelFormatter.getFormattedLabel(Messages.getString("QuestionQcmPreview.26") + c); //$NON-NLS-1$
}
}
COM: <s> sets the comment text </s>
|
funcom_train/45108015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int setJSystemProperty(String key, String value) throws Exception {
jemmySupport.report("going to add " + key + " = " + value + " to jsystem properties file");
System.out.println("checking system out printline");
JSystemProperties.getInstance().setPreference(key, value);
jemmySupport.report("Added " + key + " = " + value + " to jsystem properties file");
return 0;
}
COM: <s> sets the specified value in the specified key in jsystem </s>
|
funcom_train/4360835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultHost(String host) {
String oldDefaultHost = this.defaultHost;
if (host == null) {
this.defaultHost = null;
} else {
this.defaultHost = host.toLowerCase();
}
support.firePropertyChange("defaultHost", oldDefaultHost,
this.defaultHost);
}
COM: <s> set the default host </s>
|
funcom_train/47509459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(DocCorreioTrans entity) {
EntityManagerHelper.log("saving DocCorreioTrans instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved doc correio trans entity </s>
|
funcom_train/31155593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle convertRectangleToDraw(int x1, int y1, int x2, int y2) {
int x = convertXtoDraw(Math.min(x1, x2));
int y = convertYtoDraw(Math.min(y1, y2));
int w = Math.abs(x2 - x1);
int h = Math.abs(y2 - y1);
return new Rectangle(x, y, w, h);
}
COM: <s> returns a rectangle object of the four given coordinates x1 y1 x2 and </s>
|
funcom_train/10787186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test2_0Persistence1_0OrmXml() {
OpenJPAEntityManagerFactory emf = OpenJPAPersistence.
createEntityManagerFactory("XSDTest",
"org/apache/openjpa/persistence/xml/" +
"persistence-2_0-orm-1_0.xml");
OpenJPAEntityManager em = emf.createEntityManager();
em.close();
emf.close();
}
COM: <s> verify a version 2 </s>
|
funcom_train/8741155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sortLandingSequenceByAircraftCost(Aircraft[] landingSequence) {
Arrays.sort(landingSequence, new Comparator<Aircraft>() {
@Override
public int compare(Aircraft a1, Aircraft a2) {
if (a1.getLandingCost() > a2.getLandingCost()) {
return 1;
}
else if (a1.getLandingCost() < a2.getLandingCost()) {
return -1;
}
return 0;
}
});
}
COM: <s> sorts ascendantly a landing sequence by aircraft cost parameter </s>
|
funcom_train/48670174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFrame getJFrame() {
if (jFrame == null) {
jFrame = new JFrame();
jFrame.setTitle("Result");
jFrame.setSize(new Dimension(600, 600)); // Generated
jFrame.setContentPane(getJContentPane()); // Generated
//jFrame.setDefaultCloseOperation(JFrame.);
}
else jFrame.removeAll();
return jFrame;
}
COM: <s> this method initializes j frame </s>
|
funcom_train/29722787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getJCheckBoxIgnoreUnicode() {
if (jCheckBoxIgnoreUnicode == null) {
jCheckBoxIgnoreUnicode = new JCheckBox();
jCheckBoxIgnoreUnicode.setText("Ignore difference in Unicode");
jCheckBoxIgnoreUnicode.setFont(new Font("Dialog", Font.PLAIN, 12));
}
return jCheckBoxIgnoreUnicode;
}
COM: <s> this method initializes j check box ignore unicode </s>
|
funcom_train/48786747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getOrders(String category) {
if (sales == null) {
return 0f;
}
float result = 0f;
for (int i = 0; i < sales.length; i++) {
if (sales[i].getKey().equals(category)) {
result = sales[i].getOrders();
}
}
return result;
}
COM: <s> returns the revenue associated with a particular category </s>
|
funcom_train/20920677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkTabCharacter() {
if (PropertyStore.getBoolean(file, P_TAB_CHAR)) {
for (int i = 0; i < fileLines.length; i++) {
if (fileLines[i].contains("\t")) { //$NON-NLS-1$
checker.notifyListeners(Messages.LineChecker_5, i + 1);
}
}
}
}
COM: <s> tests wether file contains tab characters </s>
|
funcom_train/29036409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void postProcess(FSTNode node) {
if (node instanceof FSTNonTerminal) {
for (FSTNode child : ((FSTNonTerminal) node).getChildren()) {
postProcess(child);
}
} else {
FSTTerminal terminalNode = (FSTTerminal) node;
FSTTerminalCompositionRule compRule = CompositionRuleRegistry
.getInstance(project).getRule(
terminalNode.getCompositionMechanism());
if (compRule != null) {
compRule.postProcess(terminalNode);
}
}
}
COM: <s> invoke post processing methods of merge strategies for all terminal </s>
|
funcom_train/3284397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean kick(String username, long timeout, boolean blockIp ) throws Exception {
if (username==null)
throw new XmlRpcException (0, "illegal arguments for freecsXmlRpcHandler.messageToGroup");
return AdminCore.kick(username, timeout, blockIp, "xmlrpc-remote");
}
COM: <s> kick a user from the chat </s>
|
funcom_train/46654771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCommentsCounterText() {
if (commentsCounter == 0) {
commentsDP.getHeaderTextAccessor().setText(
Global.constantsSuggestion.noComments());
} else if (commentsCounter == 1) {
commentsDP.getHeaderTextAccessor().setText(
Global.constantsSuggestion.oneComment());
} else {
commentsDP.getHeaderTextAccessor()
.setText(
Global.constantsSuggestion
.severalComments(commentsCounter));
}
commentsDP.getHeader().setStyleName("sugComCounter");
}
COM: <s> sets the comments counter text </s>
|
funcom_train/5864102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sessionWillPassivate() {
final Session old = SessionsCtrl.getCurrent(); //shall be null; just in case
SessionsCtrl.setCurrent(this);
try {
((WebAppCtrl)_wapp).sessionWillPassivate(this);
for (Enumeration en = getAttrNames(); en.hasMoreElements();) {
final String nm = (String)en.nextElement();
willPassivate(getAttribute(nm));
}
} finally {
SessionsCtrl.setCurrent(old);
}
}
COM: <s> used by the deriving class to pre process a session before writing </s>
|
funcom_train/49404035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private short getLibraryId(final SAMFileHeader header, final SAMRecord rec) {
final String library = getLibraryName(header, rec);
Short libraryId = this.libraryIds.get(library);
if (libraryId == null) {
libraryId = this.nextLibraryId++;
this.libraryIds.put(library, libraryId);
}
return libraryId;
}
COM: <s> get the library id for the given sam record </s>
|
funcom_train/826772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() {
String className = this.getClass().getName();
int lastDot = className.lastIndexOf(".");
if (lastDot > 0) {
className = className.substring(lastDot + 1);
}
return layoutManager.getCoreString("attributes.category." + className
+ ".name");
}
COM: <s> returns a name for this category </s>
|
funcom_train/37816806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(Observable o, Object arg) {
VerificationFormula root = ((Model)o).getRoot();
if (root != null){
if (root.hasChanged()) {
paintNew(root);
} else {
ArrayList<VerificationFormula> changes = getChanges(root);
for (VerificationFormula vf : changes){
changeCell(vf);
}
makeNewCells();
}
beautifier();
} else {
graph.setGraphLayoutCache(new GraphLayoutCache());
graph.getGraphLayoutCache().setFactory(new MyCellViewFactory());
this.setUnselected();
}
}
COM: <s> function that gets information from view if something changed in the model br </s>
|
funcom_train/18188299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decode(FacesContext facesContext, UIComponent component) {
if (component instanceof UICommand) {
CommandLink commandLink = (CommandLink) component;
if (isSubmitted(facesContext, commandLink))
commandLink.queueEvent(new ActionEvent(commandLink));
} else if (component instanceof UIOutput) {
// Do nothing here ...
} else {
throw new IllegalArgumentException("Unsupported component class "
+ component.getClass().getName());
}
}
COM: <s> this is the decode method </s>
|
funcom_train/49995700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sortTable(final int i) {
Collections.sort(this.selectedProjects, new Comparator<Project>() {
public int compare(Project o1, Project o2) {
int result = (int) (measuresCharts.get(o2).get(i).getLatestValue() * 10 -
measuresCharts.get(o1).get(i).getLatestValue() * 10);
return result;
}
});
}
COM: <s> sort the table according to the given measure index </s>
|
funcom_train/48561382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCommand4() {
if (itemCommand4 == null) {//GEN-END:|444-getter|0|444-preInit
// write pre-init user code here
itemCommand4 = new Command("\u0414\u0430", Command.ITEM, 0);//GEN-LINE:|444-getter|1|444-postInit
// write post-init user code here
}//GEN-BEGIN:|444-getter|2|
return itemCommand4;
}
COM: <s> returns an initiliazed instance of item command4 component </s>
|
funcom_train/19905498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() throws Exception{
PreparedStatement ins = DBFactory.prepareStatement("UPDATE "
+ DBFactory.TABLE + " set (parent = ?, name = ?) where id = ?");
ins.setInt(3, id);
ins.setInt(1, parent);
ins.setString(2, name);
ins.executeUpdate();
}
COM: <s> update danych w bazie </s>
|
funcom_train/43347777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearDate(Calendar cal) {
cal.set(Calendar.HOUR, 0);
cal.set(Calendar.HOUR_OF_DAY, 0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.AM_PM, 0);
cal.set(Calendar.MILLISECOND, 0);
}
COM: <s> clear all aspects of the time that are not used </s>
|
funcom_train/38577652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean open() {
// Shell must be created with style SWT.NO_TRIM
final Shell shell = new Shell(display, SWT.NO_TRIM | SWT.ON_TOP);
final FillLayout fillLayout = new FillLayout();
fillLayout.marginHeight = 1;
shell.setLayout(fillLayout);
// Directly standard selection
FileDialog fileDialog = new FileDialog(shell);
fileDialog.setText(view.getLabelImport());
selectedFile = fileDialog.open();
shell.close();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
return selectedFile == null;
}
COM: <s> this method creates the contents of the window and copies the selected </s>
|
funcom_train/4779958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refereshApplyToPanels() {
if (getGroupRadioButton().isSelected()) {
getGroupPanel().setVisible(true);
getUserPanel().setVisible(false);
}
else if (getUserRadioButton().isSelected()) {
getGroupPanel().setVisible(false);
getUserPanel().setVisible(true);
}
else {
getGroupPanel().setVisible(false);
getUserPanel().setVisible(false);
}
}
COM: <s> displays selection lists depending on user selection </s>
|
funcom_train/25409894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("DqaServiceSOAP".equals(portName)) {
setDqaServiceSOAPEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/3945788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateStructureType_MaxLength(String structureType, DiagnosticChain diagnostics, Map context) {
int length = structureType.length();
boolean result = length <= 200;
if (!result && diagnostics != null)
reportMaxLengthViolation(ImscpRootv1p1p2Package.eINSTANCE.getStructureType(), structureType, length, 200, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em structure type em </s>
|
funcom_train/39260924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getMoveNum(int[] grid) {
int currentMoveNum = 0;
// count the number of moves already made
for (int i = 0; i < grid.length; i++) {
if (!(grid[i] == G_NULL)) {
currentMoveNum++;
}
}
// return number of moves so far + 1
return currentMoveNum + 1;
}
COM: <s> compute the move number </s>
|
funcom_train/19844803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dropCollaborationTypeTable() {
try {
String sqlCmd = "DROP TABLE tbl_COLLABORATION_TYPE";
stmt = conn.createStatement();
stmt.execute(sqlCmd);
stmt.close();
}
catch (Exception e) {
logger.log(Level.SEVERE, e.toString());
}
}
COM: <s> drops the tbl collaboration type table </s>
|
funcom_train/25704865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setItemsEnabled(final Boolean enabled, final ModelItem[] items) {
for( final ModelItem element : items ) {
final FrostDownloadItem item = (FrostDownloadItem) element;
if (item.getState() != FrostDownloadItem.STATE_DONE) {
item.setEnabled(enabled);
FileTransferManager.inst().getDownloadManager().notifyDownloadItemEnabledStateChanged(item);
}
}
}
COM: <s> this method enables disables download items in the model </s>
|
funcom_train/24186171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetZeroUtility() {
// Test with AddableIntegers
AddableInteger integer = new AddableInteger (1);
AddableInteger zeroInt = parserInt.getZeroUtility();
assertTrue (integer.equals(integer.add(zeroInt)));
assertTrue (integer.equals(zeroInt.add(integer)));
// Test with AddableReals
AddableReal real = new AddableReal (1.0);
AddableReal zeroReal = parserReal.getZeroUtility();
assertTrue (real.equals(real.add(zeroReal)));
assertTrue (real.equals(zeroReal.add(real)));
}
COM: <s> test method for get zero utility </s>
|
funcom_train/32800507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEqualPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DefinitionExpOperationCS_equal_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_DefinitionExpOperationCS_equal_feature",
"_UI_DefinitionExpOperationCS_type"),
OclPackage.Literals.DEFINITION_EXP_OPERATION_CS__EQUAL, true,
false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null,
null));
}
COM: <s> this adds a property descriptor for the equal feature </s>
|
funcom_train/32833388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerArgumentMatcher(ArgumentMatcher argumentMatcher, int lineNr) {
if (!acceptingArgumentMatchers) {
throw new UnitilsException("Argument matchers cannot be used outside the context of a behavior definition or assert statement");
}
matchInvocationEndLineNr = Math.max(matchInvocationEndLineNr, lineNr);
argumentMatchers.add(argumentMatcher);
}
COM: <s> registers an argument matcher at the given line nr </s>
|
funcom_train/22397534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateArguments(Object[] args) {
if (args.length != this.argClasses.length) {
throw new HammockException(this,
IHammockExceptionErrors.WRONG_NUMBER_OF_ARGS);
}
for (int i = 0; i < args.length; i++) {
if (args[i] == null) {
continue;
}
if (!argClasses[i].isAssignableFrom(args[i].getClass())) {
throw new HammockException(this, WRONG_ARGUMENT_CLASS);
}
}
}
COM: <s> this method checks that a list of arguments matches the signature of the </s>
|
funcom_train/45811139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean existsUnspecifiedRolePlayer(Collection associations) {
Iterator associationsIt = associations.iterator();
while (associationsIt.hasNext()) {
AssociationIF association = (AssociationIF)associationsIt.next();
Iterator rolesIt = association.getRoles().iterator();
while (rolesIt.hasNext()) {
if (((AssociationRoleIF)rolesIt.next()).getPlayer() == null)
return true;
}
}
return false;
}
COM: <s> returns true iff there exists an association role with no player </s>
|
funcom_train/12913892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paramSetup() {
String[] imageFormatValues = new String[writerFormats.size()];
imageFormatValues = writerFormats.toArray(imageFormatValues);
PlugIn.Parameter imageFormat = new PlugIn.Parameter("imageFormat", "string",
"the desired format of the images", imageFormatValues);
required = new PlugIn.Parameter[1];
required[0] = imageFormat;
}
COM: <s> set up the required parameter for the get parameters method </s>
|
funcom_train/14126524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IQuery getObjects(String docname, String oclass, String prop, String order) throws XWikiException {
return xpath("/"+getXPathName(docname)+"/obj/"+getXPathName(oclass) + getPropertyXPath(prop) + getOrderXPath(order));
}
COM: <s> create query for objects </s>
|
funcom_train/21067936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ColumnViewer createTable(Composite parent) {
TableViewer tableViewer = new TableViewer(parent, SWT.None);
FileStoreHierarchicalTableLabelProvider lbl = new FileStoreHierarchicalTableLabelProvider();
lbl.setParentFileStore(this.getRoot());
tableViewer.setLabelProvider(lbl);
ArchiveDirectoryTableContentProvider prov = new ArchiveDirectoryTableContentProvider();
tableViewer.setContentProvider(prov);
columnViewerManager = new ColumnTableViewerManager(tableViewer);
tableViewer.getTable().addMouseListener(
archiveDirectoryTableMouseListener);
return tableViewer;
}
COM: <s> creates the table viewer </s>
|
funcom_train/18480543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumItersU(int num_iters_u) {
if (this.num_iters_u != num_iters_u) {
int old = this.num_iters_u ;
this.num_iters_u = num_iters_u ;
createContents() ;
notifyChanged(NUMITERSU,old,num_iters_u) ;
}
}
COM: <s> sets the number of iterations in the u direction </s>
|
funcom_train/40257970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(String text) {
Assert.isNotNull(text);
this.text = escape(text);
if (label != null && !label.isDisposed()) {
label.setText(this.text);
}
if (this.text.length() == 0) {
if (isVisible()) {
setVisible(false);
IContributionManager contributionManager = getParent();
if (contributionManager != null) {
contributionManager.update(true);
}
}
}
else {
if (!isVisible()) {
setVisible(true);
IContributionManager contributionManager = getParent();
if (contributionManager != null) {
contributionManager.update(true);
}
}
}
}
COM: <s> sets the text to be displayed in the status line </s>
|
funcom_train/808546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
documentRootEClass = createEClass(DOCUMENT_ROOT);
createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED);
createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
createEReference(documentRootEClass, DOCUMENT_ROOT__PCOREFILTER);
pcoreFilterTypeEClass = createEClass(PCORE_FILTER_TYPE);
createEAttribute(pcoreFilterTypeEClass, PCORE_FILTER_TYPE__QUERY_FILE);
createEAttribute(pcoreFilterTypeEClass, PCORE_FILTER_TYPE__QUERY_ID);
}
COM: <s> creates the meta model objects for the package </s>
|
funcom_train/45114433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAsciiMode(boolean isAscii) throws Exception {
String command = "binary";
if (isAscii){
command="ascii";
}
cli.command(command,1000*60,true,false,null,ftpGeneralPrompts);
if (cli.getResult().indexOf("200") < 0){
throw new Exception("Failed changing to binary mode");
}
}
COM: <s> changes ftp session mode ascii binary </s>
|
funcom_train/35104909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readInt(int addr) throws MemoryException {
return (this.readByte(addr+3) & 0xFF) << 24 | (this.readByte(addr+2) & 0xFF) << 16 | (this.readByte(addr+1) & 0xFF) << 8 | (this.readByte(addr) & 0xFF);
}
COM: <s> read one int from memory </s>
|
funcom_train/39369586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compressHdrs(int[][] hdrs, int hdrLength, int nTraces, byte[] encodedBytes) {
return _hdrCompressor.compress(hdrs, hdrLength, (float[][])null, nTraces, encodedBytes, 0);
}
COM: <s> compresses a 2 d array of trace headers </s>
|
funcom_train/39067408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MarkerNoteFile read(File file) throws IOException {
MarkerNoteFile notes = new MarkerNoteFile();
ParseHandler handler = getParseHandler(notes);
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
SAXParser parser = factory.newSAXParser();
parser.parse(file, handler);
} catch (ParserConfigurationException e) {
throw new IOException(e.getMessage());
} catch (SAXException e) {
throw new IOException(e.getMessage());
}
return notes;
}
COM: <s> read the file code file code into a new marker note file </s>
|
funcom_train/18098076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CommandItem getChild(Command parentCommand) {
if (!this.hasChildren) {
return null;
}
for ( int i=0; i<this.children.size(); i++ ) {
CommandItem child = (CommandItem) this.children.get(i);
if ( child.command == parentCommand ) {
return child;
} else if (child.hasChildren) {
child = child.getChild(parentCommand);
if (child != null) {
return child;
}
}
}
return null;
}
COM: <s> retrieves the child item for the specified command </s>
|
funcom_train/31477227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawString(String text, java.awt.Graphics g, java.awt.Color foreground) {
byte[] bytes = getByteArray(text);
int xPos = 0;
for (int i = 0; i < bytes.length; i++) {
int width = getWidth(bytes[i]);
g.drawImage(fontImage,
xPos,
0,
xPos + width,
height,
getXPos(bytes[i]),
0,
getXPos(bytes[i]) + width,
height,
null);
xPos += width;
}
}
COM: <s> draws the text on the given graphics object </s>
|
funcom_train/35842513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPoints(Fig fs, Fig fd) {
FigPoly fig = getUnderlyingFig();
Point p = fs.getLocation();
p.translate(fs.getWidth(), fs.getHeight() / 2);
fig.addPoint(p);
p = fd.getLocation();
p.translate(0, fd.getHeight() / 2);
fig.addPoint(p);
}
COM: <s> add points to the underlying fig poly </s>
|
funcom_train/11381943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isKillable(TaskAttemptID tid) {
TaskInProgress tip = taskTracker.getRunningTask(tid);
return tip != null && !tip.wasKilled() &&
(tip.getRunState() == TaskStatus.State.RUNNING ||
tip.getRunState() == TaskStatus.State.COMMIT_PENDING);
}
COM: <s> check if a task can be killed to increase free memory </s>
|
funcom_train/5395370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetElementStartTag() {
System.out.println("getElementStartTag");
String pName = "";
TableManager instance = new TableManager();
short expResult = 0;
short result = instance.getElementStartTag(pName);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get element start tag method of class org </s>
|
funcom_train/35075129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEdge(String source, String dest, int cost) {
if (cost < 0) throw new IllegalArgumentException("Negative cost paths are not supported");
int isrc = getIntegerNode(source);
int idest = getIntegerNode(dest);
nodes[isrc][idest] = cost;
distancesGenerated = false;
//System.out.printf("Adding edge %s -> %s [%d]\n",source,dest,cost);
}
COM: <s> adds an edge from source to dest with a cost </s>
|
funcom_train/33606590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAppend() {
System.out.println("append");
p1.append(p2);
assertEquals("+2x",p1.toString());
p2.append(p3);
assertEquals("+1.5x+1-0.7x^-1",p2.toString());
}
COM: <s> test of append method of class scio </s>
|
funcom_train/9196625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeToFile(int sessionId, String music) {
String sessionName = FTStore.getSession(sessionId).getName();
String filename = sessionName + ".txt";
try {
FileWriter fstream = new FileWriter(filename, true);
BufferedWriter out = new BufferedWriter(fstream);
out.write(music + "\n");
out.close();
} catch (Exception e) {
System.err.println("Error: " + e.getMessage());
}
}
COM: <s> handles the writing of a send data message to a file </s>
|
funcom_train/2845198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Annotation annotation, Relation relation) {
getAnnotationFile().setSaved(false);
if (annotation == relation.getAnchor())
remove(relation);
else {
relation.remove(annotation);
((List)relations_per_annotation.get(annotation)).remove(relation);
}
update(annotation);
}
COM: <s> removes the specified annotation from the specified relation or if the specified </s>
|
funcom_train/18551539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillBeanFromGUI() {
gXflowsProjectBean.setProjectName(gProjectNameTextField.getText());
gXflowsProjectBean.setPackageName(gPackageNameTextField.getText());
gXflowsProjectBean.setClassName(gClassNameTextField.getText());
gXflowsProjectBean.setMethodName(gMethodNameTextField.getText());
gXflowsProjectBean.setSourceOutput(gSourceTextField.getText());
}
COM: <s> method fill bean from gui </s>
|
funcom_train/50605404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add (SingletonCfg singleton) {
if (singleton == null)
throw new NullPointerException("singleton");
if (!singeltonClasses.add(singleton.getSingeltonType()))
throw new IllegalArgumentException(
"Cannot declare more than one singleton of class '"
+ singleton.getSingeltonType() + "'");
singeltonCfgs.add(singleton);
}
COM: <s> decalres a singleton config in this application </s>
|
funcom_train/24641094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean closeAllProjectDataFiles() {
boolean allProjectFilesClosed = true;
Project currentProject = KreatorMain.getProjectController().getCurrentProject();
List<DataFile> files = KreatorMain.getUserInterface().getCurrentOpenFiles();
for (DataFile file : files) {
if (currentProject.containsDataFile(file)) {
allProjectFilesClosed = allProjectFilesClosed && closeDataFile(file);
}
}
return allProjectFilesClosed;
}
COM: <s> check out whether the file is contained in the current project </s>
|
funcom_train/12368479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadWeightsListener() {
Graph activeGraph = getOneActiveGraph();
if (activeGraph != null) {
File weightFile = getUserSelectedFile();
if (weightFile!=null) {
_regionAnalysisService.doLoadWeights(activeGraph, weightFile);
scriptService.log(_regionAnalysisService, "doLoadWeights", null, activeGraph, weightFile);
this.lastWeightsFile.setValue(weightFile.getAbsolutePath());
}
//TODO: Log action
}
}
COM: <s> listener function for loading weights </s>
|
funcom_train/29950751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Control currentControl() {
if ( m_groups.size() == 0 ) {
return null;
} else {
try {
return (Control)
m_controls.elementAt(m_currentControlIndex);
} catch (ArrayIndexOutOfBoundsException aioobe) {
m_currentControlIndex = 0;
return currentControl();
}
}
}
COM: <s> return current control of group </s>
|
funcom_train/24365698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLabels() {
if (inputButton != null)
inputButton.setText( app.getPlain("InputLabel") + ":");
//inputButton.setToolTipText(app.getMenu("Mode") + " " + app.getMenu("InputField"));
if (helpButton != null)
helpButton.setToolTipText(app.getMenu("FastHelp"));
//setCommandNames();
}
COM: <s> updates labels according to current locale </s>
|
funcom_train/13780942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generate(String templateName, Map<String, Object> variables) throws Exception {
Template template = velocityEngine.getTemplate(templateName);
VelocityContext context = new VelocityContext();
populateContext(context, variables);
StringWriter writer = new StringWriter();
template.merge(context, writer);
return writer.toString();
}
COM: <s> generates the string using specified template </s>
|
funcom_train/9708351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected BSFEngine getBSFEngine(MessageContext mc) throws AxisFault {
BSFEngine bsfEngine;
ServiceContext serviceContext = mc.getServiceContext();
synchronized (serviceContext) {
bsfEngine = (BSFEngine) serviceContext.getProperty(BSFENGINE_PROP);
if (bsfEngine == null) {
bsfEngine = initScript(mc);
}
}
return bsfEngine;
}
COM: <s> gets the bsfengine for the script service </s>
|
funcom_train/48494009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
logger.info("Model: " + modelFile);
int i = 1;
for (Batch batch : batches) {
logger.info("Batch " + i + " of " + batches.size());
// Load model
Coordinator.getInstance().loadModel(modelFile);
if (!Coordinator.getInstance().isModelLoaded()) {
logger.error("Model cannot be loaded");
break;
}
// Start a batch run
batch.start();
i++;
}
}
COM: <s> runs all batches for the model </s>
|
funcom_train/17898537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initClassDefaults(UIDefaults table) {
super.initClassDefaults(table);
String NAME_PREFIX = "org.underworldlabs.swing.plaf.bumpygradient.BumpyGradient";
// Overwrite some of the uiDefaults.
Object[] uiDefaults = {
"RootPaneUI", NAME_PREFIX + "RootPaneUI",
"InternalFrameUI", NAME_PREFIX + "InternalFrameUI",
};
table.putDefaults(uiDefaults);
}
COM: <s> initializes the class defaults that is overrides some ui delegates </s>
|
funcom_train/33638918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(int id){
int start = 0, end = ids.length-1;
for(int x=(start+end)/2; start<=end; x=(start+end)/2){
if(ids[x] < id) start = x+1;
else if(ids[x] > id) end = x-1;
else return true;
}
return false;
}
COM: <s> tests if the specified id exists in this itemset </s>
|
funcom_train/34272330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInputHandler(final IInputHandler newInputHandler) {
if (null != newInputHandler) {
inputHelper = newInputHandler;
setDirty(true);
inputHelper.setStore(this);
if (state != ModelStates.RUNNING) {
setState(ModelStates.CONFIGURED);
}
if (inputHelper.getState() == InputHandlerStates.READY) if (state != ModelStates.RUNNING) {
setState(ModelStates.READY);
}
}
}
COM: <s> sets the input helper to the instance receives on the parameter </s>
|
funcom_train/25577040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setUpLayout(Container parent) {
initData(); // Initialize or reinitialize the data if needed.
resetLayoutSizes(); // Reset the previous size data.
analyzeHeaders(); // Analyze the headers and fill grid data in the row/column holders.
calculateSizes(parent);
// We calculated the sizes, set the flag for unknown size to false.
sizeUnknown = false;
}
COM: <s> sets the sizes </s>
|
funcom_train/4388437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Transport getTransport(MailServer mailServer) throws MailSessionException {
try {
Transport transport = getSession().getTransport(mailServer.getProtocol().toString());
transport.connect(mailServer.getHostname(), mailServer.getUsername(),
decipherPassword(mailServer.getPassword()));
return transport;
} catch (MessagingException e) {
throw new MailSessionException(e);
}
}
COM: <s> gets the transport </s>
|
funcom_train/34341368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getComandodeSalida() {
if (ComandodeSalida == null) {//GEN-END:|18-getter|0|18-preInit
// write pre-init user code here
ComandodeSalida = new Command("Salir", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit
// write post-init user code here
}//GEN-BEGIN:|18-getter|2|
return ComandodeSalida;
}
COM: <s> returns an initiliazed instance of comandode salida component </s>
|
funcom_train/18480920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumItersV(int num_iters_v) {
if (this.num_iters_v != num_iters_v) {
int old = this.num_iters_v ;
this.num_iters_v = num_iters_v ;
notifyChanged(NUMITERSV,old,num_iters_v) ;
createContents() ;
}
}
COM: <s> sets number of iterations in v direction </s>
|
funcom_train/10181914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj instanceof FlexibleServletAccessor) {
FlexibleServletAccessor flexibleServletAccessor = (FlexibleServletAccessor) obj;
if (this.name == null) {
return flexibleServletAccessor.name == null;
}
return this.name.equals(flexibleServletAccessor.name);
} else {
String str = (String) obj;
if (this.name == null) {
return str == null;
}
return this.name.equals(str);
}
}
COM: <s> the equals and hash code methods are imnplemented just case this object is </s>
|
funcom_train/3083080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModel(ListModel newModel) {
if (newModel == null) {
throw new IllegalStateException("The ListSection must have a non null ListModel");
}
ListModel oldValue = getModel();
if (oldValue != null)
oldValue.removeListDataListener(dataListener);
if (newModel != null)
newModel.addListDataListener(dataListener);
setProperty(PROPERTY_MODEL, newModel);
}
COM: <s> sets the code list model code of the code list section code </s>
|
funcom_train/42114458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isForFutureExtension(int k) {
return k == CASE || k == CATCH || k == CLASS || k == CONST
|| k == DEBUGGER || k == _DEFAULT || k == DO || k == ENUM
|| k == EXPORT || k == EXTENDS || k == FINALLY || k == IMPORT
|| k == SUPER || k == SWITCH || k == THROW || k == TRY;
}
COM: <s> checks if is for future extension </s>
|
funcom_train/4837119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (this.getObject() == null) {
this.getStringBuilder().append(this.getStyle().getNullText());
} else {
style.appendEnd(this.getStringBuilder(), this.getObject());
}
return this.getStringBuilder().toString();
}
COM: <s> p returns the built code to string code </s>
|
funcom_train/50156583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element getChoiceDeleteController(String itemPath, String elementName) {
Element deleteItemAction = df.createElement("span")
.addAttribute("class", "action-button");
Element deleteItemLink = deleteItemAction.addElement("a")
.addAttribute("href", "javascript:doDeleteChoiceElement(" + jspQuotedString(itemPath) + ")");
attachToolHelp(deleteItemLink, "delete this " + elementName + " and its subfields");
deleteItemLink.setText("delete");
return deleteItemAction;
}
COM: <s> create a controller for deleting a repeating item </s>
|
funcom_train/16498221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showContextMenu( Component invoker, int x, int y) {
Point sc = invoker.getLocationOnScreen();
x += sc.x;
y += sc.y;
Dimension size = pmenu.getSize();
Rectangle screen = invoker.getGraphicsConfiguration().getBounds();
pmenu.show( invoker, x - sc.x, y - sc.y);
}
COM: <s> shows the context menu with annotation specific actions </s>
|
funcom_train/6220099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object matchFirst(final String pathExpr, final List<Node> list) {
Pattern pat = createPattern(pathExpr);
Object obj;
for (Iterator i = list.iterator(); i.hasNext();) {
obj = i.next();
if (pat.matcher(obj.toString()).matches()) {
return obj;
}
}
return null;
}
COM: <s> find first match and return it </s>
|
funcom_train/27945938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getParserBootPathFS() {
NbClassPath pbcp = getParserBootPath();
if (pbcp == null ||
"".equals(pbcp.getClassPath()))
pbcp = NbClassPath.createBootClassPath();
return keepBootPath = ClassPathConfigurator.getInstance().getFileSystems(
pbcp);
}
COM: <s> returns a colleciton of file systems that should be used by the parser </s>
|
funcom_train/11021062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object findObjectByProperty(ELContext context, Object property) {
Object retValue = null;
Request request = (Request) context
.getContext(Request.class);
String prop = property.toString();
String[] scopes = request.getAvailableScopes();
int i = 0;
do {
retValue = getObject(request.getContext(scopes[i]), prop);
i++;
} while (retValue == null && i < scopes.length);
return retValue;
}
COM: <s> finds an object in request session or application scope in this order </s>
|
funcom_train/5465886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String convertIcalDateToXSDDate(String icalDate) {
if (icalDate.length() != 8) {
throw new IllegalArgumentException("Invalid ical date: " + icalDate);
}
String year = icalDate.substring(0, 4);
String month = icalDate.substring(4, 6);
String day = icalDate.substring(6, 8);
return year + "-" + month + "-" + day;
}
COM: <s> converts the ical date yyyymmdd to an xsd date yyyy mm dd </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.