__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/22233853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReverbBounds(Bounds reverbVolume) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_REVERB_DELAY_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes26"));
((AuralAttributesRetained)this.retained).setReverbBounds(reverbVolume);
}
COM: <s> set reverberation bounds volume </s>
|
funcom_train/32779637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BufferedImage getSnapShot(String title){
int w = this.getWidth();
int h = this.getHeight();
BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_4BYTE_ABGR);
synchronized(this.getTreeLock()){
Graphics2D g = image.createGraphics();
this.paint(g);
if( title != null){
g.setColor(Grafic.COLOR_FOREGROUND);
g.setFont(Grafic.FONT_DEFAULT);
g.drawString(title, 10, 20);
}
}
return image;
}
COM: <s> paints a snapshot of this view grafic in a buffered image </s>
|
funcom_train/28261837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enterIdlePhase() {
// Reset registers
msr &= 0x0F; // leave drive status untouched
msr |= FDC_CMD_MRQ; // data register ready
// Reset command variables
commandComplete = true;
commandIndex = 0;
commandSize = 0;
commandPending = 0;
// Reset buffer index
floppyBufferIndex = 0;
logger
.log(Level.INFO, "[" + super.getType() + "]"
+ " idle phase finished");
}
COM: <s> reset parameters after result or execution phase </s>
|
funcom_train/17718969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Texture getTexture(String resourceName) throws IOException {
Texture tex = table.get(resourceName);
if (tex != null) {
return tex;
}
tex = getTexture(resourceName,
GL11.GL_TEXTURE_2D, // target
GL11.GL_RGBA, // dst pixel format
GL11.GL_LINEAR, // min filter (unused)
GL11.GL_LINEAR);
table.put(resourceName,tex);
return tex;
}
COM: <s> load a texture </s>
|
funcom_train/6464441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEvaluator(IEvaluator evaluator) {
evaluated = false;
if(evaluator == null) {
this.evaluator = null;
AILibException e = new AILibException(this.getClass(), "setEvaluator(IEvaluator)", Messages.get("null.argument"));
} else {
this.evaluator = evaluator;
}
}
COM: <s> sets the evaluation handler for this genome </s>
|
funcom_train/44137725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent e) {
if(m_Selectionnable) {
m_x0 = this.getX() + e.getX();
m_y0 = this.getY() + e.getY();
if(this.m_pane != null)
this.m_pane.onComponentSelection(this, e.isShiftDown());
this.onSelect();
}
}
COM: <s> call when mouse id pressed on the component </s>
|
funcom_train/50310822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackPageButtonState(int backPageButtonState) {
int oldBackPageButtonState = this.backPageButtonState;
this.backPageButtonState = backPageButtonState;
propertyChangeSupport.firePropertyChange("backPageButtonState", new Integer(oldBackPageButtonState), new Integer(backPageButtonState));
}
COM: <s> setter for property back page button state </s>
|
funcom_train/23410363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addParameterPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InputMessageMap_parameter_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InputMessageMap_parameter_feature", "_UI_InputMessageMap_type"),
TasksPackage.Literals.INPUT_MESSAGE_MAP__PARAMETER,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the parameter feature </s>
|
funcom_train/50096050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testConjugateGradientMinimization() throws Exception {
//logger.debug("");
//logger.debug("FORCEFIELDTESTS with Conjugate Gradient Minimization");
gm.setConvergenceParametersForCGM(100, 0.00001);
gm.conjugateGradientMinimization(molecule3Coordinates, tpf);
for (int i = 0; i < molecule3Coordinates.getSize(); i++) {
Assert.assertEquals(testResult3C[i], gm.getConjugateGradientMinimum().getElement(i), 0.00001);
}
}
COM: <s> a unit test for junit conjugate gradient method minimization </s>
|
funcom_train/41017902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
// register all existing configurations as MBeans
Configuration[] configurations = this.getConfigurations();
if (configurations != null) {
for (Configuration configuration : configurations) {
this.getConfigurationMBean(configuration, configuration
.getPid());
}
}
this.serviceRegistration = super.getBundleContext().registerService(
ConfigurationListener.class.getName(), this, null);
}
COM: <s> registers all existing configurations as mbeans </s>
|
funcom_train/49427842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPreferredInnerWidth() {
int right = getInnerX();
if(children != null) {
for(int i=0,n=children.size() ; i<n ; i++) {
Widget child = children.get(i);
right = Math.max(right, child.getRight());
}
}
return right - getInnerX();
}
COM: <s> computes the preferred inner width the size of the widget without the border </s>
|
funcom_train/37822966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onNodesAdded(List<Integer> nodes){
if(nodes == null || nodes.isEmpty()) return;
if(stack.isEmpty()) return;
if(queueRemoved) return;
if(stack.peek().containsAll(nodes)) return;
stack.peek().addAll(nodes);
for(int i:nodes) {
map.put(i, NodeStatus.UNTOUCHED);
addedNodes.add(i);
}
repaint();
}
COM: <s> this method adds nodes to the topmost stack line and their </s>
|
funcom_train/3467345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onCreate(TransactionFileSystem p_fileSystem, java.lang.String p_name) {
// @BEGINPROTECT _3D5A12A403E0
this.setFileSystem(p_fileSystem);
this.setName(p_name);
this.setOriginal(new java.io.File(p_name));
this.setLineSep(System.getProperty("line.separator"));
// @ENDPROTECT
}
COM: <s> internally used by the constructors </s>
|
funcom_train/12191852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Pattern compileExcludedHostList() {
Pattern excludedHostRE = null;
String excludedHostList = getSystemPropertyAsString(
HTTPSystemPropertyKeys.PROXY_EXCLUDE);
if (excludedHostList != null) {
// Create a REProgram from the glob list of excluded hosts.
String expr = createREFromGlobList(excludedHostList);
excludedHostRE = Pattern.compile(expr);
}
return excludedHostRE;
}
COM: <s> compile the excluded host list into a regular expression </s>
|
funcom_train/2450370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Operand and(Operand lhs, Operand rhs) {
throw new IllegalArgumentException("Logical AND cannot be applied to '" + lhs.toString() + //$NON-NLS-1$
"' and '" + rhs.toString() + "'."); //$NON-NLS-1$ //$NON-NLS-2$
}
COM: <s> logical and of two operands returning the result as an operand </s>
|
funcom_train/47859330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setHidden(boolean hidden, String... propertyNames) {
for (String propertyName : propertyNames) {
PropertyDescriptor pd = properties.get(propertyName);
if (pd != null) {
pd.setHidden(hidden);
} else {
LOG.log(Level.WARNING, "Failed to set hidden attribute for property '" +
propertyName + "'. No such property was found");
}
}
}
COM: <s> sets the given named properties to be hidden </s>
|
funcom_train/2036152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addButtons() {
Button submitBtn = new Button("Submit");
submitBtn.ensureDebugId(DebugId.COMMON_SUBMIT_BTN);
Button resetButton = new Button("Reset");
submitBtn.addSelectionListener(new FormSubmitListener(this, submitBtn));
resetButton.addSelectionListener(new FormResetListener(this));
addButton(submitBtn);
addButton(resetButton);
}
COM: <s> adds the buttons </s>
|
funcom_train/44431700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmptyGroups() throws Exception {
PersistChanGrpMgr agroup, bgroup, cgroup;
agroup = makeEmptyGroup("Group Foo");
bgroup = makeEmptyGroup("Group Bar");
cgroup = makeEmptyGroup("Group Too");
assertValidGroup(agroup, "Group Foo", 0);
assertValidGroup(bgroup, "Group Bar", 0);
assertValidGroup(cgroup, "Group Too", 0);
}
COM: <s> a battery of empty groups </s>
|
funcom_train/42253374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkIfHeaders(HttpServletRequest request, HttpServletResponse response, ResourceAttributes resourceAttributes) throws IOException {
return checkIfMatch(request, response, resourceAttributes) && checkIfModifiedSince(request, response, resourceAttributes)
&& checkIfNoneMatch(request, response, resourceAttributes) && checkIfUnmodifiedSince(request, response, resourceAttributes);
}
COM: <s> check if the conditions specified in the optional if headers are satisfied </s>
|
funcom_train/13410891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadSettings() {
// load editor settings
Properties settings = new Properties();
FileInputStream fis = null;
try {
fis = new FileInputStream(getSettingsFileName());
settings.load(fis);
applySettings(settings);
fis.close();
}
catch( FileNotFoundException e)
{
// ignore
if (fis != null) {
try {
fis.close();
} catch (IOException e1) {
Runtime.handleException(e1);
}
}
}
catch (Exception e) {
if (fis != null) {
try {
fis.close();
} catch (IOException e1) {
Runtime.handleException(e1);
}
}
Runtime.handleException(e);
}
}
COM: <s> loads settings meta data for the file </s>
|
funcom_train/37620095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void indexImplements(int x, int iid) throws Unsatisfiable {
usingInterfaces = true;
S.assume(S.a&& hasBeenInitialized);
if (LowlevelUnsatisfiable.refinedReports) {
try {
indexImplements0(x, iid);
} catch (LowlevelUnsatisfiable e) {
throw refine(e);
}
} else {
indexImplements0(x, iid);
}
}
COM: <s> enter the constraint x iid </s>
|
funcom_train/3373552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush() throws BadLocationException {
if (emptyDocument && !insertAfterImplied) {
if (HTMLDocument.this.getLength() > 0 ||
parseBuffer.size() > 0) {
flushBuffer(true);
adjustEndElement();
}
// We won't insert when
}
else {
flushBuffer(true);
}
}
COM: <s> the last method called on the reader </s>
|
funcom_train/3609744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void SwitchTo(int lexState) {
if ((lexState >= 1) || (lexState < 0)) {
throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.",
TokenMgrError.INVALID_LEXICAL_STATE);
} else {
curLexState = lexState;
}
}
COM: <s> switch to specified lex state </s>
|
funcom_train/11007523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test42486 () throws Exception {
HSLFSlideShow hslf = new HSLFSlideShow(_slTests.openResourceAsStream("42486.ppt"));
SlideShow ppt = new SlideShow(hslf);
Slide[] slide = ppt.getSlides();
for (int i = 0; i < slide.length; i++) {
Shape[] shape = slide[i].getShapes();
}
assertTrue("No Exceptions while reading file", true);
}
COM: <s> bug 42486 failure parsing a seemingly valid ppt </s>
|
funcom_train/9437552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Message setupSimpleMessage() {
Message message = new Message();
message.mTimeStamp = System.currentTimeMillis();
message.mFrom = Address.parseAndPack("Jones@Registry.Org");
message.mTo = Address.parseAndPack("Smith@Registry.Org");
message.mMessageId = "1234567890";
return message;
}
COM: <s> prepare to send a simple message see set receive simple message </s>
|
funcom_train/2888667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleEvent(HostStateEvent e) {
log.info("Hosts State Changed: " + e.getHostName() + " : " + e.isAvailable());
ActiveProfileUpdater updater = new ActiveProfileUpdater();
updater.setMachineAvailability(e.getHostName(), e.isAvailable());
}
COM: <s> updates the state of a given host in the database </s>
|
funcom_train/50499800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void actionOneDict() {
if ( m_dictList.getSelectedIndex() != -1 ) {
leave();
JDictPBase.getInstance().changeToPanel( CRSCurPanel.PANEL_ONEDICT, m_dicts[ m_dictList.getSelectedIndex() ], null, null );
}
}
COM: <s> goto selected dict </s>
|
funcom_train/2489326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentAlgorithmName(String algname) {
cmbAlgorithm.setSelectedItem(algname);
if(! algname.equals(cmbAlgorithm.getSelectedItem().toString()))
displayError(bundle.getString("unknown_alg_title"),
bundle.getString("unknown_alg_text") + algname);
}
COM: <s> sets the current chosen algorithm name </s>
|
funcom_train/32820634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double distance(List word1, List word2) {
double[] n1 = normalize(word1);
if (n1 == null)
return Double.POSITIVE_INFINITY;
double[] n2 = normalize(word2);
if (n2 == null)
return Double.POSITIVE_INFINITY;
return distance(n1, n2);
}
COM: <s> compute the distance between two words </s>
|
funcom_train/4049226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resume() {
if (resumeAutomatic != null) {
if (resumeAutomatic.equals(Boolean.FALSE))
((Scheduler)(Scheduler.getInstance())).schedule(this);
else throw new IllegalStateException(this + ".resume()1");
}
else throw new IllegalStateException(this + ".resume()2");
}
COM: <s> resume the execution of computation </s>
|
funcom_train/36106736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getInserisciFirmaCommand() {
if (inserisciFirmaCommand == null) {//GEN-END:|96-getter|0|96-preInit
// write pre-init user code here
inserisciFirmaCommand = new Command("Inserisci Firma", Command.SCREEN, 3);//GEN-LINE:|96-getter|1|96-postInit
// write post-init user code here
}//GEN-BEGIN:|96-getter|2|
return inserisciFirmaCommand;
}
COM: <s> returns an initiliazed instance of inserisci firma command component </s>
|
funcom_train/18939618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unwantedWorker(PeerComponent component, ServiceID workerID, RequestSpec requestSpec, DeploymentID lwpcID) {
LocalWorkerProvider lwp = getLocalWorkerProviderProxy();
AcceptanceTestUtil.setExecutionContext(component, getLocalWorkerProviderDeployment(), lwpcID);
lwp.unwantedWorker(workerID, requestSpec);
}
COM: <s> marks a worker as unwanted without verifying any expected behavior </s>
|
funcom_train/42715137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String resolveAddress(String address) {
String name = "";
try {
for (int i = 0;; i++) {
// Vectors without generics SUCK
Buddy temp = (Buddy) buddys.elementAt(i);
if (address.equals(temp.getAddress())) {
name = temp.getName();
}
}
} catch (ArrayIndexOutOfBoundsException e) {
}
return name;
}
COM: <s> looks for an address and if its found the corresponding name is returned </s>
|
funcom_train/31172464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPserver(String pserver) {
if(pserver.equals("yes")) {
this.isPServer=true;
} else if(pserver.equals("no")){
this.isPServer=false;
} else {
throw new BuildException("pserver attribute must be 'yes' or 'no':"+method);
}
}
COM: <s> set whether or not the server is pserver </s>
|
funcom_train/1561605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initGUI() {
//setTitle(app.getPlain("ConstructionProtocol"));
setFont(app.getPlainFont());
//setMenuBar();
getStyleBar().setLabels();
// set header values (language may have changed)
for (int k = 0; k < tableColumns.length; k++) {
tableColumns[k].setHeaderValue(data.columns[k].getTranslatedTitle());
}
table.updateUI();
table.setFont(app.getPlainFont());
data.updateAll();
}
COM: <s> inits gui with labels of current language </s>
|
funcom_train/33606763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testZero() {
System.out.println("zero");
R2 instance = new R2();
VectorSpaceElement expResult = null;
VectorSpaceElement result = instance.zero();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of zero method of class r2 </s>
|
funcom_train/43279121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String replaceLocalAddress(String url) {
String localIp = localIpAddressProvider.getLocalIp();
int index = url.indexOf(localIp);
if (index > -1) {
url = url.substring(0, index) + LOCALHOST
+ url.substring(index + localIp.length());
}
index = url.indexOf(LOCALHOST_IP);
if (index > -1) {
url = url.substring(0, index) + LOCALHOST
+ url.substring(index + LOCALHOST_IP.length());
}
return url;
}
COM: <s> replace the local addess 127 </s>
|
funcom_train/25118974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Font getFont(String path, double size) throws LoadResourceException {
FontMeta meta;
try {
meta = metaCollection.getFontMeta(path, resourceSet);
} catch (SetDoesNotExistException e) {
throw new LoadResourceException(path, e);
} catch (ResourceDoesNotExistException e) {
throw new LoadResourceException(path, e);
} catch (WrongResourceTypeException e) {
throw new LoadResourceException(path, e);
}
return fonts.getResource(path, this, meta, size);
}
COM: <s> get a font resource corresponding to a certain path </s>
|
funcom_train/3043564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateReachables( Object[] fields, Type[] types, Object owner ) throws HibernateException, SQLException {
// This method assumes wrap was already called on fields
for ( int i=0; i<types.length; i++ ) {
updateReachable( fields[i], types[i], owner );
}
}
COM: <s> given an array of fields search recursively for collections and update them </s>
|
funcom_train/46982350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TagTreeNodeInterface parseXML(String filePath) throws IOException, ParserConfigurationException, SAXException{
File file = new File(filePath);
SAXMenuParser handler;
SAXParserFactory parserFactory = SAXParserFactory.newInstance();
handler = new SAXMenuParser();
SAXParser saxParser = parserFactory.newSAXParser();
saxParser.parse(file, handler);
return handler.getInformation();
}
COM: <s> parses in the specified file and returns a tag tree node interface object </s>
|
funcom_train/2879830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean visit(IResourceDelta delta) throws CoreException {
if (null == delta) {
throw (new CoreException(new Status(IStatus.ERROR,
SmartFrogPlugin.getPluginId(), 0,
Messages.getString("SmartFrogBuildDeltaVisitor.0"), null))); //$NON-NLS-1$
}
IResource resource = delta.getResource();
checkRmiClass(resource);
return true;
}
COM: <s> visits the given resource delta </s>
|
funcom_train/4933043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
final URI fileUri = projectGUI.popupFileChooser( ".n3" , false);
final File file = new File(fileUri);
if( file.exists() ) {
Logger.getLogger("theDefault").info(MessageFormat.format(GuiResourceBundle.getString("saveas.actionperformed.file.0.already.exists.cannot.be.saved.here"), file) );
} else {
saveEditorContent(file);
}
}
COM: <s> todo add to the project the newly created file </s>
|
funcom_train/8686656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean delegateIteratorToList() {
if (getClass().equals(Path.class)) {
return false;
}
try {
Method listMethod = getClass().getMethod("list", (Class[]) null);
return !listMethod.getDeclaringClass().equals(Path.class);
} catch (Exception e) {
//shouldn't happen, but
return false;
}
}
COM: <s> helps determine whether to preserve bc by calling code list code on subclasses </s>
|
funcom_train/12366129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PacketData readPacketData() throws IOException {
byte[] field = readByteArray();
// byte[] dataType = readByteArray();
int dataType = readInt();
byte[] data = readByteArray();
// try{
return new PacketData(field, dataType, data);
// }catch(NumberFormatException e){
// throw new
// ThisShouldntHappenException("jcom.communication.InputStreamImpl", e);
// }
}
COM: <s> read a packet data </s>
|
funcom_train/19977977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(Locale locale){
try {
ResourceBundle bundle = ResourceBundle.getBundle(
getClass().getName(), locale, getClass().getClassLoader());
return bundle.getString(stringValue());
}
catch(MissingResourceException e){
}
if (label != null){
return label;
}
return stringValue();
}
COM: <s> returns this enums human readable description in the specified locale </s>
|
funcom_train/22965470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage(String imageFileName) {
log.debug("setImage - enter with imageFileName = " + imageFileName);
try {
_image = com.sun.image.codec.jpeg.JPEGCodec.createJPEGDecoder(
new java.io.FileInputStream(imageFileName))
.decodeAsBufferedImage();
} catch (Exception e) {
log.warn("setImage - exception", e);
}
log.debug("setImage - exit");
}
COM: <s> set the jpeg image from file path </s>
|
funcom_train/35071964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDaysLate() {
return 0;
// long now = System.currentTimeMillis();
// long due = nextDueDate.getTime();
//
// if (now < due) return 0; // not due yet.
// long dif = now - due; // milliseconds late
//
// return (int)dif / 1000 / 60 / 60 / 24; // days late;
}
COM: <s> identifies the number of days payments are late </s>
|
funcom_train/11345145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addListener(String itf, ServiceListener listener) {
synchronized (this) {
List list = (List) m_listeners.get(itf);
if (list == null) {
list = new ArrayList(1);
list.add(listener);
m_listeners.put(itf, list);
} else {
list.add(listener);
}
}
}
COM: <s> adds a new service listener to the </s>
|
funcom_train/50077087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getAllGroupIds() {
Collection grpIds = new ArrayList();
Collection grps = getAllIGroups();
Iterator iter = grps.iterator();
while(iter.hasNext()) {
IGroup grp = (IGroup) iter.next();
grpIds.add(grp.getId());
}
return grpIds;
}
COM: <s> gets the ids of all groups of the work tab </s>
|
funcom_train/38316427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doEndTag() throws JspTagException {
String val = null;
JLCPUser user = (JLCPUser) pageContext.getAttribute("currentOnlineUser");
val = user.getName();
JspWriter out = pageContext.getOut();
try {
out.write(val);
} catch (IOException e) {
throw new JspTagException("Error writing to page");
}
return EVAL_PAGE;
}
COM: <s> get the user from the parent tag and print out the users buddyname </s>
|
funcom_train/37587356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void breakpointReached(Breakpoint bp) {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) {
_listeners.get(i).breakpointReached(bp);
}
}
finally { _lock.endRead(); }
}
COM: <s> called when a breakpoint is reached during execution </s>
|
funcom_train/33645921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BoundingBoxAssert hasUpperBound(Point3d upper) {
// check that actual BoundingBox we want to make assertions on is not null.
isNotNull();
Point3d actualUpper = new Point3d();
actual.getUpper(actualUpper);
// check that actual bound is (epsilon) equal to the given bound
Point3dAssert.assertThat(actualUpper).isEqualTo(upper);
// return the current assertion for method chaining
return this;
}
COM: <s> verifies that the actual upper bound is epsilon equal to the given one </s>
|
funcom_train/19073842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActiveInput(String newActiveInput) {
StreamInputSynapse inp = getInputSynapse(newActiveInput);
if (inp==null){
String nm=newActiveInput==null?"":newActiveInput;
log.warn("Synapse ["+nm+"] not registered in switch. Setting active synapse to empty value.");
}
this.activeSynapse = inp;
}
COM: <s> sets the input synapse connected to the output </s>
|
funcom_train/33645734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setHeightAtPoint(final float[] heightData, final float height, final int x, final int z) {
int baseIndex = (x + z * size) * 3;
heightData[baseIndex] = x;
heightData[baseIndex + 1] = height;
heightData[baseIndex + 2] = z;
}
COM: <s> sets the height value for a given coordinate </s>
|
funcom_train/20774556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double calBestMatchingProb(double[] sample){
double bestProb = Double.NEGATIVE_INFINITY;
for(int delay = 0; delay<numElements; delay++){
double prob = calProbWithDelay(sample, delay, false);
if(prob > bestProb)
bestProb = prob;
}
return bestProb;
}
COM: <s> calculates the best matching probability </s>
|
funcom_train/7661533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvokeAny4() {
ExecutorService e = new DirectExecutorService();
try {
ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
l.add(new NPETask());
e.invokeAny(l);
} catch(ExecutionException success) {
} catch(Exception ex) {
unexpectedException();
} finally {
joinPool(e);
}
}
COM: <s> invoke any c throws execution exception if no task in c completes </s>
|
funcom_train/24184756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test2QueuesInSeries () throws InterruptedException {
// Send a message to the first queue
Message msg = new Message ("2 queues in series");
MessageWrapper wrap = new MessageWrapper (msg);
wrap.setDestination("queue1");
toQueue1.addMessage(wrap);
if (this.measureTime) {
// Give some time to the sender before starting the CentralMailer
Thread.sleep(100);
mailman.execute();
}
// Get the message from the second queue and check for equality
assertEquals(msg, this.collector.getNextMsgTimed());
if(this.measureTime)
mailman.end();
}
COM: <s> this test connects two queues in series using a queue iopipe </s>
|
funcom_train/30237880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeException(){
if(!isHead() && null == getExecReturn() && null != getSer() ){
String message = getMessage();
Integer code = getCode().code;
ResponseException re = new ResponseException(message,code);
setExecReturn(new ExecutorReturn(re));
}
}
COM: <s> if there is no return object and it was not a head request </s>
|
funcom_train/1958144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void trAddResult(Vector v, HostCommRenderer target){
Element trace = new Element("trace");
Attribute dst = new Attribute("dst", target.getIpAddress());
trace.setAttribute(dst);
Element host;
Attribute ip;
for(int i = 0; i < v.size(); i++){
host = new Element("host");
ip = new Attribute("ip", (String)v.get(i));
host.setAttribute(ip);
trace.addContent(host);
}
trResultsRoot.addContent(trace);
}
COM: <s> add a new to trace to the result document </s>
|
funcom_train/20875360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNrRealStudents(boolean precise) {
if (!precise)
return getStudents().size() - iNrDummyStudents;
int nrRealStudents = 0;
for (Student student : getStudents()) {
if (!student.isDummy())
nrRealStudents++;
}
return nrRealStudents;
}
COM: <s> number of real </s>
|
funcom_train/11404973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Class getFactory(Class type) {
Class result = null;
Class[] interfaces = type.getInterfaces();
// look for XMLBeans inner class Factory
for (Class inter : interfaces) {
Class[] declared = inter.getDeclaredClasses();
for (Class c : declared) {
if (c.getSimpleName().equals("Factory")) {
result = c;
}
}
}
return result;
}
COM: <s> locate the xmlbean code factory code inner class </s>
|
funcom_train/8369324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand2() {
if (exitCommand2 == null) {//GEN-END:|475-getter|0|475-preInit
// write pre-init user code here
exitCommand2 = new Command("Beenden", Command.EXIT, 0);//GEN-LINE:|475-getter|1|475-postInit
// write post-init user code here
}//GEN-BEGIN:|475-getter|2|
return exitCommand2;
}
COM: <s> returns an initiliazed instance of exit command2 component </s>
|
funcom_train/32766757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double notch(int intFreq, double[] arrFunc) {
double[] arrTrans = getSineTransformer().transform(arrFunc);
arrTrans[intFreq] = 0.0;
double[] arrFilt1 = getSineTransformer().transform(arrTrans);
double dblPower = DigitalFunctionUtility.compError(arrFilt1, arrFunc);
return dblPower;
}
COM: <s> notch filter with unity bandwidth </s>
|
funcom_train/3703221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getBetweenTimeAsDescription() {
String strStart = getStartBetweenTimeAsString();
String strEnd = getEndBetweenTimeAsString();
if (strStart != null && strEnd != null) {
return ("between " + strStart + " and " + strEnd);
}
return (null);
} // of method
COM: <s> get the between time as a human readable string </s>
|
funcom_train/22353773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean saveSynchronously() {
CRWriter crw = saveReport();
if (crw == null)
return false;
try {
while (crw.savingInProgress()) {
this.wait(500);
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
return false;
}
return true;
}
COM: <s> saves the current data and waits until saving is finished </s>
|
funcom_train/26016349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void startTransactionTimer() {
if (this.transactionTimerStarted.compareAndSet(false, true)) {
TimerTask myTimer = new TransactionTimer();
if ( sipStack.getTimer() != null ) {
sipStack.getTimer().schedule(myTimer, BASE_TIMER_INTERVAL, BASE_TIMER_INTERVAL);
}
}
}
COM: <s> start the timer task </s>
|
funcom_train/11808184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addElement(CourseElement element) {
if (elements.contains(element))
return false;
if (element instanceof Course) {
Iterator<CourseElement> elem = elements.iterator();
while (elem.hasNext())
if (elem.next() instanceof Course)
return false;
}
boolean ok = elements.add(element);
elementsById.put(element.getId(), element);
saved = false;
fireChangesEvent();
fireElementEvent();
if (element instanceof Chapter)
addRelationship(element, getCourse());
return ok;
}
COM: <s> adds an element to this course </s>
|
funcom_train/24123124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadBootFile() throws InterpreterInitializationException {
try {
List<File> files = AcheronSystem.getBootFiles();
for (File file : files) {
fLoader.load(file);
}
} catch (FileError e) {
throw new InterpreterInitializationException(e.getMessage());
} catch (IOException e) {
throw new InterpreterInitializationException(e.getMessage());
}
}
COM: <s> loads the boot files with the in the constructor supplied </s>
|
funcom_train/32716932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createCopyrightAnnotations() {
String source = "Copyright";
addAnnotation
(this,
source,
new String[] {
"Copyright", "michael lawley",
"Licence", "Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA"
});
}
COM: <s> initializes the annotations for b copyright b </s>
|
funcom_train/7825841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMode(DocumentModes mode, MainWindowInterface window) {
if (this.mode != null)
this.mode.finish(window, this);
switch(mode) {
case DESIGN:
this.mode = designMode;
break;
case SIMULATION:
this.mode = simulationMode;
break;
}
this.mode.applyTo(window, this);
view.draw();
}
COM: <s> document sets command stack of window and enables disables its buttons </s>
|
funcom_train/51187718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getTalkButton() {
if (talkButton == null) {
talkButton = new JButton();
talkButton.setText("Talk");
talkButton.setForeground(new Color(54, 139, 231));
talkButton.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
talkWithAnother();
}
});
}
return talkButton;
}
COM: <s> this method initializes talk button </s>
|
funcom_train/22665768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Task newTask() {
int i;
for(i=0;i<Main.MAXONGLET;i++) {
if(tasks[i]==null) {
break;
}
}
if(i!=Main.MAXONGLET) {
tasks[i]=new DefaultTask();
return tasks[i];
}else{
Utils.Errors.Error.tropAnalyse();
}
return null;
}
COM: <s> basic task creation </s>
|
funcom_train/31871893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class FrameTIT1 extends FrameT {
public String getLongName () { return "Title 1 frame"; }
public FrameTIT1 (ID3V2Frame frm) {
super (frm);
}
public FrameTIT1 (ID3V2Frame frm, DataSource ds)
throws SeekPastEndException {
super (frm, ds);
}
public String toString () {
return getLongName () + " Encoding: "+encoding+"\nTitle 1 : "
+ text;
}
}
COM: <s> title 1 frame </s>
|
funcom_train/4656203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void declareExtensions(ExtensionProfile extProfile) {
extProfile.declare(MessageEntry.class, Rating.getDefaultDescription(false));
extProfile.declare(MessageEntry.class, When.getDefaultDescription(false));
extProfile.declare(MessageEntry.class, GeoPt.getDefaultDescription(false));
extProfile.declare(MessageEntry.class, Who.getDefaultDescription());
}
COM: <s> initializes an extension profile based upon the extensions expected </s>
|
funcom_train/3140647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleJschemeJarUseDefaultButtonSelected() {
final boolean usingDefaultJschemeJar = isUsingDefaultJschemeJarLocation();
if (usingDefaultJschemeJar) {
this.jschemeJarLocalDirectorySelector.setSelection(true);
this.jschemeJarWorkspaceSelector.setSelection(false);
this.jschemeJarFilesystemLocationEntry.setText(JschemePlugin.getDefault().getJSchemeJar().toOSString());
}
updateJschemeJarSelectionEnablement();
}
COM: <s> reset the selectors to use the plugins default jar </s>
|
funcom_train/34890182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readNextIndexFile() throws IOException {
ZipEntry entry;
String currentEntry;
while (zipFileEntries.hasMoreElements()) {
entry = (ZipEntry) zipFileEntries.nextElement();
currentEntry = entry.getName();
if (currentEntry.endsWith(".x")) {
currentInStream = zipFiles.elementAt(currentZipFileID).getInputStream(entry);
// changes mX/filename.suffix into X.filename.suffix
return currentEntry.replace('/', '.').substring(1);
}
}
return null;
}
COM: <s> reads next index file and prepares the associated input stream </s>
|
funcom_train/6204724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createValidatorParameterPanel(Composite parent) {
String fqn = getValidatorTemplate().getParameterPanelClassname();
if (fqn == null) {
return;
}
try {
IValidatorParameterPanel panel = RuntimeClassResolver.getValidatorParameterPanel(fqn);
panel.createControl(parent);
setParameterPanel(panel);
} catch (IllegalArgumentException e) {
Label error = new Label(parent, SWT.NULL);
error.setText(e.getMessage());
}
}
COM: <s> create the parameter panel as specified in the validator template </s>
|
funcom_train/4531397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runScript(List<String> args, File dir) throws IOException {
ShellCommandExecutor shexec =
new ShellCommandExecutor(args.toArray(new String[0]), dir);
shexec.execute();
int exitCode = shexec.getExitCode();
if (exitCode != 0) {
throw new IOException("Task debug script exit with nonzero status of "
+ exitCode + ".");
}
}
COM: <s> runs the script given in args </s>
|
funcom_train/43429934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIndex(final int pos,final int val) {
if ( index[pos] != UNALLOCATED ) {
index[pos] = val;
} else {
System.out.println("FEHLER: Class LinkedSet :index["+pos+"] noch nicht belegt!");
System.exit(1);
}
}
COM: <s> sets the board value at a position </s>
|
funcom_train/12628184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Launcher createClassworldLauncher(String scriptName) throws Exception {
org.codehaus.classworlds.Launcher cwl = new org.codehaus.classworlds.Launcher();
cwl.setWorld(new ClassWorld());
InputStream is = new FileInputStream(scriptName);
Configurator configurator = new Configurator(cwl);
configurator.setClassWorld(cwl.getWorld());
configurator.configure(is);
return cwl;
}
COM: <s> creates new classworld launcher </s>
|
funcom_train/51337435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Record getRandomGroundTruthRecord() {
if(r.nextInt(100)>95) {
/*
* 5% of the time we choose the most recently written record to
* see if we can trip up read back on a record that might not be
* "fully" written and recoverable yet.
*/
return records.lastElement();
}
int index = r.nextInt(records.size());
return records.get( index );
}
COM: <s> return a randomly choosen ground truth record </s>
|
funcom_train/46166950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProductGroupHandler getProductGroupHandler(String productGroupName, User user) throws ProductException {
ProductGroup g = null;
try {
g = warehouse.getProductGroup(productGroupName);
} catch (ProductException e) {
throw new ProductException("Kann keinen Produktgruppen-Manager zurueckgeben: " + e.getMessage());
}
return new ProductGroupHandler(g, user, logger);
}
COM: <s> returns a product group handler for a specific product handler </s>
|
funcom_train/36470521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchItemsAsCursor(int container_type, long container_id) {
String idString=(new Long(container_id)).toString();
String table, where, columns[];
if(container_type == ITEM_CONTAINER_TEMPLATE) {
table=TABLE_TEMPLATEITEM;
columns=ITEM_COLUMNS;
where=KEY_TEMPLATEITEM_TEMPLATEID+"=?";
} else {
table=TABLE_CHECKLISTITEM;
columns=CHECKLISTITEM_COLUMNS;
where=KEY_CHECKLISTITEM_CHECKLISTID+"=?";
}
return mDb.query(table, columns,
where, new String[] { idString },
null, null, KEY_ITEM_ORDER);
}
COM: <s> retrieve a cursor of items belonging to the given container e </s>
|
funcom_train/47521278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPages(ResultSet rs) {
int local_max = rs.getNodeLen();
if (FETCH_MAX < local_max) local_max = FETCH_MAX;
l.trace("Adding " + local_max + " new pages");
for (int i = 0; i < local_max; i++ ) {
String keyURL = rs.doc[i].URL;
if ( !pageLinks.containsKey(keyURL) ) {
pageLinks.put(keyURL, rs.doc[i].clickURL);
}
}
}
COM: <s> add up to four pages to the document sample from this result set </s>
|
funcom_train/42642952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPosPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IVocabularyEntry_pos_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IVocabularyEntry_pos_feature", "_UI_IVocabularyEntry_type"),
DigitalHPSPackage.Literals.IVOCABULARY_ENTRY__POS,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the pos feature </s>
|
funcom_train/36949608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void movedFrom(IRubyElement movedFromElement, IRubyElement movedToElement) {
RubyElementDelta removedDelta = new RubyElementDelta(movedFromElement);
removedDelta.kind = REMOVED;
removedDelta.changeFlags |= F_MOVED_TO;
removedDelta.movedToHandle = movedToElement;
insertDeltaTree(movedFromElement, removedDelta);
}
COM: <s> creates the nested deltas resulting from an move operation </s>
|
funcom_train/3421715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String dateToString(DateTimeData date) {
StringBuffer message = new StringBuffer(16);
append(message, date.hour, 2);
message.append(':');
append(message, date.minute, 2);
message.append(':');
append(message, date.second);
append(message, (char)date.utc, 0);
return message.toString();
}
COM: <s> converts time object representation to string </s>
|
funcom_train/8039343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsTraceEnabled() {
VectorAppender appender = new VectorAppender();
appender.activateOptions();
Logger root = Logger.getRootLogger();
root.addAppender(appender);
root.setLevel(Level.INFO);
Logger tracer = Logger.getLogger("com.example.Tracer");
tracer.setLevel(Level.TRACE);
assertTrue(tracer.isTraceEnabled());
assertFalse(root.isTraceEnabled());
}
COM: <s> tests is trace enabled </s>
|
funcom_train/51103038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printProperty(String name, String value) {
printIndent();
out.print("<property name=\"");
out.print(name);
out.print("\" value=\"");
out.print(value);
out.println("\"/>");
indentLine = true;
}
COM: <s> prints a common xml element property with name and value </s>
|
funcom_train/19827255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Accessible getAccessibleChild(int i) {
if (i < 0 || i >= getModel().size()) {
return null;
}
TabData data = getModel().getTab(i);
if (data.getComponent() instanceof Accessible) {
return (Accessible)data.getComponent();
}
return null;
}
COM: <s> return the specified accessible child of the object </s>
|
funcom_train/44137439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clean() {
if(m_Element != null)
m_Element.removeElementEventListener(this);
m_pane = null;
m_Link = null;
m_Element = null;
m_IconsPosition.clear();
m_IconsPosition = null;
m_defVisibleMedia = null;
removeMouseListener(this);
removeMouseMotionListener(this);
}
COM: <s> to clean object before close </s>
|
funcom_train/40910351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateIndex(TypeElement sEClass, VariableElement sEField) {
SEIndex indexAnnot = sEField.getAnnotation(SEIndex.class);
if(indexAnnot!=null){
StringBuilder sbConfig = this.mainGenerator.getDb4oConfig();
sbConfig.append(String.format(
"config.objectClass(%s.class).objectField(\"%s\").indexed(true);",
sEClass.getSimpleName(),
sEField.getSimpleName()
));
}
}
COM: <s> this is used to add necessary index configuration inside a </s>
|
funcom_train/50189002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireSourceComment(SAXEvent saxevent) {
if (hasTraceListeners()) {
// count of registered tracelisteners
int countListener = traceListeners.size();
for (int i = 0; i < countListener; i++) {
TraceListener currentListener =
(TraceListener) traceListeners.elementAt(i);
// call the according method on tracelistener
currentListener.sourceComment(saxevent);
}
}
}
COM: <s> called when a comment event of the source was received </s>
|
funcom_train/947738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateResponse(String argResponse) throws AuthenticationException, DomainException {
if(argResponse.equals("-1")) {
// TODO more detailed messages
throw new AuthenticationException("Authentication failed");
}
else if(argResponse.equals("")) {
throw new DomainException("Result empty");
}
}
COM: <s> validates server response if response is 1 authentication failed </s>
|
funcom_train/9053073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toXML(String rootElement) throws SiteException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
try {
JAXBContext jaxbContext = JAXBContext.newInstance(Comments.class);
Marshaller marshaller = jaxbContext.createMarshaller();
// prevents the <xml ...> declaration at the begging of the fragment
marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
marshaller.marshal(this, bos);
} catch (JAXBException e) {
throw new SiteException("Error during the XML serialization of a comment", e);
}
return bos.toString();
}
COM: <s> return the xml version of the comment </s>
|
funcom_train/45896123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int withAlpha(int c) {
if ((c & 0xFF000000) == 0) {
return c;
}
return 0xFF000000
| (((int)((c & 0xFF0000) * alpha)) & 0xFF0000)
| (((int)((c & 0xFF00) * alpha)) & 0xFF00)
| (((int)((c & 0xFF) * alpha)) & 0xFF)
;
}
COM: <s> apply the alpha value to the supplied color </s>
|
funcom_train/19036743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExperation() throws InterruptedException {
MemberID m1 = new MemberID(1);
String email = "email";
String inviteCode = "inviteCode";
StoredInvitedGuest g1 = new StoredInvitedGuest(m1, email, inviteCode, 100);
Assert.assertFalse(g1.isExpired());
Thread.sleep(200);
Assert.assertTrue(g1.isExpired());
}
COM: <s> test the experation date </s>
|
funcom_train/16910439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeGroup(final ActionEvent event) {
if (this.groupOnFocus != null) {
final KnowledgeGroup parentGroup = this.groupOnFocus.getParent();
if (parentGroup == null) {
this.matrixOnFocus.getKnowledgeGroups().remove(groupOnFocus);
}
else {
parentGroup.getChildren().remove(groupOnFocus);
}
}
}
COM: <s> removes a group from the matrix </s>
|
funcom_train/51821733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeColumn(int index) {
// Remove the header.
egoDataTitles = ArrayTools.removeFromArray(egoDataTitles, index);
// Remove the data.
for (int i = 0; i < egoData.size(); i++) {
String[] dat = (String[])egoData.get(i);
egoData.set(i, ArrayTools.removeFromArray(dat, index));
}
}
COM: <s> removes a column of ego data </s>
|
funcom_train/7615894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFrameFromCenter(double centerX, double centerY, double cornerX, double cornerY) {
double width = Math.abs(cornerX - centerX);
double height = Math.abs(cornerY - centerY);
setFrame(centerX - width, centerY - height, width * 2.0, height * 2.0);
}
COM: <s> sets the framing rectangle given the center point and one corner </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.