__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/51538951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendDisplayPreemptStartEvent(int midletDisplayId) {
NativeEvent event =
new NativeEvent(EventTypes.PREEMPT_EVENT);
event.intParam1 = currentIsolateId;
event.intParam4 = midletDisplayId;
event.intParam2 = -1; /* start = true */
eventQueue.sendNativeEventToIsolate(event, amsIsolateId);
}
COM: <s> called to start preempting and end preempting </s>
|
funcom_train/14585620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showPlayoffStandings(int week) {
// loads standings for the remaining teams within the
// conference, which are the playoff teams
SeasonStandings standings = season.computeStandings(week, 1);
// System.out.println("standings size prior to collecting conf standings: " + standings.getTeamRecords().size());
league.collectConferenceStandings(standings);
println(league.showPlayoffStandings());
}
COM: <s> loads playoff standings and displays them </s>
|
funcom_train/25990552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Binding previousBinding(IRubyObject self) {
Frame frame = getPreviousFrame();
Frame current = getCurrentFrame();
return new Binding(self, frame, frame.getVisibility(), getPreviousRubyClass(), getCurrentScope(), current.getFile(), current.getLine());
}
COM: <s> return a binding representing the previous calls state but with a specified self </s>
|
funcom_train/46058315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGroupNameExistsError(Set nonexistingnames) {
if (nonexistingnames == null || nonexistingnames.size() == 0) {
bgName.setErrorKey("error.group.name.exists");
} else {
String[] args = new String[] { StringHelper.formatAsCSVString(nonexistingnames) };
bgName.setErrorKeyWithParams("error.group.name.exists", args);
}
}
COM: <s> set error on groupname groupname already taken by other group </s>
|
funcom_train/33412775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public BeanInfo loadBeanInfo( ClassLoader loader, Class<?> beanClass ) {
if( beanClass==null ) return null;
try {
String className = beanClass.getName().concat("BeanInfo");
return loadBeanInfo( loader, className );
}
catch( Exception ex ) {
Log.error( "BeanUtil.getBeanInfo exception", ex );
}
return null;
}
COM: <s> load a bean info associate with bean </s>
|
funcom_train/25936103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void mapFieldWithProperty(HTMLDocument fragment, BNode recipe, String fieldClass, URI property) {
HTMLDocument.TextField title = fragment.getSingularTextField(fieldClass);
conditionallyAddStringProperty(
title.source(), recipe, property, title.value()
);
}
COM: <s> maps a field text with a property </s>
|
funcom_train/13570979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addLink(Link link, int posCoord, List<Coord> points) {
for(LinkAttached linkA:links)
if(linkA.getLink().getId().equals(link.getId()))
return false;
links.add(new LinkAttached(link, posCoord));
modified = true;
return isGoodPoint(points.get(posCoord));
}
COM: <s> adds a new link to the route </s>
|
funcom_train/22550886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
preHandshakeInitialize(requestHeaders, responder, observer);
observer.handleConnect();
} catch(NoGnutellaOkException ex) {
observer.handleNoGnutellaOk(ex.getCode(), ex.getMessage());
} catch(BadHandshakeException ex) {
observer.handleBadHandshake();
} catch(IOException iox) {
observer.shutdown();
}
}
COM: <s> does the handshaking completes the connection process </s>
|
funcom_train/37237600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() throws CloneNotSupportedException {
RodsDateAxis clone = (RodsDateAxis) super.clone();
// 'dateTickUnit' is immutable : no need to clone
if (this.dateFormatOverride != null) {
clone.dateFormatOverride = (DateFormat) this.dateFormatOverride.clone();
}
// 'tickMarkPosition' is immutable : no need to clone
return clone;
}
COM: <s> returns a clone of the object </s>
|
funcom_train/25647474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removePort(State removedState) {
Port removedPort = null;
if (removedState instanceof EntryPoint) {
removedPort = entryPointToPortMap.remove((EntryPoint) removedState);
} else if (removedState instanceof ExitPoint) {
removedPort = exitPointToPortMap.remove((ExitPoint) removedState);
}
if (removedPort != null) {
portRemoveObservers.notifyObservers(removedPort);
}
}
COM: <s> removes the port which links to the specified entry point or exit point </s>
|
funcom_train/4300840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object toArray(Object a) {
if (Array.getLength(a) < elementCount) {
a = Array.newInstance(a.getClass().getComponentType(),
elementCount);
}
System.arraycopy(elementData, 0, a, 0, elementCount);
return a;
}
COM: <s> copies all elements of the list to a </s>
|
funcom_train/8899787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOrdVariable(OrdinaryVariable _ov){
ov = _ov;
txtName.setText(ov.getName());
//select the type of the OV in the combo box
for(int i = 0; i < types.length; i++){
if(types[i].equals(ov.getValueType())){
jcbType.setSelectedIndex(i);
break;
}
}
repaint();
}
COM: <s> set the ordinary variable that this tool bar use </s>
|
funcom_train/13679997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getStackFrameText(BCStackFrame frame) {
try {
return (new Path(frame.getSourceName())).removeFileExtension().toString() + "." + frame.getName() + " (line: " + frame.getLineNumber() + ")";
} catch (DebugException e) {
return null;
}
}
COM: <s> returns a label for the given stack frame </s>
|
funcom_train/5660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void gotoPage(int pageNumber){
if ((pageNumber < 0) || (pageNumber > maxPage))
throw new IndexOutOfBoundsException("Page number incorrect: got "+pageNumber+ "min 0, max "+maxPage);
currentPage = pageNumber;
index = pageSize * currentPage;
length = ((rowCount - index) < pageSize) ? (rowCount - index): (pageSize);
fireTableStructureChanged();
}
COM: <s> set the page of data to display in table </s>
|
funcom_train/8844490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getExpression() {
String textFile = _gui.getSearchView().txtFilterFileGetText();
String textExp = _gui.getSearchView().txtFilterExpGetText();
if ( !textExp.isEmpty() ) {
return textExp;
}else if ( !textFile.isEmpty() ) {
String source = getFileExp( textFile );
return source;
}
return "";
}
COM: <s> gets search expression </s>
|
funcom_train/14267426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
// This does not clear the ManagedDownloader because
// it could still be in a waiting state, and we need
// it to allow IncompleteFileDescs to funnel alt-locs
// as sources to the downloader.
if(fos==null)
return;
try {
fos.close();
} catch (IOException ioe) {}
}
COM: <s> closes the file output stream </s>
|
funcom_train/12548173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showPopup(MouseEvent event) {
// Should we show a popup menu?
if (event.isPopupTrigger()) {
Point p = getView().transformFromAutomatonToView(event.getPoint());
if (lastClickedState != null && shouldShowStatePopup()) {
stateMenu.show(lastClickedState, getView(), p);
} else {
emptyMenu.show(getView(), p);
}
}
lastClickedState = null;
lastClickedTransition = null;
}
COM: <s> possibly show a popup menu </s>
|
funcom_train/31249184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() throws IOException {
if (level != 0) // otherwise disconnected or connect
throw new SocketException("Socket closed or already open (" + level
+ ")");
IOException exception = null;
Socket s = null;
try {
s = new Socket(host, port);
exception = null;
} catch (IOException exc) {
if (s != null)
s.close();
s = null;
exception = exc;
}
if (exception != null)
throw exception; // connection unsuccessful
prepare(s);
}
COM: <s> establish a connection to the server </s>
|
funcom_train/23027559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void outputProtected(FormattingRules rules, StringBuffer buffer) {
ArrayList items = FormattingUtils.tokenize(text);
String prefix = " * ";
if (!starOnEachLine) {
prefix = " ";
}
ArrayList lines = FormattingUtils.formatList(rules, items, indentLevel, prefix);
FormattingUtils.outputLines(rules, lines, buffer);
}
COM: <s> allow subclasses to take advantage of the text formatting without adding </s>
|
funcom_train/3721045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HL7Exception testLength(Type type, int maxLength) {
HL7Exception e = null;
String encoded = PipeParser.encode(type, this.enc);
if (encoded.length() > maxLength) {
e = new ProfileNotFollowedException("Length of " + encoded.length() + " exceeds maximum of " + maxLength);
}
return e;
}
COM: <s> tests whether the given type falls within a maximum length </s>
|
funcom_train/28340155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueModified(ITableRecord record, String strKey, Object objPrevValue) {
if (record.isPrimaryKey(strKey)) {
if (objPrevValue != null)
this.reIndexDataRecord(record, strKey, objPrevValue);
else
this.reIndexTable(strKey);
}
}
COM: <s> respond to a value modified event from a data record </s>
|
funcom_train/35848649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStringGenerationNoClassName() {
setUp2();
CallStateNotationUml notation = new CallStateNotationUml(aCallState);
String notationStr = notation.toString(aCallState, null);
assertEquals("Notation not correctly generated", "myOper", notationStr);
}
COM: <s> test if the string for an un named class is correct </s>
|
funcom_train/46582139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drain(String substr) {
String scratch;
try {
do {
scratch = read();
} while (scratch != null && !scratch.endsWith(substr));
} catch (Exception e) {
try {
/* The RokuConnection must have failed. */
System.err.println("RokuConnection.drain("+substr+") failed.");
connected = false;
timer.schedule(new ConnectTask(), 0, 1000);
} catch (Exception ex2) {
System.err.println("Could not launch re-connect task.");
}
connected = false;
}
}
COM: <s> read and discard data from the connection until a line ending </s>
|
funcom_train/45486398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton6Del() {
if (jButton6Del == null) {
jButton6Del = new JButton();
jButton6Del.setBounds(new Rectangle(951, 142, 64, 26));
Font font = new Font("Serif", Font.BOLD, 16);
jButton6Del.setFont(font);
jButton6Del.setForeground(Color.red);
jButton6Del.setText("6");
}
return jButton6Del;
}
COM: <s> this method initializes j button6 del </s>
|
funcom_train/8987751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DmsDocument getDocumentByDocTypeRefNo( String documentType, String referenceNo ) throws ApplicationException {
DmsDocumentDAObject dmsDocumentDAO = new DmsDocumentDAObject(sessionContainer, conn);
DmsDocument dmsDocument = dmsDocumentDAO.getDocumentByDocTypeRefNo(documentType,referenceNo);
dmsDocumentDAO = null;
return dmsDocument;
}
COM: <s> get a document by document type and reference no </s>
|
funcom_train/43101746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParent(Object handle, Object parent) {
if (handle instanceof MGeneralization
&& parent instanceof MGeneralizableElement) {
((MGeneralization) handle).setParent(
(MGeneralizableElement) parent);
return;
}
throw new IllegalArgumentException("handle: " + handle
+ " or parent: " + parent);
}
COM: <s> sets the parent of a generalization </s>
|
funcom_train/29706940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasRightBrother() {
if ( this.parent != null && this.parent instanceof Task ) {
int index = ( (Task) parent ).getChildren().indexOf( this );
return ( index < ( (Task) parent ).getChildren().size() - 1 );
}
return false;
}
COM: <s> true if current task has right side brother </s>
|
funcom_train/13198040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAttribute(PhysicalAttribute newAtt) throws JDMException {
//TODO check for name duplcity and throw exception
if (newAtt != null) {
if (attributes == null) {
attributes = new LinkedList<PhysicalAttribute>();
}
if (attributesNames == null) {
attributesNames = new LinkedList<String>();
}
attributes.add(newAtt);
attributesNames.add(newAtt.getName());
}
}
COM: <s> adds new attribute </s>
|
funcom_train/26135490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int count( Query query, String cond, Object... params ) {
String sql = "SELECT count(*) FROM " + getTableName() + " WHERE " + cond;
debugSql( sql, params );
PreparedQuery pq = prepare( query, true );
try {
return pq.countEntities( withLimit( Integer.MAX_VALUE ));
}
catch (Exception e) {
errorSql( e, sql, params );
handleException( e );
return -1;
}
}
COM: <s> counts records by filled query </s>
|
funcom_train/22212479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() {
threadPool = new ThreadPool("Testing",5,10,5,0,0,0) ;
pivotLock = new PivotLock("TestPivotLock") ;
readWriteLock = new ReadWriteLock("TestReadWriteLock") ;
}
COM: <s> create any objects needed to run your test cases </s>
|
funcom_train/17827696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkMaxSize() {
/*
* Remove the first (oldest) entry in the list of buffers until
* we are down to the maximum number of buffers we are allowed to
* hold. Note that we leave one additional buffer slot for the
* "current" buffer.
*/
while ((maxBuffers+1) < buffers.size()) {
buffers.remove(0);
}
}
COM: <s> make sure that we havent overfilled ourselves </s>
|
funcom_train/39912557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRh11() {
System.out.println("getRh11");
Page1 instance = new Page1();
TextField expResult = null;
TextField result = instance.getRh11();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get rh11 method of class timesheetmanagement </s>
|
funcom_train/19094683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean selectWord(int caretPos) {
IDocument doc = fText.getDocument();
int startPos, endPos;
try {
int pos = caretPos;
char c;
while (pos >= 0) {
c = doc.getChar(pos);
if (!Character.isJavaIdentifierPart(c))
break;
--pos;
}
startPos = pos;
pos = caretPos;
int length = doc.getLength();
while (pos < length) {
c = doc.getChar(pos);
if (!Character.isJavaIdentifierPart(c))
break;
++pos;
}
endPos = pos;
selectRange(startPos, endPos);
return true;
} catch (BadLocationException x) {
}
return false;
}
COM: <s> selects one word as default fallback </s>
|
funcom_train/12656568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addItem(PlaylistItem item) {
boolean added = cachedPlaylist.add(item);
if (filterPredicate.evaluate(item)) {
filteredPlaylist.add(item);
}
setModified(added);
if (playMode == PlayMode.SHUFFLE) {
addToShuffledList(item);
}
fireItemAddedEvent(item);
return added;
}
COM: <s> appends a playlist item at the end of the playlist </s>
|
funcom_train/3837848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFrame getJFrameTapeEditor() {
if (jFrameTapeEditor == null) {
jFrameTapeEditor = new JFrame();
jFrameTapeEditor.setSize(new java.awt.Dimension(813, 370));
jFrameTapeEditor.setTitle("EditorContainer");
jFrameTapeEditor.setJMenuBar(getJJMenuBarTapeEditor());
jFrameTapeEditor.setContentPane(getJContentPaneTapeEditor());
}
return jFrameTapeEditor;
}
COM: <s> this method initializes j frame tape editor </s>
|
funcom_train/31956236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBitpix(int val) {
iter = iterator();
iter.next();
try {
iter.add(BITPIX, new HeaderCard(BITPIX, val, null));
} catch (HeaderCardException e) {
System.err.println("Impossible exception at setBitpix " + e);
}
}
COM: <s> set the bitpix value for the header </s>
|
funcom_train/12126718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PBounds computeFullBounds(PBounds dstBounds) {
PBounds result = getUnionOfChildrenBounds(dstBounds);
cachedChildBounds.setRect(result);
result.setRect(result.getX() - INDENT, result.getY() - INDENT, result.getWidth() + 2 * INDENT, result
.getHeight()
+ 2 * INDENT);
localToParent(result);
return result;
}
COM: <s> change the full bounds computation to take into account that we are </s>
|
funcom_train/5255673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("AMDS_BIOSENSEPortTypePort".equals(portName)) {
setAMDS_BIOSENSEPortTypePortEndpointAddress(address);
}
else { // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/25783172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultFonts() {
setFont(A_LISTS, Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_MEDIUM);
setFont(A_CONTEXTMENU, Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_SMALL);
setFont(A_NOTESVIEWER, Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_MEDIUM);
}
COM: <s> sets fonts to their default sizes like it was before addings this </s>
|
funcom_train/3314973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean evaluate(T input){
boolean reply = false;
try {
reply =
(ComparatorUtil.compare (input, lowerBound, comparator) >= 0) &&
(ComparatorUtil.compare (input, upperBound, comparator) < 0);
} catch (ClassCastException e){
// return false;
} catch (NullPointerException e){
// return false;
}
return reply;
}
COM: <s> compares the specified object to the boundaries of this filter </s>
|
funcom_train/24535862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyLocation(Point point, Point oldPoint) {
if (!locOverridden) {
if (oldPoint != null)
fComponent.getLocation(oldPoint);
fComponent.setLocation(point);
} else {
if (oldPoint != null) {
oldPoint.setLocation(overPoint);
}
// We are overriding, so save the point's location so that it will look like this spot when queried.
overPoint.x = point.x;
overPoint.y = point.y;
}
}
COM: <s> apply location and return previous value </s>
|
funcom_train/2513923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AffineTransform findTranslation(AffineTransform at, BufferedImage bi) {
Point2D p2din, p2dout;
p2din = new Point2D.Double(0.0, 0.0);
p2dout = at.transform(p2din, null);
double ytrans = p2dout.getY();
p2din = new Point2D.Double(0, bi.getHeight());
p2dout = at.transform(p2din, null);
double xtrans = p2dout.getX();
AffineTransform tat = new AffineTransform();
tat.translate(-xtrans, -ytrans);
return tat;
}
COM: <s> find proper translations to keep rotated image correctly displayed </s>
|
funcom_train/10513297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File createTempDir() throws IOException {
File tmpDir = File.createTempFile("genic", null, null);
tmpDir.delete();
if (!tmpDir.mkdir()) {
throw new IOException("Cannot create the temporary directory '" + tmpDir + "'.");
}
return tmpDir;
}
COM: <s> create a temporary directory for gen ic output </s>
|
funcom_train/1301024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperty(String property, Object value) {
if (docText != null) {
final Tree<XmlLite.Data> xmlNode = docText.getXmlNode();
if (xmlNode != null) {
xmlNode.getData().setProperty(property, value);
}
}
}
COM: <s> set the property on the doc texts xml node </s>
|
funcom_train/16524217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int put(int id, Object o) throws IllegalArgumentException {
if (id < 0) throw new IllegalArgumentException();
// Make sure there is sufficient space to overlay
for (int i = id - data.size(); i > 0; i--) {
data.add(null);
}
data.add(id, o);
return id;
}
COM: <s> sets the element for the specified id replacing any previous element that </s>
|
funcom_train/27779925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(char[] b, int off, int len) throws IOException {
//XXX This is buggy code !!!! we must translate it correctly!!!
// this works just for 8b byte-input!
int r = super.read(b, off, len);
for (int i = 0; i < r; i++) {
b[i] = translate((int) b[i]);
}
return r;
}
COM: <s> read characters into a portion of an array </s>
|
funcom_train/8523014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void trackUrl(String url) {
String ip = getInfo(TYPE_IP);
String sid = getInfo(TYPE_SID);
ConsoleLogger.getInstance().log(LogDbo.TYPE_INFO, "trackUrl", "ItemId:" + TimeDataLoader.getInstance().getDayStr() + url + " Ip:" + ip + " Session:" + sid);
}
COM: <s> here the url is id </s>
|
funcom_train/44011515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetPmtChange() {
System.out.println("setPmtChange");
double pmtChange = 0.0;
PaymentBO instance = new PaymentBO();
instance.setPmtChange(pmtChange);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set pmt change method of class edu </s>
|
funcom_train/50464148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCollection() {
try {
URL url = new URL(Boot.getBootDir().toURL(), "ext/testCollection.blx");
Object obj = BLXCompFactory.getInstance().getObject(url);
}
catch(Exception exp) {
exp.printStackTrace();
fail(exp.getMessage());
}
}
COM: <s> load up a blx file with a collection </s>
|
funcom_train/51219728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getStopButton() {
if (stopButton == null) {
stopButton = new JButton();
stopButton.setIcon(new ImageIcon(getClass().getResource("/com/yougo/mp3tool/core/gui/res/stop.png")));
stopButton.setBorder(null);
}
return stopButton;
}
COM: <s> this method initializes stop button </s>
|
funcom_train/10520254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExcludes(String[] excludes) {
if (excludes == null) {
this.excludes = null;
} else {
Pattern[] p = new Pattern[excludes.length];
for (int i = 0; i < excludes.length; i++) {
p[i] = new Pattern();
p[i].setPattern(excludes[i]);
}
setExcludes(p);
}
}
COM: <s> sets the set of exclude patterns to use </s>
|
funcom_train/24294611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProcessData getProcessData(UserInfoInterface userInfo, ProcessHeader procHeader) {
ProcessData retObj = null;
ProcessHeader[] headers = new ProcessHeader[1];
headers[0] = procHeader;
ProcessData[] ret = this.getProcessesData(userInfo, headers);
if (ret != null && ret.length == 1) {
retObj = ret[0];
}
return retObj;
}
COM: <s> retrieves process data </s>
|
funcom_train/44623201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putSpecs(MethodSymbol m, MethodSpecs spec) {
if (utils.jmldebug) log.noticeWriter.println(" Saving method specs for " + m.enclClass() + " " + m);
specsmap.get(m.enclClass()).methods.put(m,spec);
}
COM: <s> adds the specs for a given method to the database overwriting anything </s>
|
funcom_train/40312117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetColumnLabel_InvalidColumn2() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.getColumnLabel(0);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by getColumnLabel method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests get column label with column index equals to 0 </s>
|
funcom_train/50803081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkAttackOk(boolean withBusy, double Factor) {
SPlayer p = getAttacker().getPlayer();
return eligible && getTarget().getInfluence().getInfluence(
p.getMyHouse().getHouseFightingFor(p).getId()) > 0;
}
COM: <s> ok if held on a planet you control </s>
|
funcom_train/42302777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Player getNextAlivePlayer(int index) {
int n = 0; // increment on turn
boolean foundAlivePlayer = false;
Player player;
do {
player = nextTurn(index + n);
if (player.isAlive() && (player.getPenalty() < MAX_PENALTIES)) {
foundAlivePlayer = true;
} else {
n++;
}
} while (!foundAlivePlayer && !(n > numberOfPlayers));
if (n == numberOfPlayers) {
System.err.println("Everyone crashed but me!");
player = null;
}
return player;
}
COM: <s> calculates the next alive player after a player corresponding to turn </s>
|
funcom_train/9872144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getElementByField(String fieldName, String value) throws FieldNotFoundException {
Vector targetColumn = getColumnNamed(fieldName);
if (targetColumn == null) throw new FieldNotFoundException("Field " + fieldName + " not found.");
for (int i = 0; i < targetColumn.size(); i++) {
if (((String) targetColumn.elementAt(i)).equals(value)) {
return getElementAtIndex(i);
}
}
return null;
}
COM: <s> returns the spot element line from the mev file that contains the </s>
|
funcom_train/8282913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadNewTeacherInfo(SecurityToken infoToken, String dbName) {
infoToken.putValue(FormFields.EDITSTATUS, FormFields.NEW);
infoToken.putValue("teacherContainer", UserContainer.getUserContainer(
"-1", dbName));
infoToken.removeValue("assignedClassList");
infoToken.putValue("availableClassList", SchoolDBSQL.getSchoolDBSQL(
infoToken.getValue(FormFields.SCHOOLNAME).toString())
.loadAvailableClassList());
}
COM: <s> loads available classes and an empty teacher into the token </s>
|
funcom_train/15604115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void noteQueryAlignedResiduesLoaded(HitAlignmentDetailFeature feature,String queryAlignedResidues) {
// If the query is for this feature then proceed.
if ( targetOid != null && feature.getOid().equals(targetOid) ) {
this.queryAlignedResidues = queryAlignedResidues;
queryHasBeenLoaded = true;
handleFeatureIfBothSequencesHaveArrived((HSPFeature)feature);
}
}
COM: <s> called when query aligned residues are available </s>
|
funcom_train/19063692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object addMessage() throws Exception {
// add message "0.eml" as inputstream to folder
String input = FolderTstHelper.getString(0);
// create stream from string
ByteArrayInputStream inputStream = FolderTstHelper.getByteArrayInputStream(input);
// add stream to folder
Object uid = getSourceFolder().addMessage(inputStream);
// close stream
inputStream.close();
return uid;
}
COM: <s> add message to test folder </s>
|
funcom_train/42765788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test
public void testSetDeterminer() {
NounPhraseDTO nf = facade.createNounPhraseDTO();
DeterminerDTO det = facade.createDeterminerDTO();
String name = "determiner";
det.setName(name);
nf.setDeterminer(det);
Assert.assertEquals("setting determiner failed",det,nf.getDeterminer());
Assert.assertEquals("setting determiner name failed",name,nf.getDeterminer().getName());
}
COM: <s> test method for </s>
|
funcom_train/12656027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TagInfo loadTagInfo() {
if ((tagInfo == null) && (!Utilities.isNullOrEmpty(location))) {
tagInfo = TagInfoFactory.getInstance().getTagInfo(location);
if (isFile) {
duration = tagInfo.getTrackLength();
displayName = getFormattedDisplayName();
formatedLength = getFormattedLength(this.duration);
}
}
return tagInfo;
}
COM: <s> load and return tag info instance </s>
|
funcom_train/29726983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRenderXmlStylesheet() throws Exception {
Document xhtmlDocument = testRenderImpl("full-test.xml");
assertEquals("xml", xhtmlDocument.getRootElement().getName());
assertEquals("text/xml", httpServletResponse.getContentType());
}
COM: <s> test the xorro view rendering using a xml xorro stylesheet </s>
|
funcom_train/46728336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void submit() throws Exception {
if (hasSelectedPatient()) {
// select first
if (visitSearch && !hasSelectedVisit()) {
List<ViewVisitModel> visits = PatientService.getVisitListForPatients(selectedPatients);
if (visits.size() > 0) {
selectedVisits.add(visits.get(0));
}
}
}
okPressed = true;
okCloseForm();
if (actionOnOk != null) {
ActionEvent e = new ActionEvent(getFrameOrDialog(), 0, null);
actionOnOk.actionPerformed(e);
}
}
COM: <s> ok or double click </s>
|
funcom_train/21907151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(final FilterConfig config) throws ServletException {
WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(config.getServletContext());
if (null != ctx) {
try {
transactionTemplate = (TransactionTemplate) ctx.getBean("transactionTemplate");
} catch (Exception e) {
throw new ServletException("The transactionTemplate bean could not be resolved", e);
}
} else {
throw new ServletException("The Spring application context could not be located");
}
}
COM: <s> intializes the code global transaction filter code </s>
|
funcom_train/1354280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void isSessionAlive(String sessionId){
loginService.isAlive(sessionId, new AsyncCallback<Boolean>() {
public void onFailure(Throwable arg0) {
Utility.popUpUrl("Login.html","",String.valueOf(CookieTools.getCurrentThemeId()));
}
public void onSuccess(Boolean flag) {
setAlive(flag);
}
});
}
COM: <s> cookie url session id </s>
|
funcom_train/45251571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkNodeAndChildren(IPreferenceNode node) {
if(ids.contains(node.getId())) {
return true;
}
IPreferenceNode[] subNodes = node.getSubNodes();
for (int i = 0; i < subNodes.length; i++) {
if(checkNodeAndChildren(subNodes[i])) {
return true;
}
}
return false;
}
COM: <s> check to see if the node or any of its children </s>
|
funcom_train/20129020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPrimaryKey(String column) throws SQLException {
if (index.containsKey(column)) {
return primaryKey[index.get(column).intValue()];
} else {
final SqlExceptionState state = SqlExceptionState.COLUMN_NOT_FOUND;
throw new SQLException("Column " + column + " does not exist in resultset.", state.name(), state.code());
}
}
COM: <s> indicates whether the designated column is a part of the primary key </s>
|
funcom_train/19259599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double convert(double value, Unit newUnit) throws CannotConvertException {
if (!(newUnit instanceof SpeedUnit)) {
String oldName = this.getClass().getName();
String newName = newUnit.getClass().getName();
throw new CannotConvertException(oldName + " to " + newName);
}
value *= newUnit.factor()/this.factor();
return value;
}
COM: <s> converts a value with the current units to a value with </s>
|
funcom_train/38292302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MessageQueue createMessageQueue() {
String msgQueueClass = getProperty(MSG_QUEUE_CLASS, null);
if (msgQueueClass != null) {
try {
return (MessageQueue) Class.forName(msgQueueClass).newInstance();
}
catch (Exception e) {
System.out.println("Error loading MessageQueue of class "+msgQueueClass+" ["+e+"]");
}
}
return null;
}
COM: <s> developer can override this method to provide an alternative message queue creation mechanism </s>
|
funcom_train/3875029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer("application_name=[" + name + "] error_page=[" + logicalError + "]");
sb.append("\n");
sb.append("Commands:\n");
Iterator cmdIta = commands.iterator();
while(cmdIta.hasNext()) {
sb.append(cmdIta.next().toString());
}
sb.append("\n");
sb.append("Fronts:\n");
Iterator itaFrnt = fronts.iterator();
while(itaFrnt.hasNext()) {
sb.append(itaFrnt.next().toString());
}
return sb.toString();
}
COM: <s> returns a tree formatted textual description of the app schema object </s>
|
funcom_train/31078100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addScene(Scene scene) {
BranchGroup sceneGroup = scene.getSceneGroup();
BranchGroup g = new BranchGroup();
g.setCapability(Group.ENABLE_PICK_REPORTING);
Behavior[] behaviors = scene.getBehaviorNodes();
ResettableTransformGroup ptg = new ResettableTransformGroup();
ptg.setBounds(DEFAULT_BOUNDS);
ptg.enableMouseBehaviors();
ptg.addChild(sceneGroup);
if (behaviors != null) { // there are behaviors!
for (int i = 0; i < behaviors.length; i++) {
ptg.addChild(behaviors[i]);
}
}
g.addChild(ptg);
this.universe.addBranchGraph(g);
}
COM: <s> adds a specified scene to the current universe </s>
|
funcom_train/34356595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Resource getOwlOntologyResource() {
Resource result = null;
if (hasJenaModel()) {
Resource sswapOntologyResource = model.getResource(SSWAP_ONTOLOGY_URI);
Property rdfType = model.getProperty(RDF_TYPE_URI);
Resource owlOntology = model.getResource(OWL_ONTOLOGY_URI);
StmtIterator it = model.listStatements(sswapOntologyResource, rdfType, owlOntology);
if (it.hasNext()) {
Statement statement = it.next();
result = statement.getSubject();
}
it.close();
}
return result;
}
COM: <s> gets the main owl ontology resource in the model if there is one </s>
|
funcom_train/40347846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String parse(String plainContent, IWikiModel model) {
if (plainContent == null || plainContent.length() == 0) {
return "";
}
StringBuilder buf = new StringBuilder(plainContent.length() * 2);
try {
TemplateParser.parse(plainContent, model, buf, false);
} catch (IOException e) {
e.printStackTrace();
}
return buf.toString().trim();
}
COM: <s> parse the given plain content string with the template parser </s>
|
funcom_train/5463112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean evalAsBodyClause(RuleContext context) {
if (getImplementor() == null) {
logger.warning("Invoking undefined functor " + getName() + " in " + context.getRule().toShortString());
return false;
}
return implementor.bodyCall(getBoundArgs(context.getEnv()), args.length, context);
}
COM: <s> execute the given built in as a body clause </s>
|
funcom_train/3792380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JComponent createSeparator(String textWithMnemonic, int alignment) {
if (textWithMnemonic == null || textWithMnemonic.length() == 0) {
return new JSeparator();
}
JCLabel title = createTitle(textWithMnemonic);
title.setHorizontalAlignment(alignment);
return createSeparator(title);
}
COM: <s> creates and returns a labeled separator </s>
|
funcom_train/38565256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GraphicalUpdateDescriptor getGraphicalUpdateDescriptor( int sourceOrDestContext ) {
if(sourceOrDestContext == SOURCE_CONTEXT)
return _grSrcUpdDesc;
if(sourceOrDestContext == DESTINATION_CONTEXT)
return _grDstUpdDesc;
else
throw new IllegalArgumentException( "sourceOrDestContext must be one of the two context constants." );
}
COM: <s> returns a description for graphical handling </s>
|
funcom_train/2754749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPnlFormula() {
if (pnlFormula == null) {
pnlFormula = new JPanel();
pnlFormula.setEnabled(false);
pnlFormula.setPreferredSize(new Dimension(0,20));
pnlFormula.setLayout(new BoxLayout(getPnlFormula(), BoxLayout.X_AXIS));
pnlFormula.add(new JLabel("F("));
pnlFormula.add(getJTxtCabecera());
pnlFormula.add(new JLabel(")="));
pnlFormula.add(getJTxtFormula());
pnlFormula.add(getBtnGo());
pnlFormula.add(getBtnFuncHelp());
}
return pnlFormula;
}
COM: <s> this method initializes j panel5 </s>
|
funcom_train/23163095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (this == obj) {
return true;
} else if (obj == null || this.getClass() != obj.getClass()) {
return false;
} else {
SingleFieldIdentity other = (SingleFieldIdentity) obj;
if (targetClass != null && targetClass == other.targetClass)
return true;
return targetClassName.equals (other.targetClassName);
}
}
COM: <s> check the class and class name and object type </s>
|
funcom_train/32970265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractCateg findAbstractCateg(int id) throws BoardObjectNotFoundException {
AbstractCateg res = dao.findAbstractCategNE(id);
if (res == null) {
throw new BoardObjectNotFoundException(
"Categoria de ID {0,number,#} não encontrada.", new Integer(id));
}
return res;
}
COM: <s> retorna uma categoria abstrata </s>
|
funcom_train/24477422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemStateChanged(ItemEvent ie){
Object quelle = ie.getSource();
if(quelle == this.FlyMenuItem){
setNavigationMode(Java3DViewer.NAVIGATION_MODE_MAP);
}
if(quelle == this.BirdMenuItem){
setNavigationMode(Java3DViewer.NAVIGATION_MODE_BIRD);
}
else if(quelle == ExamineMenuItem){
setNavigationMode(Java3DViewer.NAVIGATION_MODE_EXAMINE);
}
else if(quelle == NavigationInfoMenuItem){
viewer.setDisplayNavigationInfo(NavigationInfoMenuItem.getState());
}
}
COM: <s> method is called when an item in the views menu is changed </s>
|
funcom_train/41164069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoEditorReviewerPairSt3 entity) {
EntityManagerHelper.log("saving CoEditorReviewerPairSt3 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 co editor reviewer pair st3 </s>
|
funcom_train/21907118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String viewAction() {
logger.debug("viewAction is invoked");
setActivity ((Activity) activityDataTable.getRowData());
Map requestParameters = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String viewType = (String)requestParameters.get(VIEW_TYPE);
if ( "edit".equals( viewType )) {
return NavigationResults.EDIT_ACTIVITY;
} else {
return NavigationResults.VIEW_ACTIVITY;
}
}
COM: <s> view an activity </s>
|
funcom_train/1069641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasProcessed(EObject eObject, Map context) {
boolean result = false;
if (context != null) {
// this is O(NlogN) but there's no helping it
while (eObject != null) {
if (context.containsKey(eObject)) {
result = true;
eObject = null;
} else {
eObject = eObject.eContainer();
}
}
}
return result;
}
COM: <s> determines whether we have processed this code e object code before </s>
|
funcom_train/24194350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attachQueueRouter(String name, QueueRouter router) throws NoSuchQueueException {
if (queues.containsKey(name)) {
NamedMessageBlockingQueue queue = queues.get(name);
router.attachToQueue(queue);
fireRouterAttached(queue, router);
} else
throw new NoSuchQueueException("The queue [" + name + "] is not present on this MQ");
}
COM: <s> attach a router to the message queue </s>
|
funcom_train/28171255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToPolygonArray() {
System.out.println("toPolygonArray");
BezierPath instance = new BezierPath();
Point2D.Double[] expResult = null;
Point2D.Double[] result = instance.toPolygonArray();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of to polygon array method of class org </s>
|
funcom_train/37571906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmailSend() throws Exception {
try {
assertFalse(EmailNotification.emailMsg(null, null));
fail("Trying to send an email with either a null address or a null body should cause an error.");
}
catch (Exception ignored) { }
assertTrue(EmailNotification.emailMsg(RECIPIENT_ADDRESS, BODY_TEXT));
}
COM: <s> test class email notification using it to send a test email </s>
|
funcom_train/14516889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPublisher(String name, BasePublisher publisher) throws PublisherExistsException, AuthorizationDeniedException {
if(authorizedToEditPublishers()){
publishersession.addPublisher(administrator, name, publisher);
this.info.publishersEdited();
}else {
throw new AuthorizationDeniedException("Not authorized to add publisher");
}
}
COM: <s> method to add a publisher </s>
|
funcom_train/38528285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getEventSize() {
final int rval;
if (evtSizeMode.isSet()) {
if (evtSizeMode == EventSizeMode.CNAF) {
rval = cnafCommands.getEventSize();
} else if (evtSizeMode == EventSizeMode.VME_MAP) {
rval = vmeMap.getEventSize();
} else {// ==EXPLICIT
rval = eventSize;
}
} else {
throw new IllegalStateException("Event Size Unkown");
}
return rval;
}
COM: <s> returns size of a event </s>
|
funcom_train/34580745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSaveCommand () {
if (saveCommand == null) {//GEN-END:|124-getter|0|124-preInit
// write pre-init user code here
saveCommand = new Command (lang.getProperty("command.save"), Command.OK, 0);//GEN-LINE:|124-getter|1|124-postInit
// write post-init user code here
}//GEN-BEGIN:|124-getter|2|
return saveCommand;
}
COM: <s> returns an initiliazed instance of save command component </s>
|
funcom_train/13749571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int pop(int[] register) {
for (int i = 0; i < register.length; i++)
a = register[0]; b = register[1]; c = register[2];
R[a] = stack[ R[b] ];
R[b] = R[b] - c;
// R[a] = D[ R[b] ];
// R[b] = R[b] + c;
return 4;
}
COM: <s> remove element from stack and decrease stack pointer </s>
|
funcom_train/11105663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void encodeBegin(FacesContext context) throws IOException {
Object vc = getViewController(context, false);
if (vc != null) {
try {
getViewControllerCallbacks(context).prerender(vc);
} catch (Exception e) {
handleException(context, e);
}
}
super.encodeBegin(context);
}
COM: <s> p prior to the standard processing call the code prerender code </s>
|
funcom_train/13668711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
assignPortions();
List threads = new LinkedList();
for (Iterator iter = _tasks.iterator(); iter.hasNext();) {
Task task = (Task) iter.next();
task.setCompositeTotal(_compositeTotal);
task.setTimeLength(_timeLength);
task.initInterval();
Thread t = new Thread(task);
threads.add(t);
}
for (Iterator iter = threads.iterator(); iter.hasNext();) {
Thread t = (Thread) iter.next();
t.start();
}
}
COM: <s> stats the composite </s>
|
funcom_train/11663986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getParsedObjectType(Collection col, String name) throws XindiceException {
if (col.getCollection(name) != null) {
return COLLECTION;
} else if ((col.getFiler() != null) && (col.getContainer(name) != null)) {
return DOCUMENT;
} else {
return UNKNOWN;
}
}
COM: <s> determine the type of object </s>
|
funcom_train/16086355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AffineTransform getDrawTransform() {
drawTransform.setToIdentity();
drawTransform.translate(getCenterScale().getX()*getWidth(), getCenterScale().getY()*getHeight());
drawTransform.scale(getScaleFactor().getX(), getScaleFactor().getY());
drawTransform.translate(-getViewCenter().getX(), getViewCenter().getY());
return drawTransform;
}
COM: <s> calculates the affine transform needed to draw correctly </s>
|
funcom_train/35443210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void process(JJackAudioEvent e) {
FloatBuffer buf = e.getInput();
for (int i=0; i < buf.capacity(); i++) {
double a = buf.get(i);
if (a < 0) {
a = -a;
}
if (a > this.value) {
this.value = a; // collect maximum peak in this.value
}
}
}
COM: <s> process multiple samples from input buffer to output buffer </s>
|
funcom_train/32794407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Exp convertToCollection(Node appliedTo) {
Exp varSet = new ExpCollEmpty(Collection.SET);
varSet.setReturnType(OclSet.class);
java.util.Collection coll = new ArrayList();
coll.add(getVar(appliedTo));
Exp result = new ExpCollAdd(varSet, coll);
result.setReturnType(OclSet.class);
return result;
}
COM: <s> create a collection with the value of the node beeing the only element </s>
|
funcom_train/31980728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyRelayReceived(String servingPeerId, String relayUrl, int relayIdentifier) {
String[] fields = new String[] {servingPeerId, relayUrl, String.valueOf(relayIdentifier)};
ITuple relayNotif = TupleFactory.createTuple(TupleFactory.RELAY_RECEIVED, fields);
try {
space.out(relayNotif);
} catch (TupleSpaceException e) {
LOG.error(name + " Error outputing tuple: " + e);
e.printStackTrace();
}
}
COM: <s> notifies the tuple space that a relay message has been received </s>
|
funcom_train/16533835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renameGroupActionPerformed(java.awt.event.ActionEvent evt) {
/* get the node we have clicked on */
DefaultMutableTreeNode node = treePopupListener.getNode();
if(node == null) {
return;
}
String oldName = ((Group) node.getUserObject()).getName();
GroupsDialog.renameGroup(controller, oldName);
}
COM: <s> event called to rename a user defined group </s>
|
funcom_train/36200593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float angle(SObject target ) {
//finds the angle between this ball and another
SObject nearest = target.nearest(this.getX(), this.getY());
float dx = nearest.getX() - this.getX();
float dy = nearest.getY() - this.getY();
float angle = (float)Math.atan2( dy, dx );
return angle;
}
COM: <s> determines the angle between this sobject and the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.