__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/46224101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ASTNode createAST(IProgressMonitor monitor) {
ASTNode result = null;
if (monitor != null) monitor.beginTask("", 1); //$NON-NLS-1$
try {
if (this.rawSource == null && this.typeRoot == null) {
throw new IllegalStateException("source not specified"); //$NON-NLS-1$
}
result = internalCreateAST(monitor);
} finally {
// reset to defaults to allow reuse (and avoid leaking)
initializeDefaults();
if (monitor != null) monitor.done();
}
return result;
}
COM: <s> creates an abstract syntax tree </s>
|
funcom_train/8305982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ReflectionToStringBuilder setExcludeFieldNames(String[] excludeFieldNamesParam) {
if (excludeFieldNamesParam == null) {
this.excludeFieldNames = null;
} else {
this.excludeFieldNames = toNoNullStringArray(excludeFieldNamesParam);
Arrays.sort(this.excludeFieldNames);
}
return this;
}
COM: <s> sets the field names to exclude </s>
|
funcom_train/10510917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resolveProcessor(String proc) throws Exception {
if (proc.equals(PROCESSOR_TRAX)) {
liaison = new org.apache.tools.ant.taskdefs.optional.TraXLiaison();
} else {
//anything else is a classname
Class clazz = loadClass(proc);
liaison = (XSLTLiaison) clazz.newInstance();
}
}
COM: <s> load processor here instead of in set processor this will be </s>
|
funcom_train/31649993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUserListName( int index ) {
if ( index > userList.size() ) {
return "";
} else {
User u = (User)userList.get(index);
if ( u.getUserName() == null ) {
return "";
} else {
return u.getUserName();
}
}
} // getUserListName()
COM: <s> get username for index th user in user list </s>
|
funcom_train/31940962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent(Graphics g) {
int width = this.getWidth();
int height = this.getHeight();
GradientPaint paint =
new GradientPaint(0, 0, color1, width, height, color2, true);
Graphics2D g2d = (Graphics2D) g;
Paint oldPaint = g2d.getPaint();
g2d.setPaint(paint);
g2d.fillRect(0, 0, width, height);
g2d.setPaint(oldPaint);
}
COM: <s> paint the colored background </s>
|
funcom_train/5245980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean believesUnSplitGoal(Goal g) {
ArrayList<Goal> gls = splitgoals(g);
// Guard gu = new Guard();
// for (Goal g1: gls) {
// gu.add(new GBelief(GBelief.AILBel, g1.getLiteral()));
//}
//return believesyn(gu, new Unifier());
return gls.isEmpty();
}
COM: <s> some goals are conjunctions we split into conjuncts to determine </s>
|
funcom_train/43448432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateLowerScoringSequence(double upperBoundOfScore) throws IllegalSymbolException, InvalidStructureException, InvalidViterbiPathException{
double actualScore;
String sequence;
do{
sequence = generateSequence();
ForwardAlgorithm fwd = new ForwardAlgorithm(hmm, sequence);
fwd.calculateForward();
actualScore = fwd.getScore();
System.out.println(actualScore);
}while(actualScore >= upperBoundOfScore);
return sequence;
}
COM: <s> generates a sequence that has ascore lower than the specified bound </s>
|
funcom_train/44154479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
s_logger.debug("Treating bean with name:" + beanName);
if (GenericDao.class.isAssignableFrom(bean.getClass())) {
s_logger.debug("init dao with name:" + beanName);
initDao((GenericDao<?>) bean);
}
return bean;
}
COM: <s> initiates the real work </s>
|
funcom_train/11741898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int runUpdate(DataNode node, String sql) throws SQLException {
adapter.getJdbcEventLogger().logQuery(sql, Collections.EMPTY_LIST);
Connection con = node.getDataSource().getConnection();
try {
Statement upd = con.createStatement();
try {
return upd.executeUpdate(sql);
}
finally {
upd.close();
}
}
finally {
con.close();
}
}
COM: <s> runs jdbc update over a connection obtained from data node </s>
|
funcom_train/12561149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit(String input) {
// keep the first visible line
int oldTopVis = myInfo.topVis;
super.commit(input);
// try to restore the visible region
myInfo.topVis = oldTopVis;
myInfo.isModified = myInfo.scrollY = true;
updateTextInfo();
}
COM: <s> commit the given input to this text input components buffer </s>
|
funcom_train/1383631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JDateChooser getDateAl() {
if (dateAl == null) {
Date date = getTime().getTime();
dateAl = new JDateChooser("dd/MM/yyyy", "##/##/##", '_');
dateAl.setPreferredSize(new Dimension(100, 20));
dateAl.setDate(date);
}
return dateAl;
}
COM: <s> this method initializes date al </s>
|
funcom_train/32055384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean intersects(Graphics g, Rectangle rectangle) {
if(isLeaf()) {
Rectangle rectangle1 = getBounds();
if(rectangle1 != null) {
return rectangle1.intersects(rectangle);
}
} else {
for(Iterator iterator = childViews.iterator(); iterator.hasNext();) {
if(((CellView)iterator.next()).intersects(g, rectangle)) {
return true;
}
}
}
return false;
}
COM: <s> checks if the given graphics and rectangle intersect </s>
|
funcom_train/28756941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRunid(String newVal) {
if ((newVal != null && this.runid != null && (newVal.compareTo(this.runid) == 0)) ||
(newVal == null && this.runid == null && runid_is_initialized)) {
return;
}
this.runid = newVal;
runid_is_modified = true;
runid_is_initialized = true;
}
COM: <s> setter method for runid </s>
|
funcom_train/18886814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lower32At(int index) {
if (index < 0 || index > size()) {
throw new IndexOutOfBoundsException();
}
int pageNum = (index >> exp);
// int offset = index % pageSize;
int offset = index & r;
return (int) ((long[]) bufferArrayList.get(pageNum))[offset];
}
COM: <s> get the lower 32 bit of the integer at the given index </s>
|
funcom_train/16218180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(LineEvent e) {
if (e.getType() == LineEvent.Type.STOP) {
this.status = BaseAudioRenderer.END_OF_SOUND;
this.clip.stop();
this.clip.setMicrosecondPosition(0);
this.clip.removeLineListener(this);
}
}
COM: <s> notified when the sound is stopped externally </s>
|
funcom_train/48052750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OPCAEFilterMask queryAvailableFilters() throws JIException {
JICallBuilder callObject = new JICallBuilder(true);
callObject.setOpnum(2);
callObject.addOutParamAsType(Integer.class, JIFlags.FLAG_NULL);
Object[] result = getCOMObject().call(callObject);
return new OPCAEFilterMask((Integer) result[0]);
}
COM: <s> retrieve available filters </s>
|
funcom_train/41825232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFindBugsThresholdLimit(String findBugsThresholdLimit) {
Element reporters = getChild(root,"reporters");
Element parent = getChild(reporters,"hudson.plugins.findbugs.FindBugsReporter");
getChild(parent,"thresholdLimit").setText(findBugsThresholdLimit);
}
COM: <s> sets the find bugs threshold limit </s>
|
funcom_train/45544003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getIndentation() {
int start= getStart();
IDocument document= getDocument();
try {
IRegion region= document.getLineInformationOfOffset(start);
String lineContent= document.get(region.getOffset(), region.getLength());
IJSCProject project= getJSCProject();
return Strings.computeIndentUnits(lineContent, project);
} catch (BadLocationException e) {
return 0;
}
}
COM: <s> returns the indentation level at the position of code completion </s>
|
funcom_train/5587922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processCommands(Roles roles) {
ParentRoot targetRoot = (ParentRoot) targetElement.getApplication();
ParentRoot user = getUserHome();
TreeMap<String, Application> operations = roles.getCommands(source,
contextMap, targetRoot, user);
Iterator<String> it = operations.keySet().iterator();
while (it.hasNext()) {
String operationName = it.next();
Operation operation = operations.get(operationName);
Element e = operation.getElement();
addMenuItem(operationName, e);
}
}
COM: <s> create the menu items for the commands in roles </s>
|
funcom_train/20834346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSystemProperties() {
Properties systemP = System.getProperties();
Enumeration e = systemP.propertyNames();
while (e.hasMoreElements()) {
String propertyName = (String) e.nextElement();
String value = systemP.getProperty(propertyName);
this.setPropertyInternal(propertyName, value);
}
}
COM: <s> add all system properties which arent already defined as </s>
|
funcom_train/33859748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getResultsMainPane() {
if (resultsMainPane == null) {
resultsMainPane = new JTabbedPane();
resultsMainPane.addTab("Algorithm Steps Results", null, getAlgorithmStepsResultsSplitPane(), null);
resultsMainPane.addTab("log", null, getLogPanel(), null);
}
return resultsMainPane;
}
COM: <s> this method initializes results main pane </s>
|
funcom_train/32355339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPrjMetadata(HashMap<String, String> metadata) {
project.setName(metadata.get(ProjectConstants.NAME));
project.setItemName(metadata.get(ProjectConstants.ITEM_NAME));
project.setId(Long.valueOf(metadata.get(ProjectConstants.PRJID)));
project.setDescription(metadata.get(ProjectConstants.DESCRIPTION));
project.setStorage(metadata.get(ProjectConstants.STORAGE));
project.setStatus(metadata.get(ProjectConstants.STATUS));
}
COM: <s> updates the project meta data with values transmitted as parameter </s>
|
funcom_train/41517190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append(super.toString());
if (constraint != null) {
buffer.append(" (");
buffer.append(constraint.toString());
buffer.append(")");
}
return buffer.toString();
}
COM: <s> returns a string representation of this type </s>
|
funcom_train/8497627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getRDFOutputFile(int documentId) throws IOException {
Document doc = documentDao.getById(documentId);
String filePath = doc.getFilePath();
File directory = new File(filePath);
if(!directory.exists()){
FileUtils.forceMkdir(directory);
}
//store the raw file
File file = new File(directory.getAbsolutePath()+File.separator+FileType.RDF);
if(file.exists()){
FileUtils.forceDelete(file);
}
file.createNewFile();
return file;
}
COM: <s> get the rdf output file for this document </s>
|
funcom_train/14034903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
vbo.destroy();
if (communities != null) {
for (VBOTreeNode community : communities) {
community.destroy();
}
communities = null;
}
if (collections != null) {
for (VBOTreeNode collection : collections) {
collection.destroy();
}
collections = null;
}
if (bundles != null) {
for (VBOTreeNode bundle : bundles) {
bundle.destroy();
}
bundles = null;
}
if (items != null) {
for (VBOTreeNode item : items) {
item.destroy();
}
items = null;
}
}
COM: <s> destroy everything in the tree from this node down </s>
|
funcom_train/40014676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
Dimension size = getSize();
int y = size.height / 2;
g.setColor(SystemColor.control);
g.drawLine(0, y, size.width, y);
g.setColor(SystemColor.controlShadow);
g.drawLine(0, y + 1, size.width, y + 1);
}
COM: <s> paints the separator we assume we are transparent </s>
|
funcom_train/45026244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addError(Test test, Throwable t) {
String method = "";
if (TestCase.class.isInstance(test)) {
method = ((TestCase) test).getName();
}
log.info("[" + test.getClass() + "] method " + method + " error:", t);
}
COM: <s> just let the standard runner do this work do nothing </s>
|
funcom_train/47602505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand() {
if (exitCommand == null) {//GEN-END:|18-getter|0|18-preInit
// write pre-init user code here
exitCommand = new Command("\u0412\u044B\u0445\u043E\u0434", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit
// write post-init user code here
}//GEN-BEGIN:|18-getter|2|
return exitCommand;
}
COM: <s> returns an initiliazed instance of exit command component </s>
|
funcom_train/19315683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FoValue getRawInitialPageNumber(final FObj fobj) {
final PdInitialPageNumber property =
(PdInitialPageNumber) getProperty(
FoProperty.INITIAL_PAGE_NUMBER);
if (property != null) {
return property.getRawValue(fobj);
}
return PdInitialPageNumber.getRawValueNoInstance();
}
COM: <s> returns the raw initial page number property </s>
|
funcom_train/12549368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMinMaxValues(int newMinValue, int newMaxValue) {
Integer oldValue = getValue();
this.minValue = newMinValue;
this.maxValue = newMaxValue;
checkMinAndMaxValues();
this.defaultValue = new Integer(this.minValue);
init();
this.setText(oldValue.toString());
}
COM: <s> sets the min and max values that can be entered by the user </s>
|
funcom_train/46743207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModelScript(String modelScript) {
if (Converter.isDifferent(this.modelScript, modelScript)) {
String oldmodelScript= null;
oldmodelScript = this.modelScript;
this.modelScript = modelScript;
setModified("modelScript");
firePropertyChange(String.valueOf(APPLICATIONCONTROLLOGS_MODELSCRIPT), oldmodelScript, modelScript);
}
}
COM: <s> script used to retrieve the child model to apply the binding on </s>
|
funcom_train/49818083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addVisualStyle(VisualStyle vs) {
if (vs == null) {return;}
String name = vs.toString();
//check for duplicate names
if (visualStylesMap.keySet().contains(name)) {
String s = "Duplicate visual style name " + name;
throw new RuntimeException(s);
}
visualStylesMap.put(name, vs);
fireStateChanged();
}
COM: <s> adds a visual style throws runtime exception if a style </s>
|
funcom_train/19261947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void computeTarget(MouseEvent e) {
int x = e.getX(), y = e.getY();
Frame[] frames = Frame.getFrames();
for (int i = 0; i < frames.length; i++) {
Frame frame = frames[i];
Object target = frame.findComponentAt(x, y);
if (null != target) {
return;
}
}
}
COM: <s> searches the available frames for the component </s>
|
funcom_train/50714616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBlock(String buddy) throws JaimException {
if (loggedIn) {
try {
TocAddDenyCommand tad = new TocAddDenyCommand();
tad.addDeny(buddy);
sendTocCommand(tad);
}
catch (IOException e) {
throw new JaimException(e.toString());
}
}
}
COM: <s> adds the specified buddy to your block list </s>
|
funcom_train/41266331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Vinculado entity) {
EntityManagerHelper.log("saving Vinculado instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved vinculado entity </s>
|
funcom_train/375407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNameAndOneVariable() {
ConfigString string = new ConfigString("${jnp}.${name}", variables, properties);
assertTrue("sub failed in expand", string.expand("mark", variables));
assertEquals(JNP + ".mark", string.toString());
string.reset(); // Reintialize
}
COM: <s> test name and one variable </s>
|
funcom_train/23271283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLabelFormat() {
String result = null;
PiePlot plot = (PiePlot) this.chart.getPlot();
PieSectionLabelGenerator g = plot.getLabelGenerator();
if (g instanceof StandardPieSectionLabelGenerator) {
StandardPieSectionLabelGenerator gg
= (StandardPieSectionLabelGenerator) g;
result = gg.getLabelFormat();
}
return result;
}
COM: <s> returns the label format used by the plot </s>
|
funcom_train/9049927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDayInterval() {
int interval = 0;
try {
String param = commandLine.getOptionValue(WITHIN);
if (Integer.valueOf(param) >= (Integer.valueOf(0))) {
interval = Integer.valueOf(param);
}
}
catch (NumberFormatException e) {
System.out.println("An integer was not entered. Default '0' will be used.");
return 0;
}
return interval;
}
COM: <s> obtains parameter for within argument </s>
|
funcom_train/50480638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String getCharset(Locale loc) {
String charset;
// Try for a full name match (may include country)
charset = (String) map.get(loc.toString());
if (charset != null) return charset;
// If a full name didn't match, try just the language
charset = (String) map.get(loc.getLanguage());
return charset != null ? charset : defaultEncoding; // tweaked so it doesn't return null.
}
COM: <s> gets the preferred charset for the given locale or null if the locale </s>
|
funcom_train/48929645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getAllBuddies(){
System.out.println("Your buddies are:");
for(int i = 0; i < this.myBuddies.size(); i++){
Buddies temp = (Buddies)this.myBuddies.get(i);
System.out.println(temp.getBuddyName());
}
JOptionPane.showMessageDialog(null, "Please look at the console for your buddy list", "Buddy List", JOptionPane.DEFAULT_OPTION);
}
COM: <s> this will print a list of all your current buddies </s>
|
funcom_train/44166105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element toXMLElement() {
Element result = createMessage(getXMLElementTagName(),
"unit", unitId,
"settlement", settlementId);
if (sellGoods != null) {
Document doc = result.getOwnerDocument();
for (Goods goods : sellGoods) {
result.appendChild(goods.toXMLElement(null, doc));
}
}
return result;
}
COM: <s> convert this goods for sale message to xml </s>
|
funcom_train/31725838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getSphinx4Text() throws RemoteException {
synchronized(sphinx4Text) {
//gotSphinx4Text is false until Sphinx4 recognizes something
if(gotSphinx4Text) {
if (verbose) System.out.println(prg + ": in getSphinx4Text returning: " + sphinx4Text.get(0) + " at time " + sphinx4Text.get(1));
canLogIt("FINAL " + sphinx4Text.get(0));
return sphinx4Text;
}
return null;
}
}
COM: <s> gets sphinx4s most recently recognized text and time of recognition </s>
|
funcom_train/27931414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AnnotationSet get(Span span) {
Offset start = span.getStartOffset();
Offset end = span.getEndOffset();
MapList ml = new MapList();
AnnotationSet newSet = new AnnotationSetImpl(getDocument());
newSet.addAll(ml.getBetween(start, end));
return newSet;
}
COM: <s> returns all annotations with a start offset greater than or equal to </s>
|
funcom_train/28544602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateParsedSentences(Document aParsedDoc) {
AnnotationSet rbSentences = aParsedDoc.getAnnotations().get(
RabbitAnnotation.RABBIT_SENTENCE.getName());
for (Annotation annotation : rbSentences) {
try {
addParsedSentence(converter.convert(annotation, this));
} catch (RabbitException e) {
// TODO: better would be to store all errors in a list and show
// them all together...
throw new RuntimeException("Could not create parsed sentence.",
e);
}
}
disambiguateParsedSentences();
}
COM: <s> adds the parsed sentences based on a parsed doc </s>
|
funcom_train/2881375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeList getAttributes(ObjectName name, String[] attributes) throws RuntimeConnectionException, ReflectionException, InstanceNotFoundException {
if (!isActive) {
throw new RuntimeConnectionException("ClientConnector not connected");
}
try {
return rmiConnectorServer.getAttributes(name, attributes);
} catch (RemoteException re) {
throw new RuntimeConnectionException(re, re.getMessage());
}
}
COM: <s> gets the attributes attribute of the rmi connector client object </s>
|
funcom_train/41164147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoEditorReviewerPairTeacher entity) {
EntityManagerHelper.log("saving CoEditorReviewerPairTeacher instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved </s>
|
funcom_train/3116897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addStroke(final GeneralPath stroke) {
strokes.add(stroke);
final Rectangle2D oldFullSizeBounds = getFullSizeBounds(INK);
if (oldFullSizeBounds == null) {
setFullSizeBounds(INK, stroke.getBounds2D());
}
else {
setFullSizeBounds(
INK,
stroke.getBounds2D().createUnion(oldFullSizeBounds));
}
fireStrokeAdded(stroke);
}
COM: <s> adds the specified stroke to the sketched version of this piece of </s>
|
funcom_train/44828732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeFocus() {
if (_cellEditor != null) {
if (!deactivateTextEditor()) {
return false;
}
Text control = (Text)_cellEditor.getControl();
control.setVisible(false);
//pack(true);
}
setSelected(false);
return true;
}
COM: <s> removes focus from this node </s>
|
funcom_train/50864771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BuildingPanel getBuildingPanel(Building building) {
BuildingPanel result = null;
Iterator<BuildingPanel> i = buildingPanels.iterator();
while (i.hasNext()) {
BuildingPanel panel = i.next();
if (panel.getBuilding() == building) result = panel;
}
return result;
}
COM: <s> gets the building panel for a given building </s>
|
funcom_train/13286482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setText("Datenbank erstellen");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
new DBerstellen("jdvddb_"+nameTxt.getText());
_mainObjekt.set_dbName("jdvddb_"+nameTxt.getText());
beenden();
}
});
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/22826705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ForeignKey findCorrespondingForeignKey(Table table, ForeignKey fk) {
for (int fkIdx = 0; fkIdx < table.getForeignKeyCount(); fkIdx++) {
ForeignKey curFk = table.getForeignKey(fkIdx);
if ((caseSensitive && fk.equals(curFk))
|| (!caseSensitive && fk.equalsIgnoreCase(curFk))) {
return curFk;
}
}
return null;
}
COM: <s> searches in the given table for a corresponding foreign key </s>
|
funcom_train/35282880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDepthBuffer(Image.Format format){
if (id != -1)
throw new UnsupportedOperationException("FrameBuffer already initialized.");
if (!format.isDepthFormat())
throw new IllegalArgumentException("Depth buffer format must be depth.");
depthBuf = new RenderBuffer();
depthBuf.slot = -100; // -100 == special slot for DEPTH_BUFFER
depthBuf.format = format;
}
COM: <s> enables the use of a depth buffer for this code frame buffer code </s>
|
funcom_train/3176492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object object1, Object object2) {
TreePath path1 = (TreePath)object1;
TreePath path2 = (TreePath)object2;
int row1 = getRowForPath(path1);
int row2 = getRowForPath(path2);
if (row1 < row2) {
return -1;
} else if (row2 < row1) {
return 1;
} else {
return 0;
}
}
COM: <s> compare two tree paths because the selection model doesnt keep them </s>
|
funcom_train/49832493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkDetached(Object entityInstance, Session currentSession) {
if (!currentSession.isOpen()) {
log.debug("This entity is Detached becuase Session is closed!");
} else if (currentSession.isOpen()) {
assertEquals(false, currentSession.contains(entityInstance));
log
.debug("This entity is Detached state becuase Session do not have this entity instnace!");
} else {
throw new RuntimeException("Session is null. Please Check Session!");
}
}
COM: <s> session entity instance detached </s>
|
funcom_train/45752816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void findAndReadDescriptor(MyBufferedInputStream baseStream, LocalFileHeader header) throws IOException {
Decompressor decompressor = Decompressor.init(baseStream, header);
int uncompressedSize = 0;
while (true) {
int blockSize = decompressor.read(null, 0, 2048);
if (blockSize <= 0) {
break;
}
uncompressedSize += blockSize;
}
header.UncompressedSize = uncompressedSize;
}
COM: <s> finds descriptor of the last header and installs sizes of files </s>
|
funcom_train/4839681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date parse(String dateString) throws ParseException{
Iterator<SimpleDateFormat> iter = formats.iterator();
while(iter.hasNext()){
try{
return ((DateFormat)iter.next()).parse(dateString);
} catch(ParseException e){
// do nothing
}
}
throw new ParseException("Unsupported date format", -1);
}
COM: <s> parse the specified date string </s>
|
funcom_train/2287997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDisplayName(CmsObject cms, Locale locale) throws CmsException {
return Messages.get().getBundle(locale).key(
Messages.GUI_PRINCIPAL_DISPLAY_NAME_2,
getSimpleName(),
OpenCms.getOrgUnitManager().readOrganizationalUnit(cms, getOuFqn()).getDisplayName(locale));
}
COM: <s> returns the display name of this principal including the organizational unit </s>
|
funcom_train/7389139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem9() {
if (stringItem9 == null) {//GEN-END:|165-getter|0|165-preInit
// write pre-init user code here
stringItem9 = new StringItem("Name:", creature.getName());//GEN-LINE:|165-getter|1|165-postInit
// write post-init user code here
}//GEN-BEGIN:|165-getter|2|
return stringItem9;
}
COM: <s> returns an initiliazed instance of string item9 component </s>
|
funcom_train/32753856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void makeContent() {
super.makeContent();
add( Box.createVerticalStrut( 10 ) );
final Box row = new Box( BoxLayout.X_AXIS );
add( row );
JButton clearButton = new JButton( "clear map" );
row.add( clearButton );
clearButton.addActionListener( new ActionListener() {
public void actionPerformed( final ActionEvent event ) {
getMappedSimulator().clear();
}
});
row.add( Box.createHorizontalGlue() );
}
COM: <s> make this views content </s>
|
funcom_train/1066164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void translateAnchors(GraphNode g, int height){
Debug.debug(this, "Call StateMachineEditPart.translateAnchors(GraphNode g, int height)", channel);
Iterator it = g.getAnchorage().iterator();
while(it.hasNext()){
GraphConnector current = (GraphConnector)it.next();
if(current.getPosition().y == (g.getPosition().y+g.getSize().height))
current.getPosition().translate(0, height);
}
}
COM: <s> helper method to translate anchors on the lower border of a state machine </s>
|
funcom_train/42035572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(float x, float y, float width, float height) {
byteBuffer.position(0);
byteBuffer.putFloat(x);
byteBuffer.putFloat(y);
byteBuffer.putFloat(x + width);
byteBuffer.putFloat(y);
byteBuffer.putFloat(x);
byteBuffer.putFloat(y + height);
byteBuffer.putFloat(x + width);
byteBuffer.putFloat(y + height);
byteBuffer.position(0);
}
COM: <s> updates the buffer object with a new set of points assuming rectangular shape </s>
|
funcom_train/43188804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int writeMDIA(int streamNumber, String type) {
long offset = filePointer;
bufClear();
bufWriteInt(0);
bufWriteBytes("mdia");
bufFlush();
int size = 8;
size += writeMDHD(streamNumber, type);
size += writeMhlrHdlr(streamNumber, type);
size += writeMINF(streamNumber, type);
return writeSize(offset, size);
}
COM: <s> required atoms are mdhd </s>
|
funcom_train/25975857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Value add(Value rhs) throws ASMLSemanticException {
switch(rhs.getType()){
case Type.INT:
return new ASMLFloat(mValue + ((ASMLInteger)rhs).getValue());
case Type.FLOAT:
return new ASMLFloat(mValue + ((ASMLFloat)rhs).getValue());
case Type.STRING:
return new ASMLString(Double.toString(mValue) +
((ASMLString)rhs).getValue());
case Type.WAVE:
return ((ASMLWave)rhs).add(this);
default:
return super.add(rhs);
}
}
COM: <s> adds rhs value to this asmlfloat </s>
|
funcom_train/3118604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setState(final Object state) {
selectedItem = (SelectOne.Item)state;
for (Iterator i = getChildrenIterator(); i.hasNext(); ) {
final RadioButton radioButton = (RadioButton)i.next();
if (state == radioButton.getModel()) {
radioButton.setChecked(true);
}
else {
radioButton.setChecked(false);
}
}
}
COM: <s> selects the specified radio button in this group and unselects the </s>
|
funcom_train/28431933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getResourceAsStream(String path) {
path = normalize(path);
if (path == null)
return (null);
DirContext resources = context.getResources();
if (resources != null) {
try {
Object resource = resources.lookup(path);
if (resource instanceof Resource)
return (((Resource) resource).streamContent());
} catch (Exception e) {
}
}
return (null);
}
COM: <s> return the requested resource as an code input stream code </s>
|
funcom_train/28664727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setUpExtraText2(Composite localParent) {
tIndex = new StyledText(localParent, SWT.WRAP | SWT.V_SCROLL | SWT.BORDER);
tIndex.setMargins(4, 0, 4, 0);
tAttackerE = new StyledText(localParent, SWT.WRAP | SWT.V_SCROLL | SWT.BORDER);
tAttackerE.setMargins(4, 0, 4, 0);
}
COM: <s> sets up the second extra text designed for a stack layout </s>
|
funcom_train/47109288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initPermissions() {
EntityManager manager = null;
try {
parser = new SpelExpressionParser();
manager = EntityManagerFactory.createEntityManager();
securedResources = SecuredResourceHelper.list(manager);
securedActions = SecuredActionHelper.list(manager);
} finally {
manager = EntityManagerHelper.close(manager);
}
}
COM: <s> initializes the cache with the values from the database </s>
|
funcom_train/41266407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Unimed entity) {
EntityManagerHelper.log("deleting Unimed instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Unimed.class,
entity.getUmdcodigo());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent unimed entity </s>
|
funcom_train/40731838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
((Exporter) GWT.create(Upload.class)).export();
((Exporter) GWT.create(PreloadImage.class)).export();
// Sleep for a while until all css stuff has been loaded
new Timer() {
public void run() {
onLoadImpl();
}
}.schedule(1500);
}
COM: <s> this method is called as soon as the browser loads the page and </s>
|
funcom_train/42401230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ListValue visitList(final Element element) {
final ListTag tag = new ListTag();
tag.setElement(element);
tag.setPlaceHolderResolver(this.getPlaceHolderResolver());
final ListValue list = new ListValue();
final List<Value> elements = this.visitValues(tag.getValues());
list.setElements(elements);
list.setFilename(this.getFilename());
list.setGeneratorContext(this.getGenerator().getGeneratorContext());
return list;
}
COM: <s> creates a list value from a list value element </s>
|
funcom_train/44598645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testArrayTypes() {
p.setSource("int[][] a[];");
p.next();
ASTNode n = p.parseBlockStatement();
assertNotNull(n);
//System.out.println(org.jmlspecs.eclipse.jmlast.JmlASTCodeWriter.generateCode(n));
// JmlASTPrinter.print("",n);
}
COM: <s> tests parsing of array type declarations </s>
|
funcom_train/22384139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public ZZCell getCell(ZZSpace sp, String id) {
// (Assures id is a real primitive.)
Primitive prim = get(id);
ZZCell c = sp.getHomeCell().findText("d.primitive", 1, id);
if(c == null) {
c = sp.getHomeCell().N("d.primitive", 1);
c.setText(id);
prim.install(c);
}
return c;
}
COM: <s> get the cell for a primitive </s>
|
funcom_train/49719644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ChartPanel getJPanelDisplayLoss() {
if (jPanelDisplayLoss == null) {
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
JFreeChart chart = createChart(dataset);
jPanelDisplayLoss = new ChartPanel(chart);
jPanelDisplayLoss.setLayout(new GridBagLayout());
jPanelDisplayLoss.setPreferredSize(new Dimension(400, 200));
}
return jPanelDisplayLoss;
}
COM: <s> this method initializes j panel display loss </s>
|
funcom_train/24195054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAsSibling(BTNode other) {
if (this.parent != null) {
if (other.hasAsDescendant(this)) {
return;
}
if (other.parent != null) {
other.parent.getChildren().remove(other);
}
int thisPos = this.parent.getChildren().indexOf(this);
this.parent.getChildren().add(thisPos + 1, other);
other.parent = this.parent;
setChanged();
notifyObservers();
}
}
COM: <s> makes code other code be a sibling of this node </s>
|
funcom_train/38724470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(AddBrowsingDialog abd) {
if (abd.getType() != AddBrowsingDialog.Type.COMBI)
throw new RuntimeException("Tryed to update a Combination with a dialog settings up somthing else.");
this.algo = abd.getCombinationAlgorithm();
this.params = abd.getParameters();
}
COM: <s> updates this panel with the information from the given dilaog </s>
|
funcom_train/34194566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void markTrialJPanelActionPerformed(java.awt.event.ActionEvent evt) {
if ("Back".equals(evt.getActionCommand())) {
// Stop animation
markTrialJPanel.stop();
// Go back to projectSelectPanel
remove(markTrialJPanel);
add(projectSelectPanel);
pack();
}
}
COM: <s> handle when back are pressed in mark trials panel </s>
|
funcom_train/17596281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getYFrom(MoveDirection direction, int currentYCoordinate) {
switch (direction) {
case North : return currentYCoordinate - 1;
case NorthEast : return currentYCoordinate - 1;
case East : return currentYCoordinate;
case SouthEast : return currentYCoordinate + 1;
case South : return currentYCoordinate + 1;
case SouthWest : return currentYCoordinate + 1;
case West : return currentYCoordinate;
case NorthWest : return currentYCoordinate - 1;
default : throw new RuntimeException("Cannot calculate the y coordinate from " + direction);
}
}
COM: <s> gets the new y position given the current y coord and the direction </s>
|
funcom_train/26189026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
Object[] selection = selectionProvider.getSelection().getSelected();
initPerform(selection);
int selectionSize = selection.length;
for (int i = 0; i < selectionSize; i++) {
performAction(selection[i]);
}
finalizePerform(selection);
}
COM: <s> performs the action operation on every element of the current </s>
|
funcom_train/2888081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void contextDestroyed(ServletContextEvent evt) {
try {
if (scheduler != null) {
log.info("Shutting Down");
scheduler.shutdown(true);
log.info("Shutdown Complete");
scheduler = null;
}
setup.shutdown();
} catch (Exception e) {
log.fatal("Avalanche InitializAtion failed : ", e);
}
}
COM: <s> this is executed when server is shuttig down </s>
|
funcom_train/45831717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("RHVACANCYSOAP".equals(portName)) {
setRHVACANCYSOAPEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/18754996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWONormalise(double[] add) {
if (add == null)
throw new IllegalArgumentException("add must not be null");
if (add.length != this.values.length)
throw new IllegalArgumentException("Dimensions do not match ("+add.length+"!="+this.values.length+")");
for (int i = 0; i < values.length; i++) {
this.values[i] += add[i];
}
}
COM: <s> adds values to the vectors w o normalising it </s>
|
funcom_train/31561130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void CALL(ConstantString subr, MaverickString[] params) throws MaverickException {
Program s = factory.getProgram(subr);
if (s == null) {
throw new MaverickException(0, "Sorry cannot find " + subr.toString());
} else {
s.run(this, params);
}
}
COM: <s> executes the specified subroutine </s>
|
funcom_train/16387312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setResult(java.util.List<? extends org.tmforum.tip.base.AttributeAccess> result) throws java.lang.IllegalArgumentException {
this.result = result;
if (result!=null && result.size()>0) setAttributeNamePopulated(IteratorResultSet.RESULT);
//TODO need to change the template to generate correct exceptions etc
}
COM: <s> setter for result </s>
|
funcom_train/17144101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSimpleJavaBean() throws Exception {
String name = "Dummy";
PropertyUtils.setSimpleProperty(dummyWithStringAndInteger, "name", name);
assertEquals("Name not matching", name, PropertyUtils.getSimpleProperty(dummyWithStringAndInteger, "name"));
PropertyUtils.setSimpleProperty(dummyWithStringAndInteger, "value", 1);
assertEquals("Value not matching", 1, PropertyUtils.getSimpleProperty(dummyWithStringAndInteger, "value"));
}
COM: <s> so this dyna beans have typed fields </s>
|
funcom_train/50864638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createUnitButton(Unit unit) {
// Check if unit button already exists
boolean alreadyExists = false;
Iterator<UnitButton> i = unitButtons.iterator();
while (i.hasNext()) {
UnitButton unitButton = i.next();
if (unitButton.getUnit() == unit)
alreadyExists = true;
}
if (!alreadyExists) {
UnitButton tempButton = new UnitButton(unit);
tempButton.addActionListener(this);
add(tempButton);
validate();
repaint();
unitButtons.add(tempButton);
}
}
COM: <s> create a new unit button in the toolbar </s>
|
funcom_train/34442038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateResults(ContentAdvertisement[] results) {
this.results = results;
//erase all of the old results
resultList.removeAll();
//insert the updated results into the list
for (int i = 0; i < results.length; i++) {
resultList.add(results[i].getName());
}
}
COM: <s> this method filters through advertisements returned by other peers </s>
|
funcom_train/47958103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean is_cached(_Tile tile){
if (tile.is_missing()){
String location = this.tile_location(tile, false);
if (new java.io.File(location).exists()) //os.path.exists(location)
return true;
else
return false;
}
else{
return true;
}
}
COM: <s> returns true if the tile data is present </s>
|
funcom_train/14462110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackColor(int t){
icvColorFlag = 0;
// 20070201 KSC: now not necessary! if (t==0) t=64; // use the 64 value for black background KSC
icvColorFlag |= ((short)icvFore); // icvColorFlag << (short)t;//(t<< 0x7F);
icvColorFlag |= ((short)t << 7);
this.updateColors();
}
COM: <s> set the background color for this format when pattern fls pattern solid </s>
|
funcom_train/2415975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public S getSession(EngineSessionId<S> id, String jitterbitUser, String password) throws EngineSessionException {
synchronized (lock) {
SessionHolder<S> sh = sessions.get(id);
if (sh != null) {
sh.session.verifyCredentials(jitterbitUser, password);
sh.accessed();
return sh.session;
}
return null;
}
}
COM: <s> returns the existing code engine session code with the given id </s>
|
funcom_train/39488279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clockTicks (int currentTime) {
usedTime = currentTime % microSecsPeriod;
//System.out.println("Clock - > usedtime = " + usedTime);
if (usedTime == 0) {
special_case_usedTime = microSecsPeriod;
systemInterrupt = true;
startingPeriodTime = currentTime;
}
}
COM: <s> clock ticks inherited from super class </s>
|
funcom_train/43013661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doFindTrain() {
FindTrainDialog dlg = new FindTrainDialog(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x,
(frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.setModal(false);
dlg.pack();
dlg.setVisible(true);
}
COM: <s> do find train </s>
|
funcom_train/26589989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean previous() throws DException {
switch (state) {
case INVALIDSTATE:
throw new DException("DSE4116", null);
case AFTERLAST:
return last();
case BEFOREFIRST:
return false;
}
boolean prev = !direction ? previousWithBackwardDirection()
: previousWithOppositeDirection();
state = prev ? VALIDSTATE : BEFOREFIRST;
return prev;
}
COM: <s> this method returns the previous valid record from the full text indexed </s>
|
funcom_train/35078284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SMPPSession getSession() throws IOException {
if (session == null) {
logger.info("Initiate session for the first time to " + remoteIpAddress + ":" + remotePort);
session = newSession();
} else if (!session.getSessionState().isBound()) {
throw new IOException("We have no valid session yet");
}
return session;
}
COM: <s> get the session </s>
|
funcom_train/9869533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEmailpri(String newVal) {
if ((newVal != null && this.emailpri != null && (newVal.compareTo(this.emailpri) == 0)) ||
(newVal == null && this.emailpri == null && emailpri_is_initialized)) {
return;
}
this.emailpri = newVal;
emailpri_is_modified = true;
emailpri_is_initialized = true;
}
COM: <s> setter method for emailpri </s>
|
funcom_train/2712300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayHighlightColors() {
//String category = getSelectedCategory();
HighlightColor highlightColorConfig = getSelectedHighlightColor();
// Foreground color
UIConfigurationUtility.showColor(highlightColorConfig.getForeground(),
highlightingFGLabel,
sampleHighlightingFG);
// Background color
UIConfigurationUtility.showColor(highlightColorConfig.getBackground(),
highlightingBGLabel,
sampleHighlightingBG);
}
COM: <s> display highlight colors background and foreground for selected highlight </s>
|
funcom_train/16385329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractClassModel getGeneralization() {
if (this.artifact.getExtendedArtifact() != null) {
AbstractClassModel acm = ModelFactory.getInstance().getModel(
this.artifact.getExtendedArtifact());
acm.setPluginRef(this.getPluginRef());
return acm;
} else {
return null;
}
}
COM: <s> returns the generalization of this artifact </s>
|
funcom_train/21637399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private User identifyUser(String email, String password) {
User user = UserHelper.getInstance().findByEmail(email);
if (user != null) {
if (user.getPassword().equals(User.hash(password))) {
return user;
} else {
logInformation(email, "inncorrect password");
}
} else {
logInformation(email, "user wasn't found");
}
return null;
}
COM: <s> try to indentify user </s>
|
funcom_train/3548728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEmailAddress(String emailAddress) {
if (emailAddress == null) {
throw new IllegalArgumentException("parameter may not be null");
}
Matcher matcher = ADDRESS_PATTERN.matcher(emailAddress);
if (matcher.matches()) {
this.emailAddress = emailAddress;
} else {
throw new IllegalArgumentException(emailAddress
+ " does not look like a valid email address");
}
}
COM: <s> sets the email address </s>
|
funcom_train/38951261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getIconBASE64(String iconID, String format, String imageType) {
if ("xml".equals(format)) {
try {
Document dom = createDocument();
Element icon = dom.createElement("Icon");
String base64 = KnowledgeRepository.getInstance()
.getIconBASE64(iconID);
icon.setTextContent(base64);
icon.setAttribute("IconID", iconID);
dom.appendChild(icon);
return getStringFromDocument(dom);
} catch (ParserConfigurationException e) {
e.printStackTrace();
}
return getEmptyXML();
}
return "Not Supported";
}
COM: <s> request a single icon base64 encoded </s>
|
funcom_train/40486669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int calculateNewCapacity() {
int oldCapacity = queue.length;
int newCapacity = (oldCapacity < 64)
? (oldCapacity + 1) * 2
: (oldCapacity / 2) * 3;
if (newCapacity < 0) {
newCapacity = Integer.MAX_VALUE; // overflow - hotspot will throw OOME
}
return capAtMaximumSize(newCapacity, maximumSize);
}
COM: <s> returns 2x the old capacity if small 1 </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.