__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/8369250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getEditAccount() {
if (editAccount == null) {//GEN-END:|450-getter|0|450-preInit
// write pre-init user code here
editAccount = new Command("Bearbeiten", Command.ITEM, 2);//GEN-LINE:|450-getter|1|450-postInit
// write post-init user code here
}//GEN-BEGIN:|450-getter|2|
return editAccount;
}
COM: <s> returns an initiliazed instance of edit account component </s>
|
funcom_train/16677632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void rearrangeMenu(Profile profile, Robot robot) {
clear( );
if (profile != null) {
addPluginEntrys(robot);
addGeneralPluginEntrys( );
addReportEntrys(robot);
addGeneralReportEntrys( );
addExternalToolsEntrys(profile);
}
else {
addGeneralPluginEntrys( );
addGeneralReportEntrys( );
}
if (!Variables.NO_PROFILES_LOADED) {
menuBarItemPlugins.setEnabled(true);
menuBarItemReports.setEnabled(true);
menuBarItemExternalTools.setEnabled(true);
}
}
COM: <s> rearranges the menu for the given profile and robot </s>
|
funcom_train/51377456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getGroups() throws DBException {
String primeKey = getKey();
RowGroupPerms rowGroupPerms = new RowGroupPerms(getJDBCMetaData()
.getTargetTable(),
primeKey);
rowGroupPerms.setDataContext(getDataContext());
if (getLocalConnection() != null) {
rowGroupPerms.setConnection(getLocalConnection());
}
return rowGroupPerms.searchAndRetrieveList();
}
COM: <s> find any existing permission groups for this object </s>
|
funcom_train/51346936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void bind(IBindingSet bs, ISPO spo) {
if (p.isVar()) {
bs.set((IVariable) p,
new Constant<IV>(spo.p()));
}
if (o.isVar()) {
bs.set((IVariable) o,
new Constant<IV>(spo.o()));
}
}
COM: <s> use the supplied spo to create variable bindings for supplied </s>
|
funcom_train/16514676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
datatable = new Table(parent, SWT.BORDER);
datatable.setLinesVisible(true);
datatable.setHeaderVisible(true);
parent.setLayout(new FillLayout());
tableViewer = new TableViewer(datatable);
tableViewer.setLabelProvider(new SimRunTableLabelProvider());
}
COM: <s> creates the table viewer </s>
|
funcom_train/40222082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
life = null;
twin = null;
runState = false;
if (connectState) {
agent.close();
connectState = false;
if (socket != null) {
try {
socket.close();
} catch (Exception e) {
}
}
}
// too aggressive? HEINEMAN 3-16-2005
try {
if (socket != null) socket.close();
if (server != null) server.close();
} catch (IOException ioe) {
System.err.println ("SimpleServerConnection:" + ioe);
}
socket = null;
server = null;
agent = null;
}
COM: <s> cleanly shutdown connection </s>
|
funcom_train/10482118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void nextBuffer() throws IOException {
// give an eof check.
if (nextLine >= lines.size()) {
buffer = null;
} else {
try {
String next = (String) lines.get(nextLine++);
buffer = next.getBytes("US-ASCII");
} catch (UnsupportedEncodingException e) {
throw new IOException("Invalid string encoding");
}
}
offset = 0;
}
COM: <s> step to the next buffer of string data </s>
|
funcom_train/268334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean nullsAreSortedAtStart() throws java.sql.SQLException {
if (this.conn.getIO().versionMeetsMinimum(4, 0, 2)
&& !this.conn.getIO().versionMeetsMinimum(4, 0, 11)) {
return true;
} else {
return false;
}
}
COM: <s> are null values sorted at the start regardless of sort order </s>
|
funcom_train/7971187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ListExpression toASE() {
if (_aseform == null)
_aseform = new ListExpression(
StringExpression.makeString( "host" ), StringExpression
.makeString( _nodeid ), StringExpression
.makeString( _ip ), StringExpression
.makeString( Integer.toString( _port ) ) );
return _aseform;
}
COM: <s> return the sexpression representation of this host pointer </s>
|
funcom_train/21963909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasNext() {
try {
if (cache != null) {
return true;
} else {
int val = stream.read();
if (val == -1) {
return false;
} else {
cache = "" + (char)val;
return true;
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
COM: <s> returns whether there are any more characters in the underlying stream </s>
|
funcom_train/34627220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean binTest(String key) {
if (sortedReferences == null || sortedReferences.length == 0)
return false;
int s = Arrays.binarySearch(sortedReferences, new ReferenceEntry(key),
new Comparator<ReferenceEntry>() {
public int compare(ReferenceEntry o1, ReferenceEntry o2) {
return o1.key.compareTo(o2.key);
}
});
return (s >= 0);
}
COM: <s> tests using binary search if the given key exists in this container </s>
|
funcom_train/24470888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int mapString(Object obj) {
//System.out.println("mapping object");
if (obj == null)
return -1;
// lookup string in hashtable
int index = getIndex(obj);
// if string is not yet in the map, add it
if (index < 0) {
// new string -> insert
indexToSymbolMap.add(obj);
index = indexToSymbolMap.size() - 1;
symbolToIndexMap.put(obj, index);
}
return index;
}
COM: <s> returns the index for the nominal attribute value code str code </s>
|
funcom_train/37421230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildPane(){
pane = new JPanel();
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
contactsTable =
new JTable(ContactManager.getModel());
contactsTable.getTableHeader().setReorderingAllowed(false);
scrollPane = new JScrollPane(contactsTable);
pane.add(scrollPane);
JPanel buttomPanel = new JPanel();
setStatusBox.setEditable(true);
buttomPanel.add(setStatusBox);
startConversationButton =
new JButton(startConversationCommand);
buttomPanel.add(startConversationButton);
pane.add(buttomPanel);
}
COM: <s> sets up table and buttons </s>
|
funcom_train/28418849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateAirSensor(String[] capability) {
lblAirPollutionValue.setText(capability[2]);
/*TODO this sets the air pollution value to the value from the last sensor.
*This works if there is only one sensor, but is generally a bad idea.
*It should probably either have separate displays, or calculate an average of the values.
*/
}
COM: <s> updates the displayed air pollution level </s>
|
funcom_train/20239147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfUniquePeptidesGroups(){
int lCounter = 0;
for(int i = 0; i<iPeptideGroups.size(); i++){
if(!iPeptideGroups.get(i).isLinkedToMoreProteins()){
lCounter = lCounter + 1;
}
}
return lCounter;
}
COM: <s> this method will get the number of uniquely identified peptide groups </s>
|
funcom_train/41740326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkWorkday(LocalDate date, String exp) {
int weekday = date.getDayOfWeek();
if (exp.charAt(0) == '+') {
if (weekday == 0 || weekday == 6 || isHoliday(date))
return false;
} else if (exp.charAt(0) == '*') {
return true;
}
int monthWorkday = this.getWorkdayInMonth(date);
return matchesPattern(exp, monthWorkday);
}
COM: <s> checks if the date matches the workday requirement on the expression </s>
|
funcom_train/47023689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getStopCommand() {
if (stopCommand == null) {//GEN-END:|272-getter|0|272-preInit
// write pre-init user code here
stopCommand = new Command("Stop", Command.STOP, 0);//GEN-LINE:|272-getter|1|272-postInit
// write post-init user code here
}//GEN-BEGIN:|272-getter|2|
return stopCommand;
}
COM: <s> returns an initiliazed instance of stop command component </s>
|
funcom_train/12546977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPushTwoTransition(Transition transition) {
PDATransition trans = (PDATransition) transition;
String toPush = trans.getStringToPush();
if (toPush.length() != 2)
return false;
/*
* String input = trans.getInputToRead(); if(input.length() != 1) return
* false;
*/
String toPop = trans.getStringToPop();
if (toPop.length() != 1)
return false;
return true;
}
COM: <s> returns true if code transition code reads a single character from </s>
|
funcom_train/25528339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double minValue() {
Iterator iIter = asTreeMap().values().iterator();
Double dMin = Double.POSITIVE_INFINITY;
while (iIter.hasNext()) {
Double dVal = (Double)iIter.next();
dMin = (dVal < dMin) ? dVal : dMin;
}
return dMin;
}
COM: <s> looks up the minimum value appearing in the distribution </s>
|
funcom_train/15831272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
ProcessingInstruction pi = (ProcessingInstruction) super.clone();
// target and rawdata are immutable and references copied by
// Object.clone()
// Create a new Map object for the clone (since Map isn't Cloneable)
if (m_mapData != null) {
pi.m_mapData = parseData(m_rawData);
}
return pi;
}
COM: <s> this will return a clone of this code processing instruction code </s>
|
funcom_train/3834382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Format getSelectedMapFormat() {
Format[] mss = getOfferedMapFormats();
Format ms = mss[0];
for (int i = 0; i < mss.length; i++) {
if ( mss[i].isSelected() ) {
ms = mss[i];
break;
}
}
return ms;
}
COM: <s> returns the map format that is marked as selected </s>
|
funcom_train/37829672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendGroupMessage(String name, String text) {
StendhalRPRuleProcessor ruleProcessor = SingletonRepository.getRuleProcessor();
for (String playerName : membersAndLastSeen.keySet()) {
Player player = ruleProcessor.getPlayer(playerName);
if (player != null) {
player.sendPrivateText(NotificationType.GROUP, name + ": " + text);
}
}
}
COM: <s> sends a group chat message to all members </s>
|
funcom_train/46110086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if (createdStream != null) {
try {
createdStream.close();
// help free up resources
createdStream = null;
} catch (IOException e) {
LOGGER.log(Level.WARNING,
"Error closing the stream created by RawDocument.", e);
}
}
if (reader != null) {
try {
reader.close();
// help free up resources
reader = null;
} catch (IOException e) {
LOGGER.log(Level.WARNING,
"Error closing the reader created by RawDocument.", e);
}
}
}
COM: <s> close the underlying stream of this raw document </s>
|
funcom_train/25788119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void attachAllRestlets(ListableBeanFactory beanFactory) {
for (String beanName : getBeanNamesByType(Restlet.class, beanFactory)) {
String uri = resolveUri(beanName, beanFactory);
if (uri != null)
attachRestlet(uri, beanName, beanFactory);
}
}
COM: <s> attaches all the restlet instances </s>
|
funcom_train/26534172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object call(List arguments, ExpressionContext context) {
SimpleData item = getArg(arguments, 0);
List args = collapseLists(arguments, 1);
for (int i = 0; i < args.size(); i++) {
if (eq(item, asSimpleData(args.get(i))))
return new ImmutableDoubleData(i, false, true);
}
return NOT_FOUND;
}
COM: <s> perform a procedure call </s>
|
funcom_train/3273866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startView() {
// Get the number of milliseconds to wait between each GameEngine update
message = "Configuring engine";
long delay = Timing.MILLIS_PER_SECOND/GameHandler.ENGINE_UPS;
progress++;
// Start the timer task that updates the GameEngine
message = "Starting timer";
timer = new NanoTimer(handler.new EngineUpdateTask(), delay);
progress++;
timer.start();
progress++;
// Thread renderThread = new Thread(new RenderThread());
// renderThread.start();
// Start rendering the View
done = true;
RenderThread render = new RenderThread();
render.run();
}
COM: <s> start drawing running and updating the world and </s>
|
funcom_train/26315467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTurnSkippable() {
GameTurn turn = game.getTurn();
if (null == turn) {
return false;
}
Player player = getPlayer(turn.getPlayerNum());
return (null == player) || player.isGhost() || (game.getFirstEntity() == null);
}
COM: <s> returns true if the current turn may be skipped </s>
|
funcom_train/5575721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getUntil( char ch )
{ String s = "";
try
{ while ( true )
{ int nextch = this.in.read();
if ( nextch == -1 || (char) nextch == ch )
return s;
else
s += (char) nextch;
}
}
catch( IOException e )
{ return s;
}
}
COM: <s> read from the url until a specific character is reached </s>
|
funcom_train/966242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point translatePointToTabPanel(int srcx, int srcy, Point dest) {
Point vpp = tabScroller.viewport.getLocation();
Point viewp = tabScroller.viewport.getViewPosition();
dest.x = srcx - vpp.x + viewp.x;
dest.y = srcy - vpp.y + viewp.y;
return dest;
}
COM: <s> returns a point which is translated from the specified point in the </s>
|
funcom_train/32316189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDescriptionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EquivalentClass_description_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EquivalentClass_description_feature", "_UI_EquivalentClass_type"),
OdmPackage.Literals.EQUIVALENT_CLASS__DESCRIPTION,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the description feature </s>
|
funcom_train/32198182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object invokeOperationOnMBean(ObjectName nodeAgent, MBeanServer server) throws DiagnoseException {
Object result = null;
try {
result = server.invoke(nodeAgent, this.getOperation(), null, null);
} catch (Exception e1) {
throw new DiagnoseException("Unable to invoke operation [" + this.getOperation() + "] on ["+nodeAgent+"]", e1);
}
return result;
}
COM: <s> invoke the method on the mbean using the mbean server </s>
|
funcom_train/13848590 | /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 (obj == this) {
return true;
} else if (!(obj instanceof ListenEndpointImpl)) {
return false;
}
ListenEndpointImpl ole = (ListenEndpointImpl) obj;
KerberosServerEndpoint ose = ole.getServerEndpoint();
return serverSubject == ose.serverSubject &&
serverPrincipal.equals(ose.serverPrincipal) &&
port == ose.port &&
Util.sameClassAndEquals(ssf, ose.ssf);
}
COM: <s> two instances of this class are equal if they are instances </s>
|
funcom_train/50095318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertEquals(Point2d p1, Point2d p2, double error) {
Assert.assertNotNull("The expected Point2d is null", p1);
Assert.assertNotNull("The tested Point2d is null", p2);
Assert.assertEquals(p1.x, p2.x, error);
Assert.assertEquals(p1.y, p2.y, error);
}
COM: <s> compares two point2d objects and asserts that the xy coordinates </s>
|
funcom_train/41608021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateInitFileUploadNew(){
String fileUploadModify = "";
StringBuffer tmp = new StringBuffer();
tmp.append("fileDataModify = new Hashtable<String, byte[]>();\n");
if(numFileUpload!= 0){
for (int i = 1; i <= numFileUpload; i++) {
//reset file name to ""
tmp = tmp.append("fileName"+i +" = \"\";\n");
}
fileUploadModify = tmp.toString();
}
return fileUploadModify;
}
COM: <s> generate init file upload data in init new method </s>
|
funcom_train/1710557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectBookmark() {
/** code to walk not fully operational so only runs on example
traverse();
try{
System.out.println(defaultPageLookup[this.currentPage-1]);
ignoreAlteredBookmark=true;
tree.setSelectionPath(new TreePath(defaultPageLookup[this.currentPage]));
ignoreAlteredBookmark=false;
System.out.println(tree.getSelectionPath()+" "+currentPage+" "+defaultPageLookup[this.currentPage-1]);
}catch(Exception e){
e.printStackTrace();
System.exit(1);
}/***/
}
COM: <s> handles the functionality for highlighting the correct bookmark </s>
|
funcom_train/41385595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getJcbProveedor() {
if (jcbProveedor == null) {
jcbProveedor = new JCheckBox();
jcbProveedor.setBounds(new Rectangle(30, 15, 20, 20));
jcbProveedor.setSelected(true);
jcbProveedor.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
selectAnyOne(jcbProveedor, jcbFechas, jcbCarrera, jcbRevista);
}
});
}
return jcbProveedor;
}
COM: <s> this method initializes jcb proveedor </s>
|
funcom_train/3394041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendLong(long x) {
ByteArrayOutputStream buffer = new ByteArrayOutputStream(8);
DataOutputStream bufout = new DataOutputStream(buffer);
try {
bufout.writeLong(x);
appendBytes(buffer.toByteArray(), 0, 8);
} catch (IOException e) {
throw new AssertionError("write");
}
}
COM: <s> append a long as an eight byte number </s>
|
funcom_train/11754886 | /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("ParameterInfo[");
sb.append("name=");
sb.append(name);
sb.append(", description=");
sb.append(description);
sb.append(", type=");
sb.append(type);
sb.append("]");
return (sb.toString());
}
COM: <s> return a string representation of this parameter descriptor </s>
|
funcom_train/23704165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addChartPanel(final String waitClass){
this.mainPanel.removeAll();
JPanel panel = createProgressBar("Loading, please wait...");
this.mainPanel.add(panel);
this.validate();
Thread t = new Thread() {
@Override
public void run()
{
// delay
try
{
Thread.sleep(50L);
}
catch(InterruptedException e) {
e.printStackTrace();
}
addChartPanelT(waitClass);
}
};
t.start();
}
COM: <s> add chart panel to main panel </s>
|
funcom_train/3359746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element getElement(String elementName, boolean mustAppear) {
if (mustAppear && (elementName == null)) {
throw new IllegalArgumentException("element name is null!");
}
Element element = (Element)elementMap.get(elementName);
if (mustAppear && (element == null)) {
throw new IllegalArgumentException("No such element: " +
elementName);
}
return element;
}
COM: <s> utility method for locating an element </s>
|
funcom_train/28365648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isMatch( final byte[] pattern, final int offset, final int start ) {
// if the offset equals pattern length then we have successfully matched every byte
// if the byte in pattern matches the corresponding byte in _data then check the next byte and so forth
return offset == pattern.length ? true : ( (pattern[offset] == _data[start]) ? isMatch( pattern, offset+1, start+1 ) : false );
}
COM: <s> determine if the pattern matches the specified range of bytes in this blob </s>
|
funcom_train/34520031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeTargeter(InstructionTargeter tar){
if (tar==null)
return;
for (int i=0;i<targeters.size();i++){
if (targeters.get(i)==tar){
targeters.removeElementAt(i);
// must remove before calling tar.updateTarget
tar.updateTarget(this, null);
break;
}
}
}
COM: <s> removes the given instruction targeter from this handle compares by reference </s>
|
funcom_train/42901957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decodeBlock(int channels, byte[] inBuffer, int[] outBuffer, int length) {
for (int ch = 0; ch < channels; ch++) {
decode(ch, channels, inBuffer, outBuffer, ch, length, channels);
}
}
COM: <s> outputs interleaved samples into one output buffer </s>
|
funcom_train/3362053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBytes(int parameterIndex, byte x[]) throws SQLException {
checkParamIndex(parameterIndex);
if(params == null){
throw new SQLException("Set initParams() before setBytes");
}
params.put(new Integer(parameterIndex - 1), x);
}
COM: <s> sets the designated parameter to the given array of bytes </s>
|
funcom_train/9924742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void disassembleOperand(OpcodeDesc op, int randIndex)
{ OperandDesc am = findOperand(op, randIndex);
if (am != noShowRand)
{ if (am == null) line.append("???");
else expandSyntax(am, am.syntax, BigInteger.ZERO, false);
line.append(',');
}
OperandSet ams = op.operandSets[randIndex];
if (ams.followingPseudoOps != null) //Op followed by certain pseudo-ops
decoderQueue.add(new Decoder(ams.followingPseudoOps, operand.getContext()));
}
COM: <s> process one instruction operand by reconstructing its assembly language syntax </s>
|
funcom_train/18382841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final Error error) {
List<Error> errorsForKey = get(error.getKey());
if (errorsForKey == null) {
errorsForKey = new ArrayList<Error>();
}
errorsForKey.add(error);
this.errors.put(error.getKey(), errorsForKey);
this.count++;
}
COM: <s> add an error object to the collection </s>
|
funcom_train/22579418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DeviceInterface getInterface(long devID, int ifIndex) {
String sqlString = null;
// Create the SQL statement string to retrieve a DeviceInterface record.
sqlString = new String ("SELECT * FROM " + I_TBL_NAME
+ " WHERE deviceID=" + devID + " AND ifIndex=" + ifIndex);
System.out.println("\nDbDeviceInterface.getInterface:\n sqlString = "+sqlString);
return getRecord(sqlString);
}
COM: <s> retrieve a single device interface from the database </s>
|
funcom_train/4375299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRequestHeader(Header header) {
Header[] headers = getRequestHeaderGroup().getHeaders(header.getName());
for (int i = 0; i < headers.length; i++) {
getRequestHeaderGroup().removeHeader(headers[i]);
}
getRequestHeaderGroup().addHeader(header);
}
COM: <s> sets the specified request header overwriting any previous value </s>
|
funcom_train/16533794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getJListSites(), BorderLayout.NORTH);
jContentPane.add(getJListArticles(), BorderLayout.WEST);
jContentPane.add(getJTextAreaContents(), BorderLayout.CENTER);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/33291365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o){
Link l=(Link)o;
return ((this.type == l.type) &&
(l.source==this.source && l.destination==this.destination) ||
(this.type==Type.UNDIRECTED && (l.source==this.destination && l.destination==this.source)));
}
COM: <s> compares the specified object with this link for equality </s>
|
funcom_train/15727592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JsonEncoding getJsonEncoding(MediaType contentType) {
if (contentType != null && contentType.getCharSet() != null) {
Charset charset = contentType.getCharSet();
for (JsonEncoding encoding : JsonEncoding.values()) {
if (charset.name().equals(encoding.getJavaName())) {
return encoding;
}
}
}
return JsonEncoding.UTF8;
}
COM: <s> determine the json encoding to use for the given content type </s>
|
funcom_train/42766749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() {
File path = eclipseProject.getLocation().toFile();
File graphFile = new File(path, GRAPH_FILE_NAME);
try {
// stores the sclgraph to the default file
GraphIO.saveGraphToFile(graphFile.toString(), graph, null);
} catch (GraphIOException ex) {
Activator.log("Error during saving graph: " + ex.getMessage(),
Status.ERROR);
}
}
COM: <s> saves the scproject i </s>
|
funcom_train/12195971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printFile(String description, File file) {
if (logger.isDebugEnabled()) {
logger.debug(description + ":" + file + ", " +
"Exists:" + file.exists() + ", " +
"Length:" + file.length() + ", " +
"Last Modified: " + new Date(file.lastModified()));
}
}
COM: <s> debugging method to print out the metadata associated with a file </s>
|
funcom_train/1573679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String valueStringRepresentation() {
if (this.value == null)
return "null";
if (this.value instanceof Number)
return this.value.toString();
if (this.value instanceof Boolean)
return ((Boolean)this.value).booleanValue() ? "true" : "false";
return "\"" + this.value.toString() + "\"";
}
COM: <s> returns the string representation of the actions value </s>
|
funcom_train/8967919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rebuildMarkers(){
clearMarkers();
// read errors from model
Collection<ModelProblem> problems = getOwner().getProblems();
for(ModelProblem problem : problems){
int severity = 0;
switch(problem.getSeverity()){
case ERROR : severity = IMarker.SEVERITY_ERROR; break;
case WARNING: severity = IMarker.SEVERITY_WARNING; break;
}
addProblemMarker(problem.getMsg(),problem.getLocation(),IMarker.PRIORITY_NORMAL,severity);
}
}
COM: <s> rebuild markers remove old problems and ask the owner to give current problems </s>
|
funcom_train/13537122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String generateChildren(Menu menu, int index) {
StringBuffer sb = new StringBuffer();
Collection children = menu.getChildren();
if (!children.isEmpty()) {
sb.append(getTabs(index));
sb.append("<ul>\n");
Iterator iterator = children.iterator();
while (iterator.hasNext()) {
Menu child = (Menu) iterator.next();
sb.append(generateMenuItem(child, index));
}
sb.append(getTabs(index));
sb.append("</ul>\n");
}
return sb.toString();
}
COM: <s> this method generates the children of a menu of the form tt </s>
|
funcom_train/4528832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doMerge(CheckpointSignature sig) throws IOException {
getEditLog().open();
StorageDirectory sd = getStorageDir(0);
loadFSImage(FSImage.getImageFile(sd, NameNodeFile.IMAGE));
loadFSEdits(sd);
sig.validateStorageInfo(this);
saveFSImage();
}
COM: <s> merge image and edits and verify consistency with the signature </s>
|
funcom_train/41304740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected VisualPiece getNewPiece() {
VisualPiece piece = new VisualPiece();
piece.setLocation(this.getWidth()/2, this.getHeight()/2);
piece.setMinimumSize(new Dimension(30,30));
piece.setSize(new Dimension(30, 30));
piece.setPreferredSize(new Dimension(30, 30));
piece.setLocation(new Point(149, 99));
return piece;
}
COM: <s> this method initializes piece </s>
|
funcom_train/33791967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void purgeDb(LocalDate currentdate) {
LocalDate old = currentdate.minusDays(duration.getValue());
Enumeration<Vector<Record>> e = recorddatabase.elements();
while (e.hasMoreElements()) {
Vector<Record> records = e.nextElement();
int size = records.size();
int i = 0;
while (i < size && records.get(i).date.isBefore(old)) {
i++;
}
for (int j = 0; j < i; j++) {
records.remove(0);
dbsize--;
}
}
}
COM: <s> delete all records that are older than maximum duration </s>
|
funcom_train/6225000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TreeNode getTree(String tree[])
{
Hashtable table=new Hashtable();
TreeNode root=null;
for(int i=0; i<tree.length; i+=2)
{
if(tree[i].equals("Root"))
{
root=new DefaultMutableTreeNode(tree[i+1]);
table.put(tree[i+1], root);
}
else
{
DefaultMutableTreeNode node=new DefaultMutableTreeNode(tree[i+1]);
DefaultMutableTreeNode parent=(DefaultMutableTreeNode)table.get(tree[i]);
if(parent!=null)
parent.add(node);
table.put(tree[i+1], node);
}
}
return root;
}
COM: <s> creates a tree of tree nodes from the specified string array </s>
|
funcom_train/50515318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unregisterWebService(String webService) throws InfrastructureException {
synchronized (AgentDatabase.instance()) {
try {
String organization = AgentDatabase.instance().selectOrganization(webService);
if (organization != null) {
UDDIRegistrator registrator = new UDDIRegistrator();
registrator.removeService(webService, organization);
AgentDatabase.instance().deleteOrganization(webService);
}
} catch (Exception e) {
throw new InfrastructureException(e);
}
}
logger.info("Web service " + webService + " unregistered from UDDI.");
}
COM: <s> unregister a web service from uddi registry </s>
|
funcom_train/32185884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName(String name) {
String oldName = getName();
name = name == null ? "" : name;
GridBox gb = (GridBox) getParent();
super.setName(name);
if (gb != null) gb.firePropertyChange(this, PROPERTY_COLUMN_NAME, oldName, name);
}
COM: <s> sets the name of the column </s>
|
funcom_train/20898473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
StringBuffer sbuf = new StringBuffer();
sbuf.append("entryID=").append(entryID).append(" entryName=").append(entryName)
.append(" keywords=").append(keywords).append("\n");
return sbuf.toString();
}
COM: <s> method to return string format of this object </s>
|
funcom_train/13778194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeHeader(String header, ICellStyle style) {
if (region == null) {
throw new IllegalStateException("beginTable() has to be called");
}
writeCell(0, currentRow++, width, 1, header, style);
}
COM: <s> writes table header </s>
|
funcom_train/983491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void glutSolidSphere (double radius, int slices, int stacks) {
QUAD_OBJ_INIT();
JavaGLU.gluQuadricDrawStyle (quadObj, GLU.GLU_FILL);
JavaGLU.gluQuadricNormals (quadObj, GLU.GLU_SMOOTH);
/* If we ever changed/used the texture or orientation state
of quadObj, we'd need to change it to the defaults here
with gluQuadricTexture and/or gluQuadricOrientation. */
JavaGLU.gluSphere (quadObj, radius, slices, stacks);
}
COM: <s> void glut solid sphere gldouble radius glint slices glint stacks </s>
|
funcom_train/44865662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String snapshotExtendsFrom() throws XDocletException {
String modelExtendsFrom = getCurrentClassTag().getAttributeValue(MODEL_EXTENDS_PARAM);
String snapshotExtendsFrom = getCurrentClassTag().getAttributeValue(SNAPSHOT_EXTENDS_PARAM);
if (snapshotExtendsFrom != null) {
return snapshotExtendsFrom;
}
if (modelExtendsFrom != null) {
return snapshotName ();
}
return null;
}
COM: <s> returns the name of the snapshot this snapshot is extending if it is </s>
|
funcom_train/7495264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getStringForDay(int day) {
if(fDates == null) {
loadDates();
}
for(int i=0;i<fDates.length;i++) {
if(fDates[i].offset == day) {
return fDates[i].string;
}
}
return null;
}
COM: <s> get the string at a specific offset </s>
|
funcom_train/31804861 | /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 (obj == null) {
return false;
}
if (obj instanceof Lifetime) {
Lifetime lifetime = (Lifetime)obj;
final boolean l1 = isLimited();
final boolean l2 = lifetime.isLimited();
if (l1 && l2) {
return _limit.equals(lifetime.getLimit());
} else if (!l1 &&!l2) {
return true;
} else {
return false;
}
}
return false;
}
COM: <s> returns whether the lifetime equal to lifetime </s>
|
funcom_train/45922479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void adjustSize(int windowWidth, int windowHeight) {
int scrollWidth = windowWidth - table.getAbsoluteLeft() - 9;
if (scrollWidth < 1) {
scrollWidth = 1;
}
int scrollHeight = windowHeight - table.getAbsoluteTop() - 9;
if (scrollHeight < 1) {
scrollHeight = 1;
}
table.setSize("" + scrollWidth, "" + scrollHeight);
}
COM: <s> adjusts the widgets size such that it fits within the windows client </s>
|
funcom_train/18807957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDateConstructor2() {
final TimeZone zone = TimeZone.getTimeZone("Asia/Singapore");
final Minute m1 = new Minute(new Date(1016700899999L), zone);
final Minute m2 = new Minute(new Date(1016700900000L), zone);
assertEquals(54, m1.getMinute());
assertEquals(1016700899999L, m1.getLastMillisecond(zone));
assertEquals(55, m2.getMinute());
assertEquals(1016700900000L, m2.getFirstMillisecond(zone));
}
COM: <s> in singapore the 4 </s>
|
funcom_train/6298645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValid(int policyType) {
java.lang.Object hashResult = thePolicies.get(new Integer(policyType));
if (hashResult == null)
return false;
CacheEntry entry = (CacheEntry) hashResult;
if (System.currentTimeMillis() - entry.timestamp > Environment.LifetimeOfCacheEntry())
return false; // time passed since writing of timestamp greater than lifetime
else
return true; // lifetime of cache entry is not passed
} // isValid
COM: <s> checks whether the cache has a valid entry for a given policy type </s>
|
funcom_train/1477856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(java.awt.Graphics g) {
if (base==null) {
initArrow();
initGrid();
adjustArrow();
} else {
if (isGridDisplayed) {
g.setColor(colorGrid);
g.drawPolyline(xh,yh,nbPointsH);
}
g.setColor(arrowColor);
g.fillPolygon(base);
g.fillPolygon(pic);
}
}
COM: <s> display polygons that represents arrow form </s>
|
funcom_train/17134025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FieldInstruction prevFieldInstruction(String typeSignature) {
while(hasPrev()) {
Instruction i = prev();
if(i instanceof FieldInstruction && ((FieldInstruction)i).getType(theCPool).getSignature().equals(typeSignature))
return (FieldInstruction)i;
}
return null;
}
COM: <s> iterates until it finds the prev fieldinstruction which has the type signature </s>
|
funcom_train/29372367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getContentPanel() {
if (contentPanel == null) {
contentPanel = new JPanel();
contentPanel.setLayout(new BoxLayout(getContentPanel(), BoxLayout.Y_AXIS));
contentPanel.add(getDisplayPanel(), null);
contentPanel.add(getVectoringTPanel(), null);
contentPanel.add(getBrightPanel(), null);
}
return contentPanel;
}
COM: <s> this method initializes content panel </s>
|
funcom_train/3559741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAutomaticChecking(boolean value) {
try {
MediConfig.setAutomaticChecking(value);
XMLUtils.setValidating(factory, value);
XTable.setValidating(value);
}
catch (Exception e) {
System.out.println("[XProvider] " + e.getMessage());
}
}
COM: <s> controls the automatic additional checking in performing database </s>
|
funcom_train/44156607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeAll() {
if (m_desktop == null || m_desktop.getAllFrames() == null
|| m_desktop.getAllFrames().length < 1) {
return;
}
JInternalFrame[] frames = m_desktop.getAllFrames();
for (int i = 0; i < frames.length; i++) {
close_frame(frames[i]);
}
}
COM: <s> closes all frames that are closable </s>
|
funcom_train/9916928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Position (Position P)
{ S=P.S;
F=new Field[S][S];
int i,j;
for (i=0; i<S; i++)
for (j=0; j<S; j++)
{ F[i][j]=new Field();
}
for (i=0; i<S; i++)
for (j=0; j<S; j++)
{ color(i,j,P.color(i,j));
number(i,j,P.number(i,j));
marker(i,j,P.marker(i,j));
letter(i,j,P.letter(i,j));
if (P.haslabel(i,j)) setlabel(i,j,P.label(i,j));
}
color(P.color());
number(P.number());
}
COM: <s> initialize f with an empty board and set </s>
|
funcom_train/51782691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double truncateToParentWidth(double diffx, BooleanHolder success) {
double dx = diffx;
if (node.getParent() != null &&
node.getAbsoluteX2() + diffx > node.getParent().getAbsoluteX2()) {
dx -= (node.getAbsoluteX2() + diffx) - node.getParent().getAbsoluteX2();
success.setValue(true);
}
return dx;
}
COM: <s> truncates the specified diffx to the parents width to prevent that </s>
|
funcom_train/50034161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getMaleRegisteredUsersNumber() throws HibouTechnicalException {
Transaction tr = null;
Session session = null;
try {
session = HibernateUtil.openSession();
tr = session.beginTransaction();
Criteria criteria = session.createCriteria(User.class)
.add(Restrictions.eq("actived", true))
.add(Restrictions.eq("sex", "M"));
return criteria.list().size();
} catch (Exception e) {
if(tr != null) {
tr.rollback();
}
throw new HibouTechnicalException(e);
} finally {
session.close();
}
}
COM: <s> get the total number of male registered users </s>
|
funcom_train/27826662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Model createModel(String uri,NodeFactory nodeFactory) throws ModelException {
try {
new URL(uri);
}
catch (MalformedURLException e) {
return null;
}
if (nodeFactory==null)
nodeFactory=new NodeFactoryImpl();
Model model=new TransactionableModelImpl(nodeFactory);
model.setPhysicalURI(uri);
model.setLogicalURI(uri);
return model;
}
COM: <s> create an empty model </s>
|
funcom_train/32978969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveData()
{ /* saveData */
if(this.valueChangedFlag)
{
for(int i=0; i<nParams; i++)
{
cd.value[i]= nameTF[i].getText();
}
this.valueChangedFlag= false; /* since saved to cd.value */
}
return(true); /* success */
} /* saveData */
COM: <s> save data save value data from text fields to cd </s>
|
funcom_train/9978539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deletePackage(Element pack) {
pContext.getProject().fireChangeEvent(ProjectChangeListener.EventType.PluginSettingsWillChange, Struts2Tools.pluginID);
pack.getParentNode().removeChild(pack);
pContext.getProject().fireChangeEvent(ProjectChangeListener.EventType.PluginSettingsChanged, Struts2Tools.pluginID);
}
COM: <s> deletes a package </s>
|
funcom_train/8662976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object trapFieldRead(String name) {
Class jc = getJavaClass();
try {
return jc.getField(name).get(null);
}
catch (NoSuchFieldException e) {
throw new RuntimeException(e.toString());
}
catch (IllegalAccessException e) {
throw new RuntimeException(e.toString());
}
}
COM: <s> is invoked when code static code fields of the base level </s>
|
funcom_train/18753253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean confirmOverwriteGrammar(File grammarFile) {
if (grammarFile.exists()) {
int response = JOptionPane.showConfirmDialog(getFrame(), "Overwrite existing grammar?", null, JOptionPane.OK_CANCEL_OPTION);
return response == JOptionPane.OK_OPTION;
} else {
return true;
}
}
COM: <s> asks whether a given existing file should be overwritten by a new grammar </s>
|
funcom_train/50222127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map createCommandTable() {
Map cmds = new HashMap();
Action[] actions = getActions();
for (int i = 0; i < actions.length; i++) {
Action a = actions[i];
cmds.put(a.getValue(Action.NAME), a);
}
return cmds;
}
COM: <s> go through my hierarchy and establish a command table for the current menus </s>
|
funcom_train/41266353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Mngclase entity) {
EntityManagerHelper.log("deleting Mngclase instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Mngclase.class,
entity.getClacodigo());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent mngclase entity </s>
|
funcom_train/25231003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void copyAddress( int[] l_from, int[] l_to ) {
// Get the minimum size of the two addresses.
int minLength = l_from.length;
if ( l_to.length < l_from.length ) {
minLength = l_to.length;
}
System.arraycopy(l_from, 0, l_to, 0, minLength);
}
COM: <s> copies one address to another </s>
|
funcom_train/1280467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(byte[] buffer) {
try {
mmOutStream.write(buffer);
// Share the sent message back to the UI Activity
mHandler.obtainMessage(BluetoothChat.MESSAGE_WRITE, -1, -1, buffer)
.sendToTarget();
} catch (IOException e) {
Log.e(TAG, "Exception during write", e);
}
}
COM: <s> write to the connected out stream </s>
|
funcom_train/22498512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(final ChangeEvent e) {
if (!ignoreChangeEvents) {
final Object source = e.getSource();
if (source.equals(imgWidth.getValueSelector())) {
applyPreviewWidth();
}
else if (source.equals(imgHeight.getValueSelector())) {
applyPreviewHeight();
}
}
}
COM: <s> listener for change events </s>
|
funcom_train/44011605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetQuantity() {
System.out.println("getQuantity");
RevenueSourceBO instance = new RevenueSourceBO();
int expResult = 0;
int result = instance.getQuantity();
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 quantity method of class edu </s>
|
funcom_train/2293040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEditorHandler(I_CmsEditorHandler clazz) {
m_editorHandler = clazz;
if (CmsLog.INIT.isInfoEnabled()) {
CmsLog.INIT.info(Messages.get().getBundle().key(
Messages.INIT_EDITOR_HANDLER_CLASS_1,
m_editorHandler.getClass().getName()));
}
}
COM: <s> sets the editor handler class </s>
|
funcom_train/14080260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTriggerDateTime() throws ValidationException {
Trigger trigger = new Trigger(new DateTime(new Date()));
assertNull(trigger.getDuration());
assertNotNull(trigger.getDate());
assertNotNull(trigger.getDateTime());
trigger.validate();
trigger.getParameters().add(Value.DURATION);
assertValidationException(trigger);
}
COM: <s> unit test on a date time trigger </s>
|
funcom_train/212421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toXML(String fileName) throws Exception {
try {
// Create a File to marshal to
File xmlFile = new File(fileName);
// Marshal the task graph object
TaskGraphMarshaller.marshal(this.taskgraph, xmlFile);
} catch (Exception e) {
logger.error("Cannot checkpoint the GCM", e);
throw new Exception("Cannot checkpoint the GCM ", e);
}
}
COM: <s> save the state of gcm into an xml file </s>
|
funcom_train/50834887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFocused() {
reference.setToolTipText(tooltip);
reference.requestFocus();
ActionMap actions = reference.getActionMap();
ActionEvent ae =
new ActionEvent(reference, ActionEvent.ACTION_PERFORMED, "bla");
Action a = actions.get("postTip");
if (a != null) {
a.actionPerformed(ae);
}
}
COM: <s> set focus on reference and show tooltip </s>
|
funcom_train/3813679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dumpGDL(String title, String fileName) {
try {
System.err.println("Dumping " + title + " to " + fileName);
FileWriter f = new FileWriter(fileName);
f.write(dumpGDL(title));
f.close();
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
COM: <s> dumps the gdl output of the search space to the given file </s>
|
funcom_train/12562346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void startSuite() throws Exception {
if (suiteId == -1 && midletClassName.equals("internal")) {
// no class name, need to look for it in the JAD file
midletClassName =
((InternalMIDletSuiteImpl)midletSuite).getMIDletClassName();
}
midletStateHandler.startSuite(
this, midletSuite, externalAppId, midletClassName);
}
COM: <s> start midlet suite in the prepared environment </s>
|
funcom_train/7335998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InfoBean getSelectedContainer() {
InfoBean container = null;
if ((infoaccess == null) || containerId.equals(ContainerId.NONE) || containerId.equals(ContainerId.NEW)) {
container = null;
} else {
try {
container = infoaccess.get(TableContainers.TBL_NAME, containerId, true);
} catch (Exception e) {
container = null;
}
}
return container;
}
COM: <s> get current container </s>
|
funcom_train/49608670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteGuestPathologies(String username,EntityManager em,List<GuestPathology> vos) throws Throwable {
try {
for(GuestPathology vo: vos) {
vo.setDeleted(Consts.FLAG_Y);
JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo);
}
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
}
COM: <s> delete logically a guest pathology </s>
|
funcom_train/778920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String toFullUrl(HttpServletRequest request, String url) {
StringBuffer buff = new StringBuffer();
buff.append(request.getScheme()).append("://").append(
request.getServerName());
if (request.getServerPort() != 80) {
buff.append(":").append(request.getServerPort());
}
buff.append(request.getContextPath()).append(url);
return buff.toString();
}
COM: <s> compute full local url from an url starting with </s>
|
funcom_train/20926804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel12() {
if (jPanel12 == null) {
jPanel12 = new JPanel();
jPanel12.setLayout(new BoxLayout(getJPanel12(), BoxLayout.X_AXIS));
jPanel12.setComponentOrientation(java.awt.ComponentOrientation.LEFT_TO_RIGHT);
jPanel12.add(getBrowseTraceFileButton(), null);
jPanel12.add(getTraceFileNameField(), null);
}
return jPanel12;
}
COM: <s> this method initializes j panel12 </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.