__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/18049697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ViewerFilter createViewFilter() {
final IPredicate treeNodeIdConstainsXPredicate = new IPredicate() {
public boolean evaluate(Object arg) {
return ((TreeNode) arg).getId().contains("X");
}
};
return new ViewerFilter() {
public boolean select(Viewer viewer, Object parentElement, Object element) {
return treeNodeIdConstainsXPredicate.evaluate(element)
|| hasChildNodeWhichShouldBeDisplayed(((TreeNode) element), treeNodeIdConstainsXPredicate);
}
};
}
COM: <s> creates the view filter </s>
|
funcom_train/19372133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidTitleNull() {
Topic topic = this.topicPopulator.getTopic1Task1();
topic.setTitle(null);
try {
this.topicManager.update(topic);
fail("Title == null");
} catch (ValidationException ignore) {
} catch (Exception e) {
fail(e.getMessage());
}
}
COM: <s> attempt to update a code topic code with a null code title code </s>
|
funcom_train/12079552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshBuffer() throws IOException {
if (output == null) {
// We're writing to a single buffer.
throw new IOException();
}
// Since we have an output stream, this is our buffer
// and buffer offset == 0
output.write(buffer, 0, position);
position = 0;
}
COM: <s> internal helper that writes the current buffer to the output </s>
|
funcom_train/7982298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long extend_char(long f, int v) {
f ^= (0xffff & v);
int i = (int)f;
long result = (f>>>16);
result ^= ByteModTable[6][i & 0xff]; i >>>= 8;
result ^= ByteModTable[7][i & 0xff];
return result;
}
COM: <s> extends code f code with lower sixteen bits of code v code </s>
|
funcom_train/37518155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Hashtable buildHash( CField[] array ) {
expandable = true;
Hashtable result = new Hashtable();
for (int i = 0; i < array.length; i++) {
CField f = array[i];
if( f instanceof CSourceField ) {
((CSourceField) f).setIndex( i );
} else {
expandable = false;
}
result.put( array[i].ident(), array[i] );
}
return result;
}
COM: <s> utility methods builds a hash table from the array of fields </s>
|
funcom_train/35442609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testState21() {
System.out.println("state21");
Partida partida = null;
String traduciendo = "";
Fide instance = new Fide();
int[] expResult = null;
int[] result = instance.state21(partida );
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 state21 method of class controller </s>
|
funcom_train/27911351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component getFilterTab(int index) {
if (_tabFilters == null || index > _tabFilters.getTabCount() || index < 0) {
return null;
}
JScrollPane sp = (JScrollPane) _tabFilters.getComponentAt(index);
return sp.getViewport().getView();
}
COM: <s> returns the component displayed in the specified filter tab </s>
|
funcom_train/5437155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addFragment(PacketInputStream input, PacketAnalysisDescriptor parent) {
try {
int offset = input.getOffset();
int fragment = input.readShort();
int flags = fragment >>> 8;
addFlags(flags, offset, parent);
fragment &= IP4_FRAGMENT;
addNode("Fragment Offset: " + fragment, offset, offset + 1, parent);
} catch (IOException e) {
// Drop it.
}
}
COM: <s> reads and adds the fragment identifier </s>
|
funcom_train/1444303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean shouldBeCalculated() {
boolean b = this.defaultBenefit > this.bestBenefit * 0.9;
if (DEBUG && !b) {
System.out
.println(this.getWorld().getCycleAndPlayerString()
+ " DribbeSituation. No calculation as benefit is already to high. Best:"
+ this.bestBenefit + " My:" + this.defaultBenefit);
}
return b;
}
COM: <s> the situation is not calculated if the passing or scoring benefit is to </s>
|
funcom_train/12165228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testXMLDeviceEmptySet() throws Exception {
HashMap deviceToProfile = new HashMap();
deviceToProfile.put(new DeviceValue(), new ProfileValue());
deviceToProfile.put(new DeviceValue(), new ProfileValue());
deviceToProfile.put(new DeviceValue(), new ProfileValue());
checkXMLDeviceToProfileAdaption(deviceToProfile);
}
COM: <s> test a set of devices with no values in an xml repository </s>
|
funcom_train/29269736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void walk(ComplexTypeSG pType) throws SAXException {
if (pType.hasSimpleContent()) {
visitor.simpleContent(pType);
} else {
ComplexContentSG ccSG = pType.getComplexContentSG();
if (ccSG.isEmpty()) {
visitor.emptyType(pType);
} else {
visitor.startComplexContent(pType);
walkGroup(ccSG.getGroupSG());
visitor.endComplexContent(pType);
}
}
}
COM: <s> walks over the given types particles </s>
|
funcom_train/279648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(IWorkbench workbench, IStructuredSelection selection) {
this.workbench = workbench;
this.selection = selection;
setWindowTitle(UML2EditorPlugin.INSTANCE.getString("_UI_Wizard_label")); //$NON-NLS-1$
setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE
.getImageDescriptor(UML2EditorPlugin.INSTANCE
.getImage("full/wizban/NewUML2"))); //$NON-NLS-1$
}
COM: <s> this just records the information </s>
|
funcom_train/25075492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleBrowseNewTargetButton() {
trimTexts();
IFile result = WorkspaceResourceDialog.openNewFile(getShell(),
"New file", "Please enter the new file name and path", null,
DEFAULT_VIEWER_FILTERS);
if (result != null) {
String path = result.getFullPath().toString();
if (!path.endsWith(".jpg"))
path += ".jpg";
targetImageText.setText(path);
}
}
COM: <s> handles a click on the browse button allowing to select a new target </s>
|
funcom_train/29549680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResourceDescriptor getFullResourceDescriptor(int i, Seq seq) {
ResourceDescriptor result = null;
if (i < seq.size()) {
com.hp.hpl.jena.rdf.model.Resource resource = seq.getResource(i + 1);
if (resource != null) {
result = getFullResourceDescriptor(resource);
}
}
return result;
}
COM: <s> get detailed resource descriptor </s>
|
funcom_train/34562838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Item finish() throws QueryException {
Item i = next();
if(i == null) return Seq.EMPTY;
Item[] item = { i };
int s = 1;
while((i = next()) != null) {
if(s == item.length) item = Arrays.copyOf(item, s << 1);
item[s++] = i;
}
return Seq.get(item, s);
}
COM: <s> returns a sequence from all iterator values </s>
|
funcom_train/19913269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCopyUnmodifiableFiles(boolean b) {
if (getConfig().isCopyUnmodifiableFiles() != b) {
getConfig().setCopyUnmodifiableFiles(b);
// Update the bitrate patterns
if (getConfig().getDirectoryPattern().containsBitrate()) {
FileProcessor.processBitrate(getResult().getFileSystemRoots(),
getConfig().isCopyUnmodifiableFiles());
refreshStatistics(getResult().getFileSystemRoots());
}
}
}
COM: <s> this method enables or disables the copy of unmoveable files </s>
|
funcom_train/13492385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getMajorSortKeyValue(ClauseSet cs) {
String type = OTHERS;
if (cs instanceof Rule) type = RULES;
else if (cs instanceof Fact) type = FACTS;
else if (cs instanceof SQLClauseSet) type = SQL_CLAUSE_SETS;
for (int i=0;i<topLevelOrder.length;i++) {
if (topLevelOrder[i].equals(type)) return topLevelOrder.length-i;
}
return 0;
}
COM: <s> get the value of the major sort key </s>
|
funcom_train/42899715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
LinkedList<Runnable> workees = this.workees;
while (!stop) {
Runnable workee;
synchronized(workees) {
while (workees.isEmpty()) workees.wait();
workee = workees.removeFirst();
}
if (workee == null) continue;
workee.run();
}
} catch (InterruptedException stop) { }
}
COM: <s> begins the background work loop </s>
|
funcom_train/38512860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setupInitialConfiguration() {
//setValue(0);
Util.log("setupInitialConfiguration: " + getName());
if (mChildren == null) return;
for (Iterator it = mChildren.iterator(); it.hasNext();) {
ConfigurationItem item = (ConfigurationItem) it.next();
item.setupInitialConfiguration();
}
}
COM: <s> setup initial configuration settings </s>
|
funcom_train/13487387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CellSet execute() throws OlapException {
SelectNode mdx = getSelect();
final Catalog catalog = cube.getSchema().getCatalog();
try {
this.connection.setCatalog(catalog.getName());
} catch (SQLException e) {
throw new OlapException("Error while executing query", e);
}
OlapStatement olapStatement = connection.createStatement();
return olapStatement.executeOlapQuery(mdx);
}
COM: <s> executes the query against the current olap connection and returns </s>
|
funcom_train/51639178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ListRewrite getListRewrite(ASTNode node, ASTRewrite rewrite) {
if (node.getLocationInParent() == SwitchStatement.STATEMENTS_PROPERTY) {
ASTNode block= ASTNodes.getParent(node, SwitchStatement.class);
return rewrite.getListRewrite(block, SwitchStatement.STATEMENTS_PROPERTY);
} else {
ASTNode block= ASTNodes.getParent(node, Block.class);
return rewrite.getListRewrite(block, Block.STATEMENTS_PROPERTY);
}
}
COM: <s> get a list rewrite for statement sequence node is element </s>
|
funcom_train/24087994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRow(List<String> values) throws IllegalArgumentException{
if (values.size() != columns.size()) {
throw new IllegalArgumentException("Number of values does not match the number of predefined columns");
}
for(int i = 0; i < values.size(); i++) {
rows.get(i).add(values.get(i));
}
}
COM: <s> adds a set of values one per column to the result set </s>
|
funcom_train/15677975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transpose() {
int tmp = nCols;
nCols = nRows;
nRows = tmp;
double[][] oldData = el;
el = new double[nRows][nCols];
for (int r = 0; r < nRows; r++)
for (int c = 0; c < nCols; c++)
el[r][c] = oldData[c][r];
}
COM: <s> transposes the matrix changing the inner coefficients </s>
|
funcom_train/40716834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void flushTextBuffer() {
if (textBuffer.length() > 0) {
if (textPosition == null) {
throw new NullPointerException();
}
String text = textBuffer.toString();
textBuffer.setLength(0);
children.add(new TextElement(textPosition, text));
textPosition = null;
}
}
COM: <s> collects any accumulated text and adds a new </s>
|
funcom_train/7613234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleApUnresponsive(AccessPoint ap) {
// Check whether we are stale and should cancel
if (shouldCancel()) return;
// This AP is "bad", switch to another
mState = WatchdogState.SWITCHING_AP;
if (D) {
myLogD("AP is dead: " + ap.toString());
}
// Black list this "bad" AP, this will cause an attempt to connect to another
blacklistAp(ap.bssid);
}
COM: <s> handles an unresponsive ap by blacklisting it </s>
|
funcom_train/21112584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expand_node(DefaultMutableTreeNode node) throws NamingException{
//System.out.println("*** Expand node called");//***************
build_tree(node, find_node_context(node));
//System.out.println("*** Expand node exited");//***************
}
COM: <s> this method finds dir context corresponding to the given node and builds the </s>
|
funcom_train/46477823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDomainContainersPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Domain_DomainContainers_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Domain_DomainContainers_feature", "_UI_Domain_type"),
SecurityContextPackage.Literals.DOMAIN__DOMAIN_CONTAINERS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the domain containers feature </s>
|
funcom_train/40020447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void determinePreferredConstructor_Typical ( ) {
TestingClass tc = new TestingClass ( );
TestingMethod defaultConstructor = new TestingMethod ( );
defaultConstructor.setConstructor(true);
tc.addMethod(defaultConstructor);
TestingMethod parameterizedConstructor = createEatMeatMethod();
parameterizedConstructor.setConstructor(true);
tc.addMethod(parameterizedConstructor);
IMethod actual = determinePreferredConstructor ( tc );
assertEquals(defaultConstructor, actual);
}
COM: <s> tests the i determine preferred constructor i method with </s>
|
funcom_train/6203384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Pattern compilePattern(String pattern) {
Pattern testFlags = Pattern.compile(pattern);
if ((testFlags.flags() & Pattern.CASE_INSENSITIVE) == Pattern.CASE_INSENSITIVE)
return Pattern.compile(pattern, Pattern.UNICODE_CASE | Pattern.DOTALL);
else
return Pattern.compile(pattern, Pattern.DOTALL);
}
COM: <s> compiles the pattern and avoids two bugs </s>
|
funcom_train/1797277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShowdeleted(Boolean showdeleted) {
// check if setting to existing value
if (this.showdeleted == null ? showdeleted != null :
!this.showdeleted.equals(showdeleted)) {
// set to new value for customer parameter
this.showdeleted = showdeleted;
setStringCustomParameter("showdeleted",
showdeleted == null ? null : showdeleted.toString());
}
}
COM: <s> sets the showdeleted </s>
|
funcom_train/25622597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCentralDirectoryExtra(byte[] b) {
try {
ZipExtraField[] central = ExtraFieldUtils.parse(b, false);
mergeExtraFields(central, false);
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
COM: <s> sets the central directory part of extra fields </s>
|
funcom_train/46768459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getHeight() {
if(bounds instanceof Box) {
Box b = (Box)bounds;
return b.getSize().getY();
} else if(bounds instanceof Circle) {
Circle c = (Circle)bounds;
return c.getRadius() * 2;
} else if(bounds instanceof Line) {
Line l = (Line)bounds;
return Math.abs(l.getY2() - l.getY1());
}
return bounds.getBounds().getHeight();
}
COM: <s> returns the height of this actors bounding box </s>
|
funcom_train/19416360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Action createAction(int type, int actor, int target) {
Action action = createObject();
action.set(type, actor, target, (byte)0, (byte)0, (byte)0);
System.err.println("ActionFactory.createAction(): size = "
+ getStockCount());
return action;
}
COM: <s> creates a new default action with the specified arguments </s>
|
funcom_train/29397369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FieldRef getFieldRef(long token) {
long type = (token >> 24) & 0xFFL;
long tokrow = (token & 0xFFFFFFL);
if (type == TableConstants.Field) {
return fields[(int) getField(tokrow) - 1];
} else if (type == TableConstants.MemberRef) {
return (FieldRef) memberRefs[(int) tokrow - 1];
}
return null;
}
COM: <s> returns the field ref corresponding to the given token </s>
|
funcom_train/10344437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLength() {
int total = 0;
Iterator it = notes.iterator();
while (it.hasNext()) total += ((Note)(it.next())).getLength();
// No overlapping note or even too short
if (total<=16*n) return length;
// Subtract all overlapping notes
return length+(total-16*n);
}
COM: <s> returns the length of this nplet including the last note which may be </s>
|
funcom_train/13186290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillBackground(Graphics2D g2, Rectangle2D area) {
if (this.backgroundPaint != null) {
Composite originalComposite = g2.getComposite();
g2.setComposite(
AlphaComposite.getInstance(
AlphaComposite.SRC_OVER, this.backgroundAlpha
)
);
g2.setPaint(this.backgroundPaint);
g2.fill(area);
g2.setComposite(originalComposite);
}
}
COM: <s> fills the specified area with the background paint </s>
|
funcom_train/42637435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateTableRowHeight(int rowIndex, JTable table, boolean treatNullsAsValues){
int m = table.getColumnCount();
int height = 0;
for (int j = 0; j < m; j++)
height = getTableRowHeight(height, table.getValueAt(rowIndex, j), treatNullsAsValues);
table.setRowHeight(rowIndex, height);
}
COM: <s> call this method only after filling table row with data </s>
|
funcom_train/3557055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveLastSelectedConfigName(String configFile) throws FileNotFoundException, IOException {
Properties properties = new Properties();
properties.put("filename", configFile);
FileOutputStream fileOutputStream = new FileOutputStream(new File("config"));
properties.store(fileOutputStream, "");
}
COM: <s> saves the full filename to the last choosen file with connection configuration </s>
|
funcom_train/22347743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isVerbose(String what) {
// When at least 3 characters & match
if ((what.length() > 2) &&
(what.substring(0,3).equalsIgnoreCase(TyMsg.getText(56)))) {
// is a not printing
return true;
} // endif
// not a not printing
return false;
} // end-method
COM: <s> look for a verbose argument </s>
|
funcom_train/19845148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dropYearTable() {
try {
String sqlCmd = "DROP TABLE tbl_YEAR";
stmt = conn.createStatement();
stmt.execute(sqlCmd);
stmt.close();
}
catch (Exception e) {
logger.log(Level.SEVERE, e.toString());
}
}
COM: <s> drops the tbl year table </s>
|
funcom_train/37075632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransactions(java.util.List list) {
// Use the List in this Class instead of from other place
unflattenedTransactions.clear();
//flattenedTransactions.clear();
flattenedTransactions = null;
// actually compound trans cant be saved & loaded yet(no need), so in fact
// these unflattened are flat (should disable undo for them!)
if (list != null)
unflattenedTransactions.addAll(list);
}
COM: <s> set a list of transactions for this transaction manager </s>
|
funcom_train/19323031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCurrentTime() {
Date date = new Date();
long timestamp = date.getTime();
jmsTimestamp4.setCurrentTime(timestamp);
try {
assertEquals(timestamp, jmsTimestamp4.getCurrentTime());
} catch (JMSException e) {
e.printStackTrace();
}
}
COM: <s> test for set current time long timestamp </s>
|
funcom_train/45450714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder result = new StringBuilder("Password(");
result.append("salt=").append(salt).append(",");
result.append("lastChanged=").append(lastChanged);
result.append(")");
return result.toString();
}
COM: <s> returns the printable description of this password </s>
|
funcom_train/50045079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getHeight() {
int sampleCount = allSamples.size();
if (getDisplayMode() == Track.DisplayMode.COLLAPSED || sampleCount == 0) {
return variantBandHeight;
} else {
final int groupCount = samplesByGroups.size();
int margins = groupCount * 3;
return variantBandHeight + margins + (sampleCount * getGenotypeBandHeight());
}
}
COM: <s> returns the total height of the track including all sample genotypes </s>
|
funcom_train/7929119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String stem( String term ) {
if ( !isStemmable( term ) ) {
return term;
}
// Use lowercase for medium stemming.
term = term.toLowerCase();
// Reset the StringBuffer.
sb.delete( 0, sb.length() );
sb.insert( 0, term );
// reset the booleans
modified = false;
suite = false;
sb = treatVowels( sb );
setStrings();
step1();
if (!modified || suite)
{
if (RV != null)
{
suite = step2a();
if (!suite)
step2b();
}
}
if (modified || suite)
step3();
else
step4();
step5();
step6();
return sb.toString();
}
COM: <s> stemms the given term to a unique tt discriminator tt </s>
|
funcom_train/16176394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawHollowRoundRect(Color c) {
drawInit(c);
if (roundRect == null) {
roundRect = new RoundRectangle2D.Float(curX, curY, curWidth,
curHeight, 3, 3);
}
roundRect.setFrame(curX, curY, curWidth, curHeight);
g2.draw(roundRect);
}
COM: <s> draws a hollow rounded rectangle of the specified color </s>
|
funcom_train/21297252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initProgram() {
// Tool.setStatusString("Initializing...");
// get plugin list.
ArrayList al = LinkFileManager.getPluginList(Constant.strPluginPath, centerPanelBean1
.isjcbReGenerateLinkFileSelected());
centerPanelBean1.setPluginListCheckBoxPanel(al);
// Tool.setStatusString("Loading Plugin Suit");
centerPanelBean1.loadPluginSuit();
// Tool.setStatusString("Initializing...done.");
}
COM: <s> initial the programme </s>
|
funcom_train/40477974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WebGLShader getShader(int type, String source) {
WebGLShader shader = glContext.createShader(type);
glContext.shaderSource(shader, source);
glContext.compileShader(shader);
// check if the Shader is successfully compiled
if (!glContext.getShaderParameterb(shader,
WebGLRenderingContext.COMPILE_STATUS)) {
throw new RuntimeException(glContext.getShaderInfoLog(shader));
}
return shader;
}
COM: <s> creates an shader instance defined by the shader type and the source </s>
|
funcom_train/878499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object peek(String stackName) {
Object result = null;
ArrayStack namedStack = (ArrayStack) stacksByName.get(stackName);
if (namedStack == null ) {
if (log.isDebugEnabled()) {
log.debug("Stack '" + stackName + "' is empty");
}
throw new EmptyStackException();
} else {
result = namedStack.peek();
}
return result;
}
COM: <s> p gets the top object from the stack with the given name </s>
|
funcom_train/18392815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getCheckSumFromSlave() {
try {
for (Iterator iter = getAvailableSlaves().iterator(); iter
.hasNext();) {
RemoteSlave slave = (RemoteSlave) iter.next();
String index = null;
try {
index = slave.issueChecksumToSlave(getPath());
_checkSum = slave.fetchChecksumFromIndex(index);
} catch (RemoteIOException e2) {
continue;
} catch (SlaveUnavailableException e2) {
continue;
}
return _checkSum;
}
} catch (NoAvailableSlaveException e) {
return 0;
}
return 0;
}
COM: <s> returns 0 if the checksum cannot be read </s>
|
funcom_train/27675631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReturnLastArg() {
final Engine engine = new Engine( new ApiConf() );
FunctionCall fc = engine.newFunctionCall( new ReturnLastArgFunction() );
fc.addArg( "hello" );
fc.addArg( "there" );
final Object result = fc.invoke1();
assertTrue( result instanceof String );
assertEquals( "there", result );
}
COM: <s> executes code return last arg function code checking if function </s>
|
funcom_train/29903444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IMethod findOverriddenMethodInType(IType overriddenType, IMethod overriding) throws JavaModelException {
IMethod[] overriddenMethods= overriddenType.getMethods();
for (int i= 0; i < overriddenMethods.length; i++) {
if (isSubsignature(overriding, overriddenMethods[i])) {
return overriddenMethods[i];
}
}
return null;
}
COM: <s> finds an overridden method in a type </s>
|
funcom_train/12313262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Composite createContents(Composite parent) {
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
IHelpUIConstants.PREF_PAGE_HELP_CONTENT);
Font font = parent.getFont();
Composite top = new Composite(parent, SWT.NONE);
top.setFont(font);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
layout.marginHeight = 2;
layout.marginWidth = 2;
top.setLayout(layout);
top.setLayoutData(new GridData(GridData.FILL_BOTH));
fHelpContentBlock.setContainer(this);
fHelpContentBlock.createContents(top);
return top;
}
COM: <s> this create the page controls </s>
|
funcom_train/1294852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(BPELResource resource, Document doc) {
this.fResource = resource;
// Pass 1 and 2 are inside the try so they don't occur if
// an error happens during parsing.
// In pass 1 we parse and create the structural elements and attributes.
pass1(doc);
// In pass 2, we run any postLoadRunnables which need to happen after
// pass 1 (for example, establishing object links to variables).
pass2();
}
COM: <s> read from the given document into the given resource </s>
|
funcom_train/24135729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void login() {
String nick = _nickLabel.getText();
String channel = _channelChoice.getSelectedItem();
if (nick == null || nick.trim().length() == 0) {
// TODO: Error dialog
return;
}
_applet.login(nick,channel);
}
COM: <s> attempt to login </s>
|
funcom_train/3118667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanUp() {
for (Iterator i = pageViewsToMerge.keySet().iterator(); i.hasNext(); ) {
final PageView aPageView = (PageView)i.next();
aPageView.getContents().setPaint(
(Paint)pageViewsToMerge.get(aPageView));
}
}
COM: <s> clean up anything that the handler left behind before it is disabled </s>
|
funcom_train/13980520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean alegro (ChessColor side) {
if (state != SCondition.AT_PROCESS) return false;
long newTime = System.currentTimeMillis();
long dtime = newTime - timeStamp;
timeStamp = newTime;
if (side == ChessColor.C_WHITE) {
if (params.getWhiteTime().alegro(dtime) == TimeControl.HERE_IS_NO_TIME)
return true;
} else {
if (params.getBlackTime().alegro(dtime) == TimeControl.HERE_IS_NO_TIME)
return true;
}
return false;
}
COM: <s> alegro on move </s>
|
funcom_train/44107844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int authenticate(String username, String password) {
UserInfo ui = (UserInfo)(hashUserDatabase.get(username));
if (ui == null) {
ServerConsoleServlet.printSystemLog("username not found.", ServerConsoleServlet.LOG_ERROR);
return -1;
}
if (ui.getPassword().equals(password)) {
if (ui.isAdmin()) return 1;
return 0;
}
return -1;
}
COM: <s> this function is used for authentication process </s>
|
funcom_train/7677700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDefaultCalendarUrl(String username, String projection, QueryParams params) {
String feedUrl = CALENDAR_BASE_FEED_URL + getGDataClient().encodeUri(username);
feedUrl += projection;
if (params == null) {
return feedUrl;
}
return params.generateQueryUrl(feedUrl);
}
COM: <s> returns the url for the default feed for a user after applying the </s>
|
funcom_train/41721347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Intervention peek(int i) {
if (i < 1)
throw new IndexOutOfBoundsException("Index " + i + " is lower than 1");
if (i > this.interventionList.size())
throw new IndexOutOfBoundsException("Index " + i + " is greater than stack size: " + this.interventionList.size());
return interventionList.getFirst();
}
COM: <s> returns the intervention at position i of the stack 1 being the top </s>
|
funcom_train/16912059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeSynapseTypes() {
Object selected = cbSynapseType.getSelectedItem();
if (selected != NULL_STRING) {
String name = ((ClassDescriptionPair)selected).getSimpleName();
for (int i = 0; i < synapseList.size(); i++) {
synapseList.get(i).setLearningRule(name);
}
}
}
COM: <s> change all the synapses from their current type to the new specified in </s>
|
funcom_train/42474066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String parseReqTerms(String qReq, String andField, boolean greedy){
StringBuilder sb = new StringBuilder();
for (String word: qReq.split("\\s+")){
if (sb.length() > 0) sb.append(' ');
if(greedy)
sb.append('+');
if (!StringUtil.isNullOrEmpty(andField)){
sb.append(andField).append(":");
}
sb.append(escapeLuceneSpecialChars(word));
}
return sb.toString();
}
COM: <s> parses a user query as lucene required terms </s>
|
funcom_train/32970522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPermissionsForGroups(Collection groups) {
return persistence.createQuery(
"FROM Permission p WHERE p.id.group in (:groups) ORDER BY p.id.categ.id")
.setParameterList("groups", groups, Hibernate.entity(Groupx.class))
.list();
}
COM: <s> ordered by category id </s>
|
funcom_train/28123498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPropertyItem(PropertyItem item) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException {
pItem = item;
setBean(pItem.getPropertyValue(), pItem.getPropertyType());
setReadOnly(pItem.isReadOnly() || !pItem.isWriteable());
}
COM: <s> set property item to base this window on </s>
|
funcom_train/41568234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertMetaClass(EClass metaClass, String metaClassName) {
if (metaClass == null) {
throw new IllegalStateException(MessageFormat.format(
"Can't find class {0} in the package {1}", new Object[] {
metaClassName, this.ePackage.getName() }));
}
}
COM: <s> default implementation throws illegal state exception if metaclass is null </s>
|
funcom_train/20978815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyTheme() {
try {
if (USE_THEME_SYSTEM) {
UIManager.setLookAndFeel(new SkinLookAndFeel());
SwingUtilities.updateComponentTreeUI(this);
}
} catch (Exception e1) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e2) {
// if this happens, averything is im arsch
}
}
}
COM: <s> applies the theme to all swing ui components </s>
|
funcom_train/8088573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String result = "";
result += "{";
for (int i=0; i < m_Events.length; i++) {
result += m_Events[i];
if (i+1 < m_Events.length) {
result += ",";
}
}
result += "}";
return result;
}
COM: <s> returns a string representation of an element </s>
|
funcom_train/4659669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String findParentFormId() {
String formId = null;
Tag parent = this;
while (((parent = parent.getParent()) != null) && (formId == null)) {
if (FormTag.class.isAssignableFrom(parent.getClass())) {
formId = ((FormTag) parent).getId();
}
}
return formId;
}
COM: <s> lookup the form that contains this submit button </s>
|
funcom_train/1149520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand17() {
if (okCommand17 == null) {//GEN-END:|236-getter|0|236-preInit
// write pre-init user code here
okCommand17 = new Command("Ok", Command.OK, 0);//GEN-LINE:|236-getter|1|236-postInit
// write post-init user code here
}//GEN-BEGIN:|236-getter|2|
return okCommand17;
}
COM: <s> returns an initiliazed instance of ok command17 component </s>
|
funcom_train/22791353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isDayOff(YearMonthDay aDay) {
final List<WorkDay> days = WorkSpace.P_DAYS.getList(applContext.getWorkSpace());
for(WorkDay day : days) {
if (WorkDay.P_DATE.equals(day, aDay)) {
final boolean result = day.get(WorkDay.P_DAYOFF);
return result;
}
}
return false;
}
COM: <s> is the day a day off </s>
|
funcom_train/18297431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doWizardDialog() {
// check with user if they wish to use the basic or advanced wizard
d = new WizardChoiceDialog(f);
if (bGenerateDrillCancelled == false) { // wizard choice dialog was not cancelled
if (bUseBasicWizard) { // run basic wizard
// log info
logger.info("Basic Wizard will be used.");
d = new BasicWizardDialog(f);
}
else { // run advanced wizard
// log info
logger.info("Advanced Wizard will be used.");
d = new AdvancedWizardDialog(f);
}
}
}
COM: <s> runs the appropriate wizard dialog </s>
|
funcom_train/4598550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String input() throws Exception {
if (isCreating()) {
createInputUser();
setTask(Constants.CREATE);
} else {
setTask(Constants.EDIT);
setUsername(getUser().getUsername());
setPassword(getUser().getPassword());
setPassword2(getUser().getPassword());
}
return INPUT;
}
COM: <s> p retrieve user object to edit or null if user does not exist </s>
|
funcom_train/19838033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int min() {
if (size() == 0) {
throw new IllegalStateException("cannot find minimum get an empty list");
}
int min = Integer.MAX_VALUE;
for (int i = 0; i < pos; i++) {
if (data[i] < min) {
min = data[i];
}
}
return min;
}
COM: <s> finds the minimum value in the list </s>
|
funcom_train/24088093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getAverageVirtualMemory() {
double sum = 0;
for (ExecutionFootprint fp : list) {
sum += fp.getVirtualMemory();
}
if (list.size()<=0) {
return 0.0;
}
BigDecimal d = new BigDecimal(sum/list.size());
return (d.setScale(2, BigDecimal.ROUND_UP)).doubleValue();
}
COM: <s> calculates the average usage of virtual memory b the task </s>
|
funcom_train/41171410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateProfile() {
mo = (lambdaMass * getAmpliconSize()) / 48502;//Mo for lambda gDNA
setOCF(getAvFo() / mo);
setAdjustedOCF(getAdjustedAvFo() / mo);
setNo(((getAvFo() / getOCF()) * 910000000000d) / getAmpliconSize());
}
COM: <s> calculates the optical calibration factor ocf </s>
|
funcom_train/10958155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void convertQueryParamsToRenderParams(String queryParams) {
StringTokenizer tok = new StringTokenizer(queryParams, "&");
while (tok.hasMoreTokens()) {
String token = tok.nextToken();
String key = token.substring(0, token.indexOf('='));
String value = token.substring(token.indexOf('=') + 1);
resultHelper.setRenderParameter(PortletActionContext.getResponse(), key, value);
}
}
COM: <s> converts the query params to render params </s>
|
funcom_train/19777360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File createScriptFile(String script) {
try {
File file = File.createTempFile("script", ".sh");
FileOutputStream fos = new FileOutputStream(file);
fos.write(enhanceScript(script).getBytes());
fos.close();
return file;
} catch (IOException e) {
throw new RuntimeException(e);
}
}
COM: <s> create a temporary file containing the enhanced script </s>
|
funcom_train/2920428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRuleMemoization(int ruleIndex, int ruleStartIndex) {
if ( ruleMemo[ruleIndex]==null ) {
ruleMemo[ruleIndex] = new HashMap();
}
Integer stopIndexI =
(Integer)ruleMemo[ruleIndex].get(new Integer(ruleStartIndex));
if ( stopIndexI==null ) {
return MEMO_RULE_UNKNOWN;
}
return stopIndexI.intValue();
}
COM: <s> given a rule number and a start token index number return </s>
|
funcom_train/12674584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCompatibleWith(ISignature signature) {
boolean result = true;
if (_parameters.length == signature.getParameters().length) {
for (int i = 0; i < _parameters.length; i++) {
if (!getParameters()[i].isCompatibleWith(signature.getParameters()[i])) {
result = false;
break;
}
}
}
else {
result = false;
}
return result;
}
COM: <s> whether this method signature is compatible with the signature of the </s>
|
funcom_train/37454512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writePubmedLine(String pubmedIds) throws IOException {
if (pubmedIds == null) {
System.out.println("ERROR: No PubMed ID found in that set of experiments. ");
return;
}
writer.write("PMID:");
writer.write(pubmedIds);
writer.write(WriterUtils.TABULATION);
}
COM: <s> write a pubmed id </s>
|
funcom_train/22404399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getActiveSelection(String text) {
selectEnd = box.getCursorPos();
// Find the last instance of a separator.
selectStart = -1;
for (int i = 0; i < separators.length; i++) {
selectStart = Math.max(
text.lastIndexOf(separators[i], selectEnd - 1), selectStart);
}
++selectStart;
return text.substring(selectStart, selectEnd).trim();
}
COM: <s> in the presence of separators returns the active search selection </s>
|
funcom_train/22210101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _addFirstRow() {
constraints.gridy = currow++;
constraints.gridx = 0;
constraints.weightx = 0.0;
constraints.fill = GridBagConstraints.NONE;
constraints.anchor = GridBagConstraints.NORTHWEST;
add(cLeft,constraints);
constraints.gridx = 1;
constraints.weightx = 1.0;
add(cRight, constraints);
}
COM: <s> adds an invisible spacer row that </s>
|
funcom_train/12546854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document toDOM(java.io.Serializable structure) {
Grammar grammar = (Grammar) structure;
Document doc = newEmptyDocument();
Element se = doc.getDocumentElement();
// Add the productions as subelements of the structure element.
Production[] productions = grammar.getProductions();
if (productions.length > 0)
se.appendChild(createComment(doc, COMMENT_PRODUCTIONS));
for (int i = 0; i < productions.length; i++)
se.appendChild(createProductionElement(doc, productions[i]));
// Return the completed document.
return doc;
}
COM: <s> given a jflap grammar this will return the corresponding dom encoding of </s>
|
funcom_train/46575637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startCOMBO(NamedNodeMap nnm) throws AppToyException {
Combo cmb = new Combo((Composite) ctx.parent,SWT.BORDER|SWT.V_SCROLL|SWT.READ_ONLY);
ctx.control = cmb;
processEventAttributes(ctx.node.getAttributes(), "http://apptoy.sf.net/events");
String id = getAttribute(nnm, "id", null);
if (id != null) {
presenter.addControl(id, new ACombo(cmb));
}
processControlAttributes((Control)ctx.control,nnm);
}
COM: <s> creates a combo control </s>
|
funcom_train/40808117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void DeleteDataset(String datasetName) throws IOException {
if (!ForecastingApiValidators.IsValidApiName(datasetName)) {
throw new IllegalArgumentException(String.format("%s is not a valid dataset name.", datasetName));
}
String errorCode = _forecastingApi.DeleteDataset(_identity, datasetName);
WrapAndThrow(errorCode);
}
COM: <s> deletes the dataset specified as arguments from the lokad account </s>
|
funcom_train/5016264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Column getColumn(String _columnName) {
Iterator<Column> iter = columns.iterator();
while (iter.hasNext()) {
Column column = iter.next();
// column names are typically case insensitive
if (column.getName().equalsIgnoreCase(_columnName)) {
return column;
}
}
return null;
}
COM: <s> get constraint column specified by column name </s>
|
funcom_train/20537830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeBooleanCell(int col, int row, WritableSheet sheet, boolean b) throws WriteException {
jxl.write.Boolean bool = new Boolean(col, row, b);
sheet.addCell(bool);
updateColumnTextLength(col, b ? "TRUE" : "FALSE");
}
COM: <s> writes a boolean value into a cell of the spreadsheet </s>
|
funcom_train/8081608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNominalIndicesArr(int [] values) {
String rangeList = "";
for(int i = 0; i < values.length; i++) {
if (i == 0) {
rangeList = "" + (values[i] + 1);
} else {
rangeList += "," + (values[i] + 1);
}
}
setNominalIndices(rangeList);
}
COM: <s> set which values of a nominal attribute are to be used for </s>
|
funcom_train/42771648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStartTime(long timeInMillis) {
synchronized (lock) {
if (updater != null) {
//cancel pending redraws.
updater.counting = false;
}
updater = new TimeUpdateRunnable();
updater.counting = true;
startTime = timeInMillis;
//so that the redrawer knows that it is counting.
endTime = -1;
if (getShell() != null) {
getShell().getDisplay().asyncExec(updater);
}
}
}
COM: <s> sets the start time of this dialog to the given time </s>
|
funcom_train/12908427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProgram(final String name, final String version, final String citation) {
final NodeList nl = dom.getElementsByTagNameNS(NAMESPACE,"program");
Element program;
if(nl.getLength() == 1) {
program = (Element)nl.item(0);
program.setAttributeNS(null,"name", name);
program.setAttributeNS(null,"version", version);
program.setAttributeNS(null,"citation", citation);
} else {
return;
}
}
COM: <s> set information about the program associated with this application result </s>
|
funcom_train/24185598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void combineVRPAndSum() {
for(int i = 0; i < this.nbrVRPvariables; i++) {
currentSolution[variablePointer.get(vehicleRoutingVariables[i])] = vrpAssignment[i];
}
for(int i = 0; i < this.nbrSumVariables; i++) {
currentSolution[variablePointer.get(sumVariables[i])] = sumAssignment[i];
}
}
COM: <s> method to combine the nand assignment and the </s>
|
funcom_train/47678082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field getSibling(String p_name) {
if ((p_name == null) || p_name.isEmpty()) {
throw new IllegalArgumentException("The parameter \"sibling name\" is missing.");
}
// get the requested sibling
return getParent().getChild(p_name);
}
COM: <s> provides a sibling field of the current one </s>
|
funcom_train/37609548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean foundStreet(String stnm) {
if (NNAME.contains(stnm)) return true;
if (SNAME.contains(stnm)) return true;
if (ENAME.contains(stnm)) return true;
if (WNAME.contains(stnm)) return true;
if (NWNAME.contains(stnm)) return true;
if (NENAME.contains(stnm)) return true;
if (SWNAME.contains(stnm)) return true;
if (SENAME.contains(stnm)) return true;
return false;
} // end foundStreet External()
COM: <s> true if one street name contains another filleted street name </s>
|
funcom_train/33447977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prepareBackup() {
final File backupFile = getBackupFile();
List<File> backupFiles = fLayoutStrategy.findBackupFiles();
deleteOldBackups(backupFiles);
if (!backupFiles.isEmpty())
fLayoutStrategy.rotateBackups(backupFiles);
Assert.isLegal(!backupFile.exists(), "backupFile should have been rotated or deleted: " + backupFile);
}
COM: <s> deletes old backups and rotates the existing ones as appropriate </s>
|
funcom_train/2537331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateDefaultStrokeColorBuffer(StyleInfo styleInfo){
this.setStrokeColorBuffer(ToolsBuffers.generateStrokeColorBuffer(this.getVertices().length, styleInfo.getStrokeRed(), styleInfo.getStrokeGreen(), styleInfo.getStrokeBlue(), styleInfo.getStrokeAlpha()));
}
COM: <s> generate default stroke color buffer </s>
|
funcom_train/26365512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDivisionType(String strName) {
if (strName != null) {
//PENDIONG: Do not allow '_' in division types
if (strName.indexOf("_") != -1) {
throw new RuntimeException("Attempt to use '_' in a division type.\nThis error need not be a runtime exception - Division.see setDivisionType");
}
}
strDivisionType = strName;
}
COM: <s> set the division type </s>
|
funcom_train/32776542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HashMap getAttributeDistribution(ComparableAttribute attr) {
HashMap map = new HashMap(this.attributes.size());
for (Iterator i = this.attributes.keySet().iterator(); i.hasNext();) {
Point p = (Point) i.next();
Vector v = (Vector) this.attributes.get(p);
int index = v.indexOf(attr);
if (index >= 0) {
map.put(getPosition(p), (ComparableAttribute) v.get(index));
}
}
return map;
}
COM: <s> returns the spatial distribution of the specified attribute as a hashmap </s>
|
funcom_train/26254182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Expression evaluateUp(MethodCall p) throws ParseTreeException {
{
OJClass reftype =
computeRefType(p.getReferenceType(), p.getReferenceExpr());
if (reftype != getSelfType()) {
Expression newp = reftype.expandMethodCall(getEnvironment(), p);
if (newp != p)
return newp;
}
}
{
OJClass type = getType(p);
Expression newp = type.expandExpression(getEnvironment(), p);
if (!(newp instanceof MethodCall))
return newp;
p = (MethodCall) newp;
}
return super.evaluateUp(p);
}
COM: <s> includes expand method call and expand expression </s>
|
funcom_train/47162881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createTopMostSurrogateConstructor(MethodGenerator mg) {
//generate surrogate constructor that just calls constructor
//of the parent non-adapter class
mg.dup();
//TODO: We can only subclass non-adapter types with a no-argument constructor
mg.invokeConstructor(superType, new Constructor(new Type[0]));
}
COM: <s> creates with given message generator the surrogate constructor of </s>
|
funcom_train/18287932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateWtkObfuscateElement(Element wktobfuscateElement) {
String[] keepExpressions =
PreferenceAccessor.instance.getProguardKeepExpressions(midletSuite.getProject());
for (int i = 0; i < keepExpressions.length; i++) {
StringBuffer sb = new StringBuffer("'-keep ");
sb.append(keepExpressions[i]).append("'");
addWtkObfuscateArgument(wktobfuscateElement, sb.toString());
}
addWtkObfuscateArgument(wktobfuscateElement, getProguardOptions());
}
COM: <s> update the wtk obfuscate element to include the parameters </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.