__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/2557429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean write(Type type, Object value, NodeMap node, Map map){
Class actual = value.getClass();
Class expect = type.getType();
Class real = actual;
if(actual.isArray()) {
real = writeArray(expect, value, node);
}
if(actual != expect) {
node.put(label, real.getName());
}
return false;
}
COM: <s> this is used to attach a attribute to the provided element </s>
|
funcom_train/40448527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean chromaColorable(int node) {
if(node==nodes.size()) return true;
for(int i=1;i<=chroma;i++) {
if(available(node,i)) {
//System.err.println(node+":"+i);
nodes.get(node).color=i;
if(chromaColorable(node+1)) return true;
}
}
//if(node<=2) System.out.println(chroma+": Exiting: "+node);
nodes.get(node).color=0;
return false;
}
COM: <s> recursive function to find if a graph can be colored with chroma </s>
|
funcom_train/13427516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDecoratingVertex(IVertex decoratingVertex) {
/* David 06/06/2006: Here we allow the setting of a null decoratingVertex */
if (decoratingVertex != null
&& decoratingVertex.getDecoratedIVertex() != this) {
throw new InvalidIVertexException(
"Error occured in syncornisation of the decorators of the edge "
+ this.getName());
}
this.decoratingVertex = decoratingVertex;
}
COM: <s> sets the decorating vertex of the current instance as its upper decorator level </s>
|
funcom_train/10592981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDirectory(File repository) throws IOException {
try {
this.addURL(repository.getCanonicalFile().toURL());
} catch (MalformedURLException mue) {
log.error("The repository had a bad URL", mue);
throw new CascadingIOException("Could not add repository", mue);
}
}
COM: <s> add a directory to the list of searchable repositories </s>
|
funcom_train/2302396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List tools(AutomatonPane view, AutomatonDrawer drawer) {
List list = new java.util.ArrayList();
list.add(new ArrowTool(view, drawer));
list.add(new StateTool(view, drawer));
list.add(new TransitionTool(view, drawer));
list.add(new DeleteTool(view, drawer));
return list;
}
COM: <s> returns a list of tools including a code arrow tool code </s>
|
funcom_train/35723789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clean(IProgressMonitor monitor) throws CoreException {
IFolder folder = project.getFolder(getTranslatableDirectory());
if (folder.exists()) {
debug("clean", folder.getProjectRelativePath());
cleanFolderRecursively(folder, monitor);
} else {
debug("clean", "Not exist. " + folder.getProjectRelativePath());
}
}
COM: <s> cleans the module super source directory </s>
|
funcom_train/4210314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(Roster roster, String targetUserID) {
// Create a new message to send the roster
Message msg = new Message(targetUserID);
// Create a RosterExchange Package and add it to the message
RosterExchange rosterExchange = new RosterExchange(roster);
msg.addExtension(rosterExchange);
// Send the message that contains the roster
con.sendPacket(msg);
}
COM: <s> sends a roster to user id </s>
|
funcom_train/611381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void markCurrentLocation(String inLocation){
System.out.println("trying to mark : " + inLocation);
Object result = this.dpMap.get(inLocation);
if(result == null){
System.out.println("could not find it");
Enumeration en = this.dpMap.keys();
while(en.hasMoreElements()){
Object nextObj = en.nextElement();
System.out.println("key : " + nextObj);
}
}
else{
System.out.println("found it");
this.setCurrentLocation(result);
}
}
COM: <s> this is the method for marking a current location </s>
|
funcom_train/32114438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void pushValue(String tag, String value) {
value = value.trim(); //trim the value.
if (tag == null) {
this.value = value;
}
else {
JavaDocTagList tagList = get(tag);
if (tagList == null) {
tagList = new JavaDocTagList(value);
put(tag, tagList);
}
else {
tagList.add(value);
}
}
}
COM: <s> pushes a value onto a tag </s>
|
funcom_train/4427846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createWrites(Procedure procedure) {
Pattern outputPattern = staticCls.getOutputPattern();
for (Port port : outputPattern.getPorts()) {
int numTokens = outputPattern.getNumTokens(port);
Var var = actor.getStateVar(port.getName());
System.out.println("must write " + numTokens + " tokens from "
+ var.getName());
}
}
COM: <s> creates calls to write instructions </s>
|
funcom_train/45643437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillTable() {
this.availableAlphabetsTable.removeAll();
logger.debug("filling the alphabets table");
for (int i=0; i < tempAlphas.size(); i++) {
newTableItem(tempAlphas.get(i).getName(), tempAlphas.get(i).isBasic(), tempAlphas.get(i).isDefaultAlphabet(), i);
}
}
COM: <s> fills and updates the table displaying the various alphabets </s>
|
funcom_train/40793632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSendCommand() {
if (sendCommand == null) {//GEN-END:|158-getter|0|158-preInit
// write pre-init user code here
sendCommand = new Command("Send", Command.ITEM, 0);//GEN-LINE:|158-getter|1|158-postInit
// write post-init user code here
}//GEN-BEGIN:|158-getter|2|
return sendCommand;
}
COM: <s> returns an initiliazed instance of send command component </s>
|
funcom_train/3395017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitIf(JCIf tree) {
JCTree cond = tree.cond = translate(tree.cond, syms.booleanType);
if (cond.type.isTrue()) {
result = translate(tree.thenpart);
} else if (cond.type.isFalse()) {
if (tree.elsepart != null) {
result = translate(tree.elsepart);
} else {
result = make.Skip();
}
} else {
// Condition is not a compile-time constant.
tree.thenpart = translate(tree.thenpart);
tree.elsepart = translate(tree.elsepart);
result = tree;
}
}
COM: <s> visitor method for if statements </s>
|
funcom_train/28117913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getExitButton() {
if (exitButton == null) {
exitButton = new JButton();
exitButton.setText("Exit");
exitButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
MainProg.quit("User has requested through Our Chat Expansion to exit.", true);
}
});
}
return exitButton;
}
COM: <s> this method initializes j button1 </s>
|
funcom_train/21995164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInt(String key) throws RpcException {
try {
authorize(Settings.GET_INT);
return getBus().getInt(getUser().getId(), key);
}
catch (JRecSecurityException e) {
throw new RpcException("security-problem obtaining setting", e);
}
catch (BusException e) {
throw new RpcException("bus-problem obtaining setting", e);
}
}
COM: <s> access to the settings table and return an int </s>
|
funcom_train/50313091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPageIncrement (int pageIncrement) {
checkWidget ();
if (pageIncrement < 1) return;
int[] range = Fox.FXSlider_getRange(handle);
if (pageIncrement > range[1] - range[0]) return;
Fox.FXSlider_setTickDelta(handle, pageIncrement);
Fox.FXWindow_update(handle); // Fox doesn't correctly redraw the slider
}
COM: <s> sets the amount that the receivers value will be </s>
|
funcom_train/49050037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectiveDesc addItemDescription (String inDescription, String inItemId) {
ObjectiveDesc objDesc = null; // return value.
// Get the item. If found, add the description.
//
ItemType item = getItem (inItemId);
if (item != null) {
objDesc = addItemDescription (inDescription, item);
}
return objDesc;
} // end addItemDescription (String inDescription, String inItemId).
COM: <s> add the given description to the item with the given identifier </s>
|
funcom_train/29871312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJViewTemplateNewTemplateButton() {
if (jViewTemplateNewTemplateButton == null) {
jViewTemplateNewTemplateButton = new JButton();
jViewTemplateNewTemplateButton.setText("New Template");
jViewTemplateNewTemplateButton
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
clickJViewTemplateNewTemplateButton();
}
});
}
return jViewTemplateNewTemplateButton;
}
COM: <s> this method initializes j view template new template button </s>
|
funcom_train/11730134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String normalizeLineSeparators(String stringValue) {
// Replace "\r\n" (Windows format) with "\n" (Unix format)
stringValue = stringValue.replaceAll("\r\n", "\n");
// Replace "\r" (Mac format) with "\n" (Unix format)
stringValue = stringValue.replaceAll("\r", "\n");
return stringValue;
}
COM: <s> replaces platform dependant line separators in code string value code </s>
|
funcom_train/42868239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transfer(OutputStream out, int length) throws IOException {
int buffSize = (length < MAX_TRANSFER_BUFFER_SIZE) ? length : MAX_TRANSFER_BUFFER_SIZE;
byte[] buffer = new byte[buffSize];
int read;
while ((read = in.read(buffer)) > 0) {
out.write(buffer, 0, read);
}
}
COM: <s> transfer a number of bytes to an output stream </s>
|
funcom_train/4175964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CampoPopupLocalizador getCplFabricante() throws Exception
{
if (cplFabricante == null)
{
cplFabricante = new CampoPopupLocalizador();
cplFabricante.setCampoPesquisa("nome");
cplFabricante.setAtributoVisualizacao("Nome");
cplFabricante.setClassePesquisa("business.cadastrosBasicos.Fabricante");
cplFabricante.setFormatoGridPesquisa(formatarGridPesquisaFabricante());
cplFabricante.setDescricaoPesquisa("Nome Fabricante");
cplFabricante.setLocation(new Point(179, 58));
cplFabricante.setSize(new Dimension(284, 20));
}
return cplFabricante;
}
COM: <s> this method initializes cmb unidade medida </s>
|
funcom_train/27789389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void syncGuiToModel(Category[] cats) {
BooleanTranslator aBTr = getBooleanTranslator();
for (int i = 0; i < cats.length; i++)
cats[i].setSelected(
aBTr.translate((String) getCategorySelectionHash().get(cats[i].getID())));
}
COM: <s> translator keeps copy of category array in itself </s>
|
funcom_train/13441364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttribute(String name, Object value) {
try {
IntrospectionUtils.setAttribute(this,
name,
value);
} catch (Exception exc) {
if (getLogger().isLoggable(Level.SEVERE)) {
getLogger().log(Level.SEVERE,
"Failed to set attribute "
+ name,
exc);
}
}
} //
COM: <s> from protocol handler interface </s>
|
funcom_train/5395437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeIndex(SimpleType type, Integer idx, DataOutputStream dos) {
try {
dos.writeByte((byte) (SimpleType.TYPE_LOOKUP & type.getDataType()));
// TODO: Start with bytes, then shorts, then ints...
dos.writeShort((short) idx.intValue());
} catch (IOException ioe) {
log.fatal(ioe);
}
}
COM: <s> store a string table index </s>
|
funcom_train/38385484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void defineSets(REDXMLManager manager, String styleSet, String ruleSet) {
fStyleSet = (REDBracketMatcherDefinitionStyleSet) manager.getClientData("styleSet." + styleSet);
fRuleSet = (REDBracketMatcherDefinitionRuleSet) manager.getClientData("ruleSet." + ruleSet);
}
COM: <s> xml callback routine </s>
|
funcom_train/7427907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPathToPolyline(final float[] xp, final float[] yp) {
final GeneralPath path = new GeneralPath();
path.reset();
path.moveTo(xp[0], yp[0]);
for (int i = 1; i < xp.length; i++) {
path.lineTo(xp[i], yp[i]);
}
setShape(path);
}
COM: <s> sets the path to a sequence of segments described by the point components </s>
|
funcom_train/4510015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNonce() {
try {
String path = IM_URL_PREFIX + "generateNonce";
Element element = executeRequest(GET, path);
return WSUtils.getReturn(element);
} catch (Exception e) {
Log.error("Failed executing #generateNonce with Clearspace" , e);
}
return null;
}
COM: <s> returns a nonce generated by clearspace to be used in a sso login </s>
|
funcom_train/20884992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEnumCSV() {
EnumDTO dto = new EnumDTO();
dto.enumField = EnumType.ENUM_VALUE2;
assertTrue(JSefaTestUtil.serialize(CSV, dto).indexOf("enum value 2") >= 0);
JSefaTestUtil.assertRepeatedRoundTripSucceeds(CSV, dto);
}
COM: <s> tests enum csv </s>
|
funcom_train/28351413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTypeDataIndex(int ind) {
distHS_Text.setValue(harpSlitDist_arr[ind]);
energy_Text.setValue(energy_arr[ind]);
distWW_Text.setValue(wireStep_arr[ind]);
distHS_Text.setBackground(Color.white);
energy_Text.setBackground(Color.white);
distWW_Text.setBackground(Color.white);
gaussAmp_Text.setValue(gaussAmp_arr[ind]);
gaussWidth_Text.setValue(gaussWidth_arr[ind]);
gaussWidth_Text.setBackground(Color.white);
threshold_Text.setValue(threshold_arr[ind]);
}
COM: <s> sets the type of device </s>
|
funcom_train/31890486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void unregisterDSlistener() {
BeeMessage req = DsMsgHelper.unregisterListener(null, DS, null, dsListenerId);
try {
ab.sendMessageSync(req);
log.finest("DS listener unregistered for folder: " + path);
} catch (SendMessageBeeException e) {
log.warning("Error sending unregister request to DS: " + e);
}
}
COM: <s> unregister a ds listener on this folder to track extern changes </s>
|
funcom_train/12775765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void populate() {
if (!isPopulated) {
// ensure that we keep the single, canonical IR live throughout initialization, while the instructionIndices map
// is live.
IR ir = node.getIR();
isPopulated = true;
Map<SSAInstruction, Integer> instructionIndices = computeInstructionIndices(ir);
createNodes(ref, cOptions, ir);
createScalarEdges(cOptions, ir, instructionIndices);
}
}
COM: <s> warning since were using a </s>
|
funcom_train/19977214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void release() {
if (LOCKED) {
Log.Debug(this, "Releasing item " + dbo);
QueryHandler.instanceOf().clone(Context.getLock()).removeLock(dbo.getContext(), dbo.__getIDS(), mpv5.db.objects.User.getCurrentUser());
lockedObjects.remove(dbo);
LOCKED = false;
}
}
COM: <s> releases this lock if valid </s>
|
funcom_train/20936159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String message() {
JacsonReport jr = getRegReport();
jr.begin("mail");
jr.report("protocoll", protocol);
jr.report("server", mailServer);
jr.report("user", user);
if ( messages != null )
jr.report("mails", "" + messages.length);
return "mail";
}
COM: <s> implementation analog to line chunk source </s>
|
funcom_train/10840055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPackageFromResource(final String resource) {
final int lastSlash = resource.lastIndexOf('/');
final String pckName = (lastSlash == -1 ? "" : resource.substring(0, lastSlash).replace('/', '.'));
return pckName;
}
COM: <s> return the package from a resource </s>
|
funcom_train/22051836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSelectedInt() {
Object ob = super.getSelectedItem();
if (ob instanceof IDModelData) {
return ( (IDModelData)ob).iID;
} else {
//UIDomainBridge.debug( "Warning: Attempting to get selected int for an item not an instance of IDModelData" );
return 0;
}
}
COM: <s> get the selected int value from the combo </s>
|
funcom_train/27710712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int startEnumeration() throws Exception {
// create enumeration
Element enumeration = fGrammarDocument.createElement("enumeration");
fCurrentElement.appendChild(enumeration);
fCurrentElement = enumeration;
// REVISIT: What is my responsibility for creating a handle?
//int enumIndex = -1;
int enumIndex = fStringPool.startStringList();
// return index
return enumIndex;
} // startEnumeration():int
COM: <s> called when the scanner start scanning an enumeration </s>
|
funcom_train/7272387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Border getCachedOrNewBorder(Color c) {
if( c == null ) return null;
if(borders == null) return null;
Border b = borders.get(c);
if( b == null ) {
b = BorderFactory.createMatteBorder(2,5,2,5,c);
borders.put(c, b);
}
return b;
}
COM: <s> gets a new or old border for this color </s>
|
funcom_train/45623770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTargetCompactFrameworkPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_VbcType_targetCompactFramework_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_VbcType_targetCompactFramework_feature", "_UI_VbcType_type"),
MSBPackage.eINSTANCE.getVbcType_TargetCompactFramework(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the target compact framework feature </s>
|
funcom_train/7726981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("StudentInformationService".equals(portName)) {
setStudentInformationServiceEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/2876921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh() {
String[] title = { "Message", "Time" };
Object[][] data = null; //{{""},{""}};
this.table.setModel(new DefaultTableModel(data, title));
this.systemViewTree.updateUI();
this.table.repaint();
}
COM: <s> refreshes the panel </s>
|
funcom_train/22002882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getEntryPath(Node n){
Node parent = n;
StringBuffer sb = new StringBuffer();
sb.append(n.getName());
while ((parent = (Node)parent.getParent()) != null){
sb.insert(0, parent.getName() + ">");
}
return sb.toString();
}
COM: <s> returns a string representation of the full path of a dictionary entry </s>
|
funcom_train/50085574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isANeighboorsInAnAtomContainer(java.util.List neighs, IAtomContainer ac) {
boolean isIn = false;
int count = 0;
for (Object neigh : neighs) {
if (ac.contains((IAtom) neigh)) {
count += 1;
}
}
if (count > 0) {
isIn = true;
}
return isIn;
}
COM: <s> gets if neighboors of an atom are in an atom container </s>
|
funcom_train/42637629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawRoot(int x1, int x2, int y1, int y2, Graphics g) {
g = getGraphics(g);
int size = g.getFont().getSize();
int root = (int)(getProperty().root*size);
g.drawLine(x1, y2 - root, x1 + root, y2);
g.drawLine(x1 + root, y2, x1 + root, y1);
g.drawLine(x1 + root, y1, x2, y1);
}
COM: <s> draw one root </s>
|
funcom_train/3990039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addData_badaniaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_HistoriaChoroby_data_badania_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_HistoriaChoroby_data_badania_feature", "_UI_HistoriaChoroby_type"),
PrzychodniaPackage.Literals.HISTORIA_CHOROBY__DATA_BADANIA,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the data badania feature </s>
|
funcom_train/36409668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getItem(ConstInfo info) {
int found = 0;
int check = 1;
while (check <= numOfItems && found == 0) {
Object o = items.elementAt(check);
if (info.equals(o)) {
found = check;
}
check++;
}
if (found == 0) {
found = addItem(info);
if (info instanceof LongInfo || info instanceof DoubleInfo) {
addItem(new ConstInfoPadding());
}
}
return found;
}
COM: <s> find a matching item in the constant pool and return its index </s>
|
funcom_train/34673591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGettingParametersAsPropertiesForEmptyGroup() {
try {
core.setConfiguration(this.createComplexConfiguration());
versionEffectiveDate=new VersionEffectiveDate();
Properties p=core.getParametersAsProperties("group-that-does-not-exist");
assertNull(p);
}
catch(Throwable e) {
fail("Unexpected exception:"+e);
}
}
COM: <s> test that attempting to fetch parameters as properties for a group </s>
|
funcom_train/32076922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLineStyleListener(LineStyleListener listener) {
checkWidget();
if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (!isListening(LineGetStyle)) {
setStyleRanges(0, 0, null, null, true);
renderer.clearLineStyle(0, content.getLineCount());
}
addListener(LineGetStyle, new StyledTextListener(listener));
setCaretLocation();
}
COM: <s> adds a line style listener </s>
|
funcom_train/40884083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void merge(Rectangle rect) {
float minX = Math.min(x, rect.x);
float maxX = Math.max(x + width, rect.x + rect.width);
x = minX;
width = maxX - minX;
float minY = Math.min(y, rect.y);
float maxY = Math.max(y + height, rect.y + rect.height);
y = minY;
height = maxY - minY;
}
COM: <s> merges this rectangle with the other rectangle </s>
|
funcom_train/3740187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getEventsList(String userName) throws UserManagerException, EventManagerException {
try {
HibernateUtil.currentSession();
User user = userManager.getUser(userName);
return getEventsList(user);
} catch (HibernateException e) {
logger.warn("Zlapalem wyjatek Hibernate'a "+e.getClass());
e.printStackTrace();
throw new EventManagerException("getEventsList(): "+e.getClass());
}
}
COM: <s> return list of events of a given user </s>
|
funcom_train/46458484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize(BufferedImage image) {
source = image;
w = source.getWidth();
h = source.getHeight();
pixels = new int[w * h];
baselinePixels = new int[w * h];
output = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
if (source.getType() == BufferedImage.TYPE_INT_RGB) input = source;
else {
input = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
gIn = input.createGraphics();
}
}
COM: <s> creates new input output and baseline images </s>
|
funcom_train/40335850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetValorIntInt() {
Matriz mat1=new Matriz(8,8);
Valor val1=new Constante(3.0);
mat1.setValor(val1,4,3);
assertTrue(mat1.getValor(4,3)==val1);
assertEquals(3.0,mat1.getValor(4,3).getValor(),0);
try {
mat1.getValor(16,32);
fail("Deber�a tirar una IndexOutOfBoundsException");
} catch (IndexOutOfBoundsException success) {
}
assertTrue(mat1.getValor(0,0)==null);
}
COM: <s> test method for modelo </s>
|
funcom_train/18895298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
if (ServletKowariServer.getDatabase() != null) {
// log that we're stopping the database
if (log.isInfoEnabled()) {
log.info("Stopping Kowari server");
}
ServletKowariServer.getDatabase().close();
ServletKowariServer.setDatabase(null);
}
}
COM: <s> closes the database </s>
|
funcom_train/35323595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
try {
IdentityHashMap<K,V> m = (IdentityHashMap<K,V>) super.clone();
m.entrySet = null;
m.table = table.clone();
return m;
} catch (CloneNotSupportedException e) {
throw new InternalError();
}
}
COM: <s> returns a shallow copy of this identity hash map the keys and values </s>
|
funcom_train/36187868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void help(String link_description) {
if (!isVisible()) {
setLocation(70, 70);
setVisible(true);
}
requestFocus();
if (link_description != null) {
help_pane.scrollToReference(link_description);
}
else {
help_pane.scrollToReference("top");
}
}
COM: <s> help frame set visible and scrolled to the required topic </s>
|
funcom_train/20704024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAssoications(Criteria criteria, DrugCode exampleInstance) {
if (exampleInstance.getDrug() != null) {
criteria = criteria.add(Restrictions.eq("drug.id", exampleInstance
.getDrug().getId()));
}
if (exampleInstance.getCategory() != null) {
criteria = criteria.add(Restrictions.eq("category.id",
exampleInstance.getCategory().getId()));
}
}
COM: <s> this function adds associated entities to an example criterion </s>
|
funcom_train/18864055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reparseDates() {
String df = getDateFormat();
int count = qAcc.numItems();
for (int i = 0; i < count; i++) {
QifTransaction qt = qAcc.get(i);
qt.date = QifUtils.parseDate(qt.oDate, df);
}
System.out.println("reparse");
}
COM: <s> reparse the dates based on the date format in the combo </s>
|
funcom_train/16791100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Menu getMenuBar() {
if (this.menuBar == null) {
ActionResources res = this.resources.getActionResources(this, this.ACTION_RESOURCES);
this.actionMenu = (ActionMenu) res.getChild(this.MENU_BAR);
this.menuBar = (Menu) this.actionMenu.getWidget(this.getShell());
}
return this.menuBar;
}
COM: <s> get the menu bar for this panel </s>
|
funcom_train/8742199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getStackingOffset() {
int index = getMapComposer().getDesktopState().getVisibleLegends().indexOf(this);
int offset;
if (index > -1) {
offset = ( index *
settingsSupplementary.getValueAsInt(WINDOW_STACKING_BOUNDARY)) %
settingsSupplementary.getValueAsInt(WINDOW_STACKING_CONSTANT);
}
else {
offset = 0;
logger.info("stacking offset position requested for unregistered window");
}
return offset;
}
COM: <s> get our index position in portal session the stack size </s>
|
funcom_train/8346122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public El alignTo(Element align, String pos, int[] offsets) {
if (offsets == null) {
offsets = new int[] {0, 0};
}
Point p = getAlignToXY(align, pos, offsets);
setXY(p);
return this;
}
COM: <s> aligns the element with another element relative to the specified anchor </s>
|
funcom_train/48670222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float compare(VisualDescriptor desc) {
float result = -1f;
if(desc instanceof MPEG7ScalableColor) {
MPEG7ScalableColor scd2 = (MPEG7ScalableColor)desc;
//Check if the parameters between the two SCD are the same:
if(checkParam(scd2)) {
int diffsum = 0;
for (int i = 0; i < nofCoefficients; i++) {
diffsum += Math.abs(this.histoHaar[i] - scd2.histoHaar[i]);
}
result = (float)diffsum;
}
}
return result;
}
COM: <s> compare two dsc using the l1 norm between each bins of the histograms </s>
|
funcom_train/50120241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String process(String content) {
String ret = utils.replace(content, "&", "&");
ret = utils.replace(ret, "<", "<");
ret = utils.replace(ret, ">", ">");
ret = utils.replace(ret, "\"", """);
return ret;
}
COM: <s> replace xml specific characters in the content with their entity declaration equivalents </s>
|
funcom_train/2586175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void refreshButtons() {
SerialDate current = getFirstVisibleDate();
for (int i = 0; i < 42; i++) {
final JButton button = this.buttons[i];
button.setText(String.valueOf(current.getDayOfWeek()));
button.setBackground(getButtonColor(current));
current = SerialDate.addDays(1, current);
}
}
COM: <s> update the button labels and colors to reflect date selection </s>
|
funcom_train/26225784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
Lookahead p=null;
try {
p = (Lookahead)super.clone();
p.fset = (BitSet)fset.clone();
p.cycle = cycle; // strings are immutable
if ( epsilonDepth!=null ) {
p.epsilonDepth = (BitSet)epsilonDepth.clone();
}
} catch (CloneNotSupportedException e) {
throw new InconsistencyException();
}
return p;
}
COM: <s> make a deep copy of everything in this object </s>
|
funcom_train/34999958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void forumTopics(@Parameter(key = "forumId") int forumId) {
if (!this.isRSSEnabled() || !this.userSession.getRoleManager().isForumAllowed(forumId)) {
this.viewService.renderView(Actions.ACCESS_DENIED);
}
else {
String contents = this.rssService.forForum(forumId, this.viewService);
this.propertyBag.put("contents", contents);
this.viewService.renderView(Actions.RSS);
}
}
COM: <s> display the latest topics from a specific forum </s>
|
funcom_train/16605194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ArrayList convertToCurvePointCurve(ArrayList point2DCurve) {
ArrayList curvePointCurve = new ArrayList();
for (int j = 0; j < point2DCurve.size(); j++) {
Vector2f c = (Vector2f) point2DCurve.get(j);
curvePointCurve.add(new CurvePoint(c.getX(), c.getY()));
}
return curvePointCurve;
}
COM: <s> convert a point 2d curve into a curve point curve </s>
|
funcom_train/51657690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onFocusRevisionChanged(Revision previousRevision, Revision nextRevision) {
if (DEBUG)
System.out.println("revision: " + previousRevision + " > " + nextRevision); //$NON-NLS-1$ //$NON-NLS-2$
fFocusRevision= nextRevision;
uninstallWheelHandler();
installWheelHandler();
showOverviewAnnotations(fFocusRevision != null ? fFocusRevision : fSelectedRevision);
redraw(); // pick up new highlights
}
COM: <s> handles a changing focus revision </s>
|
funcom_train/51783421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupForReset() {
List<Point2D> points = new ArrayList<Point2D>();
points.add(new Point2D.Double(12313, 154543));
points.add(new Point2D.Double(6564, 14234));
points.add(new Point2D.Double(2313, 7657));
points.add(new Point2D.Double(231323, 76573));
points.add(new Point2D.Double(23, 73));
}
COM: <s> sets five points placed arbitrarly in the space </s>
|
funcom_train/43471544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void menubarAreaOpen() {
/**
* Open menubar area
*/
s.appendNL("<table width=\"100%\">")
.appendNL("<tr>")
.append("<td ")
.appendAttr("width", "100%")
.appendAttr("class", "zxMenuBar")
.appendNL(">");
}
COM: <s> open the menubar area </s>
|
funcom_train/3118522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyPressed(PInputEvent e) {
switch (e.getKeyCode()) {
case KeyEvent.VK_DELETE :
if (deleteKeyActive) {
Iterator selectionIt = selection.iterator();
while (selectionIt.hasNext()) {
PNode node = (PNode)selectionIt.next();
node.removeFromParent();
}
selection.clear();
}
}
}
COM: <s> delete selection when delete key is pressed if enabled </s>
|
funcom_train/10748592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test4() {
try {
Constructor c = Inner2.class.getDeclaredConstructor((Class[]) null);
assertNotNull("unexpected null", c);
assertEquals("array length:", 0, c.getParameterTypes().length);
} catch (Exception e) {
fail(e.toString());
}
}
COM: <s> private constructor which takes no parameters must be reflected </s>
|
funcom_train/9394575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canRead() {
if (path.length() == 0) {
return false;
}
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkRead(path);
}
byte[] pp = properPath(true);
// BEGIN android-changed
return exists() && isReadableImpl(pp);
// END android-changed
}
COM: <s> indicates whether the current context is allowed to read from this file </s>
|
funcom_train/21437610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element toXML(Document document) {
if( document==null )
return null;
// create root node
Element root_node = document.createElement("FragmentCollection");
if( root_node==null )
return null;
// add fragments
for(FragmentEntry fe : fragments )
root_node.appendChild(fe.toXML(document));
return root_node;
}
COM: <s> create an xml representation of this object to </s>
|
funcom_train/37775410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FormKey quitLookup(HttpServletRequest request) {
if (request != null)
request.removeAttribute(LOOKUP_ATTRIBUTE);
if (isInMultiSelectLookupMode() || isInSelectLookupMode()) {
return quitAndReturnToCallingScreen();
} else {
// Quit this component
quit();
// forward to the jsp
return LOOKUP_FORM_KEY;
}
}
COM: <s> this will remove the lookup attribute from the request stream </s>
|
funcom_train/9564018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getAsFloat(String aKey, float aDefault) {
float tmpResult = aDefault;
synchronized (properties) {
if (properties.containsKey(aKey)) {
tmpResult = ConvertUtils.toFloat(properties.getProperty(aKey), aDefault);
}
}
return tmpResult;
}
COM: <s> returns value for given key converted to float if property doesnt exist </s>
|
funcom_train/1600701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int inside(Point testPoint, GPhysicalPoint p, int zoom){
for(int i=0;i<objectsSize;i++){
Rectangle rect = objects[i].getRectangle(p,zoom);
if(rect == null) continue;
if(rect.contains(testPoint.x, testPoint.y)) return i;
}
return -1;
}
COM: <s> method to test whether an object resides on a given point </s>
|
funcom_train/13393205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void center() {
String group = Visualization.ALL_ITEMS;
int margin = 50;
long duration = 2000;
Rectangle2D bounds = visualization.getBounds(group);
GraphicsLib.expand(bounds, margin + (int) (1 / display.getScale()));
DisplayLib.fitViewToBounds(display, bounds, duration);
}
COM: <s> center the service graph in the display component </s>
|
funcom_train/13811402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(ServletConfig config) throws ServletException {
super.init(config);
try {
// create toJava interface used to obtain forwarding address
toJava = (CCFServletToJava) EChartsProxyServletToJava.newInstance(this);
} catch (Exception e) {
getMonitor().putEvent(new InfoEvent(e, "Exception encountered creating CCFServletToJava interface"));
throw new ServletException(e);
}
}
COM: <s> called when servlet instance created </s>
|
funcom_train/47193903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addRoar(Roar roar) throws RemoteException {
out.println("adding Roar ... ");
AddRoar a = new AddRoar();
avid.a3.client.roary.stubs.RoaryServiceStub.Roar r =
new avid.a3.client.roary.stubs.RoaryServiceStub.Roar();
r.setAuthor(this.author);
r.setCreationTime(roar.getCreationTime());
r.setId(roar.getId());
r.setText(roar.getText());
a.setR(r);
return stub.addRoar(a).get_return();
}
COM: <s> add a roar </s>
|
funcom_train/20646488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getStopButton() {
final MergingMonitorUI tthis = this;
if (stopButton == null) {
stopButton = new SButton(Lang.translate("Stop"));
stopButton.setPreferredSize(new Dimension(100,20));
stopButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (ModalDialogBox.ANS_OK
== ModalDialogBox.confirm(tthis,Lang.translate(
"Stop this operation")))
tthis.dispose();
}
});
}
return stopButton;
}
COM: <s> get the button that proposes to continue </s>
|
funcom_train/10521780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WSDLReader getReader() throws WSDLException {
WSDLFactory wsdlFactory = WSDLFactory.newInstance();
WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
wsdlReader.setFeature("javax.wsdl.verbose", true);
wsdlReader.setFeature("javax.wsdl.importDocuments", true);
return wsdlReader;
}
COM: <s> get a wsdlreader </s>
|
funcom_train/1728594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reloadCurrentlyPlaying(Hashtable<String, MP3File> fileHash) {
if (getCurrent() != null) {
MP3File newNowPlaying = fileHash.get(getCurrent().getFile()
.getAbsolutePath().toLowerCase());
if (newNowPlaying != null) {
currentMedia = newNowPlaying;
}
}
}
COM: <s> when a reload is complete call this to find the song currently playing </s>
|
funcom_train/40678906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(final NEW_DECODED_PAD listener) {
connect(NEW_DECODED_PAD.class, listener, new GstCallback() {
@SuppressWarnings("unused")
public void callback(DecodeBin elem, Pad pad, boolean last) {
listener.newDecodedPad(elem, pad, last);
}
});
}
COM: <s> adds a listener for the code new decoded pad code signal </s>
|
funcom_train/10617020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidAlgorithmParameterException04() {
Throwable cause = null;
InvalidAlgorithmParameterException tE = new InvalidAlgorithmParameterException(
cause);
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
COM: <s> test for code invalid algorithm parameter exception throwable code </s>
|
funcom_train/1492200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelAndView viewCountry(HttpServletRequest request, HttpServletResponse response) throws Exception {
ModelAndView mav = new ModelAndView("repat.country");
String country = request.getParameter("country");
Locale locale = RequestContextUtils.getLocale(request);
addCountryInfo(mav, country, locale);
mav.addObject("networkTotal", occurrenceManager.getTotalOccurrenceRecordCount());
return mav;
}
COM: <s> show view breakdown for this country </s>
|
funcom_train/25775228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Substitution restrict(Expression expression) {
Substitution sigma = new Substitution();
Substitution psi = this.factor();
// iterate over all variables gotten from expression
for ( Variable var : expression.getVariables() ){
if (psi.containsKey( var )){
Expression expression2 = psi.get(var);
sigma.addAssociation( var, expression2 );
}
}
return sigma;
}
COM: <s> this method returns a subset of the substitution that contains only the </s>
|
funcom_train/42639669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SortedMap getAlternativeGroups(AlternativesProblem problem){
TreeMap map = new TreeMap();//no need to send comparator
for (int i = 0; i < getGroupsCount(); i++) {
Object group = getGroupKey(i);
int[] indices = getAlternativeIndices(i);
for (int j = 0; j < indices.length; j++) {
map.put(getAlternative(indices[j],problem), group);
}
}
return map;
}
COM: <s> returns pairs alternative group sorted by alternatives </s>
|
funcom_train/39243444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
Row r1 = (Row)o1;
Row r2 = (Row)o2;
Item n1 = (Item)r1.getData();
Item n2 = (Item)r2.getData();
return n2.getPublicationDate().compareTo(n1.getPublicationDate());
}
COM: <s> compare job offer publication date </s>
|
funcom_train/18243717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ICollectionAssembly getLeftInputAssembly() throws AssemblerException {
// Find the input left assembly:
ICollectionAssembly ret = null;
try {
ret = this.inputCollection.getLeftAssembly();
}
catch (DataStoreException dsx) {
String message = ResourceUtil.getResource(TigrAssemblerResultsAnalysis.class, "text.caught_datastore_exception");
throw new AssemblerException(message);
}
return ret;
}
COM: <s> utility method to find the former left assembly </s>
|
funcom_train/7310123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Border assignBorder(JComponent c, Border newBorder) {
if (newBorder == null)
return null;
log("New border=" + newBorder.getClass().getName());
if (c instanceof JTabbedPane) {
return newBorder;
} else {
c.setBorder(newBorder);
return c.getBorder();
}
}
COM: <s> assigns the new border to the component unless the component </s>
|
funcom_train/43913849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object parseToken(String token) throws Exception {
String[] nameOrder = token.split(" ");
String propertyName = nameOrder[0];
SortOrder order = SortOrder.ASCENDING;
if (nameOrder.length > 1) {
if ("D".equalsIgnoreCase(nameOrder[1])) {
order = SortOrder.DESCENDING;
}
}
return filterFactory.sort(propertyName, order);
}
COM: <s> parses a token of the form field1 a d into an instnace of </s>
|
funcom_train/45835099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PEPService getPEPService(String jid) {
PEPService pepService = null;
final Lock lock = CacheFactory.getLock(jid, pepServices);
try {
lock.lock();
if (pepServices.containsKey(jid)) {
// lookup in cache
pepService = pepServices.get(jid);
} else {
// lookup in database.
pepService = loadPEPServiceFromDB(jid);
// always add to the cache, even if it doesn't exist. This will
// prevent future database lookups.
pepServices.put(jid, pepService);
}
} finally {
lock.unlock();
}
return pepService;
}
COM: <s> retrieves a pep service attempting first from memory then from the </s>
|
funcom_train/37835314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String buildTweetMessage(Item i, int q, int p) {
StringBuilder message = new StringBuilder();
message.append("New offer for ");
message.append(Grammar.quantityplnoun(q, i.getName(), "a"));
message.append(" at ");
message.append(p);
message.append(" money. ");
String stats = "";
String description = i.describe();
int start = description.indexOf("Stats are (");
if(start > -1) {
stats = description.substring(start);
}
message.append(stats);
return message.toString();
}
COM: <s> builds the message for the tweet to be posted </s>
|
funcom_train/12652003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUserPatient() {
// Ensure that the holder is empty
Invitation invitation = new Invitation();
assert invitation.getUserPatient() == null : "UserPatient not null "
+ invitation.getUserPatient();
// Test the set and get
UserPatient userPatient = new UserPatient();
invitation.setUserPatient(userPatient);
assert userPatient == invitation.getUserPatient() : "UserPatient "
+ userPatient + " not contained in invitation " + invitation;
}
COM: <s> test user patient field </s>
|
funcom_train/14074283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createPaddingCombo() {
GridData gridData4 = new GridData();
gridData4.horizontalAlignment = GridData.FILL;
gridData4.grabExcessVerticalSpace = true;
gridData4.verticalAlignment = GridData.CENTER;
paddingCombo = new Combo(modePaddingGroup, SWT.NONE | SWT.READ_ONLY);
paddingCombo.setLayoutData(gridData4);
}
COM: <s> this method initializes padding combo </s>
|
funcom_train/40359136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testShutdown() throws Exception {
SimpleTestConnector connector = makeSimpleConnector();
assertEquals(1, factory.connectors.size());
assertFalse(connector.isShutdown());
assertFalse(connector.isDeleted());
factory.shutdown();
assertEquals(0, factory.connectors.size());
assertTrue(connector.isShutdown());
}
COM: <s> test the shutdown method </s>
|
funcom_train/41150487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BooleanBitMatrix transpose() {
BooleanBitMatrix transposed = new BooleanBitMatrix(m_columns, m_rows);
for (int i = 0; i < m_rows; i++) {
for (int j = 0; j < m_columns; j++) {
transposed.set(j, i, get(i, j));
}
}
return transposed;
}
COM: <s> swap the rows and the columns of the code boolean bit matrix </s>
|
funcom_train/4844918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OperatorNode getOperator(Integer num) {
switch(num) {
case 0: return (OperatorNode)new MinusNode(null);
case 1: return (OperatorNode)new MultiplyNode(null);
case 2: return (OperatorNode)new DivideNode(null);
case 3: return (OperatorNode)new PlusNode(null);
default: return (OperatorNode)new MinusNode(null);
}
}
COM: <s> todo need to make sure that we do not have these hard coded </s>
|
funcom_train/39106590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showCard(Component card) {
if (card.getParent() != this) {
add(card);
}
Component visibleComponent = getVisibleCard();
if (visibleComponent == card)
return;
visibleComponent.setVisible(false);
card.setVisible(true);
revalidate();
repaint();
}
COM: <s> hides the currently visible child card and show the </s>
|
funcom_train/7269526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateButtons() {
if (currentPage == null) {
finishAction.setEnabled(false);
nextAction.setEnabled(false);
previousAction.setEnabled(false);
} else {
boolean complete = currentPage.isPageComplete();
boolean canFlipToNext = currentPage.canFlipToNextPage();
finishAction.setEnabled(complete && !canFlipToNext);
nextAction.setEnabled(complete && canFlipToNext);
previousAction.setEnabled(currentPage.getPrevious() != null);
}
}
COM: <s> updates the buttons according to the status of the currently visible </s>
|
funcom_train/48623352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ItemVersion changeCurrentIrVersion(int myVersion) {
//the max version is always the current version
if( myVersion == maxVersion ) return this.getCurrentVersion();
for(ItemVersion version: versions)
{
if( version.getVersionNumber() == myVersion)
{
maxVersion = maxVersion + 1;
ItemVersion newVersion = new ItemVersion(version.getItem(), this, maxVersion);
this.versions.add(newVersion);
currentVersion = newVersion;
return newVersion;
}
}
return null;
}
COM: <s> changes the current item version if the version exists otherwise </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.