__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/18753559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initComponents() {
Font font = getAnimationFont();
label1 = new BasicTextLabel(" ");
label1.setFont(font.deriveFont(Font.BOLD,18));
label1.setOpaque(false);
label2 = new BasicTextLabel(" ");
label2.setFont(font.deriveFont(Font.BOLD,18));
label2.setOpaque(false);
fan = new FanComponent(3,MC4J_COLOR);
logoPanel = new TransformablePanel();
}
COM: <s> creates and configures the ui components </s>
|
funcom_train/8552264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseReleased(MouseEvent e) {
if (fVertex != null) {
Vertex v = graph.getVertex(getGraphics(), e.getX(), e.getY());
if (v != null) {
selected = graph.addEdge(fVertex,v);
}
}
fVertex = null;
mVertex = null;
repaint();
}
COM: <s> invoked when a mouse button has been released on a component </s>
|
funcom_train/8689796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean eval() throws BuildException {
validate();
DeweyDecimal actual = getVersion();
if (null != atLeast) {
return actual.isGreaterThanOrEqual(new DeweyDecimal(atLeast));
}
if (null != exactly) {
return actual.isEqual(new DeweyDecimal(exactly));
}
//default
return false;
}
COM: <s> evalute the condition </s>
|
funcom_train/3891283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Action getAction(String actionId) {
Action a = (Action)ACTION_MAP.get(actionId);
if(a == null) {
a = new Action() {
public void run() {
handleGlobalAction(getActionDefinitionId());
}
};
a.setActionDefinitionId(actionId);
a.setEnabled(false);
ACTION_MAP.put(actionId, a);
}
return a;
}
COM: <s> get an action associated with the action id </s>
|
funcom_train/10789552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ensureStoreManagerTransaction() {
if (!_store.getContext().isStoreActive()) {
_store.getContext().beginStore();
if (log.isTraceEnabled())
log.trace(_loc.get("start-trans-for-lock"));
}
}
COM: <s> enforce that we have an actual transaction in progress so that we can </s>
|
funcom_train/42036558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void animate(int[] animationTiles, long frameTime, int loops, boolean returnToStart) {
hasCustomAnimation = true;
textureTile = animationTiles[0];
animationReturnToStart = returnToStart;
animationLoops = loops;
animationLastTicks = Time.loopTicks;
animationFrameTicks = frameTime;
customAnimationSequence = animationTiles;
animationCustomPosition = -1;
animated = true;
freezeAnimation = false;
}
COM: <s> animates the texture tile index through a custom array </s>
|
funcom_train/8294827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateStatistics() {
statistics = new HashMap<Integer,StatNode>();
for (int i = 1; i <= maxDepthSeen; ++i) {
statistics.put(new Integer(i), new StatNode());
}
fillStatistics(statistics);
for (int i = 1; i <= maxDepthSeen; ++i) {
StatNode s = (StatNode) statistics.get(new Integer(i));
s.calculate();
}
standardize(statistics);
}
COM: <s> process the statistics for the entire tree </s>
|
funcom_train/47546718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setElements(float m11, float m12, float m21, float m22, float dx, float dy) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
Cairo.cairo_matrix_set_affine(handle, m11, m12, m21, m22, dx, dy);
}
COM: <s> modifies the receiver to represent a new transformation given all of </s>
|
funcom_train/29881939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton createChangeTheLookButton() {
JButton tJButton = createToolBarButton("V221ChangeLook.png", "Change the Look");
tJButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {mOpenPCLViewer.actionShowHideChangeTheLookPopup();}
});
return tJButton;
}
COM: <s> change the look toolbar button </s>
|
funcom_train/31657700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildIndex() {
if (index != null) {
return;
}
index = new HashMap<Variable, Set<TriplePattern>>();
Iterator<TriplePattern> tps = triplePatterns.iterator();
while (tps.hasNext()) {
TriplePattern tp = tps.next();
Set<TriplePattern> siblings = index.get(tp.getSubject());
if (siblings == null) {
siblings = new HashSet<TriplePattern>();
index.put(tp.getSubject(), siblings);
}
siblings.add(tp);
}
}
COM: <s> builds the index </s>
|
funcom_train/22213285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testYYY() {
/**
* You will want to use the following methods of TestCase
* to perform assertions:
* assert(expression) where expression can be any valid Java expression
* assertEquals(a,b)
* assertNotEqual(a,b)
* assertNull(a)
* assertNotNull(b)
* and also fail(String msg) when something fails unexpectedly
*/
}
COM: <s> basic yyy tests </s>
|
funcom_train/28500579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getPrefValueBoolean( final String pPath, final String pName, final boolean pUserPref ) throws JC_Exception {
JC_Propertyable p = getPrefProperty( pPath, pName, pUserPref );
return (Boolean)p.getValueAs( Boolean.class );
}
COM: <s> get pref value boolean </s>
|
funcom_train/18254866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(Object o, boolean isParent) {
try {
superSpace.add(o, false);
return super.add(o, isParent);
} catch (NullPointerException e) {
throw new RuntimeException("No superlist specified for " + getContext().getName());
}
}
COM: <s> adds the supplied object agent to this list at the specified location </s>
|
funcom_train/31133338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void AvnmpRoute5() {
tab.addEntry("AH-1", "AN-1", new Double(1.0));
tab.addEntry("AN-1", "AN-4", new Double(1.0));
tab.addEntry("AN-4", "output", new Double(1.0));
}
COM: <s> straight through test route </s>
|
funcom_train/32830182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertDataSet(Class<?> testClass, String... dataSetFileNames) {
DataSetFactory dataSetFactory = getDefaultDataSetFactory();
DataSetLoadStrategy dataSetLoadStrategy = getDefaultDataSetLoadStrategy();
MultiSchemaDataSet dataSet = getDataSet(testClass, dataSetFileNames, dataSetFactory);
insertDataSet(dataSet, dataSetLoadStrategy);
}
COM: <s> inserts the dataset consisting of the given list of files into the database </s>
|
funcom_train/41725507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveDown() {
selectionLine += 1;
int coeff = fullScreen ? 1 : 0;
if (selectionLine >= maxLines - coeff) {
offset = Math.min(offset + 1, list.size() - maxLines
+ HEADER_HEIGHT + coeff);
selectionLine = maxLines - 1 - coeff;
} else if (selectionLine >= list.size() + 1) {
selectionLine = list.size() + 1;
}
}
COM: <s> moves a selection down </s>
|
funcom_train/41163587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CoParagraphCheckList3 update(CoParagraphCheckList3 entity) {
EntityManagerHelper.log("updating CoParagraphCheckList3 instance", Level.INFO, null);
try {
CoParagraphCheckList3 result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved co paragraph check list3 entity and return it or </s>
|
funcom_train/20339989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTests() {
System.out.println("getTests");
LinkedList<String> lst = new LinkedList<String>();
if(!UserReader.getTests("admin", "testgroups1", lst)) {
fail("admin should return tests belonging to testGroups1");
}
assertEquals(true, lst.contains("test1"));
assertEquals(false, lst.contains("test3"));
}
COM: <s> test of get tests method of class user reader </s>
|
funcom_train/34508286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMeansByUnification(IntendedMeans intMeans, Literal avaBel, Literal assump) {
Unifier unification = new Unifier();
unification.unifies(assump, avaBel);
Unifier planUnif = intMeans.getUnif();
logger.finest("old plan unificaton is: " + planUnif.toString());
// warning order is important
planUnif.compose(unification);
logger.finest("new plan unificaton is: " + planUnif.toString());
intMeans.setUnif(planUnif);
}
COM: <s> updates the unification of the intended means by the new belief for assumption </s>
|
funcom_train/19227393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VueTool getSelectedTool() {
Enumeration e = mButtonGroup.getElements();
PaletteButton cur;
while( e.hasMoreElements() ) {
cur = (PaletteButton) e.nextElement();
if( cur.isSelected() ) {
return ((VueTool) cur.getContext()) ;
}
}
return null;
}
COM: <s> get selected tool </s>
|
funcom_train/44596516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkModifiers(List dest, ModifierSet source, String description, long allowed) {
// FIXME - this design for checkForbiddenPairs does not work if dest already
// contains modifiers
checkForbiddenPairs(source,allowed);
copyModifiers(dest,source,description,allowed);
}
COM: <s> checks a set of modifiers copying a permitted subset into the destination </s>
|
funcom_train/17932640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getLocaljCheckBox() {
if (localjCheckBox == null) {
localjCheckBox = new JCheckBox();
localjCheckBox.setSelected(true);
localjCheckBox.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
if (localjCheckBox.isSelected()) {
localDetectorjSpinner.setEnabled(true);
} else
localDetectorjSpinner.setEnabled(false);
}
});
}
return localjCheckBox;
}
COM: <s> this method initializes localj check box </s>
|
funcom_train/8222537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInterceptMethods(String[] methods) {
_interceptMethods = methods;
String value = "";
if (methods.length > 0) {
value = methods[0];
for (int i = 1; i < methods.length; i++) {
value = value + ", " + methods[i];
}
}
String prop = "ManualEdit.interceptMethods";
Preferences.setPreference(prop, value);
}
COM: <s> sets the intercept methods </s>
|
funcom_train/1804288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ErrorElement setExtendedHelp(String extendedHelp) {
Preconditions.checkNotNull(
extendedHelp, "Extended help uri must not be null.");
Preconditions.checkArgument(
extendedHelp.matches(GOOGLE_URI_PATTERN),
"Invalid extended help URI: %s", extendedHelp);
errorExtendedHelp = extendedHelp;
return this;
}
COM: <s> set uri for extended help </s>
|
funcom_train/30194950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(JxplElement member, JxplList properties){
Vector props = properties.getElements();
int[] propa = new int[props.size()];
for(int j=0; j<propa.length; j++)
propa[j] = ((JxplInteger)props.get(j)).getValue().intValue();
setArray(member,propa);
return true;
}
COM: <s> add member with a list of properties </s>
|
funcom_train/15724561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addActionListener(String name, ActionListener al) {
BasicAction action = (BasicAction) actions.get(name);
if (action != null) {
action.addActionListener(al);
}
BasicAction toolBarAction = (BasicAction) toolBarActions.get(name);
if (toolBarAction != null) {
toolBarAction.addActionListener(al);
}
}
COM: <s> adds an action listener to the action with the given name </s>
|
funcom_train/18743776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T current() {
if (DEBUG) {
Groove.message("History.current() at index " + this.index);
}
if (!isEmpty()) {
return this.log.get(this.index);
} else {
throw new NoSuchElementException("No current element in history");
}
}
COM: <s> returns the current element in the history log </s>
|
funcom_train/36771926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProduct(Name productName) {
if(productName.toString().compareToIgnoreCase("") == 0) {
Message.displayMessage("Name can not be empty",
"Test Tracker", JOptionPane.ERROR_MESSAGE);
return;
}
if (!productController.addProduct(productName)) {
Message.displayMessage("Product already exists",
"Test Tracker", JOptionPane.ERROR_MESSAGE);
return;
}
productSelected = new Product(productName);
}
COM: <s> adds the given product based on the name to the list </s>
|
funcom_train/15456361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Permission permission) {
if(permission == null){
return 1;
}
if(this.getName() == null && permission.getName() == null){
return 0;
}
if(this.getName() == null && permission.getName() != null){
return permission.getName().compareToIgnoreCase(this.getName());
}
return this.getName().compareToIgnoreCase(permission.getName());
}
COM: <s> this comparator uses the attribute name to compare </s>
|
funcom_train/38808670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_TCM__boolean_equals_Object() throws JHuPeDOMException {
String publicID = "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN";
String systemID = "FILE://temp/test.dtd";
DocType theDocType = jhupeDomFactory.newDocType("anElement", publicID,
systemID);
Object ob = (Object) theDocType;
assertEquals(theDocType, ob);
}
COM: <s> do an object comparison with itself to confirm boolean equals works </s>
|
funcom_train/42638468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected NonlinAESolver initDefaultNonlinSolver(){
NewtonAEAlgorithm alg = new NewtonAEAlgorithm();
if(solver!=null){//==null => NewtonAEAlgorithm with GaussAESolver by default
alg.setLinMethod(solver);
}
Matrix E = initIdentityMatrix();
if(E!=null)alg.setIdentityMatrix(E);
return new IterativeNonlinAESolver(alg, initTolerance(), true);
}
COM: <s> do not forget to set identity matrix to newton aealgorithm if needed </s>
|
funcom_train/10946847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map runSync(String localName, ModelService modelService, Map context) throws GenericServiceException {
GenericResultWaiter waiter = new GenericResultWaiter();
this.runAsync(localName, modelService, context, waiter, false);
return waiter.waitForResult();
}
COM: <s> run the service synchronously and return the result </s>
|
funcom_train/19709416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String get(String strProperty) throws Exception {
try {
return props.getString(strProperty);
} catch (MissingResourceException resourceEx) {
logger.log(ERROR, "The '" + strProperty + "' property " +
" is missing in the MsappConfig.properties file.");
return "";
}
}
COM: <s> gets the requested property </s>
|
funcom_train/42087382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_LoadDatabaseThrowsFileNotFound() throws Exception {
ComicDatabase db = new ComicDatabase("NOT A FILE");
try {
db.loadDatabase();
fail("FileNotFoundException expected.");
} catch (FileNotFoundException e) {
// Nothing to do here
assertEquals("NOT A FILE (The system cannot find the file specified)", e.getMessage());
}
}
COM: <s> tests whether an exception is thrown if the file cannot be found </s>
|
funcom_train/38949425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writePackage(final Class <?> clazz) {
String classname = clazz.getName();
int index = classname.lastIndexOf('.');
if (index >= 0) {
String packageName = classname.substring(0, index);
writer.append("package " + packageName + ";\n\n");
}
}
COM: <s> outs classs package </s>
|
funcom_train/32870621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setResult( Object value ) {
if( ! resultTypeInitialized )
initResultType();
//System.out.println("entering setResult(" + value + ")");
if( ARG_TYPE_VOID == resultTypeCode )
return;
doSetLocalVar( resultSlot, resultTypeCode, value, Thread.currentThread(), height );
//System.out.println("setResult() terminated");
}
COM: <s> modifies the result of the target method </s>
|
funcom_train/49263194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateText() {
toolTipFactory.clear();
SyntaxValueSet valueSet = propertyToSyntax(table.getValueSet());
ArrayList<ValidationError> errors = new ArrayList<ValidationError>();
String sqlCode = syntaxDefinition.format(valueSet, errors);
if (sqlCode != null) {
preview.setText(sqlCode);
for (ValidationError error : errors) {
markError(sqlCode, error);
}
} else {
preview.setText(""); //$NON-NLS-1$
}
}
COM: <s> updates text using property table input </s>
|
funcom_train/107124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeTableName(String key, String name) {
for (int i = 0; i < table.getItemCount(); i++) {
if(table.getItem(i).getText(HIDDEN_KEY_COLUMN).equals(key)){
table.getItem(i).setText(TABLE_NAME_COLUMN, name);
break;
}
}
}
COM: <s> changes name of the poker table </s>
|
funcom_train/18311631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getWidth() {
if ( fontMetrics != null && lines != null ) {
int max = 0;
for (int i = 0; i < lines.length; i++) {
int width = fontMetrics.stringWidth(lines[i]) + 12;
if (width > max) max = width;
}
return max;
} else {
return 10;
}
}
COM: <s> return the width of this node </s>
|
funcom_train/32982780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void popStackDistress(BusMessage oMessage) throws Exception {
int idxLast = _oScreenStack.size() - 1;
if (idxLast > 0) {
ActionScreen oScreen = (ActionScreen) _oScreenStack
.remove(idxLast);
if (oScreen instanceof SendDistressScreen) {
oScreen.exit(oMessage);
oScreen = (ActionScreen) _oScreenStack.get(idxLast - 1);
_oContext.getController().setScreenContent(oScreen);
}
}
}
COM: <s> remove screen from the top of the stack if the screen is </s>
|
funcom_train/18183398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws ResourceException {
log.trace("ENTER: close()");
if (isClosed()) {
throw new javax.resource.spi.IllegalStateException("Interaction has already been closed");
}
// release state
this.connectionImpl = null;
setClosed(true);
log.trace("EXIT: close");
}
COM: <s> closes code interaction code </s>
|
funcom_train/13212192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendPlayerLocations(Player player) {
for (Player otherPlayer : playerList) {
if ((otherPlayer == player) || (otherPlayer.getId() == 0)) continue;
byte[] newplayerMsg = otherPlayer.makeNewPlayerMessage();
player.queueMessage(newplayerMsg);
byte[] locationMsg = otherPlayer.makeLocationMessage();
player.queueMessage(locationMsg);
}
}
COM: <s> send initial messages to a newly joined player </s>
|
funcom_train/12161963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetComponentIdentity() throws Exception {
fetcherMock.expects.fetchPolicy(policyReferenceMock)
.returns(policyMock).any();
AbstractComponentImageAssetReference test =
(AbstractComponentImageAssetReference)createTestInstance(policyReferenceMock);
PolicyReference testReference = test.getPolicyReference();
assertNotNull("The reference should not be null", testReference);
assertEquals("The references should match", normalReferenceMock, testReference);
}
COM: <s> this tests the retrieval of a component identity from the test instance </s>
|
funcom_train/14094510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processElement() throws XMLException {
validateElement();
boolean result = false;
Object object = getXMLTestCase().getProperty(getRefId());
Assert.assertNotNull(
getMessage(),
object);
if (object instanceof java.awt.Component) {
result = ((java.awt.Component) object).isEnabled();
}
Assert.assertTrue(
getMessage(),
result == getEnabled());
}
COM: <s> this method obtains the refid which is assumed to </s>
|
funcom_train/39063586 | /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(InstructorPlugin.getDefault().getString("_UI_Wizard_label"));
//setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(InstructorPlugin.getDefault().getImage("full/wizban/NewMarking")));
}
COM: <s> this just records the information </s>
|
funcom_train/21015284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RunnableQuestionnaire getRunnable ( ) {
ArrayList<Item> ritems = new ArrayList<Item>( );
for ( Item i : items ) {
ritems.add ( new Item( i ) );
}
RunnableQuestionnaire rq =
new RunnableQuestionnaire( ritems, settings, this );
if ( settings.getBoolean ( "randomItemOrder" ) ) {
rq.mixItems ( );
}
return rq;
}
COM: <s> returns a runnable copy of the questionnaire </s>
|
funcom_train/51341834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void clear(final boolean clearRefs) {
lock.lock();
try {
for (BatchQueue<T> q : threadLocalQueues.values()) {
// clear the thread local queues.
q.clear(clearRefs);
}
// discard map entries.
threadLocalQueues.clear();
// clear the shared backing queue.
sharedQueue.clear(true/* clearRefs */);
} finally {
lock.unlock();
}
}
COM: <s> discards the thread local buffers and clears the backing ring buffer </s>
|
funcom_train/24628065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restore(ESISNode n, Map<String,Object> attr, Layer layer) {
super.restore(n,attr, layer);
popcats_ = getAttr(ATTR_CATEGORIES, "specific, navigate, view, create, save, edit").toLowerCase().split("\\s*,\\s*"); // trim?
}
COM: <s> take name of menu categories in order from comma separated list in </s>
|
funcom_train/32138560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void jumpToLocation(int line, int character) {
IDocument doc = getSourceViewer().getDocument();
try {
int offset = doc.getLineOffset(line-1) + character;
this.getSelectionProvider().setSelection(new TextSelection(doc, offset, 0));
} catch(BadLocationException boe) {}
}
COM: <s> jumps to the location in the idocument </s>
|
funcom_train/23635501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCommand(Request request) {
if (request instanceof ReconnectRequest) {
Object view = ((ReconnectRequest) request).getConnectionEditPart()
.getModel();
if (view instanceof View) {
Integer id = new Integer(CescsmodelVisualIDRegistry
.getVisualID((View) view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
}
}
return super.getCommand(request);
}
COM: <s> extended request data key to hold editpart visual id </s>
|
funcom_train/6404792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTranslation(float[] transArray) {
if (transArray == null || transArray.length != 3) {
throw new JmeException("Translation size must be 3.");
}
translation.x = transArray[0];
translation.y = transArray[1];
translation.z = transArray[2];
}
COM: <s> code set translation code will set the matrixs translation values </s>
|
funcom_train/46733112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAccountName(String accountName) {
if (Converter.isDifferent(this.accountName, accountName)) {
String oldaccountName= null;
oldaccountName = this.accountName;
this.accountName = accountName;
setModified("accountName");
firePropertyChange(String.valueOf(FACILITYACCOUNTS_ACCOUNTNAME), oldaccountName, accountName);
}
}
COM: <s> name of this account </s>
|
funcom_train/16310106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBeforePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AbstractEntity_before_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AbstractEntity_before_feature", "_UI_AbstractEntity_type"),
PstlPackage.Literals.ABSTRACT_ENTITY__BEFORE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the before feature </s>
|
funcom_train/13188396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getKeys() {
List result = null;
if (this.extract == TableOrder.BY_ROW) {
result = this.source.getColumnKeys();
}
else if (this.extract == TableOrder.BY_COLUMN) {
result = this.source.getRowKeys();
}
return result;
}
COM: <s> returns the keys </s>
|
funcom_train/11074432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertXPathExpression(String xpath, Class expectedClass, String expected) {
JXPathCompiledExpression expression = (JXPathCompiledExpression) JXPathContext.compile(xpath);
assertEquals("Expression class for " + xpath, expectedClass, expression.getExpression().getClass());
assertEquals("Expression toString() for " + xpath, expected, expression.getExpression().toString());
}
COM: <s> compiles the xpath into an expression checks the expression </s>
|
funcom_train/6488766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExperimentalLabels(String minExp, String maxExp) {
LogTools.trace(logger, 25, "MapperPanel.setExperimentalLabels("+minExp+", "+maxExp+")");
_minExp = minExp;
_maxExp = maxExp;
}
COM: <s> set experimental value labels </s>
|
funcom_train/21484050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoad() throws InterruptedException, ExecutionException, CacheException {
CountingCacheLoader countingCacheLoader = new CountingCacheLoader();
JCache jcache = new JCache(manager.getCache("sampleCache1"), countingCacheLoader);
jcache.load("key1");
Thread.sleep(500);
assertEquals(1, jcache.size());
assertEquals(1, countingCacheLoader.getLoadCounter());
}
COM: <s> tests the public api load method with a single item </s>
|
funcom_train/13874708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsStrictPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MappingCallExp_isStrict_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MappingCallExp_isStrict_feature", "_UI_MappingCallExp_type"),
QvtoperationalPackage.Literals.MAPPING_CALL_EXP__IS_STRICT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is strict feature </s>
|
funcom_train/1060051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsVisiblePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DiagramElement_isVisible_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DiagramElement_isVisible_feature", "_UI_DiagramElement_type"),
Di2Package.Literals.DIAGRAM_ELEMENT__IS_VISIBLE,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is visible feature </s>
|
funcom_train/17118458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toLinkSettingParent(InputField inputfield) {
try {
return ValidationAnswer.toLink(inputfield.getName(), this.getParent().getTaxID(), this.getParent().getName());
} catch (NCBIFindException e) {
warning(this, e.toString());
return "";
}
}
COM: <s> creates a link if this link is activated the value will be set </s>
|
funcom_train/20044447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _setSources() {
requiredMethod("getSources()");
oObj.setSources(newCRaddr());
CellRangeAddress[] CRaddr2 = oObj.getSources();
tRes.tested("setSources()",!ValueComparer.equalValue(CRaddr, CRaddr2));
}
COM: <s> test sets new cell ranges and compares cell ranges gotten by method </s>
|
funcom_train/12647679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processFocusEvent(FocusEvent e) {
if (focusListener != null) {
int id = e.getID();
switch (id) {
case FocusEvent.FOCUS_GAINED:
focusListener.focusGained(e);
break;
case FocusEvent.FOCUS_LOST:
focusListener.focusLost(e);
break;
}
}
}
COM: <s> processes focus events occurring on this component by </s>
|
funcom_train/19438150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void use() throws IOException, ParserException{
tokenReader();
x.setRootElement((Element) liste.get(0));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("src/algresql/parser/test1.xml")));
// Writes into the XML-Document
XMLOutputter outputter = new XMLOutputter();
outputter.output(x, System.out);
outputter.output(x, out);
}
COM: <s> zions executable main method </s>
|
funcom_train/42437670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isAlwaysRun(IConfiguration configurationAnnotation) {
if(null == configurationAnnotation) {
return false;
}
boolean alwaysRun= false;
if ((configurationAnnotation.getAfterSuite()
|| configurationAnnotation.getAfterTest()
|| configurationAnnotation.getAfterTestClass()
|| configurationAnnotation.getAfterTestMethod())
&& configurationAnnotation.getAlwaysRun())
{
alwaysRun= true;
}
return alwaysRun;
}
COM: <s> is the code iconfiguration code marked as always run </s>
|
funcom_train/33808667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String outputsToString(){
String string = new String();
for(int i = 0; i < this.primaryOutputs.size(); i++){
string += this.primaryOutputs.get(i) + "\t";
}
string += "\n";
for(int i = 0; i < this.primaryOutputs.size(); i++){
CircuitEntity entity = this.entities.get(this.primaryOutputs.get(i));
string += entity.outValue + "\t";
}
return string;
}
COM: <s> returns current state of outputs in printable form </s>
|
funcom_train/29632575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reloadLoginData() throws OpenPGPCardException {
try {
loginData = iso.getData(TLV_LOGIN[0], TLV_LOGIN[1]);
} catch (ISO7816Exception ex) {
throw new OpenPGPCardException("Could not get account (" + ex.getMessage() + ")");
}
}
COM: <s> reloads the login data field from the card </s>
|
funcom_train/14307908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleMessage(EBMessage msg) {
// deregister a view when it's closed.
if (msg instanceof ViewUpdate) {
ViewUpdate vu = (ViewUpdate) msg;
Log.log(Log.DEBUG,this,"view="+view);
if (vu.getView() == view && vu.getWhat() == ViewUpdate.CLOSED) {
EditBus.removeFromBus(this);
}
return;
}
}
COM: <s> handle a message from the bus </s>
|
funcom_train/38492502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendDevelopmentMessage(DevelopmentMessage dm, int player) {
try {
sendTo(dm, player);
dm.setWhat(player);
sendToAllBut(dm, player);
} catch (IOException e) {
e.printStackTrace();
System.exit(-1);
}
}
COM: <s> sends development message to a given player and inform other </s>
|
funcom_train/51571906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void target(boolean trans, String name, List<String> pathKinds) {
if (checkIdentifier(name)) {
fileSet(pathKinds);
currentNamespace.setCurrentTargetName(name);
currentNamespace.setCurrentTargetTransient(trans);
log.log(Level.FINER,
(trans ? "transient " : "") + "target: " + name);
}
}
COM: <s> begins the definition of a target </s>
|
funcom_train/31943998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSocket(Socket socket) throws IOException {
m_Socket = socket;
if (m_ModbusTransport == null) {
m_ModbusTransport = new ModbusTCPTransport(m_Socket);
} else {
m_ModbusTransport.setSocket(m_Socket);
}
m_Connected = true;
}//prepareIO
COM: <s> prepares the associated tt modbus transport tt of this </s>
|
funcom_train/44842370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectPreviousRowTo(int row) {
// Select previous row, if any
row--;
if (row == -1) {
// First row was deleted, check if there are any rows left
if(getRowCount() > 0) {
row = 0;
}
}
if (row != -1) {
setRowSelectionInterval(row, row);
}
}
COM: <s> selects the previous row to the supplied row </s>
|
funcom_train/17776799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCheminPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CompteID_chemin_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CompteID_chemin_feature", "_UI_CompteID_type"),
ClientPackage.Literals.COMPTE_ID__CHEMIN,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the chemin feature </s>
|
funcom_train/31684316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLiveProperties(Document propertiesDocument) {
Element properties = (Element) propertiesDocument.getDocumentElement();
Element p = null;
p =
(Element) ((Element) properties)
.getElementsByTagNameNS("DAV:", "supportedlock")
.item(0);
if (p != null) {
properties.removeChild(p);
}
// remove the live properties that are repository specific
propertiesManager.removeLiveProperties(propertiesDocument);
}
COM: <s> remove the live dav properties from the properties document </s>
|
funcom_train/48528182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(Timer timer) {
if (logger.level <= Logger.INFO) logger.log("installing partition handler");
timer.schedule(this, env.getParameters().getInt("partition_handler_check_interval"),
env.getParameters().getInt("partition_handler_check_interval"));
}
COM: <s> this method starts the partition handlers probing of candidate nodes </s>
|
funcom_train/50512703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void editSystem() {
// TEST BFSystemContext
// BFSystemContext s = new
// BFSystemContext(myPanelMap.my2DView.getCurrentSystem());
// s.hasGameUserJumpshipsOnSystem();
// s.hasOtherGameUserJumpshipOnSystem();
DialogEditSystem mySystemEditor = new DialogEditSystem(this, myPanelMap.my2DView.getCurrentSystem());
mySystemEditor.setVisible(true);
myPanelMap.my2DView.fullRepaint();
} // editSystem
COM: <s> edit the selected system </s>
|
funcom_train/45255656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IAction getAction(IViewDescriptor desc) {
// Keep a cache, rather than creating a new action each time,
// so that image caching in ActionContributionItem works.
IAction action = (IAction) actions.get(desc.getId());
if (action == null) {
if (desc != null) {
action = new ShowInAction(window, desc);
actions.put(desc.getId(), action);
}
}
return action;
}
COM: <s> returns the action for the given view id or null if not found </s>
|
funcom_train/44448247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attachData(LPCData d) {
if (d == null) {
signal = null;
repaint();
return;
}
signal = d;
xMax = signal.getLength() - 1;
xMin = 0;
energy = new double[signal.getLength()][num_of_freq / 2];
colorindex = new int[signal.getLength()][num_of_freq / 2];
computeSpectrum();
}
COM: <s> set signal and relative parameters compute spectrogram </s>
|
funcom_train/13996060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintSelector(Graphics g, Dimension componentSize) {
// border
g.setColor(SystemColor.textHighlight);
g.drawRect(0, 0, componentSize.width - 1, componentSize.height - 1);
// light inner area
g.setColor(getSelectionColor());
g.fillRect(1, 1, componentSize.width - 2, componentSize.height - 2);
}
COM: <s> paints the selector background </s>
|
funcom_train/28757371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFooterforeground(String newVal) {
if ((newVal != null && this.footerforeground != null && (newVal.compareTo(this.footerforeground) == 0)) ||
(newVal == null && this.footerforeground == null && footerforeground_is_initialized)) {
return;
}
this.footerforeground = newVal;
footerforeground_is_modified = true;
footerforeground_is_initialized = true;
}
COM: <s> setter method for footerforeground </s>
|
funcom_train/22685416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public Map createFont(Map values, String fontID,boolean renderPage,Map descFontValues) throws Exception{
LogWriter.writeMethod("{readType3Font}"+values, 0);
fontTypes=StandardFonts.TYPE3;
Map fontDescriptor =super.createFont(values, fontID,renderPage,descFontValues);
if (fontDescriptor != null)
readEmbeddedFont(values);
readWidths(values);
readEmbeddedFont(values);
//make sure a font set
if (renderPage)
setFont(getBaseFontName(), 1);
return fontDescriptor;
}
COM: <s> read in a font and its details from the pdf file </s>
|
funcom_train/3482495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean logMatch(Matcher matcher) {
// StringBuffer buffer = new StringBuffer();
// buffer.append(getType()).append(" ").append(getFile().getRelativePath());
// if (getMessage() != null) buffer.append(" ").append(getMessage());
// log(buffer.toString(), Project.MSG_VERBOSE);
// always consider matches for include/exclude rules as they have no nested allow/deny rules
return true;
}
COM: <s> log the current match from this file </s>
|
funcom_train/13524268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSatisfactionOrganizationActorCollectionOfFloat() {
try{
Organization org = Unmarshaller.unmarshallOrgParam("test/staticParameters/StaticMathXML/exemple_org.xml","test/staticParameters/StaticMathXML/exemple_param.xml").getOrganization();
Actor a1=org.getActor("A1");
Collection<Float> test1=new Vector<Float>();
test1.add(-1f);
test1.add(-0.5f);
float satisfaction1=StaticMath.satisfaction(org, a1,test1);
assertTrue(satisfaction1==2);
}
catch(Exception e){
System.err.println("Binding error: "+e.getMessage());
assertTrue(false);
}
}
COM: <s> test the satisfaction for an actor and a list of exchange terms function </s>
|
funcom_train/25642024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printWarning(SourcePosition pos, String msg) {
if (nwarnings < MaxWarnings) {
String prefix = (pos == null) ? programName : pos.toString();
warnWriter.println(prefix + ": " + getText("javadoc.warning") +" - " + msg);
warnWriter.flush();
nwarnings++;
}
}
COM: <s> print warning message increment warning count </s>
|
funcom_train/44851363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValueClassType() {
//set default value
String outValueTypeClass = PropertyDef.DFT_VALUE_TYPE;
if (getValueType() == null) {
return outValueTypeClass;
}
String lValueTypeKey = getValueType().intern();
for (int i = TypeDef.valueTypes.length-1; i >= 0; i--) {
if (lValueTypeKey == TypeDef.valueTypes[i][0]) {
outValueTypeClass = TypeDef.valueTypes[i][1];
break;
}
}
return outValueTypeClass;
}
COM: <s> returns the corresponding java class name to the values type according to </s>
|
funcom_train/32138812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getOutput() {
if(null == outputFile)
return null;
try {
if(output.length() > 0) pushData();
FileReader reader = new FileReader(outputFile);
char[] buffer = new char[BUFFER_SIZE];
int count;
StringBuilder builder = new StringBuilder();
while(-1 != (count = reader.read(buffer)))
builder.append(buffer, 0, count);
return builder.toString();
} catch(IOException ioe) {}
return null;
}
COM: <s> reads in and returns the output produced </s>
|
funcom_train/29680047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageDescriptor getImageDescriptor(String id) {
URL url = null;
try {
url = new URL(getBundle().getEntry("/"), id); //$NON-NLS-1$
} catch (MalformedURLException e) {
}
return ImageDescriptor.createFromURL(url);
}
COM: <s> creates and returns a image descriptor given a id </s>
|
funcom_train/9774774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean handlePlane(EuclidianView3D ev, LinkedHashMap<String, String> attrs) {
// <plane show="false"/>
try {
String strShowPlane = (String) attrs.get("show");
// show the plane
if (strShowPlane != null) {
boolean showPlane = parseBoolean(strShowPlane);
ev.setShowPlane(showPlane);
}
return true;
} catch (Exception e) {
//e.printStackTrace();
return false;
}
}
COM: <s> handles plane attributes for euclidian view3 d </s>
|
funcom_train/31702110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPartVisible(int part, boolean isVisible) {
switch (part) {
case X_AXIS :
isDrawXAxis = isVisible;
break;
case Y_AXIS :
isDrawYAxis = isVisible;
break;
default :
throw new IllegalArgumentException("There is no part \"" + part + "\".");
}
}
COM: <s> sets one of the axis x or y visible or invisible </s>
|
funcom_train/43667231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getRedoItem() {
if (redoItem == null) {
redoItem = new JMenuItem("Redo");
redoItem.setFont(new Font(Constants.FONT, Constants.FONT_STYLE_TOOL, 12));
redoItem.setAccelerator(KeyStroke.getKeyStroke(
KeyEvent.VK_Y, ActionEvent.CTRL_MASK));
}
redoItem.setEnabled(false);
return redoItem;
}
COM: <s> this method initializes redo item </s>
|
funcom_train/33498921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List removeRect(Rectangle2D inRect, List list)
{
List resultList = new LinkedList();
Iterator iter = list.iterator();
while(iter.hasNext())
{
Rectangle2D testRect=(Rectangle2D)iter.next();
Rectangle2D part=inRect.createIntersection(testRect);
if(inRect.intersects(testRect))
{
resultList.addAll(getFreeRects(part,testRect));
}
else
resultList.add(testRect);
}
return resultList;
}
COM: <s> removes the rectangles that intersect in rect and replace them with </s>
|
funcom_train/37152709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void adapt(double delta, double learningRate, double momentumRate) {
if (momentum == null) {
momentum = new Pattern(weights.size());
}
Pattern oldWeights = new Pattern(weights);
Pattern deltaTerm = input.multiply(learningRate * delta);
Pattern momentumTerm = momentum.multiply(momentumRate);
weights = weights.add(deltaTerm).add(momentumTerm);
momentum = weights.substract(oldWeights);
}
COM: <s> adapt the weights using the delta rule </s>
|
funcom_train/11725161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkIsVersionable() throws UnsupportedRepositoryOperationException, RepositoryException {
checkStatus();
if (!isNodeType(NameConstants.MIX_VERSIONABLE)) {
String msg = "Unable to perform versioning operation on non versionable node: " + getPath();
log.debug(msg);
throw new UnsupportedRepositoryOperationException(msg);
}
}
COM: <s> check if this node is versionable </s>
|
funcom_train/17805150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUsedInterfacePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RuntimeConnection_UsedInterface_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RuntimeConnection_UsedInterface_feature", "_UI_RuntimeConnection_type"),
CtbPackage.Literals.RUNTIME_CONNECTION__USED_INTERFACE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the used interface feature </s>
|
funcom_train/17140762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shuffleDeck() {
Random generator = new Random();
ArrayList<Card> newDeck = new ArrayList<Card>();
while (getSize() > 0) {
int randomIndex = generator.nextInt(getSize());
Card randomCard = getCard(randomIndex);
this.removeCard(randomCard);
newDeck.add(randomCard);
}
for (Card newCard : newDeck) {
this.addCard(newCard);
}
}
COM: <s> shuffle the deck </s>
|
funcom_train/21336245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeAll() {
// Initialize all exits.
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
initializeHex(new Coords(x, y));
}
}
// good time to ensure hex cache
IdealHex.ensureCacheSize(width + 1, height + 1);
} // End private void initializeAll()
COM: <s> initialize all hexes </s>
|
funcom_train/5421673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkTime() {
long t1 = System.currentTimeMillis();
long tdiff = t1 - t0;
assertTrue("clock is " + (1000-tdiff) + "ms to fast", tdiff > 800);
assertTrue("clock is " + (tdiff-1000) + "ms to slow", tdiff < 1200);
}
COM: <s> here we check the measured time </s>
|
funcom_train/1960227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSizeGetEmpty(){
b = new SlidingWindowBuffer(2);
try {
b.put(0,(byte)0);
b.get();
b.get();
} catch (NetSimException e) {
return;
}
fail("got something from and empty buffer");
}
COM: <s> checks if getting data from an empty buffer results in an exception </s>
|
funcom_train/965010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addGrowing(JComponent[] buttons) {
int length = buttons.length;
for (int i = 0; i < length; i++) {
int index = leftToRight ? i : length -1 - i;
addGrowing(buttons[index]);
if (i < buttons.length - 1)
addRelatedGap();
}
}
COM: <s> adds a sequence of related growing buttons </s>
|
funcom_train/39189241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNewEndCopyAsString( long TimeZone) {
if ( NewEndCopy == null )
return null;
else if ( TimeZone == 0 )
return NewEndCopy.toString();
else {
TimeConverter.setTime( NewEndCopy.getTime() + (TimeZone*60000));
return TimeConverter.toString();
}
}
COM: <s> gets the local time when the new vlaue was changed again </s>
|
funcom_train/9086752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Equipments update(Equipments entity) {
EntityManagerHelper.log("updating Equipments instance", Level.INFO,
null);
try {
Equipments result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved equipments entity and return it or a copy of </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.