__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/39915978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLabel22() {
System.out.println("getLabel22");
Page1 instance = new Page1();
Label expResult = null;
Label result = instance.getLabel22();
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 label22 method of class timesheetmanagement </s>
|
funcom_train/45377180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findServiceCode(String serviceType) {
int result = 0;
if (contains(serviceType, LanguageConstants.DEFINE_CALL)) {
result = LanguageConstants.SERVICECODE_CALL;
}
if (contains(serviceType, LanguageConstants.DEFINE_SMS)) {
result = LanguageConstants.SERVICECODE_SMS;
}
return result;
}
COM: <s> method trying to recognize the type of the service and setting its code </s>
|
funcom_train/38330587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toPPString() {
StringBuffer buf = new StringBuffer();
buf.append("BetaNode-" + this.nodeID + "> ");
for (int idx = 0; idx < this.binds.length; idx++) {
if (idx > 0) {
buf.append(" && ");
}
if (this.binds[idx] != null) {
buf.append(this.binds[idx].toPPString());
}
}
return buf.toString();
}
COM: <s> method returns a string of the node id and bindings details </s>
|
funcom_train/10445638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaxIdleBackup (int backup) {
if (backup == this.maxIdleBackup)
return;
int oldBackup = this.maxIdleBackup;
this.maxIdleBackup = backup;
support.firePropertyChange("maxIdleBackup",
Integer.valueOf(oldBackup),
Integer.valueOf(this.maxIdleBackup));
}
COM: <s> sets the option to back sessions up to the store after they </s>
|
funcom_train/11349017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeSaxDriver() {
String version = (String) System.getProperty("java.vm.version");
if (version.startsWith("1.4")) {
getLog().info("Set the Sax driver to org.apache.xerces.parsers.SAXParser");
System.setProperty("org.xml.sax.driver", "org.apache.xerces.parsers.SAXParser");
}
}
COM: <s> if maven runs with java 1 </s>
|
funcom_train/6476828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeAcuatorBeliefs(java.io.DataOutputStream out)throws java.io.IOException{
int size=actuatorBeliefs.size();
out.writeInt(size);
for(int i=size;i-->0;)out.writeUTF(actuatorBeliefs.elementAt(i).toString());
}
COM: <s> sends actuator beliefs to stream </s>
|
funcom_train/4404696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getPalm( File file ) {
final StreamWrapper stream = new StreamWrapper( file );
final byte[] buffer = new byte[BUFFER_SIZE];
final RabinFingerprintLong finger = getFingerprint();
finger.reset();
int bytesRead;
while ( ( bytesRead = stream.getBytes( buffer ) ) >= 0 ) {
finger.pushBytes( buffer, 0, bytesRead );
}
stream.close();
return finger.getFingerprintLong();
}
COM: <s> rapidly fingerprint an entire files contents </s>
|
funcom_train/10518030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Properties getProperties(String driver, String user, String pwd, String url){
Properties props = new Properties();
props.put(DRIVER, driver);
props.put(USER, user);
props.put(PASSWORD, pwd);
props.put(URL, url);
return props;
}
COM: <s> helper method to build properties </s>
|
funcom_train/3500704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate(Object candidate) throws RecordInvalidInputException {
if (candidate instanceof String) {
String c = (String)candidate;
for (int t=0; t<range.length; t++) {
if (c.compareToIgnoreCase(range[t]) == 0) {
value = range[t];
return;
}
}
}
throw new RecordInvalidInputException();
}
COM: <s> performs input validation on the candidate parameter object </s>
|
funcom_train/44161324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object removeResultHash(String id) {
Object o = null;
synchronized (container) {
o = container.remove(id);
if (o == null) {
Iterator it = container.values().iterator();
while (it.hasNext()) {
ResultHash rh = (ResultHash) it.next();
o = rh.removeChildResultHash(id);
if (o != null) {
break;
}
}
}
}
return o;
}
COM: <s> remove result hash from container used after handling result hash </s>
|
funcom_train/12173532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDefaultValue(DeviceElementCapability dec) {
// Check if a default value has already been set
final DeviceElementCapability existing =
manager.getDeviceElementCapability(dec.getElementType(), false);
// Don't overwrite it if this is the case.
if (existing == null) {
manager.addDeviceElementCapability(dec);
}
}
COM: <s> add a default device element capability to the builder </s>
|
funcom_train/22448800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
StringBuffer str = new StringBuffer();
for (Enumeration e = substitutions.keys() ; e.hasMoreElements();){
Term t = (Term)e.nextElement();
str.append(t.toString()+"/"+substitutions.get(t).toString()+"\n");
}
return str.toString();
}
COM: <s> just needed for testing </s>
|
funcom_train/1165346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ListObjectWapper getUserListedLists(String uid, boolean auth) throws WeiboException {
StringBuilder sb = new StringBuilder();
sb.append(getBaseURL()).append(uid).append("/lists/memberships.xml").append("?source=").append(CONSUMER_KEY);
String httpMethod = "GET";
String url = sb.toString();
//
Response res = http.httpRequest(url, null, auth, httpMethod);
return ListObject.constructListObjects(res, this);
}
COM: <s> retrieve the user interface has been added to the list list object </s>
|
funcom_train/2853173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadFromStore (String nodeDirName) {
this.clear(); // locks
loadFromNodeDir(nodeDirName);
// run through the BuildLists, loading each entry from store/
// STUB
// run through the BuildLists again, this time fetching each
// entry from Name2Hash by name and then verifying data against hash
// STUB
}
COM: <s> given an existing node directory load name2 hash from the </s>
|
funcom_train/12782508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void compress(T node) {
if (getAncestor(getAncestor(node)) != null) {
compress(getAncestor(node));
if (getSemi(getLabel(getAncestor(node))) < getSemi(getLabel(node))) {
setLabel(node, getLabel(getAncestor(node)));
}
setAncestor(node, getAncestor(getAncestor(node)));
}
}
COM: <s> this recursive method performs the path compression </s>
|
funcom_train/10790010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Unique importUnique(Unique unq) {
if (unq == null)
return null;
Unique copy = addUnique(unq.getIdentifier());
copy.setDeferred(unq.isDeferred());
Column[] cols = unq.getColumns();
for (int i = 0; i < cols.length; i++)
copy.addColumn(getColumn(cols[i].getIdentifier()));
return copy;
}
COM: <s> import a constraint column names must match columns of this table </s>
|
funcom_train/37619484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BitMatrix transpose() {
BitMatrix m = new BitMatrix(size);
m.setSize(size);
for (int i = 0; i < size; i++) {
BitVector row = rows[i];
if (row != null) {
for (int j = row.getLowestSetBit();
j>=0;
j = row.getLowestSetBit(j+1))
m.set(j, i);
}
}
m.reflexive = reflexive;
return m;
}
COM: <s> returns a newly allocated bit matrix initialized with the transpose </s>
|
funcom_train/50505895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JBossResourceManager getResourceManager(String resManName) {
Iterator iter = resourceManagers.iterator();
while(iter.hasNext()) {
JBossResourceManager resMan = (JBossResourceManager) iter.next();
if(resMan.getName().equals(resManName)) {
return resMan;
}
}
return null;
}
COM: <s> gets the resource manager attribute of the jboss class settings object </s>
|
funcom_train/34587471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endSync() throws SyncSourceException {
logger.debug("!------------END SYNCHRONIZATION-------------!");
if (zimbraPort != null)
zimbraPort.close();
context = null;
super.endSync();
}
COM: <s> called after the modifications have been applied </s>
|
funcom_train/2951188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDivider(JComponent item) {
/*
* Add the component with its constraints
*/
if (item != null) {
constraints.gridx = 0;
constraints.gridy = myNextItemRow;
constraints.gridwidth = 2;
if (myNextItemRow == 0) {
constraints.insets = firstDividerIns;
}
else {
constraints.insets = dividerIns;
}
constraints.weightx = 1.0;
constraints.weighty = 0;
constraints.anchor = GridBagConstraints.NORTHWEST;
constraints.fill = GridBagConstraints.HORIZONTAL;
add(item, constraints);
constraints.gridwidth = 1;
}
myNextItemRow++;
}
COM: <s> this method adds a divider item to the panel </s>
|
funcom_train/6406865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToQueue(Spatial s, int bucket) {
switch (bucket) {
case Renderer.QUEUE_OPAQUE:
opaqueBucket.add(s);
break;
case Renderer.QUEUE_TRANSPARENT:
transparentBucket.add(s);
break;
case Renderer.QUEUE_ORTHO:
orthoBucket.add(s);
break;
default:
throw new JmeException("Illegal Render queue order of " + bucket);
}
}
COM: <s> add a given spatial to the render queue </s>
|
funcom_train/5678381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open (String encoding)
{ try
{ FileLoad.center(this);
FileLoad.update();
FileLoad.setVisible(true);
// open the file:
if (FileLoad.isAborted()) return; // aborted dialog!
String filename=FileLoad.getFilePath();
if (filename.equals("")) return; // aborted dialog!
load(FileName.canonical(filename),0,true,encoding); // load the file!
}
finally
{ focus();
}
}
COM: <s> display a file dialog and let the user choose a file to </s>
|
funcom_train/11738446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent evt) {
if (JSplitPane.DIVIDER_LOCATION_PROPERTY.equals(evt.getPropertyName())) {
int value = (Integer) evt.getNewValue();
Preferences detail = Application.getInstance().getPreferencesNode(this.getClass(), "");
detail.putInt(getDividerLocationProperty(), value);
}
}
COM: <s> updates split pane divider location in properties </s>
|
funcom_train/48475641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addCellMouseUpHandler(com.smartgwt.client.widgets.grid.events.CellMouseUpHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.grid.events.CellMouseUpEvent.getType()) == 0) setupCellMouseUpEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.CellMouseUpEvent.getType());
}
COM: <s> add a cell mouse up handler </s>
|
funcom_train/21841992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveToFile(){
File f=new File(fname);
int i=1;
while(f.exists()){
String[] ele;
fname=fname.replace(".m3u","");
ele=fname.split("\\.");
if(showExtra){System.out.println("ele: "+ele.length+", "+ele.toString());}
if(ele.length == 1)
fname+=".1.m3u";
else
fname=ele[0]+"."+Integer.toString(i) + ".m3u";
f=new File(fname);
i++;
}
return saveToFile(fname);
}
COM: <s> saves the m3u buffer to a file </s>
|
funcom_train/16796381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getStringWidth(String s) {
setupFontMetrics();
int w;
if (antialiasedText) {
Graphics g = fmImage.getGraphics();
if (g==null) {
fmImage = null;
setupFontMetrics();
g = fmImage.getGraphics();
}
Java2.setAntialiasedText(g, true);
w = Java2.getStringWidth(s, fontMetrics, g);
g.dispose();
} else
w = fontMetrics.stringWidth(s);
return w;
}
COM: <s> returns the width in pixels of the specified string </s>
|
funcom_train/31894512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(String address) {
close();
try {
last = InetAddress.getByName(address);
s = new Socket(last, port);
} catch (UnknownHostException e) {
Console.println("This address cannot be found.");
} catch (IOException e) {
Console.println("IO Error: " + e);
}
if (s != null) {
Console.println("Connected to " + address);
send(info.name, SEND_NAME);
send(null, 3);
} else
Console.println("Connection Failed");
}
COM: <s> connects to another computer </s>
|
funcom_train/38552426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAll(Collection entries) {
Cube42NullParameterException.checkNull(entries,
"entries",
"addAll",
this);
Iterator iter = entries.iterator();
Object entry;
boolean added = true;
while (iter.hasNext()) {
entry = iter.next();
added = added & this.add(entry);
}
return added;
}
COM: <s> appends all of the entries in the specified collection to the end of </s>
|
funcom_train/25564627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChosenData(mipt.data.Data dataToChoose) {
//evdokimov: you should not rely on JList item is Data
//manager.getList().setSelectedValue(dataToChoose, true);
int index = ((ListChoiceModel)manager.getModel()).indexOf(dataToChoose);
if(index<0)return;
isSilent = true;
manager.getList().setSelectedIndex(index);
isSilent = false;
}
COM: <s> sets selected and scrolls to the data to choose </s>
|
funcom_train/4307137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGameMode( int mode ) throws Exception{
// Check to make sure that mode is a legal value
// Call setGameMode() in driver class passing it
// the legal mode. If mode is not a legal value
// an exception will be thrown
if( mode == LOCALGAME || mode == HOSTGAME || mode == CLIENTGAME ){
theDriver.setGameMode( mode );
}else {
throw new Exception( "Invalid Game Mode" );
}
}
COM: <s> set the game mode a local game or a network game </s>
|
funcom_train/22277783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void describeClassInfo(ClassInfo info) {
info.addClass("netscape.application.Color", 1);
info.addField(R_KEY, BYTE_TYPE);
info.addField(G_KEY, BYTE_TYPE);
info.addField(B_KEY, BYTE_TYPE);
}
COM: <s> describes the color class coding information </s>
|
funcom_train/48655580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Payment create(Transaction transaction, double amount, String type) throws Exception{
String id = null;
id = GUID.generate();
Payment pmt = new Payment(id, transaction, amount, type);
Cache c = Cache.getInstance();
c.put(pmt.getId(), pmt);
return pmt;
}
COM: <s> create a payment object </s>
|
funcom_train/3032380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEdit(JPanel panel, JMenuBar menuBar) {
if (debug) System.err.println("addEdit()");
frame.setContentPane(panel);
frame.setSize(bkEdit.dim640);
frame.setJMenuBar(menuBar);
frame.validate();
if (parent != null)
frame.setLocationRelativeTo(parent);
frame.setVisible(true);
}
COM: <s> called by bkedit gui constructor </s>
|
funcom_train/21112644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File dir, String name){
//System.out.println("\taccept file "+name+": "+(new File(dir, name).isFile() && name.indexOf(entry)>=0)+" - "+entry); //***********
return new File(dir, name).isFile() && name.indexOf(entry)>=0;
}
COM: <s> only files containing the entry in the filename are accepted </s>
|
funcom_train/40221125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isThreatened(Coord location) {
Iterator<Coord> i = pieces.keySet().iterator();
Piece homePiece = getPieceAt( location );
int homeColor = Piece.PIECE_COLOR_NONE;
if (homePiece != null) {
homeColor = homePiece.getColor();
}
for (Coord c = null; i.hasNext();)
{
c = i.next();
Piece p = pieces.get( c );
if (p.getColor() != homeColor || homeColor == Piece.PIECE_COLOR_NONE)
{
if ( p.canMove( location ) )
{
return true;
}
}
}
return false;
}
COM: <s> board checks to see if any of the pieces are threatened more </s>
|
funcom_train/32867828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void computeScrollbar(boolean scrollToBottom) {
if (mFontMetrics == null) {
return; // not visible
}
int iSBTop;
if (scrollToBottom) {
iSBTop = mvFormatedLines.size() - miNbrLinesPerPage + 1;
}
else if (mvFormatedLines.size() > miNbrLinesPerPage) {
iSBTop = mScrollbar.getValue();
}
else {
iSBTop = 0;
}
mScrollbar.setValues(iSBTop, 10, 0, mvFormatedLines.size());
}
COM: <s> compute the scrollbar value </s>
|
funcom_train/43410274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InformacaoContacto getInformacaoContacto(String lg, int id, int idSup) {
EntidadesService entidades = new EntidadesService(lg);
entidades.getConnectionDB();
InformacaoContacto result = new InformacaoContacto();
result.setEntidade(entidades.getEntidade(id));
result.setContacto(entidades.getContacto(id, idSup));
entidades.closeConnectionDB();
return result;
}
COM: <s> gets a contact info as a contact and individual entity </s>
|
funcom_train/18756206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean closeDocument() {
if (checkClose()) {
try {
_frame.setClosed(true);
// _frame.dispose();
// dispose should be automagic from
// _frame.setDefaultCloseOperation
XMLEditorFrame.getSharedInstance().activateDocumentAfterClose();
return true;
} catch (java.beans.PropertyVetoException ex) {
MerlotDebug.exception(ex);
}
}
return false;
}
COM: <s> closes the document unless the document is dirty and the user hits cancel </s>
|
funcom_train/49997137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillWeekOptions() {
Day today = Day.getInstance();
Week start = new Week(today.inc(-1 * 52 * 7));
Week end = new Week();
for (Week week = start; week.compareTo(end) <= 0; week = week.inc()) {
this.weekOptions.put(week.getWeekRepresentation(), week.getWeekRepresentation());
}
}
COM: <s> fills out the week options </s>
|
funcom_train/46436026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected XComponent getResourceSet() {
if (resourceSet == null) {
resourceSet = new XComponent(XComponent.DATA_SET);
XComponent form = data_set.getForm();
if (form != null) {
resourceSet = form.findComponent(RESOURCE_SET);
}
}
return resourceSet;
}
COM: <s> gets the resource choice set </s>
|
funcom_train/12776113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initSynthetic(ClassLoaderReference parent) {
ClassLoaderReference synthetic = new ClassLoaderReference(SYNTHETIC, ClassLoaderReference.Java, parent);
setLoaderImpl(synthetic, "com.ibm.wala.ipa.summaries.BypassSyntheticClassLoader");
loadersByName.put(SYNTHETIC, synthetic);
}
COM: <s> create the class loader for synthetic classes </s>
|
funcom_train/49044542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDescriptorIDPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ObjectProperty_descriptorID_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ObjectProperty_descriptorID_feature", "_UI_ObjectProperty_type"),
ItemsPackage.Literals.OBJECT_PROPERTY__DESCRIPTOR_ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the descriptor id feature </s>
|
funcom_train/48099640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(Point2D point) {
return (rectangle.getMinX() <= point.getX()
&& rectangle.getMaxX() >= point.getX()
&& rectangle.getMinY() <= point.getY()
&& rectangle.getMaxY() >= point.getY());
}
COM: <s> tests that the specified point is contained within the bounds </s>
|
funcom_train/21954719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSignature(JEditorPane editor) {
String sig = getSelectedProfile().getSignature();
if (sig != null) {
try {
editor.getDocument().insertString(editor.getCaretPosition(), sig, null);
} catch (javax.swing.text.BadLocationException ble) {
;
}
}
}
COM: <s> this adds the current users signature to the message at the current </s>
|
funcom_train/26279343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JGimpLayer getActiveLayer() throws JGimpException {
JGimpLayer theLayer = (JGimpLayer) m_App.callProcedure("gimp_image_get_active_layer", this)[0];
if (theLayer.getID() == -1) {
return null;
}
return theLayer;
}
COM: <s> returns the active layer in the image null if no layer </s>
|
funcom_train/18808172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(final Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (!(obj instanceof HistogramType)) {
return false;
}
final HistogramType t = (HistogramType) obj;
if (!this.name.equals(t.name)) {
return false;
}
return true;
}
COM: <s> tests this type for equality with an arbitrary object </s>
|
funcom_train/26276996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LgBookmarkFolder getSelectedFolder() {
if (tree.getSelectionCount() != 1)
return null;
TreePath path = tree.getSelectionPath();
UiBookmarkTreeNode node = (UiBookmarkTreeNode) path.getLastPathComponent();
LgBookmarkEntry entry = (LgBookmarkEntry) nodes.get(node);
if (entry instanceof LgBookmarkFolder)
return (LgBookmarkFolder) entry;
return null;
}
COM: <s> returns the logical representation of the current </s>
|
funcom_train/4376699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFragment(String fragment) throws URIException {
if (fragment == null || fragment.length() == 0) {
_fragment = (fragment == null) ? null : fragment.toCharArray();
hash = 0;
return;
}
_fragment = encode(fragment, allowed_fragment, getProtocolCharset());
hash = 0;
}
COM: <s> set the fragment </s>
|
funcom_train/18473558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSortable(Position position) {
Member[] members = position.getMembers();
for (int i = 0; i < members.length; i++)
if (members[i].getLevel().getHierarchy().getDimension().isMeasure())
return true;
return false;
}
COM: <s> returns true if one of the members is a measure </s>
|
funcom_train/18663179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProgress(int seconds) {
int newWidth = 0;
int maxWidth = 446;
progress = Math.max(seconds, 0);
progress = Math.min(progress, duration);
if (duration >= 0) {
newWidth = (int) ((((float) progress) / ((float) duration)) * maxWidth);
}
playbarProgress.setSize(Math.min(newWidth, maxWidth), playbarProgress.height);
playbarProgress.flush();
}
COM: <s> sets the buffer progress or the number of seconds of data buffered </s>
|
funcom_train/43704739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int peek(int lookAhead) {
if (lookAhead < 1 || lookAhead > peakBuffer.capacity()) {
throw new IndexOutOfBoundsException("lookAhead must be between 1 and " + peakBuffer.capacity());
}
if (lookAhead > peakBuffer.limit()) {
return -1;
}
return peakBuffer.get(lookAhead - 1);
}
COM: <s> return a character that is further in the stream </s>
|
funcom_train/3289755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MMObjectNode getNewNode(String owner) {
MMObjectNode node=super.getNewNode(owner);
// readCDInfo();
// if (diskid!=null) node.setValue("discId",diskid);
// if (playtime!=-1) node.setValue("playtime",playtime);
return(node);
}
COM: <s> get new node </s>
|
funcom_train/46761259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HelpContentModel getHelpContent(final long helpContentId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return SystemData.getHelpContent(helpContentId, chain, call);
}}; return (HelpContentModel) call(method, call);
}
COM: <s> same transaction return the single help content model for the primary key </s>
|
funcom_train/10350417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void closeConnection() throws QueryExecutionException {
try {
connection.close();
connection = null;
}
catch (SQLException e) {
throw new QueryExecutionException(
"Encountered a problem closing the SQL connection", e);
}
finally {
if (connection != null) { // close failed - try once more
try {
connection.close();
}
catch (SQLException e) {
;
}
connection = null;
}
}
}
COM: <s> close the connection to a oracle database </s>
|
funcom_train/22379878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parse(String path) {
try {
BufferedReader reader = new BufferedReader(new FileReader
(path));
new ParserDelegator().parse(reader, new CallbackHandler(), true);
}
catch (IOException ioe) {
System.out.println("IOE: " + ioe);
JOptionPane.showMessageDialog(null, "Load Concepts",
"Unable to load concepts",
JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> adds the bookmarks in the file at code path code to the </s>
|
funcom_train/34811080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void filterSubWindow(){
Interval interval;
int counter = 0;
for (int i=0; i<good.size(); i++){
interval = (Interval)good.get(i);
if (interval.getBestSubWindow() == null){
System.out.println("\tNo sub window!, deleting");
bad.add(interval);
good.remove(i);
i--;
counter++;
}
else if (subWindowValue > interval.getBestSubWindow().getMedianRatio()){
bad.add(interval);
good.remove(i);
i--;
counter++;
}
}
System.out.println(counter + " additional intervals removed by filtering for a fold difference in the sub window of less than "+subWindowValue);
}
COM: <s> filters by the median ratio of the sub window </s>
|
funcom_train/16804374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("AppIntfWS".equals(portName)) {
setAppIntfWSEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/50816146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(Comparable<?> min, Comparable<?> max, Number stepSize) {
if (min != null) {
this.model.setMinimum(min);
}
if (max != null) {
this.model.setMaximum(max);
}
if (stepSize != null) {
this.model.setStepSize(stepSize);
}
}
COM: <s> initialize the values for the spinner </s>
|
funcom_train/36679716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadCitySprite(City city) {
Color cityColor = city.getOwner().getColor();
CitySprite sprite = createCitySprite(city);
recolorCitySprite(city, sprite, cityColor);
sprite.setUpdateAnim(false);
addCitySprite(city, sprite);
sprite.addPropertyChangeListener(this);
city.addPropertyChangeListener(this);
}
COM: <s> make a graphical representation city sprite for the city </s>
|
funcom_train/2935945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTargetStatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Transition_targetState_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Transition_targetState_feature", "_UI_Transition_type"),
StatemPackage.Literals.TRANSITION__TARGET_STATE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the target state feature </s>
|
funcom_train/18135314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TaskInstance getTaskInstance(String taskId, String instanceId) {
Collection<TaskInstance> taskInstances = taskInstanceMap.get(taskId);
if (taskInstances != null) {
TaskInstance taskInstance = null;
Iterator<TaskInstance> iterator = taskInstances.iterator();
while (taskInstance == null && iterator.hasNext()) {
TaskInstance currentInstance = iterator.next();
if (currentInstance.getId().equals(instanceId)) {
taskInstance = currentInstance;
}
}
return taskInstance;
} else {
return null;
}
}
COM: <s> method for getting the task instance with the given id </s>
|
funcom_train/45251584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFilter(ViewerFilter filter) {
viewerFilter = filter;
getViewer().addFilter(filter);
setInitialText(WorkbenchMessages.FilteredTree_FilterMessage);
if (filterText != null) {
setFilterText(WorkbenchMessages.FilteredTree_FilterMessage);
textChanged();
}
cachedTitle = getShell().getText();
getShell().setText(
NLS.bind(
WorkbenchMessages.FilteredTree_FilteredDialogTitle,
cachedTitle));
}
COM: <s> add an additional optional filter to the viewer </s>
|
funcom_train/10179199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doEndTag() throws JspException {
if (processed && footer != null && footer.length() > 0) {
String footerMessage =
TagUtils.getInstance().message(pageContext, bundle, locale, footer);
if (footerMessage != null) {
TagUtils.getInstance().write(pageContext, footerMessage);
}
}
return EVAL_PAGE;
}
COM: <s> clean up after processing this enumeration </s>
|
funcom_train/32056782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRefresh() {
System.out.println("testRefresh");
Object obj = new Object();
JGraph jgraph = new JGraph();
CellMapper cellmapper = null;
EdgeView edge = new EdgeView(obj, jgraph, cellmapper);
edge.refresh(true);
//cant assert
}
COM: <s> this function tests refresh function of edge view class </s>
|
funcom_train/42902888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCDFT() throws Exception {
putdata(0, NMAX - 1, a);
fftsg.cdft(NMAX, 1, a, ip, w);
fftsg.cdft(NMAX, -1, a, ip, w);
double err = errorcheck(0, NMAX - 1, 2.0 / NMAX, a);
System.out.printf("cdft err= %g \n", err);
assertEquals(0, err);
}
COM: <s> check of cdft </s>
|
funcom_train/47314733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getAboutMenuItem() {
if (aboutMenuItem == null) {
aboutMenuItem = new JMenuItem();
aboutMenuItem.setText(localization
.getProperty("loc-Gui2007-aboutMenuItem"));
aboutMenuItem
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
showAbout();
}
});
}
return aboutMenuItem;
}
COM: <s> this method initializes about menu item </s>
|
funcom_train/20310459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void translateDomainRangeAxioms( Element expr, String propURI, String axiomType, Iterator i, String propType, Model source ) {
while (i.hasNext()) {
Element drAxiom = addElement( expr, axiomType );
addNamedElement( drAxiom, propType, propURI );
addClassDescription( drAxiom, (Resource) i.next(), source );
}
}
COM: <s> domain and range are translated as dig domain and range elements </s>
|
funcom_train/5445116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getClass(int Index) {
if ((Index < 1) || (Index >= ItemType.length) || (ItemType[Index] != CONSTANT_CLASS))
throw new ClassFormatError("Constant pool item does not exist");
return getUtf8(((Integer)ItemValue1[Index]).intValue()).replace('/','.');
}
COM: <s> get the class name from a class constant </s>
|
funcom_train/8081390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNominalLabels() {
String labelList = "";
for(int i = 0; i < m_Labels.size(); i++) {
if (i == 0) {
labelList = (String)m_Labels.elementAt(i);
} else {
labelList += "," + (String)m_Labels.elementAt(i);
}
}
return labelList;
}
COM: <s> get the list of labels for nominal attribute creation </s>
|
funcom_train/11650700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(OutputStream os, String hexEncodedBinary) {
try {
os.write(hexStringToByteArray(hexEncodedBinary));
os.flush();
} catch (IOException e) {
log.warn("Write error", e);
}
log.debug("Wrote: " + hexEncodedBinary);
return;
}
COM: <s> input hex string is converted to binary and written to the output stream </s>
|
funcom_train/25825240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void applyColor(ArrayList<double[]> contour, Color color) {
for (double[] vertex : contour) {
// Set the RGBA components
vertex[3] = color.getRed();
vertex[4] = color.getGreen();
vertex[5] = color.getBlue();
vertex[6] = color.getAlpha();
}
}
COM: <s> applies a color to each vertex in a list of vertices </s>
|
funcom_train/34536920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSelectParameter(String _parameter, String _fieldName) {
if (this.paramSelect == null) this.paramSelect = new Vector<QueryParameterStructure>();
QueryParameterStructure aux = new QueryParameterStructure(_parameter, _fieldName, "SELECT");
paramSelect.addElement(aux);
}
COM: <s> adds a new parameter to the select section of the query </s>
|
funcom_train/4519867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uncheckSubTree(TreePath path) {
removeFromCheckedPathsSet(path);
Object node = path.getLastPathComponent();
int childrenNumber = this.model.getChildCount(node);
for (int childIndex = 0; childIndex < childrenNumber; childIndex++) {
TreePath childPath = path.pathByAddingChild(this.model.getChild(
node, childIndex));
uncheckSubTree(childPath);
}
}
COM: <s> unchecks the subtree with root path </s>
|
funcom_train/42642921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFormatPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ITermPart_format_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ITermPart_format_feature", "_UI_ITermPart_type"),
DigitalHPSPackage.Literals.ITERM_PART__FORMAT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the format feature </s>
|
funcom_train/28750979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPrintrunnum(Long newVal) {
if ((newVal != null && this.printrunnum != null && (newVal.compareTo(this.printrunnum) == 0)) ||
(newVal == null && this.printrunnum == null && printrunnum_is_initialized)) {
return;
}
this.printrunnum = newVal;
printrunnum_is_modified = true;
printrunnum_is_initialized = true;
}
COM: <s> setter method for printrunnum </s>
|
funcom_train/8408296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeComposited(Collection coll) {
ArrayList list = new ArrayList(this.all.length);
list.addAll(Arrays.asList(this.all));
list.remove(coll);
this.all = (Collection[]) list.toArray(new Collection[list.size()]);
}
COM: <s> removes a collection from the those being decorated in this composite </s>
|
funcom_train/9946355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handlePropertyChange(java.lang.Object newValue) {
if (newValue==null) {
System.err.println("handlePropertyChange value was null");
return;
}
if (!(newValue instanceof equip.data.IntArrayBox)) {
System.err.println("handlePropertyChange value has wrong class: "+
newValue.getClass().getName());
return;
}
setValue((equip.data.IntArrayBox)newValue);
}
COM: <s> handle property change </s>
|
funcom_train/134091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRange(int start, int end) {
this.range = new Range(start, end);
trace_map.setMapRange(start, end);
base_map.setMapRange(start, end);
Rectangle2D.Double box = base_axis.getCoordBox();
base_axis.setCoords(start, box.y, end - start, box.height);
}
COM: <s> adjusts the bounds of the trace and sequence displayed </s>
|
funcom_train/15692926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getUnreal() {
byte[] b = getByteArray();
int intpart = getInt(b[0], b[1], 0, 0);
int fracpart = getInt(0, 0, b[2], b[3]);
float u = intpart + ((float) fracpart) / ((float) 65536);
return u;
}
COM: <s> returns an unreal with this bitpattern </s>
|
funcom_train/3287325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Answer getTopAnswer() {
Answer top = null;
for ( int i = 0; i < answers.length; ++i ) {
if ( top == null ||
this.answers[i].getVoteCount() > top.getVoteCount() ) {
top = this.answers[i];
continue;
}
}
return top;
}
COM: <s> get the answer that is currently the most popular has the most votes </s>
|
funcom_train/3721458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Structure findStructure(String namePattern, int rep) throws HL7Exception {
Structure s = null;
while (s == null) {
iterate(false, false);
String currentName = getCurrentStructure(0).getName();
if (matches(namePattern, currentName)) {
s = getCurrentStructure(rep);
}
}
return s;
}
COM: <s> returns the first matching structure after the current position </s>
|
funcom_train/2026180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copy(File sourceFile, File destinationFile) {
try {
FileChannel in = new FileInputStream(sourceFile).getChannel();
FileChannel out = new FileOutputStream(destinationFile)
.getChannel();
try {
in.transferTo(0, in.size(), out);
in.close();
out.close();
} catch (IOException e) {
GTLogger.getInstance().error(e);
}
} catch (FileNotFoundException e) {
GTLogger.getInstance().error(e);
}
}
COM: <s> overwrites the existing destination file with the source file </s>
|
funcom_train/50154708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMappingClass(ActionMapping mapping, ActionClass action) {
ActionClass[] _old = this.getActions();
removeMappingParentAction(mapping);
action.addActionMapping(mapping);
// Since actions don't "officially" exist until they're tied to an
// action mapping, we'll fire the event in this seemingly unlikely place.
getPropertyChangeSupport().firePropertyChange("actions", _old, getActions());
}
COM: <s> assigns the implementation class to the supplied </s>
|
funcom_train/2040245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkSettings() {
AppSetting appSetting = ClientDataBase.appSetting;
String currentServer = appSetting.getCurrentServer();
String currentPanel = appSetting.getCurrentPanelIdentity();
if ("".equals(currentServer) || "".equals(currentPanel)) {
toSetting();
} else {
readPanelXmlEntity();
}
}
COM: <s> check controller server and panel identity configuration </s>
|
funcom_train/36189812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
return new PSSMethodCodeAdapter(mv, m_outer, access, name, desc, m_fields);
}
COM: <s> visits a method </s>
|
funcom_train/2628444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetIgnoredComponents() {
System.out.println("[getIgnoredComponents]");
Configuration instance = new Configuration();
ComponentListType expResult = new ComponentListType();
instance.ignoredComponents = expResult;
ComponentListType result = instance.getIgnoredComponents();
assertEquals(expResult, result);
}
COM: <s> test of get ignored components method of class configuration </s>
|
funcom_train/17900456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void block() {
GUIUtils.invokeLater(new Runnable() {
public void run() {
if (getRootPane().getGlassPane().isVisible()) {
return;
}
getRootPane().getGlassPane().setVisible(true);
}
});
updateCursor(true);
}
COM: <s> indicates that a long running process has begun </s>
|
funcom_train/10230790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAllowed(int port) {
try {
for (int i = 0; i < m_Constraints.size(); i++) {
AclElement acl = (AclElement) m_Constraints.elementAt(i);
if (acl.isContained(null, port)) {
return acl.isAccept();
}
}
} catch (Exception e) {
}
return false;
}
COM: <s> checks if a port is allowed ignoring the ip </s>
|
funcom_train/12833069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean next() throws SQLException {
boolean answer = false;
answer = reader.next();
//We have a where clause, honor it
// if(whereColumn > -1) {
// while(answer && !reader.getColumn(whereColumn).equals(whereValue)) {
// answer = reader.next();
//// return reader.next();
// }
// }
if(whereColumnName != null) {
while(answer && !reader.getColumn(whereColumnName).equals(whereValue)) {
answer = reader.next();
}
}
return answer;
}
COM: <s> moves the cursor down one row from its current position </s>
|
funcom_train/9143656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean verifyGetInstance() {
if (this.instanceField != null) {
Set<MethodNode> methods =
this.singletonCandidate.getAllMethodsThatReturn(singletonCandidate.getName());
for (MethodNode method : methods) {
if (hasAllGetInstanceProperties(method)) {
return true;
}
}
addError(SingletonPatternChecker.GET_INSTANCE_NOT_FOUND_ERROR);
return false;
} else {
addWarning(SingletonPatternChecker.GET_INSTANCE_FIELD_MISS_WARN);
return true;
}
}
COM: <s> this method verifies whether any of the known methods of the </s>
|
funcom_train/41621231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateAutomatic() {
if(this.controller.getActiveAnimation() != null && this.animations.length > 0 && this.controller.getActiveAnimation().isCyleComplete()) {
this.controller.setFading(this.animations[this.index], 0, false);
this.index++;
if(this.index >= this.animations.length) this.index = 0;
}
}
COM: <s> update the automatic control </s>
|
funcom_train/7862038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertEquals(int index, String value) {
logger.fine("index: " + index);
logger.fine("value: " + value);
Assert.assertEquals ("Expected string value for result index " + index, value, result[index].getDomNode().getFirstChild().getNodeValue());
}
COM: <s> assert that an xml document returned by the xquery contains an xml node </s>
|
funcom_train/35165453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClientChannelListener joinedChannel(ClientChannel clientChannel) {
logger.info("Darkstar server has joined us to channel " + clientChannel.getName());
playerChannels.put(clientChannel.getName(), clientChannel);
// The current class is also responsible for handling incoming messages
// from the Darkstar server.
return this;
}
COM: <s> if the server joins us to a new channel we will be informed </s>
|
funcom_train/48869529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(String id, Connection conn) throws DataException, SQLException {
PreparedStatement ps = conn.prepareStatement("delete from PHYSICAL where PHYSICALID = ?");
ps.setString(1, id);
ps.executeUpdate();
super.delete(id, conn);
}
COM: <s> deletes an object from the db </s>
|
funcom_train/21983950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toDebugString() {
calculateInvoiceTotal();
System.out.println("---NEW INVOICE " + invoiceID + "---");
System.out.println();
Iterator iter = invoiceLines.iterator();
while ( iter.hasNext() ) {
AbstractInvoiceLine line = (AbstractInvoiceLine)iter.next();
line.debugPrint();
}
iter = taxBuckets.values().iterator();
while ( iter.hasNext() ) {
TaxBucket bucket = (TaxBucket)iter.next();
bucket.debugPrint();
}
System.out.println("Invoice total: " + invTotal.toFormattedString() );
}
COM: <s> a debugging method that prints the whole invoice to system </s>
|
funcom_train/37835796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void insertHeader(final String header) {
final Document doc = textPane.getDocument();
try {
if (header.length() > 0) {
doc.insertString(doc.getLength(), "<" + header + "> ",
textPane.getStyle("header"));
}
} catch (final BadLocationException e) {
logger.error("Couldn't insert initial text.", e);
}
}
COM: <s> insert a header </s>
|
funcom_train/1720120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PsiField findFieldByName(PsiClass clazz, String name) {
PsiField[] fields = clazz.getFields();
// use reverse to find from botton as the duplicate conflict resolution policy requires this
for (int i = fields.length - 1; i >= 0; i--) {
PsiField field = fields[i];
if (name.equals(field.getName()))
return field;
}
return null;
}
COM: <s> finds an existing field with the given name </s>
|
funcom_train/510857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Complex sqrt() {
double r = StrictMath.sqrt(this.x*this.x + this.y*this.y);
double rpart=StrictMath.sqrt(0.5*(r+this.x));
double ipart=StrictMath.sqrt(0.5*(r-this.x));
if(this.y<0.0) ipart=-ipart;
return new Complex(rpart, ipart);
}
COM: <s> compute the square root of the complex number </s>
|
funcom_train/25088684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createGameContainer() {
GridBagConstraints gbc_pnlGameContainer = new GridBagConstraints();
gbc_pnlGameContainer.fill = GridBagConstraints.BOTH;
gbc_pnlGameContainer.insets = new Insets(5, 5, 5, 5);
gbc_pnlGameContainer.gridx = 0;
gbc_pnlGameContainer.gridy = 0;
// container for game presentation
JPanel pnlGameContainer = new JPanel();
getContentPane().add(pnlGameContainer, gbc_pnlGameContainer);
}
COM: <s> creates the container for game specific components </s>
|
funcom_train/46440345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveFileFromArchive(String fromDir, String toDir) {
final String homeDir = DirectoryHelper.getHomeDirectory();
final File file = new File(homeDir + fromDir);
final File[] files = file.listFiles();
for (File fileObject : files) {
final String newDir = homeDir + toDir;
final File newFile = new File(newDir, fileObject.getName());
fileObject.renameTo(newFile);
}
}
COM: <s> moves any feed files from in the archive directory to the incoming </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.