__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/1029940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBug12218() throws Exception {
if (runMultiHostTests()) {
Connection replConn = null;
try {
replConn = getMasterSlaveReplicationConnection();
assertTrue(!((ConnectionImpl) ((ReplicationConnection) replConn)
.getMasterConnection()).hasSameProperties(
((ReplicationConnection) replConn)
.getSlavesConnection()));
} finally {
if (replConn != null) {
replConn.close();
}
}
}
}
COM: <s> tests fix for bug 12218 properties shared between master and slave with </s>
|
funcom_train/39177244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocServiceProxy getDocServiceProxy(URI docServiceLocation) {
if(proxy == null) {
if(realProxy == null) {
realProxy = new DummyDocServiceProxy();
}
if(traceCalls) {
proxy = TraceWrapper.getTraceWrapper(realProxy, DocServiceProxy.class,
traceMethodParams, traceExceptions);
}
else {
proxy = realProxy;
}
}
return proxy;
}
COM: <s> always returns the same dummy doc service proxy </s>
|
funcom_train/17204368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeState() {
JNIRefs = AddressArray.create(JNIREFS_ARRAY_LENGTH + JNIREFS_FUDGE_LENGTH);
JNIRefsTop = 0;
JNIRefsSavedFP = 0;
JNIRefsMax = (JNIREFS_ARRAY_LENGTH - 1) << LOG_BYTES_IN_ADDRESS;
alwaysHasNativeFrame = false;
}
COM: <s> initialize a thread specific jni environment </s>
|
funcom_train/49441834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void goBackward(final GraphNode /* ! */node) {
assert node != null;
if (!node.isGoToEndingNode()) {
node.setGoToEndingNode(true);
final List<GraphNode> parents = node.getParents();
for (final GraphNode graphNode : parents) {
this.goBackward(graphNode);
}
}
}
COM: <s> recursive method to check that all the ways of a graph goes to </s>
|
funcom_train/17773977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(double d){
double r = (d>0)?d:-d;
if(r>MAX_VALUE/10 || (r<MIN_VALUE*10 && r != 0)){
throw new IllegalArgumentException(d + "is out of range!");
}
value.setValue(new Double(d));
resetSlider.start();
}
COM: <s> sets the value of the slider to d and makes </s>
|
funcom_train/39313505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clickAction(MouseEvent mevt, main_canvas theCanvas) {
dragged = false;
startX = mevt.getX();
startY = mevt.getY(); /*FAULT:: startY = 16; */
//System.out.println("Rectangle--left mouse");
backupImage = theCanvas.getBufferedImage();
curImage = theCanvas.getBufferedImage();
theCanvas.setBufferedImage(curImage);
g2D = curImage.createGraphics();
theCanvas.repaint();
curImage.flush();
backupImage.flush();
}
COM: <s> allows the user to click on the canvas to draw a rectangle </s>
|
funcom_train/31747593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(String languageID, String text) {
Map<String, String> m = getEnsuredMap();
if ("".equals(text) || text == null) {
if (m.containsKey(languageID))
m.remove(languageID);
}
else {
if (!Util.equals(m.get(languageID), text))
m.put(languageID, text);
}
}
COM: <s> sets the text for a given langugage id </s>
|
funcom_train/9664351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean fireFinishEdit(GridCell cell, Object newValue) {
boolean result = true;
for (EditCellListener editCellListener : getEditCellListeners())
result = result && editCellListener.onFinishEdit(cell, newValue);
if (result) {
updateModel(cell, newValue);
cell.setValue(newValue);
} else {
cell.setFocus(true);
}
return result;
}
COM: <s> this method fires the end edit event </s>
|
funcom_train/32056253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected UndoableEdit editToBeUndone(Object obj) {
UndoableEdit undoableedit = null;
Object obj1 = null;
do {
undoableedit = nextEditToBeUndone(undoableedit);
if (undoableedit instanceof GraphModelEvent.GraphViewChange) {
obj1 = ((GraphModelEvent.GraphViewChange) undoableedit)
.getSource();
}
if (!(obj1 instanceof GraphLayoutCache)) {
obj1 = null;
}
} while (undoableedit != null && obj1 != null && obj1 != obj);
return undoableedit;
}
COM: <s> get the edit to be undone </s>
|
funcom_train/1240994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSOAPConstants(SOAPConstants soapConstants) {
// when changing SOAP versions, remember to keep the encodingURI
// in synch.
if (this.soapConstants.getEncodingURI().equals(encodingStyle)) {
encodingStyle = soapConstants.getEncodingURI();
}
this.soapConstants = soapConstants;
}
COM: <s> set the code soapconstants code used by this message context </s>
|
funcom_train/51358639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double minX() {
if (values == null || values.size() == 0) {
System.out.println("MAXX Error");
return -1;
}
double min = ((Point)values.elementAt(0)).x;
for (int i = 0; i < values.size(); i++) {
if (((Point)values.elementAt(i)).x < min) {
min = ((Point)values.elementAt(i)).x;
}
}
return min;
}
COM: <s> returns the smallest x value in the database </s>
|
funcom_train/877781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fatalError(SAXParseException exception) throws SAXException {
log.error("Parse Fatal Error at line " + exception.getLineNumber() +
" column " + exception.getColumnNumber() + ": " +
exception.getMessage(), exception);
if (errorHandler != null) {
errorHandler.fatalError(exception);
}
}
COM: <s> forward notification of a fatal parsing error to the application </s>
|
funcom_train/22285351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ButtonWidget getPrevious() {
ButtonWidget result = this;
if (group != null) {
// get all the available buttons in this group
ButtonWidget[] bws = getGroupButtons();
// search for this button
int index;
for (index = 0; index < bws.length; index++) {
Widget w = bws[index];
if (w == this) {
break;
}
}
// return previous button, if this is not the first one
if (index > 0) {
result = bws[index-1];
}
}
return result;
}
COM: <s> get the previous button in the same group that is not disabled </s>
|
funcom_train/46839765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JXDatePicker getJXDateEndTime() {
if (JXDateEndTime == null) {
JXDateEndTime = new JXDatePicker();
JXDateEndTime.setBounds(new Rectangle(461, 50, 142, 20));
JXDateEndTime.setFormats(EBIPGFactory.DateFormat);
JXDateEndTime.setDate(endDate.getTime());
}
return JXDateEndTime;
}
COM: <s> this method initializes jxdate end time </s>
|
funcom_train/25315753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image loadInternalImage(String name) {
// Return already loaded image
if (this.images.containsKey(name)) {
return this.images.get(name);
}
// Load new image
try {
// Load image
InputStream stream = this.getClass().getResourceAsStream(name);
BufferedImage bi = ImageIO.read(stream);
images.put(name, bi);
return bi;
} catch (IOException e) {
// File reading problems
System.out.println("The specified image '"+name+"' could not be read.");
e.printStackTrace();
}
return null;
}
COM: <s> tries to find and load the specified image </s>
|
funcom_train/14618871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setContentsOfShowViewMenu(IPageLayout layout) {
layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
layout.addShowViewShortcut("uk.co.chasetechnology.xml.ui.xpath.view");
}
COM: <s> sets the initial contents of the show view menu </s>
|
funcom_train/4521135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Ubigeo entity) {
LogUtil.log("saving Ubigeo instance", Level.INFO, null);
try {
entityManager.persist(entity);
LogUtil.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved ubigeo entity </s>
|
funcom_train/28150970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Curve dup() {
Curve ans = new Curve(startX, startY);
ans.endX = endX;
ans.endY = endY;
for(CubicCurve2D.Double x:list) {
CubicCurve2D.Double c = new CubicCurve2D.Double();
c.setCurve(x);
ans.list.add(c);
}
return ans;
}
COM: <s> make a deep copy of this curve object </s>
|
funcom_train/31041688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateEntry(IPropertySheetEntry entry, TableTreeItem item) {
// ensure that backpointer is correct
item.setData(entry);
// update the name and value columns
item.setText(0, entry.getDisplayName());
item.setText(1, entry.getValueAsString());
Image image = entry.getImage();
if (image != null)
item.setImage(1, image);
// update the "+" icon
updatePlus(entry, item);
}
COM: <s> update the given entry but not its children or parent </s>
|
funcom_train/27711421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValue(int i) {
if (i < 0 || i >= fAttributeListLength)
return null;
int chunk = (fAttributeListHandle + i) >> CHUNK_SHIFT;
int index = (fAttributeListHandle + i) & CHUNK_MASK;
return fStringPool.toString(fAttValue[chunk][index]);
}
COM: <s> return the value of an attribute in the list by position </s>
|
funcom_train/11754545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecuteNonExistingApplication() throws Exception {
CommandLine cl = new CommandLine(nonExistingTestScript);
DefaultExecutor executor = new DefaultExecutor();
try {
executor.execute(cl);
}
catch( IOException e) {
// expected
return;
}
fail("Got no exception when executing an non-existing application");
}
COM: <s> try to start an non existing application which should result </s>
|
funcom_train/34120152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFIOGroup(Stub<Person> personStub) {
Person persistent = personService.readFull(personStub);
PersonIdentity identity = persistent.getDefaultIdentity();
String firstName = identity.getFirstName();
String middleName = identity.getMiddleName();
String lastName = identity.getLastName();
String[] arr = {lastName, firstName, middleName};
return StringUtils.join(arr, Operation.FIO_DELIMITER);
}
COM: <s> get first middle last person names group delimited with </s>
|
funcom_train/27943817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open() throws IOException {
/*
* get input stream from the jar file specified by
* the MediaLocator (had BETTER be a file within jar!)
*/
URL url = getLocator().getURL();
JarURLConnection conn = ( JarURLConnection ) url.openConnection();
in = conn.getInputStream();
tellPoint = 0;
}
COM: <s> open the data input stream </s>
|
funcom_train/48669263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyChanges() throws InvalidPropertyValue, VetoException {
if(this.fProperties == null) {
return;
}
// stop editing first...
fTableCellEditor.stopCellEditing();
this.fProperties.veto();
// check for required missing values
PropertyEntry<?> pe = hasMissingValues();
if(pe != null) {
throw new PropertyValueNotSet(
getTranslatedMessage(pe.getProperty()));
}
}
COM: <s> applies changes to the edited typed properties </s>
|
funcom_train/33853237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File verifyFileSelection(File pickedFile) {
if (pickedFile.exists())
return pickedFile;
File parent = pickedFile.getParentFile();
if ((parent != null) && parent.getName().equals(pickedFile.getName()))
return parent;
//Something bad has happened
return pickedFile;
}
COM: <s> fix up the path that is received from jfile chooser if necessary </s>
|
funcom_train/3594058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TranscriptionToTextDelegate getFilterDelegate() {
if (tttDelegate == null) {
String delegateName = defaultDelegateName();
try {
tttDelegate = (TranscriptionToTextDelegate)Class.forName(delegateName).newInstance();
} catch (Exception e) {
System.err.println("FAILED TO INSTANTIATE DELEGATE CLASS '" + delegateName + "'.");
}
}
return tttDelegate;
}
COM: <s> default new instance of class defined in </s>
|
funcom_train/12194422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File createTempDir(String prefix) throws IOException {
File tempDir;
while (true) {
tempDir = File.createTempFile(prefix, "");
tempDir.delete();
if (tempDir.mkdirs()) {
break;
}
}
if (temporaryDirectories == null) {
temporaryDirectories = new ArrayList();
}
temporaryDirectories.add(tempDir);
return tempDir;
}
COM: <s> create a temporary directory for use in test cases </s>
|
funcom_train/32943645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
try {
StringWriter stringWriter = new StringWriter(4096);
StreamResult result = new StreamResult(stringWriter);
Transformer transformer = TransformerFactory.newInstance().newTransformer();
Source source = new CrawlSettingsSAXSource(crawlerSettings);
transformer.transform(source, result);
return stringWriter.toString();
}
catch(TransformerException ex) {
ex.printStackTrace();
return "[ERROR CONVERTING PROFILE TO STRING]";
}
}
COM: <s> convert the heritrix profile object to its xml string </s>
|
funcom_train/8352847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAbsolutePath() {
// strip the last '/' if necessary
String fullName = fileName;
int filelen = fullName.length();
if ((filelen != 1) && (fullName.charAt(filelen - 1) == '/')) {
fullName = fullName.substring(0, filelen - 1);
}
return fullName;
}
COM: <s> get full name </s>
|
funcom_train/15917451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFormal(Name name, Type type){
formals.add(new Pair<Name, Type>(name, type));
//now create a field
classSynth.createField(compilerPos, name.toString(), type);
fieldNames.add(name);
}
COM: <s> this method will be called by localvartofieldaccess replacer </s>
|
funcom_train/32056642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCanEditImmediately() {
System.out.println("testCanEditImmediately");
DefaultGraphCellEditor dgce = new DefaultGraphCellEditor();
String str = new String("hello");
EventObject eo = new EventObject(str);
assertEquals("can edit immediately", dgce.canEditImmediately(eo), false);
}
COM: <s> this function tests can edit immediately function of default graph cell editor class </s>
|
funcom_train/21622492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void wakeQueues() {
logger.debug("wake queues");
DelayedWorkQueue waked;
while((waked = snoozeQueues.poll())!=null) {
logger.debug("find waked. ");
WorkQueue queue = waked.getWorkQueue();
queue.setWakeTime(0L);
queue.setActive(this, true);
readyQueue(queue);
}
}
COM: <s> wake any queues sitting in the snoozed queue whose time has come </s>
|
funcom_train/46619870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void executeString(String oldValue) throws BuildException {
String newValue = DEFAULT_STRING_VALUE;
String currentValue = getCurrentValue(oldValue);
if (currentValue == null) {
currentValue = DEFAULT_STRING_VALUE;
}
if (operation == Operation.EQUALS_OPER) {
newValue = currentValue;
} else if (operation == Operation.INCREMENT_OPER) {
newValue = currentValue + value;
}
this.newValue = newValue;
}
COM: <s> handle operations for type code string code </s>
|
funcom_train/9163638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean test(String value, Breaks delims) {
if (value.length() > 32) {
throw new IllegalArgumentException("String too long.");
}
mark();
StringBuilder sb = new StringBuilder(value.length());
for (int i = 0; i < value.length(); i++) {
sb.append(read());
}
boolean result = sb.toString().equals(value);
char delim = read();
result = result && delims.isDelimiter(delim);
unread(delim);
for (int i = sb.length() - 1; i >= 0; i--) {
unread(sb.charAt(i));
}
reset();
return result;
}
COM: <s> tests if the next token in the input is the given string </s>
|
funcom_train/31782473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void receivedGTC( IncomingMessage incomingMessage ) {
System.err.println( "NotificationServerConnector.receivedGTC()" );
try {
bReverseListBehaviour = incomingMessage.getReverseListBehaviour();
} catch( NoSuchFieldException e ) {
System.err.println( "NotificationServerConnector.receivedGTC() - " + e );
}
}
COM: <s> process the gtc message received from server </s>
|
funcom_train/48529759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toStringBare() {
StringBuffer buffer = new StringBuffer();
int n = IdBitLength / 4;
for (int i = n-1; i >= n-6; i--)
buffer.append(tran[getDigit(i, 4)]);
return buffer.toString();
}
COM: <s> similar to to string but not wrapped by 0x </s>
|
funcom_train/3621480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSetMetaData getResultSetMetaData(String tableName) throws SQLException{
ResultSet rs = getStatement().executeQuery("Select * From " + getQuoteIdentiferIfNeeded(tableName) + " Where 1 = 0");
ResultSetMetaData rsmd = rs.getMetaData();
rs.next(); // scroll to the end, this is needed for the ODBC Bridge
return rsmd;
}
COM: <s> return the result meta data for the given table </s>
|
funcom_train/20874575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Section getSection(long sectionId) {
for (Course course : iCourses) {
for (Config config : course.getOffering().getConfigs()) {
for (Subpart subpart : config.getSubparts()) {
for (Section section : subpart.getSections()) {
if (section.getId() == sectionId)
return section;
}
}
}
}
return null;
}
COM: <s> return section of the requested courses with the given id </s>
|
funcom_train/9523174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ensureCapacityHelper(int minCapacity) {
int oldCapacity = elementData.length;
if (minCapacity > oldCapacity) {
Object[] oldData = elementData;
int newCapacity = (capacityIncrement > 0) ?
(oldCapacity + capacityIncrement) : (oldCapacity * 2);
if (newCapacity < minCapacity) {
newCapacity = minCapacity;
}
elementData = new Object[newCapacity];
System.arraycopy(oldData, 0, elementData, 0, elementCount);
}
}
COM: <s> this implements the unsynchronized semantics of ensure capacity </s>
|
funcom_train/33660963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void findIntersectionUnsorted(double b, double e, Vector<Segment> d, Collection<Segment> s) {
for (Segment segment : s) {
int i=loc(b, e, d, segment);
findIntersectionSegmentStaircase(b, e, d, i, segment);
}
}
COM: <s> o s log d int d s </s>
|
funcom_train/47107128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemArmor04() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Armor.A_04.getItemName());
menuItem.setEnabled(false);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
controller.setPlrReadiedArmor(Armor.A_04);
}
});
return menuItem;
}
COM: <s> creates the fifth choice for the armor menu </s>
|
funcom_train/37139859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String extractNameFromString(String assembly) {
int s = assembly.indexOf(".class");
if (s == -1) {
s = assembly.indexOf(".interface");
if (s == -1) {
throw new IllegalArgumentException(
"Unable to determine the name of the classfile "
+ "from assembly source code supplied");
}
}
int e = assembly.indexOf("\r\n", s);
String sub = assembly.substring(s, e);
String[] c = sub.split("\\s+");
return c[c.length - 1];
}
COM: <s> extracts the name of the class file or interface file from source code </s>
|
funcom_train/29618113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MgisButton getJButtonClose() {
if (jButtonClose == null) {
jButtonClose = new MgisButton();
jButtonClose.setText(AppTextsDAO.get("BUTTON_CLOSE"));
jButtonClose.setBounds(new java.awt.Rectangle(460,295,70,19));
jButtonClose.setVisible(false);
jButtonClose.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
m_ruf.dispose();
}
});
}
return jButtonClose;
}
COM: <s> this method initializes j button close </s>
|
funcom_train/50618102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addServiceCall(ServiceCall<?> serviceCall) {
if ( null == entries ) {
entries = new ArrayList<ServiceCallWrapperImpl>();
}
ServiceCallWrapperImpl abstractCall = new ServiceCallWrapperImpl();
abstractCall.setListener(this);
abstractCall.setServiceCall(serviceCall);
entries.add(abstractCall);
}
COM: <s> this method adds a service call to the queue </s>
|
funcom_train/40685673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInitializedHandler(final StreetviewInitializedHandler handler) {
maybeInitInitializedHandlers();
initializedHandlers.addHandler(handler, new StreetviewLocationCallback() {
@Override
public void callback(StreetviewLocation location) {
StreetviewInitializedEvent event = new StreetviewInitializedEvent(
StreetviewPanoramaWidget.this, location);
handler.onInitialized(event);
}
});
}
COM: <s> adds a handler for initialized events </s>
|
funcom_train/7803683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createStreams() {
try {
// We have to create the OutputStream first because it will
// otherwise block until the OutputStream on the other side has
// flushed its serialization header.
outputStream = new ObjectOutputStream(socket.getOutputStream());
outputStream.flush();
inputStream = new ObjectInputStream(socket.getInputStream());
} catch (IOException e) {
netwProg.error("Could not create socket or get inputstream from socket: " + e.getLocalizedMessage());
}
}
COM: <s> create in and output streams for this channel </s>
|
funcom_train/10571195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSubtraction() throws Exception {
String sXpath=getQuery("testSubtraction",0);
String sExpected="<price at=\"val1\">2</price>";
m_xc.selectPath(sXpath);
assertEquals(1,m_xc.getSelectionCount());
m_xc.toNextSelection();
assertEquals(sExpected,m_xc.xmlText());
}
COM: <s> subtraction 6 4 2 </s>
|
funcom_train/30164419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int readLine(InputStream in, byte[] b, int off, int len) throws IOException {
if (len <= 0) {
return 0;
}
int count = 0, c;
while ( (c = in.read()) != -1) {
b[off++] = (byte) c;
count++;
if (c == '\n' || count == len) {
break;
}
}
return count > 0 ? count : -1;
}
COM: <s> i tomcats servlet input stream </s>
|
funcom_train/4557525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setItemStatus(int status, String errorDescription, StackTraceElement[] errorStack) {
StepItem stepItem = itemCollection.get(itemCollection.size() - 1);
if (status >=0 && status <= 7) {
stepItem.setStatus(status);
//Set 'status' property
if (this.status < status) {
this.status = status;
}
if (status >=4) {
stepItem.setErrorDescription(errorDescription);
stepItem.setErrorStack(errorStack);
}
}
}
COM: <s> find object in collection with last id and sets status to it </s>
|
funcom_train/44872444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void doRedraw() {
// Should be called whenever the coordinate rects need to be repainted.
// If only one needs to be repainted, you can call doRedraw(int i) or
// or doRedraw(CoordinateRect c), which can be more efficient.
// If an error message is displayed, this will not take effect until
// the error message is cleared.
if (errorMessage != null) {
clearErrorMessage(); // does repaint}
} else {
repaint();
}
COM: <s> should be called whenever the contents of the canvas have changed and so </s>
|
funcom_train/25826888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Number getAverageOfList(List<Number> list) {
if (list.isEmpty()) return null;
double avg = list.get(0).doubleValue();
for (int i = 1; i < list.size(); i++) {
avg = avg + list.get(i).doubleValue();
}
return avg / list.size();
}
COM: <s> usage return average of a list </s>
|
funcom_train/32790872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCodeFor(String rule, String spec) throws Exception {
Node pattern;
Node template;
ruleAndSpec = " (" + rule + ", " + spec + ")";
if ((pattern = getPatternForRule(rule)) != null) {
if ((template = getTemplateForSpec(pattern, spec)) != null) {
return getCode(template);
} else {
throw new Exception(NOTEMPLATE + rule + " -> " + spec);
}
} else {
throw new Exception(NOPATTERN + rule);
}
}
COM: <s> returns a parameterized code template for the given rule and spec </s>
|
funcom_train/27906413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CookieJar getCookies(CookieMatcher cm) {
if (cm == null) {
throw new IllegalArgumentException("Invalid CookieMatcher");
}
CookieJar cj = new CookieJar();
Cookie c;
for (int i = 0; i < iNumCookies; i++) {
c = (Cookie) theJar.get(i);
if (cm.doMatch(c)) {
cj.add(c);
}
}
return (cj);
}
COM: <s> gets all cookies that match the given cookie matcher </s>
|
funcom_train/2760521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void detach() {
if(_state != STATE_ATTACHED) {
throw new IllegalStateException("Work exec ctx is not attached("+_state+").");
}
if(getInstance() != this) {
throw new IllegalStateException("Unbalanced attach/detach calls.");
}
threadLocal_s.set(_chain);
_state = STATE_UNATTACHED;
}
COM: <s> detaches this execution context from the thread </s>
|
funcom_train/16806147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Serializer getGeneralPurpose(String mechanismType) {
if (javaType == null || xmlType == null) {
return super.getGeneralPurpose(mechanismType);
}
if (serClass == EnumSerializer.class) {
return super.getGeneralPurpose(mechanismType);
}
return new BeanSerializer(javaType, xmlType, typeDesc,
propertyDescriptor);
}
COM: <s> optimize construction of a bean serializer by caching the </s>
|
funcom_train/25293250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Bounds getBounds() {
if (isLiveOrCompiled()) {
if(!this.getCapability(ALLOW_BOUNDS_READ)) {
throw new CapabilityNotSetException(Ding3dI18N.getString("Node2"));
}
}
else {
// this will throw a SceneGraphCycleException if there is
// a cycle
checkForCycle();
}
return ((NodeRetained)this.retained).getBounds();
}
COM: <s> returns the bounding object of a node </s>
|
funcom_train/7402591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDateConstructor2() {
TimeZone zone = TimeZone.getTimeZone("Asia/Singapore");
Minute m1 = new Minute(new Date(1016700899999L), zone);
Minute m2 = new Minute(new Date(1016700900000L), zone);
assertEquals(54, m1.getMinute());
assertEquals(1016700899999L, m1.getLastMillisecond(zone));
assertEquals(55, m2.getMinute());
assertEquals(1016700900000L, m2.getFirstMillisecond(zone));
}
COM: <s> in singapore the 4 </s>
|
funcom_train/51616116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void beginStylesheet(AttributeList attrs) {
builder.begin("stylesheet");
builder.addAttributes(attrs.addAttribute("xmlns:xsl","http://www.w3.org/1999/XSL/Transform").addAttribute("version", "1.0"));
}
COM: <s> begin an xsl stylesheet element </s>
|
funcom_train/50982763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClassConstuctor_PrivateDefaultConstructor() throws Exception {
/** A fake component for testing */
class FakeComponent extends Component {
private static final long serialVersionUID = 1L;
private FakeComponent() {
}
}
try {
new DefaultComponentLoader( FakeComponent.class );
fail("Expected exception for class with private default constructor");
}
catch( final IllegalArgumentException e ) {
// Expected path
}
}
COM: <s> test the class constructor with a class that has a private constructor </s>
|
funcom_train/15866229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOption( JetOption option ){
option.setParent(this);
this.options.add(option);
this.eventSupport.fire( new Event(this, "Option added on selection '" + this.getIdentifier() + "'.", EventType.ADDED_CHILD) );
}
COM: <s> adds a option </s>
|
funcom_train/4920291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNullManagedObjectSource() {
final AutoWire autoWire = new AutoWire(Connection.class);
// Record no null managed object source
this.record_issue("Must provide a ManagedObjectSource for ManagedObject "
+ autoWire.getQualifiedType());
// Attempt to load
this.loadEmptySupplierType(new Init() {
@Override
public void supply(SupplierSourceContext context) {
context.addManagedObject(
(ManagedObjectSource<None, None>) null, null, autoWire);
}
});
}
COM: <s> ensure issue if null </s>
|
funcom_train/9806396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOrgans(EdifCell newTopCell) {
for (EdifNet net : _origCellToReplicate.getNetList()) {
Collection<OrganSpecification> organSpecifications = _desc.getOrganSpecifications(net);
if (organSpecifications != null) {
for (OrganSpecification organSpec : organSpecifications) {
organSpec.getOrganType().createOrgan(organSpec, net, newTopCell);
}
}
}
}
COM: <s> add organs specified by replication description </s>
|
funcom_train/28763184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName(java.lang.String value) throws com.intersys.objects.CacheException {
com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value);
mInternal.setProperty(ii_Name, jj_Name,kk_Name, com.intersys.objects.Database.RET_PRIM, "Name", dh);
return;
}
COM: <s> sets new value for code name code </s>
|
funcom_train/18472993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMdx(Datasource datasource, String mdx) throws Exception {
XmlaSoap xmlaSoap= new XmlaSoap(datasource.getServer(),
datasource.getUsername(),
datasource.getPassword());
xmlaSoap.executeQuery(mdx, datasource.getCatalog(), new NOPQueryResultHanler());
}
COM: <s> executes mdx and throws an error if something goes wrong </s>
|
funcom_train/50391623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadAssertionFromFile(){
File assertionFile = new File(attrAssertionFilename);
if(!assertionFile.exists() || !assertionFile.canRead()){
error("Assertion file "+assertionFile.getAbsolutePath()+" does not exist or is not readable.",null);
endProcessing(ERROR_CLIENT);
}
try{
AssertionDocument a = AssertionDocument.Factory.parse(assertionFile);
assertionInstallCommon(new Assertion(a));
}catch(Exception ex){
error("Error loading assertion from "+assertionFile.getAbsolutePath(),ex);
endProcessing(ERROR_CLIENT);
}
}
COM: <s> loads an assertion from attr assertion filename </s>
|
funcom_train/6352106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JournalTimeRange newUnion(JournalTimeRange range) {
if(range == null) return this;
long timeMin = _timeMin;
long timeMax = _timeMax;
if(range.getTimeMin() < timeMin) timeMin = range.getTimeMin();
if(range.getTimeMax() > timeMax) timeMax = range.getTimeMax();
return new JournalTimeRange(timeMin, timeMax);
}
COM: <s> returns a new range that spans this and another range </s>
|
funcom_train/17678134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JdbcNameGenerator createJdbcNameGenerator() {
DefaultJdbcNameGenerator n = createDefaultJdbcNameGenerator();
n.setMaxColumnNameLength(128);
n.setMaxTableNameLength(128);
n.setMaxConstraintNameLength(128);
n.setMaxIndexNameLength(128);
return n;
}
COM: <s> create a default name generator instance for jdbc stores using this </s>
|
funcom_train/22212127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
FlowLayout flowLayout2 = new FlowLayout();
flowLayout2.setHgap(0);
flowLayout2.setVgap(0);
this.setLayout(flowLayout2);
this.setSize(465, 217);
this.setPreferredSize(new java.awt.Dimension(465,217));
this.setEnabled(true);
this.add(getTitlePanel(), null);
this.add(getJPanel(), null);
this.add(getJPanel2(), null);
}
COM: <s> bring the widget in right layout and position </s>
|
funcom_train/5164086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init() {
Log.debug("startup - begin");
for (int r = 0; r < getMandant().getThreadPoolSize(); r++)
clientManagers.add(new ClientBeanInputShared(this, r));
database = new Database(this,clientID);
Log.info("server of mandant "+getMandant().getClientID()+" started up");
Log.debug("startup - end");
}
COM: <s> init is executed at beginning in the dedicated server thread </s>
|
funcom_train/15950949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ConfigureInstance(DefaultBPSSManager mgr, Element elem) {
String lsClassName = elem.getAttribute(CLASS_ATTRIBUTE_NAME);
String lsArchiveName = elem.getAttribute("archive");
String lsCodebase = elem.getAttribute("codebase");
String lsConfiguratorClassName = elem.getAttribute(CONFIGURATOR_ATTRIBUTE_NAME);
RegisterInstanceFactory(mgr,elem,lsClassName,lsConfiguratorClassName);
}
COM: <s> configure specific instance </s>
|
funcom_train/48646081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getInterpolationComboBox() {
if (interpolationComboBox == null) {
String[] labels = { "None", "Bilinear", "Bicubic" };
interpolationComboBox = new JComboBox(labels);
interpolationComboBox.setPreferredSize(new Dimension(120, 26));
interpolationComboBox.setSelectedIndex(0);
}
return interpolationComboBox;
}
COM: <s> this method initializes interpolation combo box </s>
|
funcom_train/27668671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unregisterToolBar(Toolbar toolbar) {
if (toolbar == null || toolbar.getComponent() == null) {
return;
}
TYPE type = toolbar.getType();
String name = TYPE.main.equals(type) ? type.name() : toolbar.getClass().getName();
toolBarsByName.remove(name);
remove(toolbar.getComponent());
}
COM: <s> unregisters a tool bar </s>
|
funcom_train/29548296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteNode(Node node) {
synchronized (localityUtils) {
if (visibleLocality.deleteNode(node)) { // delete from
// visibleLocality, *AND
// completeEltSet
if (node == select) {
clearSelect();
}
resetDamper();
return true;
}
return false;
}
}
COM: <s> delete a node </s>
|
funcom_train/32061872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getFuel() {
float totalfuel = 0;
// add up all the fuel in the fuel cells
for (Component c : components) {
if (c.getTechnology().isGoodProduced(Good.Fuel)) {
if (c instanceof StorageComponent)
totalfuel += ((StorageComponent)(c)).getStorageAmount();
}
}
return totalfuel;
}
COM: <s> returns the amount of fuel the starship has left </s>
|
funcom_train/50982759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor2Parms_Negative() {
try {
new TableLayoutConstraints(-1,2);
fail("Expected exception for negative row");
}
catch( final IllegalArgumentException e ) {
// Expected path
}
try {
new TableLayoutConstraints(1,-2);
fail("Expected exception for negative column");
}
catch( final IllegalArgumentException e ) {
// Expected path
}
}
COM: <s> test the constructor will negative parameters </s>
|
funcom_train/5081361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAttachedEditParts(Object guide, GraphicalViewer viewer) {
List attachedModelObjects = getAttachedModelObjects(guide);
List attachedEditParts = new ArrayList(attachedModelObjects.size());
Iterator i = attachedModelObjects.iterator();
while (i.hasNext()) {
Object editPart = viewer.getEditPartRegistry().get(i.next());
if (editPart != null)
attachedEditParts.add(editPart);
}
return attachedEditParts;
}
COM: <s> returns a list of edit parts that are attached to the given guide </s>
|
funcom_train/25576460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createFileMenu() {
fileMenu = new I18nMenu("file");
ActionsManager am = ActionsManager.sharedInstance();
Action exitAction;
if((exitAction = am.getAction("exit")) == null){
exitAction = new ExitAction("exit",IconManager.EXIT);
exitAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_F4, InputEvent.ALT_MASK));
am.addAction("exit", exitAction);
}
fileMenu.add(exitAction);
add(fileMenu);
}
COM: <s> creates code file code menu which allows general actions </s>
|
funcom_train/20242770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void layoutComponents() {
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
add(Box.createVerticalGlue());
add(Box.createRigidArea(new Dimension(1, 10)));
add(usersPanel);
add(Box.createRigidArea(new Dimension(1, 10)));
add(viewersPanel);
add(Box.createRigidArea(new Dimension(1, 10)));
add(emailPanel);
add(Box.createRigidArea(new Dimension(1, 10)));
add(Box.createVerticalGlue());
}
COM: <s> lays out the users file viewers and email settings sub panels </s>
|
funcom_train/584172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJDataPanel() {
if ( jDataPanel == null ) {
jDataPanel = new JPanel();
jDataPanel.setLayout( new BorderLayout() );
jDataPanel.add( getJPackageChooser(), java.awt.BorderLayout.CENTER );
jDataPanel.add( getJFieldWithLabel(), java.awt.BorderLayout.SOUTH );
}
return jDataPanel;
}
COM: <s> this method initializes j data panel </s>
|
funcom_train/7295284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UnicodeSet getTargetSet() {
UnicodeSet set = new UnicodeSet();
for (int i=0; i<trans.length; ++i) {
// This is a heuristic, and not 100% reliable.
set.addAll(trans[i].getTargetSet());
}
return set;
}
COM: <s> returns the set of all characters that may be generated as </s>
|
funcom_train/19615491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int vsCircumcircle(Point[] simplex) {
Point[] matrix = new Point[simplex.length + 1];
for (int i = 0; i < simplex.length; i++)
matrix[i] = simplex[i].extend(1, simplex[i].dot(simplex[i]));
matrix[simplex.length] = this.extend(1, this.dot(this));
double d = determinant(matrix);
int result = (d < 0) ? -1 : ((d > 0) ? +1 : 0);
if (content(simplex) < 0)
result = -result;
return result;
}
COM: <s> test relation between this pnt and circumcircle of a simplex </s>
|
funcom_train/32033772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open(){
File file=getSelectedFile();
if(file!=null){
if(file.isDirectory()){
if(BlueXStatics.prop.getProperty("browseFolders").equals("0"))
goToURI(file);
else
new BaseWindow(file);
}
else
UsefulMethods.openAssociatedFile(file);
}
}
COM: <s> this method will do the job of opening the file </s>
|
funcom_train/40361367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getArg(String str, int off, int len) {
if (off < len && str.charAt(off) == '{') {
int end = str.indexOf('}', off + 1);
if (end > 0) {
return str.substring(off + 1, end);
}
}
return null;
}
COM: <s> parse out an argument from the format string </s>
|
funcom_train/1842518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void halveCapacity() {
try {
int newLength = items.length / 2;
if (newLength < INIT_LENGTH) {
halveSize = 0;
return;
}
if (Main.ASSERT)
Util.assertion(size <= newLength);
Event[] items2 = new Event[newLength];
System.arraycopy(items, 0, items2, 0, size);
items = items2;
halveSize = items.length / 4;
} catch (Exception e) {
// should never occur
e.printStackTrace();
}
}
COM: <s> halve the capacity of the internal array </s>
|
funcom_train/26017013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameter(String name, String value) throws ParseException {
NameValue nv = parameters.getNameValue(name);
if (nv != null) {
nv.setValueAsObject(value);
} else {
nv = new NameValue(name, value);
this.parameters.set(nv);
}
}
COM: <s> sets the value of the specified parameter </s>
|
funcom_train/18008412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeDocumentIntro() throws IOException {
os.write(openGroup);
os.write(escape);
os.write(docBegin);
os.write(escape);
os.write(ansi);
os.write(escape);
os.write(ansiCodepage);
writeInt(os, 1252);
os.write(escape);
os.write(defaultFont);
writeInt(os, 0);
}
COM: <s> write the rich text file settings </s>
|
funcom_train/50033772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String execute() throws Exception {
ServletActionContext.getRequest().getSession().setAttribute("projectName", projectName);
UserSession usr = (UserSession) ServletActionContext.getRequest().getSession().getAttribute("navigationContext");
username = usr.getUser().getEmail();
System.out.println("upload archive execute() projectName : " + projectName);
uploadError = false;
documentAlreadyExist = false;
return SUCCESS;
}
COM: <s> init the page </s>
|
funcom_train/1800484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeProperty(String name) {
List<Property> properties =
getRepeatingExtension(Property.class);
Property found = null;
for (Property prop : properties) {
if (prop.getName().equals(name)) {
found = prop;
break;
}
}
if (found != null) {
removeRepeatingExtension(found);
return true;
} else {
return false;
}
}
COM: <s> remove the property with the given </s>
|
funcom_train/18853238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
_mappings = new HashMap();
Class eventClazz;
List listeners;
eventClazz = UserCreatedEvent.class;
listeners = EventListenerFactory.getListenerByEventClazz( eventClazz );
if ( listeners != null && listeners.size() > 0 ) {
_mappings.put( eventClazz, listeners );
}
}
COM: <s> initializes this manager to be able to dispatch all known events to </s>
|
funcom_train/26453730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIgnored(boolean ign) {
ignore = ign;
for (int i=0; i<observers.size(); i++) {
SensorObserver observer = (SensorObserver)observers.get(i);
if (observer != null) {
observer.sensorUpdated(getHostName(), this);
} else {
observers.remove(i);
}
}
}
COM: <s> set whether or not to ignore alerts from this sensor </s>
|
funcom_train/34628518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IAction action) {
if (targetEditor == null) {
return;
}
if (!(targetEditor instanceof ITextEditor)) {
return;
}
ITextEditor textEditor = (ITextEditor) targetEditor;
IEditorInput input = textEditor.getEditorInput();
if (input instanceof FileEditorInput) {
SpellChecker.clearMarkers(((FileEditorInput)input).getFile());
}
}
COM: <s> clear the spelling error markers </s>
|
funcom_train/38349701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAspect(Element aspect) throws InstantiationException {
String name = aspect.getAttributeValue("name");
String className = aspect.getAttributeValue("className");
Aspect a = (Aspect) resourceFactory.createInstance(className);
a.setName(name);
List bindings = aspect.getChildren("binding");
Iterator itr = bindings.iterator();
while (itr.hasNext()) {
Element binding = (Element) itr.next();
String pattern = binding.getText();
a.addBindingPattern(pattern);
}
aspects.add(a);
}
COM: <s> add an aspect to the environment </s>
|
funcom_train/32056732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsMetric() {
System.out.println("testIsMetric");
int i = 1;
boolean b = true;
JGraph g = new JGraph( new DefaultGraphModel() );
Rule x = new Rule(i, b, g);
b = x.isMetric();
assertTrue(b);
x.setIsMetric(false);
b = x.isMetric();
assertFalse(b);
}
COM: <s> test of is metric method of class rule </s>
|
funcom_train/10272230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean readScript(String scriptPath, StringBuffer buffer){
File script = new File(scriptPath);
try{
DataInputStream inStream = new DataInputStream(
new BufferedInputStream(
new FileInputStream(script)));
int ch;
while ( (ch = inStream.read()) > -1) {
buffer.append( (char) ch);
}
if (inStream != null)
inStream.close();
} catch(Exception e){
e.printStackTrace();
return false;
}
return true;
}
COM: <s> read the contents of the script file and store it in the buffer </s>
|
funcom_train/40677711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveElement(Element element) {
Pointer fp = LibC.INSTANCE.fopen(file.getAbsolutePath(), "w");
if (fp == null) {
throw new GstException("Could not open " + file
+ " [errno=" + Native.getLastError() + "]");
}
gst.gst_xml_write_file(element, fp);
LibC.INSTANCE.fclose(fp);
}
COM: <s> saves an existing pipeline to a xml file </s>
|
funcom_train/29769223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void rollbackAll(Map<Object, ITransactionalBean<?>> map, String mapName) {
for (ITransactionalBean<?> tBean : map.values()) {
_log.trace("rollbackAll", new Object[] { "Rolling rolling rolling object in ", mapName, ": ", tBean });
tBean.rollback();
}
}
COM: <s> rolls back all passed t beans </s>
|
funcom_train/19285904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void postToPage(String url, String userID) throws IOException {
if (userID != null)
// if it's null, this is probably the login page, so we skip this.
postKeyValues.add(new Pair<String, String>("stringKey_" + DataBitStorageTable.UsersTableFormatClass.ID, userID));
goTo(url, postKeyValues);
}
COM: <s> call this only once per test </s>
|
funcom_train/42271371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(String s, int off, int len) throws IOException {
int b = off, t = off + len;
while(b < t) {
int d = min(nChars - nextChar, t - b);
s.getChars(b, b + d, cb, nextChar);
b += d;
nextChar += d;
if(nextChar >= nChars)
flushBuffer();
}
}
COM: <s> writes a portion of a string </s>
|
funcom_train/22536350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deactivateRelatedViews(String [] viewIds){
IWorkbenchPage page = getSite().getPage();
for(int i = 0; i < viewIds.length; i ++){
IViewPart view = page.findView(viewIds[i]);
if(view != null){
if(view instanceof ParticipatingRolesView){
((ParticipatingRolesView) view).displayItems(false);
}
else if(view instanceof UsedEnvironmentsView){
((UsedEnvironmentsView) view).displayItems(false);
}
}
}
}
COM: <s> deactivate views related to this editor specified by the array </s>
|
funcom_train/42709145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BoxLayout(getJContentPane(), BoxLayout.X_AXIS));
jContentPane.setBackground(new Color(184, 207, 229));
jContentPane.setPreferredSize(new Dimension(1010, 760));
jContentPane.add(getJTabbedPane(), null);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.