__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/33264754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBounds(int x, int y, int width, int height, boolean invalidateParent) {
super.setBounds(x,y,width,height,invalidateParent);
Point offset = getOffset();
component.reshape( offset.x, offset.y, width, height );
}
COM: <s> sets the boundaries of the component </s>
|
funcom_train/3472294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireCompleteStructureChange() {
StructureElement[] children = new StructureElement[1];
children[0] = (StructureElement) getRoot();
TreeModelEvent treeModelEvent = new TreeModelEvent(this, children);
for (TreeModelListener listener : treeModelListeners) {
listener.treeStructureChanged(treeModelEvent);
}
}
COM: <s> fires an event which indicates that the whole structure has </s>
|
funcom_train/16525614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parseInteractionsAndResponses(Node stepNode) {
//get the qti document for the step
qtiDocument = getQtiDocument(stepNode);
//get the assessment item xml nodes from the xml document
List<Node> assessmentItemNodes = getAssessmentItemNodes(qtiDocument);
//get all the interactions
interactions = parseInteractions(assessmentItemNodes);
//get all the responses
responses = parseResponses(assessmentItemNodes);
}
COM: <s> parse all the interactions and responses </s>
|
funcom_train/27827561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setElements(Collection elements) throws KAONException {
m_elements.clear();
try {
Iterator iterator=elements.iterator();
while (iterator.hasNext()) {
Term curterm=(Term)iterator.next();
m_elements.add(new TableRow(curterm));
}
}
finally {
fireTableDataChanged();
}
}
COM: <s> refreshes the model </s>
|
funcom_train/43191633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateSubway(String subway, String status) {
ContentValues initialValues = new ContentValues();
initialValues.put(KEY_LINE, subway);
initialValues.put(KEY_STATUS, status);
return mDb.update(DATABASE_TABLE, initialValues, KEY_LINE + "='" + subway +"'", null) > 0;
}
COM: <s> update the note using the details provided </s>
|
funcom_train/51573473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetElement() throws Exception {
LocalFileSet spec = new LocalFileSet(baseFile);
spec.include(new FileGlob(ALL_FILES_GLOB));
LiveFingerprint testFp = new LiveFingerprint(spec);
testFp.scan();
String relativePath = "target/dir_1/aardvark";
FingerprintElement element = testFp.getElement(relativePath);
assertEquals("aardvark", element.getName());
}
COM: <s> tests get element string with no archives </s>
|
funcom_train/20788514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAxesListener(Axes axes, AxesListener listener) {
for (int i = 0; i < axesListenerList.size(); i++) {
if (axesListenerList.get(i) == listener
&& axesEquals(axes, axesListenerNameList.get(i))) {
axesListenerNameList.remove(i);
axesListenerList.remove(i);
return;
}
}
}
COM: <s> removes an axes listener for a specified set of axes </s>
|
funcom_train/45804557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLocality(int newLocality) {
int oldLocality = locality;
locality = newLocality;
if (getFocusNode() != null) {
// Ensure all nodes within the new locality are loaded.
// Get edges beyond locality's reach.
// Only create new edges and nodes if locality has increased.
loadNodesInLocality(getFocusNode(),
oldLocality < newLocality, newLocality < oldLocality);
}
}
COM: <s> set the locality to a given value and adds removes nodes where appropriate </s>
|
funcom_train/25205695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isEquals() {
Dimen hd = TfmFixWord.toDimen(vfFont.getDesignSize(), val.getH());
Dimen vd = TfmFixWord.toDimen(vfFont.getDesignSize(), val.getV());
if (x.eq(hd) && vd.isZero()) {
return true;
}
return false;
}
COM: <s> check if x y is equals to h v </s>
|
funcom_train/33722553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean addServiceEntry(ServiceEntry entry) {
if (LOG.isDebugEnabled()) {
LOG.debug("adding service '" + entry.getType().getName() + "' to " + this);
}
boolean result = serviceEntries.add(entry);
fireServiceAdded(entry);
return result;
}
COM: <s> adds the given entry to the list of services available in this context </s>
|
funcom_train/4193825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeSipProviderExceptionListener(SipProviderExceptionListener e_listener)
{ printLog("removing SipProviderExceptionListener",LogLevel.MEDIUM);
if (!exception_listeners.contains(e_listener))
{ printWarning("trying to remove a missed SipProviderExceptionListener.",LogLevel.HIGH);
return false;
}
else
{ exception_listeners.remove(e_listener);
return true;
}
}
COM: <s> removes a sip provider exception listener </s>
|
funcom_train/14461225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMatchingFontIndex(Font f) {
Map fontmap = this.getFontRecsAsXML();
Object o = fontmap.get("<FONT><" + f.getXML() + "/></FONT>");
if (o!=null) {
Integer I = (Integer)o;
return I.intValue();
}else {
return -1;
}
}
COM: <s> gets the index for this font based on matching through </s>
|
funcom_train/26029395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Reasoner createReasoner(List<Rule> rules) {
LPBackwardRuleReasoner reasoner = new LPBackwardRuleReasoner(rules);
reasoner.tablePredicate(sP);
reasoner.tablePredicate(sC);
reasoner.tablePredicate(ty);
reasoner.tablePredicate(p);
reasoner.tablePredicate(a);
reasoner.tablePredicate(b);
return reasoner;
}
COM: <s> override in subclasses to test other reasoners </s>
|
funcom_train/39315156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testZoom3ActionPerformed() {
System.out.println("testZoom3ActionPerformed");
f.zoom3ActionPerformed(actionEvent);
//t.zoom3ActionPerformed(actionEvent);
assertEquals(4,(int)f.center.getZoom());
//assertEquals(4,(int)t.center.getZoom());
assertEquals(f.zoom3, f.curZoom);
}
COM: <s> test of zoom3 action performed method of class terp paint </s>
|
funcom_train/39244241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWelcomePage(){
try {
WebConversation conversation = new WebConversation();
WebRequest request = new GetMethodWebRequest(JAVACAREERS_URL);
WebResponse response = conversation.getResponse(request);
assertEquals("Page title", "Java Careers", response.getTitle());
} catch (MalformedURLException e) {
fail("Exception:" + e.getMessage());
} catch (IOException e) {
fail("Exception:" + e.getMessage());
} catch (SAXException e) {
fail("Exception:" + e.getMessage());
}
}
COM: <s> test the welcome page title </s>
|
funcom_train/9875262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGraphSelectionGenes(String currExp,int chromNum, ArrayList geneList) {
graphSelectedGenes = geneList;
graphSelectedExp = currExp;
graphSelectedChrom = chromNum;
this.setStateVariable("Graph Selection Type","gene");
if(charmViewer == null)
System.out.println("setGraphSelectionGenes().charmViewer is null");
charmViewer.updateViewResults();
}
COM: <s> sets the gene selection state information experiment chromosome gene list </s>
|
funcom_train/14300376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double variance(DiscreteFunction df) {
double aux, ev=0.0, evv=0.0;
for (int i=0; i<df.values.length; i++) {
aux = values[i] * df.values[i];
ev += aux;
evv = df.values[i] * aux;
}
return(evv - ev * ev);
}
COM: <s> calculate the variance of a discrete function </s>
|
funcom_train/3337530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) throws ClassCastException {
try {
return ((Comparable) operator.apply(rootCtx, o1))
.compareTo((Comparable) operator.apply(rootCtx, o2));
} catch (EvaluationException e) {
throw new ClassCastException(this.getClass() + " can't compare arguments.");
}
}
COM: <s> compares its two arguments for order </s>
|
funcom_train/39914844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLabel16() {
System.out.println("getLabel16");
Page1 instance = new Page1();
Label expResult = null;
Label result = instance.getLabel16();
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 label16 method of class timesheetmanagement </s>
|
funcom_train/43894535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List deltaAdded(int fromIndex, int toIndex) {
int position = fromIndex;
List range = subList(fromIndex, toIndex);
List added = new ArrayList(range.size());
for (Iterator i = range.iterator(); i.hasNext(); position++) {
Object item = i.next();
added.add(deltaAdded(position, item));
}
return added;
}
COM: <s> indicate that the range has been added </s>
|
funcom_train/9673044 | /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) {
jLabelMessage = new JLabel();
jLabelMessage.setText("<Info>");
jLabelMessage.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(jLabelMessage, java.awt.BorderLayout.SOUTH);
jContentPane.add(getJPanelClient(), java.awt.BorderLayout.CENTER);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/51357682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setJadFile(final String fileName, final byte[] file) {
jadFileName = fileName;
jadFile = file;
if (!jadFileName.endsWith(".jad")) {
throw new IllegalArgumentException("Invalid jad name: " + fileName);
}
// Set the taskId to the jad file name
parFileName = jadFileName.substring(0, jadFileName.length() - 4);
}
COM: <s> set the jad file </s>
|
funcom_train/44626899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printTree(List<JCTree> list) {
System.out.println("NODES FOR " + getName());
for (JCTree t: list) {
System.out.println(t.getClass() + " " + t.getStartPosition() + " " + t.getPreferredPosition() + " " + parser.getEndPos(t));
}
}
COM: <s> prints out the nodes of the tree </s>
|
funcom_train/42461193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEnabled() {
model.enterCriticalSection(Lock.READ);
try {
Statement s = resource.getProperty(SDV.disabled);
return s == null || s.getObject().isLiteral() && !s.getBoolean(); // either no disabled property or it is false
} catch (Exception e) {
log.error("Failed to get " + SDV.disabled + " from user " + toString());
} finally {
model.leaveCriticalSection();
}
return false; // assume false on errors
}
COM: <s> returns false if user has property disabled set to true </s>
|
funcom_train/48526783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillBuffer() throws IOException {
// process the mark
if (marked != null)
this.marked.append(buffer, 0, bufferPosition);
else if (mark != -1)
this.marked = new CharArrayBuffer(buffer, mark, bufferPosition - mark);
int read = reader.read(buffer);
if (read > 0) {
bufferLimit = read;
bufferPosition = 0;
}
}
COM: <s> internal method which actually fills the buffer </s>
|
funcom_train/51413486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
pBar = new JProgressBar();
iconLabel = new JLabel(GUITools.getImageIcon(GUITools.BUSY_ANI));
JPanel logoPanel = new JPanel(new GridLayout(1,1));
logoPanel.add(iconLabel);
logoPanel.setBackground(Color.WHITE);
logoPanel.setBorder(BorderFactory.createEtchedBorder());
setSize(200, 100);
setLayout(new BorderLayout());
add(logoPanel, BorderLayout.CENTER);
add(pBar, BorderLayout.SOUTH);
GUITools.positionCenterScreen(this);
}
COM: <s> initializes the window and its components </s>
|
funcom_train/18807997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDateConstructor2() {
final TimeZone zone = TimeZone.getTimeZone("Australia/Sydney");
final Hour h1 = new Hour(new Date(1014267599999L), zone);
final Hour h2 = new Hour (new Date(1014267600000L), zone);
assertEquals(15, h1.getHour());
assertEquals(1014267599999L, h1.getLastMillisecond(zone));
assertEquals(16, h2.getHour());
assertEquals(1014267600000L, h2.getFirstMillisecond(zone));
}
COM: <s> in sydney the 4pm on 21 mar 2002 is java </s>
|
funcom_train/2880176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean applySecuritySettings(SmartFrogTask task) {
Security sec = getSecurity(task);
if (sec == null) {
return false;
}
if(!sec.isEnabled()) {
//we are disabled; do not apply
return false;
}
//hand off to the task
sec.applySecuritySettings(task);
return true;
}
COM: <s> apply whatever security settings are needed </s>
|
funcom_train/22444426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveField( int mbX, int mbY, int motion_x, int motion_y, boolean rounding, boolean field ) {
mpeg_motion( oldLuminance, oldRed, oldBlue,
mbX, mbY,
0, true, field?1:0, 0, // Field based, source field, destination field ID
rounding, false, motion_x, motion_y,
0, 0, 16, 8 );
}
COM: <s> copy a field block from the previous frame mpeg4 </s>
|
funcom_train/18381915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteMessage(Long messageId) throws DAOException {
ForumMessage msg = new ForumMessage();
msg.setId(messageId);
try {
session = ForumHibernateUtil.currentSession();
session.delete(msg);
} catch (HibernateException e) {
logger.debug(" message cannot be deleted "+e.getMessage());
}
}
COM: <s> delete a message </s>
|
funcom_train/29690448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(ASTConstant node, Object data) {
data = node.childrenAccept(this, data);
System.out.println("constant subexpression: " + node.getValue());
_RPNList.add(new Operand(node.getValue().toString(), new Double(node
.getValue().toString()).doubleValue()));
return data;
}
COM: <s> method is called when visitor meets a constant numerical value like 2 </s>
|
funcom_train/14328328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open() throws IOException {
if (raFile == null && blobFile != null) {
// reopen file
raFile = new RandomAccessFile(blobFile, "rw");
openCount = 1;
currentPage = INVALID_PAGE;
buffer = new byte[PAGE_SIZE];
return;
}
if (raFile != null) {
openCount++;
}
}
COM: <s> opens the blob disk file </s>
|
funcom_train/51119346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean expandItemsRecursively(Object startItemId) {
boolean result = true;
// Initial stack
Stack todo = new Stack();
todo.add(startItemId);
// Expand recursively
while (!todo.isEmpty()) {
Object id = todo.pop();
if (areChildrenAllowed(id) && !expandItem(id)) {
result = false;
}
if (hasChildren(id)) {
todo.addAll(getChildren(id));
}
}
return result;
}
COM: <s> expand items recursively </s>
|
funcom_train/21314603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String displayNameForProperty() {
if(_displayNameForProperty == null) {
String nameFromRules = (String)d2wContext().valueForKey("displayNameForProperty");
if (nameFromRules != null) {
_displayNameForProperty = ((ERXSession) session()).localizer().localizedStringForKeyWithDefault(nameFromRules);
}
}
return _displayNameForProperty;
}
COM: <s> localize also names we get from the rules </s>
|
funcom_train/3336571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean initObjective(ObjectiveController owner,Object target) {
this.target = (Item)target;
System.out.println("trying to get " + this.target);
this.owner = owner;
path = owner.sourceMapServer.setAvatarPath(owner.sourceAvatar, this.target.location.x, this.target.location.y, this.target.location.z);
return true;
}
COM: <s> tries to initialize the ai if the </s>
|
funcom_train/16641099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWords(String regex) {
if (regex == null)
throw new IllegalArgumentException("Null pointer in regex");
if (regex.isEmpty())
throw new IllegalArgumentException("regex is empty");
if (containsWords(regex)) return;
patterns.add(Pattern.compile(regex));
fireGroupChanged();
}
COM: <s> adds pattern defined by given regex to this group </s>
|
funcom_train/5864126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FunctionMapper getFunctionMapper(Object ref) {
if (ref instanceof Component)
ref = ((Component)ref).getPage();
if (ref == null) {
ExecutionCtrl execCtrl = ExecutionsCtrl.getCurrentCtrl();
if (execCtrl != null)
ref = execCtrl.getCurrentPage();
}
return DualFunctionMapper.combine(
ref instanceof Page ? ((Page)ref).getFunctionMapper(): null,
_mapper);
}
COM: <s> returns the function mapper or null if not available </s>
|
funcom_train/11323590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getMessages() {
if (messages == null) {
if (getContext() != null) {
messages = new MessagesMap(getClass(), CONTROL_MESSAGES);
} else {
String msg = "Cannot initialize messages as context not set "
+ "for link: " + getName();
throw new IllegalStateException(msg);
}
}
return messages;
}
COM: <s> return a map of localized messages for the control </s>
|
funcom_train/11784760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertNoCircles() {
System.out.println("DependencyGraph.assertNoCircles");
for (T content : getAllNodes()) {
// System.out.println("TESTING " + content);
final Collection<Node> searchPath = new ArrayList<Node>();
final Node node = node(content);
searchPath.add(node);
node.detectCircles(searchPath);
}
}
COM: <s> fails if there are circles in the graph </s>
|
funcom_train/10658602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int run(String[] args) throws JavaCompilerException {
try {
// @ToDo: Rewrite with ProcessBuilder for Java 5.0.
return new SubProcess(args, System.out, null, System.err).waitFor();
} catch (IOException e) {
throw new JavaCompilerException(e);
}
}
COM: <s> runs the compilation process with the specified arguments </s>
|
funcom_train/41024198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawString(Graphics g, String s, int x, int y) {
g.setColor(Color.black);
g.drawString(s, x+1, y);
g.drawString(s, x-1, y);
g.drawString(s, x, y-1);
g.drawString(s, x, y+1);
g.setColor(Color.cyan);
g.drawString(s, x, y);
}
COM: <s> draw a string with 1px simple black border </s>
|
funcom_train/4779978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assignMembers() {
if (!getNonMemberList().isSelectionEmpty()) {
List<Object> values = Arrays.asList(getNonMemberList().getSelectedValues());
for (Object object : values) {
if (object instanceof Group) {
groupMembers.add((Group) object);
groupNonMembers.remove(object);
}
if (object instanceof User) {
userMembers.add((User) object);
userNonMembers.remove(object);
}
}
refreshLists();
}
}
COM: <s> assigns selected members </s>
|
funcom_train/47678158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasNextSibling() {
// the root field never has siblings
if (isRoot()) {
return false;
}
// check if the current field is the last child of the parent field
return getParent().getChildPos(getName()) < getParent().getNumberOfChildren();
}
COM: <s> checks if the current field has a subsequent sibling </s>
|
funcom_train/47022217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExportBookmark() {
if (exportBookmark == null) {//GEN-END:|218-getter|0|218-preInit
// write pre-init user code here
exportBookmark = new Command(getLocalizedString("Export"), Command.OK, 5);//GEN-LINE:|218-getter|1|218-postInit
// write post-init user code here
}//GEN-BEGIN:|218-getter|2|
return exportBookmark;
}
COM: <s> returns an initiliazed instance of export bookmark component </s>
|
funcom_train/51812294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBasicDispatch() throws Exception {
dispatcher.setTargetObject(runnable);
assertFalse("Indicating executed prior to execution", executed);
dispatcher.onGenericMessage(new GenericMessage( Runnable.class.getMethod("run", new Class[0]), new Object[0]));
}
COM: <s> testing a basic dispatch </s>
|
funcom_train/36949486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateCycleMarkersIfNecessary() {
if (!this.needCycleCheck) return;
if (!this.canChangeResources) return;
if (!project.hasCycleMarker() && !project.hasLoadpathCycle(newResolvedPath)){
return;
}
postAction(
new IPostAction() {
public String getID() {
return "updateCycleMarkers"; //$NON-NLS-1$
}
public void run() throws RubyModelException {
RubyProject.updateAllCycleMarkers(null);
}
},
REMOVEALL_APPEND);
}
COM: <s> update cycle markers </s>
|
funcom_train/5260821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHasEnforcementLevelAffectedByPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BusinessRule_hasEnforcementLevelAffectedBy_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BusinessRule_hasEnforcementLevelAffectedBy_feature", "_UI_BusinessRule_type"),
BmmPackage.Literals.BUSINESS_RULE__HAS_ENFORCEMENT_LEVEL_AFFECTED_BY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the has enforcement level affected by feature </s>
|
funcom_train/8629820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeStorage(int id, DiskFile file) {
if (SysProperties.CHECK) {
Storage s = storageMap.get(id);
if (s == null || s.getDiskFile() != file) {
Message.throwInternalError();
}
}
storageMap.remove(id);
}
COM: <s> remove the storage object from the file </s>
|
funcom_train/23453355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addServiceParameterPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Profile_serviceParameter_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Profile_serviceParameter_feature", "_UI_Profile_type"),
ProfilePackage.Literals.PROFILE__SERVICE_PARAMETER,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the service parameter feature </s>
|
funcom_train/17192504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void accept(Visitor v) {
v.visitExceptionThrower(this);
v.visitStackProducer(this);
v.visitPushInstruction(this);
v.visitTypedInstruction(this);
v.visitLoadClass(this);
v.visitCPInstruction(this);
v.visitFieldOrMethod(this);
v.visitFieldInstruction(this);
v.visitGETSTATIC(this);
}
COM: <s> call corresponding visitor method s </s>
|
funcom_train/1842863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String hostname, int port, String identifier) {
Server server = new Server(hostname, port);
server.setIdentifier(identifier);
server.setDucksController(ducksController);
servers.add(server);
log.info("Added jist server ["+server.getIdentifier()+"] at "+server.getHost()+":"+server.getPort());
}
COM: <s> add a new server to the list </s>
|
funcom_train/48103597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String saveUserIdea() throws IOException {
String anonymous = getRequest().getParameter("anonymous");
if (StringUtils.isNotEmpty(anonymous)) {
this.idea.setUserId(Contents.ANONYMOUS);
}
this.ideaService.saveOrUpdateSwdUserIdea(this.idea);
getResponse().sendRedirect(getRequest().getContextPath() + "/web/member/swdUserIdeaAction!findLastestUserIdeas.action");
return null;
}
COM: <s> save users idea </s>
|
funcom_train/20884937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDateCSV() {
DateDTO dto = new DateDTO();
dto.dateField = createDate("28.02.2007");
assertTrue(JSefaTestUtil.serialize(CSV, dto).indexOf("28.02.2007") >= 0);
JSefaTestUtil.assertRepeatedRoundTripSucceeds(CSV, dto);
}
COM: <s> tests date csv </s>
|
funcom_train/22204291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkUpdateAllowed() {
try {
if (getTopicMap().getTopicMapSystem().getFeature("http://tmapi.org/features/readOnly/")) {
throw new UnsupportedOperationException("Update operations are not allowed on a read-only topic map.");
}
} catch (FeatureNotRecognizedException e) {
return;
}
}
COM: <s> throws an an unsupported operation exception if topic map is read only </s>
|
funcom_train/31805572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() throws CloneNotSupportedException {
Message msg = new SystemMessage(Message.CLONE, null,
SystemMessage.CLONE_REQUEST);
try {
return getAgletRef().sendMessage(msg);
} catch (InvalidAgletException ex) {
throw new CloneNotSupportedException(ex.getMessage());
} catch (MessageException ex) {
throw new CloneNotSupportedException(ex.getException()
.getMessage());
} catch (NotHandledException ex) {
throw new CloneNotSupportedException(ex.getMessage());
}
}
COM: <s> clones the aglet proxy </s>
|
funcom_train/32138633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetDND(DragSourceListener drag, DropTargetListener drop) {
if(drag != null) dragSource.removeDragListener(drag);
if(drop != null) dropTarget.removeDropListener(drop);
if(dragSource != null) dragSource.dispose();
if(dropTarget != null) dropTarget.dispose();
dragSource = new DragSource(folder, DND.DROP_MOVE);
dragSource.setTransfer(types);
dropTarget = new DropTarget(folder, DND.DROP_MOVE | DND.DROP_DEFAULT);
dropTarget.setTransfer(types);
}
COM: <s> this method resets all drag and drop information </s>
|
funcom_train/23267820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDireccion() {
System.out.println("getDireccion");
Cliente instance = new Cliente();
String expResult = "";
String result = instance.getDireccion();
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 direccion method of class capa negocios </s>
|
funcom_train/17763316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSeedRaw(final long seed) {
// TBD: add check, throw exception
ddmuldd(expm2((double) seed - POW3_33, POW3_33), POW3_33_DIV_2, dd1);
dddivd(dd1, POW3_33, dd2);
ddmuldd(Math.floor(dd2[0]), POW3_33, dd2);
ddsub(dd1, dd2, dd3);
d1 = dd3[0];
}
COM: <s> set the raw seed or state to match original fortran code </s>
|
funcom_train/20750925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isProjectManager(String projectName, String userName) {
userName = userName == null ? securityService.getCurrentUser().getUsername() : userName;
try {
return projectService.hasRole(projectName, userName, RoleTO.ROLE_MANAGER);
} catch (Exception e) {
logger.error(e);
}
return false;
}
COM: <s> is current user project manager for project related to specified task </s>
|
funcom_train/43615739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onQuit(String sourceNick, String sourceLogin, String sourceHostname, String reason){
if(sourceNick.compareToIgnoreCase(config.get(xConfig.CONFIG_NICKNAME))==0)
this.changeNick(config.get(xConfig.CONFIG_NICKNAME));
}
COM: <s> try to get my nickname back when uman goes offline muhahahah bot ownage </s>
|
funcom_train/3704013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setGroupBorder(JComponent c, String strTitle) {
Border border;
TitledBorder title;
border = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED);
title = BorderFactory.createTitledBorder(border, strTitle);
title.setTitleJustification(TitledBorder.RIGHT);
c.setBorder(title);
} // of method
COM: <s> set a simple border around each messenger type ex </s>
|
funcom_train/3169462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Heaper get(int index) {
//TODO how does this differ from getValue?
Heaper result = fetch(index);
if (result == null) {
throw new IllegalArgumentException("NullEntry");
}
return result;
// INLINE RPTR(Heaper) PtrArray::get (Int32 index) {
// WPTR(Heaper) result = this->fetch(index);
// if (result == NULL) {
// PtrArray::nullEntry();
// }
// return result;
// }
}
COM: <s> retrieve a single element from the array </s>
|
funcom_train/42251441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createMemoryRealm(String parent) throws Exception {
// Create a new MemoryRealm instance
MemoryRealm realm = new MemoryRealm();
// Add the new instance to its parent component
ObjectName pname = new ObjectName(parent);
ContainerBase containerBase = getParentContainerFromParent(pname);
// Add the new instance to its parent component
containerBase.setRealm(realm);
// Return the corresponding MBean name
ObjectName oname = realm.getObjectName();
if (oname != null) {
return (oname.toString());
} else {
return null;
}
}
COM: <s> create a new memory realm </s>
|
funcom_train/2368312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMatchCount(int newMatches, MatchContainer head, MatchContainer tail ) {
MatchContainer currentContainer = tail ;
do {
currentContainer.setMatchCount( currentContainer.getMatchCount() + newMatches ) ;
currentContainer = currentContainer.getParent() ;
} while ( currentContainer != head ) ;
}
COM: <s> updates the number of matches of each container included between head and tail </s>
|
funcom_train/7698994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ColumnData getPrimaryKey_ColumnData(ColumnData[] columnData) {
// TODO - do I need to sort first? or should I sort first, b/c this wouldn't work if primary key is not listed in order
int index = getPrimaryKey_Index(columnData);
ColumnData r = null;
if (index > -1) {
r = columnData[index];
}
return r;
}
COM: <s> get the primary column object </s>
|
funcom_train/17788948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addByte(byte b){
index++;
//Buffer reaches its capcaity
if(index == byteBuffer.length){
byte[] byteBufferTMP = null;
if(byteBuffer.length < maxBuffAllocation){
byteBufferTMP = new byte[byteBuffer.length + byteBuffer.length];
}else{
byteBufferTMP = new byte[byteBuffer.length + maxBuffAllocation];
}
System.arraycopy(byteBuffer, 0, byteBufferTMP, 0, byteBuffer.length);
byteBuffer = byteBufferTMP;
}
byteBuffer[index] = b;
}
COM: <s> inserts a byte in the byte stream </s>
|
funcom_train/45471301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GeneralizedFieldHandler createFieldHandler(final Class type) throws MappingException {
if (type == null) {
return null;
}
if (java.sql.Time.class.isAssignableFrom(type)) {
return new SQLTimeFieldHandler();
}
if (java.sql.Timestamp.class.isAssignableFrom(type)) {
return new ValueOfFieldHandler(type);
}
return null;
} //-- createFieldHandler
COM: <s> creates a generalized field handler for the given class type </s>
|
funcom_train/51590639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*public void mouseEntered(MouseEnteredEvent mouseEnteredEvent) {
getAppearance().removeAll();
getAppearance().setPadding(new Spacing(1,1,1,1));
getAppearance().add(new PlainBorder(Color.BLACK,2));
}*/
COM: <s> show border when mouse entered </s>
|
funcom_train/43327347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Printf outfile) throws IOException {
if (tabulated == null) throw new
IllegalArgumentException("Sippl90 potential not initialized.");
minDistance.save(outfile);
maxDistance.save(outfile);
for (int i=0; i<20; i++)
for (int j=0; j<20; j++)
for (int k=0; k<15; k++)
tabulated[i][j][k].save(outfile);
}
COM: <s> saved tabulated values to a file </s>
|
funcom_train/43334353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void preinitialize() throws IllegalActionException {
super.preinitialize();
Token contents = initialOutputs.getToken();
if (!(contents instanceof ArrayToken)) {
throw new IllegalActionException(this, "InitialOutputs was "
+ contents + " which is not an" + " array token.");
}
_outputsArray = (ArrayToken) contents;
getDirector().invalidateResolvedTypes();
}
COM: <s> check that the i initial outputs i parameter contains an </s>
|
funcom_train/40484313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransitionTypes(TransitionPhysics transition) {
for (Iterator<Effect> it = iterator(); it.hasNext();) {
Effect theEffect = it.next();
if (theEffect instanceof ParallellCompositeEffect)
((ParallellCompositeEffect) theEffect).setTransitionType(transition);
else
theEffect.setTransitionType(transition);
}
}
COM: <s> sets each effects transition physics </s>
|
funcom_train/20823013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(final long newValue, final int timeSinceLastRead) {
long average = 0;
if ((newValue - getValue()) > 0) {
if (timeSinceLastRead > 1) {
average = Math.round((newValue - getValue()) * 1000f / timeSinceLastRead);
}
}
valueHolder.setValue(newValue);
averageHolder.setValue(average);
}
COM: <s> set a new value and calculate the average change in value </s>
|
funcom_train/12187070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DurationValue subtract(DateTimeValue dateTime) {
// todo later add the ability to handle DateTimeValues that are not
// SimpleDateTimeValues
SimpleDateTimeValue dateTimeValue = (SimpleDateTimeValue) dateTime;
long millis = calendar.getTimeInMillis() -
dateTimeValue.calendar.getTimeInMillis();
return factory.createDurationValue(millis);
}
COM: <s> subtract the supplied date time value from this date time value returning </s>
|
funcom_train/49459209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void test01_fake_title_with_title() throws Exception {
String title="The fake title";
String inputText="\n the other part of the text blablablablabl\nalablablablablalablablab";
String guessedTitle = JspHelper.fakeTitle(inputText,title);
assertTrue(title.equals(guessedTitle));
}
COM: <s> test 01a test fake title method specifying a title </s>
|
funcom_train/19911362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContent(T[] content) {
this.content = content;
cleanUpItems();
count = content.length;
items = new View[count];
for (int i = 0; i < count; i++) {
items[i] = viewGenerator.getView(null, content[i]);
addView(items[i]);
}
}
COM: <s> sets the contents of this view </s>
|
funcom_train/3415087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(V newReference, int newStamp) {
ReferenceIntegerPair<V> current = atomicRef.get();
if (newReference != current.reference || newStamp != current.integer)
atomicRef.set(new ReferenceIntegerPair<V>(newReference, newStamp));
}
COM: <s> unconditionally sets the value of both the reference and stamp </s>
|
funcom_train/31663048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer tmp = new StringBuffer("[");
for (int i = 0; i < symbols.length; i++) {
tmp.append(symbols[i]);
if (i < symbols.length - 1)
tmp.append(',');
}
tmp.append("]");
return tmp.toString();
}
COM: <s> output of symbols </s>
|
funcom_train/18049053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel getSVAutoLockoutTimerLabel() {
if (SVAutoLockoutTimerLabel == null) {
SVAutoLockoutTimerLabel = new JLabel();
SVAutoLockoutTimerLabel.setText("Auto lockout timeout");
SVAutoLockoutTimerLabel.setFont(new Font("Tahoma", Font.PLAIN, 11));
SVAutoLockoutTimerLabel.setEnabled(this.isLockoutEnable);
}
return SVAutoLockoutTimerLabel;
}
COM: <s> this method initializes svauto lockout timer label </s>
|
funcom_train/14615579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeObject(ObjectOutputStream stream) throws IOException {
ObjectOutputStream.PutField fields = stream.putFields();
String value = null;
try {
value = this.value.getAsString();
} catch(TemplateModelException e) {
// Shouldn't ever happen since FastScalar doesn't throw this exception
}
// Synthesize for compactness
fields.put("stringValue", value);
stream.writeFields();
}
COM: <s> for serialization write this object as a single string object </s>
|
funcom_train/48527539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeReference(Object o, String field) throws IOException {
writer.start("reference");
if (field != null)
writer.attribute("field", field);
writer.attribute("idref", getReference(o));
writer.end("reference");
}
COM: <s> method which writes a reference to the stream determined from the references table </s>
|
funcom_train/1058773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTableViewers() {
possibleElementsTableViewer = new TableViewer(possibleElementsTable);
possibleElementsTableViewer.setLabelProvider(getLabelProvider());
possibleElementsTableViewer.setContentProvider(new PossibleElementsContentProvider());
possibleElementsTableViewer.setInput(possibleElementList);
selectedElementsTableViewer = new TableViewer(selectedElementsTable);
selectedElementsTableViewer.setLabelProvider(getLabelProvider());
selectedElementsTableViewer.setContentProvider(new SelectedElementsContentProvider());
selectedElementsTableViewer.setInput(selectedElementList);
}
COM: <s> sets the table viewers </s>
|
funcom_train/38937049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getNonIntersect2RegionList(int r1, int c1, int r2, int c2) {
StyleRegion A = new StyleRegion(style, r2+1, this.startColumn, this.endRow, this.endColumn);
ArrayList result = new ArrayList();
result.add(A);
return result;
}
COM: <s> returns non intersecting regions for case 2 </s>
|
funcom_train/42180239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsWallStartAt(float x, float y, float margin) {
float [][] wallPoints = getPoints();
Line2D startLine = new Line2D.Float(wallPoints [0][0], wallPoints [0][1], wallPoints [3][0], wallPoints [3][1]);
return containsShapeAtWithMargin(startLine, x, y, margin);
}
COM: <s> returns code true code if this wall start line contains </s>
|
funcom_train/51606442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void adjustBounds() {
float rx = layerBounds[2] - layerBounds[0];
float ry = layerBounds[3] - layerBounds[1];
if((rx / ry) >= 2) {
layerBounds[2] = layerBounds[0] + 2 * ry;
} else {
layerBounds[1] = layerBounds[3] - (rx / 2);
}
}
COM: <s> computates layer bounds on current bounds </s>
|
funcom_train/882189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueFromString(String value) throws IllegalValueException {
sendMemento();
Date d = null;
try {
SimpleDateFormat sdf = (SimpleDateFormat) DateFormat
.getDateInstance();
sdf.applyPattern("yyyy-MM-dd"); //$NON-NLS-1$
d = sdf.parse(value);
setValue(d);
} catch (ParseException e) {
throw new IllegalValueException("Date String [" + value + //$NON-NLS-1$
"] could not be parsed. Format must be yyyy-MM-dd.", //$NON-NLS-1$
e);
}
}
COM: <s> this method expects the date format yyyy mm dd </s>
|
funcom_train/25811506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void newGame(Class<?> gameplay_class) {
Uri new_uri = Uri.withAppendedPath(GameListProvider.NEW_URI, gameplay_class.getName());
Intent intent = new Intent(Intent.ACTION_INSERT, new_uri);
Log.d(TAG, "Start new game: " + intent.toString());
startActivity(intent);
}
COM: <s> launch a gameplay activity to play a new game </s>
|
funcom_train/51294613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addColumn(String colName) {
int length = columnNames.length;
String[] colNames = new String[length + 1];
boolean[] hColumns = new boolean[length + 1];
for (int i = 0; i < length; i++) {
colNames[i] = columnNames[i];
hColumns[i] = hiddenColumns[i];
}
colNames[length] = colName;
hColumns[length] = false;
columnNames = colNames;
hiddenColumns = hColumns;
fireTableStructureChanged();
}
COM: <s> add new column into table specifying its header </s>
|
funcom_train/42944110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getLongValue(String fldName, long dft, int ndx) {
String fn = (ndx < 0) ? fldName : (fldName + "." + ndx);
Object val = this.getEventValue(fn);
if (val instanceof Number) {
return ((Number) val).longValue();
}
else {
return dft;
}
}
COM: <s> gets the event value stored in the specified field name as a long </s>
|
funcom_train/5398867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object mindTheSheep(Pasture pasture, Object sheep) {
if (propertyName == null) {
throw new IllegalStateException("Watched Property not initialized");
}
if (sheep instanceof HttpServletRequest) {
return ((HttpServletRequest) sheep).getAttribute(propertyName);
}
throw new IllegalArgumentException("Invalid argument '" + sheep + "'");
}
COM: <s> returns watched attribute for given http servlet request </s>
|
funcom_train/21502437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDimensionalPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ArrayType_dimensional_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ArrayType_dimensional_feature", "_UI_ArrayType_type"),
TypeSystemPackage.Literals.ARRAY_TYPE__DIMENSIONAL,
false,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the dimensional feature </s>
|
funcom_train/24448585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getTypeBox_musicType() {
if (typeBox_musicType == null) {
typeBox_musicType = new JComboBox();
for(Object a : MusicTypes.musictypes){
typeBox_musicType.addItem(a);
}
typeBox_musicType.setFont(new Font("Dialog", Font.BOLD, 12));
typeBox_musicType.setEnabled(false);
}
return typeBox_musicType;
}
COM: <s> this method initializes type box music type </s>
|
funcom_train/14056505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateWidgetBounds(int guiX, int guiY) {
Iterator i = this.getRenderables();
if(i != null) {
while(i.hasNext()) {
Object r = i.next();
if(r instanceof RCollection) {
// RUIControl is a RCollection too.
RCollection rc = (RCollection) r;
rc.updateWidgetBounds(guiX + rc.getX(), guiY + rc.getY());
}
}
}
}
COM: <s> updates bounds of all descendents gui components </s>
|
funcom_train/45623228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStateFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GenerateResourceType_stateFile_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GenerateResourceType_stateFile_feature", "_UI_GenerateResourceType_type"),
MSBPackage.eINSTANCE.getGenerateResourceType_StateFile(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the state file feature </s>
|
funcom_train/28983054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getSettingsSendingEmailsStringSpacer () {
if (settingsSendingEmailsStringSpacer == null) {//GEN-END:|78-getter|0|78-preInit
// write pre-init user code here
settingsSendingEmailsStringSpacer = new StringItem ("Sending Email Settings", " ");//GEN-LINE:|78-getter|1|78-postInit
// write post-init user code here
}//GEN-BEGIN:|78-getter|2|
return settingsSendingEmailsStringSpacer;
}
COM: <s> returns an initiliazed instance of settings sending emails string spacer component </s>
|
funcom_train/18131538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeArtifact(WorkflowDataModel dataModel, Object artifact) {
EBioFlowGraphModel model = EBioFlowUIGraphCorePlugin.getInstance()
.getGraphModelController().getGraphModel(
dataModel.getWorkflow());
GraphCell cell = model.getGraphCell(artifact);
model.edit(null, new Object[] { cell }, null, null, null, null);
}
COM: <s> method for removing the artifact cell from the graph </s>
|
funcom_train/45250458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createExtendedDialogArea(Composite parent) {
viewerComposite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
viewerComposite.setLayout(layout);
GridData viewerData = new GridData(GridData.FILL_BOTH);
viewerData.horizontalSpan = 2;
viewerData.heightHint = 0;
viewerComposite.setLayoutData(viewerData);
}
COM: <s> create the extensions to the dialog area </s>
|
funcom_train/18744845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected final Map<String,AspectGraph> getGraphMap(ResourceKind kind) {
Map<String,AspectGraph> result = this.graphMap.get(kind);
if (result == null) {
this.graphMap.put(kind, result = new TreeMap<String,AspectGraph>());
}
return result;
}
COM: <s> returns the resource map for a given graph based resource kind </s>
|
funcom_train/16790955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancel() {
if (this.lifecycle != TransactionLifecycle.EXECUTING)
throw new IllegalStateException("Unable to cancel transaction. In state " + this.lifecycle);
if (!this.isCancellable())
throw new IllegalStateException("Unable to cancel transaction. Not canclledable.");
this.context.cancel();
}
COM: <s> cancel the transaction </s>
|
funcom_train/7720775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFile(OpenFile file) {
// put the given openfile in the list by its name
openfiles.put(file.getName(),file);
// add the file to the menu pulldown
menu.add(file.getName());
reset(file.getName());
// update the properties (in config.xml)
updateProperties();
}
COM: <s> add a openfile to our opened list will also result in it </s>
|
funcom_train/45759399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int firstParentWithCode(final int pos, final int linkCode) {
int ctx = _dests[wordContextLin(pos)]; // first parent of text node
final int shift = _nTextNodes;
final int limit = _dests.length - 1;
while (_linkTypes[ctx - shift] != linkCode)
if ((ctx = _dests[ctx]) == limit)
return -1;
return ctx;
}
COM: <s> starting with ctx and going up the ancestry tree look for the first </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.