__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/46759917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RefModel getRef(final long refId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return ReferenceData.getRef(refId, chain, call);
}}; return (RefModel) call(method, call);
}
COM: <s> same transaction return the single ref model for the primary key </s>
|
funcom_train/14207478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRegisterToolWindowUnuseCaseOne() {
try {
ToolWindow toolWindow = toolWindowManager.registerToolWindow(
null, "title", null, new JLabel("label"), ToolWindowAnchor.LEFT
);
fail("Try body must throws a RuntimeException");
} catch (Exception e) {
}
}
COM: <s> we try to register a tool window with a null id </s>
|
funcom_train/19097126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getP1StartGame() {
if (m_P1StartGame == null) {
m_P1StartGame = new JRadioButton();
m_P1StartGame.setText("Start the game");
if (m_Config.getStarter() != m_Config.getModel().getPlayer2()) {
m_P1StartGame.setSelected(true);
}
}
return m_P1StartGame;
}
COM: <s> this method initializes m p1 start game </s>
|
funcom_train/8663055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPrintln(String message) {
addGetstatic("java.lang.System", "err", "Ljava/io/PrintStream;");
addLdc(message);
addInvokevirtual("java.io.PrintStream",
"println", "(Ljava/lang/String;)V");
}
COM: <s> appends instructions for executing </s>
|
funcom_train/8318366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getFileInputStream(String fieldName) throws IOException {
List<FileItemStream> list = fileItems.get(fieldName);
if (list==null)
throw new IOException("No file item with name '" + fieldName + "'.");
return list.get(0).openStream();
}
COM: <s> get the input stream of uploaded file by field name </s>
|
funcom_train/17491479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OMIActor produceOMIActor(String name, int paramCount) {
OMIActor actor = new OMIActor(name, paramCount);
actor.setFont(OMIFont);
actor.setBackground(OMIColor);
actor.setInsets(new Insets(6, 6, 6, 6));
actor.calculateSize();
return actor;
}
COM: <s> object method invocation actor </s>
|
funcom_train/30229551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String doubleDown(BJCard c) {
if (wealth >= bet * 2) {
bet *= 2;
DD = true;
if (SecondHand) {
myHand2.acceptCard(c);
if (myHand2.getNumPoints() > 21)
myHand2.demoteAces();
}
else {
myHand.acceptCard(c);
if (myHand.getNumPoints() > 21)
((BJHand)myHand).demoteAces();
}
}
if (DD)
return "You have DOUBLED DOWN";
else
return "You cannot afford to double your bet! "
+ "Continuing without doubling down...";
}
COM: <s> facilitator bjplayer requests 1 hit for double the bet </s>
|
funcom_train/48152818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e){
row++;
if (row <= 15){
if (e.getSource() == leftButton){
galtonBoard.moveBall(0);
//playnote(0);
recordTable.addRecord(new double[]{row, column, 0, Double.NaN});
}
else if (e.getSource() == rightButton){
column++;
galtonBoard.moveBall(1);
//playnote(1);
recordTable.addRecord(new double[]{row, column, 1, row});
}
else super.actionPerformed(e);
}
}
COM: <s> this method handles the actions associated with the left and right buttons </s>
|
funcom_train/21709175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int firstWriter() {
Iterator i = waiters.iterator();
for (int index = 0; i.hasNext(); index += 1) {
Owner owner = (Owner) i.next();
if (owner.type == Owner.EXCLUSIVE) {
return index;
}
}
return Integer.MAX_VALUE;
}
COM: <s> returns the index of the first owner waiting for a write lock or </s>
|
funcom_train/10048370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMarkup(String prefix, String tag, String value, boolean cdata) {
if ((value != null) && (!"".equals(value))) {
buffer.append("<" + tag + ">");
if (cdata) {
buffer.append("<![CDATA[" + value + "]]>");
} else {
buffer.append(value);
}
buffer.append("</" + tag + ">");
}
}
COM: <s> write a marked up value to buffer if value not empty or null </s>
|
funcom_train/45251038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected AdaptableList getAvailableExportWizards() {
// TODO: exports are still flat - we need to get at the flat list. All
// wizards will be in the "other" category.
IWizardCategory root = WorkbenchPlugin.getDefault()
.getExportWizardRegistry().getRootCategory();
WizardCollectionElement otherCategory = (WizardCollectionElement) root
.findCategory(new Path(
WizardsRegistryReader.UNCATEGORIZED_WIZARD_CATEGORY));
if (otherCategory == null) {
return new AdaptableList();
}
return otherCategory.getWizardAdaptableList();
}
COM: <s> returns the export wizards that are available for invocation </s>
|
funcom_train/38993711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(String object, String receiver) throws ConnectionException {
ActionRequestOp request = new ActionRequestOp("load");
request.addParameter("object", object);
request.addParameter("receiver", receiver);
sendActionDocument(request);
logger.debug("created a document to load " + object + " to " + receiver);
}
COM: <s> load an object into another object </s>
|
funcom_train/16767951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasChildScope(String name) {
log.debug("Has child scope? {} in {}", name, this);
boolean has;
// Obtain lock
lock();
try {
has = children.containsKey(TYPE + SEPARATOR + name);
if (log.isDebugEnabled()) {
if (has) {
log.debug("Child scope exists");
} else {
log.debug("Child scope does not exist");
}
}
} finally {
unlock();
}
return has;
}
COM: <s> check whether scope has child scope with given name </s>
|
funcom_train/5525013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getlines (Line l, Line last)
{ char C[];
int L,i;
Line line=l;
N=0;
int NL=0;
while (line!=null)
{ C=line.getCharacters();
L=line.length();
while (N>0 && A[N-1]==' ') N--;
if (line!=l)
{ if (N>=Max) return -1;
A[N++]=' ';
}
if (N+L>=Max) return -1;
for (i=getBlanks(line).length(); i<L; i++) A[N++]=C[i];
NL++;
if (line==last) break;
line=line.next();
}
return NL;
}
COM: <s> collect the lines from line l into the buffer a </s>
|
funcom_train/41207685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getHorizontalScrollHeight() {
if(horizontalScroll == null) {
initScroll();
}
Style scrollStyle = horizontalScroll.getStyle();
// bidi doesn't matter for height calculations
return scrollStyle.getMargin(false, Component.TOP) + scrollStyle.getMargin(false, Component.BOTTOM) +
scrollStyle.getPadding(false, Component.TOP) + scrollStyle.getPadding(false, Component.BOTTOM);
}
COM: <s> returns the default height of a horizontal scroll bar </s>
|
funcom_train/10606943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLong(long addr, long[] value, int offset, int length, int byteOrder) {
if (byteOrder == nativeByteOrder) {
setArray(addr, value, offset << 3, length << 3);
return;
}
setArrayReorder64(addr, value, offset, length);
}
COM: <s> writes data from long array to memory address in selected byte order </s>
|
funcom_train/4917279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFailIfAddLastEntryAgain() {
new Entry();
new Entry();
Entry last = new Entry(); // added first time
try {
this.linkedList.addEntry(last);
fail("Should not be able to re-add an entry");
} catch (IllegalStateException ex) {
assertEquals("Incorrect failure details",
"Entry already added (entry=" + last + ", list="
+ this.linkedList + ")", ex.getMessage());
}
}
COM: <s> ensure failure if last entry of list added again </s>
|
funcom_train/37819443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void singleView(MatrixDisplay component, Matrix matrix) {
int matrixWidth, matrixHeight;
matrixHeight = calculateMatrixHeight();
matrixWidth = calculateSingleMatrixWidth();
component.setBounds((int)component.getBounds().getX(), (int)component.getBounds().getY(), matrixWidth, calculateMatrixDisplayHeight());
//component.setFontForced(null);
component.setFontForced(forcedFont);
component.updateMatrix(matrix);
this.repaint();
this.revalidate();
}
COM: <s> prepares any matrix display to show the content of a given </s>
|
funcom_train/13523740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLabel(ArchetypeEdge e) {
String label = "";
switch(typeLabel) {
case NO_LABEL :
break;
case WEIGHT_DOMINATION :
float dom = (Float)e.getUserDatum(EdgeWidthDomination.KEY_DOMINATION);
label = label + dom;
break;
case WEIGHT_EFFECTIVE_DOMINATION :
float domB = (Float)e.getUserDatum(EdgeWidthDomBornee.KEY_EFFECTIVE_DOMINATION);
label = label + domB;
break;
default :
break;
}
return label;
}
COM: <s> return the label for the edge according to type label </s>
|
funcom_train/37037722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initServerSocket(ServerSocket ssocket) {
SSLServerSocket socket=(SSLServerSocket)ssocket;
// We enable all cipher suites when the socket is
// connected - XXX make this configurable
String cipherSuites[] = socket.getSupportedCipherSuites();
socket.setEnabledCipherSuites(cipherSuites);
// we don't know if client auth is needed -
// after parsing the request we may re-handshake
socket.setNeedClientAuth(clientAuth);
}
COM: <s> set server socket properties accepted cipher suites etc </s>
|
funcom_train/16450080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setRightClickMenu ( String[] labels ) {
// create right-click menu
this.menuLabels = labels;
menu = new JPopupMenu ();
for ( int i = 0; i < labels.length; i++ ) {
JMenuItem item = new JMenuItem ( labels[i] );
final int ind = i;
item.addActionListener ( new ActionListener () {
public void actionPerformed ( ActionEvent event ) {
menuSelected ( ind );
}
} );
menu.add ( item );
}
}
COM: <s> sets the right click menu </s>
|
funcom_train/50914661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setX3(double[] value) throws RuntimeException {
if (value == null) {
throw new RuntimeException("null x3");
}
List<CMLAtom> atomList = this.getAtoms(value.length, "x3");
int i = 0;
for (CMLAtom atom : atomList) {
atom.setX3(value[i++]);
}
}
COM: <s> normally used in cml2 array mode </s>
|
funcom_train/29832283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() {
Enumeration<Object> enum2 = members.elements();
while (enum2.hasMoreElements()) {
Object elem = enum2.nextElement();
try {
if (elem instanceof OptionPane) {
((OptionPane) elem).save(null);
} else
if (elem instanceof OptionGroup) {
((OptionGroup) elem).save();
}
} catch (Throwable t) {
// Log.log(Log.ERROR, elem, "Error saving option pane");
// Log.log(Log.ERROR, elem, t);
}
}
}
COM: <s> calls the code save code methods of all members </s>
|
funcom_train/10598797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testXIncludeMultipleNestedFallback() throws Exception {
getLogger().debug("testXIncludeMultipleNestedFallback");
xincludeTest("resource://org/apache/cocoon/transformation/xinclude-input-multipleNestedFallbackTest.xml",
"resource://org/apache/cocoon/transformation/xinclude-result-fallbackTest.xml");
}
COM: <s> testcase for xinclude with multiple nested fallbacks </s>
|
funcom_train/20516640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMovePawn(int x, int y, int newX, int newY) {
Piece pawn1 = game.getPiece(x, y);
assertEquals(pawn1.toString(), "P");
assertEquals(pawn1.getX(), x);
assertEquals(pawn1.getY(), y);
game.movePawn(newX, newY, pawn1);
assertEquals(pawn1.getX(), newX);
assertEquals(pawn1.getY(), newY);
placeOnBoard();
}
COM: <s> helper method to test the moves of pawn </s>
|
funcom_train/11744949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream findResourceStream(String name) {
URL url = findResource(name);
if (url == null) {
return null;
}
try {
return url.openStream();
}
catch (IOException ioex) {
logObj.debug("Error reading URL, ignoring", ioex);
return null;
}
}
COM: <s> returns an input stream on the found resource using the lookup strategy configured </s>
|
funcom_train/27777648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNodePos(Comparable node) {
//compare each node in sequence.
//this can be optimize later.
int ret = 0;
Iterator itr = queue.iterator();
while (itr.hasNext()) {
Comparable _other = (Comparable) itr.next();
if (node.compareTo(_other) > 0) {
break;
}
ret++;
}
return ret;
}
COM: <s> note this method is not thread safe </s>
|
funcom_train/14520265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InitialContext getInitialContext(Hashtable env) throws NamingException {
if( cacheCtx == null ) {
if( env != null ) {
// try the environmento given by the user
cacheCtx = new InitialContext(env);
} else if ( cacheEnv != null ) {
// try ejbca.properties
cacheCtx = new InitialContext(cacheEnv);
} else {
// try jndi.properties
cacheCtx = new InitialContext();
}
}
return cacheCtx;
}
COM: <s> return the requested context </s>
|
funcom_train/17207369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void scan(ObjectReference object) {
for (int i=0; i < ObjectModel.getRefs(object); i++) {
Address slot = ObjectModel.getRefSlot(object, i);
ObjectReference ref = slot.loadObjectReference();
if (!ref.isNull()) {
visitor.visitPointer(object, slot, ref);
traceObject(ref,false);
}
}
}
COM: <s> scan an object calling the appropriate visitor method </s>
|
funcom_train/33011135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
while (continueReading) {
try {
ObjectInputStream ois = new ObjectInputStream(socket
.getInputStream());
AbstractNetworkMessage msg = (AbstractNetworkMessage) ois
.readObject();
ois.close();
incomingMessageDispatcher.dispatchMessage(msg);
Thread.sleep(1000);
} catch (InterruptedException ie) {
// nothing
} catch (Exception e) {
Logger.printINFO(this.getClass().getName(),
"Dead connection: "
+ socket.getInetAddress().getHostAddress()
+ ":" + socket.getPort());
listener.removeDeadConnection(this);
finalize();
}
}
}
COM: <s> run waiting from incoming data </s>
|
funcom_train/17174986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParsedLine getParsedLine() throws IOException, ParsingException {
ParsedLine parsedLine = null;
Parameter param;
//skipEmptyLines();
int i = 0;
while ((param = getParameter()) != null) {
i++;
if (parsedLine == null) {
parsedLine = new ParsedLine();
}
parsedLine.addParameter(param);
}
//read the end-of-line character
read();
return parsedLine;
}
COM: <s> obtain a parsed line object after adding it parameters </s>
|
funcom_train/41165610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(AgStatusActivity entity) {
EntityManagerHelper.log("saving AgStatusActivity instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved ag status activity entity </s>
|
funcom_train/3581866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearRect (int x, int y, int width, int height) {
emitThis ("%clearRect");
emitThis ("gsave");
Color c = getColor ();
setColor (backClr);
doRect (x,y,width,height, true);
setColor (c);
emitThis ("grestore");
}
COM: <s> clears the specified rectangle by filling it with the current background color </s>
|
funcom_train/3810880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initLogging(JavaSource pSource) {
if (isGeneratingLogging()) {
JavaField jf = pSource.newJavaField("logger", Logger.class, JavaSource.PRIVATE);
jf.setFinal(true);
jf.setStatic(true);
jf.addLine(LoggerAccess.class, ".getLogger(", pSource.getQName(), ".class)");
}
}
COM: <s> p creates the code for initialization of the logging framework </s>
|
funcom_train/28269067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean Compile(String inputFile) {
String ext0 = getFileExtension(inputFile);
if (ext0.equals("egm"))
return compileEGMtoGM(inputFile, getFileName(inputFile)+".gm");
if (ext0.equals("egrs"))
return compileEGRStoGRS(inputFile, getFileName(inputFile)+".grs");
if (ext0.equals("egrg"))
return compileEGRGtoGRG(inputFile, getFileName(inputFile)+".grg");
System.err.println("ERROR: Could not recognize file extension");
return false;
}
COM: <s> recognize the type of the given artifact name and call the corresponding </s>
|
funcom_train/2386214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List findAllAlbumTypes() throws PhotoAlbumException{
try {
return super.findAll("label");
} catch (HibernateException he){
throw new PhotoAlbumException("Could not find all album types, cause of an Hibernate problem.");
} catch (HbnDaoException hde){
throw new PhotoAlbumException("Could not find all album types.");
}
}
COM: <s> find all album type instances from data source </s>
|
funcom_train/17584696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addValue(BibtexAbstractValue value) {
assert value != null : "value parameter may not be null.";
assert !(value instanceof BibtexMultipleValues) : "You cannot add a BibtexMultipleValues instance to a BibtexMultipleValues instance.";
assert !Assertions.ENABLE_EXPENSIVE_ASSERTIONS || !values.contains(value) : "value is already contained in this BibtexMultipleValues object.";
values.add(value);
}
COM: <s> this will add the value object to this bibtex multiple values object </s>
|
funcom_train/46458414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLanguages() {
if(!languages.equals("")) { //$NON-NLS-1$
return languages;
} else if(isRoot()) {
return ""; //$NON-NLS-1$
}
LaunchNode parent = (LaunchNode) getParent();
return parent.getLanguages();
}
COM: <s> gets the languages for which translations exist for this node or ancestor </s>
|
funcom_train/37836016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isHardLineBreak(final CharacterIterator cit) {
// save the location while we are checking the preceding characters
final int currentIndex = cit.getIndex();
char currentChar = cit.previous();
while (currentChar != CharacterIterator.DONE && !Character.isLetterOrDigit(currentChar)) {
if (currentChar == '\n') {
cit.setIndex(currentIndex);
return true;
}
currentChar = cit.previous();
}
cit.setIndex(currentIndex);
return false;
}
COM: <s> check if a location is at a hard line break </s>
|
funcom_train/22024259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector3 convertFrame2CoordsToGlobalFrame(Vector3 relative, Vector3 passback) {
passback.setZero();
tmpV.setZero();
t2.mulInc(relative, tmpV);
if (getBody(1) != null)
getBody(1).getRotation().mulInc(tmpV, passback);
else
passback.set(tmpV);
return passback;
}
COM: <s> takes relative coordinates assumed to be in frame 2 </s>
|
funcom_train/41208543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flushReplace() {
if (cmpTransitions != null) {
int size = cmpTransitions.size();
for (int iter = 0; iter < size; iter++) {
((Anim) cmpTransitions.elementAt(iter)).destroy();
}
cmpTransitions.removeAllElements();
cmpTransitions = null;
}
}
COM: <s> flushes ongoing replace operations to prevent two concurrent replace operations from colliding </s>
|
funcom_train/48075741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (!isComputed)compute();
StringBuffer buffer = new StringBuffer();
for (int i = 0; i <= numberToSave; i++) {
buffer.append(i);
buffer.append(":\t");
buffer.append(correlationArray[i]);
buffer.append("\n");
}
return(buffer.toString());
}
COM: <s> this returns a the string formatted as follows </s>
|
funcom_train/3464795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getControl(String s, int pos) {
if(s.charAt(pos) != '\\') {
return null;
}
StringBuffer sb = new StringBuffer("\\");
for(int i=pos+1;i<s.length();i++) {
char ch = s.charAt(i);
if(isAlpha(ch)) {
sb.append(ch);
} else if(ch == ' ') {
sb.append(' ');
break;
} else {
break;
}
}
return sb.toString();
}
COM: <s> gets the control at the position </s>
|
funcom_train/49822287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean occurCheck(List vl, Struct t) {
int arity=t.getArity();
for (int c = 0;c < arity;c++) {
Term at = t.getTerm(c);
if (at instanceof Struct) {
if (occurCheck(vl, (Struct)at)) {
return true;
}
} else if (at instanceof Var) {
Var v = (Var)at;
if (v.link == null) {
vl.add(v);
}
if (this == v) {
return true;
}
}
}
return false;
}
COM: <s> finds var occurence in a struct doing occur check </s>
|
funcom_train/25093247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DoubleSlider getJSliderOffset(){
if(jSliderOffset == null){
jSliderOffset = new DoubleSlider();
jSliderOffset.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent e){
if(!isAdjusting && currentTask != null){
double value = jSliderOffset.getDoubleValue();
currentTask.setO(value);
getJTextFieldOffset().setText(Double.toString(value));
fireTransactionChanged(currentTask);
}
}
});
}
return jSliderOffset;
}
COM: <s> this method initializes j slider offset </s>
|
funcom_train/6456909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mutateFunctor(String newFunctor) throws JASDLException {
Literal mutated = new LiteralImpl(!literal.negated(), newFunctor); // negation dealt with by ~ prefix
mutated.addTerms(literal.getTerms());
mutated.addAnnots(literal.getAnnots());
literal = mutated;
}
COM: <s> clones the literal associated with this seliteral replacing its functor with the suppleid </s>
|
funcom_train/5395516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetValue() {
System.out.println("setValue");
short pValue = 0;
DBPUnsignedByte instance = new DBPUnsignedByte();
instance.setValue(pValue);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set value method of class org </s>
|
funcom_train/1731278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int effectsFor(float damage, float min, float max, int total) {
//System.out.println("Effects for damage " + damage + " min " + min + " max " + max + " total " + total);
int count = (int)(((damage - min) / (max - min)) * total + 1);
if (count < 1) count = 1;
if (count > total) count = total;
return count;
}
COM: <s> calculate the number of effects to turn on at a given damage </s>
|
funcom_train/35678374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNoDirAbsoluteFileName() throws Exception {
File file = new File("test.file");
file.createNewFile();
file.deleteOnExit();
String dir = null;
File file2 = CodeGenUtil.getFile(dir, file.getAbsolutePath());
assertTrue(null != file2);
}
COM: <s> check that get file works with an absolute file name </s>
|
funcom_train/3415675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String replaceFirst(String replacement) {
if (replacement == null)
throw new NullPointerException("replacement");
reset();
if (!find())
return text.toString();
StringBuffer sb = new StringBuffer();
appendReplacement(sb, replacement);
appendTail(sb);
return sb.toString();
}
COM: <s> replaces the first subsequence of the input sequence that matches the </s>
|
funcom_train/28998091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void adaptContent(com.crosslogic.portal.content.xcs.IContentItem contentItem, java.util.Properties userProperties) throws com.crosslogic.portal.content.xcs.XCSException {
GenericContentSource source = new GenericContentSource();
source.setTag("GenericContent");
source.setText(contentItem.getDescription());
contentItem.setSource(source);
}
COM: <s> refresh the source property on the supplied content item </s>
|
funcom_train/19609862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer count() {
String methodName = ".count() ";
connect();
open();
// Get count of the organization records
List<List<String>> results = db.query(this.organizationCountSql);
Integer count = Integer.parseInt(results.get(0).get(0));
Log.enter(className + methodName + count.toString());
return count;
}
COM: <s> count of organizations in table </s>
|
funcom_train/11757736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Term copy() {
Struct t = new Struct(arity);
t.resolved=resolved;
t.name = name;
t.hashKey = hashKey;
for(int c = 0;c < arity;c++){
t.arg[c] = arg[c].copy();
}
if (builtIn!=null){
t.builtIn = builtIn.getCopy(t);
}
return(t);
}
COM: <s> gets a copy of this structure </s>
|
funcom_train/26365497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DivisionLinkElement readIfExists(DivisionLinkElement aDivLinkElement) {
try {
Entry aReadEntry = aJavaSpace.readIfExists(aDivLinkElement, null, JavaSpace.NO_WAIT);
return (DivisionLinkElement)aReadEntry;
} catch (Exception e) {
// PENDING: Better error handling required
e.printStackTrace();
return null;
}
}
COM: <s> read a division link element using the supplied template if one exists </s>
|
funcom_train/48910077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtCancelar() {
if (btCancelar == null) {
btCancelar = new JButton();
btCancelar.setBounds(new Rectangle(158, 190, 110, 30));
btCancelar.setText("Cancelar");
btCancelar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setVisible(false);
}
});
}
return btCancelar;
}
COM: <s> this method initializes bt cancelar </s>
|
funcom_train/41084988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void exportReportToFile() throws JRException {
try {
OutputStream fileOutputStream = new FileOutputStream(destFile);
writer = new BufferedWriter(new OutputStreamWriter(fileOutputStream));
exportReportToStream();
}
catch (IOException ex) {
throw new JRException("Error writing to the file : " + destFile, ex);
}
finally {
if(writer != null) {
try {
writer.close();
}
catch(IOException ex) {
}
}
}
}
COM: <s> export report to a file in the </s>
|
funcom_train/7644510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Field getSocketImplField(final String fieldName) {
return AccessController.doPrivileged(new PrivilegedAction<Field>() {
public Field run() {
Field field = null;
try {
field = SocketImpl.class.getDeclaredField(fieldName);
field.setAccessible(true);
} catch (NoSuchFieldException e) {
throw new Error(e);
}
return field;
}
});
}
COM: <s> gets socket impl field by reflection </s>
|
funcom_train/47376269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean parseXmlDescriptor() throws SAXException, IOException{
boolean result=true;
if (this.xmlDescriptor==null){
return false;
}
this.xmlReader = XMLReaderFactory.createXMLReader();
DefaultHandler handl = new DescriptorHandler(partFiles);
this.xmlReader.setContentHandler(handl);
FileInputStream xmlData = new FileInputStream(xmlDescriptor);
this.xmlReader.parse(new InputSource(xmlData));
xmlData.close();
for (PartFile p : partFiles){
p.setPartFileDescriptor(this.xmlDescriptor.getAbsolutePath());
p.setUpdated(true);
}
return result;
}
COM: <s> parses the xml parts info file and stores the informations in </s>
|
funcom_train/33402815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StopList (IStemmer stemmer, String document) throws Exception {
Tokenizer tok = new Tokenizer (stemmer, document); // Tokenize using porter
this.stemmer = stemmer;
this.filename = new String (document);
String s = null;
while ( (s = tok.nextToken() ).length() > 0) {
terms.put (s, 1);
}
}
COM: <s> creates a new instance of document </s>
|
funcom_train/13992210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File chooseFile(String approveButtonText) {
File f = null;
setApproveButtonText(approveButtonText);
setFileFilter(filter);
int returnVal = showOpenDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
f = getSelectedFile();
}
if ((f != null) && f.isDirectory()) {
f = null;
}
return f;
}
COM: <s> opens a file chooser dialog with the customized file filter settings </s>
|
funcom_train/18287035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IVMInstall searchForVMInstallWithJar() {
IVMInstall fullJDK = null;
IVMInstall install = JavaRuntime.getDefaultVMInstall();
if (installContainsJarExecutable(install)) {
fullJDK = install;
} else {
IVMInstallType installType = install.getVMInstallType();
IVMInstall[] installs = installType.getVMInstalls();
for (int i = 0; i < installs.length; i++) {
install = installs[i];
if (installContainsJarExecutable(install)) {
fullJDK = install;
break;
}
}
}
return fullJDK;
}
COM: <s> search for and return a virtual machine installation that appears </s>
|
funcom_train/29691442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItem1() {
if (jMenuItem1 == null) {
jMenuItem1 = new JMenuItem();
jMenuItem1.setText("Chime Config");
jMenuItem1.setFont(new Font("Dialog", Font.PLAIN, 10));
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
chooseFile(MUSIC_FILE);
}
});
}
return jMenuItem1;
}
COM: <s> this method initializes j menu item1 </s>
|
funcom_train/13850686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(EnvCheck envCheck) {
this.envCheck = envCheck;
String classpath = envCheck.getJarToRun();
if (classpath != null) {
checkPlatform(classpath, getString("jarfile"));
} else {
classpath = envCheck.getClasspath();
checkPlatform(classpath, getString("cmdline"));
}
SharedActivationGroupDescriptor gd = envCheck.getGroupDescriptor();
if (gd != null) {
classpath = gd.getClasspath();
checkPlatform(classpath, getString("grouppath"));
}
}
COM: <s> check the command line vm and the group if there is one </s>
|
funcom_train/19035765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMemberID(MemberID memberID) {
if(isConnected()) {
try {
synchronized(this) {
this.getOutputStream().writeInt(ServerMessageCode.SETMEMBERID.getIndex());
memberID.sendData(this.getOutputStream());
this.getOutputStream().flush();
}
} catch (IOException e) {
this.messageFailed(e);
}
}
}
COM: <s> tells the client its id </s>
|
funcom_train/20669513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextPane getI_jMainTextPane() {
if (i_jMainTextPane == null) {
i_jMainTextPane = new JTextPane();
i_jMainTextPane.setEditable(false);
i_jMainTextPane.setFont(new Font("Times New Roman", Font.PLAIN, 14));
i_jMainTextPane.setContentType("text/plain");
i_jMainTextPane.setBackground(new Color(255, 204, 102));
}
return i_jMainTextPane;
}
COM: <s> this method initializes i j main text pane </s>
|
funcom_train/13847379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkTrustEquivalence(Object obj) {
if (this == obj) {
return true;
} else if (!(obj instanceof ProxyTrustInvocationHandler)) {
return false;
}
ProxyTrustInvocationHandler oh = (ProxyTrustInvocationHandler) obj;
return (((TrustEquivalence) main).checkTrustEquivalence(oh.main) &&
((TrustEquivalence) boot).checkTrustEquivalence(oh.boot));
}
COM: <s> returns code true code if the argument is an instance of this </s>
|
funcom_train/48053946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processRevalidationRequest(AbstractOPCTreeTableNode node) {
if (node instanceof ItemTreeTableNode) {
processRevalidationRequest((ItemTreeTableNode) node);
} else if (node instanceof BranchTreeTableNode) {
processRevalidationRequest((BranchTreeTableNode) node);
} else if (node instanceof CompositeTreeTableNode) {
processRevalidationRequest((CompositeTreeTableNode) node);
}
}
COM: <s> evaluates which nodes should go through a revalidation process </s>
|
funcom_train/16510721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void browseButton1ActionPerformed(java.awt.event.ActionEvent evt) {
JFileChooser chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
chooser.setMultiSelectionEnabled(false);
int returnVal = chooser.showOpenDialog(this);
if(returnVal == JFileChooser.APPROVE_OPTION) {
folderPathField1.setText(chooser.getSelectedFile().
getPath());
}
}
COM: <s> browse local filesystem </s>
|
funcom_train/25058028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initProcessData(IProcessData processData, ProcessDef processDef) {
processData.putItem(ProcessData.PROCESS_DEFINITION, processDef);
if (processData.getProcessIds() != null) {
processDef.setForEachParam(IProcessData.PROCESS_ID);
}
}
COM: <s> prepares process data for launching of process </s>
|
funcom_train/23777497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enablePilotCertificate(boolean bVal) {
certificateGradeTf.setEnabled(bVal);
certificateNumberTf.setEnabled(bVal);
certificateIssueDate.setEnabled(bVal);
//used to enable and disable lables more for usability
certificateLabel.setEnabled(bVal);
pilotGradeLabel.setEnabled(bVal);
dateIssuedLabel.setEnabled(bVal);
}
COM: <s> this enables or disables all the certificate </s>
|
funcom_train/14141152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOkButton() {
if (okButton == null) {
okButton = new JButton();
okButton.setText("OK");
okButton.setSelected(false);
okButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
NexusInfoDialog.this.setVisible(false);
}
});
}
return okButton;
}
COM: <s> this method initializes ok button </s>
|
funcom_train/35461087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNoPaddingNodes() {
Map < Object, Integer> paddingNodes;
paddingNodes = getPaddingNodes("dcl 1 A,"
+ " 2 B char(1),"
+ " 2 C,"
+ " 3 D character(5),"
+ " 3 E bin fixed(15);");
assertTrue(paddingNodes.isEmpty());
}
COM: <s> test that there are no paddig nodes when there is no padding </s>
|
funcom_train/31153461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputFile getInputFile(final String className) {
return new InputFile() {
public String getPath() {
return PathArtifactLocator.this.getPath(className);
}
public InputStream getInputStream() throws IOException {
return path.findArtifact(toRelativePath(className));
}
};
}
COM: <s> returns an input stream to the given path </s>
|
funcom_train/50228686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return new StringBuffer("[")
.append(super.toString())
.append("; ")
.append(mapping.getMappedClass())
.append(", primaryKey: ")
.append(primaryKey)
.append(", status: ")
.append(getStatusName())
.append(']')
.toString();
}
COM: <s> returns a debug representation of this handler in the format </s>
|
funcom_train/36994328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void defineActionGroup(final String name, final List<Action> actions) {
List<Class<? extends Action>> types = new LinkedList<Class<? extends Action>>();
for (Action action : actions) {
putAction(action);
types.add(action.getClass());
}
actionGroups.put(name, types);
}
COM: <s> defines an action group that consists of the provided code action code s </s>
|
funcom_train/41447013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testShootistSetToParam() throws Exception {
// receiver.sendInvite();
receiverProtocolObjects =new ProtocolObjects(
"sender", "gov.nist", TRANSPORT, AUTODIALOG, null, null, null);
receiver = new TestSipListener(5080, 5070, receiverProtocolObjects, false);
SipProvider senderProvider = receiver.createProvider();
senderProvider.addSipListener(receiver);
receiverProtocolObjects.start();
tomcat.startTomcat();
deployApplication("toParam", "http://yaris.research.att.com:23280/vxml/test.jsp");
Thread.sleep(TIMEOUT);
assertTrue(receiver.getByeReceived());
}
COM: <s> non regression test for issue 732 http code </s>
|
funcom_train/10915040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVariableSpaceCharacterIncrement(int incr) throws IOException {
if (incr == this.currentVariableSpaceCharacterIncrement) {
return;
}
assert incr >= 0 && incr < (1 << 16);
newControlSequence();
writeShort(Math.abs(incr)); //Increment
commit(chained(SVI));
this.currentVariableSpaceCharacterIncrement = incr;
}
COM: <s> sets the variable space character increment </s>
|
funcom_train/50154629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(ListSelectionEvent event) {
if (event.getValueIsAdjusting()) return;
ListSelectionModel lsm = (ListSelectionModel)event.getSource();
setEnabled(!lsm.isSelectionEmpty());
if (!lsm.isSelectionEmpty()) {
currentRow = lsm.getMinSelectionIndex();
}
}
COM: <s> implementation of list selection listener </s>
|
funcom_train/22437977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DBGraph getDependencies(DBObject dbobject) {
DBGraph graph = new DBGraph();
Vertex startingvertex;
try {
startingvertex = new Vertex( dbobject );
graph.add( startingvertex );
currentdepth = 0;
this.getDependents( startingvertex, graph );
currentdepth = 0;
this.getDependees( startingvertex, graph );
}
catch( Exception e ) {
e.printStackTrace();
}
return graph;
}
COM: <s> determine all first level dependencies of a database object and return </s>
|
funcom_train/1864258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean intersects(BoundingBox box) {
assert minValues.length == box.minValues.length;
for (int i = 0; i < minValues.length; i++) {
if (minValues[i] > box.maxValues[i] || maxValues[i] < box.minValues[i]) {
return false;
}
}
return true;
}
COM: <s> checks whether this bounding box intersects another bounding box </s>
|
funcom_train/15563255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset(){
for(int walk = 0; walk < operations.count; walk++){
Operation op = this.getOperation(walk);
op.jobReleaseTime = release;
op.jobDeadline = deadline;
op.setScheduledStartTime(-1);
op.setEarliestStartTime(release);
op.setLatestStartTime(deadline);
}
this.getOperationZero().est = release;
this.getLastOperation().lst = deadline;
this.operations.updateEarliestLatestStartTime();
}
COM: <s> reset a job is to un schedule all operations keep the precedence </s>
|
funcom_train/198020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasCharacteristics(int characteristics) {
//FUTURE Need to consider how CHARACTERISTIC_NONE should respond
//The problem is, should NONE truly require NONE, or should NONE
//require that it has zero or more characteristics (current behavior
//is the second 0 or more)
if ((characteristics < 0)
|| (characteristics > CHARACTERISTICS_MAXIMUM_VALUE)) {
throw new IllegalArgumentException("Door characteristics of "
+ characteristics + " are not valid");
}
return (doorCharacteristics & characteristics) == characteristics;
}
COM: <s> returns true if the door has the given chacteristics </s>
|
funcom_train/50961633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Serializable lookupObject(Serializable key) {
if (key instanceof String) {
return bytesToObj(lookup((String) key));
}
if (key instanceof Long) {
return bytesToObj(lookup(((Long) key).longValue()));
}
if (key instanceof byte[]) {
return bytesToObj(lookup((byte[]) key));
}
return bytesToObj(lookup(objectToBytes(key)));
}
COM: <s> lookup the value using the given object as the key </s>
|
funcom_train/3898056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResourceGroupEntry addNewGroupEntry(String name) throws Exception {
if(name == null) {
return null;
}
ResourceGroupEntry resourceGroup = new ResourceGroupEntry(getDataModel(), name);
addChild(resourceGroup);
// Save index
getDataModel().save();
return resourceGroup;
}
COM: <s> add a new resource group entry </s>
|
funcom_train/34795311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updatePersonalBest(Map<Particle, Particle> next) {
for (Entry<Particle, Particle> entry : next.entrySet()) {
Particle old = entry.getKey();
Particle current = entry.getValue();
if (dominates(old, current)) {
current.setBest(old.getBest(), old.getBestObjectives());
} else {
current.setBest(current.getGenotype(), current.getObjectives());
}
}
}
COM: <s> update the personal best of each </s>
|
funcom_train/18591437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setPower2Probability(int jobType, double prob) {
if(jobType > BATCH_JOBS || jobType < INTERACTIVE_JOBS) {
return false;
}
if(useJobType_) {
pow2Prob[jobType] = prob;
} else {
pow2Prob[INTERACTIVE_JOBS] = pow2Prob[BATCH_JOBS] = prob;
}
return true;
}
COM: <s> sets the probability for power of two jobs </s>
|
funcom_train/27674723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getStringValue( final String key ) {
if ( !containsKey( key ) ) {
throw(
Alerts.compile(
"Required JDBC connection properties must be defined",
"All required properties must be defined"
).
culprit( "file", getOrigin() ).
culprit( "key", key ).
mishap()
);
}
String value = connectionProperties.getProperty( key );
if ( value == null ) {
return "";
}
return value;
}
COM: <s> returns the value associated with the specified key generating a mishap </s>
|
funcom_train/20986102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceChild(HtmlNode childToReplace, HtmlNode replacement) {
if (replacement == null) {
return;
}
ListIterator it = children.listIterator();
while (it.hasNext()) {
Object curr = it.next();
if (curr == childToReplace) {
it.set(replacement);
break;
}
}
}
COM: <s> replaces specified child node with specified replacement node </s>
|
funcom_train/1462450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireLocally(Event event) {
if (getComponent().isStarted() && !event.isConsumed()) {
// Fire to local listeners interested in this type of event
fireTo(event, getListeners(event.getType()));
// Fire to local listeners interested in all types of events
fireTo(event, getListeners(Event.TYPE_ALL));
}
}
COM: <s> fires an event to local listeners </s>
|
funcom_train/47138243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prepareResponse(final HttpServletResponse resp, final Property property) {
resp.setContentType("text/xml; charset=UTF8");
String dispHeader = "attachment; filename=\"property-" + property.getId() + ".xml\"";
resp.addHeader("Content-Disposition", dispHeader);
}
COM: <s> prepare response to make the browser open the download dialog </s>
|
funcom_train/10945944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigDecimal getItemSubTotal(BigDecimal quantity) {
// Debug.logInfo("Price" + getBasePrice() + " quantity" + quantity + " Rental adj:" + getRentalAdjustment() + " other adj:" + getOtherAdjustments(), module);
return getBasePrice().multiply(quantity).multiply(getRentalAdjustment()).add(getOtherAdjustments());
}
COM: <s> returns the total line price </s>
|
funcom_train/19869235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getCommentForElement( RepositoryConnection memoryStoreConnection, URI uri ) {
// first try to get an english one:
String ret = selectLiteralObject( memoryStoreConnection, uri, RDFS.COMMENT, Vocabulary.ENGLISH );
// in nothing found: try to get an other language one:
if( ret==null )
ret = selectLiteralObject( memoryStoreConnection, uri, RDFS.COMMENT, null );
return ret;
}
COM: <s> returns the comment that is used for the later created element </s>
|
funcom_train/36189039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setServiceLevelDependency() {
m_specLevelReq = true;
PSSPolicyServiceContext context = new PSSPolicyServiceContext(m_handler.getCompositeManager().getGlobalContext(), m_handler.getCompositeManager().getParentServiceContext(), PSSPolicyServiceContext.LOCAL);
setBundleContext(context);
}
COM: <s> set that this dependency is a service level dependency </s>
|
funcom_train/44546223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initStatusBar () {
statusLabel=new JLabel(statusText);
setLayout(new GridBagLayout());
GridBagConstraints c=new GridBagConstraints();
c.weightx=1;
c.anchor=GridBagConstraints.WEST;
this.setFocusable(false);
statusLabel.setFocusable(false);
this.add(statusLabel, c);
}
COM: <s> init the status bar </s>
|
funcom_train/41164489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoLevel entity) {
EntityManagerHelper.log("deleting CoLevel instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoLevel.class, entity.getLevelId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co level entity </s>
|
funcom_train/50587712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void add(Show show, Showing showing) {
show.setScheduledShowing(showing);
GregorianCalendar start = new GregorianCalendar();
start.setTime(showing.getStart());
GregorianCalendar stop = new GregorianCalendar();
stop.setTime(showing.getStop());
showList.put(show.episodeID, show);
while (start.before(stop)) {
schedule.put(start.getTime(), show);
start.add(Calendar.MINUTE, 1);
}
}
COM: <s> no conflict checking </s>
|
funcom_train/6453380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cowPerceived(int cowId, int x, int y) {
Location c = new Location(x, y);
if (model.getCorral().contains(c)) {// cows in the corral are not perceived
perceivedCows.remove(cowId);
lastSeen.remove(cowId);
} else {
perceivedCows.put(cowId, c);
lastSeen.put(cowId, getSimStep());
}
}
COM: <s> update set set of perceived cows </s>
|
funcom_train/46439875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initFullPathAndFeedFileName() {
if (isInboundFeed()) {
final String directory = FEED_DIR.incoming.getValue();
final String fullPath = FeedFileHelper.getFeedDirFullPath(context.getFeed()) + SLASH + directory + SLASH + feedFileName;
context.setFullFeedFileName(fullPath);
}
}
COM: <s> define the complete location of the feed file by concatenating the </s>
|
funcom_train/48045402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PeriodFields without(PeriodUnit unit) {
checkNotNull(unit, "PeriodUnit must not be null");
if (unitFieldMap.containsKey(unit) == false) {
return this;
}
TreeMap<PeriodUnit, PeriodField> copy = clonedMap();
copy.remove(unit);
return create(copy);
}
COM: <s> returns a copy of this period with the specified unit removed </s>
|
funcom_train/10948784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSupplierPartyId(int idx, String supplierPartyId) {
CartShipInfo csi = this.getShipInfo(idx);
// TODO: before we set the value we have to verify if all the products
// already in this ship group are drop shippable from the supplier
csi.supplierPartyId = supplierPartyId;
}
COM: <s> sets the supplier for the given ship group drop shipment </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.