__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/18569960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsJoinPointExcludedReturnsTrue() {
// TODO: this test commented because it fails with a noclassdef found
// error when running the unit test under AspectJ
// TODO: this is currently hardcoded to excluded EasyMock
classType = VMTest.class;
boolean isExcluded = aspectUtils.isClassExcluded(classType);
assertTrue(isExcluded);
}
COM: <s> test that the is class excluded method returns true </s>
|
funcom_train/12676694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getExistingSCFile(String path){
File f = new File(path);
if (f.isFile()) {
return path;
} else if(!f.isAbsolute()){
String s = JSCLangMain.getInstance().getWorkingDirectory() + "\\" + SC_CLASSLIBRARY + "\\" + path;
if(new File(s).isFile()){
return s;
}
}
return null;
}
COM: <s> checks if the given path is an existing file </s>
|
funcom_train/51073216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prepareGameDisplayManager() {
gameDisplayManager = new GameArea(cityCards);
JComponent gameDisplay = gameDisplayManager.getGameDisplay();
gameFrame.getContentPane().add(gameDisplay);
gameDisplay.setLocation(0, 0);
gameFrame.setBounds(100, 100, 800, 550);
gameFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
COM: <s> prepares the game display manager of the game </s>
|
funcom_train/46193639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
// socket may be null if the connection could not be established to the
// server in question, and the culler asked us to close the connection
if (socket == null)
return;
try {
socket.close(); // close socket
socket = null;
} catch (IOException e) {
}
LOG.debug(getName() + ": closing");
}
COM: <s> close the connection </s>
|
funcom_train/18550260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertTask(TaskTO tto) throws BusinessException {
try {
//check if task contain the same requirement of his parent task
if (this.isTaskAndParentTaskSameRequirement(tto)){
//create a new task
dao.insert(tto);
} else {
throw new TasksDiffRequirementException();
}
} catch (ZeroCapacityDBException e) {
throw new ZeroCapacityException(e);
} catch (DataAccessException e) {
throw new BusinessException(e);
}
}
COM: <s> insert a new task object into data base </s>
|
funcom_train/152657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTypeSignature() {
if (typeSignature == null) {
DataInputStream in = attributes.getStream("Signature"); // NOI18N
if (in != null) {
try {
CPUTF8Info entry =
(CPUTF8Info)constantPool.get(in.readUnsignedShort());
typeSignature = entry.getName();
in.close();
} catch (IOException e) {
System.err.println("invalid Signature attribute");
}
}
}
return typeSignature;
}
COM: <s> returns the generic type information associated with this class </s>
|
funcom_train/35327086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MethodHandle asVarargsCollector(Class<?> arrayType) {
Class<?> arrayElement = arrayType.getComponentType();
boolean lastMatch = asCollectorChecks(arrayType, 0);
if (isVarargsCollector() && lastMatch)
return this;
return AdapterMethodHandle.makeVarargsCollector(this, arrayType);
}
COM: <s> makes a em variable arity em adapter which is able to accept </s>
|
funcom_train/15769590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(Collection list){
clearAll();
this.listData = list;
listCheckBox.setListData( buildCheckBoxItems(listData.size()) );
listDescription.setListData( list.toArray() );
listDescription.setCellRenderer( new GetNameListCellRenderer() );
updateUI();
}
COM: <s> sets the vector of data items to the control </s>
|
funcom_train/39109650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String fetchUsername() {
String u;
try {
SSOUsernameRetriever ret = new SSOUsernameRetriever(userData.getEnvironment().req());
u = ret.getUsername();
}
catch (Exception e) {
u = "";
}
// dump to
if (LusidProperties.debug) {
LusidUtils.writeLogMessage("SSO login, username = "+u);
}
return u;
}
COM: <s> this is invoked in the constructor and should retrieve </s>
|
funcom_train/41282962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void markModified() {
ResourceSpace space = getSpace();
if ((space != null) && (getSpaceEntry() != null)) {
synchronized (this) {
space.markModified(getSpaceEntry(), this);
}
}
super.setValue(ATTR_LAST_MODIFIED,
new Long(System.currentTimeMillis()));
}
COM: <s> mark this resource as having been modified </s>
|
funcom_train/42638986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Number getMaxModuleOfEigenValue() {
if (max == null) {
try {
getSpectrumMethod().setMatrix(getSystemMatrix()); //May throw exception.
max = getSpectrumMethod().getEigenValueMaxModule();
} catch(IllegalArgumentException e) {
throw new IllegalArgumentException("Neither max module of eigen value nor system matrix was set.");
}
}
return max;
}
COM: <s> getting maximum module of eigen values of system matrix </s>
|
funcom_train/4360736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void threadStart() {
if (thread != null)
return;
if (backgroundProcessorDelay <= 0)
return;
threadDone = false;
String threadName = "ContainerBackgroundProcessor[" + toString() + "]";
thread = new Thread(new ContainerBackgroundProcessor(), threadName);
thread.setDaemon(true);
thread.start();
}
COM: <s> start the background thread that will periodically check for </s>
|
funcom_train/20081533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean iterate(double x0, double y0, int dwell) {
double x = 0;
double y = 0;
double xnew, ynew;
for (int i = 0; i < dwell; i++) {
xnew = x * x - y * y + x0;
ynew = 2 * x * y + y0;
if ((xnew * xnew + ynew * ynew) > 4) {
return true; // escapes
}
x = xnew;
y = ynew;
}
return false; // does not escape
}
COM: <s> test a single coordinate against a given dwell value </s>
|
funcom_train/31208822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean nullsAreSortedLow() throws SQLException {
try {
if(Trace.isEnabled()) Trace.trace(getId());
checkClosed();
boolean result=meta.nullsAreSortedLow();
if(Trace.isEnabled()) Trace.traceResult(result);
return result;
} catch(Throwable e) {
throw convertThrowable(e);
}
}
COM: <s> checks is null values are sorted low smaller than any non null values </s>
|
funcom_train/44218531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getAncestorViews(String viewName) throws RemoteException {
Vector vec = new Vector();
ViewDefinition vd = (ViewDefinition) this.vsm.get_top().Views.readFromCollection(viewName);
ViewDefinition temp = vd;
while(temp.get_parent() != null) {
vec.add(temp.get_parent().get_Name());
temp = temp.get_parent();
}
return vec;
}
COM: <s> p get the names of the ancestor views for the given view p </s>
|
funcom_train/35328713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void warningOccurred(int code) {
if ((code < 0) || (code > MAX_WARNING)){
throw new InternalError("Invalid warning index");
}
processWarningOccurred
("com.sun.imageio.plugins.jpeg.JPEGImageReaderResources",
Integer.toString(code));
}
COM: <s> called by the native code or other classes to signal a warning </s>
|
funcom_train/28753097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCdna50xvolume(Long newVal) {
if ((newVal != null && this.cdna50xvolume != null && (newVal.compareTo(this.cdna50xvolume) == 0)) ||
(newVal == null && this.cdna50xvolume == null && cdna50xvolume_is_initialized)) {
return;
}
this.cdna50xvolume = newVal;
cdna50xvolume_is_modified = true;
cdna50xvolume_is_initialized = true;
}
COM: <s> setter method for cdna50xvolume </s>
|
funcom_train/44800895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getExtension(java.io.File f) {
String ext = null;
String s = f.getName();
int i = s.lastIndexOf('.');
if (i > 0 && i < s.length() - 1) {
ext = s.substring(i+1).toLowerCase();
}
return ext;
}
COM: <s> returns the file extension of the passed file </s>
|
funcom_train/889269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int getNumCards(File file) throws IOException {
int numCards = 0;
BufferedReader in = new BufferedReader(new FileReader(file));
String line;
while((line = in.readLine()) != null) {
if(line.startsWith(PREFIX_CARD_NAME)) {
++numCards;
}
}
in.close();
return numCards;
}
COM: <s> returns the number of cards that are stored in a gatherers text spoiler </s>
|
funcom_train/26384491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(AntWorkMessage mess) {
errorModel.addElement( mess );
if (flag) {
flag = false;
JTabbedPane tabbedPane = jextFrame.getHorizontalTabbedPane();
tabbedPane.addTab( "AntWork Messages", this );
int indx = tabbedPane.indexOfTab("AntWork Messages");
tabbedPane.setSelectedIndex( indx );
}
}
COM: <s> appends a new message to the error list </s>
|
funcom_train/48960537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deletePreviousSonarConfigurations(UUID project) {
Map<String, Object> params = new HashMap<String, Object>(1);
params.put("project", project);
dao.executeUpdate(SonarConfiguration.DELELETE_SONAR_CONF_FOR_PROJECT, params);
}
COM: <s> removes all pre existing sonar configurations for the given project </s>
|
funcom_train/5572103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LoggingEvent createEvent() {
String msg =
MessageFormat.format(
"Discarded {0} messages due to full event buffer including: {1}",
new Object[] { new Integer(count), maxEvent.getMessage() });
return new LoggingEvent(
null, Logger.getLogger(maxEvent.getLoggerName()), maxEvent.getLevel(), msg, null);
}
COM: <s> create event with summary information </s>
|
funcom_train/13687128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getOpenFiles() {
HashSet result = new HashSet();
if (myRanges == null || myRanges.size() == 0)
return new ArrayList(result);
for (Iterator i = myRanges.iterator(); i.hasNext();) {
Range value = (Range)i.next();
if (value.data instanceof RandomAccessFile && value.file != null) {
result.add(value.file);
}
}
return new ArrayList(result);
}
COM: <s> get the list of files that back this object </s>
|
funcom_train/31977134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int LOADPROP(CommandEvent event, String name, String filename) throws Exception{
NVBundle nv2 = new NVBundle();
try{
BufferedReader dis = new BufferedReader(new FileReader(filename));
String line;
while((line = dis.readLine()) != null){
String key = line.substring(0,line.indexOf('='));
String value = line.substring(line.indexOf('=')+1);
nv2.put(key,value);
}
event.instance.nv.put(name,nv2);
dis.close();
}catch(Exception e){
return 0;
}
return 1;
}
COM: <s> loads a propery file into the nvbundle </s>
|
funcom_train/2325677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dct2(boolean scale) {
if (content instanceof DenseLargeFloatMatrix2D) {
if (this.isNoView == true) {
((DenseLargeFloatMatrix2D) content).dct2(scale);
} else {
DenseLargeFloatMatrix2D copy = (DenseLargeFloatMatrix2D) copy();
copy.dct2(scale);
assign(copy);
}
} else {
throw new IllegalArgumentException("This method is not supported");
}
}
COM: <s> computes the 2 d discrete cosine transform dct ii of this matrix </s>
|
funcom_train/28954747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ISourceList getFileList() {
DotplotContext context = ContextFactory.getContext();
DotPlotFileList actualList = new DotPlotFileList();
Object[] selection = this.getSelection();
for (int i = 0; i < selection.length; i++) {
if (!((File) selection[i]).isDirectory()) {
actualList.add(context.createDotplotFile((File) selection[i]));
}
}
return actualList;
}
COM: <s> code get file list code creates a ifile list from the selected </s>
|
funcom_train/20304105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void countNamespace( Resource r, Map nsCount ) {
if (!r.isAnon()) {
String ns = r.getNameSpace();
// increment the count for this namespace
Integer count = nsCount.containsKey( ns ) ? (Integer) nsCount.get( ns ) : new Integer( 0 );
Integer count1 = new Integer( count.intValue() + 1 );
nsCount.put( ns, count1 );
}
}
COM: <s> record a use of the given namespace in the count map </s>
|
funcom_train/12621975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
Thread current = Thread.currentThread();
if (thread == current) {
synchronized (this) {
synchronize();
}
}
} catch (Exception ex) {
StaticDataHelper.log(">>> Exception in SyncClient.run() --> " + ex.toString());
displayStatus(sdh.getLanguage("exch-while-synch") + " " + ex);
}
}
COM: <s> overridden run method of runnable interface </s>
|
funcom_train/11001808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText() {
StringBuffer text = new StringBuffer();
String[] allText = getAllText();
for(int i=0; i<allText.length; i++) {
text.append(allText[i]);
if(!allText[i].endsWith("\r") &&
!allText[i].endsWith("\n")) {
text.append("\n");
}
}
return text.toString();
}
COM: <s> returns the textual contents of the file </s>
|
funcom_train/9278958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSelectView() throws SQLException {
Statement s = createStatement();
ResultSet rs;
ResultSetMetaData rsmd;
rs = s.executeQuery("select * from tab1_view");
rsmd = rs.getMetaData();
assertFalse("Column count doesn't match.", rsmd.getColumnCount() != 2);
assertFalse("Column 1 IS ai.", !rsmd.isAutoIncrement(1));
assertFalse("Column 1 is NOT ai.", rsmd.isAutoIncrement(2));
rs.close();
s.close();
}
COM: <s> select from view </s>
|
funcom_train/24060511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone ( ) {
// cannot implement the Cloneable Interface because it
// doesn't exist in the midlet or cldc apis (why not?)
// That means we can't start by cloning the super class,
// but only Object implements it in our case, and it throws
// CloneNotSupportedException if we don't implement Cloneable!!!
SaltManagerRandom other = new SaltManagerRandom();
return (SaltManager) other; // or null if super not Cloneable
}
COM: <s> clone will acquire an new ramdom number generator and so the two </s>
|
funcom_train/50586834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(TestResult result) {
for (Enumeration e = tests(); e.hasMoreElements();) {
if (result.shouldStop()) {
break;
}
if (myPlayer.shouldStopScenario()) {
Test test = (Test) e.nextElement();
break;
}
Test test = (Test) e.nextElement();
runTest(test, result);
}
}
COM: <s> runs the tests and collects their result in a test result </s>
|
funcom_train/12156456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValue(String arg) {
Argument argument = (Argument)args.get(arg);
if (argument == null || argument.getValues() == null) {
return null;
}
Iterator i = argument.getValues().iterator();
if (i.hasNext()) {
return (String)i.next();
}
return null;
}
COM: <s> get the value for a named argument </s>
|
funcom_train/322446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double clickSlantToY(ClickDetection click) {
ClickLocalisation loc = click.getClickLocalisation();
PamVector v = loc.getPlanarVector();
if (v == null) {
return 0;
}
/*
* work out the anlge from the z coordinate to the x,y plane.
*/
double x = v.getElement(0);
double y = v.getElement(1);
double z = v.getElement(2);
x = Math.sqrt(x*x+y*y);
double ang = Math.abs(Math.toDegrees(Math.atan2(z,x)));
return (ang-yStart)*yScale;
}
COM: <s> work out a slant angle only possible with planar or volumetric arrays </s>
|
funcom_train/50532541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean upStart(Event e) {
TimeScheduler timer;
timer = stack != null ? stack.timer : null;
if(timer == null) {
if (Trace.trace) Trace.println("STABLE.HandleUpEvent()",
Trace.FATAL, "[START] timer is null");
return(true);
}
sched = timer;
// we use only asynchronous method invocations...
if(_corr != null)
_corr.SetDeadlockDetection(false);
initialize();
startGossip();
return(true);
}
COM: <s> received a tt start tt event from a layer below </s>
|
funcom_train/45114436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setPromptMode(boolean promptOn) throws Exception{
String command = "prompt off";
if (promptOn){
command="prompt on";
}
cli.command(command,1000*60,true,false,null,ftpGeneralPrompts);
if (cli.getResult().indexOf("Interactive") < 0){
throw new Exception("Failed changing prompt mode");
}
}
COM: <s> changes the ftp session mode on off </s>
|
funcom_train/1558883 | /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.getSource() == cancelButton) {
setVisible(false);
dispose();
} else if(e.getSource() == removeButton) {
int index = list.getSelectedIndex();
if(index != -1) { // -1 = no entry selected
listModel.remove(index);
layout.removePerspective(index);
GeoGebraPreferences.getPref().saveXMLPreferences(app);
app.updateMenubar();
updateRemoveButton();
}
}
}
COM: <s> one of the buttons was pressed </s>
|
funcom_train/34298527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Init() {
LastHello = 0;
MyNodeInfo info = getDataBase().getMyData();
if (info == null) {
info = new MyNodeInfo();
info.setNode(new NodeHello());
}
getCodec().setMyNodeInfo(info);
getCom().setMyNodeInfo(info);
getCodec().SignMyNodeInfo(info);
getDataBase().StoreMyData(info);
Initializing = false;
}
COM: <s> the first step is to see if the database already has information about </s>
|
funcom_train/19065319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Charset getCharset() {
String charsetField = getContentParameter("charset");
if( charsetField != null ) {
try {
return Charset.forName( charsetField );
} catch ( IllegalCharsetNameException e ) {
return Charset.forName( System.getProperty("file.encoding"));
} catch ( UnsupportedCharsetException e ) {
return Charset.forName( System.getProperty("file.encoding"));
}
} else {
return Charset.forName( System.getProperty("file.encoding"));
}
}
COM: <s> gets the charset this mime part is encoded in </s>
|
funcom_train/2358523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double estimateLogP(final Rule rule, int sentID) {
//we do not check for owner because we want this feature used for all the time, e.g., under oov_owner case
//TODO: why not check the owner
/*if (this.owner == rule.owner) {
return OMEGA * (rule.english.length - rule.arity);
} else {
return 0.0;
}*/
return OMEGA * (rule.getEnglish().length - rule.getArity());
}
COM: <s> each additional word gets a penalty </s>
|
funcom_train/12560860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lDeleteAll() {
if (traverseIndex != -1) {
lastTraverseItem = itemLFs[traverseIndex];
}
// Dereference all ItemLFImpls so they can be GC'ed
while (numOfLFs > 0) {
itemLFs[--numOfLFs] = null;
}
traverseIndex = -1;
itemsModified = true;
pendingCurrentItem = null;
lRequestInvalidate();
}
COM: <s> notifies look amp feel object that all items are deleted in </s>
|
funcom_train/25359825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showObjectDetails(BeanModel model) {
if (model.getBean() instanceof AutomaticActivity) {
this.showXMLInDialog((String) ((AutomaticActivity) model.getBean())
.getSoapMessage().getAny());
} else if (model.getBean() instanceof Callback) {
this.showXMLInDialog((String) ((Callback) model.getBean())
.getSoapMessage().getAny());
}
}
COM: <s> show object details </s>
|
funcom_train/1123355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() {
LinkedList<Transition> set = new LinkedList<Transition>();
for (int x = 0; x < alphabet.getSize(); x++) {
set.clear();
set.addAll(transitions[x]);
for (Transition t : set) {
removeTransition(x, t);
}
set.clear();
set.addAll(transitionsBack[x]);
for (Transition t : set) {
t.getFrom().removeTransition(x, t);
}
}
}
COM: <s> deletes itself from the automaton </s>
|
funcom_train/49317785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Sender getSender(Client client, String format) {
Subscriptions subs = client.getSubscriptions();
for (Sender sender : SENDERS) {
if (subs.isSubscribed(sender.getMtype())
&& (format == null || format.equals(sender.getFormat()))) {
return sender;
}
}
return null;
}
COM: <s> returns a sender object which can send a table to a given client </s>
|
funcom_train/2750120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initDecryptMode(Key key) {
try {
// vector initialization
this.ivSpec = new IvParameterSpec(key.getInitVector());
this.cipher.init(Cipher.DECRYPT_MODE, key.getKey(), this.ivSpec);
this.encryptMode = false;
} catch (Exception e) {
String errorMessage = HDIVUtil.getMessage("cipher.init.decrypt", e.getMessage());
throw new HDIVException(errorMessage, e);
}
}
COM: <s> generates a cipher object that implements the specified </s>
|
funcom_train/1905500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetProperty() {
System.out.println("testGetProperty");
assertNotNull(xmlPropsObject);
assertNotNull(testprops);
assertTrue(testprops.length > 0);
for (int i=0; i<testprops.length; i++) {
nextGetTest(testprops[i][0], testprops[i][1]);
}
}
COM: <s> test of get property method of class edu </s>
|
funcom_train/40166268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendLoginResponse(MessageProducer producer, LoginResponse response) {
setProducer(producer);
send(response.toString());
try {
producer.close();
} catch (JMSException ex) {
Logger.getLogger(LoginHandler.class.getName()).log(Level.SEVERE, null, ex);
}
}
COM: <s> sends the response to the login request </s>
|
funcom_train/3750111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startMonitoring() {
if (fThread == null) {
fThread= new Thread(new Runnable() {
public void run() {
read();
}
}, "OutputStreamMonitor"); //$NON-NLS-1$
fThread.setDaemon(true);
fThread.setPriority(Thread.MIN_PRIORITY);
fThread.start();
}
}
COM: <s> starts a thread which reads from the stream </s>
|
funcom_train/42664755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void build(Packet p, int dstIp, int port) {
int srcIp = p.interf.getIpAddress();
if (srcIp==0) { // interface is down
ejip.returnPacket(p); // mark packet free
} else {
build(p, srcIp, dstIp, port);
}
}
COM: <s> get source ip from interface and build ip udp header </s>
|
funcom_train/15453354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDocument(String path, String title, String description) {
this.document = new InternalDocument();
this.document.setPath(path);
this.document.setTitle(title);
this.document.setDescription(description);
this.document.setDate(new Date());
}
COM: <s> creates a new file to associate with this narrative </s>
|
funcom_train/40312004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFindColumn() {
try
{
metaData = new DefaultResultSetMetaData(new IOMetaDataEntryMockImpl());
values = new Object[][]{{"hello"}};
ResultSet resultSet = new DefaultResultSet(statement, metaData, values);
assertEquals("findColumn failed: the column index mismatches.", 1, resultSet.findColumn("field1"));
}
catch(SQLException e)
{
fail("findColumn failed");
}
}
COM: <s> tests find column successfully </s>
|
funcom_train/15688405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkSkillup(int pos) {
if (finalSub[pos] >= 1) {
// Alternative 1: Set sub=0 after a skillup
// (We will use this, until the training speed formula is optimized)
finalSub[pos] = 0;
// TODO flattermann
// Alternative 2: Use overflow sub after a skillup
// (This would be more accurate. But only if the underlaying formula is exact)
// finalSub[pos] -= 1;
finalSkillup[pos]++;
return true;
}
return false;
}
COM: <s> checks if a skillup has happened </s>
|
funcom_train/5157977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RelatedTagsResults relatedTags(RelatedTagsRequest request) throws IOException, MyWeb2Exception {
request.getParameters().put(APPID_KEY, appId);
Map results = executeAndParse(request.getRequestUrl(), request.getParameters());
return new XmlParserRelatedTagsResults(results);
}
COM: <s> allows you to search for tags related to another given tag </s>
|
funcom_train/46189842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCompareTo() {
Year y1 = new Year(blog, 2004);
Year y2 = new Year(blog, 2005);
assertTrue(y1.compareTo(y1) == 0);
assertTrue(y1.compareTo(y2) < 0);
assertTrue(y1.compareTo(y2) < 0);
assertTrue(y2.compareTo(y1) > 0);
}
COM: <s> tests the compare to method </s>
|
funcom_train/39220507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stop() {
playing = false;
Morpher.removeActionListener(nextStateActionListener);
Guess.getInterpreter().freeze(false);
// Setting buttons enabled / disabled
btnPlay.setEnabled(true);
btnStop.setEnabled(false);
btnRemove.setEnabled(true);
btnMoveLeft.setEnabled(true);
btnMoveRight.setEnabled(true);
btnInsert.setEnabled(true);
btnExport.setEnabled(true);
rebuildContent();
}
COM: <s> stop playing and reset cursor position </s>
|
funcom_train/19437289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialzeDiagram(Graphics draw, String which) {
// draw border, initalize axis, description of axis ...
drawBorder(draw);
drawYAxis(draw);
drawXAxis(draw, which);
draw.setColor(new Color(255, 0, 0));
}
COM: <s> initialze the diagram border axis </s>
|
funcom_train/12156448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XMLPipeline createPipeline(MarinerRequestContext context) {
XMLPipelineFactory factory = getPipelineFactory(context);
ExpressionContext expressionContext =
MCSExpressionHelper.getExpressionContext(context);
// create the pipeline configuration. This particular factory will
// create a configuration based on the MCS config file.
XMLPipelineConfiguration pipelineConfiguration =
factory.createPipelineConfiguration();
XMLPipelineContext pipelineContext =
factory.createPipelineContext(pipelineConfiguration,
expressionContext);
return factory.createPipeline(pipelineContext);
}
COM: <s> create a new pipeline for use in replaying sax events into mcs </s>
|
funcom_train/2580086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Range getContourDataRange() {
Range result = null;
ContourDataset data = getDataset();
if (data != null) {
Range h = getDomainAxis().getRange();
Range v = getRangeAxis().getRange();
result = this.visibleRange(data, h, v);
}
return result;
}
COM: <s> returns the range for the contours </s>
|
funcom_train/50898023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPrimaryKey(String sValue) throws NullPointerException {
if (null==sValue) throw new NullPointerException("DBPersist.setPrimaryKey() Value of primary key may not be null");
put((String) getTable().getPrimaryKey().getFirst(), sValue);
}
COM: <s> set value of primary key field for this dbpersist record </s>
|
funcom_train/49431461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PlanetPlacement getLastPlacedPlanet(PlayerRef player) {
if (isDoneWithPlacingPlanetsAndBases()) {
return null;
}
// the list is sorted by placement order
PlanetPlacement last = null;
for (PlanetPlacement placement : placedPlanets) {
if (ObjectUtils.isTypeSafeEqual(PlayerRef.class, player, placement.getPlacedBy())) {
last = placement;
// further look for 'later' placements
}
}
return last;
}
COM: <s> returns the last placed planet of the given player </s>
|
funcom_train/20694468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readDataFrom(Element theElement) {
formName = StringUtilities.restrictString(XMLMarshaller
.getTextFromElement(theElement.getChild("formName")), 255);
dirty("formName");
plainTexts = XMLMarshaller.readHashMapFromXMLTree(theElement
.getChild("plainText"), XMLMarshaller.idempotence,
XMLMarshaller.idempotence, new HashMap<String, String>());
dirty("plainText");
}
COM: <s> updates the content from the passed element containing partial versions </s>
|
funcom_train/18255622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAt(MapCoordinate coordinate) {
double lat1 = ((MapCoordinate) getCoordinate()).getLatitude();
double lon1 = ((MapCoordinate) getCoordinate()).getLongitude();
double lat2 = coordinate.getLatitude();
double lon2 = coordinate.getLongitude();
return Math.abs(lat1 - lat2) < 0.0001 && Math.abs(lon1 - lon2) < 0.0001;
}
COM: <s> returns true if the map agent is at the location defined by </s>
|
funcom_train/7286786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void wakeup() {
// If external synchronization and pooling works properly,
// this cannot happen. Just a sanity check.
if (this.waiter == null) {
throw new IllegalStateException
("Nobody waiting on this object.");
}
// One condition might be shared by several WaitingThread instances.
// It probably isn't, but just in case: wake all, not just one.
this.cond.signalAll();
}
COM: <s> wakes up the waiting thread </s>
|
funcom_train/3086395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void redrawImage() {
ImageReference oldValue = progressBarImage;
ProgressBarRenderer renderer = getRenderer();
if (renderer == null) {
progressBarImage = null;
return;
} else {
progressBarImage = renderer.drawProgressBar(this);
}
if (oldValue != progressBarImage) {
super.firePropertyChange(IMAGE_CHANGED_PROPERTY, oldValue, progressBarImage);
}
}
COM: <s> the image needs to be redraw when ever the model or properties </s>
|
funcom_train/45112622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String iniRead(String filename, String section, String key, String defaultValue) throws Exception {
Map<?, ?> result = runRemoteScript(commandCreate("IniRead", filename, section, key, defaultValue));
processResult("Read a value from ini file: ", result);
Object stdOut = result.get(STDOUT);
if (stdOut != null && !StringUtils.isEmpty(stdOut.toString())) {
return stdOut.toString();
}
return defaultValue;
}
COM: <s> reads a value from a standard format </s>
|
funcom_train/48153506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameters(){
coinBox.setProbability(p);
coinBox.setCoinCount(n + m - 1);
winProb = 0;
for (int i = n; i < n + m; i++)
winProb = winProb + Functions.comb(i - 1, n - 1) * Math.pow(p, n) * Math.pow(1 - p, i - n);
winDist.setProbability(winProb);
reset();
}
COM: <s> this method sets the parameter of the win distribution when the number </s>
|
funcom_train/14318098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendProperty(String propertyName, String propertyValue) {
if ((propertyValue != null) && (propertyValue.length() > 0)) {
StringBuilder lineBuffer = new StringBuilder();
lineBuffer.append(propertyName);
lineBuffer.append(':');
appendMultilineEncodedValue(lineBuffer, propertyValue);
writeLine(lineBuffer.toString());
}
}
COM: <s> append single value property </s>
|
funcom_train/35492648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void leave(Player player) {
GameRoom room = gameFor(player);
room.removePlayer(player);
synchronized(gamesByPlayer) {
gamesByPlayer.remove(player.getNickname());
}
ClientConnection client =
(ClientConnection) playerConnections.get(player.getNickname());
client.stop();
synchronized(playerConnections) {
playerConnections.remove(player.getNickname());
}
}
COM: <s> removes a player from a game </s>
|
funcom_train/40291752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private NewDNode getBestNeighbourOf(NewDNode node) {
NewDNode best = null;
for(Node dn : node.getNeighbours()) { // TODO Ugly and buggy
if(best == null || ((NewDNode)dn).getDistanceFromStart() < best.getDistanceFromStart()) {
best = (NewDNode)dn;
}
}
return best;
}
COM: <s> returns the neighbour with shortes path to the start </s>
|
funcom_train/1652778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Message decodeSingleMessage(byte[] data, int offset, int length, PeerContext peer, int overhead) {
try {
return Message.decodeMessageFromPacket(data, offset, length, peer, overhead);
} catch (Throwable t) {
Logger.error(this, "Could not decode packet: "+t, t);
return null;
}
}
COM: <s> decode a packet from data and a peer </s>
|
funcom_train/8641891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endLayer() {
int n = 1;
if (layerDepth != null && !layerDepth.isEmpty()) {
n = ((Integer)layerDepth.get(layerDepth.size() - 1)).intValue();
layerDepth.remove(layerDepth.size() - 1);
}
while (n-- > 0)
content.append("EMC").append_i(separator);
}
COM: <s> ends a layer controlled graphic block </s>
|
funcom_train/10282289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSound(boolean pSound) {
if( Debug.WITH_DEV_DEBUG ) {
mLog.info("setSound(), this: " + this + ", old value: " + mSound
+ ", new value: " + pSound);}
mSound = pSound;
}
COM: <s> sets the value of sound </s>
|
funcom_train/37409808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Control createContents(Composite parent) {
// this parent code creates the three areas
Control contents=super.createContents(parent);
if(this.title != null)
super.setTitle(this.title);
else
super.setTitle(Trans.getString("Choice.List.Dialog.Default.Title"));
if(this.message != null)
super.setMessage(this.message);
else
super.setMessage(Trans.getString("Choice.List.Dialog.Default.Message"));
contents.getAccessible().addAccessibleListener(new AccessibleAdapter(){
public void getName(AccessibleEvent e) {
e.result = "choise dialog for "+Trans.getString("Choice.List.Dialog.Default.Message");
}
});
return contents;
}
COM: <s> create the dialog </s>
|
funcom_train/16465221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void zoomChanged(int oldZoom) {
zoomSlider.setToolTipText("Zoom level " + zoom);
zoomInButton.setToolTipText("Zoom to level " + (zoom + 1));
zoomOutButton.setToolTipText("Zoom to level " + (zoom - 1));
zoomOutButton.setEnabled(zoom > mapSource.getMinZoom());
zoomInButton.setEnabled(zoom < mapSource.getMaxZoom());
}
COM: <s> every time the zoom level changes this method is called </s>
|
funcom_train/18288541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void convertSelectedProjects(IDevice device) {
// Setup the progress monitoring
ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
try {
// Run as an atomic Workspace operation
dialog.open();
IProgressMonitor monitor = dialog.getProgressMonitor();
EclipseMECorePlugin.getWorkspace().run(getRunnable(device), monitor);
dialog.close();
} catch (CoreException e) {
handleException(e);
}
}
COM: <s> convert the selected projects using the specified </s>
|
funcom_train/16604234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object typeValue(String value, Class clazz) throws SlickXMLException {
if (clazz == String.class) {
return value;
}
try {
clazz = mapPrimitive(clazz);
return clazz.getConstructor(new Class[] {String.class}).newInstance(new Object[] {value});
} catch (Exception e) {
throw new SlickXMLException("Failed to convert: "+value+" to the expected primitive type: "+clazz, e);
}
}
COM: <s> convert a given value to a given type </s>
|
funcom_train/5322540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOwner(Entity owner) {
if (owner == null) {
Log.error("NullP sent to setOwner.");
} else {
self = owner;
self.addListener(this, EnterChannelListener.class, 100);
self.addListener(this, TalkChannelListener.class, 100);
self.addListener(this, MessageChannelListener.class, 100);
}
}
COM: <s> sets the owner of the ai the controlled entity </s>
|
funcom_train/41761680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasPrevShowable() {
if (pagesIterator == null)
return false;
if (!pagesIterator.hasPrevious())
return false;
if (pagesIterator.previousIndex() == 0)
return false;
for (int i = pagesIterator.previousIndex(); i >= 0; i--) {
if (pages.get(i).shouldDisplay())
return true;
}
return false;
}
COM: <s> determines whether there is a previous show able page in the sequence given </s>
|
funcom_train/46188249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sortByScoreDescending() {
Collections.sort(hits, new SearchHitByScoreComparator());
int number = 1;
Iterator it = hits.iterator();
while (it.hasNext()) {
SearchHit hit = (SearchHit)it.next();
hit.setNumber(number);
number++;
}
}
COM: <s> sorts the search results by score in reverse order </s>
|
funcom_train/20385345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object put(Object key, Object value) {
if ((value != null) && !clazz.isAssignableFrom(value.getClass())) {
// convert to correct type
Map context = ActionContext.getContext().getContextMap();
value = XWorkConverter.getInstance().convertValue(context, null, null, null, value, clazz);
}
return super.put(key, value);
}
COM: <s> associates the specified value with the specified key in this map </s>
|
funcom_train/49317641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent ev) {
// get the query result and display it
try {
QueryResult queryResult = _fieldDesc.getLinkValue(_tableQueryResult, _value, _row);
_queryResultDisplay.setQueryResult(queryResult);
} catch (Exception e) {
DialogUtil.error(e);
}
}
COM: <s> called when the default button is pressed </s>
|
funcom_train/45468518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bind(final int param, final Object value) throws DTXException {
if (_stmt == null) {
throw new DTXException("No prepared statement.");
}
try {
_stmt.setObject(param, value);
} catch (SQLException sqle) {
throw new DTXException(sqle);
}
}
COM: <s> binds an object value to a parameter in the query </s>
|
funcom_train/2304866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object called() {
called++;
if (this.exceptionSet) {
try {
Field field = Unsafe.class.getDeclaredField("theUnsafe");
field.setAccessible(true);
((Unsafe) field.get(null)).throwException(this.exception);
} catch (IllegalAccessException iae) {
throw new RuntimeException("Cannot access Unsafe", iae);
} catch (NoSuchFieldException nsfe) {
throw new RuntimeException("Can't find theUnsafe", nsfe);
}
}
return this.returns;
}
COM: <s> this method should be called whenever the method associated with this </s>
|
funcom_train/43506913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doResetInitValues() {
kunNr.setValue(oldVar_kunNr);
kunMatchcode.setValue(oldVar_kunMatchcode);
kunName1.setValue(oldVar_kunName1);
kunName2.setValue(oldVar_kunName2);
kunOrt.setValue(oldVar_kunOrt);
kunBranche.setSelectedItem(oldVar_kunBranche);
kunMahnsperre.setChecked(oldVar_kunMahnsperre);
}
COM: <s> resets the old values </s>
|
funcom_train/5821603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flushEvent(Event event){
log.debug("Flushing "+event.getUei());
synchronized (activeSessions){
cleanActiveSessions();
Iterator<InsSession> it = activeSessions.iterator();
while(it.hasNext()){
InsSession insSession = it.next();
PrintStream ps = insSession.getStreamToClient();
synchronized (ps) {
if(ps!=null){
try {
event.marshal(new PrintWriter(ps));
} catch (Exception e) {
log.error("Error while sending current event to client"+e);
}
}
}
}
}
}
COM: <s> flushes the event in input to all active sessions with clients </s>
|
funcom_train/34557652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHeight(int height) {
if(!isRendered()) {
if(height == -1) {
setAttribute("height", "auto", true);
} else {
setAttribute("height", height, true);
}
} else {
setHeightRendered(height);
}
}
COM: <s> the height of this component in pixels defaults to auto </s>
|
funcom_train/42951107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BitSet backtrackPartialSubkeyGuess(BitSet partialc, BitSet partialk) {
partialc = Util.copyBitSet(partialc, 4);
partialc.xor(partialk);
SpnImpl spn = new SpnImpl();
BitSet U = spn.sBoxFunc(partialc, true);
return U;
}
COM: <s> backtrack across one s box with a partial ciphertext and partial subkey </s>
|
funcom_train/35541484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLexerErrors() {
try {
Cob2XsdModel model = new Cob2XsdModel();
Cob2Xsd cob2xsd = new Cob2Xsd(model);
cob2xsd.translate(" 1 ^�@.");
assertEquals("line 1:12 Syntax error in last COBOL clause", cob2xsd
.getErrorHistory().get(0));
} catch (XsdGenerationException e) {
fail();
} catch (RecognizerException e) {
fail();
}
}
COM: <s> lexing might get errors but they are all recovered from </s>
|
funcom_train/20776254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumVelocityPoints (int velocityPoints){
if ( velocityPoints >= pathLength ){
velocityPoints = pathLength;
}
int old = this.numVelocityPoints;
this.numVelocityPoints = velocityPoints;
getPrefs().putInt("BluringFilter2DTracker.numVelocityPoints",velocityPoints);
getSupport().firePropertyChange("velocityPoints",old,this.numVelocityPoints);
}
COM: <s> sets the number of path points to use to estimate cluster velocities </s>
|
funcom_train/5373340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOf (TableColumn column) {
checkWidget ();
if (column == null) error (SWT.ERROR_NULL_ARGUMENT);
// int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
// int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);
int count = columns.length;
for (int i=0; i<count; i++) {
if (columns [i] == column) return i;
}
return -1;
}
COM: <s> searches the receivers list starting at the first column </s>
|
funcom_train/18142315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delProperty(int pos) {
// range check
if (children==null||pos<0||pos>=children.size())
throw new IndexOutOfBoundsException("No property "+pos);
Property removed = (Property)children.get(pos);
// tell to removed next
removed.delNotify(this, pos);
// remove it now
children.remove(pos);
// done
}
COM: <s> removes a property by position </s>
|
funcom_train/25504767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getQuery(String queryName, Object paramsObj, Map parameterMap, Map<String, Object> loopParamMap, int indent) {
Set aliasSet = new HashSet();
return getQuery(queryName, paramsObj, parameterMap, loopParamMap, aliasSet, indent);
}
COM: <s> command pattern will be used soon </s>
|
funcom_train/42188581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonSave() {
if (jButtonSave == null) {
jButtonSave = new JButton();
jButtonSave.setText("Guardar");
jButtonSave.setVisible(false);
jButtonSave.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
saveMyHarvest();
}
});
}
return jButtonSave;
}
COM: <s> this method initializes j button save </s>
|
funcom_train/4755300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkSampleData(final double[] data) {
if (data == null) {
throw new NullArgumentException();
}
if (data.length < 2) {
throw new NumberIsTooSmallException(LocalizedFormats.INSUFFICIENT_DATA_FOR_T_STATISTIC,
data.length, 2, true);
}
}
COM: <s> check sample data </s>
|
funcom_train/1209966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean breakpoint(int line, boolean value) {
if (!breakableLine(line)) {
throw new IllegalArgumentException(String.valueOf(line));
}
boolean changed;
synchronized (breakpoints) {
if (breakpoints[line] != value) {
breakpoints[line] = value;
changed = true;
} else {
changed = false;
}
}
return changed;
}
COM: <s> sets or clears the breakpoint flag for the given line </s>
|
funcom_train/1110580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkDefaultLabelPosition() {
labelPosition = GraphConstants.getLabelPosition(allAttributes);
String label = String.valueOf(getCell());
if (labelPosition == null && label != null && label.length() > 0) {
int center = GraphConstants.PERMILLE / 2;
labelPosition = new Point(center, 0);
GraphConstants.setLabelPosition(allAttributes, labelPosition);
}
}
COM: <s> hook for subclassers to avoid default label positions </s>
|
funcom_train/50156600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element getTextInput() {
// prtln("getTextInput\n\txpath: " + xpath + "\n\tleafName: " + XPathUtils.getLeaf(xpath));
// hardcoded convention: fields named "description" are represented as TextArea
if (XPathUtils.getLeaf(xpath).startsWith("description")) {
return getTextAreaInput();
}
if (typeName.equals("xsd:boolean")) {
return getBooleanInput();
}
return super.getTextInput();
}
COM: <s> for elements named description a text area element is created and for </s>
|
funcom_train/31225332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processShout( Shout shout ) {
logger.debug("processShout(" + shout + ")");
try {
auction.newShout(shout);
logger.debug("finished processing shout");
} catch ( AuctionException e ) {
logger.error("Could not process shout: " + e.getMessage());
e.printStackTrace();
}
}
COM: <s> process a new shout in the auction </s>
|
funcom_train/21850344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(Object prop) {
if (prop instanceof TabbedPaneProperties) {
TabbedPaneProperties tpp = (TabbedPaneProperties) prop;
m_items = new LinkedList();
if (tpp.m_items != null) {
Iterator iter = tpp.m_items.iterator();
while (iter.hasNext()) {
TabProperty tp = (TabProperty) iter.next();
TabProperty new_tp = new TabProperty();
new_tp.setValue(tp);
m_items.add(new_tp);
}
}
} else {
assert (false);
}
}
COM: <s> sets this property to that of another tabbed pane properties object </s>
|
funcom_train/49535593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object load(String id) throws DotHibernateException{
try{
Session session = getSession();
if (id == null)
return thisClass.newInstance();
return session.load(thisClass, id);
}catch(ObjectNotFoundException onf){
return null;
}catch (Exception e) {
throw new DotHibernateException("Unable to load Object with id " + id + " from Hibernate Session ", e);
}
}
COM: <s> will return null if object not found </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.