__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/5262930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel6() {
if (jPanel6 == null) {
jPanel6 = new JPanel();
jPanel6.setLayout(new BoxLayout(getJPanel6(), BoxLayout.Y_AXIS));
jPanel6.add(getJButton6(), null);
jPanel6.add(getJButton7(), null);
jPanel6.add(getJButton8(), null);
}
return jPanel6;
}
COM: <s> this method initializes j panel6 </s>
|
funcom_train/39949135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ButtonGroup getButtonGroupVirtualClockStatus() {
if (buttonGroupVirtualClockStatus == null) {
buttonGroupVirtualClockStatus = new ButtonGroup();
buttonGroupVirtualClockStatus.add(this.getJRadioButtonTimeNormal());
buttonGroupVirtualClockStatus.add(this.getJRadioButtonTimeStopped());
buttonGroupVirtualClockStatus.add(this.getJRadioButtonTimeStoppedDelaysHandled());
buttonGroupVirtualClockStatus.add(this.getJRadioButtonTimeWarped());
}
return buttonGroupVirtualClockStatus;
}
COM: <s> this method initializes button group virtual clock status </s>
|
funcom_train/47805817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertBefore(T someData) {
ListNode<T> newNode = new ListNode<T>(someData);
if (isEmpty()) {
_head = _curr = newNode;
} else {
newNode.setNext(_curr);
_curr = newNode;
if (_prev != null) {
_prev.setNext(_curr);
} else {
_head = _curr;
}
}
}
COM: <s> inserts a new list node before the current node </s>
|
funcom_train/9916281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean inorder() {
if (comparator == null) {
return false;
}
int size = this.size();
if (size <= 1) {
return true;
}
Object prev = this.get(0);
for (int i = 1; i < size; i++) {
Object current = this.get(i);
if (comparator.compare(current, prev) < 0) {
return false;
}
}
return true;
}
COM: <s> test that a list truly is in order by the current comparator </s>
|
funcom_train/8930950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
viewer = new TableTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.setContentProvider(new ViewContentProvider());
viewer.setLabelProvider(new ViewLabelProvider());
viewer.getTableTree().setLayoutData(new GridData(GridData.FILL_BOTH));
viewer.setInput(null);
Table table = viewer.getTableTree().getTable();
new TableColumn(table, SWT.NONE).setText("Features");
}
COM: <s> this is a callback that will allow us </s>
|
funcom_train/31688511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCurrentPagePath() {
String sPath = null;
Element pageEl =
XMLUtils.getFirstNamedChild(getDocumentElement(), WebPageBinding.TAG_REQUESTED_PAGE);
if(pageEl != null) {
Element pathEl = XMLUtils.getFirstNamedChild(pageEl, ChildObjectBinding.TAG_PATH);
if(pathEl != null) {
sPath = XMLUtils.getChildTextValue(pathEl);
}
}
return sPath;
}
COM: <s> returns the current the path value for the code web page code </s>
|
funcom_train/31894793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isHenBlocked(int x, int y) {
return (motherHen != null)
&& (x >= motherHen.getTileLocation().x && y >= motherHen
.getTileLocation().y)
&& (x - motherHen.getTileLocation().x < 2 && y
- motherHen.getTileLocation().y < 2);
}
COM: <s> returns true if a tile is occupied by a mother hen </s>
|
funcom_train/41760809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMoveValid(Position pos, Direction dir) {
LayoutSquare square = this.grid[pos.X][pos.Y];
/*
* If this square has a wall in that dir, the move isn't valid.
*/
return (!square.walls[Direction.toValue(dir)]);
}
COM: <s> work out if a robot can move in a particular direction </s>
|
funcom_train/48775338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addFileName(String fileName) {
int idx = fileMap.indexOf(fileName);
if (idx>=0) return idx;
fileName = fileName.replace( '\\', '/' );
fileMap.add(fileName);
idx = fileMap.size() - 1 ; // added item
return idx;
}
COM: <s> add a file to the file map data structure </s>
|
funcom_train/15605384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTierOrderValue(String viewName, String tierName) {
ViewInfo tmpViewInfo = (ViewInfo)viewCollection.get(viewName);
if (tmpViewInfo!=null) return tmpViewInfo.getOrderValueForTier(tierName);
else {
if (DEBUG) System.out.println("The view "+viewName+" does not exist.");
return -1;
}
}
COM: <s> method returns the int which represents the order the tier should be placed </s>
|
funcom_train/44385761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doSetClassName() {
ensure(classAttr != null,
"The attribute class is missing in action " + actionAttr);
Set allowedNestedElements = new HashSet();
ensureAllowedNestedElements(allowedNestedElements, actionAttr);
Java task = getCommand(commandAttr);
getCommandlineJava(task).setClassname(classAttr);
}
COM: <s> execute set class name action </s>
|
funcom_train/31656275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Call makeNewAXISCall() throws WSIFException {
Call c = null;
java.net.URL url = getEndPoint();
try {
if (url != null) {
c = new Call(url);
Transport axistransport = getTransport();
if (axistransport != null) {
axistransport.setUrl(url.toString());
}
} else {
c = new Call(new org.apache.axis.client.Service());
}
c.setMaintainSession(true);
} catch (JAXRPCException e) {
Trc.exception(e);
throw new WSIFException(
"exception creating call object: "
+ e.getLocalizedMessage(),
e);
}
return c;
}
COM: <s> creates a new axis call object </s>
|
funcom_train/21022306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decreaseKeywordRate(String keyword) {
if (keywordTableMap.containsKey(keyword)) {
int row = Integer.valueOf(keywordTableMap.get(keyword));
int value = Integer.valueOf(table.getHTML(row, 1)) - 1;
if (value>0) {
table.setHTML(row, 1, ""+value);
} else {
// This case is not possible in KeyMapDashBoard controls case <=0
table.setHTML(row, 1, "0");
}
}
}
COM: <s> decrease the keyword rate with one </s>
|
funcom_train/31303588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print( boolean immediately ) {
setBusy();
try {
print( immediately, rpo );
setReady();
} catch (Throwable t) {
setReady();
showExceptionDialog(getDesc("error"),getDesc("delnote_access_error"), t, false);
}
}
COM: <s> print the delivery note </s>
|
funcom_train/47869029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean test_all_capital(String tok) {
if (tok == null)
return false;
if (tok.length() == 0)
return false;
char a;
for (int i = 0; i < tok.length(); i++) {
a = tok.charAt(i);
if (Character.isLowerCase(a))
return false;
}
return true;
}
COM: <s> test if all the letters of the string are capital letters </s>
|
funcom_train/20295927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endTransmition(){
try {
client.logger.print_info("Closing transmit waiter socket");
if(in != null){
in.close();
in = null;
}
if(transmitCommandSocket != null){
transmitCommandSocket.close();
transmitCommandSocket = null;
}
if(transmitWaiterSocket != null){
transmitWaiterSocket.close();
transmitWaiterSocket = null;
}
} catch (IOException e) {
client.logger.print_error("Problem closing socket: " + e.getMessage());
}
}
COM: <s> closes the transmission sockets </s>
|
funcom_train/2731574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String visit(BlockRule blockRule) {
StringBuffer s = new StringBuffer();
s.append("par ");
for (Object o : blockRule.getRules()) {
Rule rule = MDRConnector.toRule(o);
s.append(visit(rule) + " ");
}
s.append("endpar");
return s.toString();
}
COM: <s> converts a block rule into string </s>
|
funcom_train/47893781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SyntaxTreeBranch makeBranch(Production prod, List kids) {
assert kids.size() == prod.getSize();
if (optionals.containsKey(prod))
return makeOptionalBranch(prod, kids);
if (listNonterminals.contains(prod.getLhs()))
return makeList(prod, kids);
// Normal node.
return branchFactory(prod, kids);
}
COM: <s> create a branch node adjusting structure as defined by optional and list settings </s>
|
funcom_train/18001586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getVersionName(String versionFileName) {
int versionNameBeginIndex = versionFileName.indexOf(VERSION_NAME_PREFIX) + VERSION_NAME_PREFIX.length();
int versionNameEndIndex = versionFileName.indexOf(VERSION_NAME_SUFFIX, versionNameBeginIndex);
return versionFileName.substring(versionNameBeginIndex, versionNameEndIndex);
}
COM: <s> given a name of version file return its version name portion </s>
|
funcom_train/2673811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createActions() {
super.createActions();
IAction a= new TextOperationAction(AJavaResourceDefinitions.getResourceBundle(), "ContentAssistProposal.", this, ISourceViewer.CONTENTASSIST_PROPOSALS);
a.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
setAction("ContentAssistProposal", a);
a= new DefineFoldingRegionAction(AJavaResourceDefinitions.getResourceBundle(), "DefineFoldingRegion.", this);
setAction("DefineFoldingRegion", a);
}
COM: <s> the code ajava editor code implementation of this </s>
|
funcom_train/8569137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private V getValue() throws CancellationException, ExecutionException {
int state = getState();
switch (state) {
case COMPLETED:
if (exception != null) {
throw exception;
} else {
return value;
}
case CANCELLED:
throw new CancellationException("Task was cancelled.");
default:
throw new IllegalStateException(
"Error, synchronizer in invalid state: " + state);
}
}
COM: <s> implementation of the actual value retrieval </s>
|
funcom_train/24575000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
//Since we're going to start monitoring, we want to take a snapshot of the
//current directory to we have something to refer to when stuff changes.
takeSnapshot();
//And start the thread on the given interval
super.start();
//And notify the listeners that monitoring has started
// File theDirectory = new File(directory);
monitoringStarted(schema+"."+table);
}
COM: <s> start the monitoring of this directory </s>
|
funcom_train/34594187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanUp( ) {
if( this.rollback == true ){
this.syncManager.rollback();
this.updateManager.rollback();
}
this.syncManager.shutdown();
this.updateManager.shutdown();
this.deleteTempFiles();
this.btnCancel.setEnabled( true );
this.setDefaultCloseOperation( JDialog.DISPOSE_ON_CLOSE );
if( autoSync == true ) closeWindow();
}
COM: <s> shuts down the transaction manager </s>
|
funcom_train/45116461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTestsXmlToRoot(Document doc, Integer[] indexes) {
Element target = doc.createElement(RunningProperties.ANT_TARGET);
target.setAttribute("name", testId);
// add the properties with test parameters values
addAntPropertiesToTarget(target, doc);
/*
* Create and add the jsystem task tag and attributes
*/
Element jsystem = doc.createElement("jsystem");
appendPropertiesToJSystemTask(jsystem, doc);
target.appendChild(jsystem);
// Add test to root as target
Element root = doc.getDocumentElement();
root.appendChild(target);
}
COM: <s> appends test test settings to xml </s>
|
funcom_train/30123151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CatalogServiceStub getStub(String dn) throws Exception {
CatalogServiceStub stub = new CatalogServiceStub(catalogUrl);
if (dn != null)
stub._getServiceClient().addStringHeader(HEADER_QNAME, dn);
else
log.error("WorkspaceQueryBean-getStub: No DN was passed and the user's DN was null" +
" so the DN could not be added to the header");
return (stub);
} //end of getStub
COM: <s> this method is called to create the xmc cat client stub </s>
|
funcom_train/37835932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int keepSpriteOnMapY(Sprite sprite, int sy) {
sy = Math.max(sy, 0);
/*
* Allow placing beyond the map, but only if the area is on the screen.
* Do not try to adjust the coordinates if the world size is not known
* yet (as in immediately after a zone change)
*/
if (wh != 0) {
sy = Math.min(sy, Math.max(getHeight() + svy,
convertWorldToScreen(wh)) - sprite.getHeight());
}
return sy;
}
COM: <s> try to keep a sprite on the map </s>
|
funcom_train/9920659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double playFit(double[] params){
double decision= 0;
for(int j= 0; j<this.terms.length; j++) decision+= coefs[j]*this.terms[j].getProduct(params);
decision+= coefs[coefs.length-1];
return decision;
}
COM: <s> returns what the decision the fit would predict given params </s>
|
funcom_train/3619267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAssignedToPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Bug_assignedTo_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Bug_assignedTo_feature", "_UI_Bug_type"),
EclipsesrsPackage.Literals.BUG__ASSIGNED_TO,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the assigned to feature </s>
|
funcom_train/50077167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkHoldingMap() throws Exception {
Object response =
this.dispatcher.callRemoteMethod(
this.remoteAddress, "getCacheMap", GroupRequest.GET_ALL, 0);
Map localMap = new HashMap(this.cache);
assertEquals(localMap, response);
}
COM: <s> checks if both the cache instances contain identical data </s>
|
funcom_train/12561772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void callPaint(Graphics g, CGraphicsQ refreshQ) {
if (sizeChangedOccured) {
if (tunnel != null) {
int w = getBodyWidth();
int h = getBodyHeight();
tunnel.callSizeChanged(w, h);
sizeChangedOccured = false;
}
}
super.paint(g, refreshQ);
}
COM: <s> midpwindow overrides the parent paint method in order to </s>
|
funcom_train/28262016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
// Push extra register first, if 32 bit instruction
// Double word will be stored as [bp[LSB][MSB] ebp[LSB][MSB]] because
// stack is counting backwards in memory
if (cpu.doubleWord) {
cpu.setWordToStack(cpu.ebp);
}
// Get word at BP and assign to SS:SP
cpu.setWordToStack(cpu.bp);
}
COM: <s> this pushes the word in bp onto stack top ss sp </s>
|
funcom_train/25314925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isContained(Point2D.Float leftTop,Point2D.Float rightBottom){
float halfSquareSize=squareSize*0.5f*quadtree.overlapFactor;
return leftTop.x>=squareCenter.x-halfSquareSize && rightBottom.x<squareCenter.x+halfSquareSize
&& leftTop.y>=squareCenter.y-halfSquareSize && rightBottom.y<squareCenter.y+halfSquareSize;
}
COM: <s> this function returns true if and only if the given bounding box is </s>
|
funcom_train/20883111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BaseVoice getVoiceById(String id) {
for (int i = 0; i < voiceList.size(); i++) {
BaseVoice bv = (BaseVoice)(voiceList.elementAt(i));
if (bv.getId().equals(id)) {
return bv;
}
}
return null;
}
COM: <s> gets a voice by its identifier </s>
|
funcom_train/40531920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readFile(final String filename) throws IOException {
final File file = new File(filename);
final FileReader fileReader = new FileReader(file);
final char[] cbuf = new char[(int) file.length()];
fileReader.read(cbuf);
fileReader.close();
return new String(cbuf);
}
COM: <s> reads the file into a string </s>
|
funcom_train/13346976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean satisfies(Object o) {
Iterator it = filters.iterator();
while(it.hasNext()) {
VectorFilter current = (VectorFilter) it.next();
boolean result = current.satisfies(o);
if (operation == NOT)
return !result;
else if (operation == OR && result)
return true;
else if (operation == AND && !result)
return false;
}
if (operation == OR)
return false;
else if (operation == AND)
return true;
else
return false;
}
COM: <s> if the operation for this filter is and this method returns the </s>
|
funcom_train/7741964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(Node node, String currentFile, int lineno, String module) throws VisitorException {
// super.visit(node, currentFile, lineno, module);
Node expr = getFirstChild(getFirstChild(node, "expr"), null);
node.setParseNode(expr.getParseNode());
}
COM: <s> actually do nothing </s>
|
funcom_train/13307303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URI getURI(String propNs, String propName, Graph g) {
URI result = null;
if(propNs == null)
result = getURI(propName, g);
if(result == null) {
String predefNs = PredefinedNamespace.get().getURI(propNs);
if(predefNs != null)
result = g.getValueFactory().createURI(predefNs+propName);
}
return result;
}
COM: <s> returns an uri sesame object related to given short name of the property </s>
|
funcom_train/18203839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void adjustReactionsPerStep( long cycleDurationMillis ) {
if( cycleDurationMillis > 1000
&& m_reactionsPerStep > REACTION_PACKET_SIZE ) {
m_reactionsPerStep -= REACTION_PACKET_SIZE;
}
else if( cycleDurationMillis < 500 ) {
m_reactionsPerStep += REACTION_PACKET_SIZE;
}
}
COM: <s> adjust step to take 0 </s>
|
funcom_train/3371963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDisplayedMnemonic(int key) {
int oldKey = mnemonic;
mnemonic = key;
firePropertyChange("displayedMnemonic", oldKey, mnemonic);
setDisplayedMnemonicIndex(
SwingUtilities.findDisplayedMnemonicIndex(getText(), mnemonic));
if (key != oldKey) {
revalidate();
repaint();
}
}
COM: <s> specify a keycode that indicates a mnemonic key </s>
|
funcom_train/29928213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseClicked(MouseEvent e) {
if (urlExtractor == null) {
return;
}
if (urlExtractor.isEnabled() == false) {
return;
}
// now, want mouse click to signal browser...
int index = map.getIndex(e.getX());
if (map.contains(index)) {
viewFrame.displayURL(urlExtractor.getUrl(index));
}
}
COM: <s> starts external browser if the url extractor is enabled </s>
|
funcom_train/26410309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeAntZipTask(PrintWriter out) {
out.println(" <zip casesensitive=\"true\" destfile=\"data.zip\" followsymlinks=\"true\" compress=\"true\">");
final Enumeration children = rootNode.children();
while (children.hasMoreElements()) {
DefaultMutableTreeNode child = (DefaultMutableTreeNode) children.nextElement();
writeAntZipRecursive(child, "", out);
}
out.println(" </zip>");
}
COM: <s> write the zip task </s>
|
funcom_train/4470302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generatePages() {
pagesPanel.clear();
for ( int i=1;i<=size;i++) {
if ( i == currentPage) {
pagesPanel.add(new CurrentPage());
} else {
Page p = new Page(i);
pagesPanel.add(p);
}
if ( i != size) {
pagesPanel.add(new Separator());
}
}
}
COM: <s> generates the list of pages between the buttons </s>
|
funcom_train/403338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SystemIncludePath createSysIncludePath() {
Project p = getProject();
if (p == null) {
throw new java.lang.IllegalStateException("project must be set");
}
if (isReference()) {
throw noChildrenAllowed();
}
SystemIncludePath path = new SystemIncludePath(p);
sysIncludePaths.addElement(path);
return path;
}
COM: <s> creates a system include path </s>
|
funcom_train/4780001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getNonMemberPanel() {
if (nonMemberPanel == null) {
nonMemberPanel = new JPanel(new BorderLayout());
nonMemberPanel.setPreferredSize(new Dimension(350, 500));
nonMemberPanel.add(new JLabel(ResourceUtil.getString("addremovemembers.nonmembers")), BorderLayout.NORTH);
nonMemberPanel.add(getNonMemberListScrollPane(), BorderLayout.CENTER);
}
return nonMemberPanel;
}
COM: <s> this method initializes non member panel </s>
|
funcom_train/10340193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJSplitPaneAC() {
if (jSplitPaneAC == null) {
jSplitPaneAC = new JSplitPane();
jSplitPaneAC.setOrientation(JSplitPane.VERTICAL_SPLIT);
jSplitPaneAC.setPreferredSize(new Dimension(455, 200));
jSplitPaneAC.setDividerLocation(100);
jSplitPaneAC.setBottomComponent(getJScrollPane());
jSplitPaneAC.setTopComponent(getJPanel());
}
return jSplitPaneAC;
}
COM: <s> this method initializes j split pane ac </s>
|
funcom_train/15716328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyPressed(KeyEvent k){
int kc=k.getKeyCode();
if (kc==37){
myRoom.changeDirection('l');}
if (kc==39){
myRoom.changeDirection('r');}
mainPanel.getTime();
mainPanel.getDate();
mainPanel.repaint();}
COM: <s> changes direction in room when left or right cursor keys are pressed </s>
|
funcom_train/39789803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ImageReference getPaneBackgroundImage(Component component) {
LayoutData layoutData = (LayoutData) component.getRenderProperty(SplitPane.PROPERTY_LAYOUT_DATA);
if (!(layoutData instanceof SplitPaneLayoutData)) {
return null;
}
FillImage backgroundImage = ((SplitPaneLayoutData) layoutData).getBackgroundImage();
if (backgroundImage == null) {
return null;
}
return backgroundImage.getImage();
}
COM: <s> retrieves the code image reference code of the background image </s>
|
funcom_train/4773753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Document buildDocument(Document doc, File xmlFile) {
try {
SAXBuilder builder = new SAXBuilder();
doc = builder.build(xmlFile);
} catch (IOException e) {
System.out.println("Erro ao obter arquivo.");
e.printStackTrace();
} catch (JDOMException e) {
System.out.println("Erro ao processar arquivo.");
e.printStackTrace();
}
return doc;
}
COM: <s> read and build the document </s>
|
funcom_train/11782803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resize(){
if(desktopPane == null)
desktopPane = getDesktopPane();
int totalHeight = 0;
for(PlotByPosCoverPanel pan : plotCovers)
totalHeight += pan.getPrefferedHeight();
//get top location of the frame to bottom of screen
int maxHeight = desktopPane.getSize().height - getBounds().y;
if(maxHeight <= 0)
return;
validate(); //important
calcFrameBounds();
setSize(getWidth(), Math.min(maxHeight, frameYborder + totalHeight));
validate();
}
COM: <s> when plots are added closed hidden or shown </s>
|
funcom_train/46278218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertTypesFragment(Document doc) {
updateNamespaces();
if (wsdlTypesElem != null) {
// Import the wsdlTypesElement into the doc.
org.w3c.dom.Node node = doc.importNode(wsdlTypesElem, true);
// Insert the imported element at the beginning of the document
doc.getDocumentElement().
insertBefore(node,
doc.getDocumentElement().getFirstChild());
}
}
COM: <s> inserts the type fragment into the given wsdl document </s>
|
funcom_train/22783956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireTreeNodeInsered(FilterTreeNode newNode) {
// get information
TreePath path = newNode.getParent().getPath();
int indices[] = { newNode.getParent().getIndexOfChild(newNode) };
Object nodes[] = { newNode };
// build up event
TreeModelEvent event = new TreeModelEvent(newNode, path, indices, nodes);
// send event
for (TreeModelListener listener : listeners) {
listener.treeNodesInserted(event);
}
}
COM: <s> notify all listeners about a newly inserted node </s>
|
funcom_train/13916680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ETLTrigger addTrigger(Node xmlNode) throws KETLThreadException {
ETLTrigger tTrigger = new ETLTrigger(this);
// Call the initialize() method ourselves to get any errors in the
// config...
if (tTrigger.initialize(xmlNode, this) != 0) {
ResourcePool.LogMessage(this, ResourcePool.ERROR_MESSAGE, "unable to create trigger in step '" + this.getName() + "'.");
return null;
}
this.mvTriggers.add(tTrigger);
return tTrigger;
}
COM: <s> adds the trigger </s>
|
funcom_train/19976502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadPlugin(Plugin gin) throws Exception, Throwable {
MP5Plugin plo = new mpv5.pluginhandling.MPPLuginLoader().getPlugin(QueryHandler.instanceOf().clone(Context.getFiles()).retrieveFile(gin.__getFilename()));
if (plo != null) {
loadPlugin(plo);
} else {
Log.Debug(this, "Plugin not loaded: " + plo);
}
}
COM: <s> loads the given plugin by calling code plugin </s>
|
funcom_train/812998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected OverviewOutlinePage getOverviewOutlinePage() {
if (null == overviewOutlinePage && null != getGraphicalViewer()) {
RootEditPart rootEditPart = getGraphicalViewer().getRootEditPart();
if (rootEditPart instanceof ScalableFreeformRootEditPart) {
overviewOutlinePage = new OverviewOutlinePage(
(ScalableFreeformRootEditPart) rootEditPart);
}
}
return overviewOutlinePage;
}
COM: <s> returns the overview for the outline view </s>
|
funcom_train/51119258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void jukeboxPlaylistChanged(Jukebox jukebox) {
// Update the visible playlist
Collection pl = jukebox.getPlayList();
playlist.removeAllItems();
if (pl != null) {
for (Iterator i = pl.iterator(); i.hasNext();) {
playlist.addItem((Song) i.next());
}
}
// (re)select the current song
Song song = jukebox.getCurrentSong();
if (song != null) {
playlist.setValue(song);
}
}
COM: <s> refresh the playlist </s>
|
funcom_train/37434677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SchemaContext getFirstChild() {
Node node = getNode().getFirstChild();
while (node != null && (node.getNodeType() == Node.TEXT_NODE) || node.getLocalName() == "annotation") {
node = node.getNextSibling();
}
return (SchemaContext)create(node);
}
COM: <s> returns a schema context for the first child element of the current </s>
|
funcom_train/1542134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream next() throws IOException {
if (eof)
throw new NoSuchElementException(getClass() + ": at EOF.");
if (closed)
throw new NoSuchElementException(getClass() + ": already closed.");
if (!readUntilXMLDeclaration())
throw new NoSuchElementException(getClass()
+ ": No more sequences.");
xmlIndex = 0;
return new NoCloseInputStream(this);
}
COM: <s> returns the next xml segment </s>
|
funcom_train/19305504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getWordWidth(final CharSequence word) {
final FontUse fontUse = getPrimaryFont();
final Font font = fontUse.getFont();
fontUse.registerCharsUsed(word);
return font.width(word, traitFontSize(),
traitGeneratedBy().traitLetterSpacingOpt(this),
traitGeneratedBy().traitWordSpacingOpt(this), true);
}
COM: <s> computes the width of a word in millipoints </s>
|
funcom_train/4257383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object invoke(java.lang.reflect.Method method, Object... args) {
Object result = null;
if (method != null) {
try {
result = method.invoke(this, args);
} catch (Exception e) {
getLogger().log(
Level.WARNING,
"Couldn't invoke the handle method for \"" + method
+ "\"", e);
}
}
return result;
}
COM: <s> invokes a method with the given arguments </s>
|
funcom_train/14625271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteDir(File dir) {
if (dir.isDirectory()) {
String[] children = dir.list();
for (int i = 0; i < children.length; i++) {
boolean success = deleteDir(new File(dir, children[i]));
if (!success) {
return false;
}
}
}
// The directory is now empty so delete it
return dir.delete();
}
COM: <s> removes recursively the contents of a directory </s>
|
funcom_train/48909166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxfLecturaInicial() {
if (txfLecturaInicial == null) {
txfLecturaInicial = new JTextField();
txfLecturaInicial.setBounds(new Rectangle(148, 7, 142, 22));
txfLecturaInicial.addKeyListener(new KeyAdapter(){
public void keyPressed(KeyEvent e) {
if(e.getKeyCode()==KeyEvent.VK_ENTER)
txfHoraInicial.grabFocus();
}
});
}
return txfLecturaInicial;
}
COM: <s> this method initializes txf lectura inicial </s>
|
funcom_train/2860230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void evaluate(Object actions) {
// Don't add to dispatch list while evaluating.
evaluating = true;
for (int i=0; i<dispatchList.size(); i++) {
Dispatch d = (Dispatch)dispatchList.get(i);
dispatch(actions, d.name, d.node, false);
}
evaluating = false;
}
COM: <s> evaluate the node tree against an action object </s>
|
funcom_train/3391595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeMemberDescription(FieldDoc field) {
if (field.inlineTags().length > 0) {
writer.dd();
writer.printInlineComment(field);
}
Tag[] tags = field.tags("serial");
if (tags.length > 0) {
writer.dt();
writer.dd();
writer.printInlineComment(field, tags[0]);
}
}
COM: <s> write the description text for this member </s>
|
funcom_train/28753214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRtprimstandardvolume(Long newVal) {
if ((newVal != null && this.rtprimstandardvolume != null && (newVal.compareTo(this.rtprimstandardvolume) == 0)) ||
(newVal == null && this.rtprimstandardvolume == null && rtprimstandardvolume_is_initialized)) {
return;
}
this.rtprimstandardvolume = newVal;
rtprimstandardvolume_is_modified = true;
rtprimstandardvolume_is_initialized = true;
}
COM: <s> setter method for rtprimstandardvolume </s>
|
funcom_train/8012963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean ping(DataStoreProxy ds) throws Exception {
try {
_count = 0;
URLConnection conn = null;
conn = openConnection(ds, _url, _sessionId, DataStoreProxy.OPERATION_PING, null, _userID, _pw);
int result = getResponse(conn);
if (result == DataStoreProxy.REMOTE_STATUS_OK) {
_out.close();
return true;
} else {
handleError(result, null);
return false;
}
} catch (Exception ex) {
throw new DataStoreException(ex.toString());
}
}
COM: <s> ping method comment </s>
|
funcom_train/1559089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateHelpText() {
if (modeNameLabel == null) return;
int mode = app.getMode();
String toolName = app.getToolName(mode);
String helpText = app.getToolHelp(mode);
// get wrapped toolbar help text
String wrappedText = wrappedModeText(toolName, helpText, toolbarHelpPanel);
modeNameLabel.setText(wrappedText);
resolveMouseListener(mode);
// tooltip
modeNameLabel.setToolTipText(app.getToolTooltipHTML(mode));
toolbarHelpPanel.validate();
}
COM: <s> update the help text </s>
|
funcom_train/37070925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getMissingTypesOfLocus(String locusId) {
String[] annotationTypes = {"comp", "proc", "func"};
Set results = new HashSet();
for(int i = 0; i < annotationTypes.length; i++) {
if (locusTypes.contains(makeLocusTypeKey(locusId, annotationTypes[i])) == false) {
results.add(annotationTypes[i]);
}
}
return results;
}
COM: <s> returns a set of the annotation types that this locus is missing </s>
|
funcom_train/37833111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyOnline(final String who) {
boolean found = false;
if (containsKey("buddies", who)) {
put("buddies", who, true);
found = true;
}
if (found) {
if (has("online")) {
put("online", get("online") + "," + who);
} else {
put("online", who);
}
}
}
COM: <s> notifies this player that the given player has logged in </s>
|
funcom_train/17951954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Page p) {
if (p.id == id)
return 0 ;
int cmp = 0 ;
if (p.weight != null && weight != null && p.weight != weight)
cmp = p.weight.compareTo(weight) ;
if (cmp == 0)
cmp = new Integer(id).compareTo(p.id) ;
return cmp ;
}
COM: <s> compares this page to another </s>
|
funcom_train/13994048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValidationMessage01() {
ValidationMessage message = new ValidationMessage();
Validator validator = new NoDublicateValidator(message,
new String[] { MockValidateable.TEST });
validator.validate(v, MockValidateable.TEST, context, list);
assertEquals(1, list.size());
assertEquals(message, list.get(0));
}
COM: <s> tests that a default message is correctly used when no other message was </s>
|
funcom_train/29828726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getValues(Object colId) {
int rowCount = this.getRowCount();
List returnValue = new ArrayList(rowCount);
for (int i = 0; i < rowCount; i++) {
returnValue.add(getValue(i, colId));
}
return returnValue;
}
COM: <s> gets the values of the given col id from all rows </s>
|
funcom_train/10373689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void forwardToLoginPage(Request request, HttpServletResponse response) {
RequestDispatcher disp = request.getRequestDispatcher(loginPage);
try {
disableClientCache(response);
disp.forward(request.getRequest(), response);
response.flushBuffer();
} catch (Throwable t) {
logger.warn("Unexpected error forwarding to login page", t);
}
}
COM: <s> called to forward to the login page </s>
|
funcom_train/44987023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isGeom() {
return (type.indexOf("COORD")!=-1)||(type.indexOf("POLYLINE")!=-1)||
(type.indexOf("SURFACE")!=-1)||(type.indexOf("AREA")!=-1)||
(this.getDBName().charAt(getDBName().length()-2)=='c');
}
COM: <s> will return true if the attribute is a geometry type </s>
|
funcom_train/5380781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Menu getContextMenuControl() {
if ((contextMenuManager != null) && (toolBar != null)) {
Menu menuWidget = contextMenuManager.getMenu();
if ((menuWidget == null) || (menuWidget.isDisposed())) {
menuWidget = contextMenuManager.createContextMenu(toolBar);
}
return menuWidget;
}
return null;
}
COM: <s> returns the control of the menu manager </s>
|
funcom_train/44838579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Person findById(String id) throws RemoteException {
Person person = null;
try {
person = personManager.findById(id);
} catch (RemoteException rex) {
System.out.println("Error on the remote server" + rex);
throw new RemoteException("Error on the remote server" + rex);
}
return person;
}
COM: <s> find a person by id </s>
|
funcom_train/45622792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReferencesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SGenType_references_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SGenType_references_feature", "_UI_SGenType_type"),
MSBPackage.eINSTANCE.getSGenType_References(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the references feature </s>
|
funcom_train/42646351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getURI() {
// URI should always be text, but there have been examples of
// Hex encoded uri values.
Object actionURI = getObject(URI_KEY);
if (actionURI instanceof StringObject) {
URI = (StringObject) actionURI;
}
return URI.getDecryptedLiteralString(library.securityManager);
}
COM: <s> gets the uniform resource identifier to resolve encoded in 7 bit ascii </s>
|
funcom_train/11111458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void lazyStartHead() throws SAXException {
if (!headStarted) {
headStarted = true;
// Call directly, so we don't go through our startElement(), which will
// ignore these elements.
super.startElement(XHTML, "html", "html", EMPTY_ATTRIBUTES);
newline();
super.startElement(XHTML, "head", "head", EMPTY_ATTRIBUTES);
newline();
}
}
COM: <s> generates the following xhtml prefix when called for the first time </s>
|
funcom_train/11387038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean nextKeyValue() throws IOException, InterruptedException {
if (inputQueue != null) {
return readFromQueue();
} else if (inputContext.nextKeyValue()) {
this.key = inputContext.getCurrentKey();
this.value = inputContext.getCurrentValue();
return true;
} else {
return false;
}
}
COM: <s> advance to the next key value pair returning null if at end </s>
|
funcom_train/3512597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addComponent(Component comp) {
GridBagConstraints cons = new GridBagConstraints();
cons.gridy = y++;
cons.gridheight = 1;
cons.gridwidth = cons.REMAINDER;
cons.fill = GridBagConstraints.HORIZONTAL;
cons.anchor = GridBagConstraints.CENTER;
cons.weightx = 1.0f;
gridBag.setConstraints(comp,cons);
add(comp);
}
COM: <s> adds a component to the tide browse option pane </s>
|
funcom_train/13261869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void adjustLD(double[][][] st, int[] types) {
for (int i = 0; i < st.length; i++) {
if (types[i] == Solver.LD) {
for (int j = 0; j < st[i].length; j++) {
st[i][j] = ArrayUtils.prepend0(st[i][j]);
}
}
}
}
COM: <s> hack adds an initial zero to all ld stations </s>
|
funcom_train/13391220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DiscoveryControl getDiscoveryControl(String name) {
DiscoveryControl discoControl=null;
synchronized(pool) {
for(Enumeration en = pool.elements(); en.hasMoreElements();) {
DiscoveryControl dc = (DiscoveryControl)en.nextElement();
if(dc.namesMatch(name)) {
discoControl = dc;
break;
}
}
}
return(discoControl);
}
COM: <s> get a discovery control instance </s>
|
funcom_train/2465945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseClicked(MouseEvent e) {
if (e.getClickCount() > 1) {
CallListModel listModel = (CallListModel) this.getModel();
Object element = listModel.getElementAt(this.getSelectedIndex());
if (element instanceof String) {
if (listModel.isDateClosed(element)) {
listModel.openDate(element);
} else {
listModel.closeDate(element);
}
}
}
}
COM: <s> closes or opens a group of calls </s>
|
funcom_train/19536344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInitModifier(int aInitModifier) {
int initModifier = getInitModifier();
if (initModifier == aInitModifier) return;
getCustomProperties().put(INIT_MODIFIER_PROP_NAME, BigDecimal.valueOf(aInitModifier));
pcs.firePropertyChange(INIT_MODIFIER_PROP_NAME, initModifier, aInitModifier);
}
COM: <s> set the value of init modifier for this init item </s>
|
funcom_train/18228763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readList() {
ev.log(Events.PERF_START, "ModuleSystem.readList"); // NOI18N
mgr.mutexPrivileged().enterWriteAccess();
try {
list.readInitial();
} finally {
mgr.mutexPrivileged().exitWriteAccess();
}
ev.log(Events.PERF_END, "ModuleSystem.readList"); // NOI18N
}
COM: <s> read disk settings and determine what the known modules are </s>
|
funcom_train/16927545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open() {
IPreferencesService service = extensionRegistry.getExtensionPoint(IServiceRegistry.class).getService(IPreferencesService.class);
iPreferences = service.get("SettingsDialog", "SimpleXtensions-UI");
createContents();
shell.addControlListener(new ShellAttributesListener(shell, iPreferences));
shell.open();
shell.layout();
Display display = getParent().getDisplay();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
service.save(iPreferences);
}
COM: <s> open the dialog </s>
|
funcom_train/10598574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void service(ServiceManager manager) throws ServiceException {
this.manager = manager;
try {
this.factory = (BundleFactory) manager.lookup(BundleFactory.ROLE);
} catch (ServiceException e) {
getLogger().debug("Failed to lookup <" + BundleFactory.ROLE + ">", e);
throw e;
}
}
COM: <s> look up the </s>
|
funcom_train/40622538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(int row, int column, String text) {
prepareCell(row, column);
Element td = cleanCell(row, column, text == null);
if (text != null) {
DOM.setInnerText(td, text);
}
}
COM: <s> sets the text within the specified cell </s>
|
funcom_train/23271130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDataset(XYDataset dataset) {
XYPlot plot = (XYPlot) this.chart.getPlot();
if (plot != null) {
XYDataset old = plot.getDataset();
plot.setDataset(dataset);
firePropertyChange("dataset", old, dataset);
}
}
COM: <s> sets the dataset used by the chart and fires a </s>
|
funcom_train/26317940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Team getTeamForPlayer(Player p) {
for (Team team : teams) {
for (Enumeration<Player> j = team.getPlayers(); j.hasMoreElements();) {
final Player player = j.nextElement();
if (p == player) {
return team;
}
}
}
return null;
}
COM: <s> return a players team note may return null if player has no team </s>
|
funcom_train/4284651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkDependsOnIsAcyclic(TypedModel typedModel, DiagnosticChain diagnostics, Map<Object, Object> context) {
Set<TypedModel> allDependsOn = getAllDependsOn(typedModel);
if (!allDependsOn.contains(typedModel))
return true;
Object[] messageSubstitutions = new Object[] { getObjectLabel(typedModel, context) };
appendError(diagnostics, typedModel, QVTBaseMessages._UI_TypedModel_DependsOnContainsACycle, messageSubstitutions);
return false;
}
COM: <s> validates the depends on is acyclic constraint of em typed model em </s>
|
funcom_train/51590978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDisplayRowNumber(boolean considerRowNumber)
{ if ( this.isRowNumberDisplayed() != considerRowNumber )
{
this.displayRowNumber = considerRowNumber;
this.fireTableStructureChanged();
// this.support.firePropertyChange(PROPERTY_DISPLAY_ROW_NUMBER, considerRowNumber, this.isRowNumberDisplayed());
}
}
COM: <s> set if the model must consider a first column with row number </s>
|
funcom_train/29761477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Stack getEntityStack() throws JspException{
Stack stack=(Stack)getJspContext().getAttribute(JSON_OBJECT_STACK_KEY, JSON_OBJECT_STACK_SCOPE);
if (stack==null){
stack = createEntityStack();
mNewStackCreated=true;
}
return stack;
}
COM: <s> get the json object stack </s>
|
funcom_train/44316870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OperatorNode addSuboperator(OperatorWindow operatorWindow, SoarWorkingMemoryModel swmm,String newOperatorName) throws IOException {
OperatorNode newOperator = super.addSuboperator(operatorWindow,swmm,newOperatorName);
SoarVertex oper = swmm.createNewSoarId();
SoarVertex operName = swmm.createNewEnumeration(newOperatorName);
swmm.addTriple(swmm.getTopstate(),"operator",oper);
swmm.addTriple(oper,"name",operName);
return this;
}
COM: <s> adds a suboperator underneath this root node </s>
|
funcom_train/51631847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StringBuffer appendTypeParameterList(StringBuffer buffer, CompletionProposal typeProposal) {
// TODO remove once https://bugs.eclipse.org/bugs/show_bug.cgi?id=85293
// gets fixed.
char[] signature= SignatureUtil.fix83600(typeProposal.getSignature());
char[][] typeParameters= Signature.getTypeArguments(signature);
for (int i= 0; i < typeParameters.length; i++) {
char[] param= typeParameters[i];
typeParameters[i]= Signature.toCharArray(param);
}
return appendParameterSignature(buffer, typeParameters, null);
}
COM: <s> appends the type parameter list to code buffer code </s>
|
funcom_train/25523588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel getJlError() {
if(jlError == null) {
jlError = new JLabel();
// Red is a good colour for errors
jlError.setForeground(Color.RED);
// Set a preferred size so that the GUI doesn't jump when an error is displayed
// for the first time.
jlError.setPreferredSize(new Dimension(10, 20));
}
return jlError;
}
COM: <s> get the error label </s>
|
funcom_train/50573386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFirstSentence() {
for(int i=0; i < _text.length(); ++i) {
char c = _text.charAt(i);
if ((c == '.') || (c == '\n')) {
return(removeTags(_text.substring(0, i)));
}
}
return(removeTags(_text));
}
COM: <s> return the first sentence of text with html disabled </s>
|
funcom_train/24250201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toggleEditing() {
if (!isEditing()
&& panel.getPeoplePicker().getContactTable()
.getSelectedRowCount() != 1) {
return;
}
panel.getContactDisplay().getHandler()
.setEditing(!panel.getEditButton().isSelected());
panel.getEditButton().setSelected(
panel.getContactDisplay().getHandler().isEditing());
}
COM: <s> toggles the editing mode </s>
|
funcom_train/21156436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResponseSessClose doSessClose(SocketEndpointSession session,RequestSessClose request){
ResponseSessClose result = new ResponseSessClose(request);
String msg = JsrbMessages.getResourceString(JsrbCodes.CODE_ENP_SOCKSESS_CLOSE,Integer.toHexString( session.getSessionId()), session.getSockaddr() );
if ( verboseClientEvent ){
MSG_LOGGER.info(msg);
}
TRC_LOGGER.info(msg);
return result;
}
COM: <s> closing session work is done in process read event </s>
|
funcom_train/3711141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOnlyOriginalUnits (Units units) throws IllegalArgumentException {
Intensity intens = getIntensity (intensity_id);
if (intens == null) {
intens = getIntensity(UType.GetEquivalentName(intensity_id));
if (intens == null) {
throw (new IllegalArgumentException (errmsg1 + intensity_id));
}
} else {
intens.setOnlyOriginalUnits (units);
}
}
COM: <s> sets the original units </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.