__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/20970180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startService() {
// Create the request queue
createRequestQueue();
try {
// Create our Server Socket
if (log.isDebugEnabled())
log.debug("Start listening port "
+ this.serverConfiguration.getPort());
final ServerSocketFactory ssf = ServerSocketFactory.getDefault();
this.serverSocket = ssf.createServerSocket(this.serverConfiguration
.getPort(), this.serverConfiguration.getBacklog());
// Start our thread
this.start();
} catch (final Exception e) {
throw new NetServeRuntimeException(e);
}
}
COM: <s> starts this server </s>
|
funcom_train/8576371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
if (e.getActionCommand() == "join") {
IPPanel.setVisible(true);
buttonString = "join";
} else if (e.getActionCommand() == "start") {
IPPanel.setVisible(false);
buttonString = "start";
} else if (e.getActionCommand() == "go") {
Transition();
}
}
COM: <s> catches button clicks on the window </s>
|
funcom_train/3434641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeNestingLevel() {
if (orb == null ||
ORBVersionFactory.getFOREIGN().equals(orb.getORBVersion()) ||
ORBVersionFactory.getNEWER().compareTo(orb.getORBVersion()) <= 0) {
write_long(chunkedValueNestingLevel);
} else {
write_long(end_flag);
}
}
COM: <s> handles orb versioning of the end tag </s>
|
funcom_train/3379944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(int modlen, boolean genParams, SecureRandom random) {
checkStrength(modlen);
if (genParams) {
params = null;
} else {
params = ParameterCache.getCachedDSAParameterSpec(modlen);
if (params == null) {
throw new InvalidParameterException
("No precomputed parameters for requested modulus size "
+ "available");
}
}
this.modlen = modlen;
this.random = random;
this.forceNewParameters = genParams;
}
COM: <s> initializes the dsa key pair generator </s>
|
funcom_train/45856688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateNummerAanduiding(nl.vrom.www.bag.stuf._0120.NummerAanduiding_type2[] param){
if ((param != null) && (param.length > 4)){
throw new java.lang.RuntimeException();
}
if ((param != null) && (param.length < 1)){
throw new java.lang.RuntimeException();
}
}
COM: <s> validate the array for nummer aanduiding </s>
|
funcom_train/14298799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DocumentBuilder getDocumentBuilder() throws ServletException {
DocumentBuilder documentBuilder;
DocumentBuilderFactory documentBuilderFactory;
try {
documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
documentBuilder = documentBuilderFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
throw new ServletException("jaxp failed");
}
return documentBuilder;
}
COM: <s> resourcetype return jaxp document builder instance </s>
|
funcom_train/6407598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(String command, int[] keyCode) {
ArrayList<KeyCodes> keyList = new ArrayList<KeyCodes>();
KeyCodes key = new KeyCodes();
key.keys = keyCode;
keyList.add(key);
keyMap.put(command, keyList);
}
COM: <s> code set code sets the command to the given list of keycodes </s>
|
funcom_train/26282635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
switch (getSize()) {
case 1 : return "Single: " + getHighCard();
case 2 : return "Pair: " + getHighCard() + " high";
default : return getSize() + " of a kind: " + getHighCard() + " high";
}
}
COM: <s> gets a string representation of this of a kind stating the number of </s>
|
funcom_train/10298891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NavigatorView getCurrentNavigatorView() {
// if the current Nav isn't set then use the first Nav from the
// the helpset.
if (curNav == null) {
if (helpset != null) {
NavigatorView views[] = helpset.getNavigatorViews();
curNav = views[0];
} else {
// Argh! there werent' any navigators in the helpset
// return null;
return null;
}
}
return curNav;
}
COM: <s> returns the current navigator as a navigator view </s>
|
funcom_train/45017653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void straighten() {
glRotatef(-this.yrot, 0.0f, 1.0f, 0.0f);
glRotatef(-this.xrot, 1.0f, 0.0f, 0.0f);
glScalef((float) Math.exp(-this.zoomPower), (float) Math
.exp(-this.zoomPower), 1);
}
COM: <s> undoes the rotation of a scene useful for billboarding such </s>
|
funcom_train/33728612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getListOfAvailableFLVs() {
IScope scope = Red5.getConnectionLocal().getScope();
Map<String, Map> filesMap = new HashMap<String, Map>();
try {
log.debug("getting the FLV files");
Resource[] flvs = scope.getResources("streams/*.flv");
addToMap(filesMap, flvs);
Resource[] mp3s = scope.getResources("streams/*.mp3");
addToMap(filesMap, mp3s);
} catch (IOException e) {
log.error("{}", e);
}
return filesMap;
}
COM: <s> getter for property list of available flvs </s>
|
funcom_train/34627518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected TexMathScanner getTeXMathScanner() {
if (mathScanner == null) {
mathScanner = new TexMathScanner(colorManager);
mathScanner.setDefaultReturnToken(
new Token(
new TextAttribute(
colorManager.getColor(ColorManager.EQUATION),
null,
colorManager.getStyle(ColorManager.EQUATION_STYLE))));
}
return mathScanner;
}
COM: <s> defines a math partition scanner and sets the default </s>
|
funcom_train/51695936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDescription(String description)
{
boolean equals = false;
if ( description == null )
{
if ( this.getDescription() == null )
{
equals = true;
}
}
else
{
equals = description.equals(this.getDescription());
}
if ( ! equals )
{
String old = this.getDescription();
this.description = description;
this.firePropertyChange(PROPERTY_DESCRIPTION, old, this.getDescription());
}
}
COM: <s> set the description of the page </s>
|
funcom_train/45935820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void generatePackageUse(PackageDoc pkg) {
if (pkg == null)
return;
trBgcolorStyle("white", "TableRowColor");
summaryRow(0);
// Just want an anchor here.
printHyperLink("", pkg.name(), Util.getPackageName(pkg), true);
summaryRowEnd();
summaryRow(0);
printSummaryComment(pkg);
space();
summaryRowEnd();
trEnd();
}
COM: <s> print the package use list </s>
|
funcom_train/43098379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object buildInternalTransition(Object state) {
if (state instanceof MState) {
MTransition trans = (MTransition) createTransition();
trans.setState((MState) state);
trans.setSource((MState) state);
trans.setTarget((MState) state);
return trans;
}
return null;
}
COM: <s> builds an internal transition for a given state </s>
|
funcom_train/34286377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getURIMappings() {
if (mappings.size() == 0) {
return("No URI mappings defined.");
}
StringBuffer buf = new StringBuffer();
URIMapping mapping;
buf.append("Contents of URI Mapping Cache:\n");
for (Iterator<URIMapping> it = mappings.iterator(); it.hasNext(); ) {
mapping = it.next();
buf.append(mapping.toString() + "\n");
}
return(buf.toString());
}
COM: <s> this method returns a list of the uri mappings that have been cached </s>
|
funcom_train/118943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getNextCellForLocation(Object current, int x, int y) {
x /= scale;
y /= scale; // FIX: Consistency with other methods?
CellView cur = graphLayoutCache.getMapping(current, false);
CellView cell = getNextViewAt(cur, x, y);
if (cell != null)
return cell.getCell();
return null;
}
COM: <s> returns the cell at the specified location that is behind the </s>
|
funcom_train/43410389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean existeMorada(Morada mor, ArrayList<Morada> lista) {
boolean result = false;
if (!lista.isEmpty()) {
for (int i = 0; i
< lista.size(); i++) {
if (mor.getNumeroMorada() == lista.get(i).getNumeroMorada()) {
result = true;
break;
}
}
}
return result;
}
COM: <s> checks if an address already exists in an adresses list </s>
|
funcom_train/11013449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHide() {
wbU.setSheetHidden(0, true);
assertTrue(wbU.isSheetHidden(0));
assertFalse(wbU.isSheetHidden(1));
Workbook wb2 = _testDataProvider.writeOutAndReadBack(wbU);
assertTrue(wb2.isSheetHidden(0));
assertFalse(wb2.isSheetHidden(1));
}
COM: <s> turn the sheet with none hidden into the one with </s>
|
funcom_train/18545820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkJobLimits(){
if (this.label.getX()<0) {
this.label.setLocation(0, label.getY());
}
if (this.label.getX() + this.label.getWidth() > this.parentGantt.getGanttWidth()) {
this.label.setLocation(this.parentGantt.getGanttWidth() -
this.label.getWidth(), this.label.getY());
}
}
COM: <s> verify if a job label is out of gantt bounds </s>
|
funcom_train/44459806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnknownFunction() throws Exception {
XINSCallRequest request = new XINSCallRequest("Unknown");
XINSServiceCaller caller = new XINSServiceCaller(_target);
try {
XINSCallResult result = caller.call(request);
} catch (StatusCodeHTTPCallException exception) {
assertEquals("Incorrect status code found.", 404, exception.getStatusCode());
}
}
COM: <s> tests a function that does not exists </s>
|
funcom_train/33531191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startApp() {
if (midletPaused) {
resumeMIDlet();
} else {
initialize();
Jogo j = new Jogo();
Thread t = new Thread(j);
t.start();
Display d = Display.getDisplay(this);
d.setCurrent(j.getFaseAtual());
//startMIDlet ();
}
midletPaused = false;
}
COM: <s> called when midlet is started </s>
|
funcom_train/18656431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void freeConnection(String name, Connection con) {
try{
con.rollback();
}catch(Exception ex){
log("could not prepare database connection rollbacked"+ex.getMessage()+ex.getCause());
}
DBConnectionPool pool = (DBConnectionPool) pools.get(name);
if (pool != null) {
pool.freeConnection(con);
}
}
COM: <s> returns a connection to the named pool </s>
|
funcom_train/9700173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSpeed() {
System.out.println("getSpeed");
assertEquals(4.53, goodInstance.getSpeed());
// assertEquals(8.389560000000001, goodInstance.getSpeed(SpeedType.KMPH));
// assertEquals(5.213030682, goodInstance.getSpeed(SpeedType.MPH));
}
COM: <s> test of get speed method of class gprmcframe </s>
|
funcom_train/8687283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DistinguishedName createDname() throws BuildException {
if (null != expandedDname) {
throw new BuildException("DName sub-element can only be "
+ "specified once.");
}
if (null != dname) {
throw new BuildException("It is not possible to specify dname "
+ " both as attribute and element.");
}
expandedDname = new DistinguishedName();
return expandedDname;
}
COM: <s> distinguished name list </s>
|
funcom_train/9713163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTransportIn(TransportInDescription transport) throws AxisFault {
if (transport.getReceiver() == null) {
throw new AxisFault(
"Transport Receiver can not be null for the transport "
+ transport.getName());
}
transportsIn.put(transport.getName(), transport);
}
COM: <s> method add transport in </s>
|
funcom_train/46293908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasTooManyDeletedDocs(double percent) {
assert percent <= 1.0;
DirectoryIndexSnapshot indexSnapshot = getLatestIndexSnapshot();
if (indexSnapshot != null) {
IndexReader indexReader = indexSnapshot.getIndexReader();
int maxDoc = indexReader.maxDoc();
int deletedDocs = maxDoc - indexReader.numDocs();
if (deletedDocs > (maxDoc * percent))
return true;
}
return false;
}
COM: <s> private index info load index info throws exception </s>
|
funcom_train/3903718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateWeightType_Min(BigDecimal weightType, DiagnosticChain diagnostics, Map context) {
boolean result = weightType.compareTo(WEIGHT_TYPE__MIN__VALUE) >= 0;
if (!result && diagnostics != null)
reportMinViolation(ImsssPackage.Literals.WEIGHT_TYPE, weightType, WEIGHT_TYPE__MIN__VALUE, true, diagnostics, context);
return result;
}
COM: <s> validates the min constraint of em weight type em </s>
|
funcom_train/14169897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
connection.connect();
setMaximum(connection.getContentLength());
initializeForDownload();
byte[] buffer = new byte[2048];
InputStream dta = connection.getInputStream();
int cnt = 0;
int total = 0;
while ((cnt = dta.read(buffer)) != -1) {
handleIncomingData(buffer, cnt);
notifyListeners(total += cnt);
}
finalizeAfterDownload();
} catch (IOException e) {
setMaximum(0);
handleInterruptedDownload();
// getMaximum() to handle the case that subclasses would change the
// maximum in the handle.
notifyListeners(getMaximum());
}
}
COM: <s> starts the download </s>
|
funcom_train/27904165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assure(StringTokenizer st, String str) throws IOException {
if(!st.hasMoreTokens()) throw new IOException("pre-mature end of line when waiting for " + str);
String got = st.nextToken();
if(! got.equalsIgnoreCase( str) ) throw new IOException("Expected " + str + ", got " + got);
}
COM: <s> assert next word in the line is the one we want </s>
|
funcom_train/48257149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void leftRotate( Node x ) {
Node y = x.right;
x.right = y.left;
if( y.left != nil )
y.left.parent = x;
y.parent = x.parent;
if( x.parent == null )
root = y;
else {
if( x == x.parent.left )
x.parent.left = y;
else
x.parent.right = y;
}
y.left = x;
x.parent = y;
}
COM: <s> performs a left rotation on node x </s>
|
funcom_train/28262225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNumDrives() {
int numDrives = 0;
for (int i = 0; i < channels.length; i++) {
for (int j = 0; j < channels[i].getDrives().length; j++) {
if (channels[i].getDrives()[j].driveType != ATADriveType.NONE) {
numDrives++;
}
}
}
return numDrives;
}
COM: <s> get number of drives </s>
|
funcom_train/13993647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFind01() throws Exception {
Map request = new HashMap();
request.put(TestObject.NAME, "test");
List result = testObjectManager.find(request);
assertEquals(1, result.size());
assertEquals(true, result.contains(testObjects[0]));
assertEquals(false, result.contains(testObjects[1]));
}
COM: <s> tests that code test content manager code returns the correct objects </s>
|
funcom_train/3791470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void firePathPlaceChange(PathPlace mp) {
Object[] listeners = _pathPlaceEventListeners.toArray();
// loop through each listener and pass on the event if needed
for (int i = 0; i < listeners.length;i++) {
// pass the event to the listeners event dispatch method
((PathPlaceEventListener)listeners[i]).mapPlaceStateChanged(new PathPlaceEvent(mp));
}
}
COM: <s> notify all map place listeners that the state of a cell has changed </s>
|
funcom_train/33725696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLevelsEnabled(int[] levels, boolean value) {
for (int i = 0; i < moLayers.length; i++) {
ArrayList layer = moLayers[i];
if (intBelongsToArray(i, levels)) {
for (int j = 0; j < layer.size(); j++) {
AudibleMenuItem item = (AudibleMenuItem) layer.get(j);
item.setEnabled(value);
}
}
}
}
COM: <s> this function will set certain levels specified to be enabled </s>
|
funcom_train/34477811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long timeStampToLong(String time_stamp) {
// synchronized (SdaiCommon.syncObject) {
String str;
if (time_stamp.length() > 19) {
str = time_stamp.substring(0,10) + time_stamp.substring(11);
} else {
str = time_stamp;
}
ParsePosition position = new ParsePosition(0);
Date dt = dformat.parse(str, position);
if (dt == null) {
return -1;
}
setTime(dt);
return getTimeInMillis();
// } // syncObject
}
COM: <s> converts the time value specified by code string code to </s>
|
funcom_train/12636933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void launchMidlet(RunningMIDletSuiteInfo msi) {
if (msi.hasSingleMidlet()) {
manager.launchSuite(msi, msi.midletToRun);
display.setCurrent(this);
} else {
try {
new MIDletSelector(msi, display, this, manager);
} catch (Throwable t) {
displayError.showErrorAlert(msi.displayName, t,
null, null);
}
}
}
COM: <s> launches the midlet suite described by the given midlet suite info </s>
|
funcom_train/12810927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String cat = request.getParameter("cat");
String coll = request.getParameter("coll");
UserAccount ua = UserTrap.getUserAccount(request);
if (cat.compareTo("all") == 0) {
ua.resetAll();
} else if (coll.compareTo("all") == 0) {
ua.resetCat(cat);
} else ua.resetFilter(coll, cat);
}
COM: <s> given the category and the collection as </s>
|
funcom_train/7612344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void assertLeftAligned(View first, View second) {
int[] xy = new int[2];
first.getLocationOnScreen(xy);
int firstLeft = xy[0];
second.getLocationOnScreen(xy);
int secondLeft = xy[0];
assertEquals("views are not left aligned", firstLeft, secondLeft);
}
COM: <s> assert that two views are left aligned that is that their left edges </s>
|
funcom_train/1149217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand14() {
if (okCommand14 == null) {//GEN-END:|222-getter|0|222-preInit
// write pre-init user code here
okCommand14 = new Command("Ok", Command.OK, 0);//GEN-LINE:|222-getter|1|222-postInit
// write post-init user code here
}//GEN-BEGIN:|222-getter|2|
return okCommand14;
}
COM: <s> returns an initiliazed instance of ok command14 component </s>
|
funcom_train/37590524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _resetUndo() {
if (_undoAction == null) _undoAction = new UndoAction();
if (_redoAction == null) _redoAction = new RedoAction();
_doc.resetUndoManager();
_doc.addUndoableEditListener(_undoListener);
_undoAction.updateUndoState();
_redoAction.updateRedoState();
}
COM: <s> reset the document undo list </s>
|
funcom_train/25475608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateMetadata () {
// We need to wipe out all entropy and scans as potentially we are redoing
// subalignments that use metadata. This could be made a bit smarter. TODO
main.clearAllAnalysis();
for (String name : alignments.keySet()) {
SubsetAlignment alignment = alignments.get(name);
SubsetSelection selection = alignment.getSubsetSelection();
if (selection instanceof SubsetMetadataSelection) {
removeSubsetAlignment(name);
alignment = new SubsetAlignment (selection);
if (alignment.getSequenceCount() > 0) {
putSubsetAlignment (alignment);
}
} else {
alignment.updateMetadata();
}
}
}
COM: <s> invoked when main alignment metadata has been updated </s>
|
funcom_train/4978381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ArrayList filterFeedbacks(ArrayList<FeedbackRating> list, int sign) {
ArrayList<FeedbackRating> result = new ArrayList<FeedbackRating>(0);
for (Iterator<FeedbackRating> i = list.iterator(); i.hasNext();) {
FeedbackRating feedback = i.next();
if (sign == feedback.getValue()) {
result.add(feedback);
}
}
return result;
}
COM: <s> filter a list of feedbacks for a given sign </s>
|
funcom_train/4744195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onUpdateSelection(T selectedObject, List<T> objectList) {
if (selectedObject != null) {
this.state = State.EDIT_ENTRY;
if (selectedObject == this.newEntry) {
this.state = State.UNSELECTED;
}
} else {
this.state = State.UNSELECTED;
}
this.removeNewEntry(objectList);
}
COM: <s> event handler for change of the table selection </s>
|
funcom_train/5572968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JMenuItem createOpenMI() {
JMenuItem result = new JMenuItem("Open...");
result.setMnemonic('o');
result.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
requestOpen();
}
});
return result;
}
COM: <s> menu item added to allow log files to be opened with </s>
|
funcom_train/50714396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void additiveExpr() throws ParserException {
multiplicativeExpr();
while (ct.getType() == TokenType.PLUS
|| ct.getType() == TokenType.MINUS) {
// keep reference to which operation it is
TokenType addOp = ct.getType();
ct = nextToken();
multiplicativeExpr();
// perform operation
performInfixOp(addOp);
}
}
COM: <s> additive expr mult expr add op mult expr </s>
|
funcom_train/39947092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasBeenDeleted() {
// If it's on the disk it's not deleted.
if (this.isOnDisk()) {
return false;
}
// If it has been recorded, but it's not on the disk, it's been deleted.
if (this.hasBeenRecorded()) {
return true;
}
// It's not on the disk and it's never been recorded.
return false;
}
COM: <s> checks to see if the episode has been deleted </s>
|
funcom_train/39286115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeDefaults() {
IPreferenceStore store = getPreferenceStore();
fTextFieldPath.setText(store.getDefaultString("ATTR_SPIN_PATH"));
fTextFieldSimulationArgs.setText(store.getDefaultString("ATTR_SPIN_SIMULATION_ARGS"));
fTextFieldVerificationArgs.setText(store.getDefaultString("ATTR_SPIN_VERIFICATION_ARGS"));
fTextFieldGccPath.setText(store.getDefaultString("ATTR_GCC_PATH"));
fTextFieldVerifierCompArgs.setText(store.getDefaultString("ATTR_VERIFIER_COMP_ARGS"));
fTextFieldVerifierRunArgs.setText(store.getDefaultString("ATTR_VERIFIER_RUN_ARGS"));
}
COM: <s> initializes states of the controls using default values </s>
|
funcom_train/14363512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNextSibling(AST aAST) {
super.setNextSibling(aAST);
if (aAST != null && mParent != null) {
((DetailAST) aAST).setParent(mParent);
}
if (aAST != null) {
((DetailAST) aAST).setPreviousSibling(this);
}
}
COM: <s> sets asts next sibling </s>
|
funcom_train/34567414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Expr rename() throws QueryException {
final int p = qp;
if(!consumeWS(RENAME) || !consumeWS(NODE)) {
qp = p;
return null;
}
final Expr trg = check(single(), INCOMPLETE);
check(AS);
final Expr n = check(single(), INCOMPLETE);
ctx.updating = true;
return new Rename(trg, n);
}
COM: <s> up146 parses a rename expression </s>
|
funcom_train/46759897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasReference(final String referenceGroup, final String refKey, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
long refId = getReferenceIdByKey(referenceGroup, refKey, false, call);
return refId > 0L;
}}; return (Boolean) call(method, call);
}
COM: <s> determine if the reference group and key combination exists </s>
|
funcom_train/29064544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFrame getJFrame() {
if (jFrame == null) {
jFrame = new JFrame();
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jFrame.setJMenuBar(getJJMenuBar());
jFrame.setLayout(new FlowLayout());
jFrame.setSize(380, 343);
jFrame.setContentPane(getJContentPane());
jFrame.setTitle("Application");
}
return jFrame;
}
COM: <s> this method initializes j frame </s>
|
funcom_train/41852825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommandAbout() {
if (backCommandAbout == null) {//GEN-END:|143-getter|0|143-preInit
// write pre-init user code here
backCommandAbout = new Command("Back", Command.BACK, 0);//GEN-LINE:|143-getter|1|143-postInit
// write post-init user code here
}//GEN-BEGIN:|143-getter|2|
return backCommandAbout;
}
COM: <s> returns an initiliazed instance of back command about component </s>
|
funcom_train/22030296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field convertToField() throws VisADException, RemoteException {
Field new_field = new FieldImpl((FunctionType) Type, DomainSet);
if (isMissing()) return new_field;
for (int i=0; i<Length; i++) {
new_field.setSample(i, getSample(i));
}
return new_field;
}
COM: <s> convert this flat field to a non flat field impl </s>
|
funcom_train/32362511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRecoverFromLost() throws Exception {
pqueue.clear();
pqueue.add(new PersistentQueueTestEntry ("one"));
pqueue.add(new PersistentQueueTestEntry ("two"));
// lose pqueue now (e.g. because of system crash) and create a new one
pqueue = new PersistenceQueue < PersistentQueueTestEntry > (TEST_FILENAME);
}
COM: <s> simulate a crash and reload of the persistent queue </s>
|
funcom_train/9235134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doGlobalConfigInfo(final InputWindow origin, final boolean isSilent) {
for (Identity source : IdentityManager.getGlobalConfig().getSources()) {
sendLine(origin, isSilent, FORMAT_OUTPUT, source.getTarget() + " - "
+ source + "(" + source.getTarget().getOrder() + ")");
}
}
COM: <s> shows information about the global config manager </s>
|
funcom_train/13995801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecute() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
ParameterParser parser = new ParameterParser();
parser.putParameter(
SingletonRequestPopulatorCommand.SINGLETON_CLASS,
getClass().getName());
new SingletonRequestPopulatorCommand().execute(request, parser);
assertEquals(
"invalid singleton",
singleton,
request.getAttribute(
SingletonRequestPopulatorCommand.SINGLETON));
}
COM: <s> tests that the specified singleton is stored as request attribute </s>
|
funcom_train/34341197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getVentaS4() {
if (VentaS4 == null) {//GEN-END:|50-getter|0|50-preInit
// write pre-init user code here
VentaS4 = new TextField("Venta Semana 4:", null, 16, TextField.ANY);//GEN-LINE:|50-getter|1|50-postInit
// write post-init user code here
}//GEN-BEGIN:|50-getter|2|
return VentaS4;
}
COM: <s> returns an initiliazed instance of venta s4 component </s>
|
funcom_train/3720813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setApplicationAck(String applicationAck) throws java.beans.PropertyVetoException {
String oldApplicationAck = this.applicationAck;
vetoableChangeSupport.fireVetoableChange("applicationAck", oldApplicationAck, applicationAck);
this.applicationAck = applicationAck;
propertyChangeSupport.firePropertyChange("applicationAck", oldApplicationAck, applicationAck);
}
COM: <s> setter for property application ack </s>
|
funcom_train/9994202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDatumLong() throws AssertionFailedException {
System.out.println("getDatumLong");
Termin instance = new Termin();
long expResult_1 = 0L;
long result_1 = instance.getDatumLong();
assertEquals(expResult_1, result_1);
fail("The test case is a prototype.");
}
COM: <s> test of test get datum long method of class termin </s>
|
funcom_train/22051817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColWidth(int iCol) {
if (iCol < m_exampleData.getDBAttributeCount()) {
switch (m_exampleData.getDBAttributeType(iCol)) {
case GenericBaseData.TYPE_BOOLEAN:
return 30;
case GenericBaseData.TYPE_INTEGER:
return 40;
case GenericBaseData.TYPE_STRING:
return 150;
default:
return 50;
}
} else {
return 30;
}
}
COM: <s> get a preferred width for a column </s>
|
funcom_train/25441053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setMess(String description, Double value) {
for(int i=0;i<messw.size();i++) {
if(messw.get(i).info.equals(description)) {
messw.get(i).DoubleValue=value;
messw.get(i).isDouble=true;
}
}
}
COM: <s> refresh measured value identified by description </s>
|
funcom_train/17331359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void recursiveFillSectionsList(ProjectReportModelSectionDTO rootSection) {
reportSectionsStore.add(rootSection);
if(rootSection.getSubSectionsDTO()==null)
return;
for (final ProjectReportModelSectionDTO child : AdminReportModelPresenter.setCompositeNames(rootSection
.getSubSectionsDTO())) {
child.setParentSectionModelName(rootSection.getCompositeName());
recursiveFillSectionsList(child);
}
}
COM: <s> add all sections into report section grid recursively </s>
|
funcom_train/35284407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String padNumZero(int num, int totalLen) {
String numStr = Integer.toString(num);
int len = totalLen - numStr.length();
String pads = "";
for (int i = 0; i < len; i++) {
pads += "0";
}
return pads + numStr;
}
COM: <s> right aligns an integer number with zeros for printing </s>
|
funcom_train/22861976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isRightHandedCS (Matrix3f m3f) {
Vector3f v1 = new Vector3f();
Vector3f v2 = new Vector3f();
Vector3f v3 = new Vector3f();
Vector3f vcross = new Vector3f();
m3f.getColumn(0, v1);
m3f.getColumn(1, v2);
m3f.getColumn(2, v3);
vcross.cross(v1, v2);
vcross.normalize();
v3.normalize();
vcross.add(v3);
if (vcross.length() == 0) {
return false;
} // if
else {
return true;
} // else
} // isRightHandedCS
COM: <s> test whether a cs given by a matrix uses righthanded orientation </s>
|
funcom_train/3787111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawPlus(Graphics g, int zoomValue, int x, int y, Color color)
{ /* drawPlus */
int w= 2;
g.setColor( color );
g.drawLine( x, y-w, x, y+w );
g.drawLine( x-w, y, x+w, y );
} /* drawPlus */
COM: <s> draw plus draw plus sign at the specified color </s>
|
funcom_train/45209750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel getPendingListLabel() {
if (pendingListLabel == null) {
pendingListLabel = new JLabel();
pendingListLabel.setName("pendingListLabel");
pendingListLabel.setText("Choose a Game");
pendingListLabel.setToolTipText("The games in the list are currently " +
"running on the server and waiting for a partner. " +
"Choose one to join.");
}
return pendingListLabel;
}
COM: <s> return the pending list label property value </s>
|
funcom_train/16005132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Float numberCarried() {
Equipment eqParent = getParent();
if (isEquipped() || (eqParent == null)) {
return carried;
}
for (; eqParent != null; eqParent = eqParent.getParent()) {
if (eqParent.isEquipped() ||
((eqParent.getParent() == null) &&
(eqParent.numberCarried().intValue() != 0))) {
return carried;
}
}
return (float) 0;
}
COM: <s> get the number of items of this equipment being carried </s>
|
funcom_train/22544524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void windowDeactivated(WindowEvent e) {
// If had an opposite, deactivated from another of our windows.
if(e.getOppositeWindow() != null)
return;
_active = false;
if(SystemUtils.getIdleTime() > MAX_IDLE_TIME)
return;
RouterService.setFullPower(false);
}
COM: <s> callback for a window deactivation event </s>
|
funcom_train/29019360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean loadFont (String path) {
checkDevice();
if (path == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
if (OS.IsWinNT && OS.WIN32_VERSION >= OS.VERSION (4, 10)) {
TCHAR lpszFilename = new TCHAR (0, path, true);
return OS.AddFontResourceEx (lpszFilename, OS.FR_PRIVATE, 0) != 0;
}
return false;
}
COM: <s> loads the font specified by a file </s>
|
funcom_train/38881019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String calcPathToAdd() {
int numSubDir = makefilePath.segments().length-1;
// the first element of makefilePath is the base directory of the project
// the last element is the file name
// so the number of directory to go back is the number of element of makefilePath minus 2
String pathToAdd = "";
for (int i=0 ; i < numSubDir; i++)
pathToAdd += "..\\";
return pathToAdd;
}
COM: <s> calculate the path from the directory where is the </s>
|
funcom_train/46104298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initServerSocket(ServerSocket ssocket) {
SSLServerSocket socket = (SSLServerSocket) ssocket;
// Enable all available cipher suites when the socket is connected
String cipherSuites[] = socket.getSupportedCipherSuites();
//String cipherSuites[] = new String[]{"SHA1withRSA"};
socket.setEnabledCipherSuites(cipherSuites);
// Set client authentication if necessary
socket.setNeedClientAuth(clientAuth);
}
COM: <s> set the requested properties for this server socket </s>
|
funcom_train/130824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void queryFiducialVal () {
try {
sendHeader (PLAYER_MSGTYPE_REQ, PLAYER_FIDUCIAL_REQ_GET_ID, 0);
os.flush ();
} catch (IOException e) {
throw new PlayerException
("[Fiducial] : Couldn't request PLAYER_FIDUCIAL_REQ_GET_ID: "
+ e.toString(), e);
}
}
COM: <s> request reply get set fiducial id </s>
|
funcom_train/21656259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtIngresar() {
if (btIngresar == null) {
btIngresar = new JButton();
btIngresar.setBounds(new Rectangle(159, 197, 96, 30));
btIngresar.setMnemonic('i');
btIngresar.setText("Ingresar");
btIngresar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
validarUsuario();
}
});
}
return btIngresar;
}
COM: <s> this method initializes bt ingresar </s>
|
funcom_train/22316271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CodedAttribute add(CodedAttribute item) throws RegistryException {
if (item.getType().equals(this.getType())) {
logger.debug("add: " + item);
this.attributes.add(item);
return item;
} else {
throw new RegistryException(item.getType() + " type is not valid for this " + this.getType() + " registry");
}
}
COM: <s> add a new item </s>
|
funcom_train/7654385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setObjectAt(DEREncodable obj, int index) {
switch (index) {
case 0: obj0 = obj; break;
case 1: obj1 = obj; break;
case 2: obj2 = obj; break;
case 3: obj3 = obj; break;
default: {
rest[index - 4] = obj;
break;
}
}
}
COM: <s> sets the element at a given index used by </s>
|
funcom_train/43133420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load() {
try {
Loader loader = LoaderFactory.getInstance().newLoader();
loader.addLoadingListener(this);
loader.download(historyUrl.toString(), new Target(Library.SECONDARY_FRAME, null));
} catch (Exception e) {
logger.error("can't access the history file "+historyUrl+", create empty list", e);
newHistory();
}
}
COM: <s> load the history from a file </s>
|
funcom_train/944428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Term convertLiteralToResourceTerm() {
Quad quad = (Quad) model.getAttributeQuads().get(selectedRow);
String label = quad.getObject();
InstanceWorld iw = InstanceWorld.getCurrentInstanceWorld();
Term term = iw.findOrCreateTermForLabel(label);
iw.setAttributeValue(quad, term, false);
fireDataChanged();
return term;
}
COM: <s> this functions converts the literal into a term </s>
|
funcom_train/22234986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void confirmInterGraphDependency() {
HashSet set = (HashSet)branchGraphDependencies.get(currentBranchGraphID);
if (set==null)
return;
Iterator it = set.iterator();
while(it.hasNext()) {
SymbolTableData symbol = (SymbolTableData)it.next();
if (symbol.branchGraphID==currentBranchGraphID)
it.remove();
}
}
COM: <s> check for and remove any inter graph dependency </s>
|
funcom_train/43667413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getFieldValue(JRField arg) throws JRException {
Object value = null;
if ("id".equals(arg.getName())) {
value = currentValue.getId();
}else if ("sections".equals(arg.getName())) {
value = new JRBeanCollectionDataSource(currentValue.getSections());
}else if ("name".equals(arg.getName())){
value = currentValue.getName();
}
return value;
}
COM: <s> returns the value of field arg </s>
|
funcom_train/47929243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void thisItem(int item) {
//if (itemindex<3 && itemindex>0)
{
itemindex = item;
}
//default size
for (int u = 0; u < fontSizes.length; u++) {
fontSizes[u] = loginScreen.normalTxtSize;
}
//increase font size
fontSizes[itemindex] = loginScreen.bigTxtSize;
}
COM: <s> navigate to specific location in the menu </s>
|
funcom_train/46858254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear(Graphics g_Buffer) {
if (switching) return;
// Create offScreen drawing surface
createBackImg(frame.getWidth(), frame.getHeight());
// Clear Buffer with a solid black color
g_Buffer.drawImage(img_Background, 0, 0, null);
}
COM: <s> make and reuse a background image used for one purpose </s>
|
funcom_train/34734161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CVCreateController createCVCreateController() {
// need to create a special-purpose controller here which overrides
// construction of the temporary CV entity which serves as the form
// command object with retrieval of our CV object - this effectively
// allows us to fake population of the temporary CV object with form data
return new CVCreateController() {
@Override
protected JobfilterEntity createEntity() {
return cv;
}
};
}
COM: <s> construct controller to test </s>
|
funcom_train/8741757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMatchReturnValue() {
if (matchReturnValue == ACCEPT) {
return "accept";
} else if (matchReturnValue == DENY) {
return "deny";
} else if (matchReturnValue == NEUTRAL) {
return "neutral";
} else {
return "unknown"; // this one should never happen
}
}
COM: <s> gets the value that will be returned upon a successful </s>
|
funcom_train/50345965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addLoadName(String load){
if (_loadList.contains(load))
return false;
_loadList.add(load);
log.debug("track (" +getName()+ ") add car load "+load);
setDirtyAndFirePropertyChange (LOADS_CHANGED_PROPERTY, _loadList.size()-1, _loadList.size());
return true;
}
COM: <s> add a load that the track will </s>
|
funcom_train/21503621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMinimumPortCountPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InoutputDefinition_minimumPortCount_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InoutputDefinition_minimumPortCount_feature", "_UI_InoutputDefinition_type"),
DMLPackage.Literals.INOUTPUT_DEFINITION__MINIMUM_PORT_COUNT,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the minimum port count feature </s>
|
funcom_train/35692981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaxlength() {
if (maxlength != null) {
return maxlength.intValue();
}
ValueBinding vb = getValueBinding("maxlength");
return vb != null ? ((Integer) vb.getValue(getFacesContext())).intValue() : Integer.MIN_VALUE;
}
COM: <s> p return the value of the code maxlength code property </s>
|
funcom_train/20181611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object queryOne(String sql, List<Object> params) throws SQLException {
HashMap<String,Object> record = this.queryMap(sql, params);
if(record == null || record.size() == 0 ) {
return null;
} else {
return record.values().toArray()[0];
}
}
COM: <s> select cola from tab where colb 1 </s>
|
funcom_train/47868602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read() throws IOException {
inputBuffer.flip(); // Switch to read mode
if (!inputBuffer.hasRemaining()) {
inputBuffer.compact();
return -1;
}
int aByte = inputBuffer.get();
inputBuffer.compact(); // Free up buffer space
return aByte;
}
COM: <s> reads a single byte from the byte buffer </s>
|
funcom_train/44602308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_interface_01() {
compile(
"X.java",
"class Z { }\n" +
"interface Y { public void m(Z s); }\n" +
"public interface X extends Y {\n" +
" public void n(Z s);\n" +
"}\n",
"");
}
COM: <s> interface accessing a concrete class </s>
|
funcom_train/19305961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean startsHere(final Marker marker) {
final FOLinkageNormal normalLinkage = this.markerParentLinkage(marker);
if (normalLinkage == null) {
return false;
}
final Area firstArea = normalLinkage.firstNormalAreaReturned();
if (firstArea == null) {
return false;
}
if (firstArea.getPage() == this) {
return true;
}
return false;
}
COM: <s> indicates whether the first area returned by a marker is on this page </s>
|
funcom_train/180898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close(java.lang.Object queryResult) {
if ((queryResult != null) && (queryResult instanceof ResultSet)) {
transaction.incrementOpenCursor(false);
try {
((ResultSet)queryResult).close();
} catch (SQLException e) {
throw new UserException(getResourceString("CW_CursorError"), getResourceString("CT_CursorError"), e);
}
} // else { "NYI"; }
}
COM: <s> close a query result and release any resources associated with it </s>
|
funcom_train/37081126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Connection getNewConnection() throws SQLException {
logger.debug("JdbcChadoAdapter: connecting with '" + jdbcUrl + "' username='" + username + "' password='" + password + "'");
return DriverManager.getConnection(this.jdbcUrl, this.username, this.password);
}
COM: <s> opens and return a new connection to the database specified in the arguments </s>
|
funcom_train/24441595 | /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 ("SchemaStore".equals(portName)) {
setSchemaStoreEndpointAddress(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/48579489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand4() {
if (backCommand4 == null) {//GEN-END:|213-getter|0|213-preInit
// write pre-init user code here
backCommand4 = new Command("Back", Command.BACK, 0);//GEN-LINE:|213-getter|1|213-postInit
// write post-init user code here
}//GEN-BEGIN:|213-getter|2|
return backCommand4;
}
COM: <s> returns an initiliazed instance of back command4 component </s>
|
funcom_train/43269465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasSample() {
boolean ok = false;
Collection c = getAssociations();
synchronized (c) {
for (Iterator i = c.iterator(); i.hasNext(); ) {
Association a = (Association) i.next();
if (a.getLinkName().startsWith("sampled")) {
ok = true;
break;
}
}
}
return ok;
}
COM: <s> indecates if this observation has a sample associated with it </s>
|
funcom_train/25450610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getResourceString(String resName, Object... args) {
String result = getResourceString(resName);
for (int i = 0; i < args.length; i++) {
result = StringUtils.replace(result, "{" + i + "}", args[i].toString());
}
return result;
}
COM: <s> get resource string with parameters in it </s>
|
funcom_train/1489173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TaxonConceptLite toTaxonConceptLite(TaxonName name, long dataProviderId, long dataResourceId, int taxonomicPriority) {
TaxonConceptLite concept = new TaxonConceptLite();
concept.setAccepted(true);
concept.setDataProviderId(dataProviderId);
concept.setDataResourceId(dataResourceId);
concept.setRank(name.getRank());
concept.setTaxonName(name);
concept.setPriority(taxonomicPriority);
return concept;
}
COM: <s> creates an accepted concept for the name and provider and resource given </s>
|
funcom_train/51272265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAtPos(StructuralIdentifier key, LinguisticToken value, int pos) {
if (pos < currentSize) {
Vector tempkeys = new Vector();
Vector tempvalues = new Vector();
int i=0;
while (i < pos){
tempkeys.addElement(keys.elementAt(i));
tempvalues.addElement(values.elementAt(i));
i++;
}
tempkeys.addElement(key);
tempvalues.addElement(value);
i++;
while (i < currentSize){
tempkeys.addElement(keys.elementAt(i));
tempvalues.addElement(values.elementAt(i));
i++;
}
currentSize++;
} else {
keys.addElement(key);
values.addElement(value);
currentSize++;
}
}
COM: <s> adds the given mapping at the given position in this array </s>
|
funcom_train/20118739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File createTransposedFile() throws IOException {
// read bad rows
BufferedInputStream in = new BufferedInputStream( new FileInputStream( badRowsFile ), 1024 );
TableMatrixParser parser = new TableMatrixParser(in,"UTF-8",cs,rs,quote);
Matrix m = parser.parse();
in.close();
// transpose
m.trans();
// write
File transFile = File.createTempFile("transposeBadrows", ".txt", this.wortDirectory);
FileWriter writer = new FileWriter(transFile);
m.write(writer, cs, rs, quote);
writer.flush();
writer.close();
m.clear();
return transFile;
}
COM: <s> read plain bad rows file to </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.