__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/4942451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel createProjectFrameOpButton(Icon icon) {
final JLabel button = new JLabel(icon);
Dimension size = new Dimension(12, 12);
button.setMinimumSize(size);
button.setMaximumSize(size);
button.setPreferredSize(size);
button.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {
button.setBorder(LineBorder.createBlackLineBorder());
}
@Override
public void mouseExited(MouseEvent e) {
button.setBorder(null);
}
});
return button;
}
COM: <s> creates the project frame operation button </s>
|
funcom_train/1675042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCachePercent() {
String val =
DbConfigManager.getVal(props,
EnvironmentParams.MAX_MEMORY_PERCENT);
try {
return Integer.parseInt(val);
} catch (NumberFormatException e) {
throw new IllegalArgumentException
("Cache percent is not a valid integer: " + e.getMessage());
}
}
COM: <s> returns the percentage value used in the je cache size calculation </s>
|
funcom_train/9809624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTimeBase(TimeBase master) throws IncompatibleTimeBaseException{
if (getState() == STARTED) {
throw new ClockStartedError("setTimeBase cannot be used on a started clock.");
}
if (master == null) {
if (!(this.master instanceof SystemTimeBase))
this.master = new SystemTimeBase();
} else
this.master = master;
}
COM: <s> set a time base on the clock </s>
|
funcom_train/1864738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawSplashText(String text) {
if (isSplash) {
myScreen.fillArea(new Point(3,3), new Point(156, 12), false);
myScreen.drawText(FontSize.SMALL, new Point(70, 5), G15Position.CENTER, text);
myScreen.silentDraw();
}
}
COM: <s> draw the text used for information on the splash screen </s>
|
funcom_train/28921754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setBounds(200, 130, 128, 27);
jButton1.setText("Cancel");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
doCancel();
}
});
}
return jButton1;
}
COM: <s> this method initializes j button1 </s>
|
funcom_train/7511153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean moveUp(int pos) {
if (pos > 0 && pos < filterList.size()) {
logger.trace("Moving index {} up.", pos);
IFilter old = filterList.get(pos - 1);
filterList.set(pos - 1, filterList.get(pos));
filterList.set(pos, old);
return true;
}
logger.trace("Can't move up, position {} is not in range.", pos);
return false;
}
COM: <s> move filter up i </s>
|
funcom_train/18349473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CapCommon morph() {
Class targetClass = null;
String name = getTaskType().getTaskMorphClassName(this);
try {
targetClass = Class.forName(name, true, CapCommonClass.getClassLoader());
}
catch (ClassNotFoundException e) {
return this;
}
catch(NoClassDefFoundError e) {
logger.warning("Task jacket instantiation failed for " + this + " Dodgy input classes???");
return this;
}
return genericMorph(targetClass);
}
COM: <s> change a jacket type to the correct run time type </s>
|
funcom_train/39949426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getRepeatFields() {
if (rule == null)
return;
int[] fields = rule.getFields();
for (int i = 0; i < fields.length; i++) {
int field = fields[i];
if (field != RepeatRule.END)
repeatFields[PIMUtil.getRepeatFieldIndexFromID(field)] = rule.getInt(field);
else
repeatFields[PIMUtil.getRepeatFieldIndexFromID(field)] = rule.getDate(field);
}
}
COM: <s> reads set fields and fills repeat fields </s>
|
funcom_train/2578991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof VectorRenderer)) {
return false;
}
VectorRenderer that = (VectorRenderer) obj;
if (this.baseLength != that.baseLength) {
return false;
}
if (this.headLength != that.headLength) {
return false;
}
return super.equals(obj);
}
COM: <s> tests this code vector renderer code for equality with an arbitrary </s>
|
funcom_train/28875652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void captureBackground() {
try {
Robot robot=new Robot( );
Toolkit tk=Toolkit.getDefaultToolkit( );
Dimension dim=tk.getScreenSize( );
background = robot.createScreenCapture(new Rectangle(0,0,
(int)dim.getWidth( ), (int)dim.getHeight( )));
} catch (Exception e) {
System.err.println(e);
}
}
COM: <s> caputure the background image of screen </s>
|
funcom_train/17695060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testFlushingBySizeTreshold() {
final LoggingRecordsCountingLoggingHandler counter = new LoggingRecordsCountingLoggingHandler();
final LoggingHandler handler = new BufferingLoggingHandler(counter);
for (int i = 1; i < DEFAULT_BUFFER_SIZE; i++) {
handler.handle(RECORD);
}
Assert.assertEquals(0, counter.getCounter());
handler.handle(RECORD);
Assert.assertEquals(DEFAULT_BUFFER_SIZE, counter.getCounter());
}
COM: <s> checks flushing by size treshold </s>
|
funcom_train/27927560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString() throws InvalidBEncodingException {
try {
return new String(getBytes(), "ISO-8859-1");
}
catch (ClassCastException cce) {
throw new InvalidBEncodingException(cce.toString());
}
catch (UnsupportedEncodingException uee) {
throw new InternalError(uee.toString());
}
}
COM: <s> returns this bevalue as a string </s>
|
funcom_train/28268798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(IAstStatement stmt){
if(stmt==null){
if(Global.verbose){
System.out.println("Null statement encountered in AstStatements.add()");
}
throw new RuntimeException("Null Statement!!! line: "+stmt.getLine());
}
if(stmt instanceof AstLoad){
//if stmt is a load statement, add each statement within the AstLoad class into this AstStatements instance
statements.addAll(((AstLoad)stmt).getStatements().getStatements());
}else{
statements.add(stmt);
}
}
COM: <s> adds a statement to the list of statements </s>
|
funcom_train/44398406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendGameOver(String winner, UserId userId) {
Document gameOverMessage = (Document) GAME_OVER_TEMPLATE.clone();
gameOverMessage.selectSingleNode("//message/name").setText(winner);
sendWithConfirmation(userId, gameOverMessage);
}
COM: <s> sends game over message </s>
|
funcom_train/20773752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDisparityLimitEnabled(int id) {
boolean ret = false;
if(id == -1){
ret = globalDisparity.isDisparityLimitEnabled();
} else if(id >= 0){
if(clusterDisparity.get(id) != null)
ret = clusterDisparity.get(id).isDisparityLimitEnabled();
} else {
}
return ret;
}
COM: <s> returns true if enable lower disparity limit is true </s>
|
funcom_train/46654617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showTestsPublished() {
// Tests published
if (alias.equalsIgnoreCase(Global.currentUser.getAlias())) {
noElementString = Global.constantsTest.noTestsByMe();
} else {
noElementString = Global.constantsTest.noTestsUser(alias);
}
searchOptions = new SearchOptions();
searchOptions.setTestautogenerated(0);
searchOptions.setTestexam(1);
searchOptions.setTestnormal(1);
searchOptions.setQuestionsindividual(0);
searchOptions.setAuthor(alias);
content.add(new TestsPaging(searchOptions, noElementString));
}
COM: <s> show tests published </s>
|
funcom_train/50873546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String escapeDoubleQuotes(String inputString) {
StringBuffer strBuf = new StringBuffer();
StringReader in = new StringReader(inputString);
int x;
Character doubleQuoteCharacter = new Character('\"');
try {
while ((x = in.read()) != -1) {
Character myChar = new Character((char) x);
if (doubleQuoteCharacter.equals(myChar)) {
strBuf.append('\"');
}
strBuf.append(myChar);
}
} catch (IOException e) {
} // ignore the error
return strBuf.toString();
}
COM: <s> escapes the double quotes of any given string </s>
|
funcom_train/50188989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireSourcePI(SAXEvent saxevent) {
if (hasTraceListeners()) {
// count of registered tracelisteners
int countListener = traceListeners.size();
for (int i = 0; i < countListener; i++) {
TraceListener currentListener =
(TraceListener) traceListeners.elementAt(i);
// call the according method on tracelistener
currentListener.sourcePI(saxevent);
}
}
}
COM: <s> fire when a pi event of the source was received </s>
|
funcom_train/37587146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void textGotoLine4() throws BadLocationException {
final String s = "a\nb\nc\n";
_doc.insertString(0, s, null);
_doc.gotoLine(8);
assertEquals("#0.0", 6, _doc.getCurrentLocation());
}
COM: <s> test going to a line beyond the number of lines in a document </s>
|
funcom_train/10977704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFocus() {
if (this.focus != null) {
return (this.focus);
}
ValueBinding vb = getValueBinding("focus");
if (vb != null) {
return ((String) vb.getValue(getFacesContext()));
} else {
return (null);
}
}
COM: <s> p return the focus element name </s>
|
funcom_train/40856183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SolrQueryParser getSolrQueryParser(String defaultField) {
SolrQueryParser qp = new SolrQueryParser(this,defaultField);
String operator = getQueryParserDefaultOperator();
qp.setDefaultOperator("AND".equals(operator) ?
QueryParser.Operator.AND : QueryParser.Operator.OR);
return qp;
}
COM: <s> a solr query parser linked to this index schema for field datatype </s>
|
funcom_train/13958878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkConditions() {
if (getLoggingEntity() == null) {
LogLog.warn("Attempting to log an event with a null LoggingEntity specified.");
} else if (!safeToCreateEditingContext()) {
LogLog.warn("Attempting to log an event to an EREOFAppender before an ObjectStoreCoordinator has been added.");
} else {
conditionsChecked = true;
}
return conditionsChecked;
}
COM: <s> used to determine if the system is ready to log </s>
|
funcom_train/24115258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(XulTag node) {
if( node instanceof MenuDef || node instanceof MenuChoiceDef ) {
if (_menu != null)
Xul.warning( "toolbarbutton " + getId() + " already has an menu inside" );
_menu = (MenuFactory)node;
} else
Xul.SyntaxError.UNSUPPORTED_TAG_INSIDE(this, node.getElementName(), Xul.Tag.TOOLBARBUTTON);
}
COM: <s> add a child node for example a menu vja </s>
|
funcom_train/12923196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readUnsignedShort() throws IOException {
if (size - index < 2) {
fill();
}
if (index + 2 > size) {
throw new ArrayIndexOutOfBoundsException();
}
int value = buffer[index++] & BYTE_MASK;
value |= (buffer[index++] & BYTE_MASK) << TO_BYTE1;
return value;
}
COM: <s> read an unsigned 16 bit integer </s>
|
funcom_train/24086942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTargetFormatFromPath(String path) {
int toIdx = path.lastIndexOf("2");
if (toIdx == path.length()-1 )
// formats like JP2 or PDF_2 contain a "2", but only at the end
toIdx = path.lastIndexOf("2", toIdx-1);
return path.substring(toIdx+1);
}
COM: <s> extracts the target format from the given path </s>
|
funcom_train/9297401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IModelConverterType findModelConverterType(String id) {
if (id == null)
throw new IllegalArgumentException();
if (modelConverterTypes == null)
loadModelConverterTypes();
Iterator<IModelConverterType> iterator = modelConverterTypes.iterator();
while (iterator.hasNext()) {
IModelConverterType modelConverterType = (IModelConverterType) iterator
.next();
if (id.equals(modelConverterType.getId()))
return modelConverterType;
}
return null;
}
COM: <s> returns the model converter type with the given id or code null code </s>
|
funcom_train/33687600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLowQuality(final TextDocumentStatistics dsBefore, final TextDocumentStatistics dsAfter) {
if (dsBefore.getNumWords() < 90 || dsAfter.getNumWords() < 70) {
return true;
}
if (dsAfter.avgNumWords() < 25) {
return true;
}
return false;
}
COM: <s> given the statistics of the document before and after applying the </s>
|
funcom_train/42906547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void LSFinterpolate2a_enc(double[] a, double[] lsf1, double[] lsf2, int lsf2P, double coef, int length) {
double[] lsftmp = new double[LPC_FILTERORDER];
interpolate(lsftmp, lsf1, lsf2, lsf2P, coef, length);
lsf2a(a, lsftmp);
}
COM: <s> lsf interpolator and conversion from lsf to a coefficients subrutine to </s>
|
funcom_train/50908776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSquareThreatened(Point square, Color threateningColor) {
if (square.x >= 0 && square.x < 8
&& square.y >= 0 && square.y < 8) {
if (!getThreateningSquares(squares[square.x][square.y], threateningColor).isEmpty()) {
return true;
}
}
return false;
}
COM: <s> deturmines if the specified square is threatend by any pieces of the </s>
|
funcom_train/48536368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Tree parseExprList() throws ParserException {
List<Tree> expL = new ArrayList<Tree>();
boolean forceOneMoreExpr = false;
while ((!peek(TokenType.RPAREN)) || forceOneMoreExpr) {
forceOneMoreExpr = false;
expL.add(parseExpr());
if (peek(TokenType.RPAREN)) {
} else {
accept(TokenType.COMMA);
forceOneMoreExpr = true;
}
}
return factory.makeList(expL.toArray(new Tree[0]));
}
COM: <s> method that parses a list of expression </s>
|
funcom_train/43282566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getComponent() {
if (!ComponentDescriptorBaseClass.saveMode) {
return super.getComponent();
}
List components = new LinkedList();
components.addAll(super.getComponent());
Iterator it = components.iterator();
while (it.hasNext()) {
Component c = (Component) it.next();
if (c.getLocalData() == null || c.getLocalData().size() == 0) {
it.remove();
}
}
return components;
}
COM: <s> filter out components that have no ownn configuration </s>
|
funcom_train/3743592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRenderManager(RenderManager renderManager) {
this.renderManager = renderManager;
// Casting to HttpSession ruins it for portlets, in this case we only
// need a unique reference so we use the object hash
sessionId = FacesContext.getCurrentInstance().getExternalContext().getSession(false).toString();
renderManager.getOnDemandRenderer(sessionId).add(this);
}
COM: <s> sets the application render manager reference and creates a new on demand </s>
|
funcom_train/25528434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "Value: " + String.format("%5.2f%%", ValueSimilarity * 100.0) +
" Containment: " + String.format("%5.2f%%", ContainmentSimilarity * 100.0) +
" Size: " + String.format("%5.2f%%", SizeSimilarity * 100.0);
}
COM: <s> return a string representation of this object describing all aspects of similarity </s>
|
funcom_train/13648080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void pumpStream() throws IOException {
byte[] buf = new byte[BUFFER_SIZE];
int read = 0;
if (!endOfStream) {
read = this.inStream.read(buf);
if (read > 0) {
outputStream.write(buf, 0, read);
}else if (read == -1) {
endOfStream = true;
}
}
}
COM: <s> explicit pump of the stream </s>
|
funcom_train/18229971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void attachNewDelegates(DelegatingErrorManager dem, String name) {
Set newDelegatesForDem = new HashSet();
for (Iterator j = delegates.iterator(); j.hasNext();) {
ErrorManager e = (ErrorManager) j.next();
newDelegatesForDem.add(e.getInstance(name));
}
dem.setDelegates(newDelegatesForDem);
}
COM: <s> takes all our delegates asks them for an instance identified by </s>
|
funcom_train/31932149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProperty(String key) {
ArrayList values = (ArrayList) properties.get( key );
String property = null;
if (values != null)
property = (String) values.get( 0 );
if (property != null)
return property;
Category parent = this;
while ( (parent = parent.getParent()) != null ) {
if ( parent.hasProperty( key ) ) {
property = parent.getProperty( key );
break;
}
}
return property;
}
COM: <s> convienence method which returns a </s>
|
funcom_train/8380049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Properties substituteJNDIProperties(Properties jndiProps) {
Properties properties = new Properties();
for (Map.Entry<Object, Object> entry : jndiProps.entrySet()) {
String key = (String) entry.getKey();
String value = substituteJNDIProperty((String) entry.getValue());
if (value != null) {
properties.setProperty(key, value);
}
}
return properties;
};
COM: <s> replaces jndi references like java comp env in all properties values </s>
|
funcom_train/51601736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void waitForPassiveListening() {
Log.log(this, Log.Level.DEBUG, "Waiting for passive thread to terminate");
UIManager.getInstance().setProgressLabel("Waiting for passive listening to end ...");
while(pdthread.getState() == Thread.State.RUNNABLE) {
}
Log.log(this, Log.Level.DEBUG, "Passive thread terminated");
}
COM: <s> loop until the passive thread terminated </s>
|
funcom_train/28756816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChemistry(String newVal) {
if ((newVal != null && this.chemistry != null && (newVal.compareTo(this.chemistry) == 0)) ||
(newVal == null && this.chemistry == null && chemistry_is_initialized)) {
return;
}
this.chemistry = newVal;
chemistry_is_modified = true;
chemistry_is_initialized = true;
}
COM: <s> setter method for chemistry </s>
|
funcom_train/5424734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void discoverVoiceConfPath() throws VGettyException {
if (voiceConfPath != null) {
return;
}
File voiceDotConf = new File("/etc/mgetty+sendfax", "voice.conf");
if (voiceDotConf.exists()) {
voiceConfPath = voiceDotConf;
return;
}
else {
throw new VGettyException("Unable to find vgettys' voice.conf file");
}
}
COM: <s> try various locations for the voice </s>
|
funcom_train/18241478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent pEvent) {
// System.out.println("deselecting adapter knows the mouse was pressed");
AssemblyConsensusSelectionEvent event = new AssemblyConsensusSelectionEvent(this,
AssemblySelectionEvent.DISPOSITION_WHOLE_SEQUENCE_UNSELECTED);
TDBAssemblyCoveragePanel.this.selectionManager.fireAssemblySelectionEvent(event);
}
COM: <s> describe code mouse pressed code method here </s>
|
funcom_train/32775786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doInitialSchedules() {
Kassierer kassierer = null;
for (int i = 0; i < this.Anz_Kassierer; i++) {
kassierer = new Kassierer(this, i);
kassierer.setState("passive");
this.queueIdleKassierer.insert(kassierer);
}// end for i
KundeGenerator kundeGenerator = new KundeGenerator(this);
kundeGenerator.activate(new TimeSpan(0));
}// end doInitialSchedules()
COM: <s> schedules the first events and processes onto the frameworks internal event list </s>
|
funcom_train/22555587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayTypingNotification(ITypingMessageEvent event) {
ChatTab tab = null;
//tab = tabs.get(event.getFromID());
tab = tabs.get(PCMChatClient.getLowercaseUserID(event.getFromID().getName()));
if (tab != null) {
tab.showIsTyping(event.getTypingMessage().isTyping());
}
}
COM: <s> display a message to notify the current user that a typing event has </s>
|
funcom_train/25332414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetParameter() throws Exception {
HomologyTypeHandler i = new HomologyTypeHandler();
final PreparedStatement ps = this.context.mock(PreparedStatement.class);
try {
i.setParameter(ps, 1, new Object(), JdbcType.BIT);
} catch (Exception e) {
fail();
}
}
COM: <s> test of set parameter method of class homology type handler </s>
|
funcom_train/5692648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL findResource(String name) {
try {
Enumeration resourceEnum = findResources(name);
if (resourceEnum.hasMoreElements()) {
return (URL)resourceEnum.nextElement();
}
}
catch (IOException ioe) {
// We must swallow this since findResource does not throw any exceptions!
}
return null;
}
COM: <s> finds the specified resource </s>
|
funcom_train/19100729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkBounds() {
FigureEnumeration k = drawing().figures();
if (k.hasNextFigure()) {
Rectangle r = k.nextFigure().displayBox();
while (k.hasNextFigure()) {
r.add(k.nextFigure().displayBox());
}
r.grow(10, 10);
r.add(0, 0);
setLocation(r.getLocation());
setSize(r.getSize());
setMinimumSize(r.getSize());
}
}
COM: <s> checks and updates the bounds of this component according to its drawing </s>
|
funcom_train/23718269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createRandomPassword() {
byte[] bytes = new byte[LENGTH_IN_BYTES];
rand.nextBytes(bytes);
StringBuilder sb = new StringBuilder(LENGTH_IN_CHARS);
for (byte b : bytes) {
sb.append(HEX.charAt(b & 0xf)).append(HEX.charAt((b >> 4) & 0xf));
}
return sb.toString();
}
COM: <s> generate a random password </s>
|
funcom_train/9436836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String writeToString() {
if (mFields.size() == 0) {
return null;
}
StringBuilder builder = new StringBuilder();
for (Field field : mFields) {
if (!Utility.arrayContains(writeOmitFields, field.name)) {
builder.append(field.name + ": " + field.value + "\r\n");
}
}
return builder.toString();
}
COM: <s> write header into string </s>
|
funcom_train/8985518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int setPrepareStatement(java.sql.PreparedStatement preStat, int idx, Integer[] array) throws java.sql.SQLException{
if (array!=null && array.length>0) {
for (int j=0; j<array.length; j++) {
this.setPrepareStatement(preStat, idx++, array[j]);
}
}
return idx;
}
COM: <s> call set prepare statment by a list of interger </s>
|
funcom_train/32091974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Shell getShell(String shellName) throws Exception{
Vector<Shell> allShells = getGlobalShells();
for(int i = 0; i < allShells.size(); i++){
Shell aShell = allShells.get(i);
if(shellName.equals(aShell.getName())){
return aShell;
}
}
throw new Exception("Shell " + shellName + " does not exist");
}
COM: <s> returns a shell of a given name from the vector containing all shell </s>
|
funcom_train/5678826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void makeRecordElements( Vector records) {
Iterator categories = getCategoryElements().iterator();
// Build up the tree!
while ( categories.hasNext()) {
Element category = (Element)categories.next();
int index = getInteger( category.attribute(INDEX));
for ( int j = 0; j < records.size(); j++) {
AbstractRecord record = (AbstractRecord)records.elementAt(j);
if ( index == record.getCategoryIndex()) {
category.add( convert( record));
}
}
}
}
COM: <s> converts all the palm </s>
|
funcom_train/43556876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doUpdate(final long runningTime, final long totalRunningTime) {
if (!this.isInitialized) initialize(null);
if (this.updateLengthInterval < runningTime || this.updateLengthInterval < totalRunningTime) {
sendTrap(getUpdateMessage(runningTime, totalRunningTime), ".4", runningTime);
}
}
COM: <s> sends a trap with the standard update message text </s>
|
funcom_train/300182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer toIntegerObject(String attrName, String expr) {
try {
return (expr == null) ? null :
(Integer) ExpressionEvaluatorManager.evaluate(
attrName, expr, Integer.class, this.tag, this.pageContext);
}
catch (JspException e) {
throw new RuntimeException(e);
}
}
COM: <s> evaluates the expression code expr code to produce an </s>
|
funcom_train/46759786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ISTreeModel getTree(ServiceCall call) throws Exception {
ISTreeModel treeModel = new ISTreeModel();
ISTreeNode hiddenRoot = new ISTreeNode();
treeModel.setRoot(hiddenRoot);
for (ISTreeNode node : getReferenceTreeNodeChildren(null, call)) {
hiddenRoot.add(node);
// get two levels
node.addAll(getReferenceTreeNodeChildren(node, call));
}
return treeModel;
}
COM: <s> get the tree model representation of the ref tree builder tree </s>
|
funcom_train/40018079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTrivial() {
Set<Transition> transitions = transitions();
if (transitions.size() != 2)
return false;
List<Transition> list = new ArrayList<Transition>(transitions);
Transition t1 = list.get(0);
Transition t2 = list.get(1);
return t1.outputs().equals(t2.inputs()) && t2.outputs().equals(t1.inputs());
}
COM: <s> p returns whether the t invariant is trivial </s>
|
funcom_train/5542950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String s = "{TYPE ERROR: " + goal.toString();
if (argNo > 0) s += " - arg " + argNo;
s += ": expected " + type;
s += ", found " + culprit.toString();
s += "}";
return s;
}
COM: <s> returns a string representation of this code illegal type exception code </s>
|
funcom_train/50338507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean handle() {
log.debug("Waiting for state change");
// wait until the sensor changes state
waitSensorChange(now, sensor);
// get new value
now = sensor.getKnownState();
log.debug("Found new state: "+now);
// match the turnout to the conditions
setTurnout(now);
return true; // never terminate voluntarily
}
COM: <s> watch sensor and when it changes adjust turnout to match </s>
|
funcom_train/41435680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdownSlee() throws InvalidStateException {
if (sleeState != SleeState.STOPPED) {
throw new InvalidStateException("slee in "+sleeState+" state");
}
// slee shutdown
beforeModulesShutdown();
for (Iterator<SleeContainerModule> i = modules
.descendingIterator(); i.hasNext();) {
i.next().sleeShutdown();
}
afterModulesShutdown();
sleeState = null;
}
COM: <s> shutdown of the slee container </s>
|
funcom_train/9362370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public boolean allowPurging(boolean allowPurging) throws IOException {
if (!mOwnsRegion) {
throw new IOException("Only the owner can make ashmem regions purgable.");
}
boolean oldValue = mAllowPurging;
if (oldValue != allowPurging) {
native_pin(mFD, !allowPurging);
mAllowPurging = allowPurging;
}
return oldValue;
}
COM: <s> enables or disables purging of the memory file </s>
|
funcom_train/16570540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBClear() {
if (bClear == null) {
bClear = new JButton();
bClear.setText(PluginServices.getText(this,"clear_expression"));
bClear.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
getTxtExp().setText("");
}
});
}
return bClear;
}
COM: <s> this method initializes b clear </s>
|
funcom_train/20748573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canCompleteStep(StepTO step, String user) {
if (step == null) {
return false;
}
return isStepOwner(step, user) || isGroupMember(step, user) || isProjectManager(step.getProjectName(), user) || isAdmin(user);
}
COM: <s> is current user allowed to complete specified step </s>
|
funcom_train/18479522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireMouseListeners(GLMouseMotionEvent ev) {
List<GLMouseListener> listeners = new ArrayList<GLMouseListener>(mouse_listeners) ;
for(int i = listeners.size() - 1; i >= 0; i--) {
listeners.get(i).mouseMotion(ev) ;
}
}
COM: <s> fires off listeners for a mouse motion event </s>
|
funcom_train/37828266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reclaimLargeSharedSendPacket() {
if ((this.sharedSendPacket != null)
&& (this.sharedSendPacket.getBufLength() > 1048576)) {
this.sharedSendPacket = new Buffer(this.connection
.getNetBufferLength());
//
// Suggest a GC to the JVM
//
System.gc();
}
}
COM: <s> ensures that we dont hold on to overly large send packets </s>
|
funcom_train/5329235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void SetValue (int num) {
value_ = num;
if (value_ < min_)
value_ = min_;
else if (value_ > max_)
value_ = max_;
if (value_ != min_)
pixel_ = (int)(Math.round(Math.abs((double)(value_ - min_) /
(double)(max_ - min_)) *
(double)(pixelMax_ - pixelMin_)) +
pixelMin_);
else
pixel_ = pixelMin_;
repaint();
}
COM: <s> sets the current value for the slider </s>
|
funcom_train/10687642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PrintWriter format(Locale l, String format, Object... args) {
if (format == null) {
throw new NullPointerException(Messages.getString("luni.D2")); //$NON-NLS-1$
}
new Formatter(this, l).format(format, args);
if (autoflush) {
flush();
}
return this;
}
COM: <s> writes a string formatted by an intermediate </s>
|
funcom_train/35093230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean usersCanSubscribe(long groupID) throws Exception{
lrr();
try {
result = resultStatement.executeQuery("SELECT self_subscription FROM groups WHERE id="+groupID);
if (!result.next()) throw new Exception("Group number "+groupID+" does not exist.");
if (result.getBoolean("self_subscription") == true)
return true;
else return false;
} finally {
urr();
}
}
COM: <s> determines whether ordinary users can subscribe to the group </s>
|
funcom_train/18029004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAsDatum() {
System.out.println("asDatum");
RankZeroDataSet ds = null;
Datum expResult = null;
Datum result = DataSetUtil.asDatum(ds);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of as datum method of class data set util </s>
|
funcom_train/19913661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadLibraryFilePath() {
final String key = "LIBRARY_FILE";
libraryFile = config.getProperty(key);
if (libraryFile == null) {
throw new ConfigurationException(new StringBuilder("configuration property [").append(key)
.append("] is invalid, only integer values are allowed")
.append("\ncheck the configuration file [").append(configFilePath).append("]").toString());
}
}
COM: <s> loads and checks library file configuration attribute br </s>
|
funcom_train/8520247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enable() {
// enable vertex shader if available
if (cgVertexProg != null) {
CgGL.cgGLEnableProfile(cgVertexProfile);
CgGL.cgGLBindProgram(cgVertexProg);
}
// enable fragment shader if available
if (cgFragmentProg != null) {
CgGL.cgGLEnableProfile(cgFragProfile);
CgGL.cgGLBindProgram(cgFragmentProg);
}
}
COM: <s> enables the shaders bound to this object </s>
|
funcom_train/29791646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTreePath() {
TreeNode[] treeNode = getPathToRoot(this, 0);
StringBuffer path = new StringBuffer();
for (int i = 1; i < treeNode.length; i++) {
AbstractFolder folder = (AbstractFolder) treeNode[i];
path.append("/" + folder.getName());
}
return path.toString();
}
COM: <s> return tree path as string </s>
|
funcom_train/12188830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPositiveFractionLessThanHalf() throws ExpressionException {
final Function function = new FloorFunction();
Value result = function.invoke(expressionContextMock, new Value[]{
factory.createDoubleValue(10.2)});
assertTrue(result instanceof DoubleValue);
assertTrue(10.0 == ((DoubleValue) result).asJavaDouble());
}
COM: <s> tests if function works correctly when argument is positive </s>
|
funcom_train/1104200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAramakriterEnumPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Alan_aramakriterEnum_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Alan_aramakriterEnum_feature", "_UI_Alan_type"),
HarzemliPackage.eINSTANCE.getAlan_AramakriterEnum(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
getString("_UI_anaPropertyCategory"),
null));
}
COM: <s> this adds a property descriptor for the aramakriter enum feature </s>
|
funcom_train/2440990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showPopupMenu(JPopupMenu popup) {
Dimension size = popup.getPreferredSize();
JComponent displayer = m_mapArea.isVisible() ? m_mapArea : this;
int x = displayer.getWidth() / 2 - size.width / 2;
int y = 50;
popup.show(displayer, x, y);
}
COM: <s> displays a popup menu in this code tree mapper code </s>
|
funcom_train/10238367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getTab2jPanel() {
if (tab2jPanel == null) {
jLabelStereoscopicIco = new JLabel();
jLabelStereoscopicIco.setIcon(new ImageIcon("icons/stereoscopic.jpg"));
jLabelStereoscopicIco.setBounds(new Rectangle(17, 45, 152, 114));
jLabelStereoscopicIco.setText("");
tab2jPanel = new JPanel();
tab2jPanel.setLayout(null);
tab2jPanel.add(getJPanelStereoscopic(), null);
}
return tab2jPanel;
}
COM: <s> this method initializes tab2j panel </s>
|
funcom_train/19416909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEqualsWithValueIsNullOnBothInstances() throws Exception {
final AttributeImpl attribute1 = new AttributeImpl("x",
"y2",
null,
this.annotation);
final AttributeImpl attribute2 = new AttributeImpl("x",
"y2",
null,
this.annotation);
assertTrue(attribute1.equals(attribute2));
}
COM: <s> test with equal with value is code null code on both instances </s>
|
funcom_train/46937523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonPrevYear() {
if (jButtonPrevYear == null) {
jButtonPrevYear = new JButton();
jButtonPrevYear.setText("<<");
jButtonPrevYear.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
myCalendar.add(Calendar.YEAR, -1);
fixData();
fixDisplay();
}
});
}
return jButtonPrevYear;
}
COM: <s> this method initializes j button prev year </s>
|
funcom_train/37841435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getYPointPosition(double number) {
String numberToString;
if (Math.round(number) == number) {
numberToString = Integer.toString((int) number);
} else {
numberToString = Double.toString(number);
}
int ciferCount = numberToString.length();
return Math.round((6*ciferCount/2)-((4-ciferCount)*4)-ciferCount);
}
COM: <s> counts position of value on vertical axis </s>
|
funcom_train/41878138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBounds() {
transitionTable = new int[states.size()][inputAlphabet
.getSizeOfAlphabet()];
for (int i = 0; i < states.size(); i++) {
for (int j = 0; j < inputAlphabet.getSizeOfAlphabet(); j++) {
transitionTable[i][j] = -1;
}
}
}
COM: <s> set sizes for transition tables </s>
|
funcom_train/46476344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getTopPanel(), BorderLayout.NORTH);
jContentPane.add(getBottomPanel(), BorderLayout.SOUTH);
jContentPane.add(getJScrollPane(), BorderLayout.CENTER);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/20677773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected StringBuffer translateBodyEnsureSemilons(Node node) {
StringBuffer retValue = new StringBuffer(1024);
int childrenCount = node.getChildrenCount();
if (childrenCount > 0) {
for (int i = 0; i < childrenCount; i++) {
Node currChildNode = node.getChild(i);
retValue.append(addSemicolonIfNotExists(translator
.invokeNodeHandler(currChildNode)));
}
}
return retValue;
}
COM: <s> translates tag body with ensured semicolons at the end of each command </s>
|
funcom_train/44658321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFaceDescriptors(Map faceDescriptors) {
Assert.notNull(faceDescriptors);
Iterator it = faceDescriptors.entrySet().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
String faceDescriptorId = (String) entry.getKey();
CommandFaceDescriptor faceDescriptor = (CommandFaceDescriptor) entry.getValue();
setFaceDescriptor(faceDescriptorId, faceDescriptor);
}
}
COM: <s> add a number of </s>
|
funcom_train/23246875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendDopChanged(final double hdop, final double vdop, final double pdop) {
LOG.log(Level.FINER, "gps: dilution of precision HDOP = " + hdop + ", VDOP = " + vdop + ", PDOP = " + pdop);
for (IGPSListener listener : myListeners) {
if (listener instanceof IExtendedGPSListener) {
((IExtendedGPSListener) listener).gpsDopChanged(hdop, vdop, pdop);
}
}
}
COM: <s> notify listeners if the dillusion of precision has changed </s>
|
funcom_train/31028204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reconnected() {
if(this.isConnected()) {
try {
RMISessionManager sessionManager = (RMISessionManager)this.getSubSystemCore();
this.sessionPanel.setSessionInfo(sessionManager.getSessionInfo());
} catch (RemoteException e) {
Connector.reportLostCore(this.getSubSystemID());
}
}
}
COM: <s> method called whenever the panel is reconnected to the subsystem </s>
|
funcom_train/18788507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEnd(Date end) {
if (((this.end != null) && !this.end.equals(end)) ||
((this.end == null) && (end != null))) {
this.end = end;
update.addUpdate(new PrimitiveFieldUpdate("end", end));
setModified(true);
}
}
COM: <s> sets the new value of the simple property end </s>
|
funcom_train/367016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean _removeActivity(Activity a) {
boolean r;
synchronized ( this ) {
r = m_activities.remove(a);
if ( r ) {
if ( m_activities.size() == 0 ) {
m_nextTime = Long.MAX_VALUE;
}
}
}
if ( r ) {
a.setScheduled(false);
}
return r;
} //
COM: <s> removes an activity from this manager called by an </s>
|
funcom_train/42876057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void engineUpdate(byte b) {
Debug.println("MSSHARSASignFactoryImpl: engineUpdate: entered");
try {
if (signOpInProgress) {
md.update(b);
} else if (verifyOpInProgress) {
jsse.update(b);
}
} catch (Exception e) {
throw (RuntimeException) new IllegalStateException().initCause(e);
}
}
COM: <s> updates the data to be signed or verified using the specified byte </s>
|
funcom_train/25990777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSizeRelated() throws Exception {
assertEquals("2", eval("p $h.size"));
assertEquals("2", eval("p $h.length"));
assertEquals("false", eval("p $h.empty?"));
assertEquals("true", eval("p Array.new().empty?"));
}
COM: <s> array size array length array empty </s>
|
funcom_train/11019081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void unhookOldEnvironments(WorkbookEvaluator[] evaluators) {
Set<CollaboratingWorkbooksEnvironment> oldEnvs = new HashSet<CollaboratingWorkbooksEnvironment>();
for(int i=0; i<evaluators.length; i++) {
oldEnvs.add(evaluators[i].getEnvironment());
}
CollaboratingWorkbooksEnvironment[] oldCWEs = new CollaboratingWorkbooksEnvironment[oldEnvs.size()];
oldEnvs.toArray(oldCWEs);
for (int i = 0; i < oldCWEs.length; i++) {
oldCWEs[i].unhook();
}
}
COM: <s> completely dismantles all workbook environments that the supplied evaluators are part of </s>
|
funcom_train/13711479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSoapTypes() throws RuntimeException{
String result = "";
for(int i=0;i<params.length;i++){
if(AjaxTypes.isSupported(params[i])){
result += AjaxTypes.javaTypeToAxisType(params[i]);
}
else{
String error = "The java type \""+params[i].getCanonicalName()+"\" does not have a corresponding SOAP type";
throw new RuntimeException(error);
}
if(i != params.length-1) result += ", ";
}
return result;
}
COM: <s> gives a string containing the axis types of the parameters </s>
|
funcom_train/3173255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws IOException {
// we don't need log output for this
Logger.getLogger("").setLevel(Level.OFF);
// try to read our sample file
gedcom = GedcomReaderFactory.createReader(getClass().getResourceAsStream("graphinvariants.ged"), null).read();
}
COM: <s> setup a clean gedcom before every test </s>
|
funcom_train/39168878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List determinePath (String packageName)throws IOException {
List list = new ArrayList();
StringTokenizer token = new StringTokenizer(packageName,".");
//if (token.countTokens()>1) {
while (token.hasMoreTokens()) {
list.add(token.nextToken());
}
//} else list.add(packageName);
return list;
}
COM: <s> determines the name of the packages and adds them to a list </s>
|
funcom_train/13725034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertResults(final Result expected, final Result result) {
if (expected == null) { // test the failed transformation
assertNull("The transformation should fail", result);
} else {
Collections.sort(expected.rules, AdornmentsTest.RC);
Collections.sort(result.rules, AdornmentsTest.RC);
assertEquals("The rules are computed as expected", expected.rules, result.rules);
assertEquals("The query is not correct", expected.query, result.query);
}
}
COM: <s> asserts the result of the transformation </s>
|
funcom_train/33365147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createComposite() {
GridData gridData5 = new GridData();
gridData5.horizontalAlignment = org.eclipse.swt.layout.GridData.CENTER;
gridData5.horizontalSpan = 2;
GridLayout gridLayout1 = new GridLayout();
gridLayout1.numColumns = 2;
composite = new Composite(sShell, SWT.NONE);
composite.setLayout(gridLayout1);
composite.setLayoutData(gridData5);
buttonOK = new Button(composite, SWT.NONE);
buttonOK.setText("OK");
buttonCancel = new Button(composite, SWT.NONE);
buttonCancel.setText("Cancel");
}
COM: <s> this method initializes composite </s>
|
funcom_train/27824614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeOIModel(List events) {
if (noChangesChangeReplica(events))
executeCommandEx(new ChangeOIModelCmd(m_oimodel,events,getDependentEvolutionStrategy(),m_kaonConnectionEvolutionLogs,EvolutionLog.LOG_NORMAL,this));
}
COM: <s> changes the oi model </s>
|
funcom_train/15605940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Color calcColumnColor(int column) {
Color color;
// The interval is determined by the column 1 (2nd column); the
// first column is used as a label. The 2 is the number of band
// colors (currently on 2.
int intervals = ((column-1) / bandInterval) % 2;
if (intervals == 0) {
color = this.bkgndColor;
} else {
color = this.bandBkColor;
}
return color;
}
COM: <s> return the code color code for the given column number </s>
|
funcom_train/31916403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer();
for ( Iterator i = results.iterator(); i.hasNext(); ) {
Element e = (Element) i.next();
sb.append( e.getName() ).append( '\n' );
}
sb.append( '\n' );
return sb.toString();
}
COM: <s> a string representation of the class </s>
|
funcom_train/39911231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetHead1() {
System.out.println("getHead1");
Page1 instance = new Page1();
Head expResult = null;
Head result = instance.getHead1();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get head1 method of class timesheetmanagement </s>
|
funcom_train/31292071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enterScope(final Scope scope) {
if (scopeObserver == null) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("no scope observer set. Cannot propagate entering "
+ "of scope '" + scope + "'");
}
return;
}
scopeObserver.enterScope(scope);
}
COM: <s> enter a new scope for resolving variables </s>
|
funcom_train/48407408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPortTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_WorkProductPort_portType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_WorkProductPort_portType_feature", "_UI_WorkProductPort_type"),
SpemxtcompletePackage.eINSTANCE.getWorkProductPort_PortType(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the port type feature </s>
|
funcom_train/18320506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void commit() {
if (committing)
return;
committing = true;
try {
eraseFeedback();
if (isDirty()) {
CommandStack stack =
getEditPart().getViewer().getEditDomain().getCommandStack();
Command command = getEditPart().getCommand(getDirectEditRequest());
if (command != null && command.canExecute())
stack.execute(command);
}
} finally {
bringDown();
committing = false;
}
}
COM: <s> commits the current value of the cell editor by getting a </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.