__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/26453691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAlert(int ID, User user, String host) throws NotAuthorizedException {
currentTime = new Date();
if (user.canDelete()) {
Alert.alertList.removeAlert(ID);
Server.getLogger().writeMessage(sdf.format(currentTime) + ": Alert ID " + ID + " deleted by " + user.username() + "@" + host);
}
} // end of removeAlert
COM: <s> removes an alert from the server </s>
|
funcom_train/375256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWinPcapMainCommentFindAllDevsEx() {
String source = "rpcap://";
List<PcapIf> alldevs = new ArrayList<PcapIf>();
int r = WinPcap.findAllDevsEx(source, auth, alldevs, errbuf);
if (r != Pcap.OK) {
fail(errbuf.toString());
return;
}
System.out.println("device list is " + alldevs);
}
COM: <s> test win pcap main comment find all devs ex </s>
|
funcom_train/42181821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Component getWaitGlassPane() {
Component previousGlassPane = getGlassPane();
JLabel waitGlassPane = new JLabel();
waitGlassPane.setOpaque(true);
waitGlassPane.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
setGlassPane(waitGlassPane);
waitGlassPane.setVisible(true);
return previousGlassPane;
}
COM: <s> returns a waiting glass pane for lengthy operations </s>
|
funcom_train/37448538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasOnlyProteins( Set<Interactor> set ) {
if ( set.isEmpty() ) {
throw new IllegalStateException( "The set of Interactors must not be empty." );
}
for ( Interactor interactor : set ) {
if ( ! proteinType.equals( interactor.getCvInteractorType() ) ) {
return false;
}
}
return true;
}
COM: <s> check weither all interactors in the set are proteins </s>
|
funcom_train/34822745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String localReadLine(InputStream inputStream) throws IOException {
String line = new String("");
byte newLine = '\n',
carrierReturn = '\r';
byte[] singleByte = new byte[1];
while (inputStream.read(singleByte) == 1 && singleByte[0] != newLine) {
if (singleByte[0] != carrierReturn)
line = line.concat(new String(singleByte));
}
return line;
}
COM: <s> return a line from an input stream object </s>
|
funcom_train/46999079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void remote_error_handler(Exception e) {
JOptionPane
.showMessageDialog(
this,
"Couldn't connect to the webservice - check your internet connection",
"ERROR", JOptionPane.ERROR_MESSAGE);
System.out.println("Exception " + e);
System.exit(1);
}
COM: <s> exception handler shows a message with exception message </s>
|
funcom_train/25648217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initDynamicFlags(StateMachine stateMachine) {
KendoProject prj = MainApplicationModel.getInstance().getActiveProject();
KendoFlagModel kfm = prj.getFlagModel();
for (KendoFlag kf : kfm.getFlags()) {
stateMachine.getExecutionContext().put(kf.getName(), kf.getDefaultValue());
}
}
COM: <s> initialize dynamic flags </s>
|
funcom_train/18894516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClosableIterator query(String query) throws Exception {
try {
checkInitialized();
Answer answer = getBean().executeQuery(query);
//return as ClosableIterator
return new AnswerClosableIteratorImpl(answer);
}
catch (Exception exception) {
throw new QueryException("Failed to execute Query: " + NEWLINE + query,
exception);
}
}
COM: <s> executes the query and returns the results as a closable iterator </s>
|
funcom_train/51538898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hideDisplayable(Displayable displayable) {
if (displayable instanceof Alert) {
bodyLayer.setVisible(false);
tickerLayer.toggleAlert(false);
btnLayer.toggleAlert(false);
alertLayer.setVisible(false);
}
btnLayer.dismissMenu();
// Make sure that not of the popups are shown
clearPopups();
}
COM: <s> alert this midpwindow that the given displayable is no longer </s>
|
funcom_train/36489632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertText(String s) throws BadLocationException {
doc.insertString(doc.getLength(),s,null);
serverTextPane.scrollRectToVisible(new Rectangle(0,serverTextPane.getHeight()-2,1,1));
}
COM: <s> function called to insert normal styled text into the server text field </s>
|
funcom_train/27679606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long lastInsertId(Connection cnx) {
// Connection cnx = null;
try {
if ((cnx = this.open()) == null) {
return 0;
}
PreparedStatement query = cnx.prepareStatement("SELECT LAST_INSERT_ID()");
ResultSet rs = query.executeQuery();
if (rs.next()) {
log.debug("" + rs.getLong(1));
return rs.getLong(1);
}
else {
return 0;
}
}
catch (SQLException e) {
log.error(e.toString());
return 0;
}
finally {
this.close(cnx);
}
}
COM: <s> method last insert id </s>
|
funcom_train/5304467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent e) {
if (SwingUtilities.isRightMouseButton(e)) {
Object cell = currentGraph.getCellAt(e.getX(), e.getY());
JPopupMenu menu = this.createPopupMenu(e.getPoint(), cell);
menu.show(graph, e.getX(), e.getY());
}
super.mousePressed(e);
}
COM: <s> handles mouse pressed event </s>
|
funcom_train/1756400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw()
{
background(255);
noLoop();
fill(120,60,60);
textFont(font, 18);
text("Type in some text and click mouse when finished.",30,30);
textInput.draw(30,50);
}
COM: <s> draws the text input field </s>
|
funcom_train/39063908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPersonalMessageForNote(LineMarkerNote note, String message) {
IMarker[] markers =
MarkerNotesUIPlugin.getMatchingMarkers(getCurrentProject(), note);
try {
if (markers.length > 0)
markers[0].setAttribute(LineMarkerNote.ATTR_PERSONAL, message);
note.setPersonalMessage(message);
} catch (CoreException e) {
} finally {
markTreeViewer.refresh(note, true);
}
}
COM: <s> sets the personal message for the given line marker note </s>
|
funcom_train/9806579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected EdifCell copyEdifCell(EdifCell origCell) throws EdifNameConflictException {
// Determine destination library
EdifLibrary origLib = origCell.getLibrary();
EdifLibrary destLib = _libMap.get(origLib);
if (destLib == null) {
destLib = copyEdifLibrary(origLib);
}
return copyEdifCell(origCell, destLib);
}
COM: <s> finds associated library in new environment and uses it as well as the </s>
|
funcom_train/3026661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(ASTClassDeclaration node, Object data) {
String className = ((ASTUnmodifiedClassDeclaration)node.jjtGetFirstChild()).getImage();
PTVData ptv = (PTVData)data;
ptv.push(new AClass(className, node));
super.visit(node, data);
ptv.pop();
return ptv;
}
COM: <s> outer class declaration </s>
|
funcom_train/17434219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doAction(String action) {
if (action.equals("next")) {
long i = source.getOffset();
source.setOffset(i + source.getLimit());
} else if (action.equals("prev")) {
long i = source.getOffset();
source.setOffset(i - source.getLimit());
} else {
// in this case action is in the format "offset=10;limit=10"
setInteractionState(action);
}
}
COM: <s> implement an action </s>
|
funcom_train/3123387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void callmeWhenDonePlaying(/*CardSound cardSound*/) {
if (DEBUG) { System.out.println("callwhenfinished done playing ... ");}
m_slink.setStopped();
// if this link is playing its audio as part of a balloon sequence
if (m_balloonCallingNode != null) {
m_balloonCallingNode.callWhenBalloonFinished();
m_balloonCallingNode = null;
}
}
COM: <s> goes down and then up when playing out the streams of audio </s>
|
funcom_train/12159366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testChildrenWithinContext() {
state.beforeStartElement();
state.contextMatched();
for (int i = 0; i < 10; i += 1) {
state.beforeStartElement();
assertTrue("Child matches", state.hasDirectRelationship());
state.afterEndElement();
}
}
COM: <s> test that child nodes are within context </s>
|
funcom_train/24242642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer update(JSONObject j) throws DBException {
Integer last_modified_id = -1;
// delete all associated groups
// update of user
LabelDB label = new LabelDB(conn);
label.record = this.label_record;
try {
last_modified_id = label.update();
}
finally {
label.release();
}
return last_modified_id;
}
COM: <s> manage the update transaction of a user and its groups associated </s>
|
funcom_train/26226784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitGraph(Node start, NodeVisitor nodeVisitor) {
Iterator it = nodes.iterator();
while (it.hasNext()) {
Node n = (Node) it.next();
n.setMarked(false);
}
visitNode(start, nodeVisitor);
it = nodes.iterator();
while (it.hasNext()) {
Node n = (Node) it.next();
if (!n.getMarked()) {
visitNode(n, nodeVisitor);
}
}
}
COM: <s> visit all the graph in depth first search </s>
|
funcom_train/5395741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testObject() throws Exception {
System.out.println("object");
String URI = "";
int algorithm = 0;
Object data = null;
FIParser.RegisteredTestHandler instance = new FIParser.RegisteredTestHandler();
instance.object(URI, algorithm, data);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of object method of class org </s>
|
funcom_train/8094119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double cumulativeCV(BayesNet bayesNet) throws Exception {
m_BayesNet = bayesNet;
double fAccuracy = 0.0;
double fWeight = 0.0;
Instances instances = bayesNet.m_Instances;
bayesNet.initCPTs();
for (int iInstance = 0; iInstance < instances.numInstances(); iInstance++) {
Instance instance = instances.instance(iInstance);
fAccuracy += accuracyIncrease(instance);
bayesNet.updateClassifier(instance);
fWeight += instance.weight();
}
return fAccuracy / fWeight;
} // LeaveOneOutCV
COM: <s> cumulative cv returns the accuracy calculated using cumulative </s>
|
funcom_train/46189489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTrackBackIpAddressNotOnWhitelistOrBlacklist() {
blog.getPluginProperties().setProperty(IpAddressListener.WHITELIST_KEY, "");
blog.getPluginProperties().setProperty(IpAddressListener.BLACKLIST_KEY, "");
listener.trackBackAdded(trackBackEvent);
assertTrue(trackBack.isPending());
assertEquals(0, trackBack.getSpamScore());
}
COM: <s> tests a track back from an ip address that isnt on the whitelist </s>
|
funcom_train/46056999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List findBookmarksByIdentity(Identity identity, String type) {
String query = "from org.olat.bookmark.BookmarkImpl as b where b.owner = ? and b.displayrestype = ?";
List found = DBFactory.getInstance().find(query, new Object[] { identity.getKey(), type }, new Type[] { Hibernate.LONG, Hibernate.STRING });
return found;
}
COM: <s> finds bookmarks of a specific type for an identity </s>
|
funcom_train/12646343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String paramString() {
return super.paramString() +
",val=" + value +
",vis=" + visibleAmount +
",min=" + minimum +
",max=" + maximum +
((orientation == VERTICAL) ? ",vert" : ",horz");
}
COM: <s> returns the parameter string representing the state of </s>
|
funcom_train/42157164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSlider getSliderStatus() {
if (sliderStatus == null) {
sliderStatus = new JSlider();
sliderStatus.setValue(0);
sliderStatus.setPreferredSize(new Dimension(50, 16));
sliderStatus
.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent e) {
isValid();
}
});
}
return sliderStatus;
}
COM: <s> this method initializes slider status </s>
|
funcom_train/47854557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() {
if (connection != null)
throw new RuntimeException("Already connected");
try {
logger.debug("Looking the class for driver "+driver);
Class.forName(driver);
} catch (ClassNotFoundException e) {
throw new RuntimeException("Unable to load JDBC driver",e);
}
try {
logger.debug("connecting to URL "+url);
connection = DriverManager.getConnection(url,user,pwd);
statement = connection.createStatement();
logger.debug("database connected.");
} catch (SQLException e) {
throw new RuntimeException("error while connecting to the database",e);
}
}
COM: <s> loads the relevant class for diver use </s>
|
funcom_train/12282422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PrivateKey getPrivateKey(String alias, char[] password) {
try {
checkKeyStore();
if (isKeyStoreExists() && !isKeyStoreEmpty()) {
return (PrivateKey) keyStore.getKey(alias, password);
}
} catch (Exception e) {
log.error("Could not get private key with alias " + alias + ".", e);
}
return null;
}
COM: <s> get a private key from this key store </s>
|
funcom_train/13393669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SpaceWorker createWorker(JavaSpace space) {
Dispatcher dispatcher = new Dispatcher(space);
dispatcher.setID(dispatchers.size());
dispatcher.setWatch(spaceWriteWatch);
Thread t = new Thread(dispatcher);
t.setDaemon(true);
t.start();
dispatchers.add(dispatcher);
return (new RenderResultsWorker(space));
}
COM: <s> the create worker method creates and returns a render result worker </s>
|
funcom_train/2883337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueuedFile pollNextFile() {
synchronized(filesToCopy) {
if(filesToCopy.isEmpty()) {
try {
filesToCopy.wait();
} catch (InterruptedException e) {
//interrupted? End the queue
return EndOfQueue.END_OF_QUEUE;
}
}
return filesToCopy.remove(0);
}
}
COM: <s> poll for the next file to copy </s>
|
funcom_train/33859991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getVariableRenamingTextField() {
if (variableRenamingTextField == null) {
variableRenamingTextField = new JTextField();
variableRenamingTextField.setBackground(new Color(255, 255, 102));
variableRenamingTextField.setHorizontalAlignment(JTextField.LEFT);
variableRenamingTextField.setFont(new Font("Serif", Font.BOLD, 14));
variableRenamingTextField.setEditable(true);
}
return variableRenamingTextField;
}
COM: <s> this method initializes variable renaming text field </s>
|
funcom_train/28423552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Field getField(Class someClass, String fieldName) throws NoSuchFieldException {
if (someClass == null) {
throw new NoSuchFieldException("Invalid field : " + fieldName);
}
try {
return someClass.getDeclaredField(fieldName);
}
catch (NoSuchFieldException e) {
return getField(someClass.getSuperclass(), fieldName);
}
}
COM: <s> get a field from a class </s>
|
funcom_train/32094010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkKrakenTypeOne(SudokuSet fins, int index, int candidate) {
for (int i = 0; i < fins.size(); i++) {
int tableIndex = fins.get(i) * 10 + candidate;
if (!onTable[tableIndex].offSets[candidate].contains(index)) {
return false;
}
}
return true;
}
COM: <s> search for kraken fish type 1 if a chain starting and ending with </s>
|
funcom_train/951180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean receivedResult(long contextID, ResultData result) {
int index = -1;
for (int i=0; i<contextIDs.size();i++) {
if(((Long)contextIDs.get(i)).intValue()==contextID) {
index = i;
break;
}
}
if (index==-1) return false;
DistributedElimination elim = (DistributedElimination) eliminations.get(index);
elim.setRemainingDocuments(result);
return true;
}
COM: <s> called by integration agent when receiving result from sub ia </s>
|
funcom_train/44131649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Message receiveNoWait(Destination d) throws JMSException {
Thread.currentThread().setContextClassLoader(contextClassLoader);
if (isReadOnly()) {
throw new JMSException("Hermes is in read-only mode");
}
final Message m = sessionManager.getConsumer(d).receiveNoWait();
if (m != null && isAudit()) {
getAuditLog().onRead(d, m);
}
return m;
}
COM: <s> receive a message if one is waiting otherwise returns null of no message </s>
|
funcom_train/25769122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getResourceAsString(ClassLoader cls, String name) {
try {
StringWriter out = new StringWriter(32767);
InputStream in = cls.getResourceAsStream(name);
if (in == null)
throw new RuntimeException(name + " cannot be found");
int curr = in.read();
while (curr > -1) {
out.write(curr);
curr = in.read();
}
in.close();
LOG.trace("Got " + name + ":\n" + out);
return out.toString();
} catch (Exception e) {
LOG.fatal(e);
throw new RuntimeException(e);
}
}
COM: <s> gets a resource from the class path using the provided class loader </s>
|
funcom_train/36106702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCompressioneCommand() {
if (compressioneCommand == null) {//GEN-END:|92-getter|0|92-preInit
// write pre-init user code here
compressioneCommand = new Command("Compressione", Command.SCREEN, 1);//GEN-LINE:|92-getter|1|92-postInit
// write post-init user code here
}//GEN-BEGIN:|92-getter|2|
return compressioneCommand;
}
COM: <s> returns an initiliazed instance of compressione command component </s>
|
funcom_train/4853950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getLabelSize(EdgeView view, String label) {
if (label != null && fontGraphics != null) {
fontGraphics.setFont(GraphConstants
.getFont(view.getAllAttributes()));
metrics = fontGraphics.getFontMetrics();
int sw = (int)(metrics.stringWidth(label) * LABELWIDTHBUFFER);
int sh = metrics.getHeight();
return new Dimension(sw, sh);
}
return null;
}
COM: <s> returns the label size of the specified view in the given graph </s>
|
funcom_train/16475700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeReference(BenchmarkElementReferenceDescription berd) {
if(berd == null) throw new IllegalArgumentException("Removing null reference");
Vector<BenchmarkElementReferenceDescription> target_list;
BenchmarkElement source_element = berd.getSourceElement();
target_list = getRefListFrom(source_element);
target_list.remove(berd);
target_list = getRefListTo(berd.getTargetId());
target_list.remove(berd);
// alert all parties interest in reference changes
MetaManager.getElementEventManager().fireReferenceChangedEvent(berd);
}
COM: <s> remove a reference from the manager </s>
|
funcom_train/18058274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int processArg(String arg, int n) {
int value;
try {
value = Integer.parseInt(arg);
} catch (NumberFormatException e) {
if (optErr)
System.err.println("processArg cannot process " + arg
+ " as an integer");
return n;
}
return value;
}
COM: <s> process an integer argument </s>
|
funcom_train/46152504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeServer(ServerSessionManager session) {
// Remove the server session. If we find a thread, then stop it and
// remove it from the map.
synchronized (avatarConfigServers) {
ServerSyncThread t = avatarConfigServers.remove(session);
if (t != null) {
t.setConnected(false);
}
}
}
COM: <s> removes the session from being managed </s>
|
funcom_train/24428766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintScreen() {
Graphics g;
try {
// get the panels graphics context
g = getGraphics();
if (g != null && mDBuffImage != null) {
g.drawImage(mDBuffImage, 0, 0, null);
}
// sync the display on some systems
Toolkit.getDefaultToolkit().sync();
g.dispose();
} catch (Exception e) {
System.out.println("Graphics context error: " + e);
}
}
COM: <s> actively render the buffer image to the screen </s>
|
funcom_train/44863040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void print() {
System.out.println();
System.out.println();
System.out.println("Time: " + time);
try {
resultwriter.write(filename, time);
trackwriter.write(time);
} catch (IOException ioe) {
ioe.printStackTrace();
return;
}
}
COM: <s> this method prints the requested state of the solution to a file the </s>
|
funcom_train/20269440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean eliminateParamsAfter(Node function, int argIndex) {
boolean paramRemoved = false;
Node formalArgPtr = function.getFirstChild().getNext().getFirstChild();
while (argIndex != 0 && formalArgPtr != null) {
formalArgPtr = formalArgPtr.getNext();
argIndex--;
}
return eliminateParamsAfter(function, formalArgPtr);
}
COM: <s> removes all formal parameters starting at arg index </s>
|
funcom_train/38352467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkCurrentSchedule(boolean showWarnings) {
for (Iterator iter = schedule.getAllModules().iterator(); iter.hasNext();) {
Module module = (Module)iter.next();
try {
checkModule(module, showWarnings);
// catch UnsupportedEnvironmentExceptions and all other
// exceptions that may occur due to an incomplete schedule, e.g.
// NullPointerExceptions if the fitness function has been
// removed.
} catch (Exception e) {
processIncompatibleModule(module);
// restart check
checkCurrentSchedule(showWarnings);
break;
}
}
}
COM: <s> checks the current schedule for incompatible modules and calls </s>
|
funcom_train/3481069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDeliveryMode(int deliveryMode) {
// Validate and initialize the delivery mode argument
if ((deliveryMode==PERSISTENT) ||
(deliveryMode==NON_PERSISTENT)) {
this.deliveryMode = deliveryMode;
} else {
throw new IllegalArgumentException(this.language.getText("ArgumentMustBe", "deliveryMode" ,"PERSISTENT or NON_PERSISTENT"));
}
}
COM: <s> sets the delivery mode to persistent or non persistent </s>
|
funcom_train/21456648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleKeyboardEquivalent(KeyEvent event) {
for (Action action : menuAndKeyActions) {
if (action == null) {
continue;
}
KeyStroke accelerator = (KeyStroke) action.getValue(Action.ACCELERATOR_KEY);
KeyStroke thisStroke = KeyStroke.getKeyStrokeForEvent(event);
if (thisStroke.equals(accelerator)) {
action.actionPerformed(null);
break;
}
}
}
COM: <s> on mac os we have the screen menu bar to take care of </s>
|
funcom_train/17604900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected InputStream findInputStream(String uri) throws IOException {
uri = URLDecoder.decode(uri, "UTF-8");
if (uri.startsWith("/")) {
uri = uri.substring(1);
}
return Thread.currentThread().getContextClassLoader().getResourceAsStream(uri);
}
COM: <s> look for a static resource in the classpath </s>
|
funcom_train/50228934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PooledConnection createNewConnection() throws SQLException {
PooledConnection conn = null;
if (driver != null) {
Connection underlying = driver.connect(connectionURL, props);
if (isolationLevel != null) {
underlying.setTransactionIsolation(isolationLevel.intValue());
}
conn = new PooledConnection(this, underlying);
connCount++;
}
return conn;
}
COM: <s> creats a new physical db connection and wraps it in our </s>
|
funcom_train/39380460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getLastRow() {
int numbRows = getRowList().size();
int lastRow = numbRows;
if (getPageSize() > 0) {
lastRow = getFirstRow() + getPageSize();
lastRow = Math.min(lastRow, numbRows);
}
return lastRow;
}
COM: <s> return the index of the last row to diplay </s>
|
funcom_train/21413259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getValue(String xpath, OMElement node) throws JaxenException {
AXIOMXPath path = new AXIOMXPath(xpath);
path.addNamespace("tns","http://www.sleepingbeauty.com/declarations");
Object result = path.selectSingleNode(node);
if (result instanceof OMAttribute) {
return ((OMAttribute)result).getAttributeValue();
} else if (result instanceof OMElement) {
return ((OMElement)result).getText();
} else {
return null;
}
}
COM: <s> return the result of an xpath expression </s>
|
funcom_train/22385787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse() throws IOException {
while(true) {
Line l = Calibrator.this.parse();
if(l.key.equals("EndAxis")) return;
if(l.key.equals("Minimum"))
min = l.i();
else if(l.key.equals("Center"))
ctr = l.i();
else if(l.key.equals("Maximum"))
max = l.i();
else if(l.key.equals("NullZone"))
nullZone = l.i();
else if(l.key.equals("Tolorance"))
tolerance = l.i();
else if(l.key.equals("IsHat"))
isHat = true;
else
throw new Error("Strange line");
}
}
COM: <s> parse a single axis field from the jscalibrator file </s>
|
funcom_train/43475404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prettyPrintNode() {
StringBuffer sb = new StringBuffer();
sb.append("________________________________________________");
sb.append("\nId [" + id + "] >> \n\n");
sb.append("\nRole> " + (role?BehavioursPatternImpl.ROLE_GOOD:BehavioursPatternImpl.ROLE_BAD));
sb.append("\nN> " + n);
sb.append("\n________________________________________________");
System.out.println(sb.toString());
}
COM: <s> shows a brief description of the internal routing state </s>
|
funcom_train/22189729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean updateSelection(IStructuredSelection selection) {
boolean bUpdated = super.updateSelection(selection);
if (bUpdated)
{
Iterator iter = getSelectedNonResources().iterator();
while (bUpdated && iter.hasNext())
{
if (!(iter.next () instanceof Module))
bUpdated = false;
}
}
return bUpdated;
}
COM: <s> the code open system editor action code implementation of this </s>
|
funcom_train/36030927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getHierarchyFile() throws IOException {
File f = new File(baseDirectory + File.separator + hierarchyFileName);
if (! f.isFile()) {
throw new IOException("Parameters file '" + f.getPath() + "'" +
" does not exist");
}
return f;
}
COM: <s> get the file instance representing the hierarchy file </s>
|
funcom_train/39534163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(){
//the menu bar
menubar=new EditorMenuBar(editor);
//the color manager
colorManager=new ColorManager(editor);
//the resource image manager
resourceImageManager=new ResourceImageManager(editor);
//gets the module's classes
parseXMLModules();
//creates the static modules
createModuleObjects();
//the popup menu manager
popupManager=new PopupManager(editor);
//the toolBar manager
toolBarManager=new ToolBarManager();
//initializes the menu bar
menubar.init();
}
COM: <s> initializes the object </s>
|
funcom_train/2539323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomFactor(float factor){
factor = 1/factor;
Vector3D dirToCamVect = camPos.getSubtracted(viewCenterPos);
dirToCamVect.scaleLocal(factor);
if (dirToCamVect.length() > zoomMinDistance){
Vector3D toCam = viewCenterPos.getAdded(dirToCamVect);
camPos.setXYZ(toCam.getX(), toCam.getY(), toCam.getZ());
this.dirty = true;
}
}
COM: <s> zooms from the camera to the eye location by the given factor </s>
|
funcom_train/46659993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(String driver, String url) throws DatabaseException {
try {
Class.forName(driver).newInstance();
connection = DriverManager.getConnection(url);
} catch (InstantiationException e) {
throw new DatabaseException(e);
} catch (IllegalAccessException e) {
throw new DatabaseException(e);
} catch (ClassNotFoundException e) {
throw new DatabaseException(e);
} catch (SQLException e) {
throw new DatabaseException(e);
}
}
COM: <s> open a connection to the database </s>
|
funcom_train/4174110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIntegerDigits(String column) throws SQLException {
if (index.containsKey(column)) {
return integerDigits[index.get(column).intValue()];
} else {
final SQLExceptionState state = SQLExceptionState.COLUMN_NOT_FOUND;
throw new SQLException("Column " + column + " does not exist in dataset.", state.name(), state.code());
}
}
COM: <s> returns the designated columns integer digits </s>
|
funcom_train/9279776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNullStringExecuteQueryStatement() throws SQLException {
String nullString = null;
try {
// test null String in execute query statement
Statement stmt = createStatement();
stmt.executeQuery(nullString);
fail("executeQuery(nullString) should have failed.");
} catch (SQLException e) {
assertSQLState("XJ067", e);
}
}
COM: <s> testing null string in execute query statement </s>
|
funcom_train/31457575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void performCMP() {
if ( !loadRegs() )
return;
long bit = 0;
if ( registers[reg[1]] == registers[reg[0]] )
bit = 1;
else if ( registers[reg[1]] < registers[reg[0]] )
bit = 2;
else
bit = 4;
registers[FLAG_REG] &= ~7;
registers[FLAG_REG] |= bit;
}
COM: <s> performs comparing of registers </s>
|
funcom_train/6352100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void recordEntries(boolean isInit, long sampleTime) {
if (_logTimePeriod <= 0) AssertUtils.throwShouldNeverHappen();
// tell client to generate entries
_recordEntries.clear();
// recordEntries(isInit, sampleTime, _recordEntries);
// record entries
for(JournalEntry<T> entry : _recordEntries) {
// _writer.addEntry(entry);
}
// update index times
_logTimePrev = sampleTime;
_logTimeNext = _logTimePrev + _logTimePeriod;
}
COM: <s> calls record entries with the sample time and records the returned </s>
|
funcom_train/41596799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JCheckBox getJAlleRepraesentationCheckBox() {
if (jAlleRepraesentationCheckBox == null) {
jAlleRepraesentationCheckBox = new JCheckBox();
jAlleRepraesentationCheckBox.setSelected(true);
jAlleRepraesentationCheckBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
updateJScrollPane();
}
});
}
return jAlleRepraesentationCheckBox;
}
COM: <s> this method initializes j alle repraesentation check box </s>
|
funcom_train/45422072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getElement(Document owner) {
Element meta = owner.createElement("ebss-meta");
for (Iterator<Map.Entry<String, String>> iter = this.properties
.entrySet().iterator(); iter.hasNext();) {
Map.Entry<String, String> entry = iter.next();
Element property = owner.createElement("property");
property.setAttribute("key", entry.getKey());
property.setAttribute("value", entry.getValue());
meta.appendChild(property);
}
return meta;
}
COM: <s> return the meta element as a dom element </s>
|
funcom_train/1561924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public GeoList TMeanEstimate(String label, GeoNumeric mean, GeoNumeric sd, GeoNumeric n, GeoNumeric level) {
AlgoTMeanEstimate algo = new AlgoTMeanEstimate(cons, label, mean, sd, n, level);
GeoList resultList = algo.getResult();
return resultList;
}
COM: <s> tmean estimate with sample statistics </s>
|
funcom_train/32084267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTabList (Control [] tabList) {
checkWidget ();
if (tabList == null) error (SWT.ERROR_NULL_ARGUMENT);
for (int i=0; i<tabList.length; i++) {
Control control = tabList [i];
if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.parent != this) error (SWT.ERROR_INVALID_PARENT);
}
this.tabList = tabList;
}
COM: <s> sets the tabbing order for the specified controls to </s>
|
funcom_train/25825953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void determineNewPositions() {
for (Physical object : getPhysicals()) {
double x = xPositions.get(object) + object.getVx() * stepDuration;
double y = yPositions.get(object) + object.getVy() * stepDuration;
xPositions.put(object, x);
yPositions.put(object, y);
}
}
COM: <s> determines the new position of all objects and agents </s>
|
funcom_train/23279346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLaunchResourceFile(LaunchResource lr, LaunchFile file){
if(!validateClass(lr)) throw new ARISException("Invalid Launch Resource");
updateFile(file);
lr = getLaunchResource(lr.getId());
lr.getFiles().add(file);
getHibernateTemplate().update(lr);
}
COM: <s> adds the launch file to the database and updates the launch resource </s>
|
funcom_train/46121603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String format(String dateStyle, String timeStyle, ReadableInstant date) {
final String ret;
if (date == null) {
ret = null;
} else {
final DateTimeFormatter formatter = getDateTimeStyle(dateStyle, timeStyle, Locale.getDefault(),
DateTimeZone.getDefault());
ret = formatter == null ? null : formatter.print(date);
}
return ret;
}
COM: <s> returns the specified date as a string formatted according to the </s>
|
funcom_train/50335589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deActivateLogix() {
if (_isActivated) {
// Logix is active, deactivate it and all listeners
_isActivated = false;
// remove listeners if there are any
for (int i=_listeners.size()-1; i>=0; i--) {
removeListener(_listeners.get(i));
}
}
}
COM: <s> deactivate the logix </s>
|
funcom_train/3461271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void guessPlatform() {
String os_name = System.getProperty("os.name");
if (os_name.startsWith(WindowsNT)) { // it Windows NT.
this.shell = WindowsNTShell.intern();
this.shellopt = WindowsNTShellOPT.intern();
} else if (os_name.startsWith(Windows95)) { // it Windows 95/98.
this.shell = Windows95Shell.intern();
this.shellopt = Windows95ShellOPT.intern();
} else { // non Windows NT is assumed to be Unix as default
this.shell = UnixShell.intern();
this.shellopt = UnixShellOPT.intern();
}
}
COM: <s> guesses the current platform and sets default shell and its option </s>
|
funcom_train/38418958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void replace(String name, String newName) {
for(int i=0; i<this.getComponentCount(); i++)
{
JPanel row = (JPanel)this.getComponent(i);
for(int j=0; j<row.getComponentCount(); j++)
{
Component co = row.getComponent(j);
if(co instanceof ParaEditor)
{
ParaEditor pe = (ParaEditor)co;
if(pe.getCurrentName().equals(name))
{
pe.setCurrentName(newName);
pe.setSelectedItem(newName);
}
}
}
}
}
COM: <s> replace an entity </s>
|
funcom_train/41163273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(AgStatusSequence entity) {
EntityManagerHelper.log("saving AgStatusSequence 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 ag status sequence entity </s>
|
funcom_train/14078487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshGUI() {
Application.getCiteBook().doPostLoad();
Application.getCiteBook().getCitationList().addQuantityChangeListener(
statusBar);
this.outlookBar.loadNewContents();
this.tablePanel.loadNewContents();
this.mainMenuBar.loadNewContents();
this.mainToolBar.loadNewContents();
this.statusBar.refreshQuantity();
this.setAppTitle();
}
COM: <s> reset the various gui objects that depend on newly loaded data or after </s>
|
funcom_train/3810771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addExtends(JavaQName pExtends) {
if (extendedClasses == null) {
extendedClasses = new ArrayList();
} else if ("class".equals(getType())) {
throw new IllegalStateException("Only interfaces may extend multiple classes.");
}
extendedClasses.add(pExtends);
}
COM: <s> p sets the class or interface extended by this class or interface </s>
|
funcom_train/1027955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerJMX() throws Exception {
org.apache.commons.modeler.Registry registry =
org.apache.commons.modeler.Registry.getRegistry(null, null);
String jmxObjectName = resources.getJMXObjectName();
registry.registerComponent(this, jmxObjectName, null);
getLog().info("Scheduler registered with local MBeanServer under name '" + jmxObjectName + "'");
}
COM: <s> register the scheduler in the local mbean server </s>
|
funcom_train/9297861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addGetOldValueCode() {
// Get the index of the variable. Mostly it will be 2.
oldValueVarIndex = newLocal(firstArgumentType);
String methodDesc = getGettterMethodDesc();
mv.visitVarInsn(ALOAD, 0);
visitMethodInsn(INVOKEVIRTUAL, getClassBindable().getClassName(),
getterMethod, methodDesc);
convertPrimitiveTypeToObjectTypeIfNeeded(firstArgumentType);
visitVarInsn(ASTORE, oldValueVarIndex);
}
COM: <s> inject the bytecode to store the old value of the property into a </s>
|
funcom_train/7660748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetWaitQueueLengthIAE() {
final ReentrantLock lock = new ReentrantLock();
final Condition c = (lock.newCondition());
final ReentrantLock lock2 = new ReentrantLock();
try {
lock2.getWaitQueueLength(c);
shouldThrow();
} catch (IllegalArgumentException success) {
} catch (Exception ex) {
unexpectedException();
}
}
COM: <s> get wait queue length throws iae if not owned </s>
|
funcom_train/3175814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean startsWith(TagPath prefix) {
// not if longer
if (prefix.len>len)
return false;
// check
for (int i=0;i<prefix.len;i++) {
if (!tags[i].equals(prefix.tags[i]) || qualifiers[i]!=prefix.qualifiers[i])
return false;
}
// yes
return true;
}
COM: <s> wether this path starts with prefix </s>
|
funcom_train/3613444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNewCVSDates() throws Exception {
this.mock.expectBuildFile("LICENSE", false, false);
this.mock.expectCurrentRevisionNumber("1.1");
this.mock.expectCurrentDate(createDate(2004, 07, 18, 17, 42, 25));
parseOneFile("newdate.log2");
this.mock.verify();
}
COM: <s> recent cvs versions have a different date format </s>
|
funcom_train/41621772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processBaseframe() throws IOException {
int pointer = -1;
int jointIndex = -1;
while(this.reader.nextToken() != '}') {
switch(this.reader.ttype) {
case '(':
while(this.reader.nextToken() != ')') {
this.baseframe.setTransform(jointIndex, pointer, (float)this.reader.nval);
pointer++;
}
break;
case StreamTokenizer.TT_EOL:
pointer = 0;
jointIndex++;
break;
}
}
COM: <s> process information to construct the base code frame code </s>
|
funcom_train/17621623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getBlockCr(Picture pic, PixelBuffer blk, Rect rect) {
getBlockChroma(pic.getCr(), pic.getWidth() >> 1, pic.getHeight() >> 1,
blk.getPred(), blk.getStart(), 1 << blk.getLogStride(), rect
.getX(), rect.getY(), rect.getWidth(), rect.getHeight());
}
COM: <s> get block of possibly interpolated cr pixels </s>
|
funcom_train/6347789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillRect(int x1, int y1, int x2, int y2) {
java.awt.Graphics graphics = screen.getGraphics();
graphics.fillRect(x1, y1, x2 - x1, y2 - y1);
} // fillRect(int x1, int y1, int x2, int y2)
COM: <s> fills a retangle </s>
|
funcom_train/51408227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addStick(int Xmark){
int position;
for (position=0;iStick[position]!=0;position++);
if (Xmark >= 0 && Xmark <= iXsize ){
iStick[position]=Xmark;
}
else {
if (Xmark < 0)
iStick[position]=0;
if (Xmark>iXsize)
iStick[position]=iXsize;
}
orderSticks();
}
COM: <s> create a new marker at a defined position </s>
|
funcom_train/33734399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUsername(String username) throws IllegalArgumentException {
if(username == null) {
log.error("The flickr accounts username cannot be null.");
throw new IllegalArgumentException("The flickr accounts username cannot be null.");
}
if(username.trim().length() == 0) {
log.error("The flickr accounts username cannot be empty.");
throw new IllegalArgumentException("The flickr accounts username cannot be empty.");
}
this.username = username;
}
COM: <s> setter of the accounts username </s>
|
funcom_train/3907722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addChildren() {
// Add <learner> elements from XML DOM
Iterator it = getElement().getChildren(LD_Core.LEARNER, getElement().getNamespace()).iterator();
while(it.hasNext()) {
Element child = (Element)it.next();
Learner learner = new Learner(getLD_DataModel(), child);
addChild(learner);
}
}
COM: <s> add child components </s>
|
funcom_train/43213603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigHash getHash() {
// flush
try {
gos.flush();
} catch (Exception e) {
}
try {
wos.flush();
} catch (Exception e) {
}
// return the hash
if (bh == null) {
bh = BigHash.createFromBytes(bhm.finish());
}
return bh;
}
COM: <s> p get the hash of the file output to the stream </s>
|
funcom_train/46570578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Float computeAlfa(List values) throws NoSuchElementException{
float result = 0f;
for (int i = 0; i < values.size(); i++) {
Float v = (Float) values.get(i);
result += v.floatValue();
}
return new Float(result / values.size());
}
COM: <s> computes the average of the values contained in the passed in list </s>
|
funcom_train/12838650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTableDataSourceName(java.lang.String tableDataSourceName) {
// We have a new tableDataSourceName, so we'll need a new
// dataSourceHelper instance too. Nullify the existing one.
// ...It's probably already null.
tableDataSourceHelper = null;
this.tableDataSourceName = tableDataSourceName;
}
COM: <s> setter for property table data source name </s>
|
funcom_train/13753475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void outputUncompressed(byte b, OutputStream res) throws IOException {
// Set the mask bit for us
nextMask += (1<<maskBitsSet);
// And add us to the buffer + dictionary
buffer[bufferLen] = fromInt(b);
bufferLen++;
dict[(posOut&4095)] = fromInt(b);
posOut++;
// If we're now at 8 codes, output
if(maskBitsSet == 8) {
output8Codes(res);
}
}
COM: <s> output the un compressed byte </s>
|
funcom_train/4529081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
for(; fsnamesystem.isRunning(); ) {
synchronized(fsnamesystem) {
checkLeases();
}
try {
Thread.sleep(2000);
} catch(InterruptedException ie) {
if (LOG.isDebugEnabled()) {
LOG.debug(name + " is interrupted", ie);
}
}
}
}
COM: <s> check leases periodically </s>
|
funcom_train/3273317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setPersonalDetails(float distanceTimesMassPerUnitPowerMax, float allowedPowerUsageMax){
this.distanceTimesMassPerUnitPowerMax = distanceTimesMassPerUnitPowerMax;
this.allowedPowerUsageMax = allowedPowerUsageMax;
this.distanceTimesMassPerUnitPower = distanceTimesMassPerUnitPowerMax;
this.allowedPowerUsage = allowedPowerUsageMax;
}
COM: <s> set the parameters specific to the game engine </s>
|
funcom_train/29711531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ISection getSectionClass() {
ISection section = null;
try {
Object secOrGroup = getConfigurationElement()
.createExecutableExtension(ATT_CLASS);
if (secOrGroup instanceof ISection) {
section = (ISection) secOrGroup;
} else if (secOrGroup instanceof AttributeGroup) {
section = new AttributeGroupSection((AttributeGroup) secOrGroup);
}
} catch (CoreException exception) {
handleSectionError(exception);
}
return section;
}
COM: <s> creates an instance of a section described by this descriptor </s>
|
funcom_train/12596838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setAccessibleObject(Class<?> clas) throws PropertyAccessException {
if (isAccessDirectly()) {
accessibleObject = getField(clas);
}
else {
accessibleObject = getMethod(clas);
}
if (accessibleObject == null) {
throw new PropertyAccessException(isAccessDirectly() ? "Field not found" : "Method not found",
getName(), null, false);
}
setAccessible(accessibleObject);
}
COM: <s> sets the accessible object for this accessor </s>
|
funcom_train/14307215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParent(MutableTreeNode newParent) {
if (canOpen()) {
if (newParent == null) {
VPTProject p = findProjectFor(this);
if (p != null) {
p.unregisterNodePath(this);
}
} else {
VPTProject p = findProjectFor((VPTNode)newParent);
if (p != null) {
p.registerNodePath(this);
}
}
}
super.setParent(newParent);
} //}}}
//{{{ +persistChildren() : boolean
COM: <s> sets the parent for the node </s>
|
funcom_train/10237979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addDefaultLights(){
lights.add(new AmbientLightInScene(bgLights, bounds)); // add an ambient light.
addDirectionaLight(new Vector3f(1f,1f,-1f)); // add first directional light
addDirectionaLight(new Vector3f(-1f,-1f,-1f)); // add second directional light
//addPointLight(new Point3f(5f,5f,5f)); // add a point light.
}
COM: <s> add default lights to the scene </s>
|
funcom_train/15931482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cancelQueuedWorkerTasks() {
final ReentrantLock lock = this.workerLock;
lock.lock();
try {
ForkJoinWorkerThread[] ws = workers;
for (int i = 0; i < ws.length; ++i) {
ForkJoinWorkerThread t = ws[i];
if (t != null)
t.cancelTasks();
}
} finally {
lock.unlock();
}
}
COM: <s> clean out worker queues </s>
|
funcom_train/17905239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize() {
if (buttonPanel == null) {
return new Dimension(splitPane.getWidth(), getHeight());
} else {
if (orientation == SwingConstants.CENTER) {
return new Dimension(getWidth(), buttonPanel.getHeight());
} else {
return new Dimension(buttonPanel.getWidth(), getHeight());
}
}
}
COM: <s> overrides here to return an appropriate size </s>
|
funcom_train/862805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean stop() {
_running = false;
Iterator it = _listeners.keySet().iterator();
while (it.hasNext()) {
String key = (String) it.next();
Listener l = (Listener) _listeners.get(key);
if (!stopListener(l)) {
_logger.severe("Failed to stop Listener-" + l.getKey());
_running = true;
}
}
if (_ui != null)
_ui.setEnabled(_running);
_status = "Stopped";
return !_running;
}
COM: <s> stops the listeners </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.