__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/43898046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateHalo() {
LOGGER.finer("testCreateHalo");
Halo h = styleFactory.createHalo(styleFactory.getDefaultFill(), filterFactory.literal(4));
assertNotNull("Failed to build halo", h);
assertEquals("Wrong radius", 4, ((Number) h.getRadius().evaluate(feature)).intValue());
}
COM: <s> test of create halo method of class </s>
|
funcom_train/11010814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHeight(int height) {
CTTrPr properties = getTrPr();
CTHeight h = properties.sizeOfTrHeightArray() == 0 ? properties.addNewTrHeight() : properties.getTrHeightArray(0);
h.setVal(new BigInteger("" + height));
}
COM: <s> this element specifies the height of the current table row within the </s>
|
funcom_train/13750683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doMemoryCheck(){
if (!retypar.retypar.hasEnoughMemoryToConvert((int)(wI * hI))){
JOptionPane.showMessageDialog(this, l.pr("Most probably not enough memory for conversion!"),
l.pr("Out-of-memory warning"),
JOptionPane.WARNING_MESSAGE);
}
}
COM: <s> calls code retypar </s>
|
funcom_train/15476736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSpecimenCollection(java.util.Collection specimenCollection) {
this.specimenCollection = specimenCollection;
// for(Iterator i = specimenCollection.iterator(); i.hasNext();)
// {
// Specimen specimen = (Specimen)i.next();
// specimen.setSpecimen(this);
// }
}
COM: <s> sets the specimen collection </s>
|
funcom_train/4533409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendDTMF(String digit) {
if (interlocutors.size() < 1) {
Log.debug("sendDTMF", "No interlocutors");
return;
}
int selectedRow = 0;
Interlocutor inter = (Interlocutor) interlocutors.get(selectedRow);
for (UserActionListener ual : actionHandlers) {
ual.handleDTMF(inter, digit);
}
}
COM: <s> send a dtmf tone to all current calls </s>
|
funcom_train/40312051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetColumnClassName_InvalidColumn1() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.getColumnClassName(-1);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by getCatalogName method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests get column class name with negative column index </s>
|
funcom_train/19323724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRemoteObject() {
EJBProxyServiceImpl ejbProxyService = new EJBProxyServiceImpl(serviceLocator);
Object remoteObJ = null;
try {
remoteObJ = ejbProxyService.getRemoteObject("java:comp/env/TestRemoteEJB");
} catch (EJBException e) {
//e.printStackTrace();
}
assertNull(remoteObJ);
}
COM: <s> test for method get remote object string jndi name </s>
|
funcom_train/43468339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendClassName(Object target) {
String className = target.getClass().getName();
if ((mode & INCLUDE_PACKAGE_PREFIX) != 0) {
buffer.append(className);
return;
}
int lastdotx = className.lastIndexOf('.');
className = className.replace('$', '.');
buffer.append(className.substring(lastdotx + 1));
}
COM: <s> add the classname to the to string </s>
|
funcom_train/48054578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveTo(Point newPosition) {
if (toolBar.isFloatable() == true && newPosition != null) {
Container c = advToolBar.getParent();
if (c instanceof ToolBarContainer) {
ToolBarContainer tbc = (ToolBarContainer) c;
SwingUtilities.convertPointFromScreen(newPosition, tbc);
tbc.setToolBarPosition(advToolBar, newPosition);
}
}
}
COM: <s> sets the new position for this tool bar </s>
|
funcom_train/28601270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMenu() {
this.menu = new JadeMenu((String[]) this.entries.keySet().toArray(), this.selectedFont, this.unselectedFont, this.background);
for (int i = 0; i < this.entries.size(); i++) {
if (this.menu.getSelectedItemString().compareTo(this.selected) != 0)
this.menu.selectionDown();
else
break;
}
}
COM: <s> initialize the menu to the selected index </s>
|
funcom_train/40358940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReservedNamePattern() throws IllegalAccessException {
for (Field field : SpiConstants.class.getFields()) {
String name = field.getName();
if (name.startsWith("PROPNAME")) {
String value = (String) field.get(null);
assertTrue(name + " = " + value,
value.startsWith(SpiConstants.RESERVED_PROPNAME_PREFIX));
}
}
}
COM: <s> tests that all of the spi property name constants match </s>
|
funcom_train/15453882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAdministrator() {
Iterator itAccessLevels = getAccessLevels().iterator();
boolean isAdministrator = false;
while (itAccessLevels.hasNext() && !isAdministrator) {
AccessLevel accessLevel = (AccessLevel) itAccessLevels.next();
isAdministrator = accessLevel.isAdministrator();
}
return isAdministrator;
}
COM: <s> verify when the user has a administrator access </s>
|
funcom_train/13310971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void triggerEvent(Event event) {
try {
eventLock.lock();
log.debug("Event triggered: " + event.toString());
HashSet<EventConsumer> consumers = eventConsumers.get(event
.getClass());
if (consumers != null) {
for (EventConsumer c : consumers) {
try {
c.receive(event);
} catch (Exception e) {
log.error("Exception while triggering event.", e);
}
}
}
} finally {
eventLock.unlock();
}
}
COM: <s> triggers a new event to be dispatched to all event consumers </s>
|
funcom_train/25740698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LivingCollection getTile(int x, int y){
if(x<1 ||x> mapSizeX){
//throw new RuntimeException("X value: " + x + "isn't within range 1 to " +mapSizeX);
return null;
}
if(y<1 ||y> mapSizeY){
//throw new RuntimeException("y value: " + x + "isn't within range 1 to " +mapSizeY);
return null;
}
x--;
y--;
return _map[x][y];
}
COM: <s> once based array </s>
|
funcom_train/9576881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean uploadFile (String localFile, String serverFile) throws IOException {
int i = 0;
byte[] bytesIn = new byte[1024];
FileInputStream in = new FileInputStream(localFile);
BufferedOutputStream out = new BufferedOutputStream(put(serverFile));
while ((i = in.read(bytesIn)) >= 0) {
out.write(bytesIn, 0, i);
}
in.close();
out.close();
return true;
}
COM: <s> upload a file to the server </s>
|
funcom_train/20883482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkEngineState(long state) throws EngineStateError {
long currentState = getEngineState();
if ((currentState & state) != 0) {
throw new EngineStateError
("Invalid EngineState: expected=("
+ stateToString(state) + ") current state=("
+ stateToString(currentState) + ")");
}
}
COM: <s> convenience method that throws an code engine state error code </s>
|
funcom_train/9853811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParametersTo(int i) {
if (parameters == null)
initParameters();
StringBuffer params = new StringBuffer();
int max = (i < parameters.length) ? i : parameters.length;
for (i = 0; i < max; i++)
params.append(parameters[i] +" ");
return params.toString();
}
COM: <s> grabs the lines parameters from the first to the code i code th </s>
|
funcom_train/10790006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setJoins(Column[] cols, Column[] pkCols) {
Column[] cur = getColumns();
for (int i = 0; i < cur.length; i++)
removeJoin(cur[i]);
if (cols != null)
for (int i = 0; i < cols.length; i++)
join(cols[i], pkCols[i]);
}
COM: <s> set the foreign keys joins </s>
|
funcom_train/32156065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSpinner getMinNbMeetings() {
if (minNbOfMeeting == null) {
minNbOfMeeting = new JSpinner(new SpinnerNumberModel(9, 5, 50, 1));
minNbOfMeeting.setBounds(new Rectangle(235, 175, 60, 24));
}
return minNbOfMeeting;
}
COM: <s> this method initializes nb of meeting </s>
|
funcom_train/9874095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getStatistic(String statName) {
float retValue=Float.NaN;
if(statisticsHash.containsKey(statName)) {
retValue = ((Float)statisticsHash.get(statName)).floatValue();
}
return Math.min(retValue*this.getBonferroniCorrection(),1.0f);
}
COM: <s> returns the value of the queried statistic </s>
|
funcom_train/37235683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int compareCalendarDayTo( Calendar day1, Calendar day2) {
int retValue = day1.compareTo( day2 );
if (( day1.get(Calendar.YEAR) == day2.get(Calendar.YEAR)) &&
( day1.get(Calendar.DAY_OF_YEAR ) == day2.get(Calendar.DAY_OF_YEAR))){
retValue = 0;
}
if (retValue != 0 ){
//System.out.println("Debug continuous counts.");
}
return retValue;
};
COM: <s> a completely unnecessary method that should be implemented on the calendar class </s>
|
funcom_train/35056825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String PeekBitsToString(int iCount) throws IOException {
assert(iCount < 32 && iCount > 0);
iCount = BufferEnoughForBits(iCount);
long lngRet = ReadUBits(m_iBitsRemainging, iCount,
m_oBitBuffer.ShallowCopy());
return PadZeroLeft(Long.toBinaryString(lngRet), iCount);
}
COM: <s> same as read bits to string but doesnt </s>
|
funcom_train/35656727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initME(Processor p) throws NotConfiguredError {
if (!waitForState(p, p.Configured))
throw new NotConfiguredError("Unable to configure the processor!");
for (ContentDescriptor s : p.getSupportedContentDescriptors()) {
logger.debug(s);
if (s.toString().equalsIgnoreCase("AVI"))
p.setContentDescriptor(s);
}
if (p.getContentDescriptor() == null)
p.setContentDescriptor(new ContentDescriptor(
ContentDescriptor.RAW));
p.addControllerListener(this);
}
COM: <s> configure the processor br </s>
|
funcom_train/44221943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatchException() {
ViewStateMachine vsm = this.adapter.get_plugin().get_vsm();
String viewType = vsm.get_currentViewType();
try {
vsm.runEvent(ViewStateMachine.JUMP_TO_DOCS + viewType);
} catch( Exception e) {
e.printStackTrace();
}
}
COM: <s> this method is used to send the notification to the plugin adapter </s>
|
funcom_train/48147358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseClicked(MouseEvent event){
int y0 = yGraph(0);
int y = event.getY();
double x = xScale(event.getX());
// Determine if a valid point has been selected
if ((data.getDomain().getLowerBound() <= x) & (x <= data.getDomain().getUpperBound()) & (y0 - 10 < y) & (y < y0 + 10)){
data.setValue(x);
repaint();
values.addElement(new Double(x));
}
}
COM: <s> this method handles the events corresponding to mouse clicks </s>
|
funcom_train/41852853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand1() {
if (backCommand1 == null) {//GEN-END:|146-getter|0|146-preInit
// write pre-init user code here
backCommand1 = new Command("Back", Command.BACK, 0);//GEN-LINE:|146-getter|1|146-postInit
// write post-init user code here
}//GEN-BEGIN:|146-getter|2|
return backCommand1;
}
COM: <s> returns an initiliazed instance of back command1 component </s>
|
funcom_train/45038473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetModelType() throws Exception {
UmlMDRepository umlRep = new UmlMDRepository(UmlMDRepository.UML_V14);
UmlFacade facade = new UmlFacade(umlRep);
final String prefix = "org::omg::uml::Foundation";
final String elementName = "Core::ModelElement";
assertNotNull(facade.getClassifier(elementName));
assertNotNull(facade.getClassifier(prefix + "::" + elementName));
}
COM: <s> tests the uml facade accessing classifiers of the uml 1 </s>
|
funcom_train/26216253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processMouseMotionEvent(MouseEvent mouseEvent) {
LOG.fine("processMouseMotionEvent");
if (mouseEvent.getID() == MouseEvent.MOUSE_MOVED) {
if (contains(mouseEvent.getPoint())) {
setState(STATE_MOUSE_OVER);
} else {
setState(STATE_UNSELECTED);
}
}
} // END processMouseMotionEvent
COM: <s> process mouse motion events </s>
|
funcom_train/29954586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCalciumBlock() {
System.out.println("setCalciumBlock");
CalciumBlockObject CalciumBlock= new CalciumBlockObject();
ParametersSetObject instance = new ParametersSetObject();
instance.setCalciumBlock(CalciumBlock);
CalciumBlockObject result = instance.getCalciumBlock();
System.out.println(result);
assertEquals(CalciumBlock, result);
}
COM: <s> test of set calcium block method of class hbm </s>
|
funcom_train/23716440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getScreenCommand () {
if (screenCommand == null) {//GEN-END:|75-getter|0|75-preInit
// write pre-init user code here
screenCommand = new Command ("Screen", Command.SCREEN, 0);//GEN-LINE:|75-getter|1|75-postInit
// write post-init user code here
}//GEN-BEGIN:|75-getter|2|
return screenCommand;
}
COM: <s> returns an initiliazed instance of screen command component </s>
|
funcom_train/32746313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sumUp(int winPts, int drawPts, int lossPts, int sdWinPts, int sdLossPts, int bonus) {
points_ =
(won_-sdWon_) * winPts +
sdWon_ * sdWinPts +
drawn_ * drawPts +
sdLost_ * sdLossPts +
(lost_-sdLost_) * lossPts +
bonus;
gDiff_ = for_-against_;
}
COM: <s> calculates points and goaldifference </s>
|
funcom_train/22132022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkDuplicates() throws Failure {
int i;
Variable v;
String name;
for (i = 0; i < vars.length; i++) {
v = vars[i];
name = v.getName();
if (lookup(name) != v) {
throw new Failure("duplicate variable name: " + name);
}
}
}
COM: <s> throws failure if there are multiple variables with the same name </s>
|
funcom_train/1453271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFillThickness(int fillThickness) {
getParent().invalidate();
if (fillThickness!=GChart.NAI && fillThickness < 0)
throw new IllegalArgumentException(
"fillThickness="+fillThickness+"; "+
"fillThickness must either be >= 0, or else " +
"equal to GChart.NAI.");
this.fillThickness = fillThickness;
}
COM: <s> sets the thickness of the rectangular elements used to </s>
|
funcom_train/34523296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder buf = new StringBuilder();
buf.append("Start time: ")
.append(startTime.toString())
.append(" End Time: ")
.append(endTime.toString())
.append(" Duration: ")
.append(getDuration().toString());
return buf.toString();
}
COM: <s> returns a string object representing this object </s>
|
funcom_train/19826625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calcRowHeight(Graphics g) {
Font f = getFont();
FontMetrics fm = g.getFontMetrics(f);
//As icons are displayed use maximum from font and icon height
int rowHeight = Math.max(fm.getHeight(), 16) + 4;
needCalcRowHeight = false;
setRowHeight(rowHeight);
}
COM: <s> calculate the height of rows based on the current font </s>
|
funcom_train/49958119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildLogPane() {
// logging panel
logTextArea.setFont(new Font("MonoSpaced", Font.PLAIN, 10));
logTextArea.setEditable(false);
logTextArea.setCaretPosition(logTextArea.getDocument().getLength());
logScrollPane.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
logScrollPane.setAutoscrolls(true);
}
COM: <s> build the logging panel </s>
|
funcom_train/171231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean arrayrefOfArrayType(Instruction o, Type arrayref){
if (! ((arrayref instanceof ArrayType) || arrayref.equals(Type.NULL)) )
constraintViolated(o, "The 'arrayref' does not refer to an array but is of type "+arrayref+".");
return (arrayref instanceof ArrayType);
}
COM: <s> assures arrayref is of array type or null </s>
|
funcom_train/21469453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void formatStandaloneDay(StringBuffer buf, int count, Date date) {
int value = date.getDay();
if (count == 5) {
buf.append(dateTimeFormatInfo.weekdaysNarrowStandalone()[value]);
} else if (count == 4) {
buf.append(dateTimeFormatInfo.weekdaysFullStandalone()[value]);
} else if (count == 3) {
buf.append(dateTimeFormatInfo.weekdaysShortStandalone()[value]);
} else {
zeroPaddingNumber(buf, value, 1);
}
}
COM: <s> formats standalone weekday field according to pattern specified </s>
|
funcom_train/8074980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStopwordRemoval(boolean stopwordRemoval) {
m_stopwordRemoval = stopwordRemoval;
if (m_stopwordRemoval) {
try {
BufferedReader in = new BufferedReader(new FileReader(m_stopwordFilename));
m_stopwordSet = new HashSet();
String stopword;
while ((stopword = in.readLine()) != null) {
m_stopwordSet.add(stopword);
}
} catch (Exception e) {
System.out.println("Problems initializing the stopwords from " + m_stopwordFilename);
}
}
}
COM: <s> turn stopword removal on off and load the stopwords </s>
|
funcom_train/26138801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel32() {
if (jPanel32 == null) {
jLabel3 = new JLabel();
jLabel3.setText("Datum");
FlowLayout flowLayout5 = new FlowLayout();
flowLayout5.setHgap(0);
flowLayout5.setAlignment(FlowLayout.LEFT);
jPanel32 = new JPanel();
jPanel32.setPreferredSize(new Dimension(100, 30));
jPanel32.setLayout(flowLayout5);
jPanel32.add(jLabel3, null);
}
return jPanel32;
}
COM: <s> this method initializes j panel32 </s>
|
funcom_train/29545825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIcon(TreeItem incident, Display incDisplay, int incType, int incSeverity) {
String iconName;
if (incType == 0) {
iconName = "O" + incSeverity + ".jpg";
} else if (incType == 1) {
iconName = "R" + incSeverity + ".jpg";
} else if (incType == 2) {
iconName = "I" + incSeverity + ".jpg";
} else {
iconName = "U.jpg";
}
incident.setImage(new Image(incDisplay, iconName));
return;
}
COM: <s> set the icon indicating the type and severitry of an incident </s>
|
funcom_train/21634115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveSegregate(final EncogWriteHelper out) {
saveSubSection(out, "SEGREGATE", "CONFIG");
out.addSubSection("FILES");
out.addColumn("file");
out.addColumn("percent");
out.writeLine();
for (final AnalystSegregateTarget target : this.script.getSegregate()
.getSegregateTargets()) {
out.addColumn(target.getFile());
out.addColumn(target.getPercent());
out.writeLine();
}
}
COM: <s> save segregate info </s>
|
funcom_train/20238784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean getCollapsedStatusForSequence(String aSequence){
for (int i = 0; i < iPeptideGroups.size(); i++) {
if(iPeptideGroups.get(i).getSequence().equalsIgnoreCase(aSequence)){
return iPeptideGroups.get(i).isCollapsed();
}
}
//if we get here, we could not find the correct peptidegroup
//so collapse it
return true;
}
COM: <s> this method gives a boolean that indicates if a ratiogroups that </s>
|
funcom_train/12649440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(byte[] buf, int off, int len) throws IOException {
int endoff = off + len;
if (off < 0 || len < 0 || endoff > buf.length || endoff < 0) {
throw new IndexOutOfBoundsException();
}
bout.write(buf, off, len, false);
}
COM: <s> writes a sub array of bytes </s>
|
funcom_train/41139243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadDb() {
try {
ObjectInputStream aObjInputStream = new ObjectInputStream(new FileInputStream(DB_FILE_PATH));
mDb = (Map<Person, Set<TimeCard>>) aObjInputStream.readObject();
aObjInputStream.close();
}
catch (Exception e) {
// TODO: this ought to be logged
e.printStackTrace();
}
}
COM: <s> reads the contents of the database from disk </s>
|
funcom_train/16791263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doTimerNameIsFile() {
this.startUpdate();
this.model.getPreferences().setTimerNameIsFile(!this.model.getPreferences().isTimerNameIsFile());
this.finishUpdate();
try {
this.model.getPreferences().save();
} catch (Exception ex) {
this.error(TMSUIBundle.ERROR_PREFERENCES, ex);
}
}
COM: <s> toggle the timer file name </s>
|
funcom_train/25083214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRequired() {
if (required != null) {
return (this.required);
}
ValueExpression ve = getValueExpression("required");
if (ve != null) {
try {
return (Boolean.TRUE.equals(ve.getValue(getFacesContext().getELContext())));
}
catch (ELException e) {
throw new FacesException(e);
}
} else {
return (false);
}
}
COM: <s> p return the required field state for this component </s>
|
funcom_train/990084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void glLightModelfv (int pname, float params []) {
float temp [];
switch (pname) {
case GL_LIGHT_MODEL_AMBIENT:
temp = new float [4];
System.arraycopy (params, 0, temp, 0, 4);
CC.gl_light_model (pname, temp);
break;
case GL_LIGHT_MODEL_LOCAL_VIEWER:
case GL_LIGHT_MODEL_TWO_SIDE:
temp = new float [1];
temp [0] = params [0];
CC.gl_light_model (pname, temp);
break;
default:
CC.gl_error (GL_INVALID_ENUM, "glLightModelfv(pname)");
}
}
COM: <s> glvoid gl light modelfv glenum pname const glfloat params </s>
|
funcom_train/22235256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildGraph() {
//System.err.println("Build Graph "+this);
if (node instanceof com.sun.j3d.utils.scenegraph.io.SceneGraphIO)
((com.sun.j3d.utils.scenegraph.io.SceneGraphIO)node).restoreSceneGraphObjectReferences( control.getSymbolTable() );
}
COM: <s> subclasses should processes their own build graph requirements before </s>
|
funcom_train/44451382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateWangTiling(WangTileSet tileSet) {
this.tileSet = tileSet;
for (int j = 0; j < verticalTiles; j++) {
for (int i = 0; i < horizontalTiles; i++) {
setTileAt(getMatchingTileFromSet(i, j), i, j);
}
}
}
COM: <s> fills this wang tiling with tiles from the given set </s>
|
funcom_train/22210081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRow(AMMember label, AMMember[] value, AMMember showAssociation) {
if (value.length == 1) {
addRow(label, value[0], showAssociation);
} else {
_addRow(getLabelButton(label), getValueList(value), showAssociation);
}
}
COM: <s> adds a row with one member which serves as the label </s>
|
funcom_train/5268601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToString() throws AssertionFailedException {
System.out.println("Testing toString()");
Point instance = new Point(5, 7);
String expResult_1 = "(5, 7)";
String result_1 = instance.toString();
assertEquals(expResult_1, result_1);
}
COM: <s> test of test to string method of class point </s>
|
funcom_train/46857081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPnlMp() {
if (pnlMp == null) {
pnlMp = new JPanel();
pnlMp.setLayout(null);
pnlMp.setBounds(new java.awt.Rectangle(0,86,1010,525));
pnlMp.add(getScpSongList(), null);
pnlMp.add(getScpSongList2(), null);
pnlMp.add(getScpSongList3(), null);
}
return pnlMp;
}
COM: <s> this method initializes pnl mp </s>
|
funcom_train/20677787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StringBuffer compareOperator(ASToperator operatorNode, String type) {
StringBuffer arg1 = translateNode(operatorNode.getChild(0));
StringBuffer arg2 = (operatorNode.getChildrenCount() == 2) ? translateNode(operatorNode
.getChild(1))
: null;
HashMap replaces = createReplacesMap();
replaces.put("op1", arg1);
replaces.put("op2", arg2);
return TransTemplater.getInstance().fillTemplate(type, replaces);
}
COM: <s> equals relational operator could apply to strings and numbers </s>
|
funcom_train/26490511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getAllMyOnlineFriends(String user_uid) {
Vector result = new Vector();
Enumeration e = getAllMyFriends(user_uid).elements();
while (e.hasMoreElements()) {
ObjectFriend friend = (ObjectFriend)e.nextElement();
if (friend.getStatus().equals("online")) result.add(friend);
}
return result;
}
COM: <s> method used to fetch all the online friends of a cafes user </s>
|
funcom_train/24920323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSubAltName(int altNameType) {
log.trace("altNameType=" + altNameType);
Collection<List<?>> altNames = null;
try {
altNames = cert.getSubjectAlternativeNames();
}
catch (CertificateParsingException e) {
log.error(e);
return null;
}
for(List<?> item : altNames){
if(item.contains(altNameType)){
Integer type = (Integer)item.get(0);
if (type.intValue() == altNameType)
return (String)item.get(1);
}
}
return null;
}
COM: <s> gets the san subject alternative name of the specified type </s>
|
funcom_train/2883665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMimeTypes(Vector<String> mimeTypes) {
if (mimeTypes == null || mimeTypes.isEmpty()) {
mimeTypeMap = null;
} else {
mimeTypeMap = new HashMap<String, String>(mimeTypes.size());
for (String mimeType : mimeTypes) {
mimeTypeMap.put(mimeType, mimeType);
}
}
}
COM: <s> set the mime types of this component </s>
|
funcom_train/18807311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void encode(BufferedImage bufferedImage, OutputStream outputStream) throws IOException {
if (bufferedImage == null) throw new IllegalArgumentException("Null 'image' argument.");
if (outputStream == null) throw new IllegalArgumentException("Null 'outputStream' argument.");
ImageIO.write(bufferedImage, ImageFormat.PNG, outputStream);
}
COM: <s> encodes an image in png format and writes it to an output stream </s>
|
funcom_train/20778673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPixelsToTipOfArm(int pixelsToTipOfArm) {
if(pixelsToTipOfArm>chip.getSizeY()/2) pixelsToTipOfArm=chip.getSizeY()/2;
this.pixelsToTipOfArm = pixelsToTipOfArm;
getPrefs().putInt("Goalie.pixelsToTipOfArm",pixelsToTipOfArm);
}
COM: <s> defines the distance in image rows to the tip of the goalie arm </s>
|
funcom_train/13993272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddParserIfRequired02() throws Exception {
ComponentFactory componentFactory = new ComponentFactory();
componentFactory.registerComponentBuilder(DEFAULT_TYPE.getName(),
new MockComponentBuilder());
ComponentConfig config = new ComponentConfig(PROPERTY, TITLE);
HashMap parsers = new HashMap();
Map parseLayerParsers = getParserMap(componentFactory, config,
parsers);
assertEquals(0, parseLayerParsers.size());
}
COM: <s> tests that no parser is added if the default ui component no </s>
|
funcom_train/19430559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertText(final String htmlSnippet) {
StringBuilder sb = new StringBuilder();
sb.append(getResource("org/jskat/gui/help/frame.html"));
int ix = sb.indexOf("@@insert@@");
if (ix < 0) {
throw new IllegalArgumentException("frame.html contains no @@insert@@");
}
sb.replace(ix, ix + 10, htmlSnippet);
textPane.setText(sb.toString());
textPane.setCaretPosition(0);
}
COM: <s> inserts a html snippet in the general frame of the htmldialog </s>
|
funcom_train/32219425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unbundleResults( Object resultBundle )
{ HamiltPartialPathPiece bundlePiece;
bundlePiece = (HamiltPartialPathPiece) resultBundle;
//save schedData and scheduler, so can restore after clobbered
DKUSchedulerData tempSchedData = schedData;
DKUSchedulerBase tempScheduler = scheduler;
bundlePiece.copyNeededInstanceDataIntoClone(this);//treat this as clone
setStateFrom( bundlePiece );
schedData = tempSchedData;
scheduler = tempScheduler;
}
COM: <s> unbundle results is called on the original dkupiece in local memory </s>
|
funcom_train/1600732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paneEvent(Object object){
GUI gui = (GUI)registeredObject;
GPane pane = gui.getTopPane();
if(pane == null) return;
int currentZoom = pane.getShowCachedZoomLevel();
super.setSelected(pane.getMode() == GPane.DRAGGING_MODE);
}
COM: <s> method to define a listener for a given object </s>
|
funcom_train/33408488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonpodaab() {
if (jButtonpodaab == null) {
jButtonpodaab = new JButton();
jButtonpodaab.setBounds(new Rectangle(195, 117, 137, 26));
jButtonpodaab.setText("A Estrella");
jButtonpodaab.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("Boton A estrella apretado");
application.estrategia(7);
}
});
}
return jButtonpodaab;
}
COM: <s> this method initializes j buttonpodaab </s>
|
funcom_train/18868344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBudgetGoal(final Account account, final BudgetGoal budgetGoal) {
if (account == null) {
throw new IllegalArgumentException("Account may not be null");
}
if (budgetGoal == null) {
throw new IllegalArgumentException("Account goals may not be null");
}
accountGoals.put(account.getUuid(), budgetGoal);
}
COM: <s> sets the goals for an code account code </s>
|
funcom_train/18593021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent findInvokedPopup(Component invoker, Component parent) {
if (AWT.isTransientPopup(parent)) {
JComponent popup = findPopup((Container)parent);
if (popup != null
&& (!(popup instanceof JPopupMenu)
|| !(getParent(popup) instanceof JMenu))) {
if (getParent(popup) == invoker) {
return popup;
}
}
}
return null;
}
COM: <s> returns the invoked popup found under the given parent if any </s>
|
funcom_train/12180921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void update(Runnable runnable) {
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
if (windows != null && windows.length > 0) {
Display display = windows[0].getShell().getDisplay();
display.asyncExec(runnable);
} else {
runnable.run();
}
}
COM: <s> posts the update code behind the running operation </s>
|
funcom_train/44869353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMExpressionFunctionBean getIntFunc() {
if (intFunc == null) {
intFunc = new WCMExpressionFunctionBean();
intFunc.setParser(getParser());
intFunc.setVariable(getXVar());
intFunc.setDefinition("numInt(t,0,x,f(t),100) + c");
}
return intFunc;
}
COM: <s> this method initializes int func </s>
|
funcom_train/50331229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configure() {
// connect to a packetizing traffic controller
XNetTrafficController packets = new XNetPacketizer(new LenzCommandStation());
packets.connectPort(this);
// start operation
// packets.startThreads();
adaptermemo.setXNetTrafficController(packets);
new XNetInitilizationManager(adaptermemo);
jmri.jmrix.lenz.ActiveFlag.setActive();
}
COM: <s> set up all of the other objects to operate with a li101 </s>
|
funcom_train/32080014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
int itemHandle = OS.gcnew_ComboBoxItem ();
int strPtr = createDotNetString (string, false);
OS.ContentControl_Content (itemHandle, strPtr);
OS.GCHandle_Free (strPtr);
int itemCollection = OS.ItemsControl_Items (handle);
OS.ItemCollection_Add (itemCollection, itemHandle);
OS.GCHandle_Free (itemCollection);
OS.GCHandle_Free (itemHandle);
}
COM: <s> adds the argument to the end of the receivers list </s>
|
funcom_train/26020091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IChatSession initiateAdhocGroupChatSession(List<String> participants, String subject) throws ClientApiException {
if (coreApi != null) {
try {
return coreApi.initiateAdhocGroupChatSession(participants, subject);
} catch(Exception e) {
throw new ClientApiException(e.getMessage());
}
} else {
throw new CoreServiceNotAvailableException();
}
}
COM: <s> initiate an ad hoc group chat session </s>
|
funcom_train/2558072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Section getSection(String name) throws Exception {
ModelMap map = getModels();
ModelList list = map.get(name);
if(list != null) {
Model model = list.take();
if(model != null){
return new ModelSection(context, model);
}
}
return null;
}
COM: <s> returns the named section as a code section code object </s>
|
funcom_train/18898413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resolution resolve(Constraint constraint) throws QueryException {
if (!(constraint instanceof TestConstraint)) {
throw new QueryException("TestResolver unable to resolve non-TestConstraint: " + constraint);
}
try {
return new TestResolution((TestConstraint)constraint);
} catch (TuplesException et) {
throw new QueryException("Failed to resolve constraint", et);
}
}
COM: <s> resolve a constraint based on special knowledge of a datatype </s>
|
funcom_train/48793058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processPO() {
long refTime = System.currentTimeMillis();
for (int i = 0; i < lines.size(); i++) {
Vector v = (Vector) lines.get(i);
// Calculates lead time per delivery.
long partsLeadTime = (long) ((POLine) v.firstElement())
.getLeadTime();
long deliveryTime = partsLeadTime * 5000l + refTime;
scheduler.schedule(deliveryTime, new DeliveryOrder(v));
}
}
COM: <s> process po creates xml to deliver the polines </s>
|
funcom_train/3936935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isEndOfName(char ch) {
return (ch == ' ' || ch == 13 || ch == 10 || ch == 9 || ch == '>' || ch == '<'
|| ch == '[' || ch =='/' || ch ==']' || ch ==')' || ch =='(' ||
ch == -1 //EOF
);
}
COM: <s> determine if a character terminates a pdf name </s>
|
funcom_train/14099901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection orphans() {
Set orphanSet = new TreeSet();
Iterator it = Wiki.getInstance().getSubjects();
while (it.hasNext()) {
String subject = (String)it.next();
Set refs = (Set)subjectMap.get(subject);
if ((refs == null) || refs.isEmpty()) {
orphanSet.add(subject);
}
}
return orphanSet;
}
COM: <s> return a collection of subjects not referenced by any other subject </s>
|
funcom_train/256957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseReleased(MouseEvent e) {
// Check for double click
if (e.getClickCount() == 2) {
// Check if thread is already running,
// otherwise wait for it to finish
if (similarityThread != null)
while (similarityThread.isAlive())
Common.sleep(100);
// Start thread to fetch similar requirements
similarityThread = new FetchSimilar(reqSet);
similarityThread.start();
}
}
COM: <s> checks if double click really was made in table and starts thread for </s>
|
funcom_train/40234063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int max_row (){
double max = this.get( 0, 0 );
int row = 0;
for( int i = 0; i < m; i++ )
for( int j = 0; j < n; j++ )
if (get( i, j) > max ){
max = get( i, j);
row = i;
}
return row;
}
COM: <s> find row of max elem </s>
|
funcom_train/3861193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setState(int newState) {
if (state != newState) {
switch (newState) {
case PLAYING:
switch (state) {
case STOPPED:
// Beginning a new game
setVisible(true);
state = newState;
break;
default:
assert false : "Illegal state change";
}
break;
case STOPPED:
assert state == PLAYING : "Illegal state change";
// Make this panel invisible as the game is not being played
// any more.
setVisible(false);
state = newState;
break;
default:
assert false;
}
} else {
assert false : "Illegal state change";
}
}
COM: <s> set the state of the game panel </s>
|
funcom_train/48906423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Player getWinner() {
if(_winner == null) {
Iterator<Player> iterator = _playersCards.keySet().iterator();
Player winner = iterator.next();
while(iterator.hasNext()) {
Player aPlayer = iterator.next();
if(_playersCards.get(winner).getWeight() < _playersCards.get(aPlayer).getWeight()) {
winner = aPlayer;
}
}
_winner = winner;
}
return _winner;
}
COM: <s> gets the winner </s>
|
funcom_train/33495790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent(Graphics g) {
int w = getWidth();
int h = getHeight();
if (isOpaque()) {
g.setColor(getBackground());
g.fillRect(0, 0, w, h);
g.setColor(getForeground());
}
Insets ins = getInsets();
w -= (ins.left + ins.right);
h -= (ins.top + ins.bottom);
g.fillArc(ins.left, ins.top, w, h,
90 - startAngle, startAngle - endAngle);
}
COM: <s> paints the current frame </s>
|
funcom_train/21848167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(ListSelectionEvent e) {
if (isEventsEnabled()) {
if (m_list_listeners == null)
return;
JList list = (JList) e.getSource();
ListSelectionListener listener = (ListSelectionListener) m_list_listeners
.getListener(list.getName());
if (listener != null) {
listener.valueChanged(e);
}
JETAContainer view = getView();
if (view != null) {
UIDirector uidirector = view.getUIDirector();
if (uidirector != null)
uidirector.updateComponents(e);
}
}
}
COM: <s> forwarded from the view when a list selection event occurs </s>
|
funcom_train/41830565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int evaluateWeight(int depth,int moves,int weight) {
if(moves==0) moves = -5; // If player must pass is not so good weight value.
if(depth==3) {
return moves+weight;
} else if(depth==2) {
return moves*4+weight;
} else if(depth==1) {
return moves+weight;
} else if(depth==0) {
return moves*4+weight;
}
return 0;
}
COM: <s> weight is evaluated relative to mobility </s>
|
funcom_train/27758033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseEntered(MouseEvent me) {
if(contains(me.getPoint())){
MouseListener[] mls = (MouseListener[])(comp.getListeners(MouseListener.class));
for(int i = 0; i < mls.length; i++){
mls[i].mouseEntered(me);
}
}
}
COM: <s> this is called when the mouse enters the graph </s>
|
funcom_train/44130351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialise() throws Exception{
if(queueManager == null){
throw new ConditionProcessorException("ConditionProcessor must be associated with a valid QueueManager before use");
}
if(definitionManager == null){
throw new ConditionProcessorException("ConditionProcessor must be associated with a valid DefinitionManager before use");
}
}
COM: <s> initialise this condition processor </s>
|
funcom_train/3141662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttribute(String name, Element element, Object attribute) {
if (attributesForName == null)
attributesForName = new HashMap();
Map attributeList = (Map) attributesForName.get(name);
if (attributeList == null) {
attributeList = new HashMap();
attributesForName.put(name, attributeList);
}
attributeList.put(element, attribute);
}
COM: <s> sets the attribute for the element code element code </s>
|
funcom_train/2628370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAttributes() {
System.out.println("[getAttributes]");
ComponentType compType = new ComponentType();
AttributesType expResult = new AttributesType();
compType.attributes=expResult;
AttributesType result = compType.getAttributes();
assertEquals(expResult, result);
}
COM: <s> test of get attributes method of class component type </s>
|
funcom_train/3772226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RevisionBean getLatestRevision() {
RevisionBean revision = null;
try {
if (revisionDescriptors != null) {
Content content = nat.getContentHelper();
NodeRevisionNumber nrn =
revisionDescriptors.getLatestRevision();
NodeRevisionDescriptor nrd =
content.retrieve(st, revisionDescriptors, nrn);
revision = new RevisionBean(nat, st, nrd);
}
}
catch (SlideException e) {
// ignore for now
}
return revision;
}
COM: <s> returns the latest revision of the node </s>
|
funcom_train/47557252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class Version extends polyglot.main.Version {
public String name() { return "ibex"; }
// TODO: define a version number, the default (below) is 0.1.0
public int major() { return 0; }
public int minor() { return 1; }
public int patch_level() { return 0; }
}
COM: <s> version information for ibex extension </s>
|
funcom_train/26152027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isAddingDuplicateContainer() {
// assume we are adding a duplicate if the selection is null and a LibFolderContainer exists for the project
if (selection == null) {
for (int i = 0; i < this.currentEntries.length; i++) {
if ((currentEntries[i].getEntryKind()
== IClasspathEntry.CPE_CONTAINER)
&& (currentEntries[i]
.getPath()
.segment(0)
.equals(LibFolderContainer.LIB_CONTAINER))) {
return true;
}
}
}
return false;
}
COM: <s> checks a lib folder container does not already exist for this project </s>
|
funcom_train/51209970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHGridColour(Color c) {
if (null == c)
c = new Color(Integer.parseInt("C0", 16), Integer.parseInt("C0", 16), Integer.parseInt("C0", 16));
if (c == getHGridColour())
return;
Event<? extends SettingsEvent> actionEvent = checkObservers(GS_HGridColour, c);
if (null == actionEvent)
return;
hGridColour = c;
notifyObservers(actionEvent);
}
COM: <s> sets the colour for drawing the horizontal grid bars </s>
|
funcom_train/16707163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadFile() {
try {
load(new FileInputStream(propFile));
varPattern = Pattern.compile("(\\@\\{(.+?)\\})+");
} catch (FileNotFoundException e) {
System.out.println("no properties file found: "
+ propFile);
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> load the properties file </s>
|
funcom_train/25211139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AfmKernPairs getAfmKernPair(String charpost) {
AfmKernPairs kp = null;
if (k != null && charpost != null) {
for (int i = 0, j = k.size(); i < j; i++) {
kp = k.get(i);
if (kp.getCharpost().equals(charpost)) {
return kp;
}
}
}
return null;
}
COM: <s> returns a kerning pair for a letter or code null code if no </s>
|
funcom_train/42131724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadSchema() throws IOException {
SaifSchemaReader parser = new SaifSchemaReader();
InputStream in = getInputStream("clasdefs.csn");
try {
declaredMetaDataFactory = parser.loadSchema("clasdefs.csn", in);
} finally {
FileUtil.closeSilent(in);
}
if (metaDataFactory == null) {
setMetaDataFactory(declaredMetaDataFactory);
}
}
COM: <s> load the schema from the saif archive </s>
|
funcom_train/44848848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(ConfigurationItem inConfiguration) {
inConfiguration.saveChanges();
if (EmbeddedDBHelper.checkEmbedded(inConfiguration.getItemProperty(ConfigurationItem.PropertyDef.DB_DRIVER.getPID()).getValue().toString())) {
PreferencesHandler.INSTANCE.setEmbeddedDB();
}
//set the changed setting to the DB source registry
DataSourceRegistry.INSTANCE.setActiveConfiguration(PreferencesHandler.INSTANCE.getDBConfiguration());
dbConfiguration.close();
runNext();
}
COM: <s> callback method saves the input of the db access configuration popup </s>
|
funcom_train/48475446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addCellDoubleClickHandler(com.smartgwt.client.widgets.grid.events.CellDoubleClickHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.grid.events.CellDoubleClickEvent.getType()) == 0) setupCellDoubleClickEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.CellDoubleClickEvent.getType());
}
COM: <s> add a cell double click handler </s>
|
funcom_train/22202035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void buildXML(AMNode center, Object streamObject) throws SAXNotRecognizedException, SAXException {
Set nodes = new java.util.HashSet();
Set arcs = new java.util.HashSet();
openDocument(center, streamObject);
traverseGraph(center, nodes, arcs);
serializeNodes(nodes, arcs);
closeDocument(center);
}
COM: <s> this method transfers the abstract model to xml </s>
|
funcom_train/27674236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Alert origin( final AlertOrigin origin ) {
if ( ! this.hasOrigin ) {
if ( origin.getOrigin() != null ) {
this.culprit( "origin", origin.getOrigin() );
}
if ( origin.getLineNumber() > 0 ) {
this.culprit( "line no.", new Integer( origin.getLineNumber() ) );
}
this.hasOrigin = true;
}
return this;
}
COM: <s> decorates this alert with origin information from the supplied alert </s>
|
funcom_train/8250256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStoreWithoutUserCalendar() {
try {
Calendar calendar = getCalendarWithEmptyUser();
calendarDaoHibernateImpl.storeCalendar(calendar);
fail("StoreWithoutUserCalendarTest failed");
} catch (DaoException e) {
//test passed
} catch (Exception e) {
//fail("Unexpected exception... " + e);
//FIXME org.hibernate.PropertyValueException...
//(org.hibernate.AssertionFailure)
log.warn("THIS SHOUL REALLY BE FIXED :");
}
}
COM: <s> tests whether a calendar can be inserted without having a user </s>
|
funcom_train/8513894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Bitmap toBitmap() {
setDrawingCacheEnabled(false);
if (!isDrawingCacheEnabled()) {
setDrawingCacheEnabled(true);
}
if (mRenderer.isApplyBackgroundColor()) {
setDrawingCacheBackgroundColor(mRenderer.getBackgroundColor());
}
setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
return getDrawingCache(true);
}
COM: <s> saves the content of the graphical view to a bitmap </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.