__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/3373298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadChildren(Element parent) {
if (!parent.isLeaf()) {
for (int counter = 0, maxCounter = parent.getElementCount();
counter < maxCounter; counter++) {
Element e = parent.getElement(counter);
ElementInfo childInfo = createElementInfo(e, this);
if (childInfo != null) {
addChild(childInfo);
}
else {
loadChildren(e);
}
}
}
}
COM: <s> recreates the direct children of code info code </s>
|
funcom_train/16694324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void searchMetricType() {
if (dataObject != null) {
try {
FileObject fileObject = dataObject.getPrimaryFile();
if (fileObject != null) {
if (!fileObject.isFolder()) {
JavaSource javaSource = JavaSource.forFileObject(fileObject);
if (javaSource != null) {
beansMetricType = SourceBeansMetricType.JAVA;
} else {
// TODO Ajouter le support d'autre language...
}
} else {
beansMetricType = SourceBeansMetricType.FOLDER;
}
}
} catch (Exception e) {
}
}
}
COM: <s> recherche le type de fichier source </s>
|
funcom_train/46144235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CalendarHolder createCalendarHolder(State state, Booking booking) {
CalendarHolder holder = new CalendarHolder();
if (booking.getStartTime() != null) {
Calendar bookingStart = DateHandler.calendarFromDate(booking.getStartTime());
List<Calendar> availableDates = getAvailableDates(state, booking.getSurgery().getSurgeryId(), bookingStart);
holder.setCurrentShowingMonth(bookingStart, availableDates);
holder.setSelectedDate(bookingStart);
}
return holder;
}
COM: <s> create a new calendar holder from a given booking </s>
|
funcom_train/48702372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTab(String title, Icon image, Component c) {
tabbedPane.addTab(title, image, c);
//tabbedPane.addTab(null, image, c);
int insertedIndex = tabbedPane.getComponentCount() - 1;
tabbedPane.setToolTipTextAt(insertedIndex, title);
}
COM: <s> wrapper method to add so can change implementation easily </s>
|
funcom_train/19326692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String traitPlayDuring(final FObj fobj, final FoContext context) {
final PdPlayDuring property = (PdPlayDuring) getProperty(
FoProperty.PLAY_DURING);
if (property != null) {
return property.getValue(context, fobj);
}
return PdPlayDuring.getValueNoInstance();
}
COM: <s> returns the play during property </s>
|
funcom_train/7618432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawRoundRect(RectF rect, float rx, float ry, Paint paint) {
if (rect == null) {
throw new NullPointerException();
}
native_drawRoundRect(mNativeCanvas, rect, rx, ry,
paint.mNativePaint);
}
COM: <s> draw the specified round rect using the specified paint </s>
|
funcom_train/5317887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getUnavailable (JID from) {
System.out.println ("%%% now unavailable: " + from);
UserLookupList list = status.getUserLookupList ();
try {
String hashedID = list.getHashedID (from.getResource ());
list.removeHashedID (hashedID);
}
catch (NullPointerException e) {
System.err.println ("*WW* disconnect of unknown user.");
}
}
COM: <s> a user leaves the conference </s>
|
funcom_train/26481077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void exportDone(JComponent source, Transferable data, int action) {
if (LOG.isLoggable(Level.FINER)) LOG.finer("exportDone for: " + source + ", " + data + ", " + action);
// We also clear state in importData but that won't be called for drags outside this VM
PopulationView.clearDragState();
}
COM: <s> after a drop has been completed or an </s>
|
funcom_train/18662029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomToFit() {
sclPic.setScaleSize( getSize() );
// prevent useless rescale events when the picture is not ready
if ( sclPic.getStatusCode() == ScalablePicture.LOADED || sclPic.getStatusCode() == ScalablePicture.READY ) {
sclPic.createScaledPictureInThread( Thread.MAX_PRIORITY );
}
}
COM: <s> this method sets the desired scaled size of the scalable picture </s>
|
funcom_train/14053041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getAttributeClass(long handle, String name) throws JEANInvalidHandleException, JEANInvalidAttributeNameException {
Attribute att = getTheAttribute(handle,name);
if (att == null) {
throw new JEANInvalidAttributeNameException(name);
}
else {
return ((AttributeType) att.getType()).getValueClass();
}
}
COM: <s> get the class of an attribute value of a node </s>
|
funcom_train/12561591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void expand() {
int[] tmpStart = new int [lineStart.length * 2];
int[] tmpEnd = new int [tmpStart.length];
System.arraycopy(lineStart, 0, tmpStart, 0,
lineStart.length);
System.arraycopy(lineEnd, 0, tmpEnd, 0,
lineEnd.length);
lineStart = tmpStart;
lineEnd = tmpEnd;
}
COM: <s> expand the capacity of this text info structure by doubling the </s>
|
funcom_train/28754300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPosthybstoptime(String newVal) {
if ((newVal != null && this.posthybstoptime != null && (newVal.compareTo(this.posthybstoptime) == 0)) ||
(newVal == null && this.posthybstoptime == null && posthybstoptime_is_initialized)) {
return;
}
this.posthybstoptime = newVal;
posthybstoptime_is_modified = true;
posthybstoptime_is_initialized = true;
}
COM: <s> setter method for posthybstoptime </s>
|
funcom_train/49602031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFile(short fid) {
filesBytes.remove(fid);
eapFlags.remove(fid);
int fileLength = fileLengths.get(fid);
bufferedStreams.remove(fid);
fileLengths.remove(fid);
totalLength -= fileLength;
if (fid != DrivingLicenseService.EF_COM
&& fid != DrivingLicenseService.EF_SOD) {
updateCOMSODFile(null);
}
}
COM: <s> removes the given file in this driving license </s>
|
funcom_train/15563443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Operation findOneNearCriticalOperation(){
if(!this.isAllUnscheduled()){
return null;
}
Operation nearOperation = null;
for(int walk = 0; walk < this.count; walk++){
Operation op = this.get(walk);
if(op.isCritical()){
return op; //return immediately the critical operation
}
else if(op.isNearCritical()){
nearOperation = op; //when no critical operation found, return near critical one
}
}
return nearOperation;
}
COM: <s> find first the critical operation if it exists </s>
|
funcom_train/33512624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPaneResults() {
if (jScrollPaneResults == null) {
jScrollPaneResults = new JScrollPane();
jScrollPaneResults.setViewportView(getJTableResults());
jScrollPaneResults.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
jScrollPaneResults.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
}
return jScrollPaneResults;
}
COM: <s> this method initializes j scroll pane </s>
|
funcom_train/41209409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Style getPressedStyle() {
if (pressedStyle == null) {
pressedStyle = UIManager.getInstance().getComponentCustomStyle(getUIID(), "press");
pressedStyle.addStyleListener(this);
if(pressedStyle.getBgPainter() == null){
pressedStyle.setBgPainter(new BGPainter());
}
}
return pressedStyle;
}
COM: <s> returns the component style for the pressed state allowing us to manipulate </s>
|
funcom_train/3527407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConfiguration(Configuration conf) {
String name=conf.getName();
Vector v=(Vector)this.children.get(name);
if (v==null) {
v=new Vector();
this.children.put(name,v);
}
v.addElement(conf);
}
COM: <s> add a child code configuration code to this configuration element </s>
|
funcom_train/50865676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setEnableArrivalDatePane(boolean enable) {
arrivalDateTitleLabel.setEnabled(enable);
solLabel.setEnabled(enable);
solCB.setEnabled(enable);
monthLabel.setEnabled(enable);
monthCB.setEnabled(enable);
orbitLabel.setEnabled(enable);
orbitCB.setEnabled(enable);
}
COM: <s> set the components of the arrival date pane to be enabled or disabled </s>
|
funcom_train/20882721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(LineEvent event) {
if (event.getType().equals(LineEvent.Type.STOP)) {
synchronized(JavaClipAudioPlayer.this) {
JavaClipAudioPlayer.this.notifyAll();
}
} else if (event.getType().equals(LineEvent.Type.CLOSE)) {
synchronized (JavaClipAudioPlayer.this) {
JavaClipAudioPlayer.this.notifyAll();
}
}
}
COM: <s> respond to a given line event </s>
|
funcom_train/7385554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cellsToggled(Object[] cells, boolean show) {
if (cells != null && cells.length > 0) {
model.beginUpdate();
try {
for (int i = 0; i < cells.length; i++) {
model.setVisible(cells[i], show);
}
}
finally {
model.endUpdate();
}
}
}
COM: <s> sets the visible state of the specified cells </s>
|
funcom_train/647448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Gene newGene() {
IntegerGene result = new IntegerGene(m_lowerBounds, m_upperBounds);
/**@todo move the following to BaseGene.newGene() and rename newGene()
* here to newGeneInternal()*/
result.setConstraintChecker(getConstraintChecker());
return result;
}
COM: <s> provides an implementation independent means for creating new gene </s>
|
funcom_train/32741982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeTo(OutputStream o) throws IOException {
byte[] b = new byte[len < FILE_LIMIT ? len : FILE_LIMIT];
InputStream is = toBinaryStream();
try {
int n;
while ((n = is.read(b, 0, b.length)) != -1) {
o.write(b, 0, n);
}
} finally {
o.close();
is.close();
}
}
COM: <s> write content to the given output stream </s>
|
funcom_train/43293782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
// close old file output stream
if (m_FileOutputStream != null) {
close();
}
try {
//create new file
m_FileOutputStream = new FileOutputStream(m_File);
//reset length
m_Length = 0;
//clear stringbuffer
m_StringBuffer.delete(0, m_StringBuffer.length());
} catch (Exception e) {
OutputHandler.writeError(
20206,
e,
OutputHandler.EL_HIGH,
null,
this);
}
}
COM: <s> p clear the document </s>
|
funcom_train/7496662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void format(long number, StringBuffer toInsertInto, int pos) {
NFRule applicableRule = findNormalRule(number);
if (++recursionCount >= RECURSION_LIMIT) {
recursionCount = 0;
throw new IllegalStateException("Recursion limit exceeded when applying ruleSet " + name);
}
applicableRule.doFormat(number, toInsertInto, pos);
--recursionCount;
}
COM: <s> formats a long </s>
|
funcom_train/26522203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCase(int[] aCase) {
int j = 0;
if (parents != null) {
for (int p = 0; p < parents.length; ++p) {
j += aCase[parents[p]] * parentMult[p];
}
}
++nJ[j];
++nJK[j][aCase[id]];
}
COM: <s> adds a feature to the case attribute of the frequency node object </s>
|
funcom_train/49792268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undoIt() {
localUndoIt();
// Set curMove marker and koPoint back to original values
board.setKoPoint(prevKoPoint);
if(prevMoveLocation != null &&
prevMoveLocation.x != BoardController.PASS_COORD) {
board.setMarkAt(prevMoveLocation, Board.MARK_CURMOVE);
}
}
COM: <s> undoes the command </s>
|
funcom_train/46427946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String forTaskKey() {
StringBuffer s = new StringBuffer();
s.append(content.getName());
s.append(punctuation + " ");
if (truth != null) {
s.append(truth.toString());
}
s.append(stamp.toString());
return s.toString();
}
COM: <s> get a stable string representation for a sentece called from task only </s>
|
funcom_train/23883002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matches(int first, int last) {
int basenr = baseAtom.getBoundAtoms().size();
if (matchAny) return true;
if (matchLess && basenr >= last) return true;
if (matchMore && basenr <= first) return true;
for (int i = first; i <= last; i++) {
if (!matches(i)) return false;
}
return true;
}
COM: <s> matches all in interval inclusive first last </s>
|
funcom_train/44842922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void _createConnectionPool(String jdbcUrl, String user, String passwd) {
_conPool = new ConnectionPool(jdbcUrl, user, passwd);
// Don't check status of connections, this takes too long:
_conPool.setCheckConnections(false);
// Queries should not run for more than 1 hour:
_conPool.setMaxUseTime(60 * 60 * 1000);
}
COM: <s> creates a connection pool for this rdbms </s>
|
funcom_train/24260149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readAndSetActiveNodeNumber(Document loadedDoc) {
Element tableElem = (Element) loadedDoc.getElementsByTagName("table")
.item(0);
String nodeNumStr = tableElem.getAttribute("activeNodeNumber");
try {
activeNodeNumber = Integer.parseInt(nodeNumStr);
} catch (NumberFormatException e) {
printErrMessage("readAndSetActiveNodeNumber: Could not read active node number: "
+ nodeNumStr);
}
}
COM: <s> find the active node number from a stored xml file being retrieved and </s>
|
funcom_train/28418427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ConfigXML loadConfig() {
try {
Serializer serializer = new Persister();
File source = new File("config.xml");
return config = serializer.read(ConfigXML.class, source);
} catch (Exception ex) {
Logger.getLogger(JPanelSQLOptions.class.getName()).log(Level.SEVERE, null, ex);
return new ConfigXML();
}
}
COM: <s> loads a config </s>
|
funcom_train/17008992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String pruneLeadingSlash(String element, String slashIndicator) {
if (element.startsWith(slashIndicator)) {
System.out.println("Received = " + element);
element = element.substring(1, element.length());
System.out.println("Pruned leading slash = " + element);
}
return element;
}
COM: <s> prunes the leading slash within a string based on the specified </s>
|
funcom_train/21160687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getMResinWeightEdit() {
if (mResinWeightEdit == null) {
mResinWeightEdit = new JTextField();
mResinWeightEdit.setBounds(new Rectangle(345, 225, 76, 20));
mResinWeightEdit.setToolTipText(LanguageResource.getString("WeightCalculatorDialog.19")); //$NON-NLS-1$
mResinWeightEdit.setEditable(false);
}
return mResinWeightEdit;
}
COM: <s> this method initializes m resin weight edit </s>
|
funcom_train/44177993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void legacyTryAll(String[] candidates, boolean expected) {
for (String candidate : candidates) {
assertEquals("javascript context: " + candidate,
expected,
UriUtils.isLikelyUriJavascriptContextLegacy(candidate));
assertEquals("html context: " + candidate,
expected,
UriUtils.isLikelyUriHtmlContextLegacy(candidate));
}
}
COM: <s> test that all supplied candidates give the expected result for each of </s>
|
funcom_train/32134868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
/* Start by cloning all neurons*/
Neuron[] newNeurons = new Neuron[NUM_NEURONS];
for (int i = 0; i < NUM_NEURONS; i++) {
newNeurons[i] = (Neuron) neurons[i].clone();
}
/* Create the new neuron layer*/
NeuronLayer newLayer = new NeuronLayer(config, NUM_NEURONS, NUM_INPUTS, newNeurons);
/* Return new neuron layer*/
return newLayer;
}
COM: <s> creates a new neuron layer identical to this one </s>
|
funcom_train/5722996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleException(FacesContext context, Exception exception) {
if (context == null) {
exception.printStackTrace(System.out);
return;
}
ExceptionHandler handler = (ExceptionHandler)
context.getApplication().getVariableResolver().resolveVariable
(context, Constants.EXCEPTION_HANDLER);
handler.handleException(exception);
}
COM: <s> p handle the specified exception according to the strategy </s>
|
funcom_train/12595490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init(SystemTray systemTray, TrayIcon trayIcon, int systemTrayModalityType) {
if (this.getModalityType() == ModalityType.MODELESS) {
this.setModalityType(Dialog.DEFAULT_MODALITY_TYPE);
}
this.addWindowListener(new SystemTrayModalDialogWindowListener(systemTray, trayIcon, systemTrayModalityType));
}
COM: <s> initialize the dialog </s>
|
funcom_train/48408176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOwnedTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Package_ownedType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Package_ownedType_feature", "_UI_Package_type"),
SpemxtmethodPackage.Literals.PACKAGE__OWNED_TYPE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the owned type feature </s>
|
funcom_train/45050048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calculateStatistics() {
if (count > 0) {
avgTestTime = ((float) totalTestTime / (float) count);
avgSize = ((float) totalResponseSize / (float) count);
} else {
avgTestTime = 0;
avgSize = 0;
}
duration = (finishTime - startTime);
}
COM: <s> based on the number of tests performed calculate average duration etc </s>
|
funcom_train/9238167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean callChannelKick(ChannelInfo cChannel, ChannelClientInfo cKickedClient, ChannelClientInfo cKickedByClient, String sReason, String sKickedByHost) {
CallbackOnChannelKick cb = (CallbackOnChannelKick)getCallbackManager().getCallbackType("OnChannelKick");
if (cb != null) { return cb.call(cChannel, cKickedClient, cKickedByClient, sReason, sKickedByHost); }
return false;
}
COM: <s> callback to all objects implementing the channel kick callback </s>
|
funcom_train/32909566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadBranch(int productRefId, UITreeNode treeNode, ArtifactModel selected) {
if (selected.getArtifactRefId() > 0) {
//branchTable.put(selected.getArtifactRefId(), selected.getArtifactRefId());
backgroundLoad(productRefId, treeNode, selected);
}
}
COM: <s> load the branch if not already loaded </s>
|
funcom_train/8829451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void percolateDown( int hole ) {
int child;
E tmp = array.get( hole );
for( ; hole * 2 <= currentSize; hole = child ) {
child = hole * 2;
if( child != currentSize &&
array.get( child + 1 ).compareTo( array.get( child ) ) < 0 )
child++;
if( array.get( child ).compareTo( tmp ) < 0 )
array.set( hole , array.get( child ));
else
break;
}
array.set( hole , tmp);
}
COM: <s> internal method to percolate down in the heap </s>
|
funcom_train/48982502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String update() {
//performValidate the update
performValidateUpdate();
if (!hasActionErrors()) {
course = discipline.getCourse();
disciplineRemote.update(discipline);
return listByCourse();
}
addActionError("Unable to update a discipline");
return listByCourse();
}
COM: <s> update a discipline </s>
|
funcom_train/10926446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addStylesheet(String contentType, Source source, boolean override) {
if ((contentType == null) || (source == null)) {
return;
}
if (override) {
fOverrideStyleSheets.put(contentType.trim().toLowerCase(), source);
} else {
fStyleSheets.put(contentType.trim().toLowerCase(), source);
}
}
COM: <s> assigns a stylesheet to a content type </s>
|
funcom_train/35297678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deregisterServiceProvider(Object provider) {
Object oprovider = map.get(provider.getClass());
if (provider == oprovider) {
map.remove(provider.getClass());
poset.remove(provider);
if (provider instanceof RegisterableService) {
RegisterableService rs = (RegisterableService)provider;
rs.onDeregistration(registry, category);
}
return true;
}
return false;
}
COM: <s> if the provider was not previously registered do nothing </s>
|
funcom_train/14329394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_batchSize() {
String fieldName = "batchSize";
String messageKey = Driver.BATCHSIZE;
assertDefaultPropertyByServerType(URL_SQLSERVER, messageKey, fieldName,
DefaultProperties.BATCH_SIZE_SQLSERVER);
if (!isOnlySqlServerTests()) {
assertDefaultPropertyByServerType(URL_SYBASE, messageKey, fieldName,
DefaultProperties.BATCH_SIZE_SYBASE);
}
}
COM: <s> test the code batch size code property </s>
|
funcom_train/19387830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNodeValue(String str) throws DOMException {
// Make sure there is a change.
if (!MiscUtilities.equals(str, m_domNode.getNodeValue())) {
String oldValue = getNodeValue();
m_domNode.setNodeValue(str);
fireNodeValueChanged(this, oldValue, str);
}
}//}}}
//{{{ getNodeType()
COM: <s> p sets the value of the node </s>
|
funcom_train/13491438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Function lookupLib(Function f,String className,Function[] libFunctions) {
if (f!=null) return f;
for (int i=0;i<libFunctions.length;i++) {
if (libFunctions[i].getClass().getName().equals(className)) return libFunctions[i];
}
return null;
}
COM: <s> lookup the lib for a function with a certain class name </s>
|
funcom_train/25331434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAndSetCoords() {
HomologyAlignmentProperties instance = new HomologyAlignmentProperties();
Coordinate expResult = new Coordinate(30,50);
Coordinate result = instance.getCoords();
assertNull(result);
instance.setCoords(expResult);
result = instance.getCoords();
assertEquals(expResult, result);
}
COM: <s> test of get coords method of class homology alignment properties </s>
|
funcom_train/41417136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void discoverDevices() throws BluetoothStateException {
this.devices.removeAllElements();
this.agent.startInquiry(DiscoveryAgent.GIAC, this);
synchronized (this.agent) {
while (!this.devicesDiscovered) {
try {
this.agent.wait();
} catch (final InterruptedException ex) {
// Ignore
}
}
}
this.devicesDiscovered = false;
}
COM: <s> helper method to discover new devices </s>
|
funcom_train/10204980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMSuperTypesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MClass_mSuperTypes_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MClass_mSuperTypes_feature", "_UI_MClass_type"),
ClassDiagramPackage.Literals.MCLASS__MSUPER_TYPES,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the msuper types feature </s>
|
funcom_train/44627698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRepresents1() {
helpTCF("A.java",
"import org.jmlspecs.annotation.*;\n" +
"public class A { \n" +
" //@ secret public model int i;\n" +
" //@ public represents i = 0; \n" +
"} \n"
,"/A.java:4: A represents clause and its identifier must both be secret or both not be secret",14
);
}
COM: <s> secret id with non secret represents </s>
|
funcom_train/46932068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Profile saveProfile(Profile profile, String file) {
XmlMarshaller marshaller = new XmlMarshaller();
try {
FileWriter fileWriter = new FileWriter(profile_xml, false);
marshaller.toXML(profile, fileWriter);
if ("true".equals(PropertyLoader.getProperty("sendmail"))){
sendMail(file);
}
//doSomethingElse()
}
catch(Exception e) {
log.debug("Unable to save to xml file "+profile_xml);
e.printStackTrace();
throw new RuntimeException(e);
}
return profile;
}
COM: <s> saves the modified profile model back into same xml file previously seeked </s>
|
funcom_train/17117063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Bundle toBundle(Bundle b) {
b.putLong(EXTRAS_ID, id);
b.putLong(EXTRAS_THREAD_ID, threadId);
b = contact.toBundle(b);
b.putLong(EXTRAS_TIMESTAMP, timeStamp);
b.putString(EXTRAS_BODY, body);
return b;
}
COM: <s> add ssmessage bundle to an existing bundle </s>
|
funcom_train/46959069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void expandSelection(TreeItem selection) {
if (selection == null)
return;
if (!selection.getExpanded()) {
TreeViewer treeViewer = (TreeViewer) getViewer();
Object[] expanded = treeViewer.getExpandedElements();
Object[] array = new Object[expanded.length + 1];
System.arraycopy(expanded, 0, array, 0, expanded.length);
array[array.length - 1] = selection.getData();
treeViewer.setExpandedElements(array);
}
}
COM: <s> expands the selection of the given tree viewer </s>
|
funcom_train/125313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileSupportSettings getFileSupportSettings() {
FileSupportSettings settings = new FileSupportSettings();
JSCSArray sel = new JSCSArray("files",
new String[] { saveTextDirectory, dataDirectory, projectFile,
projectDirectory });
settings.setSelectedFiles(sel);
return settings;
}
COM: <s> gets the settings instance according to the previously made file </s>
|
funcom_train/16883887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMapping( final RdbCls rdbCls, final View view ) {
ClsMap clsMap = getClsMap( rdbCls );
if ( clsMap != null ) clsMap.setView( view );
else {
ClsMap viewMap = new ClsMap( this, rdbCls, view );
_clsMapHash.put( rdbCls.getName(), viewMap );
}
}
COM: <s> maps a rdb cls to a view </s>
|
funcom_train/11696781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServicePerformance getCasStatistics(String aCasReferenceId) {
ServicePerformance casStats = null;
if (perCasStatistics.containsKey(aCasReferenceId)) {
casStats = (ServicePerformance) perCasStatistics.get(aCasReferenceId);
} else {
casStats = new ServicePerformance(this);
perCasStatistics.put(aCasReferenceId, casStats);
}
return casStats;
}
COM: <s> returns stats associated with a given cas </s>
|
funcom_train/1285760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long measureReps(ConfiguredBenchmark benchmark, int reps) throws Exception {
prepareForTest();
log(LogConstants.MEASURED_SECTION_STARTING);
long startNanos = System.nanoTime();
benchmark.run(reps);
long endNanos = System.nanoTime();
log(LogConstants.MEASURED_SECTION_DONE);
benchmark.close();
return endNanos - startNanos;
}
COM: <s> returns the total nanos to run </s>
|
funcom_train/41164318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(StoredOpenResponse2 entity) {
EntityManagerHelper.log("saving StoredOpenResponse2 instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved stored open response2 </s>
|
funcom_train/14585956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void passPlay(Play[] play) {
// set the play's lineup
int timeChange = passGenerator(play);
++down;
// currDrivePlay.setPlayExecution(LibTxtfl.PASS);
currDrivePlay
.addPrimPlayStat(LibTxtfl.PASS, deliverer, deliveryDist, recipient,
recipientDist, defender);
updateGameStats(timeChange);
}
COM: <s> passes the football and handles the yards time down and </s>
|
funcom_train/23365280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean tryDecrypt(PDDocument doc, String password) {
try {
DecryptionMaterial m = new StandardDecryptionMaterial(password);
doc.openProtection(m);
return true;
} catch (BadSecurityHandlerException ex) {
return false;
} catch (CryptographyException ex) {
return false;
} catch (IOException ex) {
return false;
}
}
COM: <s> attempts to decrypt the document using the password specified </s>
|
funcom_train/3464581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(String dir) {
if(!haveStyle) {
return;
}
try {
String css = (String)colorMethod.invoke(colorClass, null);
FileOutputStream out = new FileOutputStream(dir+getName());
out.write(css.getBytes());
} catch (Exception e) {
e.printStackTrace(System.out);
cdt.ErrorD.ErrorDlg.ErrorMsg("Could not write style sheet: "+(dir+getName()));
}
}
COM: <s> writes the stylesheet in the given directory </s>
|
funcom_train/42475006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFind() throws Exception {
EnzymeEntry enzymeEntry = entryMapper.findById(1000L, con);
HistoryGraph graph = historyMapper.find(enzymeEntry, con);
Date expected = new SimpleDateFormat("yyyy-MM-dd").parse("1961-10-01");
assertEquals(expected, graph.getEdges().first().getDate());
}
COM: <s> test of find method of class enzyme history mapper </s>
|
funcom_train/14052998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getActualAttribute(long handle, String name) throws JEANInvalidHandleException {
Attribute att = getTheAttribute(handle,name);
Object ret = null;
if (att != null) {
ret = att.getActualValue();
if ((ret != null) && (ret instanceof AttributeSet)) {
ret = new JEANAttributeSet((AttributeSet) ret);
}
}
return ret;
}
COM: <s> get the actual value of an attribute of a node </s>
|
funcom_train/2882446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServiceLocationEnumeration findServiceTypes(String namingAuthority,Vector scopeNames) throws ServiceLocationException {
if (namingAuthority == null) {
namingAuthority = ServiceType.IANA;
} else if (namingAuthority.equals(ServiceType.IANA)) {
}
return super.findServiceTypes(namingAuthority,scopes);
}
COM: <s> returns an enumeration of known service types for this scope and naming authority </s>
|
funcom_train/4390620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleOpen(final String ipath) {
// haven't run across a case where i can verify that this works
// because open is usually very fast.
// buttons.activate(MainButtonPanel.OPEN);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
String path = ipath;
if (path == null) { // "open..." selected from the menu
path = selectFile();
if (path == null)
return;
}
doClose();
handleOpenPath = path;
checkModified(HANDLE_OPEN);
}
});
}
COM: <s> open a sketch given the full path to the </s>
|
funcom_train/46152304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calculateActualFrameRate() {
// Get elapsed time in milliseconds
long elapsedTimeMillis = System.currentTimeMillis() - startTime;
// Get elapsed time in seconds
float elapsedTimeSec = elapsedTimeMillis/1000F;
capturedFrameRate = renderer.getFrameCounter()/elapsedTimeSec;
cellLogger.info("capturedFrameRate: " + capturedFrameRate);
}
COM: <s> determine the rate of frames per second that we recorded jpegs </s>
|
funcom_train/29547328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean categoryExist() {
try {
ResourcePropertyGroup[] categories=resource.data.getPropertyGroup(new URI(PROPERTY_GROUP_URI_CATEGORIES));
if(categories!=null) {
return true;
}
} catch(Exception e) {
cat.debug("Unable to get categories property group: ",e);
}
return false;
}
COM: <s> check whether group of categories exists </s>
|
funcom_train/17409940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addData(String s, int o, int loc) {
if (o == 0) {
//add data to disk
OSDriver.MemManager.writeDiskData(loc, s);
addr++;
} else if (o == 1) {
//OSDriver.MemManager.writeRamData(loc, s);
}
//System.out.println("data added");
}
COM: <s> writes data to the disk </s>
|
funcom_train/41700219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Type field(String n) {
Type field;
// try local instance fields
if ((field = fields.map.get(n)) != null)
return field;
// try inherited instance fields
if (instanceOf.parent != null
&& (field = instanceOf.parent.instance.field(n)) != null)
return field;
return null;
}
COM: <s> implementation of field for instances </s>
|
funcom_train/33499151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getStretchValuesForFamily(String familyName) {
if (CoAssertion.ASSERT) CoAssertion.notNull(familyName, "familyName");
Set specs = getSpecsForFamily(familyName);
Set values = new HashSet();
Iterator i = specs.iterator();
while (i.hasNext()) {
CoFontFaceSpec spec = (CoFontFaceSpec) i.next();
values.add(spec.getStretchAttribute()); // Sets only add if object does not already exist in the Set
}
return values;
}
COM: <s> returns the stretch values available for a specified font family </s>
|
funcom_train/12547957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDisplay(String url) {
try {
myBrowserDisplay.setPage(url);
} catch (IOException e) {
// Display an alert to that effect.
System.err.println(e);
JOptionPane.showMessageDialog(this, "Could not access URL " + url
+ "!", "Web Error", JOptionPane.ERROR_MESSAGE);
myURLHistory.remove(myCurrentPosition);
myCurrentPosition--;
}
setEnabledStates();
}
COM: <s> sets the display of the browser to the url </s>
|
funcom_train/5855742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(String other) {
int max = Math.min(length, other.length);
int i = first;
int j = other.first;
for (int count = 0; count < max; count++) {
int difference = chars[i++] - other.chars[j++];
if (difference != 0) { return difference; }
}
return length - other.length;
}
COM: <s> compare to another string </s>
|
funcom_train/11055793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkArray(String msg, Fraction[] m, Fraction[] n) {
if (m.length != n.length) {
Assert.fail("vectors have different lengths");
}
for (int i = 0; i < m.length; i++) {
Assert.assertEquals(msg + " " + i + " elements differ", m[i],n[i]);
}
}
COM: <s> verifies that two vectors are equals </s>
|
funcom_train/44705985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ContentType getContentType(PageState state) {
String key = m_types.getSelectedKey(state).toString();
try {
BigDecimal typeID = new BigDecimal(key);
return new ContentType(typeID);
} catch (DataObjectNotFoundException ex) {
throw new UncheckedWrapperException("Content Type ID#" + key +
" not found", ex);
}
}
COM: <s> fetches the currently selected content type from the single selection </s>
|
funcom_train/34559025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SortState getSortState() {
JavaScriptObject sortState = getSortState(getJsObj());
if (sortState != null)
return new SortState(JavaScriptObjectHelper.getAttribute(sortState, "field"), SortDir.getValue(JavaScriptObjectHelper.getAttribute(sortState, "direction")));
else
return new SortState(null,SortDir.ASC);
}
COM: <s> returns the sort state of the store </s>
|
funcom_train/14616173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals( Object o ) {
if( this == o ) {
return true;
}
if( !( o instanceof ExtendedList )) {
return false;
}
if( !super.equals( o )) {
return false;
}
final ExtendedList extendedList = ( ExtendedList ) o;
if( isPermanent != extendedList.isPermanent ) {
return false;
}
if( isPermanent ) {
return true;
}
return( shelfLife == extendedList.shelfLife );
}
COM: <s> attempt to compare extended list objects for equality </s>
|
funcom_train/29691576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getJMenu4() {
if (jMenu4 == null) {
jMenu4 = new JMenu();
jMenu4.setText("Misc.");
jMenu4.setFont(new Font("Dialog", Font.PLAIN, 10));
jMenu4.add(getJMenuItem10());
jMenu4.add(getJMenuItem3());
jMenu4.add(getJMenuItem4());
jMenu4.add(getJMenu5());
}
return jMenu4;
}
COM: <s> this method initializes j menu4 </s>
|
funcom_train/11705583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeNullObject() throws SAXException {
workAttrs.clear();
addAttribute(workAttrs, ID_ATTR_NAME, "0");
XmlElementName elemName = uimaTypeName2XmiElementName("uima.cas.NULL");
startElement(elemName, workAttrs, 0);
endElement(elemName);
}
COM: <s> writes a special instance of dummy type uima </s>
|
funcom_train/22236040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if (cgFile != null) {
try {
if (fileUpdate) {
writeFileDirectory() ;
writeFileHeader() ;
}
cgFile.close() ;
}
catch (IOException e) {
// Don't propagate this exception.
System.out.println("\nException: " + e.getMessage()) ;
System.out.println("failed to close " + fileName) ;
}
}
cgFile = null ;
cgBuffer = null ;
directory = null ;
objectSizes = null ;
}
COM: <s> release the resources associated with this instance </s>
|
funcom_train/12171500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isReverseVideo(VDXMLStyleProperties style) {
return (fontColor != null && backgroundColor != null &&
style.fontColor != null && style.backgroundColor != null &&
fontColor.getValue() == style.backgroundColor.getValue() &&
backgroundColor.getValue() == style.fontColor.getValue());
}
COM: <s> returns true if the style properties provided has the font color and </s>
|
funcom_train/26509311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bendInEdges(Node node) {
if (getGraph() != node.getGraph())
throw new IllegalArgumentException("trying to bend to a node " +
"in an alien graph");
Object[] edges = inEdges.toArray();
for (int i = 0; i < edges.length; i++)
((Edge)edges[i]).setEnd(node);
}
COM: <s> bends all incoming edges of this node to code node code </s>
|
funcom_train/14264817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() throws FlickrException {
if (deleted) throw new IllegalStateException("PhotoSet already Deleted");
Request req = new Request(Request.POST);
req.setParameter("method","flickr.photosets.delete");
req.setParameter("photoset_id",id);
req.getResponse();
deleted = true;
return;
}
COM: <s> delete the current photo set </s>
|
funcom_train/44841657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int hashCode = 0;
int size = _values.size();
for (int i = 0; i < size; i++) {
Object object = _values.get(i);
if (object == null) {
// Default value for null is 0xFFFFFFFF.
hashCode ^= (0xFFFFFFFF << i);
}
else {
hashCode ^= (object.hashCode() >> i);
}
}
return hashCode;
}
COM: <s> returns hash code for this tuple </s>
|
funcom_train/25315007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Filter(Iterable<WorldObject> objectList,Player player){
for(Iterator<WorldObject> i=objectList.iterator();i.hasNext();){
WorldObject object=i.next();
if(object==null || this!=FromObject(object,player)
|| !object.isValid() || !object.isSelectable() || !object.isVisible()
|| !player.getPlayerView().isTileVisible(Tile.pixelToTile(object.getPosition()))){
i.remove();
}
}
}
COM: <s> given a list of objects this function removes all objects which do not </s>
|
funcom_train/17904399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveConnectionUp() {
try {
removeTreeSelectionListener();
tree.moveSelectionUp();
// adjust the position of the connection
Object object = tree.getLastPathComponent();
if (object instanceof DatabaseHostNode) {
moveNode((DatabaseHostNode)object, DynamicTree.MOVE_UP);
}
} finally {
addTreeSelectionListener();
}
}
COM: <s> moves the selected connection host node up in the list </s>
|
funcom_train/1530204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isParentOf(GeoElement geo) {
if (algoUpdateSet != null) {
Iterator<AlgoElement> it = algoUpdateSet.getIterator();
while (it.hasNext()) {
AlgoElement algo = it.next();
for (int i = 0; i < algo.getOutputLength(); i++) {
if (geo == algo.getOutput(i)) // child found
return true;
}
}
}
return false;
}
COM: <s> returns whether geo depends on this object </s>
|
funcom_train/8568748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cutInput() {
if (inputIndex > -1) {
Link removed = inputLinks.remove(inputIndex);
removed.from.outputLinks.remove(removed);
inputIndex--;
// If we deleted the first input, point at the last one.
// This also sets it to -1 if there are no more inputs. Handy!
if (inputIndex < 0) {
inputIndex = inputLinks.size() - 1;
}
}
}
COM: <s> cuts the input link pointed at by the input link register </s>
|
funcom_train/31430159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initializationComplete() {
super.initializationComplete();
if (splashWindow != null) {
splashWindow.dispose();
}
if (desktopIndicatorIcon != null) {
desktopIndicator = (DesktopIndicator) getModule(DesktopIndicator.class);
}
if (desktopIndicator != null) {
desktopIndicator.setFrame(frame);
try {
desktopIndicator.show(desktopIndicatorIcon, name);
desktopIndicator.hide();
} catch(FileNotFoundException e) {
e.printStackTrace();
}
}
frame.setVisible(true);
}
COM: <s> the splah screen is hidden and the main frame is made visible </s>
|
funcom_train/9531580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharField getCharField() {
// heck why not just pass in the char field bean itself - simpler!
if (charField == null)
//charField = new CharField(getLabel(),getDataTag(),getType());
charField = new CharField(this);
//charField.setCopyEnabled(copies());
return charField;
}
COM: <s> actually creates char field if null as char fields utimately come from field </s>
|
funcom_train/5233171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isComplexPrefix(FileNameRequest request){
boolean retVal = false;
retVal =
((currentPrefixType & BOOKMARK_NAME)==BOOKMARK_NAME && (request.getBookmarkName()!=null) && (request.getBookmarkName().length()>0))
||
((currentPrefixType & CURRENT_PAGE)==CURRENT_PAGE && request.getPageNumber()!=null)
||
((currentPrefixType & FILE_NUMBER)==FILE_NUMBER && request.getFileNumber()!=null)
||
isComplexPrefix();
return retVal;
}
COM: <s> if it contains currentpage and request </s>
|
funcom_train/13850963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object obj) {
RegistrationInfo regInfo = (RegistrationInfo)obj;
if (this == regInfo) return 0;
if ( (leaseExpiration < regInfo.leaseExpiration)
|| ( (leaseExpiration == regInfo.leaseExpiration)
&& (eventID < regInfo.eventID) ) )
{
return -1;
}//endif
return 1;
}//end compareTo
COM: <s> performs a primary sort by lease expiration and a secondary sort </s>
|
funcom_train/8649466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String format(String sql) {
if ( sql.toLowerCase().startsWith( "create table" ) ) {
return formatCreateTable( sql );
}
else if ( sql.toLowerCase().startsWith( "alter table" ) ) {
return formatAlterTable( sql );
}
else if ( sql.toLowerCase().startsWith( "comment on" ) ) {
return formatCommentOn( sql );
}
else {
return "\n " + sql;
}
}
COM: <s> format an sql statement using simple rules ul </s>
|
funcom_train/24468758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String extractLastNumber(final String input) {
String number = "";
if (input != null) {
final Pattern pat = Pattern
.compile(
"[0-9]{1,}");
final Matcher match = pat.matcher(input);
try {
while (match.find()) { // Only takes the last hit...
number = input.substring(match.start(), match.end());
}
} catch (final Exception e) {
LOG.error("extractFirstNumber: " + input + "\040" + e.toString());
}
}
return number;
}
COM: <s> extracts the last number in a string </s>
|
funcom_train/18596112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectAWTPopupMenuItem(MenuComponent item) {
// Can't do this through coordinates because MenuComponents don't
// store any of that information
fireAccessibleAction(getContext(item), item.getAccessibleContext().
getAccessibleAction(), toString(item));
if (queueBlocked())
key(KeyEvent.VK_ESCAPE);
}
COM: <s> select an awt popup menu item </s>
|
funcom_train/29925338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkAuthConfig() throws SSAuthException {
if ( !isAuthServer ) return;
if ( authServerOk ) return;
if ( failiureReason != null ) throw new SSAuthException("Configuration Error, please correct "+failiureReason);
throw new SSAuthException("Configuration Exception: No message, plese check logs");
}
COM: <s> checks that the authetication server is configured ok </s>
|
funcom_train/15580896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertTextNotInTable(String tableSummaryOrId, String text) {
assertTablePresent(tableSummaryOrId);
Assert.assertTrue("Found text: [" + text + "] in table [" + tableSummaryOrId + "]", !dialog
.isTextInTable(tableSummaryOrId, text));
}
COM: <s> assert that supplied text is not present in a specific table </s>
|
funcom_train/11663863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close(boolean force) throws DBException {
try {
if (ref == 0 || force) {
is.close();
ir.close();
}
} catch (IOException e) {
throw new DBException(FaultCodes.IDX_CORRUPTED,
"Failed to access index " + name + ", collection " + collection.getCanonicalName(), e);
}
}
COM: <s> closes the searcher if it is not used in any search </s>
|
funcom_train/33964947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void retrieveUserNameCookie() {
WebRequest request = (WebRequest) getRequestCycle().getRequest();
Cookie userNameCookie = request.getCookie(USERNAME_COOKIE_NAME);
if (userNameCookie != null && userNameCookie.getValue() != null
&& !userNameCookie.getValue().equals(StringUtils.EMPTY)) {
rememberMe = true;
userName = userNameCookie.getValue();
}
}
COM: <s> retrieves the cookie if exists to fill the username field and check the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.